@@ -1843,18 +1843,28 @@ def getWriteMethodFromEnum(enumVal):
18431843 return matWriteMethodEnumDict [enumVal ]
18441844
18451845
1846- def exportF3DtoXML (dirPath , obj , DLFormat , transformMatrix , texDir , objectPath , savePNG , texSeparate , name , matWriteMethod ):
1847-
1846+ def exportF3DtoXML (dirPath , obj , DLFormat , transformMatrix , texDir , objectPath , savePNG , texSeparate , name , matWriteMethod , logging_func ):
1847+ logging_func ({ "INFO" }, "exportF3DtoXML 0" )
18481848 fModel = FModel (name , DLFormat , matWriteMethod )
1849+ logging_func ({"INFO" }, "exportF3DtoXML 1" )
18491850 fMesh = exportF3DCommon (obj , fModel , transformMatrix , True , name , DLFormat , not savePNG )
18501851
1852+ logging_func ({"INFO" }, "exportF3DtoXML 2" )
1853+
18511854 modelDirPath = os .path .join (dirPath , objectPath )
1852-
1855+
1856+ logging_func ({"INFO" }, "exportF3DtoXML 3" )
1857+
18531858 if not os .path .exists (modelDirPath ):
18541859 os .makedirs (modelDirPath )
1855-
1860+
1861+ logging_func ({"INFO" }, "exportF3DtoXML 4" )
1862+
18561863 #gfxFormatter = GfxFormatter(ScrollMethod.Vertex, 64)
1857- exportData = fModel .to_soh_xml (modelDirPath , objectPath , None )
1864+ exportData = fModel .to_soh_xml (modelDirPath , objectPath , logging_func )
1865+
1866+ logging_func ({"INFO" }, "exportF3DtoXML 5" )
1867+
18581868 staticData = exportData
18591869 #dynamicData = exportData.dynamicData
18601870 #texC = exportData.textureData
@@ -1879,6 +1889,8 @@ def exportF3DtoXML(dirPath, obj, DLFormat, transformMatrix, texDir, objectPath,
18791889 #texCFile.close()
18801890
18811891 writeXMLData (staticData , os .path .join (modelDirPath , "model.xml" ))
1892+
1893+ logging_func ({"INFO" }, "exportF3DtoXML 6" )
18821894
18831895
18841896def exportF3DtoC (dirPath , obj , DLFormat , transformMatrix , texDir , savePNG , texSeparate , name , matWriteMethod ):
@@ -1956,15 +1968,18 @@ class F3D_ExportDL(bpy.types.Operator):
19561968 # Called on demand (i.e. button press, menu item)
19571969 # Can also be called from operator search menu (Spacebar)
19581970 def execute (self , context ):
1971+ self .report ({"INFO" }, "F3D_ExportDL 0" )
19591972 if context .mode != "OBJECT" :
19601973 bpy .ops .object .mode_set (mode = "OBJECT" )
19611974 try :
19621975 allObjs = context .selected_objects
19631976 if len (allObjs ) == 0 :
19641977 raise PluginError ("No objects selected." )
1978+ self .report ({"INFO" }, "F3D_ExportDL 1" )
19651979 obj = context .selected_objects [0 ]
19661980 if obj .type != "MESH" :
19671981 raise PluginError ("Object is not a mesh." )
1982+ self .report ({"INFO" }, "F3D_ExportDL 2" )
19681983
19691984 scaleValue = bpy .context .scene .blenderF3DScale
19701985 finalTransform = mathutils .Matrix .Diagonal (mathutils .Vector ((scaleValue , scaleValue , scaleValue ))).to_4x4 ()
@@ -1973,9 +1988,12 @@ def execute(self, context):
19731988 raisePluginError (self , e )
19741989 return {"CANCELLED" }
19751990
1991+ self .report ({"INFO" }, "F3D_ExportDL 3" )
1992+
19761993 try :
19771994 applyRotation ([obj ], math .radians (90 ), "X" )
19781995
1996+ self .report ({"INFO" }, "F3D_ExportDL 4" )
19791997 exportPath = bpy .path .abspath (context .scene .DLExportPath )
19801998 dlFormat = DLFormat .Static if context .scene .DLExportisStatic else DLFormat .Dynamic
19811999 texDir = bpy .context .scene .DLTexDir
@@ -1984,8 +2002,10 @@ def execute(self, context):
19842002 separateTexDef = bpy .context .scene .DLSeparateTextureDef
19852003 DLName = bpy .context .scene .DLName
19862004 matWriteMethod = getWriteMethodFromEnum (context .scene .matWriteMethod )
2005+ self .report ({"INFO" }, "F3D_ExportDL 5" )
19872006
19882007 if bpy .context .scene .fast64 .oot .featureSet == "SoH" :
2008+ self .report ({"INFO" }, "F3D_ExportDL 6" )
19892009 exportF3DtoXML (
19902010 exportPath ,
19912011 obj ,
@@ -1997,7 +2017,9 @@ def execute(self, context):
19972017 separateTexDef ,
19982018 DLName ,
19992019 matWriteMethod ,
2020+ self .report
20002021 )
2022+ self .report ({"INFO" }, "F3D_ExportDL 7" )
20012023 else :
20022024 exportF3DtoC (
20032025 exportPath ,
0 commit comments