remove textobjects from available_texts if they are not there anymore
This commit is contained in:
parent
c1a3afbd60
commit
066d22bfb7
1 changed files with 9 additions and 2 deletions
11
__init__.py
11
__init__.py
|
@ -239,11 +239,18 @@ class FONT3D_PT_panel(bpy.types.Panel):
|
||||||
font3d = scene.font3d
|
font3d = scene.font3d
|
||||||
font3d_data = scene.font3d_data
|
font3d_data = scene.font3d_data
|
||||||
# TODO: properly include this
|
# TODO: properly include this
|
||||||
def lol():
|
def update():
|
||||||
font3d_data.active_text_index = -1
|
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")
|
# print(f"{utils.get_timestamp()} ors something")
|
||||||
|
|
||||||
run_in_main_thread(lol)
|
run_in_main_thread(update)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue