Change hotkey for angle lock in polyline tool, from "L" to "A".

This commit is contained in:
Bruno Perdigão
2024-11-08 17:00:47 -03:00
parent 23c30e7642
commit 10aad5a531
2 changed files with 3 additions and 4 deletions
@@ -89,12 +89,11 @@ class PolylineOperator:
self.snapping_points = []
self.instructions = """TAB: Cycle Input
D: Distance Input
A: Angle Input
A: Angle Lock
M: Modify Snap Point
C: Close Polyline
BACKSPACE: Remove Point
X, Y: Choose Axis
SHIFT: Lock axis
"""
self.snap_info = """
Snap:
@@ -174,7 +173,7 @@ class PolylineOperator:
context.workspace.status_text_set(self.instructions + custom_instructions + self.snap_info)
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.snap_angle = self.input_ui.get_number_value("WORLD_ANGLE")
# Round to the closest 5
+1 -1
View File
@@ -338,7 +338,7 @@ class DrawPolylineWall(bpy.types.Operator, PolylineOperator):
PolylineDecorator.update(event, self.tool_state, self.input_ui, self.snapping_points[0])
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"}:
self.handle_mouse_move(context, event)