fix naming when creating font
This commit is contained in:
parent
05371c3675
commit
1d4fece0ea
1 changed files with 4 additions and 2 deletions
|
@ -1358,6 +1358,7 @@ class ABC3D_OT_CreateFontFromObjects(bpy.types.Operator):
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.prop(self, "autodetect_names")
|
row.prop(self, "autodetect_names")
|
||||||
first_object_name = context.selected_objects[-1].name
|
first_object_name = context.selected_objects[-1].name
|
||||||
|
if self.autodetect_names:
|
||||||
self.font_name, self.face_name = self.do_autodetect_names(first_object_name)
|
self.font_name, self.face_name = self.do_autodetect_names(first_object_name)
|
||||||
if self.autodetect_names:
|
if self.autodetect_names:
|
||||||
scale_y = 0.5
|
scale_y = 0.5
|
||||||
|
@ -1450,8 +1451,9 @@ class ABC3D_OT_CreateFontFromObjects(bpy.types.Operator):
|
||||||
# glyph_id = Font.name_to_glyph(name)
|
# glyph_id = Font.name_to_glyph(name)
|
||||||
name = o.name.split("_")[0]
|
name = o.name.split("_")[0]
|
||||||
glyph_id = Font.name_to_glyph(name)
|
glyph_id = Font.name_to_glyph(name)
|
||||||
|
o.name = f"{name}_{font_name}_{face_name}"
|
||||||
|
|
||||||
if type(glyph_id) != type(None):
|
if glyph_id is not None:
|
||||||
o["glyph"] = glyph_id
|
o["glyph"] = glyph_id
|
||||||
o["font_name"] = font_name
|
o["font_name"] = font_name
|
||||||
o["face_name"] = face_name
|
o["face_name"] = face_name
|
||||||
|
|
Loading…
Add table
Reference in a new issue