Python SOP group functions

I think it would be super useful to have some python (and tscript i suppose…) methods/members of the SOP class that give you access to any groups a SOP may have. Perhaps these options would be good:

  • return a list of names of point or primitive groups (mySop.grouplist(prims) ?)

  • return a list of primitives/points by submitting the group name and group type (mySop.primgroup(‘myPrimGroup1’) ? ) Or at least the list of IDs for the members of the group…

  • i think it’s already the case, but primitives and points already come with their IDs yeah? So if you got a list of them, you could know what their ID within the entire SOP was, if you needed to isolate them.

Does that make sense? Is there anything else that would make it even more better?

-P

bump

Any change made since this post ?
I had to delete non selected points instead of checking if a group is exist or populated,
in order to detect collusion.
(just an example)
collosion_no_python.toe (6.34 KB)

I second that … access the groups of a SOP via python would be handy … ?

is this possible?

chrs

Hi all,

I found that the curveSect CHOP gives precise intersecting points data between Geometry Groups.
If that helps, P

bump++

I usually assume that a function exists and I just didn’t know. This is one that should definitely be there.

in a fractured geometry from Houdini, you can group each shard.
All shards have “inside” and “outside” groups separating the faces EXCEPT interior shards only have “inside”

I can’t find an easy way to figure out what groups exist within a sop. Selecting the “outside” group on a sop that doesn’t have one outputs the entire sop and errors out.

Hello.
This function is currently in development and we will keep you posted.
Cheers,
Rob

1 Like