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:
Diffstat (limited to 'add_curve_extra_objects/add_curve_braid.py')
-rw-r--r--add_curve_extra_objects/add_curve_braid.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/add_curve_extra_objects/add_curve_braid.py b/add_curve_extra_objects/add_curve_braid.py
index 16e072d4..ae250682 100644
--- a/add_curve_extra_objects/add_curve_braid.py
+++ b/add_curve_extra_objects/add_curve_braid.py
@@ -204,6 +204,11 @@ class Braid(Operator):
description="Switch between round and sharp corners",
default=False
)
+ edit_mode : BoolProperty(
+ name="Show in edit mode",
+ default=True,
+ description="Show in edit mode"
+ )
def draw(self, context):
layout = self.layout
@@ -227,6 +232,9 @@ class Braid(Operator):
col.label(text="Geometry Options:")
col.prop(self, "strandsize")
col.prop(self, "resolution")
+
+ col = layout.column()
+ col.row().prop(self, "edit_mode", expand=True)
def execute(self, context):
# turn off 'Enter Edit Mode'
@@ -257,6 +265,11 @@ class Braid(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')
+
return {'FINISHED'}