|
@@ -19,6 +19,7 @@ without significant importing (it's the same as Godot's tscn format).
|
|
#
|
|
#
|
|
# ##### END GPL LICENSE BLOCK #####
|
|
# ##### END GPL LICENSE BLOCK #####
|
|
|
|
|
|
|
|
+import logging
|
|
import bpy
|
|
import bpy
|
|
from bpy.props import StringProperty, BoolProperty, FloatProperty, EnumProperty
|
|
from bpy.props import StringProperty, BoolProperty, FloatProperty, EnumProperty
|
|
from bpy_extras.io_utils import ExportHelper
|
|
from bpy_extras.io_utils import ExportHelper
|
|
@@ -206,6 +207,7 @@ class ExportGodot(bpy.types.Operator, ExportHelper):
|
|
|
|
|
|
def execute(self, context):
|
|
def execute(self, context):
|
|
"""Begin the export"""
|
|
"""Begin the export"""
|
|
|
|
+ exporter_log_handler = export_godot.ExporterLogHandler(self)
|
|
try:
|
|
try:
|
|
if not self.filepath:
|
|
if not self.filepath:
|
|
raise Exception("filepath not set")
|
|
raise Exception("filepath not set")
|
|
@@ -218,11 +220,14 @@ class ExportGodot(bpy.types.Operator, ExportHelper):
|
|
"filter_glob",
|
|
"filter_glob",
|
|
"xna_validate",
|
|
"xna_validate",
|
|
))
|
|
))
|
|
-
|
|
|
|
|
|
+ logging.getLogger().addHandler(exporter_log_handler)
|
|
return export_godot.save(self, context, **keywords)
|
|
return export_godot.save(self, context, **keywords)
|
|
except ValidationError as error:
|
|
except ValidationError as error:
|
|
self.report({'ERROR'}, str(error))
|
|
self.report({'ERROR'}, str(error))
|
|
return {'CANCELLED'}
|
|
return {'CANCELLED'}
|
|
|
|
+ finally:
|
|
|
|
+ if exporter_log_handler:
|
|
|
|
+ logging.getLogger().removeHandler(exporter_log_handler)
|
|
|
|
|
|
|
|
|
|
def menu_func(self, context):
|
|
def menu_func(self, context):
|