diff options
author | Ryan Inch <mythologylover75@gmail.com> | 2020-05-02 09:37:52 +0300 |
---|---|---|
committer | Ryan Inch <mythologylover75@gmail.com> | 2020-05-02 09:37:52 +0300 |
commit | 06fc55648012d133451469f584c9cadd34852552 (patch) | |
tree | 13c92d9fa80ec4f1bf44ea05fc413878d27ec813 | |
parent | 59db3adeb4994745146b099cce3a19de3815b959 (diff) |
Collection Manager: Fix exclude bug. Task: T69577
Fixes the exclude operator changing the active collection in some cases.
-rw-r--r-- | object_collection_manager/__init__.py | 2 | ||||
-rw-r--r-- | object_collection_manager/operators.py | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/object_collection_manager/__init__.py b/object_collection_manager/__init__.py index 2c950c84..2caf6bc7 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, 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 diff --git a/object_collection_manager/operators.py b/object_collection_manager/operators.py index 3fe19660..1d60d60c 100644 --- a/object_collection_manager/operators.py +++ b/object_collection_manager/operators.py @@ -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] |