From a5e45c7439874174788199087eb8680a84dddb68 Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Fri, 28 Jun 2024 11:24:29 +0200 Subject: [PATCH] cleanup --- __init__.py | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/__init__.py b/__init__.py index d0d80a8..23d08cd 100644 --- a/__init__.py +++ b/__init__.py @@ -315,7 +315,9 @@ class FONT3D_PT_TextPropertiesPanel(bpy.types.Panel): props = self.get_active_text_properties() - if type(props) == type(None): + if type(props) == type(None) or type(props.text_object) == type(None): + # this should not happen + print("debug: this should not happen") layout.label(text="AAAAH") return @@ -544,19 +546,6 @@ class FONT3D_OT_SaveFontToFile(bpy.types.Operator): was_selection.append(obj) was_active_object = bpy.context.view_layer.objects.active - # create restore function - # def restore(): - # bpy.ops.object.select_all(action="DESELECT") - # for obj in was_selection: - # obj.select_set(True) - # bpy.context.view_layer.objects.active = was_active_object - # if not was_fontcollection_linked: - # scene.collection.children.unlink(fontcollection) - - # # show fontcollection - # if not was_fontcollection_linked: - # scene.collection.children.link(fontcollection) - bpy.ops.object.select_all(action="DESELECT") # get save data