import egg in Blender, load included eggs

I try to load egg an egg file in Blender, and in that egg file, other egg files are loaded, as in:

{
“filename.egg”
}

Within Blender the group to which all these external eggs belong is recognized, and all external egg objects are listed (probably empty groups), but it gets the label ‘untitled’’ and is not shown. Is there a way to read these external eggs in Blender as well and include them in the model?

Are you using my Blender Egg Importer? Since it is not a part of Panda3D, it would probably be better to ask questions about it on the GitHub issue tracker there.

I believe it is currently importing these as Empties with a “file” game property, so that it will be exported correctly again by YABEE. If you wish to still see the external model, you could separately import filename.egg into a different Blender file, in which you create a group encompassing the objects. Then you could “link” the Blender file and use the DupliGroup functionality to instance that group under the Empty object that has been created by the Egg importer. This allows you to keep the files separated, but keep a visual representation of the instanced model.

If, however, you think it would be useful if the .egg importer resolved the external reference and loaded it as if it were a part of the scene, I could add this as a feature.

Yes, its your egg importer. I have hundreds of these external file references in the egg file, so it would be great if they would be imported as well. Thank you.

It would be great if you could send me the files for testing.

Here’s a test eggfile. Textures and external objects are in folders below the egg.
votAUtest.zip (3.49 MB)

Thanks a lot! flt2egg-style external references are now loaded (as “file” game property, which YABEE can turn back into an external reference upon re-export).

I’ve now also added a checkbox to the load panel:

If checked, it will import each externally referenced file as a separate scene into Blender. It will create a group for each and use DupliGroups on all the placeholder empties to instantiate them, so that you will be able to see the real object in the scene.

This means they will be separately editable and exportable in Blender by switching scenes, so that editing the streetlight model will still affect all instances of it. If you export the main scene using YABEE, it will still export them as external references by virtue of the “file” game property.

If you don’t want them as external references, you can always select the entire scene and use Shift+Ctrl+A to “Make Duplicates Real”, meaning the instances will be converted to duplicated objects. You will still need to manually delete the Empties since they still have the game properties assigned.

Let me know if this works for you.

Please note that your .egg file defines maximum draw distances for each object via switch conditions. This is not currently supported (and would be rather tricky to support via Blender’s LOD system). If you would like to see this supported, however, please file an issue on GitHub.

Great!, thank you.

This works great, rdb. This is a very useful plugin. However, some egg models that look good with pview are disarranged when loaded with the egg plugin in Blender. Some parts are not positioned properly. Do you know of an easy way how I can fix that? I have added an example of a house that looks good in pview (and also when its rendered in panda) but not in Blender.
House09.zip (437 KB)

Never mind, its probably something in the egg file. As a test I imported the original 3ds model in Blender, exported it as an egg file in Yabee, and then imported it again in Blender with your egg importer, and then the model looked good again. So, I think this is solved now. Thank you.

It was a genuine bug in the .egg importer, though; it did not handle transformed geometry under tags properly. I’ve just pushed a fix. Thanks for bringing it to light.

Okay, thank you, I’ll download the fix.