Changed the order of the input panel for Polyline and Measure tool. Distance and Angle now come first.

This commit is contained in:
Bruno Perdigão
2024-08-21 22:55:20 -03:00
parent f23e419685
commit e8a7a032aa
4 changed files with 5 additions and 6 deletions
@@ -508,7 +508,7 @@ class PolylineDecorator:
batch.draw(shader)
def draw_text(self, context):
texts = {"X": "X coord:", "Y": "Y coord:", "Z": "Z coord:", "D": "Distance:", "A": "Angle:", "AREA": "Area:"}
texts = {"D": "Distance:", "A": "Angle:", "X": "X coord:", "Y": "Y coord:", "Z": "Z coord:", "AREA": "Area:"}
self.addon_prefs = tool.Blender.get_addon_preferences()
self.font_id = 0
blf.size(self.font_id, 12)
+2 -2
View File
@@ -299,10 +299,10 @@ class DrawPolylineWall(bpy.types.Operator):
self.number_output = ""
self.number_is_negative = False
self.is_input_on = False
self.input_options = ["X", "Y", "D", "A"]
self.input_options = ["D", "A", "X", "Y"]
self.input_type = "OFF"
self.input_value_xy = [None, None]
self.input_panel = {"X": "", "Y": "", "D": "", "A": ""}
self.input_panel = {"D": "", "A": "", "X": "", "Y": ""}
self.snap_angle = None
def recalculate_inputs(self, context):
@@ -2308,10 +2308,10 @@ class MeasureTool(bpy.types.Operator):
self.number_output = ""
self.number_is_negative = False
self.is_input_on = False
self.input_options = ["X", "Y", "Z", "D", "A"]
self.input_options = ["D", "A", "X", "Y", "Z"]
self.input_type = "OFF"
self.input_value_xy = [None, None]
self.input_panel = {"X": "", "Y": "", "Z": "", "D": "", "A": "", "AREA": ""}
self.input_panel = {"D": "", "A": "", "X": "", "Y": "", "Z": "", "AREA": ""}
self.snap_angle = None
def recalculate_inputs(self, context):
-1
View File
@@ -420,7 +420,6 @@ class Snap(bonsai.core.tool.Snap):
else:
snap_points = cls.get_snap_points_on_polyline()
snap_point = cls.select_snap_point(snap_points, intersection, snap_threshold)
print("POLY", snap_points, snap_point)
if snap_point:
if event.shift and axis_start: