diff --git a/__init__.py b/__init__.py index 904ebaf..d0d80a8 100644 --- a/__init__.py +++ b/__init__.py @@ -239,11 +239,18 @@ class FONT3D_PT_panel(bpy.types.Panel): font3d = scene.font3d font3d_data = scene.font3d_data # TODO: properly include this - def lol(): + def update(): font3d_data.active_text_index = -1 + remove_list = [] + for i, t in enumerate(font3d_data.available_texts): + if type(t.text_object) == type(None): + remove_list.append(i) + for i in remove_list: + font3d_data.available_texts.remove(i) + # print(f"{utils.get_timestamp()} ors something") - run_in_main_thread(lol) + run_in_main_thread(update) return True