Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpivak Vladimir (cwolf3d) <cwolf3d@gmail.com>2019-10-11 03:38:17 +0300
committerSpivak Vladimir (cwolf3d) <cwolf3d@gmail.com>2019-10-11 03:38:17 +0300
commitef40e0daf220d24e6e91f3d6b7f4272ffb4d7546 (patch)
tree1e1ba22386be013d380d494ef9be2fe4c2fb942a /add_curve_extra_objects/add_curve_spirals.py
parent04f482c5aa48a1b04a429dafba3e09f7287b9110 (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.py13
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))