MaterialX: code improvements shader modes. #35

Merged
4 changed files with 5 additions and 5 deletions
Showing only changes of commit 2d72def938 - Show all commits

View File

@ -54,7 +54,7 @@ NodeItem::Type NodeItem::type(const std::string &type_str)
return Type::EDF; return Type::EDF;
} }
if (type_str == "displacementshader") { if (type_str == "displacementshader") {
return Type::Displacementshader; return Type::DisplacementShader;
} }
if (type_str == "surfaceshader") { if (type_str == "surfaceshader") {
return Type::SurfaceShader; return Type::SurfaceShader;
@ -97,7 +97,7 @@ std::string NodeItem::type(Type type)
return "BSDF"; return "BSDF";
case Type::EDF: case Type::EDF:
return "EDF"; return "EDF";
case Type::Displacementshader: case Type::DisplacementShader:
return "displacementshader"; return "displacementshader";
case Type::SurfaceShader: case Type::SurfaceShader:
return "surfaceshader"; return "surfaceshader";

View File

@ -41,7 +41,7 @@ class NodeItem {
/* Shader types. NOTE: There are only supported types */ /* Shader types. NOTE: There are only supported types */
BSDF, BSDF,
EDF, EDF,
Displacementshader, DisplacementShader,
SurfaceShader, SurfaceShader,
Material, Material,
}; };

View File

@ -46,7 +46,7 @@ NODE_SHADER_MATERIALX_BEGIN
NodeItem scale = get_input_value("Scale", NodeItem::Type::Float); NodeItem scale = get_input_value("Scale", NodeItem::Type::Float);
return create_node("displacement", return create_node("displacement",
NodeItem::Type::Displacementshader, NodeItem::Type::DisplacementShader,
{{"displacement", height}, {"scale", scale}}); {{"displacement", height}, {"scale", scale}});
} }
#endif #endif

View File

@ -50,7 +50,7 @@ NODE_SHADER_MATERIALX_BEGIN
NodeItem scale = get_input_value("Scale", NodeItem::Type::Float); NodeItem scale = get_input_value("Scale", NodeItem::Type::Float);
return create_node("displacement", return create_node("displacement",
NodeItem::Type::Displacementshader, NodeItem::Type::DisplacementShader,
{{"displacement", vector}, {"scale", scale}}); {{"displacement", vector}, {"scale", scale}});
} }
#endif #endif