metrics
add custom properties to metrics
This commit is contained in:
parent
e5f2fc1fd9
commit
174754831d
1 changed files with 4 additions and 0 deletions
|
@ -659,6 +659,10 @@ def set_text_on_curve(text_properties):
|
||||||
def add_metrics_obj_from_bound_box(glyph, bound_box=None):
|
def add_metrics_obj_from_bound_box(glyph, bound_box=None):
|
||||||
mesh = bpy.data.meshes.new(f"{glyph.name}_metrics") # add the new mesh
|
mesh = bpy.data.meshes.new(f"{glyph.name}_metrics") # add the new mesh
|
||||||
obj = bpy.data.objects.new(mesh.name, mesh)
|
obj = bpy.data.objects.new(mesh.name, mesh)
|
||||||
|
obj["font_name"] = glyph["font_name"]
|
||||||
|
obj["face_name"] = glyph["face_name"]
|
||||||
|
obj["glyph"] = glyph["glyph"]
|
||||||
|
obj["type"] = "metrics"
|
||||||
col = glyph.users_collection[0]
|
col = glyph.users_collection[0]
|
||||||
col.objects.link(obj)
|
col.objects.link(obj)
|
||||||
# bpy.context.view_layer.objects.active = obj
|
# bpy.context.view_layer.objects.active = obj
|
||||||
|
|
Loading…
Reference in a new issue