remove prints
This commit is contained in:
themancalledjakob 2024-08-07 11:47:02 +02:00
parent 97446d74e2
commit adc5ad8ea6

View file

@ -394,14 +394,12 @@ def load_font_from_filepath(filepath):
all_objects = [] all_objects = []
for o in bpy.data.objects: for o in bpy.data.objects:
all_objects.append(o) all_objects.append(o)
print("all objects", len(all_objects))
for o in all_objects: for o in all_objects:
if o.name not in allObjectsBefore: if o.name not in allObjectsBefore:
# must be new # must be new
if ("glyph" in o.keys() if ("glyph" in o.keys()
and "face_name" in o.keys() and "face_name" in o.keys()
and "font_name" in o.keys()): and "font_name" in o.keys()):
print("adding glyph", o)
glyph_id = o["glyph"] glyph_id = o["glyph"]
font_name = o["font_name"] font_name = o["font_name"]
face_name = o["face_name"] face_name = o["face_name"]
@ -427,10 +425,8 @@ def load_font_from_filepath(filepath):
print(f"{__name__} added {font_name}") print(f"{__name__} added {font_name}")
else: else:
remove_list.append(o) remove_list.append(o)
print("add to remove list", o)
for o in remove_list: for o in remove_list:
bpy.data.objects.remove(o, do_unlink=True) bpy.data.objects.remove(o, do_unlink=True)
print("removed",o)
print(f"{__name__}: loaded fonts") print(f"{__name__}: loaded fonts")
def getPreferences(context): def getPreferences(context):