kcoley / gltf2usd

command-line utility for converting glTF 2.0 models to USD
MIT License
263 stars 39 forks source link

Python3.7 upgrading and TypeError: TypeError: can't multiply sequence by non-int of type 'float' #191

Open felipe-dap opened 3 years ago

felipe-dap commented 3 years ago

Cheers everyone and thanks for the effort on making this available for everyone. Since I needed to run it on Python 3.7 I had to adjust a few things.

  1. Adjusting relative imports,

  2. Class Node from gtfl2 Line 11 -> unicode has to be changed to str for Python 3.

  3. Class Skin from gtfl2 Remove import Set from sets, as it is built-in for Python 3. change Set to set on the file, whenever it has called. If I remember it correctly, it was called just once.

  4. gltf2usd.py On line 396 I had to force indices length/3 to return an integer as follows. num_faces = int(len(indices)/3)

Otherwise I ran into this: Traceback (most recent call last): File "gltf2usd.py", line 924, in

With this simple changes I could manage to make it work effortless. Leaving this remarks in case someone needs it. =) Mantainers can close this issue. This is just in case someone runs into this as well and need some guidance. Thanks once again for the amazing work here.