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

MAYA-128779 - Improvements for surface shader querying and handling #3008

Merged

Conversation

gz-adsk
Copy link

@gz-adsk gz-adsk commented Apr 5, 2023

  • Utility function UsdMayaUtil::GetSurfaceShaderNodeDefs() for getting vetted surfaces as well as those with "shader/surface" role (adds afew arnold ones, potentially more)
  • UsdShaderNodeDef::definitions can now be queried for surface definitions only in order to access them through UFE
  • UsdShaderNodeDef::createNodeCmd will implicitly create a material if given a valid material scope
  • UsdUndoAddNewMaterialCommand will only attempt to connect surface nodes to material output
  • UI specific string requirements have been pushed to UsdMayaUtil::prettifyName for consistency

@gz-adsk gz-adsk force-pushed the gz-adsk/MAYA-128779/surface-shader-querying-and-handling branch from d056126 to ded6ad2 Compare April 5, 2023 14:54
- Utility function UsdMayaUtil::GetSurfaceShaderNodeDefs() for getting vetted surfaces as well as those with "shader/surface" role (adds afew arnold ones, potentially more)
- UsdShaderNodeDef::definitions can now be queried for surface definitions only in order to access them through UFE
- UsdShaderNodeDef::createNodeCmd will implicitly create a material if given a valid material scope
- UsdUndoAddNewMaterialCommand will only attempt to connect surface nodes to material output
- UI specific string requirements have been pushed to UsdMayaUtil::prettifyName for consistency
@gz-adsk gz-adsk force-pushed the gz-adsk/MAYA-128779/surface-shader-querying-and-handling branch from ded6ad2 to 5a2e1dc Compare April 5, 2023 14:58
Copy link
Collaborator

@frohnej-adsk frohnej-adsk left a comment

Choose a reason for hiding this comment

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

LGTM

== UsdUndoAssignNewMaterialCommand::resolvedMaterialScopeName()) {
return UsdUndoAddNewMaterialCommand::create(
parentItem, fShaderNodeDef->GetIdentifier());
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

[Note] This implicit material creation can probably be removed again in the future. There is a UFE interface for material creation in the works and once it's done, it should be able to take care of this.

@gz-adsk gz-adsk requested a review from vlasovi April 10, 2023 15:13
@gz-adsk gz-adsk added ufe-usd Related to UFE-USD plugin in Maya-Usd ready-for-merge Development process is finished, PR is ready for merge materials labels Apr 11, 2023
@gz-adsk gz-adsk removed the request for review from seando-adsk April 12, 2023 09:02
@seando-adsk seando-adsk merged commit 2549c87 into dev Apr 17, 2023
@seando-adsk seando-adsk deleted the gz-adsk/MAYA-128779/surface-shader-querying-and-handling branch April 17, 2023 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
materials ready-for-merge Development process is finished, PR is ready for merge ufe-usd Related to UFE-USD plugin in Maya-Usd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants