show proper font in textmanager

This commit is contained in:
themancalledjakob 2024-08-23 13:55:40 +02:00
parent 76c05863b5
commit edb2c8cb8b

View file

@ -922,10 +922,10 @@ class ABC3D_OT_PlaceText(bpy.types.Operator):
while text_id == tt.text_id:
text_id = text_id + 1
t = abc3d_data.available_texts.add()
# If you wish to set a value and not fire an update, set the id property.
# A property defined via bpy.props for example ob.prop is stored as ob["prop"] once set to non default.
t['text_id'] = text_id
# t['font'] = self.font # enums want to be set as attribute
t['font_name'] = self.font_name
t['face_name'] = self.face_name
t.text_object = selected
@ -936,11 +936,16 @@ class ABC3D_OT_PlaceText(bpy.types.Operator):
t['translation'] = self.translation
t['orientation'] = self.orientation
t['distribution_type'] = distribution_type
butils.prepare_text(t.font_name,
t.face_name,
t.text)
butils.set_text_on_curve(t)
else:
t.font = self.font # enums want to be set as attribute
# this also calls the update function
# so we don't need to prepare/set again
# no need for these:
# butils.prepare_text(t.font_name,
# t.face_name,
# t.text)
# or this:
# butils.set_text_on_curve(t)
# else:
butils.ShowMessageBox(
title="No object selected",
message=(