loadEggData destructive

i am currently using this:

    egg = EggData()
    self.model = NodePath(loadEggData(egg))

because i have found out that if i use object.eggData directly in loadEggData, it’s content is cleared afterwards.

is there a better way to keep object.eggData, and loading it into a nodepath?


That might be the best way. It does seem clumsy, doesn’t it? But the EggData structure doesn’t have a proper deep-copy constructor, so formatting-and-reparsing might the only way to go. I guess you’ve found a use-case that wasn’t really in the original design. :slight_smile:


i am using that to modify egg’s. atm i can change textures and collision settings. after changing the eggdata i update the model using the above call.

thanks for your help.