H9.1.179
Having trouble using the hasprim expression with a switch SOP. In the Select Input field I have 'hasprim(“group_name”,“node_path”,0)' however nothing happens - keeps evaluating to zero (see attached image). Am I using this incorrectly?
As a side note, leading up to this I'm using surfsect SOP … is there anyway to figure out when the two inputs intersect? some sort of trigger?
Thanks in advance.
Rob
hasprim expression
3927 4 0- rdms
- Member
- 201 posts
- Joined: July 2005
- Offline
- edward
- Member
- 7732 posts
- Joined: July 2005
- Offline
- rdms
- Member
- 201 posts
- Joined: July 2005
- Offline
- graham
- Member
- 1908 posts
- Joined: Nov. 2006
- Offline
hasprim is an Hscript Expression function and your node language is set to use Python, which is why it says it's not defined when you remove the quotes. Right now, with the quotes, it's returning that string expression which is useless in the context of the parm and returning 0. Either changing the expression/node to Hscript, or wrapping it in a hou.hscriptExpression() should make it work.
Graham Thompson, Technical Artist @ Rockstar Games
- rdms
- Member
- 201 posts
- Joined: July 2005
- Offline
graham
hasprim is an Hscript Expression function and your node language is set to use Python, which is why it says it's not defined when you remove the quotes. Right now, with the quotes, it's returning that string expression which is useless in the context of the parm and returning 0. Either changing the expression/node to Hscript, or wrapping it in a hou.hscriptExpression() should make it work.
Thanks graham, that was the problem.
Cheers,
Rob
Digital Supervisor | Stargate Studios Toronto
Rob
Digital Supervisor | Stargate Studios Toronto
-
- Quick Links