Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Maya: Apply initial viewport shader for Redshift Proxy after loading#6102

Merged
antirotor merged 7 commits intodevelopfrom
enhancement/OP-6655_Maya-redshift-proxy-viewport-shader
Jan 8, 2024
Merged

Maya: Apply initial viewport shader for Redshift Proxy after loading#6102
antirotor merged 7 commits intodevelopfrom
enhancement/OP-6655_Maya-redshift-proxy-viewport-shader

Conversation

@moonyuet
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

5 participants