From d88c0c50cd37923b2a32f8276d340cede516542f Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Sun, 18 May 2025 17:22:31 +0200 Subject: [PATCH] cleanup --- __init__.py | 4 +--- butils.py | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/__init__.py b/__init__.py index 48a03af..c49f2f5 100644 --- a/__init__.py +++ b/__init__.py @@ -664,9 +664,6 @@ class ABC3D_PT_FontCreation(bpy.types.Panel): def draw(self, context): layout = self.layout wm = context.window_manager - scene = context.scene - - abc3d_data = scene.abc3d_data layout.row().operator( f"{__name__}.toggle_abc3d_collection", text="Toggle Collection" @@ -677,6 +674,7 @@ class ABC3D_PT_FontCreation(bpy.types.Panel): layout.row().operator( f"{__name__}.save_font_to_file", text="Export Font To File" ) + box = layout.box() box.label(text="metrics") box.row().operator( diff --git a/butils.py b/butils.py index 9ddfba1..3158e2d 100644 --- a/butils.py +++ b/butils.py @@ -485,7 +485,7 @@ def load_font_from_filepath(filepath, glyphs="", font_name="", face_name=""): modified_font_faces = [] all_glyph_os = [] - all_objects = [] + for o in bpy.context.scene.objects: if marker_property in o: if "type" in o and o["type"] == "glyph": @@ -847,6 +847,7 @@ def set_text_on_curve(text_properties, reset_timeout_s=0.1, reset_depsgraph_n=4) glyph_advance = 0 is_command = False previous_spline_index = -1 + for i, c in enumerate(text_properties.text): face = Font.fonts[text_properties.font_name].faces[text_properties.face_name] scalor = face.unit_factor * text_properties.font_size @@ -899,6 +900,7 @@ def set_text_on_curve(text_properties, reset_timeout_s=0.1, reset_depsgraph_n=4) ) if not replaced: continue + glyph = glyph_tmp.original ob = None