Bug? getting the groupMembers of inActive objects

Hi all,

I think I stumbled upon a bug. Consider the attached blend. It has 2 objects in a group and two instances of that group. One instance is in an inactive layer.

The code simply shows the groupmembers:

import bge

scene = bge.logic.getCurrentScene()

TestInst = scene.objects["Test"]
TestInstHidden = scene.objectsInactive["Test.Hidden"]

#print the member list
print(TestInst.groupMembers)

#should print the same but prints None
print(TestInstHidden.groupMembers)

The second print I expected to print the groupMembers as well but it always prints None.

Bug? Or am I missing something?

(Tested with 2.67, linux 64bit)

Rg,

Arnaud

Attachments

bugtest2.blend (490 KB)

You can see it as a bug.

For what do you need the instantiator of the inactive group instance?

Hey Monster,

I have a group object which contains a BoundingBox object. I wanted to set its visibility. I know I can workaround it but I thought this was a bug, just wanted to make sure it’s a bug… I’ll send a bug report

Yes, a report is fine.

I was interested in a use case for this situation. I hope you know that changing invisibility at an inactive object does nothing. At least not at the invisible object.

Luckily, if you add this it does work :slight_smile:

ob = scene.addObject(TestInstHidden, TestInst)
print(ob.groupMembers)

because you get a new (active) copy of the instance :D.

I actually stumbled on the same bug, I don’t know how it is implemented but I can imagine the groupMembers to be set upon adding the group.
As for a use case; I want to add random objects from a specific group of objects. I could give all these objects a specific property and search for that or try parenting them to one object to break the parenting later on. In this case however I would find it more efficient if I just had all these objects of a specific type in one group. Both in workflow and performance.

Wraaah, this is a good one :yes: