diff --git a/multi_user/bl_types/bl_object.py b/multi_user/bl_types/bl_object.py index 0f34406..ca98c74 100644 --- a/multi_user/bl_types/bl_object.py +++ b/multi_user/bl_types/bl_object.py @@ -43,7 +43,6 @@ class BlObject(BlDatablock): return instance def load(self, data, target): - target.uuid = data['uuid'] target.matrix_world = mathutils.Matrix(data["matrix_world"]) # Load modifiers @@ -75,7 +74,6 @@ class BlObject(BlDatablock): "rotation_mode", "parent", "data", - "uuid", "children", "library" ] diff --git a/multi_user/delayable.py b/multi_user/delayable.py index 66c2ffd..b1f5de4 100644 --- a/multi_user/delayable.py +++ b/multi_user/delayable.py @@ -105,8 +105,7 @@ class DynamicRightSelectTimer(Timer): # change new selection to our for obj in obj_ours: - node = operators.client.get( - reference=bpy.data.objects[obj]) + node = operators.client.get(uuid=obj) if node and node.owner == RP_COMMON: operators.client.change_owner( node.uuid, settings.username) @@ -120,17 +119,15 @@ class DynamicRightSelectTimer(Timer): # change old selection right to common for obj in obj_common: - _object = bpy.data.objects.get(obj) - - node = operators.client.get(reference=_object) + node = operators.client.get(uuid=obj) if node and (node.owner == settings.username or node.owner == RP_COMMON): operators.client.change_owner( node.uuid, RP_COMMON) else: for obj in bpy.data.objects: - if obj.hide_select and obj.name not in user_ref.data['selected_objects']: + if obj.hide_select and obj.uuid not in user_ref.data['selected_objects']: obj.hide_select = False - elif not obj.hide_select and obj.name in user_ref.data['selected_objects']: + elif not obj.hide_select and obj.uuid in user_ref.data['selected_objects']: obj.hide_select = True class Draw(Delayable): diff --git a/multi_user/libs/replication b/multi_user/libs/replication index fb92463..7e4eb2f 160000 --- a/multi_user/libs/replication +++ b/multi_user/libs/replication @@ -1 +1 @@ -Subproject commit fb92463c13032222e847e83b8417de99d7fd37e0 +Subproject commit 7e4eb2fb70964448d6f54de09f2b10a46d60529f diff --git a/multi_user/presence.py b/multi_user/presence.py index ef5145b..ab1d585 100644 --- a/multi_user/presence.py +++ b/multi_user/presence.py @@ -202,10 +202,8 @@ class DrawFactory(object): (4, 5), (5, 6), (6, 7), (4, 7), (0, 4), (1, 5), (2, 6), (3, 7) ) - - if select_ob in bpy.data.objects.keys(): - ob = bpy.data.objects[select_ob] - else: + ob = utils.find_from_attr("uuid",select_ob,bpy.data.objects) + if not ob: return bbox_corners = [ob.matrix_world @ mathutils.Vector( diff --git a/multi_user/utils.py b/multi_user/utils.py index caecf19..8e5f051 100644 --- a/multi_user/utils.py +++ b/multi_user/utils.py @@ -93,7 +93,7 @@ def get_armature_edition_context(armature): def get_selected_objects(scene): - return [obj.name for obj in scene.objects if obj.select_get()] + return [obj.uuid for obj in scene.objects if obj.select_get()] def load_dict(src_dict, target):