Skip to content

Commit

Permalink
Removing extra value attributes form nodgraphs inputs (#1405)
Browse files Browse the repository at this point in the history
This fix was already done for the protein graphs, after an issue with LookdevX discovered it.

The MaterialX team made some changes to avoid double "value" and "interfacename" (or "nodename")  to the Graph Editor and added a sanity check on load.

Loading the Prism documents in 1.39 now throws a bunch of warnings. This fix removes all the extra "value" attributes and no warnings are generated any more.
  • Loading branch information
zicher3d authored Oct 9, 2024
1 parent 8c9747a commit df6d2f8
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 68 deletions.
42 changes: 21 additions & 21 deletions contrib/adsk/libraries/adsklib/adsk_colorcorrect.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -29,45 +29,45 @@
<nodegraph name="NG_colorcorrect" nodedef="adsk:ND_colorcorrect" namespace="adsk">
<range name="AlphaClampAndGamma" type="float">
<input name="in" type="float" nodename="AlphaOffset" />
<input name="gamma" type="float" value="1" interfacename="alpha_gamma" />
<input name="doclamp" type="boolean" value="false" interfacename="clamp_alpha" />
<input name="inlow" type="float" value="0.0" interfacename="min_alpha" />
<input name="inhigh" type="float" value="1.0" interfacename="max_alpha" />
<input name="outlow" type="float" value="0.0" interfacename="min_alpha" />
<input name="outhigh" type="float" value="1.0" interfacename="max_alpha" />
<input name="gamma" type="float" interfacename="alpha_gamma" />
<input name="doclamp" type="boolean" interfacename="clamp_alpha" />
<input name="inlow" type="float" interfacename="min_alpha" />
<input name="inhigh" type="float" interfacename="max_alpha" />
<input name="outlow" type="float" interfacename="min_alpha" />
<input name="outhigh" type="float" interfacename="max_alpha" />
</range>
<multiply name="AlphaGain" type="float">
<input name="in1" type="float" nodename="extractAlphaForGain" />
<input name="in2" type="float" value="1.0" interfacename="alpha_gain" />
<input name="in2" type="float" interfacename="alpha_gain" />
</multiply>
<add name="AlphaOffset" type="float">
<input name="in1" type="float" nodename="AlphaGain" />
<input name="in2" type="float" value="0.0" interfacename="alpha_offset" />
<input name="in2" type="float" interfacename="alpha_offset" />
</add>
<range name="ColorClampAndGamma" type="color3">
<input name="in" type="color3" nodename="ColorOffset" />
<input name="gamma" type="color3" value="1, 1, 1" interfacename="color_gamma" />
<input name="inlow" type="color3" value="0.0, 0.0, 0.0" interfacename="min_color" />
<input name="inhigh" type="color3" value="1.0, 1.0, 1.0" interfacename="max_color" />
<input name="outlow" type="color3" value="0.0, 0.0, 0.0" interfacename="min_color" />
<input name="outhigh" type="color3" value="1.0, 1.0, 1.0" interfacename="max_color" />
<input name="doclamp" type="boolean" value="false" interfacename="clamp_color" />
<input name="gamma" type="color3" interfacename="color_gamma" />
<input name="inlow" type="color3" interfacename="min_color" />
<input name="inhigh" type="color3" interfacename="max_color" />
<input name="outlow" type="color3" interfacename="min_color" />
<input name="outhigh" type="color3" interfacename="max_color" />
<input name="doclamp" type="boolean" interfacename="clamp_color" />
</range>
<multiply name="ColorGain" type="color3">
<input name="in1" type="color3" nodename="HSV_adjust" />
<input name="in2" type="color3" value="1.0, 1.0, 1.0" interfacename="color_gain" />
<input name="in2" type="color3" interfacename="color_gain" />
</multiply>
<add name="ColorOffset" type="color3">
<input name="in1" type="color3" nodename="ColorGain" />
<input name="in2" type="color3" value="0.0, 0.0, 0.0" interfacename="color_offset" />
<input name="in2" type="color3" interfacename="color_offset" />
</add>
<combine2 name="CombineColorAlpha" type="color4">
<input name="in1" type="color3" nodename="ColorClampAndGamma" />
<input name="in2" type="float" nodename="AlphaClampAndGamma" />
</combine2>
<hsvadjust name="HSV_adjust" type="color3">
<input name="in" type="color3" nodename="extractColorForHsv" />
<input name="amount" type="vector3" value="0.0, 1.0, 1.0" interfacename="HSV" />
<input name="amount" type="vector3" interfacename="HSV" />
</hsvadjust>
<premult name="premultiplyColor" type="color4">
<input name="in" type="color4" nodename="combineInput" />
Expand All @@ -76,7 +76,7 @@
<input name="value2" type="boolean" value="true" />
<input name="in1" type="color4" nodename="premultiplyColor" />
<input name="in2" type="color4" nodename="combineInput" />
<input name="value1" type="boolean" value="false" interfacename="premultiply_input" />
<input name="value1" type="boolean" interfacename="premultiply_input" />
</ifequal>
<unpremult name="unpremultiply" type="color4">
<input name="in" type="color4" nodename="CombineColorAlpha" />
Expand All @@ -85,7 +85,7 @@
<input name="value2" type="boolean" value="true" />
<input name="in1" type="color4" nodename="unpremultiply" />
<input name="in2" type="color4" nodename="CombineColorAlpha" />
<input name="value1" type="boolean" value="false" interfacename="unpremultiply_input" />
<input name="value1" type="boolean" interfacename="unpremultiply_input" />
</ifequal>
<swizzle name="outputColor" type="color3">
<input name="in" type="color4" nodename="if_unpremultiply_condition" />
Expand All @@ -104,8 +104,8 @@
<input name="channels" type="string" value="a" />
</swizzle>
<combine2 name="combineInput" type="color4">
<input name="in1" type="color3" value="0.5, 0.5, 0.5" interfacename="color" />
<input name="in2" type="float" value="1" interfacename="alpha" />
<input name="in1" type="color3" interfacename="color" />
<input name="in2" type="float" interfacename="alpha" />
</combine2>
<output name="outColor" type="color3" nodename="outputColor" />
<output name="outAlpha" type="float" nodename="outputAlpha" />
Expand Down
Loading

0 comments on commit df6d2f8

Please sign in to comment.