Skip to content

Commit

Permalink
feat: hide circular_array empties on completion and give them an appr…
Browse files Browse the repository at this point in the history
…opriate name
  • Loading branch information
tristan-hm committed May 13, 2022
1 parent d273720 commit c04c466
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion power_mods/circular_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from .. lib.overlay import update_overlay, init_overlay, toggle_pin_overlay, toggle_operator_passthrough, register_draw_handler, unregister_draw_handler, draw_header, draw_property
from .. lib.axis import init_axis, register_axis_handler, unregister_axis_handler
from .. lib.events import capture_modifier_keys, pressed
from .. lib.collections import move_to_utils_collection
from .. lib.collections import move_to_utils_collection, hide_utils_collection
from .. lib.preferences import get_preferences
from .. lib.objects import set_origin

Expand Down Expand Up @@ -183,6 +183,7 @@ def prepare_new_operator(self, context):
self.reference_obj.rotation_euler = context.object.rotation_euler.copy()

self.rotator_obj = bpy.data.objects.new("empty", None)
self.rotator_obj.name = "ND — Circular Array Rotator"
bpy.context.scene.collection.objects.link(self.rotator_obj)
self.rotator_obj.empty_display_size = 1
self.rotator_obj.empty_display_type = 'PLAIN_AXES'
Expand Down Expand Up @@ -287,6 +288,7 @@ def select_reference_obj(self):
def finish(self, context):
if not self.summoned:
move_to_utils_collection(self.rotator_obj)
hide_utils_collection(True)

unregister_draw_handler()
unregister_axis_handler()
Expand Down

0 comments on commit c04c466

Please sign in to comment.