niacdoial / blemd

BMD importer for blender (BDL format also partially supported)
GNU General Public License v3.0
32 stars 12 forks source link

Error: Unable to add strip (the track does not have any space to accommodate this new strip) (SMG2 Model) #79

Open Gabbo089 opened 11 months ago

Gabbo089 commented 11 months ago

(Blender 3.4) The add-on doesn't properly load the .bck files on an original .bdl mario file from Super Mario Galaxy when the model is imported. The model does load when the file is loaded alone, but when it's not it throws this error: Senza nome

(sytem console)


C:\Users\ur mum\Desktop\Mario\bmd\Mario.bdl
2023-09-16 23:10:15,851    DEBUG bpy.ops.import_mesh.bmd.main Started import section: Load
INF 1
VTX 1
2023-09-16 23:10:15,862     INFO bpy.ops.import_mesh.bmd.vtx1 length of normal coordinates (8224) is not //3
EVP 1
DRW 1
JNT 1
2023-09-16 23:10:15,874  WARNING bpy.ops.import_mesh.bmd.jnt1 Joint has zero scaling by default: corecting to 1 (mesh aspect may be weird)
SHP 1
MAT 3
off[1](raw): 20 vs 9
off[4]: 3.0
off[5]: 1.0 (4)
off[6]: 4 (1)
off[7]: 5.0 (8)
off[8]: 2.0 (4)
off[0](raw): 2324 vs 7
off[3]: 9.0 (312)
off[10]: 4 (1)
off[11]: 2.0 (4)
off[12]: 0.0 (4)
off[13]: 5.0 (100)
off[15]: 8.0 (2)
MDL 3
TEX 1
2023-09-16 23:10:15,919    DEBUG bpy.ops.import_mesh.bmd.main ExtractImages function called
2023-09-16 23:10:15,919    DEBUG bpy.ops.import_mesh.bmd.main Started import section: DrawScene
2023-09-16 23:10:15,920    DEBUG bpy.ops.import_mesh.bmd.main frame node created
2023-09-16 23:10:15,920    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:15,920    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:15,921  WARNING bpy.ops.import_mesh.bmd.matpipeline Texture uses nativs matrix. Plz implement
2023-09-16 23:10:15,927    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,012    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,012    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,013    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,013    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,013    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,013    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,014    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,014    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,014    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,015    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,015    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,015    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,015    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,016    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,016    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,017  WARNING bpy.ops.import_mesh.bmd.matpipeline Texture uses nativs matrix. Plz implement
2023-09-16 23:10:16,020    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,053    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,054  WARNING bpy.ops.import_mesh.bmd.matpipeline Texture uses nativs matrix. Plz implement
2023-09-16 23:10:16,058    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,100    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,100    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,101    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,105    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,116    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,126  WARNING bpy.ops.import_mesh.bmd.matpipeline Texture uses nativs matrix. Plz implement
2023-09-16 23:10:16,130    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,133    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,133  WARNING bpy.ops.import_mesh.bmd.matpipeline Texture uses nativs matrix. Plz implement
2023-09-16 23:10:16,137    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,140    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,141    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,141    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,145    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,269    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,269    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,270    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,270    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,270    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,271    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,271  WARNING bpy.ops.import_mesh.bmd.matpipeline Texture uses nativs matrix. Plz implement
2023-09-16 23:10:16,275    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,322    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,322    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,322    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,322    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,323    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,323    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,324  WARNING bpy.ops.import_mesh.bmd.matpipeline Texture uses nativs matrix. Plz implement
2023-09-16 23:10:16,327    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,375    DEBUG bpy.ops.import_mesh.bmd.main Started imprort section: DrawScenegraph
2023-09-16 23:10:16,376    DEBUG bpy.ops.import_mesh.bmd.main Started import section: BuildSingleMesh
2023-09-16 23:10:16,434    DEBUG bpy.ops.import_mesh.bmd.main Started import section: animations
2023-09-16 23:10:16,742    ERROR bpy.ops.import_mesh.bmd.main animation file doesn't apply as expected (error is -inf)
2023-09-16 23:10:16,974    ERROR bpy.ops.import_mesh.bmd.main animation file doesn't apply as expected (error is -inf)
2023-09-16 23:10:17,016    ERROR bpy.ops.import_mesh.bmd.main animation file doesn't apply as expected (error is -inf)
2023-09-16 23:10:17,070 CRITICAL bpy.ops.import_mesh.bmd An error happened. If it wasn't reported before, here it is: NlaStrips.new(): error with argument 2, "start" -  Function.start expected an int type, not float
Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons_contrib\blemd\BModel.py", line 856, in LoadAnimations
    track.strips.new(bckFileName+'_strip', startFrame, action)
RuntimeError: Error: Unable to add strip (the track does not have any space to accommodate this new strip)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons_contrib\blemd\__init__.py", line 223, in execute
    temp.Import(fname, **{x: getattr(self, x) for x in self.ALL_PARAMS})
  File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons_contrib\blemd\BModel.py", line 1027, in Import
    self.DrawScene()
  File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons_contrib\blemd\BModel.py", line 795, in DrawScene
    self.LoadAnimations()
  File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons_contrib\blemd\BModel.py", line 862, in LoadAnimations
    corrupted_action_track.strips.new('action', track.strips[-1].frame_start,
TypeError: NlaStrips.new(): error with argument 2, "start" -  Function.start expected an int type, not float```
niacdoial commented 7 months ago

sorry for the very long wait...

I didn't get to fix the 'actual' issues (the "error is -inf" one and the "track does not have any space" ones) just yet, but I fixed the workarounds (that were there but broken, oops) so now the code should be capable of recovering from those errors and displaying /some/ useful output. and display more useful logging from the errors it recovered from.

I'm also almost sure this issue is about the same problems as #78, but do tell me if I'm wrong.