Hi
I'm trying to create a script that automatically sets the timeline range to the animation range of a selected camera.
I track my cameras in nuke using DPXs sequences created from the original ARRIRAW files. so its animation range is based on the frame range of the clip.
So when i import the camera into maya, the animation doesnt start from 1, its whatever the frame range was so could be 19567-20111 for example.
I've been trying to create a python script using this as my base,
import maya.cmds as cmds
firstKey = cmds.keyframe("camera1.translateX", index=(0,0), query=True);
print firstKey
and i get
19567.0
and i know i can manually alter the animation start time using
playbackOptions -ainmationStartTime 19567;
but when i try and patch one into the other im getting the error
Invalid arguments for flag 'ast'. Expected time, got [ float ],
So how can i convert my returned float value, from the first command, into a time ( i assume as i could just type in 19567, all it actually needs is an integer, not a float.)
Thanks
Andy