Deleted groups always listed

Hi @piac,

it looks like in V6, deleted groups are listed even when ignoreDeletedGroups = True.

I see this in the python script editor using:


and in GH when i use:


Funny thing is if i iterate over the group names, get the index and query if they are deleted, they are not and their index is not -1.

Is this a bug or am i doing things wrong ?


I am looking into this!

Hi @clement

so, it appears to be that the dialog does not show any group without members, because they cannot be selected. However, simply deleting members of a group will not delete the group.

To do what the dialog does, you can try this:

import scriptcontext as sc

def RhinoSelGroupsList():
    dialoglist = []
    for g in sc.doc.Groups:
        if g.Index < 0: continue
        members = sc.doc.Groups.GroupMembers(g.Index)
        if not members: continue
    return dialoglist

print RhinoSelGroupsList()

In the meantime, I’ll ask if this is expected behavior.
I think this should be improved. I logged RH-44558.


Giulio Piacentino
for Robert McNeel & Associates

Hi @piac,

i’ve noticed that too. Currently checking if there are group members seems to be the only way to get the non deleted groups. Is it expected that:


lists group names of deleted groups ? I thought the True stands for ignoreDeletedGroups ? What really concerns me is that, if i use:

index = Rhino.RhinoDoc.ActiveDoc.Groups.Find(group_name, True)

in GH (RH6), it gives me an index value which is not -1, on deleted group names. So your above example to check for g.Index < 0 would not apply in the future ? (I used that very often).

@clement, while @dale adds more comments indicating how groups deletion works, do you have a sample that works differently in V5 and in V6?

That way maybe we can help at least there!

Thank you @piac, I’ve replied there.

Probably i’ve asumed similar like you that if a group is ungrouped or if objects in a group are deleted, the group is deleted as well.