Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Inch <mythologylover75@gmail.com>2020-05-11 07:40:00 +0300
committerRyan Inch <mythologylover75@gmail.com>2020-05-11 07:40:00 +0300
commit1f161da140806c8ac441c7108973036307800d81 (patch)
tree488c4ab7c8eda61e0efd48a3fe6342a28ea305f4
parent73bda89771d9c4bf57e5b1fbaa5e067f9ca00403 (diff)
Collection Manager: Global Exclude RTO fix. Task: T69577
Fix the Global Exclude RTO unnecessarily resetting the active collection to the Scene Collection.
-rw-r--r--object_collection_manager/__init__.py2
-rw-r--r--object_collection_manager/operators.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/object_collection_manager/__init__.py b/object_collection_manager/__init__.py
index 5c3edb7a..dcb4daf0 100644
--- a/object_collection_manager/__init__.py
+++ b/object_collection_manager/__init__.py
@@ -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
diff --git a/object_collection_manager/operators.py b/object_collection_manager/operators.py
index ce39867e..4d028cf2 100644
--- a/object_collection_manager/operators.py
+++ b/object_collection_manager/operators.py
@@ -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'}