VOPs - break for loop

   4852   2   0
User Avatar
Member
512 posts
Joined: July 2009
Offline
Hi community,

I'm curious, is there a way in VOPs to break a for loop like the “break” method in VEX? Just to clarify, I don't want to break the for loop for all the points at the same time, but instead base the length of each point's iterations to a certain condition.

Thanks,

Manu
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
8833 posts
Joined: July 2007
Offline
maybe not break directly
but you can plug END from subinput inside of For VOP to I in suboutput, to terminate For Loop after this iteration
so if you switch between original I and END values based on your condition and plug the result to I you will get break on that condition

or you can use While VOP instead of For VOP which primarily breaks upon condition and if you desire for loop functionality, you can increment some variable and test for maximum number of iterations, which will be part of your condition

of course there is always Inline VOP where you can use your “break” command if you are inside For VOP, or write complete for loop in there
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
512 posts
Joined: July 2009
Offline
thanks Tomas, good advise! Totally forgot about the inline VOP, that's the way to go in this case!!

cheers!
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
  • Quick Links