show proper font in textmanager
This commit is contained in:
parent
76c05863b5
commit
edb2c8cb8b
1 changed files with 11 additions and 6 deletions
17
__init__.py
17
__init__.py
|
@ -922,10 +922,10 @@ class ABC3D_OT_PlaceText(bpy.types.Operator):
|
||||||
while text_id == tt.text_id:
|
while text_id == tt.text_id:
|
||||||
text_id = text_id + 1
|
text_id = text_id + 1
|
||||||
t = abc3d_data.available_texts.add()
|
t = abc3d_data.available_texts.add()
|
||||||
|
|
||||||
# If you wish to set a value and not fire an update, set the id property.
|
# 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.
|
# 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['text_id'] = text_id
|
||||||
|
# t['font'] = self.font # enums want to be set as attribute
|
||||||
t['font_name'] = self.font_name
|
t['font_name'] = self.font_name
|
||||||
t['face_name'] = self.face_name
|
t['face_name'] = self.face_name
|
||||||
t.text_object = selected
|
t.text_object = selected
|
||||||
|
@ -936,11 +936,16 @@ class ABC3D_OT_PlaceText(bpy.types.Operator):
|
||||||
t['translation'] = self.translation
|
t['translation'] = self.translation
|
||||||
t['orientation'] = self.orientation
|
t['orientation'] = self.orientation
|
||||||
t['distribution_type'] = distribution_type
|
t['distribution_type'] = distribution_type
|
||||||
butils.prepare_text(t.font_name,
|
t.font = self.font # enums want to be set as attribute
|
||||||
t.face_name,
|
# this also calls the update function
|
||||||
t.text)
|
# so we don't need to prepare/set again
|
||||||
butils.set_text_on_curve(t)
|
# no need for these:
|
||||||
else:
|
# butils.prepare_text(t.font_name,
|
||||||
|
# t.face_name,
|
||||||
|
# t.text)
|
||||||
|
# or this:
|
||||||
|
# butils.set_text_on_curve(t)
|
||||||
|
# else:
|
||||||
butils.ShowMessageBox(
|
butils.ShowMessageBox(
|
||||||
title="No object selected",
|
title="No object selected",
|
||||||
message=(
|
message=(
|
||||||
|
|
Loading…
Reference in a new issue