09th / YABEE

Export models from the Blender to Panda3D game engine
MIT License
107 stars 39 forks source link

Export doesn't work (master from a few hours ago) #5

Closed ghost closed 9 years ago

ghost commented 9 years ago

I just tried exporting this thing,

However, I'm getting this backtrace:

Objects for export: ['Armature'] WRITE main EGG to /home/e/Develop/sh/gfx/girlbaked.egg Traceback (most recent call last): File "/home/e/.config/blender/2.73/scripts/addons/YABEE-master/yabee_libs/egg_writer.py", line 1411, in write_out file.write(ac.get_full_egg_str()) File "/home/e/.config/blender/2.73/scripts/addons/YABEE-master/yabee_libs/egg_writer.py", line 1069, in get_full_egg_str for line in self.get_skeleton_anim_str(obj_name).splitlines(): File "/home/e/.config/blender/2.73/scripts/addons/YABEE-master/yabee_libs/egg_writer.py", line 1047, in get_skeleton_anim_str for line in self.bone_groups[obj_name].get_full_egg_str(data, self.framerate, -1).splitlines(): File "/home/e/.config/blender/2.73/scripts/addons/YABEE-master/yabee_libs/egg_writer.py", line 917, in get_full_egg_str egg_str += ch.get_full_egg_str(anim_info, framerate, level + 1) File "/home/e/.config/blender/2.73/scripts/addons/YABEE-master/yabee_libs/egg_writer.py", line 892, in get_full_egg_str bone_data = anim_info[''][self.object.yabee_name] KeyError: 'root'

09th commented 9 years ago

Fix pushed. Try to export model with this fix. Also - it's not good idea to use fiew animations in one file with model in my opinion.

09th commented 9 years ago

I just make silent adding +1 to the "To frame" if from==to. Also I added workaround for case when mesh not parented to armature as in your model.

ghost commented 9 years ago

I would rather propose the following:

  1. from==to should fail, but it should give me a proper error message, e.g. "Your animation named has zero frames which is invalid. Please keep in mind that To frame numbers are exclusive."
  2. Add a tooltip to the "To" field which says "Frame to which animation extends (exclusive)"
09th commented 9 years ago

Ok. I've added warning message, but kept adding frame as workaround.

Animation "%s" has the same "from" and "to" frames. Keep in mind that "To frame" value is exclusive. It means that in this case your animation contains zero of frames. YABEE will automatically add one frame to the "to frame" value of "%s" animation.

ghost commented 9 years ago

That sounds like a good solution, thanks!