mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 10:11:46 +00:00
Change hotkey for angle lock in polyline tool, from "L" to "A".
This commit is contained in:
@@ -89,12 +89,11 @@ class PolylineOperator:
|
|||||||
self.snapping_points = []
|
self.snapping_points = []
|
||||||
self.instructions = """TAB: Cycle Input
|
self.instructions = """TAB: Cycle Input
|
||||||
D: Distance Input
|
D: Distance Input
|
||||||
A: Angle Input
|
A: Angle Lock
|
||||||
M: Modify Snap Point
|
M: Modify Snap Point
|
||||||
C: Close Polyline
|
C: Close Polyline
|
||||||
BACKSPACE: Remove Point
|
BACKSPACE: Remove Point
|
||||||
X, Y: Choose Axis
|
X, Y: Choose Axis
|
||||||
SHIFT: Lock axis
|
|
||||||
"""
|
"""
|
||||||
self.snap_info = """
|
self.snap_info = """
|
||||||
Snap:
|
Snap:
|
||||||
@@ -174,7 +173,7 @@ class PolylineOperator:
|
|||||||
context.workspace.status_text_set(self.instructions + custom_instructions + self.snap_info)
|
context.workspace.status_text_set(self.instructions + custom_instructions + self.snap_info)
|
||||||
|
|
||||||
def handle_lock_axis(self, context, event):
|
def handle_lock_axis(self, context, event):
|
||||||
if event.value == "RELEASE" and event.type == "L":
|
if event.value == "PRESS" and event.type in {"L", "A"}:
|
||||||
self.tool_state.lock_axis = False if self.tool_state.lock_axis else True
|
self.tool_state.lock_axis = False if self.tool_state.lock_axis else True
|
||||||
self.tool_state.snap_angle = self.input_ui.get_number_value("WORLD_ANGLE")
|
self.tool_state.snap_angle = self.input_ui.get_number_value("WORLD_ANGLE")
|
||||||
# Round to the closest 5
|
# Round to the closest 5
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ class DrawPolylineWall(bpy.types.Operator, PolylineOperator):
|
|||||||
PolylineDecorator.update(event, self.tool_state, self.input_ui, self.snapping_points[0])
|
PolylineDecorator.update(event, self.tool_state, self.input_ui, self.snapping_points[0])
|
||||||
tool.Blender.update_viewport()
|
tool.Blender.update_viewport()
|
||||||
|
|
||||||
self.handle_lock_axis(context, event)
|
self.handle_lock_axis(context, event) # Must come before "PASS_TRHOUGH"
|
||||||
|
|
||||||
if event.type in {"MIDDLEMOUSE", "WHEELUPMOUSE", "WHEELDOWNMOUSE"}:
|
if event.type in {"MIDDLEMOUSE", "WHEELUPMOUSE", "WHEELDOWNMOUSE"}:
|
||||||
self.handle_mouse_move(context, event)
|
self.handle_mouse_move(context, event)
|
||||||
|
|||||||
Reference in New Issue
Block a user