daz_set_parent
Change a node's parent to attach props to figures or reorganize scene hierarchy. Optionally maintain world transform to preserve position.
Instructions
Set parent of a node (parenting operation).
Changes the parent of a node, effectively moving it in the scene hierarchy. Commonly used to attach props to figures (e.g., weapon to hand) or reorganize scene structure.
Args: node_label: Display label or internal name of node to parent. parent_label: Display label or internal name of new parent. maintain_world_transform: If True (default), adjust local transform to maintain the same world-space position/rotation. If False, keep local transform (node will move in world space).
Returns:
success: true on success
node: Node label
newParent: New parent label
previousParent: Previous parent label (or null if was root)
Example: # Attach sword to right hand (maintain position) result = daz_set_parent("Sword", "rHand", maintain_world_transform=True) # Sword stays in place, now follows hand movements
# Parent camera to figure (follows figure)
result = daz_set_parent("Camera 1", "Genesis 9", maintain_world_transform=True)
# Unparent node (make it root) - parent to Scene root
result = daz_set_parent("Prop", "Scene", maintain_world_transform=True)Note: When maintain_world_transform=True, the node's world position is preserved, but its local transform values (X/Y/Z Translate, Rotate) will change to account for the new parent's transform.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node_label | Yes | ||
| parent_label | Yes | ||
| maintain_world_transform | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||