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: Apply initial viewport shader for Redshift Proxy after loading #6102

Merged

Conversation

moonyuet
Copy link
Member

@moonyuet moonyuet commented Jan 4, 2024

Changelog Description

When the published redshift proxy is being loaded, the shader of the proxy is missing. This is different from the manual load through creating redshift proxy for files. This PR is to assign the default lambert to the redshift proxy, which replicates the same approach when the user manually loads the proxy with filepath.

Additional info

If there is a way of which we should get attributes of proxy materials in redshift proxy mesh, some conditions can be set up for assigning the shader if it exists in the scene.

Testing notes:

  1. Launch Maya via launcher
  2. Load redshift proxy
  3. The shader of the redshift proxy is no longer in green (i.e. with no shader)

@ynbot
Copy link
Contributor

ynbot commented Jan 4, 2024

@ynbot ynbot added type: enhancement Enhancements to existing functionality host: Maya size/XS Denotes a PR changes 0-99 lines, ignoring general files labels Jan 4, 2024
@moonyuet moonyuet requested a review from BigRoy January 8, 2024 09:08
Copy link
Collaborator

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

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

This makes sense, by default a mesh created with cmds.createNode("mesh") does not have a shader assigned. With this added logic it will now get the lambert1 (or standardSurface1) assigned depending on which is the configured initial shading group.

Didn't test, but looks good to me.

@antirotor antirotor merged commit 0746a04 into develop Jan 8, 2024
27 checks passed
@antirotor antirotor deleted the enhancement/OP-6655_Maya-redshift-proxy-viewport-shader branch January 8, 2024 12:04
@ynbot ynbot added this to the next-patch milestone Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
host: Maya size/XS Denotes a PR changes 0-99 lines, ignoring general files target: AYON target: OpenPype type: enhancement Enhancements to existing functionality
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants