diff options
Diffstat (limited to 'curve_tools/cad.py')
-rw-r--r-- | curve_tools/cad.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/curve_tools/cad.py b/curve_tools/cad.py index b7478450..8e62e295 100644 --- a/curve_tools/cad.py +++ b/curve_tools/cad.py @@ -70,9 +70,9 @@ class Boolean(bpy.types.Operator): def execute(self, context): current_mode = bpy.context.object.mode - + bpy.ops.object.mode_set(mode = 'EDIT') - + if bpy.context.object.data.dimensions != '2D': self.report({'WARNING'}, 'Can only be applied in 2D') return {'CANCELLED'} @@ -86,9 +86,9 @@ class Boolean(bpy.types.Operator): if not internal.bezierBooleanGeometry(splineA, splineB, self.operation): self.report({'WARNING'}, 'Invalid selection. Only work to selected two spline.') return {'CANCELLED'} - + bpy.ops.object.mode_set (mode = current_mode) - + return {'FINISHED'} class Intersection(bpy.types.Operator): @@ -108,7 +108,7 @@ class Intersection(bpy.types.Operator): internal.bezierMultiIntersection(segments) return {'FINISHED'} - + class HandleProjection(bpy.types.Operator): bl_idname = 'curvetools.bezier_cad_handle_projection' bl_description = bl_label = 'Handle Projection' @@ -191,7 +191,7 @@ class Subdivide(bpy.types.Operator): def execute(self, context): current_mode = bpy.context.object.mode - + bpy.ops.object.mode_set(mode = 'EDIT') segments = internal.bezierSegments(bpy.context.object.data.splines, True) @@ -206,7 +206,7 @@ class Subdivide(bpy.types.Operator): for segment in segments: segment['cuts'].extend(cuts) internal.subdivideBezierSegments(segments) - + bpy.ops.object.mode_set (mode = current_mode) return {'FINISHED'} |