diff options
author | Ryan Inch <mythologylover75@gmail.com> | 2020-08-02 06:16:39 +0300 |
---|---|---|
committer | Ryan Inch <mythologylover75@gmail.com> | 2020-08-02 06:16:39 +0300 |
commit | adac42a463344b288882954e57fca0715ee398f3 (patch) | |
tree | 544f140370bb542aa7077d189f544bb63ef59f02 /object_collection_manager/qcd_move_widget.py | |
parent | 7da2a313f91e3ec0c3ae3602c1e09e09c8c19f21 (diff) |
Collection Manager: Fix T78985. Task: T69577
Refactored the functions get_move_selection and get_move_active
to be faster by using sets and looping through all the objects
instead of looping through the selected objects and using direct
object lookups, except for special cases where direct lookups are
actually faster.
Removed unneeded calls to get_move_selection and get_move_active.
Diffstat (limited to 'object_collection_manager/qcd_move_widget.py')
-rw-r--r-- | object_collection_manager/qcd_move_widget.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/object_collection_manager/qcd_move_widget.py b/object_collection_manager/qcd_move_widget.py index 28ed9c01..1b2a6bee 100644 --- a/object_collection_manager/qcd_move_widget.py +++ b/object_collection_manager/qcd_move_widget.py @@ -655,6 +655,10 @@ def allocate_main_ui(self, context): self.areas["Button Row 2 B"] = button_row_2_b + selected_objects = qcd_operators.get_move_selection() + active_object = qcd_operators.get_move_active() + + # BUTTONS def get_buttons(button_row, row_num): cur_width_pos = button_row["vert"][0] @@ -667,8 +671,6 @@ def allocate_main_ui(self, context): if qcd_slot_name: qcd_laycol = layer_collections[qcd_slot_name]["ptr"] collection_objects = qcd_laycol.collection.objects - selected_objects = qcd_operators.get_move_selection() - active_object = qcd_operators.get_move_active() # BUTTON x = cur_width_pos |