diff options
author | Ryan Inch <mythologylover75@gmail.com> | 2020-04-15 09:47:52 +0300 |
---|---|---|
committer | Ryan Inch <mythologylover75@gmail.com> | 2020-04-15 09:47:52 +0300 |
commit | 8139c91615608ce627335e3efae79d1074ba7191 (patch) | |
tree | 0056cd193bd991bbcaa63255c9a1b0145e748d21 /object_collection_manager/operator_utils.py | |
parent | 9f759ceeaef665ba88c44638a4a74059faf862ce (diff) |
Collection Manager: Update Toggle Nested. Task T69577
Update the toggle_children function to account for the new changes
introduced to the exclude RTO with D7016.
Diffstat (limited to 'object_collection_manager/operator_utils.py')
-rw-r--r-- | object_collection_manager/operator_utils.py | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/object_collection_manager/operator_utils.py b/object_collection_manager/operator_utils.py index 4daed884..02644954 100644 --- a/object_collection_manager/operator_utils.py +++ b/object_collection_manager/operator_utils.py @@ -161,21 +161,17 @@ def isolate_rto(cls, self, view_layer, rto, *, children=False): def toggle_children(self, view_layer, rto): laycol_ptr = layer_collections[self.name]["ptr"] - # reset exclude history + # reset rto history del rto_history[rto][view_layer] - if rto == "exclude": - laycol_ptr.exclude = not laycol_ptr.exclude - - else: - # toggle selectability of collection - state = not get_rto(laycol_ptr, rto) - set_rto(laycol_ptr, rto, state) + # toggle rto state + state = not get_rto(laycol_ptr, rto) + set_rto(laycol_ptr, rto, state) - def set_state(layer_collection): - set_rto(layer_collection, rto, state) + def set_state(layer_collection): + set_rto(layer_collection, rto, state) - apply_to_children(laycol_ptr, set_state) + apply_to_children(laycol_ptr, set_state) def activate_all_rtos(view_layer, rto): |