Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have been experimenting with Panda3D lately. I have a character made in Blender with various bones and currently with one animation that I wish to export to a *.x format for Panda3D. My current attempt was to export the model was to first export with bones [Armatures] by checking the "Export Armatures" button in the export menu (file name: char.x). Thanks to the *.x file format, I read the file and it seems to have the same bone structure format as the model (with parenting and matrix positional data). The second export was selecting Animations -> Full Animation to provide just the animation (file name: char_idle.x). The models exported just fine. I am not sure about the animation yet, but the file seems to be just fine.

This is my code for loading the model into python & Panda3D: self.model = Actor("char.x",{"char_idle.x"})

When I run the program the command line provides a couple of errors, the main errors of interest are:

:Actor(warning): char.x is not a character!

and

...
  File "C:\Panda3D-1.8.0\direct\actor\Actor.py", line 284, in __init__
    if (type(anims[anims.keys()[0]])==type({})):
  AttributeError: 'set' object has no attribute 'keys'

The first error is the most interesting to me. The model works if I leave the animation dictionary blank. With no animations loaded the character appears in its un-animated T position, however the actor warning still shows up. The character should include the various bones when I exported the model right? I am not that experienced with blender, I'm just a programmer. So if the problem lies in blender please try to keep that in mind when posting a reply. I'll try my best to keep up.

I also tried to print out the bone structure without any animations loaded and it provides a similar error with the line print self.model.listJoints():

 File "C:\Panda3D-1.8.0\direct\actor\Actor.py", line 410, in listJoints
    Actor.notify.error("no part named: %s" % (partName))
  File "C:\Panda3D-1.8.0\direct\directnotify\Notifier.py", line 132, in error
    raise exception(errorString)
StandardError: no part named: modelRoot

I really hope it is a simple exporting fix.

share|improve this question
    
Importers/exports for model formats are notoriously picky. Try making a simple model (box) with a single animated bone. Ensure you're selection the export option to output the Armature and animations. Check the verbose box and look at the output to try and get a better idea of where the error is coming from. –  Byte56 Sep 22 '12 at 20:39
    
@Byte56 Thanks for your response. I made a simple box containing only one armature and the same issues persist. However you mentioned the "verbose" output. Did you mean the output for panda or blender? –  jakebird451 Sep 22 '12 at 23:06
    
Blender. It simply has additional outputs in the command line. But it sounds more like the issue is with import instead of export. –  Byte56 Sep 22 '12 at 23:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.