Jump to content

attribute accumulation and foreach question


Recommended Posts

I created a surface using the particleFluidSurface SOP and am trying to delete groups of primitives(based on connectivity) with a total surface area less than some arbitrary value. With the attribPromote SOP you can sum the values of an attribute by pushing the value into a single detail attribute using a sum promotion method. I was trying to do this in a forEach SOP for each group but my attributes don't carry to the top level. Is there a way to promote these attributes to the top level? I tried detail() but nothing... maybe I wasn't doing it right?

Is there another way to accumulate attributes in SOPs? For example, something like:

for prim in prims
new_area += prim.area

but without any code...

Cheers,

Jason

Edited by mightcouldb1
Link to comment
Share on other sites

i guess it is not what You looking for, but in this case You could use a attribute promote SOP and a measureSOP, the measure sop create a primitive attribute with area, and the attribute promote promotes the primitive values to detail as a sum

Martin

Link to comment
Share on other sites

i guess it is not what You looking for, but in this case You could use a attribute promote SOP and a measureSOP, the measure sop create a primitive attribute with area, and the attribute promote promotes the primitive values to detail as a sum

Martin

Well I attempted this, and the problem I am running into is deleting groups based on that detail attribute after I run them through the forEach.

Edited by mightcouldb1
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...