kcoley / gltf2usd

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

Unable to convert to USDZ . But USDA works #167

Open FaiyazMdAbdul opened 5 years ago

FaiyazMdAbdul commented 5 years ago

I am able to create usda file. But usdz fails. I have attached screenshot of error

usdzproblem

Windows 10
Python 2.7.16
USD installed and built
dafergu2 commented 4 years ago

@FaiyazMdAbdul I believe this is due to an AR check that executes, even if the switch isn't specified.

https://github.com/kcoley/gltf2usd/blob/34fdd288f3b12cbf8bbe32a7ea134cd44249f3e9/Source/gltf2usd.py#L872-L887

Line 872 runs a compliance check against ARKit. If it fails, success is now false. The script then checks to see if the AR check has been specified and returns if it has and the compliance check failed. And right after that, the usdz package is created and success is determined based on the return of that method and the current value of success. In the case of the AR kit validation failure, the current value of success is false thus resulting in the script assuming the usdz package creation failed when it actually didn't.

The temporary fix is to remove and success from line 878. I still have a problem with the temporary directory not being cleaned up properly, though.