Skip to content

Commit

Permalink
Assign unique names to MDL implementations (#1380)
Browse files Browse the repository at this point in the history
This change list addresses issue #1354, renaming the implementation elements to unique names.
  • Loading branch information
niklasharrysson authored Jun 16, 2023
1 parent 1c9d7ce commit 14e766d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions libraries/stdlib/genmdl/stdlib_genmdl_impl.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -614,8 +614,8 @@
<implementation name="IM_mix_vector4_genmdl" nodedef="ND_mix_vector4" sourcecode="math::lerp({{bg}}, {{fg}}, {{mix}})" target="genmdl" />
<implementation name="IM_mix_vector4_vector4_genmdl" nodedef="ND_mix_vector4_vector4" sourcecode="math::lerp({{bg}}, {{fg}}, {{mix}})" target="genmdl" />
<implementation name="IM_mix_surfaceshader_genmdl" nodedef="ND_mix_surfaceshader" sourcecode="mx::stdlib::mx_mix_surfaceshader({{fg}}, {{bg}}, {{mix}})" target="genmdl" />
<implementation name="IM_mix_surfaceshader_genmdl" nodedef="ND_mix_volumeshader" sourcecode="mx::stdlib::mx_mix_volumeshader({{fg}}, {{bg}}, {{mix}})" target="genmdl" />
<implementation name="IM_mix_surfaceshader_genmdl" nodedef="ND_mix_displacementshader" sourcecode="mx::stdlib::mx_mix_displacementshader({{fg}}, {{bg}}, {{mix}})" target="genmdl" />
<implementation name="IM_mix_volumeshader_genmdl" nodedef="ND_mix_volumeshader" sourcecode="mx::stdlib::mx_mix_volumeshader({{fg}}, {{bg}}, {{mix}})" target="genmdl" />
<implementation name="IM_mix_displacementshader_genmdl" nodedef="ND_mix_displacementshader" sourcecode="mx::stdlib::mx_mix_displacementshader({{fg}}, {{bg}}, {{mix}})" target="genmdl" />

<!-- ======================================================================== -->
<!-- Conditional nodes -->
Expand Down
2 changes: 1 addition & 1 deletion source/MaterialXTest/MaterialXRenderOsl/GenReference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ TEST_CASE("GenReference: OSL Reference", "[genreference]")
continue;
}

mx::InterfaceElementPtr interface = nodedef->getImplementation();
mx::InterfaceElementPtr interface = nodedef->getImplementation(generator->getTarget());
if (!interface)
{
logFile << "Skip generating reference for unimplemented node '" << nodeName << "'" << std::endl;
Expand Down

0 comments on commit 14e766d

Please sign in to comment.