danw Posted December 23, 2009 Share Posted December 23, 2009 Is there any way, within a ForEach SOP set to iterate by number, to force the ForEach to end early? I'm imagining it being possible to set the stamp value to the end condition or some such, but I've no idea if its possible to affect the stamp value directly. This would create the effect of a While SOP, so if anyone knows an alternative way to hack this, anything would be good. I just need a SOP subnetwork that will iterate until a condition is met, rather than having to be pre-set. Quote Link to comment Share on other sites More sharing options...
graham Posted December 23, 2009 Share Posted December 23, 2009 (edited) There is no way you can interrupt the cooking of the operator. To do what you want you basically need to come up with your condition and somehow pass that info to successive iterations. If you are using Merge Results, then you'd want to let the iterations know to pass nothing to the output. If you aren't merging results then you'd need to let it know to just pass the input geometry through. Edited December 23, 2009 by graham Quote Link to comment Share on other sites More sharing options...
edward Posted December 23, 2009 Share Posted December 23, 2009 Switch SOP? Quote Link to comment Share on other sites More sharing options...
petz Posted December 23, 2009 Share Posted December 23, 2009 it´s a bit clumsy but it works. using python would be easier. petz Quote Link to comment Share on other sites More sharing options...
danw Posted December 23, 2009 Author Share Posted December 23, 2009 it´s a bit clumsy but it works. using python would be easier. petz Thanks for the link, interesting idea. It looks like it works over successive frames, but I can't see it cutting short the current for loop. I could be being daft however. :-) From what I can tell, the only robust way to do it is as graham/edward suggest and just have a switch in there to bypass the contents of the foreach and save the time they'd take to cook. Just a shame to waste all those needless iterations cooking the foreach itself, especially if there's a whole lot of redundancy in there. *sigh*... oh for a While op :-P Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.