daz_get_animation_info
Retrieve current animation timeline information including frame range, current frame, frames per second, total frames, and duration. Use this data to manage animation rendering or check playback position.
Instructions
Get animation timeline info (current frame, range, fps).
Returns information about the current animation timeline state, including the current frame, frame range, and frames per second.
Returns:
currentFrame: current timeline position
startFrame: first frame of animation range
endFrame: last frame of animation range
fps: frames per second
totalFrames: total number of frames (endFrame - startFrame + 1)
durationSeconds: animation duration in seconds
Example: # Get timeline info info = daz_get_animation_info() print(f"Current frame: {info['currentFrame']}") print(f"Range: {info['startFrame']}-{info['endFrame']}") print(f"Duration: {info['durationSeconds']} seconds") print(f"FPS: {info['fps']}")
# Render entire animation
info = daz_get_animation_info()
for frame in range(info['startFrame'], info['endFrame'] + 1):
daz_set_frame(frame)
daz_render(output_path=f"output/frame_{frame:04d}.png")
# Check if at end of animation
info = daz_get_animation_info()
if info['currentFrame'] >= info['endFrame']:
print("At end of animation")Note: - FPS is typically 30 in DAZ Studio - Frame range is inclusive (both start and end are included) - totalFrames includes both start and end frames - Use before rendering animation to know frame count
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||