Move the MaterialX export code into the existing shader node files #18

Merged
Bogdan Nagirniak merged 14 commits from BogdanNagirniak/blender:matx-move-code into matx-export-material 2023-09-12 13:55:27 +02:00
Showing only changes of commit 912c0b61f8 - Show all commits

View File

@ -259,8 +259,20 @@ static void sh_node_noise_build_multi_function(NodeMultiFunctionBuilder &builder
NODE_SHADER_MATERIALX_BEGIN NODE_SHADER_MATERIALX_BEGIN
{ {
/* TODO: Implement */ NodeItem scale = get_input_value("Scale", NodeItem::Type::Float);
return empty(); NodeItem detail = get_input_value("Detail", NodeItem::Type::Float);
NodeItem lacunarity = get_input_value("Lacunarity", NodeItem::Type::Float);
NodeItem position = create_node("position", NodeItem::Type::Vector3);
position = position * scale;
NodeItem res = create_node("fractal3d", NodeItem::Type::Color3);
res.set_input("position", position);
if (detail.value) {
res.set_input("octaves", val(int(detail.value->asA<float>())));
}
res.set_input("lacunarity", lacunarity);
return res;
} }
NODE_SHADER_MATERIALX_END NODE_SHADER_MATERIALX_END