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 'curve_tools/fillet.py')
-rw-r--r--curve_tools/fillet.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/curve_tools/fillet.py b/curve_tools/fillet.py
index 3bb3e492..c9fcb688 100644
--- a/curve_tools/fillet.py
+++ b/curve_tools/fillet.py
@@ -47,7 +47,7 @@ def remove_handler(handlers):
except:
pass
for handler in handlers:
- handlers.remove(handler)
+ handlers.remove(handler)
class Fillet(bpy.types.Operator):
@@ -55,44 +55,44 @@ class Fillet(bpy.types.Operator):
bl_label = "Curve Fillet"
bl_description = "Curve Fillet"
bl_options = {'REGISTER', 'UNDO'}
-
+
x: IntProperty(name="x", description="x")
y: IntProperty(name="y", description="y")
location3D: FloatVectorProperty(name = "",
description = "Start location",
default = (0.0, 0.0, 0.0),
subtype = 'XYZ')
-
+
handlers = []
-
+
def execute(self, context):
self.report({'INFO'}, "ESC or TAB - cancel")
bpy.ops.object.mode_set(mode = 'EDIT')
-
+
# color change in the panel
self.path_color = bpy.context.scene.curvetools.path_color
self.path_thickness = bpy.context.scene.curvetools.path_thickness
def modal(self, context, event):
context.area.tag_redraw()
-
+
if event.type in {'ESC', 'TAB'}: # Cancel
remove_handler(self.handlers)
return {'CANCELLED'}
-
+
if event.type in {'X', 'DEL'}: # Cancel
remove_handler(self.handlers)
- bpy.ops.curve.delete(type='VERT')
- return {'RUNNING_MODAL'}
-
+ bpy.ops.curve.delete(type='VERT')
+ return {'RUNNING_MODAL'}
+
elif event.alt and event.shift and event.type == 'LEFTMOUSE':
click(self, context, event)
-
+
elif event.alt and not event.shift and event.type == 'LEFTMOUSE':
remove_handler(self.handlers)
bpy.ops.curve.select_all(action='DESELECT')
click(self, context, event)
-
+
elif event.alt and event.type == 'RIGHTMOUSE':
remove_handler(self.handlers)
bpy.ops.curve.select_all(action='DESELECT')
@@ -100,12 +100,12 @@ class Fillet(bpy.types.Operator):
elif event.alt and not event.shift and event.shift and event.type == 'RIGHTMOUSE':
click(self, context, event)
-
+
elif event.type == 'A':
remove_handler(self.handlers)
bpy.ops.curve.select_all(action='DESELECT')
-
- elif event.type == 'MOUSEMOVE': #
+
+ elif event.type == 'MOUSEMOVE': #
self.x = event.mouse_x
self.y = event.mouse_y
region = bpy.context.region
@@ -115,7 +115,7 @@ class Fillet(bpy.types.Operator):
rv3d,
(event.mouse_region_x, event.mouse_region_y),
(0.0, 0.0, 0.0)
- )
+ )
return {'PASS_THROUGH'}
@@ -123,7 +123,7 @@ class Fillet(bpy.types.Operator):
self.execute(context)
context.window_manager.modal_handler_add(self)
return {'RUNNING_MODAL'}
-
+
@classmethod
def poll(cls, context):
return (context.object is not None and