diff options
author | Spivak Vladimir (cwolf3d) <cwolf3d@gmail.com> | 2019-10-11 03:38:17 +0300 |
---|---|---|
committer | Spivak Vladimir (cwolf3d) <cwolf3d@gmail.com> | 2019-10-11 03:38:17 +0300 |
commit | ef40e0daf220d24e6e91f3d6b7f4272ffb4d7546 (patch) | |
tree | 1e1ba22386be013d380d494ef9be2fe4c2fb942a /add_curve_extra_objects/add_curve_spirals.py | |
parent | 04f482c5aa48a1b04a429dafba3e09f7287b9110 (diff) |
Addon: Add Curve: Extra Objects: Added switch to display in edit mode by create object
Diffstat (limited to 'add_curve_extra_objects/add_curve_spirals.py')
-rw-r--r-- | add_curve_extra_objects/add_curve_spirals.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/add_curve_extra_objects/add_curve_spirals.py b/add_curve_extra_objects/add_curve_spirals.py index c669642f..e916fbe5 100644 --- a/add_curve_extra_objects/add_curve_spirals.py +++ b/add_curve_extra_objects/add_curve_spirals.py @@ -430,6 +430,11 @@ class CURVE_OT_spirals(Operator): ('VECTOR', "Vector", "Vector type Bezier handles"), ('AUTO', "Auto", "Automatic type Bezier handles")] ) + edit_mode : BoolProperty( + name="Show in edit mode", + default=True, + description="Show in edit mode" + ) startlocation : FloatVectorProperty( name="", description="Start location", @@ -521,6 +526,9 @@ class CURVE_OT_spirals(Operator): col = layout.column() col.row().prop(self, "use_cyclic_u", expand=True) + + col = layout.column() + col.row().prop(self, "edit_mode", expand=True) box = layout.box() box.label(text="Location:") @@ -547,6 +555,11 @@ class CURVE_OT_spirals(Operator): # restore pre operator state bpy.context.preferences.edit.use_enter_edit_mode = use_enter_edit_mode + + if self.edit_mode: + bpy.ops.object.mode_set(mode = 'EDIT') + else: + bpy.ops.object.mode_set(mode = 'OBJECT') #self.report({'INFO'}, #"Drawing Spiral Finished: %.4f sec" % (time.time() - time_start)) |