Collection Manager: Fix exclude bug. Task: T69577
Fixes the exclude operator changing the active collection in some cases.
This commit is contained in:
parent
1bc96468a1
commit
ba2aed9efb
|
@ -22,7 +22,7 @@ bl_info = {
|
|||
"name": "Collection Manager",
|
||||
"description": "Manage collections and their objects",
|
||||
"author": "Ryan Inch",
|
||||
"version": (2, 7, 17),
|
||||
"version": (2, 7, 18),
|
||||
"blender": (2, 80, 0),
|
||||
"location": "View3D - Object Mode (Shortcut - M)",
|
||||
"warning": '', # used for warning icon and text in addons panel
|
||||
|
|
|
@ -340,6 +340,7 @@ class CMExcludeOperator(Operator):
|
|||
|
||||
modifiers = get_modifiers(event)
|
||||
view_layer = context.view_layer.name
|
||||
orig_active_collection = context.view_layer.active_layer_collection
|
||||
laycol_ptr = layer_collections[self.name]["ptr"]
|
||||
|
||||
if not view_layer in rto_history["exclude"]:
|
||||
|
@ -386,6 +387,9 @@ class CMExcludeOperator(Operator):
|
|||
|
||||
cls.isolated = False
|
||||
|
||||
# reset active collection
|
||||
context.view_layer.active_layer_collection = orig_active_collection
|
||||
|
||||
# reset exclude all history
|
||||
if view_layer in rto_history["exclude_all"]:
|
||||
del rto_history["exclude_all"][view_layer]
|
||||
|
|
Loading…
Reference in New Issue