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

Referenced shader attributes issue #3214

Merged
merged 3 commits into from
Jul 11, 2023

Conversation

tryptik
Copy link

@tryptik tryptik commented Jul 10, 2023

When exporting file nodes from Maya to Usd and the file node is referenced, the export code does not recognize that the Maya attributes for scale/bias are not set properly despite these values being correct in the referenced Maya scene. This seems to be because the exporting code is using MPlug::getSetAttrCmds and checking the result to see if it is empty to determine if the values need to be written.

This P/R checks the Dependency node to see if it is from a referenced file, then uses MPlug::isDefaultValue to determine if the plug values need to be authored on the exported Usd data.

Note:
In my past testing, Plug::isDefaultValue seemed unreliable, and I suspect it remains so based on the code using MPlug::getSetAttrCmds, so if there is a better approach, please advise.

MPlug::isFromReferencedFile does not seem to work, which is why MFnDependencyNode::isFromReferencedFile is used.

Note
This was migrated from a previous P/R that had to be removed - Check if node is referenced - use default value to detect change #2917.

@tryptik
Copy link
Author

tryptik commented Jul 10, 2023

This change was approved in P/R #2917 and it was recommended that I create a new P/R and will delete the other one.

@pierrebai-adsk
Copy link
Collaborator

I noticed too late that this branch is far behind our dev branch. If the build passes, I'll merge dev into your branch and build again if you don't mind so that we're sure it build properly with the latest dev branch code.

@pierrebai-adsk pierrebai-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Jul 10, 2023
@seando-adsk seando-adsk added the import-export Related to Import and/or Export label Jul 11, 2023
@seando-adsk seando-adsk merged commit e4642c2 into Autodesk:dev Jul 11, 2023
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