NextFrame without updating viewport

NextFrame without updating viewport

antonio.funaro
Observer Observer
610 Views
6 Replies
Message 1 of 7

NextFrame without updating viewport

antonio.funaro
Observer
Observer

Hello guys,

any help with this script?

NextFrame without updating viewport

( and next KeyFrame with no viewport update as alternative)

 

thanks you all!

0 Likes
611 Views
6 Replies
Replies (6)
Message 2 of 7

Kahylan
Advisor
Advisor

Hi!

 

I 'm not sure if you mean this, because its one of the most common functions when working with scripts that iterate through every frame, so you probably already heard about it... But the "refresh" command, which is responsible for windows updating in the Maya interface, has a "suspend" (-su) flag which prohibits windws from updating.

 

I hope this helps

0 Likes
Message 3 of 7

mcw0
Advisor
Advisor
0 Likes
Message 4 of 7

antonio.funaro
Observer
Observer

this is an example I found on Autodesk mel guide.

the only thing it does is to bring me to the frame -10, I want to move forward of 1 frame ( relative to my position on the timeline)  each time I run the command 


I tried something like:  currentTime -edit NEXTFRAME -update no;    and also using different ways but it always update the viewport.


0 Likes
Message 5 of 7

antonio.funaro
Observer
Observer

this Runtime I made works but it jumps between Keyframes. I want the same behavior but simply going forward of 1 frame on the timeline

currentTime -edit -update false(`playbackOptions -q -slp` ? `findKeyframe -timeSlider -which previous` : `findKeyframe -which previous`);

 

Message 6 of 7

antonio.funaro
Observer
Observer

oh ok this seems to work!

currentTime -edit (`currentTime -query`+ 1) -update no;

0 Likes
Message 7 of 7

mcw0
Advisor
Advisor

I knew you'd figure it out.  🙂

0 Likes