Page MenuHome

gltf2 import: TypeError: '>=' not supported between instances of 'tuple' and 'int'
Closed, ResolvedPublic

Description

System Information
Operating system: Windows 10
Graphics card: NVIDIA GeForce RTX 2080 Ti FE (x2)

Blender Version
Broken: 2.80 337eb8c1de4c
Worked: N/A

Short description of error
Importing glTF 2.0 file results in an error in gltf2_blender_mesh.py on line 135:
TypeError: '>=' not supported between instances of 'tuple' and 'int'

Exact steps for others to reproduce the error
I simply tried to import a glTF file that I exported from VRoidStudio.

I fixed it locally...
I noticed a nested 'for' loop around line 149 in gltf2_blender_mesh.py using the same variable 'i' as in the outer loop, and this 'i' appears to be clobbering the existing 'i'. Changing this inner loop to a different variable, like 'ind' (for index), resolved the error. (The mesh and armature doesn't load well, but it loads.)

I renamed the VRM file to GLB and zipped it here, so you can perform the same test:

Details

Type
Bug

Event Timeline

Brian Jared (bjared) updated the task description. (Show Details)

Are sure about this? I haven't had time to test the glTF import, but the actual error from line 135 surely can't be fixed by editing code that happens after it. Also I don't see a nested loop in 149 where i would be shadowed. Can you submit a patch/diff? This is probably easier to discuss.

Julien DUROURE (julien) triaged this task as Needs Information from User priority.Apr 5 2019, 12:24 PM

Can you please try with a more recent build.
This should already been fixed few days ago.

Hi, Julien. I just downloaded the WIndows 64-bit build (d140e597a6a8), and it works.

I see on line 112 of gltf2_blender_mesh.py, the outer loop's iterator was changed from 'i' to 'sk' which is why that error no longer appears.

I should have checked for a newer build before posting. My apologies, and thank you for looking into this so quickly.

Brecht Van Lommel (brecht) closed this task as Resolved.Apr 5 2019, 6:11 PM