mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
Fixed problem with event type by using event value
This commit is contained in:
committed by
Bruno Perdigão
parent
61641acf56
commit
04a273c720
@@ -533,7 +533,6 @@ class DrawPolylineWall(bpy.types.Operator):
|
||||
if event.type == 'MOUSEMOVE':
|
||||
self.mousemove_count += 1
|
||||
tool.Blender.update_viewport()
|
||||
print(self.action_count)
|
||||
else:
|
||||
self.mousemove_count = 0
|
||||
|
||||
@@ -549,22 +548,12 @@ class DrawPolylineWall(bpy.types.Operator):
|
||||
print(f"main function was finished in {operator_time:.2f} seconds")
|
||||
return {'RUNNING_MODAL'}
|
||||
|
||||
if event.type == 'LEFTMOUSE':
|
||||
if self.action_count == 0:
|
||||
tool.Snaping.insert_polyline_point()
|
||||
self.action_count += 1
|
||||
return {'RUNNING_MODAL'}
|
||||
if self.action_count == 1:
|
||||
self.action_count = 0
|
||||
if event.value == 'RELEASE' and event.type == 'LEFTMOUSE':
|
||||
tool.Snaping.insert_polyline_point()
|
||||
|
||||
if event.type == 'BACK_SPACE':
|
||||
if self.action_count == 0:
|
||||
tool.Snaping.remove_last_polyline_point()
|
||||
tool.Blender.update_viewport()
|
||||
self.action_count += 1
|
||||
return {'RUNNING_MODAL'}
|
||||
if self.action_count == 1:
|
||||
self.action_count = 0
|
||||
if event.value == 'RELEASE' and event.type == 'BACK_SPACE':
|
||||
tool.Snaping.remove_last_polyline_point()
|
||||
tool.Blender.update_viewport()
|
||||
|
||||
if event.type in {'MIDDLEMOUSE', 'WHEELUPMOUSE', 'WHEELDOWNMOUSE'}:
|
||||
return {'PASS_THROUGH'}
|
||||
|
||||
Reference in New Issue
Block a user