|
|
@@ -1242,6 +1242,25 @@ class Actor(DirectObject, NodePath):
|
|
|
return None
|
|
|
return joint.getDefaultValue()
|
|
|
|
|
|
+ def getJointTransformState(self, partName, jointName, lodName='lodRoot'):
|
|
|
+ partBundleDict=self.__partBundleDict.get(lodName)
|
|
|
+ if not partBundleDict:
|
|
|
+ Actor.notify.warning("no lod named: %s" % (lodName))
|
|
|
+ return None
|
|
|
+
|
|
|
+ subpartDef = self.__subpartDict.get(partName, Actor.SubpartDef(partName))
|
|
|
+ partDef = partBundleDict.get(subpartDef.truePartName)
|
|
|
+ if partDef:
|
|
|
+ bundle = partDef.getBundle()
|
|
|
+ else:
|
|
|
+ Actor.notify.warning("no part named %s!" % (partName))
|
|
|
+ return None
|
|
|
+
|
|
|
+ joint = bundle.findChild(jointName)
|
|
|
+ if joint == None:
|
|
|
+ Actor.notify.warning("no joint named %s!" % (jointName))
|
|
|
+ return None
|
|
|
+ return joint.getTransformState()
|
|
|
|
|
|
def controlJoint(self, node, partName, jointName, lodName="lodRoot"):
|
|
|
"""The converse of exposeJoint: this associates the joint with
|