Five-Damned-Dollarz / io_scene_lithtech

Based off of io_scene_abc by @cmbasnett
GNU General Public License v2.0
5 stars 2 forks source link

PS2 Model direct ltb to lta conversion - UnboundLocalError: local variable 'lod' referenced before assignment #4

Open StenApp opened 1 month ago

StenApp commented 1 month ago

Python: Traceback (most recent call last): File "C:\Users\Sten\Downloads\blender-2.93.18-windows-x64\2.93\scripts\addons\Lithtech\converter.py", line 41, in execute model = PS2LTBModelReader().from_file(self.filepath) File "C:\Users\Sten\Downloads\blender-2.93.18-windows-x64\2.93\scripts\addons\Lithtech\reader_ltb_ps2.py", line 911, in from_file print("Final verticies ", len(lod.vertices)) UnboundLocalError: local variable 'lod' referenced before assignment

location: :-1 inthero_action.ltb.txt

I like to convert the inthero.ltb model but get the above error. What does the tool want?

Five-Damned-Dollarz commented 1 month ago

Incorrect scoping, should be fixed with the latest commit

StenApp commented 1 month ago

I updated the addonfiles in my Blender and tried, Modeledit shows no model. Blender console shows this:


LithTech LTB (PS2) Model Reader Loading ltb version 16

New Piece! HACK: Looking for Vector3 of 0.8f Could not find Vector3 of 0.8f, reached end of file. Processing Animation_0

image

Model hero_thief.ltb works, but has the distorted view when clicking on ConvertedfromPS2 animation