google / usd_from_gltf

Apache License 2.0
547 stars 85 forks source link

Error compiling against USD 21.05 #80

Open DavidArayan opened 3 years ago

DavidArayan commented 3 years ago

Hello,

We are trying to compile this tool against USD version 21.05 and getting the following errors. It looks like some API changes have been made.

Screen Shot 2021-06-10 at 12 02 45 pm

We have attempted to build using both of these commands, leading to the same error

python3 ufgsrc/tools/ufginstall/ufginstall.py ufg ${USD_BUILD_PATH}

and

python ufgsrc/tools/ufginstall/ufginstall.py ufg ${USD_BUILD_PATH}

we have both python-dev and python3-dev also installed.

Any help is much appreciated, thank you!

Maeroplane commented 3 years ago

I get the exact same error with the attempt below

python {UFG_SRC}/tools/ufginstall/ufginstall.py {UFG_BUILD} {USD} --testdata

Any help is also much appreciated :)

florihupf commented 3 years ago

Looks like those calls need to be replaced with pbr_shader->GetPath().AppendProperty(kTokSurface) as needed. I think there are half a dozen in total.

ElGuardianDelJardin commented 3 years ago

what said @florihupf worked for me, even tough i had to use . notation for most of the calls pbr_shader.GetPath().AppendProperty(kTokSurface)

it built, but when I try to convert files, it gives me an error: ERROR: USD: Failed connecting shading attribute </USDZ/Materials/Material.outputs:surface> to attribute surface on prim /USDZ/Materials/Material/pbr_shader. The given source information is not valid (ConnectToSource) [UFG_ERROR_USD]

omerts commented 3 years ago

For every place using *.ConnectToSource(a, b) chain .ConnectableAPI() to param a. For example, from:

in.ConnectToSource(tex, connect_tok);

To:

in.ConnectToSource(tex.ConnectableAPI(), connect_tok);

Creating a PR for this

EDIT: PR Created you can also view the needed changes there

DreamEmulator commented 3 years ago

+1