Hi all,
In the blast sop group parameter, I say if myAttrib is greater than five OR myOtherAttrib is equal to “test”:
@myAttrib>5, @myOtherAttrib=“test”
What is the syntax for performing an ‘and’ operation?
&& in group parameter?
9906 11 0- KMcNamara
- Member
- 228 posts
- Joined: Dec. 2012
- Offline
- tamte
- Member
- 8837 posts
- Joined: July 2007
- Offline
I don't think there is specifically AND operator , but as there is ^(except) and !(not)
you can do :
@myAttrib>5 ^!@myOtherAttrib=“test”
in other words group if myAttrib is greater than 5 except if myOtherAttrib not equals “test”
so that would mean if myAttrib is greater than 5 and myOtherAttrib equals “test”
and btw. for OR use just space, comas are not allowed
you can do :
@myAttrib>5 ^!@myOtherAttrib=“test”
in other words group if myAttrib is greater than 5 except if myOtherAttrib not equals “test”
so that would mean if myAttrib is greater than 5 and myOtherAttrib equals “test”
and btw. for OR use just space, comas are not allowed
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- KMcNamara
- Member
- 228 posts
- Joined: Dec. 2012
- Offline
- tamte
- Member
- 8837 posts
- Joined: July 2007
- Offline
- KMcNamara
- Member
- 228 posts
- Joined: Dec. 2012
- Offline
Well it doesn't seem to work with groups. If I have three groups that represent P.x>0, P.y>0, P.z>0:
xpos ^!ypos ^!zpos
is not equal to:
@P.x>0 ^!@P.y>0 ^!@P.z>0
Is Houdini evaluating things differently when I'm listing groups? If I just have two clauses, it works fine. The addition of the third is where it diverges.
Note, just corrected an error in the .hip
xpos ^!ypos ^!zpos
is not equal to:
@P.x>0 ^!@P.y>0 ^!@P.z>0
Is Houdini evaluating things differently when I'm listing groups? If I just have two clauses, it works fine. The addition of the third is where it diverges.
Note, just corrected an error in the .hip
- tamte
- Member
- 8837 posts
- Joined: July 2007
- Offline
- KMcNamara
- Member
- 228 posts
- Joined: Dec. 2012
- Offline
- animatrix_
- Member
- 4730 posts
- Joined: Feb. 2012
- Offline
Btw the Group SOP's Expression evaluation is extremely slow compared to Wrangle SOPs. So if you can do it using VEX, you would see a much better performance if you care about that.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
- jcat413
- Member
- 1 posts
- Joined: Feb. 2021
- Offline
- voidcoder
- Member
- 25 posts
- Joined: May 2023
- Offline
- tamte
- Member
- 8837 posts
- Joined: July 2007
- Offline
voidcoderYou should still be able to do
Resurrecting an old topic: Is this still an issue? Still no way to logically combine conditions for the groups like "@attr1=val1 && @attr2=val2"?
@attr1=1 ^@attr2!=2
Edited by tamte - Oct. 10, 2024 01:59:22
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- HirotaY2
- Member
- 3 posts
- Joined: Dec. 2017
- Offline
-
- Quick Links