Skip to content

Instantly share code, notes, and snippets.

@skyburchard
Last active June 17, 2019 05:13
Show Gist options
  • Save skyburchard/2606eb9a0f9844bbad3bc3179d91ca77 to your computer and use it in GitHub Desktop.
Save skyburchard/2606eb9a0f9844bbad3bc3179d91ca77 to your computer and use it in GitHub Desktop.
////////////////////////////////
// houdini attributes and groups
////////////////////////////////
///////////////////////
// attributes as groups
// credit here: http://www.tokeru.com/cgwiki/?title=Houdini
// the below can be entered as expressions in any goup field
// not spaces, no semi colon, must be conditional, must be cast using "s, i, f", etc
// floats don't need casting
@P.y<0
s@side=="inside"
///////////////////////
// groups as attributes
// credit here: http://www.tokeru.com/cgwiki/?title=Houdini
// a group can also be treated as an attribute, just add "@group_" to the group name
// works well in atribute wrangles
if (!i@group_mygroup) {
// do thing
}
// also works to create groups
if (@ptnum>chi('threshold')) {
i@group_mygroup=1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment