kcoley / gltf2usd

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

Wrong texture lookup - PbrMetallicRoughness class uses index of texture to lookup image #142

Closed jclarkk closed 5 years ago

jclarkk commented 5 years ago

wrong_lookup.zip Hey,

In the attached example it seems like the code in Material.py is using the index here: Material[6]['pbrMetallicRoughness']['baseColorTexture']['index']

To find the image which leads to an error since the index should be used to find the texture object in 'textures'.

kcoley commented 5 years ago

@jclarkk good catch, I'll work on a fix for this

kcoley commented 5 years ago

@jclarkk just merged a fix for this: https://github.com/kcoley/gltf2usd/pull/143

jclarkk commented 5 years ago

Great, thanks!