Add multioutput type check in getShaderNodes#2760
Merged
jstone-lucasfilm merged 4 commits intoAcademySoftwareFoundation:mainfrom Jan 30, 2026
Merged
Add multioutput type check in getShaderNodes#2760jstone-lucasfilm merged 4 commits intoAcademySoftwareFoundation:mainfrom
getShaderNodes#2760jstone-lucasfilm merged 4 commits intoAcademySoftwareFoundation:mainfrom
Conversation
jstone-lucasfilm
approved these changes
Jan 29, 2026
Member
jstone-lucasfilm
left a comment
There was a problem hiding this comment.
This looks like a good improvement to me, @xipaja! I'll give others a chance to weigh in as well, but I'd have no objections to including this in MaterialXCore.
getShaderNodes
getShaderNodesgetShaderNodes
83db613
into
AcademySoftwareFoundation:main
33 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes #2529
This issue stems from validation that the Shader node’s output type matches the Material node’s input type. It doesn't note a multioutput node as a matching type and returns an empty shaderNodes vector to the Graph Editor. It never creates a Material due to not receiving shaderNodes, leading to the empty Render View in the Editor. This then leads to a lack of renderable elements in the Viewer.
This change will check available activeOutputs for multiOutput nodes to ensure at least one active output is compatible with the input of the Material node (for example, surfaceshader to surfaceshader). It will maintain the previous behavior otherwise.
Tested with the test files from the original issue: