All group members


in my case, I need only objects, not grouphead, but if it’s needed then just exclude

and (not isgrouphead s)


Denis, for my situation, I need all members from inside last closed top group, that’s why

print (getClRootGroupHead g2)
is giving $Dummy:g5 and it’s selecting members of g5 as well.


the situation might change some day :wink: it’s always good to have a universal solution.

fn isGroupHeadMember head node act:off = 
	while isvalidnode node and isgroupmember node and not (act = (node.parent == head)) do node = node.parent
fn getAllGroupMembers head = if isgrouphead head do
	for node in (join #() head) where isGroupHeadMember head node collect node
select (getAllGroupMembers $g2)


So short, and so NICE!
Thank you, Denis! This is really useful!