From 2f648c1e5632b3c5e63520b307a558f9ef408d81 Mon Sep 17 00:00:00 2001 From: Zachary Pavlov Date: Tue, 16 Jan 2007 19:27:42 +0000 Subject: [PATCH] control joints now go on the part bundles --- direct/src/actor/Actor.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/direct/src/actor/Actor.py b/direct/src/actor/Actor.py index 9af0c33fca..66eeee41e4 100644 --- a/direct/src/actor/Actor.py +++ b/direct/src/actor/Actor.py @@ -1026,12 +1026,15 @@ class Actor(DirectObject, NodePath): if joint == None: Actor.notify.warning("no joint named %s!" % (jointName)) return None - + finalNode=node if node == None: - node = self.attachNewNode(jointName) + node = NodePath(ModelNode(jointName)) + node.node().setPreserveTransform(ModelNode.PTLocal) + node.reparentTo(partDef.partBundleNP) if joint.getType().isDerivedFrom(MovingPartMatrix.getClassType()): node.setMat(joint.getInitialValue()) - + elif (lodName!="lodRoot"): + node.instanceTo(partDef.partBundleNP) # Store a dictionary of jointName: node to list the controls # requested for joints. The controls will actually be applied # later, when we load up the animations in bindAnim().