diff --git a/multi_user/delayable.py b/multi_user/delayable.py index 07578e8..de82495 100644 --- a/multi_user/delayable.py +++ b/multi_user/delayable.py @@ -101,7 +101,9 @@ class DynamicRightSelectTimer(Timer): if self._user: current_selection = utils.get_selected_objects( - bpy.context.scene) + bpy.context.scene, + bpy.data.window_managers['WinMan'].windows[0].view_layer + ) if current_selection != self._last_selection: if self._right_strategy == RP_COMMON: obj_common = [ diff --git a/multi_user/utils.py b/multi_user/utils.py index 7b8211a..08f1727 100644 --- a/multi_user/utils.py +++ b/multi_user/utils.py @@ -104,8 +104,8 @@ def get_armature_edition_context(armature): return override -def get_selected_objects(scene): - return [obj.uuid for obj in scene.objects if obj.select_get()] +def get_selected_objects(scene, active_view_layer): + return [obj.uuid for obj in scene.objects if obj.select_get(view_layer=active_view_layer)] def load_dict(src_dict, target):