Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to convert to USDZ . But USDA works #167

Open
FaiyazMdAbdul opened this issue Jul 3, 2019 · 1 comment
Open

Unable to convert to USDZ . But USDA works #167

FaiyazMdAbdul opened this issue Jul 3, 2019 · 1 comment

Comments

@FaiyazMdAbdul
Copy link

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
Copy link

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

gltf2usd/Source/gltf2usd.py

Lines 872 to 887 in 34fdd28

success = check_usd_compliance(resolved_asset, arkit=args.arkit)
with Ar.ResolverContextBinder(context):
if arkit and not success:
usd.logger.warning('USD is not ARKit compliant')
return
success = UsdUtils.CreateNewUsdzPackage(resolved_asset, temp_usd_file) and success
if success:
shutil.copyfile(temp_usd_file, usd_file)
usd.logger.info('created package {} with contents:'.format(usd_file))
zip_file = Usd.ZipFile.Open(usd_file)
file_names = zip_file.GetFileNames()
for file_name in file_names:
usd.logger.info('\t{}'.format(file_name))
else:
usd.logger.error('could not create {}'.format(usd_file))

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants