This commit is contained in:
Ryan Schultz
2026-02-25 07:34:19 -06:00
parent f92f1fd6a5
commit 5d842aa644
2 changed files with 4 additions and 5 deletions
@@ -997,7 +997,7 @@ class FallDecorator(BaseDecorator):
# generate label text
# same function as in svgwriter.py
def get_label_text():
B, A = [obj.matrix_world @ v.co.xyz for v in spline_points[:2]]
B, A = [v.co.xyz for v in spline_points[:2]]
rise = abs(A.z - B.z)
O = A.copy()
O.z = B.z
@@ -1009,14 +1009,13 @@ class FallDecorator(BaseDecorator):
angle = 90
# uses SLOPE_ANGLE as default
object_type = DecoratorData.data["fall"].get(obj.name, {}).get("object_type", None)
object_type = DecoratorData.data["fall"].get(obj, {}).get("object_type", None)
if object_type in ("FALL", "SLOPE_ANGLE"):
return f"{angle}°"
elif object_type == "SLOPE_FRACTION":
if angle == 90:
return "-"
segment_length = (B - A).length
return f"{self.format_value(context, rise)} / {self.format_value(context, segment_length)}"
return f"{self.format_value(context, rise)} / {self.format_value(context, run)}"
elif object_type == "SLOPE_PERCENT":
if angle == 90:
return "-"
@@ -1446,7 +1446,7 @@ class SvgWriter:
# generate label text
# same function as in decoration.py
def get_label_text():
B, A = [matrix_world @ v.co.xyz for v in points[:2]]
B, A = [v.co.xyz for v in points[:2]]
rise = abs(A.z - B.z)
O = A.copy()
O.z = B.z