Python parameter expression not re-cook node

   2292   3   1
User Avatar
Member
10 posts
Joined: 9月 2016
Offline
Hello!

I am trying to implement python expressin in Object Merge node in parm “objectpath1” to get geometry from connected nodes to parent geo. So as final result if you connect/disconnect first input of test node geometry should switch to another one. Actually script working fine and storke of parm updating if i connect or disconect ANIM node, but object merge node do not updating geometry while i turn on/off “Enable Merge” toggle on object merge node. It's seems node just not cooking properly.

Any suggestions how to solve this problem? Or maybe hscrip variant?

P.S. check test setup in hip uploaded

Attachments:
switch.hipnc (321.4 KB)

User Avatar
Member
6 posts
Joined: 3月 2016
Offline
I haven't opened your hipfile so forgive me if this doesn't help - but for conditional switching perhaps you should consider the switch-if SOP, it is very useful - for instance, you could test if a certain SOP has a point count > 0 and switch between different object merge SOPs
User Avatar
Member
10 posts
Joined: 9月 2016
Offline
Thanks for answer!
I test switch-if SOP, but the same result. Actually switch working fine with expression “npoints(opinputpath(”.“,1))>0”.
Problem is in object merge node - it's not re-cooking after updating path. I think there is some specific point in python parm expression executing.
User Avatar
Member
6 posts
Joined: 3月 2016
Offline
I tried your scene this time, it actually works fine for me - toggling ‘enable merge 1’ while displaying OUT - the geo updates

this is in 18.0.566 if it helps

Also you say its a python expression, but you are using hscript!
  • Quick Links