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

support for UV mirroring on UsdUVTexture #1132

Merged
merged 2 commits into from
Feb 2, 2021

Conversation

pmolodo
Copy link
Contributor

@pmolodo pmolodo commented Jan 29, 2021

...when exporting / importing.

Also does a bit of code unification for U+V cases

@kxl-adsk kxl-adsk added the import-export Related to Import and/or Export label Jan 30, 2021
@JGamache-autodesk
Copy link
Collaborator

The Windows build has failed:
maya-usd\lib\usd\translators\shading\usdFileTextureWriter.cpp(445): error C4576: a parenthesized type followed by an initializer list is a non-standard explicit type conversion syntax
maya-usd\lib\usd\translators\shading\usdFileTextureWriter.cpp(445): fatal error C1001: An internal error has occurred in the compiler.
It was nice to see this elegant initializer syntax in the loops, but it seems VS does not understand it.

Copy link

@kxl-adsk kxl-adsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I commented in one place where PF caught error - please check logs if you need more details.

BTW. We still have issues with some windows nodes, so apologies for the inconvenience.

val = wrapT == _tokens->repeat;
UsdMayaReadUtil::SetMayaAttr(mayaAttr, val);
// Wrap U/V
for (auto wrapMirrorTriple :
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are still having trouble with windows nodes, but in this case PF actually found something real.

S:\jenkins\workspace\ecg-mayausd-branch-preflight-2020-windows\ecg-maya-usd\maya-usd\lib\usd\translators\shading\usdUVTextureReader.cpp(316): error C4576: a parenthesized type followed by an initializer list is a non-standard explicit type conversion syntax

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, sorry about that. I guess the initializer syntax I used was not strict c++11, but a gcc extension:

(const TfToken[2][3]){ ... }

I just ended up declaring a variable to hold the array. Alternatively, I could apparently have declared a type alias, since it seems that

T{ ... }

is valid, but only if T is a "simple-type-specifier". So I could have done:

using Token23 = const TfToken[2][3];
for (auto wrapMirrorTriple : Token23{ ... }) {

...but I decided at that point it was just simpler to make the variable...

(Thanks to this post for the info about simple-type-specifiers: https://stackoverflow.com/a/24390563/920545)

apparently `(const TfToken[2][3]){ ... }` syntax is not c++11 legal, but a
gcc extension
@kxl-adsk kxl-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Feb 2, 2021
@kxl-adsk kxl-adsk merged commit c6de9e9 into Autodesk:dev Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
import-export Related to Import and/or Export ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants