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.
getWarning
1996 5 1- Poulpito
- Member
- 25 posts
- Joined: Nov. 2013
- Offline
- EvanP
- 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
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
- Poulpito
- Member
- 25 posts
- Joined: Nov. 2013
- Offline
- mrCatfish
- 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
CG Supervisor
Machine FX - Cinesite MTL
- Poulpito
- Member
- 25 posts
- Joined: Nov. 2013
- Offline
- Poulpito
- Member
- 25 posts
- Joined: Nov. 2013
- Offline
-
- Quick Links