rdb / blender-egg-importer

Add-on for Blender to import Panda3D .egg models.
37 stars 10 forks source link

Error when loading a model with bones #3

Closed Gamesaw-Drew closed 7 years ago

Gamesaw-Drew commented 7 years ago

Everytime i load a model i get https://gyazo.com/237af123a2a13b0395d05dfc56851a3b

(Sorry for no actual text log as its annoying to copy from blender lul)

Gamesaw-Drew commented 7 years ago

Using Blender 2.78. Does it not work with this build?

rdb commented 7 years ago

It would help if you could share the model file you tried to import.

Gamesaw-Drew commented 7 years ago

Seems to happen with any model

rdb commented 7 years ago

I really am unable to reproduce it, and I also have Blender 2.78. The models with bones in the Panda models folder and samples folder seem to work for me. Could you please attach the model file that fails to import, or e-mail it to me?

Gamesaw-Drew commented 7 years ago

Alright. I will send you one of the models i tried. its a minecraft character i used as a meme, i actually originally exported it from blender minecraftmemer.zip

rdb commented 7 years ago

Thanks! I checked in a fix. For some reason your model contained nested <Dart> tags; the importer now ignores those.

Let me know if there's more trouble.

Gamesaw-Drew commented 7 years ago

thanks so much :) will try now

Gamesaw-Drew commented 7 years ago

While it fixed it for that model, i am still having trouble loading suitA-mod.zip

rdb commented 7 years ago

So it does. I'm on it.

rdb commented 7 years ago

The issue was that the character <Group> element directly contained geometry. I've fixed the egg importer to automatically insert a child object to place the geometry under in this case, which makes the object import correctly.

By the way, it appears to have been exported using an outdated version of bam2egg, since I noticed that there is a useless group at the root, which only older bam2egg versions did. If you are using bam2egg, I highly recommend you use one that ships with a recent development build of Panda, to make sure that no information is getting lost.

(On a sidenote, this object appears to have bones all over the place, but I think they work correctly nonetheless. I think it's mostly a cosmetic issue of how the bones are placed and shouldn't affect functionality; the armature can be fixed in edit mode if desired.)