Attribute scope

   1732   2   2
User Avatar
Member
14 posts
Joined: Nov. 2013
Offline
Hi,

I thought I would have found my answer in the various documentation about attributes, but I'm still confused why local variable names for attributes sometimes work and sometimes don't, even though the SOP node shows it does have the attribute.

I've attached a very simple file; could someone please explain to me why the copy node can't read the $COPYNUMBER attribute.

Similarly, if I use the detail( “.”, “copyNumber”, 0 ) function I get an infinite recursion error. Why?

Attachments:
Attributes.hip (69.4 KB)

User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
About your second problem (using detail attribute) ,you should use one of the below expressions :

detail( opinputpath(“.”,0), “copyNumber”, 0 )

or

detail( “../attribcreate_copyNumber”, “copyNumber”, 0 )

becuase when you use “.” instead of opinputpath(“.”,0) ,It's look like to write this expression :

detail( “../copy2”, “copyNumber”, 0 )

So this node depended to Copy and you take infinite Error :shock:

But when you use opinputpath(“.”,0) expression , Houdini take this attr from input of the Copy node (Not within Copy) and this attr is independed !


About your first problem ,I think some of the Houdini's nodes doesn't support points , primitives , detail attributes and you can just use environment attributes or some special local attributes (defined at the Help page) .

Exactly like “PolyWire SOP” and “Wireframe SOP” !

You can use local variables like $CR in the “PolyWire SOP” for example in the “Wire Radiuse” channel , But you can't use $CR in the Wireframe SOP !!!
8)
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
14 posts
Joined: Nov. 2013
Offline
Hmm.. it'd be interesting to know why some SOPs can't read Detail attributes via their local variables, but detail( opinputpath(“.”,0), “attribName”, 0 ) is as good as, so thanks very much for that!
  • Quick Links