@@ -20,13 +20,13 @@ def load_constraints(target, data):
|
||||
utils.dump_anything.load(
|
||||
target_constraint, data[constraint])
|
||||
|
||||
def get_collection_deps(collection):
|
||||
def get_collection_deps(local_id, collection):
|
||||
deps = []
|
||||
for item in collection:
|
||||
attributes = dir(item)
|
||||
for attr in attributes:
|
||||
attr_ref = getattr(item, attr)
|
||||
if attr_ref and isinstance(attr_ref, bpy.types.Object):
|
||||
if attr_ref and isinstance(attr_ref, bpy.types.Object) and attr_ref.uuid != local_id:
|
||||
deps.append(attr_ref)
|
||||
return deps
|
||||
|
||||
@@ -211,14 +211,14 @@ class BlObject(BlDatablock):
|
||||
deps.append(self.pointer.library)
|
||||
|
||||
if hasattr(self.pointer, 'modifiers'):
|
||||
deps.extend(get_collection_deps(self.pointer.modifiers))
|
||||
deps.extend(get_collection_deps(self.uuid, self.pointer.modifiers))
|
||||
|
||||
if hasattr(self.pointer,'constraints'):
|
||||
deps.extend(get_collection_deps(self.pointer.constraints))
|
||||
deps.extend(get_collection_deps(self.uuid, self.pointer.constraints))
|
||||
|
||||
if hasattr(self.pointer,'pose') and self.pointer.pose:
|
||||
for b in self.pointer.pose.bones:
|
||||
deps.extend(get_collection_deps(b.constraints))
|
||||
deps.extend(get_collection_deps(self.uuid, b.constraints))
|
||||
|
||||
if self.pointer.instance_type == 'COLLECTION':
|
||||
# TODO: uuid based
|
||||
|
||||
Reference in New Issue
Block a user