Check if keyframe exists beyond the timeline?

126 views
Skip to first unread message

Panupat Chongstitwattana

unread,
Oct 5, 2012, 1:57:08 AM10/5/12
to python_in...@googlegroups.com
In my current project we have very tight instruction not to have any keyframes beyond the given timeframe at all. For example, if a shot lasts from frame 1 to frame 100, any keyframe beyond that (-1, 0, 101 or even as tiny as 100.1) cannot exist.

I want to create a script that would tell the animator if they have any of such keyframes. How should I approach this without having to loop through all objects or loop through the entire timeline and beyond?

Thanks.

Mark Jackson

unread,
Oct 5, 2012, 6:39:04 AM10/5/12
to python_in...@googlegroups.com
I'd use the findKeyframe call with the which flag to find first and last keyframes in the scene then work from that.

cmds.findKeyframe(which='last')

Mark





--
-------------------------------------
Mark Jackson
Technical Animation Director
http://markj3d.blogspot.com/
Reply all
Reply to author
Forward
0 new messages