Skip to content

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

Description

@felipe-dap

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
- irrelevant part -
face_count = [3] * num_faces
TypeError: can't multiply sequence by non-int of type 'float'

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions