sparkChan Posted June 6, 2011 Share Posted June 6, 2011 hi, everyone. I want to add a point to sphere when frame is equal to 10.so I create a python sop and write: geo = hou.pwd().geometry() if hou.frame() == 10: point = geo.createPoint() point.setPosition((1,0,0)) but when frame is greater than 10, the point disappears. I want to keep the point, so what's the problem? thanks. Quote Link to comment Share on other sites More sharing options...
sanostol Posted June 6, 2011 Share Posted June 6, 2011 after frame 10 the condition is not true so not point is generated. this only works in dops(sopsolver) or pops (source) hi, everyone. I want to add a point to sphere when frame is equal to 10.so I create a python sop and write: geo = hou.pwd().geometry() if hou.frame() == 10: point = geo.createPoint() point.setPosition((1,0,0)) but when frame is greater than 10, the point disappears. I want to keep the point, so what's the problem? thanks. Quote Link to comment Share on other sites More sharing options...
sparkChan Posted June 6, 2011 Author Share Posted June 6, 2011 after frame 10 the condition is not true so not point is generated. this only works in dops(sopsolver) or pops (source) In my mind, I think if I create a point, it will keep it, no matter the condition is true or false. just like sop solver, it can keep the previous state. do you think what should I do to add point to sphere under this condition? thanks Quote Link to comment Share on other sites More sharing options...
Macha Posted June 6, 2011 Share Posted June 6, 2011 (edited) In a sense there is no previous or after in sops. Any frame can be cooked independently from any other, so it is possible to cook frame 234 without ever visiting Frame 10. Well, that's how I understand it. Edited June 6, 2011 by Macha Quote Link to comment Share on other sites More sharing options...
sanostol Posted June 6, 2011 Share Posted June 6, 2011 timedependent modeling means solving, so sopsolver is the way to go i think or in this very special case You could change Your expression to $FF>=10, but I think that is not what You are looking for Quote Link to comment Share on other sites More sharing options...
zarti Posted June 6, 2011 Share Posted June 6, 2011 (edited) hi, everyone. I want to add a point to sphere when frame is equal to 10.so I create a python sop and write: geo = hou.pwd().geometry() if hou.frame() == 10: point = geo.createPoint() point.setPosition((1,0,0)) but when frame is greater than 10, the point disappears. I want to keep the point, so what's the problem? thanks. there is no problem . in reality , you simply wanted the point to appear on Frame 10 and beyond ... if so , replace the "==" with ">" . geo = hou.pwd().geometry() if hou.frame() > 10: point = geo.createPoint() point.setPosition((1,0,0)) edit: forgot , also replace the "10" with "9" .. .cheers Edited June 6, 2011 by zarti Quote Link to comment Share on other sites More sharing options...
hopbin9 Posted June 6, 2011 Share Posted June 6, 2011 The node network is cooked on every frame. That's why it disappears. Quote Link to comment Share on other sites More sharing options...
zarti Posted June 6, 2011 Share Posted June 6, 2011 The node network is cooked on every frame. That's why it disappears. the point disappears because the code tells it 'to disappear' .. or better lets say ; 'to not appear' . try my suggestion .. Quote Link to comment Share on other sites More sharing options...
hopbin9 Posted June 6, 2011 Share Posted June 6, 2011 the point disappears because the code tells it 'to disappear' .. or better lets say ; 'to not appear' . Yes, I was trying to point out the concept that the network is cooked on every frame. If the coder understand, then he would understand his mistake 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.