Fixed issue with X, Y and Z input for polytool.

This issue was caused by the change to X, Y, Z keys for lock axis.
This commit is contained in:
Bruno Perdigão
2024-08-26 16:44:34 -03:00
parent 2a1bc30f19
commit 197d0b3258
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -319,7 +319,7 @@ class DrawPolylineWall(bpy.types.Operator):
self.number_output = ""
self.number_is_negative = False
self.is_input_on = False
self.input_options = ["D", "A"]
self.input_options = ["D", "A", "X", "Y"]
self.input_type = "OFF"
self.input_value_xy = [None, None]
self.input_panel = {"D": "", "A": "", "X": "", "Y": ""}
@@ -443,7 +443,7 @@ class DrawPolylineWall(bpy.types.Operator):
PolylineDecorator.set_input_panel(self.input_panel, self.input_type)
tool.Blender.update_viewport()
if event.value == "RELEASE" and event.type in self.input_options:
if event.value == "RELEASE" and event.type in {"D", "A"}:
self.recalculate_inputs(context)
self.is_input_on = True
self.input_type = event.type
@@ -2328,7 +2328,7 @@ class MeasureTool(bpy.types.Operator):
self.number_output = ""
self.number_is_negative = False
self.is_input_on = False
self.input_options = ["D", "A"]
self.input_options = ["D", "A", "X", "Y", "Z"]
self.input_type = "OFF"
self.input_value_xy = [None, None]
self.input_panel = {"D": "", "A": "", "X": "", "Y": "", "Z": ""}
@@ -2431,7 +2431,7 @@ class MeasureTool(bpy.types.Operator):
PolylineDecorator.set_input_panel(self.input_panel, self.input_type)
tool.Blender.update_viewport()
if event.value == "PRESS" and event.type in self.input_options and not event.shift:
if event.value == "PRESS" and event.type in {"D", "A"} and not event.shift:
self.recalculate_inputs(context)
self.is_input_on = True
self.input_type = event.type