layout_children
Arrange child nodes under a specified parent by setting their positions with configurable horizontal/vertical spacing and direction. Supports both new parent_path and legacy parent arguments.
Instructions
布局父节点下的子节点(按间距参数手动 setPosition,跨 Houdini 版本可移植)。
参数说明:
- parent_path: 父节点路径(PR 9 推荐命名)。
- parent: 旧版别名;若同时传 parent_path 与 parent,以 parent_path 为准。
- horizontal_spacing: 水平间距(Houdini units),缺省 2.0。
- vertical_spacing: 垂直间距,缺省 1.5。
- direction: "horizontal"(默认)或 "vertical"。
返回 dict 包含 parent_path / children_count / direction / spacing
四项。后向兼容:现有调用 layout_children(ctx, parent) 仍 work。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ctx | Yes | ||
| parent | No | ||
| direction | No | ||
| parent_path | No | ||
| vertical_spacing | No | ||
| horizontal_spacing | No |