I'm trying to figure out how joints work in Panda3D.
So far I have a MakeHuman model exported to FBX format which appears in its default pose, but the code below is outputting two error messages:
:Actor(warning): models/human1.fbx is not a character!
:Actor(warning): Cannot control joint hand_r
Calling the “listJoints” function mentioned in the Panda3D documentation also errors:
Exception: no part named: modelRoot
#!/usr/bin/env python
import sys
from direct.showbase.ShowBase import ShowBase
from direct.actor.Actor import Actor
from direct.task.Task import Task
from panda3d.core import load_prc_file_data
load_prc_file_data("", "model-cache-dir")
class PandaTest(ShowBase):
def __init__(self):
ShowBase.__init__(self)
self.accept('escape', sys.exit)
base.disableMouse()
camera.setPos(0,-45,10)
Human1 = Actor("models/human1.fbx",{})
Human1.setP(Human1,90)
Human1.reparentTo(render)
RightHand = Human1.controlJoint(None,'modelRoot','hand_r')
test = PandaTest()
test.run()
(Pasting the code above has @ instead of newlines… no idea if it's going to stay like that when posting, and there doesn't appear to be a source view for this editor. - think I solved it by editing the HTML source directly...)