Spaz8 Posted January 28, 2015 Share Posted January 28, 2015 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. Quote Link to comment Share on other sites More sharing options...
magneto Posted January 28, 2015 Share Posted January 28, 2015 Extrude SOP doesn't have any variables listed so I would assume you can't do it, unless you use the Foreach SOP, then you can do it no problem. Quote Link to comment Share on other sites More sharing options...
Spaz8 Posted January 28, 2015 Author Share Posted January 28, 2015 (edited) 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 January 28, 2015 by Spaz8 Quote Link to comment Share on other sites More sharing options...
magneto Posted January 28, 2015 Share Posted January 28, 2015 For that you should use the Primitive SOP, or alternatively AttribVOP, AttribWrangle SOP to transform each primitive separately. Quote Link to comment Share on other sites More sharing options...
Spaz8 Posted January 28, 2015 Author Share Posted January 28, 2015 (edited) Great thanks for the tip. Worked like a charm. Edited January 28, 2015 by Spaz8 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.