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:42:41 +0300 |
commit | ba2aed9efbdbbd1d6b06124fefa914cc588a6eec (patch) | |
tree | f1aac0b753140eb6315c6356374b96f805278b36 /object_collection_manager/operators.py | |
parent | 1bc96468a144750348ea6b134d4aaf457d7cc6cf (diff) |
Collection Manager: Fix exclude bug. Task: T69577
Fixes the exclude operator changing the active collection in some cases.
Diffstat (limited to 'object_collection_manager/operators.py')
-rw-r--r-- | object_collection_manager/operators.py | 4 |
1 files changed, 4 insertions, 0 deletions
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] |