use face_name
This commit is contained in:
parent
327b4161bc
commit
4bc0ee69f1
1 changed files with 3 additions and 4 deletions
|
@ -138,6 +138,7 @@ class FONT3D_settings(bpy.types.PropertyGroup):
|
||||||
|
|
||||||
class FONT3D_available_font(bpy.types.PropertyGroup):
|
class FONT3D_available_font(bpy.types.PropertyGroup):
|
||||||
font_name: bpy.props.StringProperty(name="")
|
font_name: bpy.props.StringProperty(name="")
|
||||||
|
face_name: bpy.props.StringProperty(name="")
|
||||||
|
|
||||||
class FONT3D_glyph_properties(bpy.types.PropertyGroup):
|
class FONT3D_glyph_properties(bpy.types.PropertyGroup):
|
||||||
glyph_id: bpy.props.StringProperty(maxlen=1)
|
glyph_id: bpy.props.StringProperty(maxlen=1)
|
||||||
|
@ -207,9 +208,7 @@ class FONT3D_data(bpy.types.PropertyGroup):
|
||||||
|
|
||||||
class FONT3D_UL_fonts(bpy.types.UIList):
|
class FONT3D_UL_fonts(bpy.types.UIList):
|
||||||
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
|
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
|
||||||
split = layout.split(factor=0.3)
|
layout.label(text=f"{index}: {item.font_name} {item.face_name}") # avoids renaming the item by accident
|
||||||
split.label(text="Index: %d" % (index))
|
|
||||||
split.label(text=f"{item.font_name}") # avoids renaming the item by accident
|
|
||||||
|
|
||||||
def invoke(self, context, event):
|
def invoke(self, context, event):
|
||||||
pass
|
pass
|
||||||
|
@ -667,7 +666,7 @@ class FONT3D_OT_SaveFontToFile(bpy.types.Operator):
|
||||||
selected_font = font3d_data.available_fonts[font3d_data.active_font_index]
|
selected_font = font3d_data.available_fonts[font3d_data.active_font_index]
|
||||||
|
|
||||||
# print(selected_font.font_name)
|
# print(selected_font.font_name)
|
||||||
self.report({'INFO'}, f"{bl_info['name']}: {selected_font.font_name}")
|
self.report({'INFO'}, f"{bl_info['name']}: {selected_font.font_name} {selected_font.face_name}")
|
||||||
preferences = getPreferences(context)
|
preferences = getPreferences(context)
|
||||||
print(f"assets folder: {preferences.assets_dir}")
|
print(f"assets folder: {preferences.assets_dir}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue