daz_save_camera_preset
Captures camera position, rotation, and scale as a serializable preset dictionary for later restoration with the load camera preset tool.
Instructions
Save camera position and rotation as preset data.
Captures the current transform properties of a camera (position, rotation, scale) and returns them as preset data. This data can be saved by the client and later restored using daz_load_camera_preset().
Args: camera_label: Display label of the camera to save.
Returns:
preset: Dictionary containing:
label: camera label
transforms: Dictionary of property names to values (XTranslate, YTranslate, ZTranslate, XRotate, YRotate, ZRotate, XScale, YScale, ZScale)
Example: # Save camera position preset = daz_save_camera_preset("Camera 1")
# Client can store preset data (e.g., in a file or database)
import json
with open("my_camera_preset.json", "w") as f:
json.dump(preset, f)
# Later, restore the camera
with open("my_camera_preset.json") as f:
preset = json.load(f)
daz_load_camera_preset("Camera 1", preset["preset"])Note: - Preset data is a plain dictionary that can be serialized (JSON, etc.) - Includes all transform properties (position, rotation, scale) - Does not include camera-specific settings (focal length, DOF, etc.) - Preset data can be applied to any camera, not just the original
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| camera_label | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||