refactor: remove dependencies
This commit is contained in:
@ -20,15 +20,6 @@ def load_constraints(target, data):
|
|||||||
utils.dump_anything.load(
|
utils.dump_anything.load(
|
||||||
target_constraint, data[constraint])
|
target_constraint, data[constraint])
|
||||||
|
|
||||||
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) and attr_ref.uuid != local_id:
|
|
||||||
deps.append(attr_ref)
|
|
||||||
return deps
|
|
||||||
|
|
||||||
class BlObject(BlDatablock):
|
class BlObject(BlDatablock):
|
||||||
def construct(self, data):
|
def construct(self, data):
|
||||||
@ -270,15 +261,6 @@ class BlObject(BlDatablock):
|
|||||||
if self.is_library:
|
if self.is_library:
|
||||||
deps.append(self.pointer.library)
|
deps.append(self.pointer.library)
|
||||||
|
|
||||||
if hasattr(self.pointer, 'modifiers'):
|
|
||||||
deps.extend(get_collection_deps(self.uuid, self.pointer.modifiers))
|
|
||||||
|
|
||||||
if hasattr(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(self.uuid, b.constraints))
|
|
||||||
|
|
||||||
if self.pointer.instance_type == 'COLLECTION':
|
if self.pointer.instance_type == 'COLLECTION':
|
||||||
# TODO: uuid based
|
# TODO: uuid based
|
||||||
|
@ -61,8 +61,10 @@ class BlScene(BlDatablock):
|
|||||||
def resolve(self):
|
def resolve(self):
|
||||||
scene_name = self.data['name']
|
scene_name = self.data['name']
|
||||||
|
|
||||||
|
self.pointer = utils.find_from_attr('uuid', self.uuid, bpy.data.scenes)
|
||||||
|
if not self.pointer:
|
||||||
self.pointer = bpy.data.scenes.get(scene_name)
|
self.pointer = bpy.data.scenes.get(scene_name)
|
||||||
# self.pointer = utils.find_from_attr('uuid', self.uuid, bpy.data.objects)
|
|
||||||
|
|
||||||
def resolve_dependencies(self):
|
def resolve_dependencies(self):
|
||||||
deps = []
|
deps = []
|
||||||
|
Submodule multi_user/libs/replication updated: f979c6d081...b8af140842
Reference in New Issue
Block a user