Skip to content

Commit

Permalink
Remove arrayappend node definition (#1707)
Browse files Browse the repository at this point in the history
The arrayappend node has been removed from the 1.39 specification, so we're removing it from the codebase.

This node has never been implemented in any shader generator or application (we think), so it should be safe to remove without any upgrade functionality.
  • Loading branch information
ld-kerley authored Feb 11, 2024
1 parent bc03257 commit 678de80
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 91 deletions.
86 changes: 0 additions & 86 deletions libraries/stdlib/stdlib_defs.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -2593,92 +2593,6 @@
<output name="out" type="vector2" defaultinput="texcoord" />
</nodedef>

<!--
Node: <arrayappend>
Creates a two-element array from two base types, or appends a base-type value to an array of
the same type.
-->
<nodedef name="ND_arrayappend_integer_integerarray" node="arrayappend" nodegroup="math">
<input name="in1" type="integer" value="0" />
<input name="in2" type="integer" value="0" />
<output name="out" type="integerarray" default="[]" />
</nodedef>
<nodedef name="ND_arrayappend_integerarray_integerarray" node="arrayappend" nodegroup="math">
<input name="in1" type="integerarray" value="" />
<input name="in2" type="integer" value="0" />
<output name="out" type="integerarray" defaultinput="in1" />
</nodedef>
<nodedef name="ND_arrayappend_float_floatarray" node="arrayappend" nodegroup="math">
<input name="in1" type="float" value="0.0" />
<input name="in2" type="float" value="0.0" />
<output name="out" type="floatarray" default="[]" />
</nodedef>
<nodedef name="ND_arrayappend_floatarray_floatarray" node="arrayappend" nodegroup="math">
<input name="in1" type="floatarray" value="" />
<input name="in2" type="float" value="0.0" />
<output name="out" type="floatarray" defaultinput="in1" />
</nodedef>
<nodedef name="ND_arrayappend_color3_color3array" node="arrayappend" nodegroup="math">
<input name="in1" type="color3" value="0.0, 0.0, 0.0" />
<input name="in2" type="color3" value="0.0, 0.0, 0.0" />
<output name="out" type="color3array" default="[]" />
</nodedef>
<nodedef name="ND_arrayappend_color3array_color3array" node="arrayappend" nodegroup="math">
<input name="in1" type="color3array" value="" />
<input name="in2" type="color3" value="0.0, 0.0, 0.0" />
<output name="out" type="color3array" defaultinput="in1" />
</nodedef>
<nodedef name="ND_arrayappend_color4_color4array" node="arrayappend" nodegroup="math">
<input name="in1" type="color4" value="0.0, 0.0, 0.0, 0.0" />
<input name="in2" type="color4" value="0.0, 0.0, 0.0, 0.0" />
<output name="out" type="color4array" default="[]" />
</nodedef>
<nodedef name="ND_arrayappend_color4array_color4array" node="arrayappend" nodegroup="math">
<input name="in1" type="color4array" value="" />
<input name="in2" type="color4" value="0.0, 0.0, 0.0, 0.0" />
<output name="out" type="color4array" defaultinput="in1" />
</nodedef>
<nodedef name="ND_arrayappend_vector2_vector2array" node="arrayappend" nodegroup="math">
<input name="in1" type="vector2" value="0.0, 0.0" />
<input name="in2" type="vector2" value="0.0, 0.0" />
<output name="out" type="vector2array" default="[]" />
</nodedef>
<nodedef name="ND_arrayappend_vector2array_vector2array" node="arrayappend" nodegroup="math">
<input name="in1" type="vector2array" value="" />
<input name="in2" type="vector2" value="0.0, 0.0" />
<output name="out" type="vector2array" defaultinput="in1" />
</nodedef>
<nodedef name="ND_arrayappend_vector3_vector3array" node="arrayappend" nodegroup="math">
<input name="in1" type="vector3" value="0.0, 0.0, 0.0" />
<input name="in2" type="vector3" value="0.0, 0.0, 0.0" />
<output name="out" type="vector3array" default="[]" />
</nodedef>
<nodedef name="ND_arrayappend_vector3array_vector3array" node="arrayappend" nodegroup="math">
<input name="in1" type="vector3array" value="" />
<input name="in2" type="vector3" value="0.0, 0.0, 0.0" />
<output name="out" type="vector3array" defaultinput="in1" />
</nodedef>
<nodedef name="ND_arrayappend_vector4_vector4array" node="arrayappend" nodegroup="math">
<input name="in1" type="vector4" value="0.0, 0.0, 0.0, 0.0" />
<input name="in2" type="vector4" value="0.0, 0.0, 0.0, 0.0" />
<output name="out" type="vector4array" default="[]" />
</nodedef>
<nodedef name="ND_arrayappend_vector4array_vector4array" node="arrayappend" nodegroup="math">
<input name="in1" type="vector4array" value="" />
<input name="in2" type="vector4" value="0.0, 0.0, 0.0, 0.0" />
<output name="out" type="vector4array" defaultinput="in1" />
</nodedef>
<nodedef name="ND_arrayappend_string_stringarray" node="arrayappend" nodegroup="math">
<input name="in1" type="string" value="" />
<input name="in2" type="string" value="" />
<output name="out" type="stringarray" default="[]" />
</nodedef>
<nodedef name="ND_arrayappend_stringarray_stringarray" node="arrayappend" nodegroup="math">
<input name="in1" type="stringarray" value="" />
<input name="in2" type="string" value="" />
<output name="out" type="stringarray" defaultinput="in1" />
</nodedef>

<!--
Node: <trianglewave>
Generate a triangle wave from the given scalar input.
Expand Down
2 changes: 1 addition & 1 deletion source/MaterialXTest/MaterialXGenGlsl/GenGlsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ TEST_CASE("GenShader: GLSL Implementation Check", "[genglsl]")

mx::StringSet generatorSkipNodeTypes;
mx::StringSet generatorSkipNodeDefs;
GenShaderUtil::checkImplementations(context, generatorSkipNodeTypes, generatorSkipNodeDefs, 47);
GenShaderUtil::checkImplementations(context, generatorSkipNodeTypes, generatorSkipNodeDefs, 31);
}

