Collection Manager: Global Exclude RTO fix. Task: T69577
Fix the Global Exclude RTO unnecessarily resetting the active collection to the Scene Collection.
This commit is contained in:
parent
73bda89771
commit
1f161da140
|
@ -22,7 +22,7 @@ bl_info = {
|
|||
"name": "Collection Manager",
|
||||
"description": "Manage collections and their objects",
|
||||
"author": "Ryan Inch",
|
||||
"version": (2, 7, 21),
|
||||
"version": (2, 7, 22),
|
||||
"blender": (2, 80, 0),
|
||||
"location": "View3D - Object Mode (Shortcut - M)",
|
||||
"warning": '', # used for warning icon and text in addons panel
|
||||
|
|
|
@ -412,6 +412,7 @@ class CMUnExcludeAllOperator(Operator):
|
|||
def invoke(self, context, event):
|
||||
global rto_history
|
||||
|
||||
orig_active_collection = context.view_layer.active_layer_collection
|
||||
view_layer = context.view_layer.name
|
||||
modifiers = get_modifiers(event)
|
||||
|
||||
|
@ -436,6 +437,9 @@ class CMUnExcludeAllOperator(Operator):
|
|||
else:
|
||||
activate_all_rtos(view_layer, "exclude")
|
||||
|
||||
# reset active collection
|
||||
context.view_layer.active_layer_collection = orig_active_collection
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue