Browse Source

implicit node for exposeJoint

David Rose 22 years ago
parent
commit
372c6bb69b
1 changed files with 5 additions and 0 deletions
  1. 5 0
      direct/src/actor/Actor.py

+ 5 - 0
direct/src/actor/Actor.py

@@ -680,11 +680,16 @@ class Actor(PandaObject, NodePath):
         # Get a handle to the joint.
         joint = bundle.findChild(jointName)
 
+        if node == None:
+            node = self.attachNewNode(jointName)
+
         if (joint):
             joint.addNetTransform(node.node())
         else:
             Actor.notify.warning("no joint named %s!" % (jointName))
 
+        return node
+
     def stopJoint(self, partName, jointName, lodName="lodRoot"):
         """stopJoint(self, string, string, key="lodRoot")
         Stops the joint from animating external nodes.  If the joint