Jump to content

Can you attribute promote a list of values?


Spaz8

Recommended Posts

So I was using a measure sop to get the area of a bunch of polys. Which creates the prim attribute "area".

 

What I wanted to do was use the area value of each prim to drive its depth scale in the "extrude" sop. Seems simple enough except the extrude sop does not recognize $PR as a local variable :(  ie.  prim("../measure3", $PR, "area", 0).

 

I though ok, I'll promote the area prim attribute to a detail or point attribute, but I could not find a promotion method that did not just give me one value.

 

* Is there a way to actually use the "extrude" sop to do this? my question is purely academic but I would like to know the "proper" way, it seems like I got lucky that the polyextrude was an option.

 

 

I eventually solved the issue by using the polyextrude sop which does recognize $PR.

Link to comment
Share on other sites

Cool, thanks. The foreach crossed my mind but seemed Like I must me missing something.

 

I am guessing if I wanted to "translate" each prim a separate amount (by the area attribute of each prim) I would need to do the same? 

 

I was not able to just copy paste relative ref in the "T.z" field of the Xtransform sop, and the prim expression gets me no where either. I can only get global translation when using prim("../measure3", $PR, "area", 0) .. if i swap out the $PR for a number then everything moves by that one prim's area value. 

Edited by Spaz8
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...