daz_get_parent
Retrieve the parent node of a given node in the scene hierarchy. Useful for navigating upward through parent-child relationships.
Instructions
Get parent node of a node.
Returns the immediate parent of a node, or null if the node is a root node (no parent). Useful for traversing hierarchy upward.
Args: node_label: Display label or internal name of the child node.
Returns:
node: Child node label
parent: Parent node object with label, name, type, or null if no parent
Example: # Get parent of a bone result = daz_get_parent("lHand") # Returns: {"parent": {"label": "lForearmBend", "name": "lForearmBend", ...}}
# Check if node is root (has no parent)
result = daz_get_parent("Genesis 9")
# result["parent"] == null
# Traverse hierarchy upward
node = "lIndex3"
while True:
result = daz_get_parent(node)
if not result["parent"]:
break
print(f"Parent of {node}: {result['parent']['label']}")
node = result["parent"]["label"]Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node_label | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||