fix: User selection incositent with active view_layer

This commit is contained in:
Swann Martinez
2020-02-25 16:35:26 +01:00
parent 26cec517c0
commit 0a52b3cf80
2 changed files with 5 additions and 3 deletions

View File

@ -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 = [

View File

@ -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):