Skip to content

Commit c03623d

Browse files
committed
Updating template files to handle nodes that were missed
1 parent b97f703 commit c03623d

File tree

1 file changed

+21
-35
lines changed

1 file changed

+21
-35
lines changed

templates/stdlib/stdlib_defs.mtlx

Lines changed: 21 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,31 +1708,20 @@
17081708
Combines various adjustment nodes into one, artist-friendly color correction node.
17091709
The color4 signature does not touch the alpha channel.
17101710
-->
1711-
<nodedef name="ND_colorcorrect_color3" node="colorcorrect" nodegroup="adjustment">
1712-
<input name="in" type="color3" uiname="Input Color" value="1.0, 1.0, 1.0" doc="The input color to be adjusted." spec_desc="The input color stream"/>
1713-
<input name="hue" type="float" uiname="Hue" uisoftmin="0.0" uisoftmax="1.0" value="0" doc="Rotates the color hue, with values wrapping at 0-1 boundaries." spec_desc="Rotates the color hue" />
1714-
<input name="saturation" type="float" uiname="Saturation" uisoftmin="0.0" uisoftmax="1.0" value="1" doc="Adjusts the input color saturation level." spec_desc="Multiplies the input color saturation level" />
1715-
<input name="gamma" type="float" uiname="Gamma" uisoftmin="0.0" uisoftmax="3.0" value="1" doc="Applies a gamma correction to the color." spec_desc="Applies a gamma correction to the color" />
1716-
<input name="lift" type="float" uiname="Lift" uisoftmin="0.0" uisoftmax="1.0" value="0" doc="Raise the dark color values, leaving the white values unchanged." spec_desc="Raises the dark color values, leaving the white values unchanged" />
1717-
<input name="gain" type="float" uiname="Gain" uisoftmin="0.0" uisoftmax="1.0" value="1" doc="Multiplier increases lighter color values, leaving black values unchanged." spec_desc="Multiplier increases lighter color values, leaving black values unchanged" />
1718-
<input name="contrast" type="float" uiname="Contrast" uisoftmin="0.0" uisoftmax="1.0" value="1" doc="Linearly increase or decrease the color contrast." spec_desc="Linearly increase or decrease the color contrast" />
1719-
<input name="contrastpivot" type="float" uiname="Contrast Pivot" uisoftmin="0.0" uisoftmax="1.0" value="0.5" doc="Pivot value around which contrast applies. This value will not change as contrast is adjusted." spec_desc="Pivot value around which contrast applies"/>
1720-
<input name="exposure" type="float" uiname="Exposure" uisoftmin="-1.0" uisoftmax="1.0" value="0" doc="Multiplier which increases or decreases color brightness by 2^value." spec_desc="Logarithmic brightness multiplier as 2^`exposure`" />
1721-
<output name="out" type="color3" spec_desc="the color-corrected value" />
1722-
</nodedef>
1723-
<nodedef name="ND_colorcorrect_color4" node="colorcorrect" nodegroup="adjustment">
1724-
<input name="in" type="color4" uiname="Input Color" value="1.0, 1.0, 1.0, 0.0" doc="The input color to be adjusted." spec_desc="The input color stream"/>
1725-
<input name="hue" type="float" uiname="Hue" uisoftmin="0.0" uisoftmax="1.0" value="0" doc="Rotates the color hue, with values wrapping at 0-1 boundaries." spec_desc="Rotates the color hue" />
1726-
<input name="saturation" type="float" uiname="Saturation" uisoftmin="0.0" uisoftmax="1.0" value="1" doc="Adjusts the input color saturation level." spec_desc="Multiplies the input color saturation level" />
1727-
<input name="gamma" type="float" uiname="Gamma" uisoftmin="0.0" uisoftmax="3.0" value="1" doc="Applies a gamma correction to the color." spec_desc="Applies a gamma correction to the color" />
1728-
<input name="lift" type="float" uiname="Lift" uisoftmin="0.0" uisoftmax="1.0" value="0" doc="Raise the dark color values, leaving the white values unchanged." spec_desc="Raises the dark color values, leaving the white values unchanged" />
1729-
<input name="gain" type="float" uiname="Gain" uisoftmin="0.0" uisoftmax="1.0" value="1" doc="Multiplier increases lighter color values, leaving black values unchanged." spec_desc="Multiplier increases lighter color values, leaving black values unchanged" />
1730-
<input name="contrast" type="float" uiname="Contrast" uisoftmin="0.0" uisoftmax="1.0" value="1" doc="Linearly increase or decrease the color contrast." spec_desc="Linearly increase or decrease the color contrast" />
1731-
<input name="contrastpivot" type="float" uiname="Contrast Pivot" uisoftmin="0.0" uisoftmax="1.0" value="0.5" doc="Pivot value around which contrast applies. This value will not change as contrast is adjusted." spec_desc="Pivot value around which contrast applies"/>
1732-
<input name="exposure" type="float" uiname="Exposure" uisoftmin="-1.0" uisoftmax="1.0" value="0" doc="Multiplier which increases or decreases color brightness by 2^value." spec_desc="Logarithmic brightness multiplier as 2^`exposure`" />
1733-
<output name="out" type="color4" spec_desc="the color-corrected value" />
1734-
</nodedef>
1735-
1711+
<template name="TP_ND_colorcorrect" varnames="typeName" options="(color3, color4)">
1712+
<nodedef name="ND_colorcorrect_@typeName@" node="colorcorrect" nodegroup="adjustment">
1713+
<input name="in" type="@typeName@" uiname="Input Color" value="Constant:one" doc="The input color to be adjusted." spec_desc="The input color stream"/>
1714+
<input name="hue" type="float" uiname="Hue" uisoftmin="0.0" uisoftmax="1.0" value="0" doc="Rotates the color hue, with values wrapping at 0-1 boundaries." spec_desc="Rotates the color hue" />
1715+
<input name="saturation" type="float" uiname="Saturation" uisoftmin="0.0" uisoftmax="1.0" value="1" doc="Adjusts the input color saturation level." spec_desc="Multiplies the input color saturation level" />
1716+
<input name="gamma" type="float" uiname="Gamma" uisoftmin="0.0" uisoftmax="3.0" value="1" doc="Applies a gamma correction to the color." spec_desc="Applies a gamma correction to the color" />
1717+
<input name="lift" type="float" uiname="Lift" uisoftmin="0.0" uisoftmax="1.0" value="0" doc="Raise the dark color values, leaving the white values unchanged." spec_desc="Raises the dark color values, leaving the white values unchanged" />
1718+
<input name="gain" type="float" uiname="Gain" uisoftmin="0.0" uisoftmax="1.0" value="1" doc="Multiplier increases lighter color values, leaving black values unchanged." spec_desc="Multiplier increases lighter color values, leaving black values unchanged" />
1719+
<input name="contrast" type="float" uiname="Contrast" uisoftmin="0.0" uisoftmax="1.0" value="1" doc="Linearly increase or decrease the color contrast." spec_desc="Linearly increase or decrease the color contrast" />
1720+
<input name="contrastpivot" type="float" uiname="Contrast Pivot" uisoftmin="0.0" uisoftmax="1.0" value="0.5" doc="Pivot value around which contrast applies. This value will not change as contrast is adjusted." spec_desc="Pivot value around which contrast applies"/>
1721+
<input name="exposure" type="float" uiname="Exposure" uisoftmin="-1.0" uisoftmax="1.0" value="0" doc="Multiplier which increases or decreases color brightness by 2^value." spec_desc="Logarithmic brightness multiplier as 2^`exposure`" />
1722+
<output name="out" type="@typeName@" spec_desc="the color-corrected value" />
1723+
</nodedef>
1724+
</template>
17361725
<!-- ======================================================================== -->
17371726
<!-- Compositing nodes -->
17381727
<!-- ======================================================================== -->
@@ -2037,16 +2026,13 @@
20372026
</nodedef>
20382027
</template>
20392028
</template>
2040-
<nodedef name="ND_ifequal_boolean" node="ifequal" nodegroup="conditional">
2041-
<input name="value1" type="float" value="1.0" spec_desc="The first value to be compared" />
2042-
<input name="value2" type="float" value="0.0" spec_desc="The second value to be compared" />
2043-
<output name="out" type="boolean" default="false" spec_desc="true if `value1` = `value2" />
2044-
</nodedef>
2045-
<nodedef name="ND_ifequal_booleanI" node="ifequal" nodegroup="conditional">
2046-
<input name="value1" type="integer" value="1" spec_desc="The first value to be compared"/>
2047-
<input name="value2" type="integer" value="0" spec_desc="The second value to be compared"/>
2048-
<output name="out" type="boolean" default="false" spec_desc="true if `value1` = `value2" />
2049-
</nodedef>
2029+
<template name="TP_ND_ifequal_boolean" varnames="nodeDefExt,typeName" options="(boolean,booleanI), (float, integer)">
2030+
<nodedef name="ND_ifequal_@nodeDefExt@" node="ifequal" nodegroup="conditional">
2031+
<input name="value1" type="@typeName@" value="Constant:one" spec_desc="The first value to be compared" />
2032+
<input name="value2" type="@typeName@" value="Constant:zero" spec_desc="The second value to be compared" />
2033+
<output name="out" type="boolean" default="false" spec_desc="true if `value1` = `value2" />
2034+
</nodedef>
2035+
</template>
20502036
<nodedef name="ND_ifequal_booleanB" node="ifequal" nodegroup="conditional">
20512037
<input name="value1" type="boolean" value="false" spec_desc="The first value to be compared"/>
20522038
<input name="value2" type="boolean" value="false" spec_desc="The first value to be compared"/>

0 commit comments

Comments
 (0)