TEST_CASE("GenShader: GLSL Unique Names", "[genglsl]")
Expand Down
2 changes: 1 addition & 1 deletion source/MaterialXTest/MaterialXGenMdl/GenMdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ TEST_CASE("GenShader: MDL Implementation Check", "[genmdl]")
generatorSkipNodeTypes.insert("light");
mx::StringSet generatorSkipNodeDefs;

GenShaderUtil::checkImplementations(context, generatorSkipNodeTypes, generatorSkipNodeDefs, 48);
GenShaderUtil::checkImplementations(context, generatorSkipNodeTypes, generatorSkipNodeDefs, 32);
}


Expand Down
2 changes: 1 addition & 1 deletion source/MaterialXTest/MaterialXGenMsl/GenMsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ TEST_CASE("GenShader: MSL Implementation Check", "[genmsl]")

mx::StringSet generatorSkipNodeTypes;
mx::StringSet generatorSkipNodeDefs;
GenShaderUtil::checkImplementations(context, generatorSkipNodeTypes, generatorSkipNodeDefs, 47);
GenShaderUtil::checkImplementations(context, generatorSkipNodeTypes, generatorSkipNodeDefs, 31);
}

TEST_CASE("GenShader: MSL Unique Names", "[genmsl]")
Expand Down
2 changes: 1 addition & 1 deletion source/MaterialXTest/MaterialXGenOsl/GenOsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ TEST_CASE("GenShader: OSL Implementation Check", "[genosl]")
generatorSkipNodeTypes.insert("light");
mx::StringSet generatorSkipNodeDefs;

GenShaderUtil::checkImplementations(context, generatorSkipNodeTypes, generatorSkipNodeDefs, 48);
GenShaderUtil::checkImplementations(context, generatorSkipNodeTypes, generatorSkipNodeDefs, 32);
}

TEST_CASE("GenShader: OSL Unique Names", "[genosl]")
Expand Down
1 change: 0 additions & 1 deletion source/MaterialXTest/MaterialXGenShader/GenShaderUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ void checkImplementations(mx::GenContext& context,
mx::StringSet skipNodeTypes =
{
"ambientocclusion",
"arrayappend",
"displacement",
"volume",
"curveadjust",
Expand Down

0 comments on commit 678de80

Please sign in to comment.