Jump to content

Preserve Group/attribute help


jason_slab

Recommended Posts

hey

i've got an attribute coming in from a SOP solver that i want to use as a trigger to put my RBD's into a Group, i also need this group to be preserved.

i've been looking at this for a while and can't seem to come up with any solutions :angry:

any ideas?

thx

jason

Link to comment
Share on other sites

Assuming you have a point per rbd object, and that you can figure out some sort of relationship between the objects and the points using $OBJ or $OBJID, you can just use a point expression in the Group Expression field... something like: point("../sopnet",$OBJID,"triggerattribute",0).

Now just ensure that in your sopsolver the trigger attribute remains on once set, so that the group persists.

-z

Edited by anakin78z
Link to comment
Share on other sites

hey thx

i got my groups working, using this expression:

point("/obj/DopNet:$OBJID/Geometry",$OBJID,"freeze",0)

i'm still however having trouble getting my group to be preserved when my attribute goes back to 0

attached is a simple setup using a color as a attribute

jason

rbd_rnd_group_by_color.hip

Link to comment
Share on other sites

hey thx

i'm still however having trouble getting my group to be preserved when my attribute goes back to 0

attached is a simple setup using a color as a attribute

jason

The trick is to only update the points if they're not already at 1 :). Put a group sop before the attribtransfer and group all points which at at 0 (or below whatever threshold you like), then use that group in the attribtransfer sop. This way, any points that are already above that threshold won't pick up new color, and won't go back to 0. Make sure you delete the group again before the OUT sop, as it'll otherwise complain that the group already exists.

Also, make sure you don't delete the color attribute.

-z

Link to comment
Share on other sites

Hey Jason,

Check out the DelayedSmokeHandoff example & look at the Data set up. One DOP to check out is the Modify Data DOP where you can use Boolean Type to set the value to 1 and you create your group based on that so you get a "Preserve Group" setup.

Hope the above helps!

Cheers!

steven

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...