Browse Source

use copyBundle()

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

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

@@ -1832,6 +1832,11 @@ class Actor(DirectObject, NodePath):
         assert Actor.notify.debug('actor bundle %s, %s'% (bundle,bundle.this))
         assert Actor.notify.debug('actor bundle %s, %s'% (bundle,bundle.this))
         controlDict = self.__controlJoints.get(bundle.this, None)
         controlDict = self.__controlJoints.get(bundle.this, None)
         if controlDict:
         if controlDict:
+            # Before we apply any control joints, we have to make a
+            # copy of the bundle hierarchy, so we don't modify other
+            # Actors that share the same bundle.
+            animBundle = animBundle.copyBundle()
+            
             for jointName, node in controlDict.items():
             for jointName, node in controlDict.items():
                 if node:
                 if node:
                     joint = animBundle.makeChildDynamic(jointName)
                     joint = animBundle.makeChildDynamic(jointName)