How to achieve OR inside "disable when" condition?

   5657   4   0
User Avatar
Member
131 posts
Joined: Oct. 2011
Offline
Hi,

I am making a simple DA myself and want to expose the Primitive Type. I want it to act the same way as the actual Primitive Type parameter that I dragged inside the Parameters section of the Edit Operator Type Properties dialog.

I currently use:

{ type == poly } { type == points }

and it works but I am wondering how I can do it using “!=”?

{ type != nurbs } { type != bezier }

doesn't work.

So I tried adding || between the curly braces but it didn't accept those characters.

Any ideas on how to do this? To me it's more readable to list the valid cases, unless maybe if the valid cases are very few compared to the invalid cases.



Also another thing that I was actually expecting was, since this parameter is actually an existing Houdini OP parameter, I thought all of its values would be copied over when I dragged it into the Parameters tab. I can see that the parameter name, the menu items, and the default value is copied. But why not the other values like “Disable When” conditions?

Redoing them is IMO a little redundant when Houdini knows everything it needs about the parameter.

Is it a bug or a missing feature?

If it's a missing feature, would you guys please consider this as an xmas feature for H12.




Thanks everyone.
User Avatar
Member
8554 posts
Joined: July 2007
Offline
you should try
{ type != nurbs type != bezier }

to do AND operation

since there always be True for type != nurbs OR != bezier, because when it's nurbs it's certainly !=bezier and vice versa
but type != nurbs AND != bezier will be just for other types
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
131 posts
Joined: Oct. 2011
Offline
Thanks that worked. I didn't know an AND would work for this case.

Btw is there a syntax for OR operations so I know that too?
User Avatar
Member
8554 posts
Joined: July 2007
Offline
you have in your first example

{ type == poly } { type == points }
means (type == poly) OR (type == points)

but as I told you for != case you should use AND operation
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
131 posts
Joined: Oct. 2011
Offline
Thanks tamte, that makes sense.
  • Quick Links