MaterialX: Enable blackbody and randomfloat nodes
These are supported now with MaterialX 1.38.8 in Blender 4.1. Pull Request: https://projects.blender.org/blender/blender/pulls/117762
This commit is contained in:
committed by
Brecht Van Lommel
parent
a669fd870e
commit
6f0e27abad
@@ -49,17 +49,11 @@ static void sh_node_blackbody_build_multi_function(nodes::NodeMultiFunctionBuild
|
||||
NODE_SHADER_MATERIALX_BEGIN
|
||||
#ifdef WITH_MATERIALX
|
||||
{
|
||||
/* TODO: This node doesn't have an implementation in MaterialX 1.38.6.
|
||||
* It's added in MaterialX 1.38.8. Uncomment this code after switching to 1.38.8. */
|
||||
# if 0
|
||||
NodeItem temperature = get_input_value("Temperature", NodeItem::Type::Float);
|
||||
|
||||
NodeItem res = create_node("blackbody", NodeItem::Type::Color3);
|
||||
res.set_input("temperature", temperature);
|
||||
return res;
|
||||
# endif
|
||||
NodeItem res = empty();
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
NODE_SHADER_MATERIALX_END
|
||||
|
||||
@@ -40,15 +40,9 @@ NODE_SHADER_MATERIALX_BEGIN
|
||||
if (name == "Location") {
|
||||
res = create_node("position", NodeItem::Type::Vector3, {{"space", val(std::string("world"))}});
|
||||
}
|
||||
/* TODO: This node doesn't have an implementation in MaterialX.
|
||||
* It's added in MaterialX 1.38.8. Uncomment this code after switching to 1.38.8.
|
||||
* if (name=="Random") {
|
||||
* res = create_node("randomfloat", NodeItem::Type::Float);
|
||||
* res.set_input("in", val(0.0));
|
||||
* res.set_input("min", val(0.0));
|
||||
* res.set_input("max", val(1.0));
|
||||
* res.set_input("seed", val(0));
|
||||
*}*/
|
||||
else if (name == "Random") {
|
||||
res = create_node("randomfloat", NodeItem::Type::Float);
|
||||
}
|
||||
else {
|
||||
res = get_output_default(name, NodeItem::Type::Any);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user