simplify placement
This commit is contained in:
parent
409e06bd44
commit
4d0c42adb3
3 changed files with 78 additions and 40 deletions
|
@ -383,18 +383,12 @@ def load_font_from_filepath(filepath):
|
|||
return False
|
||||
|
||||
abc3d_data = bpy.context.scene.abc3d_data
|
||||
for f in bpy.context.scene.abc3d_data.available_fonts.values():
|
||||
print(f"inside available font: {f.font_name} {f.face_name}")
|
||||
allObjectsBefore = []
|
||||
for ob in bpy.data.objects:
|
||||
allObjectsBefore.append(ob.name)
|
||||
|
||||
bpy.ops.import_scene.gltf(filepath=filepath)
|
||||
|
||||
print(f"after import available fonts:")
|
||||
for f in bpy.context.scene.abc3d_data.available_fonts.values():
|
||||
print(f"after import available font: {f.font_name} {f.face_name}")
|
||||
|
||||
fontcollection = bpy.data.collections.get("ABC3D")
|
||||
if fontcollection is None:
|
||||
fontcollection = bpy.data.collections.new("ABC3D")
|
||||
|
@ -710,7 +704,7 @@ def set_text_on_curve(text_properties):
|
|||
# otherwise letters will be closer together the curvier the bezier is
|
||||
# this could be done more efficiently, but whatever
|
||||
curve_compensation = 0
|
||||
if text_properties.compensate_curvature:
|
||||
if text_properties.compensate_curvature and glyph_advance > 0:
|
||||
previous_location = calc_point_on_bezier_curve(mom, advance, False)
|
||||
new_location = calc_point_on_bezier_curve(mom, advance + glyph_advance, False)
|
||||
while (previous_location - new_location).length > glyph_advance:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue