getWarning

   1996   5   1
User Avatar
Member
25 posts
Joined: Nov. 2013
Offline
Hi,

I would like to control a switch according to a warning.
In my example I would like “/obj/geo1/switch1/input” to be on 1 when “/obj/geo1/alembic1” issues a warning.

Attachments:
getWarning.hip (65.4 KB)

User Avatar
Member
17 posts
Joined: July 2015
Offline
Hi,

Did you try to write an expression in the switch ?

For example : @numpt==0
If the alembic doesn't load a geo, it has no point so @numpt=0, the switch condition is true and the switch node will output 1.
If the alembic loads a geo, it has at least one point so @numpt!=0, the switch condition is false and the switch node will output 0.

Does it work for what you need ? Have a good day !
Evan
User Avatar
Member
25 posts
Joined: Nov. 2013
Offline
Thank you but I already tried with a wrangle without result.
User Avatar
Member
732 posts
Joined: Dec. 2006
Offline
The switch SOP help has an example that directly addresses this issue. http://www.sidefx.com/docs/houdini/nodes/sop/switch.html [www.sidefx.com]

if (strmatch("*Error:*", run("opinfo " + opfullpath("../" + opinput(".", 1)))), 0, 1)
if (strmatch("*Warning:*", run("opinfo " + opfullpath("../" + opinput(".", 1)))), 0, 1)
Edited by mrCatfish - April 5, 2019 14:42:52
Sean Lewkiw
CG Supervisor
Machine FX - Cinesite MTL
User Avatar
Member
25 posts
Joined: Nov. 2013
Offline
Yes,

Thank you mrCatfish.
I have a little worry of refreshment.
If alembic reloads the right file the switch does not refresh itself.
An idea ?
User Avatar
Member
25 posts
Joined: Nov. 2013
Offline
There is a way to refresh nodes ?
  • Quick Links