Problem with switch node...

   8746   3   1
User Avatar
Member
215 posts
Joined: 7月 2007
Offline
I've found a script in Craig Zerouni - Houdini on the spot

On page 38 - Switching Around errors

Change input if other object has same error

Expression in the switch SOP

if (strmatch(“*Error:*”,run(“opinfo ” + opfullpath(“../” + opinput (“.”, 1)))),0, 1)

Expression is working,and it switches node on error, but on output of switch node nothing happens.
I can clearly see that select input value of the switch node changes from 1-0 but i cannot see that in the viewport.It always displays the first input.
It only works the first time when you edit the script..
even if you put eval to force the script to execute
its still the same thing

Attachments:
Error_switch.hip (39.5 KB)

WEB
http://www.igorfx.com/ [igorfx.com]

Vimeo
https://vimeo.com/igorzanic [vimeo.com]
User Avatar
Member
319 posts
Joined:
Offline
Try this:-

if (strmatch(“*Error:*”,run(“opinfo ” + opfullpath(“../” + opinput (“.”, 1))))+$F-$F,0, 1)

I've had the same problem. I think I also attempted to use eval to try and force the recook/update. I think adding ‘+$F-$F’ to the expression did the trick in the end to force Houdini to ‘refresh itself’.

Cheers,

Dean.
User Avatar
Member
215 posts
Joined: 7月 2007
Offline
thanks , script works fine now…
WEB
http://www.igorfx.com/ [igorfx.com]

Vimeo
https://vimeo.com/igorzanic [vimeo.com]
User Avatar
Member
16 posts
Joined: 11月 2013
Offline
Expression doesnt work for me:shock:
I make texture combiner for multiUV.
I just try put switch with expression, that gives 404 image, when normal texture not present.
Do not working, says that provides infinite recursion and crash Houdini.

Attachments:
UV_EDIT.zip (762.1 KB)

  • Quick Links