Add checking for implicit outputs on multioutput nodes on load #85
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.
Issue
A node may not have all of it's outputs explicitly specified. If an output connection is specified on a MaterialX node and
the output is not found on the upstream node then a connection will not be made. This affects load.
If you create a node and make a connection then this will not occur since the qx_node populates itself with all the required outputs from the node definition.
Change
To perform the same action on the mx_node as the qx_node, some additional logic has been added to add input any missing outputs. This is for now only for
multioutput
nodes as this appears to be the failing case. Note that this does not add any additional information not already added on save from the qx_node.Test
This is an example glTF imported material. In this case
gltf_colorimage
does not have it's outputs specified so will fail connection before this change.This is a snapshot after the fix (with the appropriate
base_color
connection being made.