daz_frame_camera_to_node
Positions the camera to frame a specified node in the scene, automatically calculating distance based on the node's bounding box or using a user-defined distance.
Instructions
Frame camera to show a node by positioning at calculated distance.
Positions the camera to frame the specified node in view. Calculates the node's bounding box and positions the camera at an appropriate distance to show the entire object. Camera is positioned in front (+Z) and aimed at the node's center.
Args: camera_label: Display label of the camera to position. node_label: Display label of the node to frame. distance: Optional distance from node center in cm. If not specified, calculated as 2.5x the largest dimension of the node's bounding box.
Returns:
success: true on success
camera: camera label
node: node label
position: camera world position {x, y, z}
nodeCenter: node bounding box center {x, y, z}
nodeSize: node bounding box size {x, y, z}
Example: # Frame a character (auto distance) daz_frame_camera_to_node("Camera 1", "Genesis 9")
# Frame a prop with specific distance
daz_frame_camera_to_node("Camera 1", "Sword", distance=50)
# Frame entire scene
daz_frame_camera_to_node("Camera 1", "Scene", distance=500)
# Close-up on head
daz_frame_camera_to_node("Camera 1", "head", distance=30)Note: - Auto-calculated distance is 2.5x the largest bounding box dimension - Camera is positioned in front of the node (+Z direction) - Camera is aimed at the center of the node's bounding box - Useful for automatically framing objects of varying sizes
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| camera_label | Yes | ||
| node_label | Yes | ||
| distance | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||