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