hscript prim function

   5228   2   1
User Avatar
Member
224 posts
Joined: June 2009
Offline
I wrote an HScript function like this:

prim(“../some_node”, 0, “P”, 2")

As I wrote it I realized that it was wrong, because my prims have no P attributes. However. it worked!

I think there is a hidden P attribute that is the center point of the prim. Is that right?

Are there any other hidden attributes?
Patrick
User Avatar
Member
479 posts
Joined: Dec. 2009
Offline
Hi, Patrick,

I just tried this and found that actually it works even if you replace the “P” with whatever string and there's no error message.

I'm not sure if “P” is a hidden prim attrib. I guess the “prim” hscript command will treat whatever prim attrib that is not embedded in the current node as unrecognizable and return a zero value.

anyway, it'll be more appropriate to let the houdini expert to answer this question.

Ji
User Avatar
Member
224 posts
Joined: June 2009
Offline
Sorry - I just read the help for the prim function
http://www.sidefx.com/docs/houdini11.0/expressions/prim [sidefx.com]

It says:
When given the “P” or “Pw” attribute, returns the centroid of the primitive.

So there is my answer. However, it also seems to work with “N”. See attached file (V11).

Attachments:
test_prim.hipnc (40.6 KB)

Patrick
  • Quick Links