View Full Version : Check current frame number during playblast
How check current frame number during playblast because the currentTime -q is not work correctly during playblast
I want to writing if statement during playblast like
if current frame is 50 , do this action
11-27-2012, 11:39 AM
you can try temporary scriptJob or scriptNode, which will call your procedure during timeChange, and remove it at the end of procedure
or maybe script your own playblast as for loop:
* set new frame
* check frame number -> call procedure
* take snapshot
if you want really only playblast
11-27-2012, 12:36 PM
or use "frame" via expression?
I write now this code but not work
scriptJob -timeChange "CurrTime()";
global proc CurrTime()
if($currentFrame == 0)
setAttr "dress1.visibility" 0;
setAttr "Skirt3_a.visibility" 0;
setAttr "Skirt3_b.visibility" 0;
setAttr "dress2.visibility" 0;
setAttr "Jeans1_a.visibility" 1;
setAttr "Jeans1_b.visibility" 1;
setAttr "Jeans1_c.visibility" 1;
I want during playblast if reach frame 0 do action
Can you correct it, please
Thanks in advance
11-27-2012, 02:50 PM
its long time i have worked with scriptJob
please try this:
scriptNode -st 7 -beforeScript "CurrTime()" -name "timeChangeNodeScript";
11-27-2012, 07:00 PM
you can also read the value from the global time node in maya( there can only be one in a scene)
most of the time its named time...
this will give you the current frame number: be aware that this is a double value: in most case its a whole number but in reality its valid to have 3.25 as a time value.
Very thanks for all ^________^
It work well with scriptNode :)
11-27-2012, 09:15 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.