Loading an Actor Merges Its Groups?

I’m encountering a bit of an odd issue:

It seems that, given an Actor that contains multiple “Groups”, on loading these are merged into a single Geom.

Now, for a static model (i.e. a non-Actor), it seems that a Group can be retained by giving it a tag that has a value.

But this doesn’t seem to work for Actors… :/

(And I have confirmed that the Group in question is present in the text of the egg-file, and that it has the tag and value that was set on it.)

So, is there any way to have a Group within an Actor remain separate after loading…?

~

Here below is a quick test-program demonstrating the issue, along with the two models that it uses:

from direct.showbase.ShowBase import ShowBase
from direct.actor.Actor import Actor

class Game(ShowBase):
    def __init__(self):
        ShowBase.__init__(self)

        self.mew = loader.loadModel("subPartTest_static")
        self.mew.reparentTo(render)
        self.mew.setY(20)
        self.mew.setX(-3)
        self.mew.setH(90)

        self.mew.ls()

        self.mew2 = Actor("subPartTest_animated", {"mew" : "subPartTest_animated-ArmatureAction"})
        self.mew2.loop("mew")
        self.mew2.reparentTo(render)
        self.mew2.setX(3)
        self.mew2.setY(20)
        self.mew2.setH(90)

        self.mew2.ls()


app = Game()
app.run()

Egg-files:
subPartTest.zip (2.9 KB)

This program first loads a static model, and calls “ls()” on it. This–on my machine, at least–results in two GeomNodes being printed, one of which has a tag. It then loads an animated model, and likewise calls “ls()” on that. This–again, on my machine–results in only one GeomNode being printed, and that with no tags.

Reading of the egg-files involved should reveal that both have two geometry-Groups (and the animated model a third armature-Group), one of which has a tag.

~

(For my particular purpose here I can just load the desired separate object as a separate model and parent it to the relevant joint in the Actor. But that’s a bit of a workaround, and I’d rather just have the object be part of the Actor-file.)

This is a quirk of the egg loader, I believe. Change <Dart> { 1 } in the .egg file to <Dart> { structured } (can also be done using egg-optchar).

Ah, wonderful! That works just as you describe! Thank you! :slight_smile: