소스 검색

Fix: do not re-duplicate data for hook deform

Joseph Brandenburg 6 달 전
부모
커밋
3ed9c4da3b
1개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제
  1. 7 2
      xForm_containers.py

+ 7 - 2
xForm_containers.py

@@ -684,8 +684,13 @@ class xFormGeometryObject(xFormNode):
                     dupe_data=True; break
         if dupe_data:
             name = self.bObject.data.name
-            self.bObject.data=self.bObject.data.copy()
-            self.bObject.data.name = name+"_MANTIS"
+            # it has to be a curve
+            data = bpy.data.curves.get(self.bObject.data.name+"_MANTIS")
+            if not data:
+                data=self.bObject.data.copy()
+                data.name = name+"_MANTIS"
+                data.animation_data_clear() # clear the drivers if there are
+            self.bObject.data = data
         reset_object_data(self.bObject)
         matrix= get_matrix(self)
         self.parameters['Matrix'] = matrix