mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 18:21:59 +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':
|
if event.type == 'MOUSEMOVE':
|
||||||
self.mousemove_count += 1
|
self.mousemove_count += 1
|
||||||
tool.Blender.update_viewport()
|
tool.Blender.update_viewport()
|
||||||
print(self.action_count)
|
|
||||||
else:
|
else:
|
||||||
self.mousemove_count = 0
|
self.mousemove_count = 0
|
||||||
|
|
||||||
@@ -549,22 +548,12 @@ class DrawPolylineWall(bpy.types.Operator):
|
|||||||
print(f"main function was finished in {operator_time:.2f} seconds")
|
print(f"main function was finished in {operator_time:.2f} seconds")
|
||||||
return {'RUNNING_MODAL'}
|
return {'RUNNING_MODAL'}
|
||||||
|
|
||||||
if event.type == 'LEFTMOUSE':
|
if event.value == 'RELEASE' and event.type == 'LEFTMOUSE':
|
||||||
if self.action_count == 0:
|
tool.Snaping.insert_polyline_point()
|
||||||
tool.Snaping.insert_polyline_point()
|
|
||||||
self.action_count += 1
|
|
||||||
return {'RUNNING_MODAL'}
|
|
||||||
if self.action_count == 1:
|
|
||||||
self.action_count = 0
|
|
||||||
|
|
||||||
if event.type == 'BACK_SPACE':
|
if event.value == 'RELEASE' and event.type == 'BACK_SPACE':
|
||||||
if self.action_count == 0:
|
tool.Snaping.remove_last_polyline_point()
|
||||||
tool.Snaping.remove_last_polyline_point()
|
tool.Blender.update_viewport()
|
||||||
tool.Blender.update_viewport()
|
|
||||||
self.action_count += 1
|
|
||||||
return {'RUNNING_MODAL'}
|
|
||||||
if self.action_count == 1:
|
|
||||||
self.action_count = 0
|
|
||||||
|
|
||||||
if event.type in {'MIDDLEMOUSE', 'WHEELUPMOUSE', 'WHEELDOWNMOUSE'}:
|
if event.type in {'MIDDLEMOUSE', 'WHEELUPMOUSE', 'WHEELDOWNMOUSE'}:
|
||||||
return {'PASS_THROUGH'}
|
return {'PASS_THROUGH'}
|
||||||
|
|||||||
Reference in New Issue
Block a user