MaterialX: Implement export of Input nodes #20

Merged
Bogdan Nagirniak merged 26 commits from Vasyl-Pidhirskyi/blender:BLEN-530 into matx-export-material 2023-09-15 19:55:37 +02:00
Showing only changes of commit 178fe3d3ac - Show all commits

View File

@ -38,6 +38,14 @@ static void sh_node_value_build_multi_function(NodeMultiFunctionBuilder &builder
builder.construct_and_set_matching_fn<mf::CustomMF_Constant<float>>(value->value); builder.construct_and_set_matching_fn<mf::CustomMF_Constant<float>>(value->value);
} }
NODE_SHADER_MATERIALX_BEGIN
{
NodeItem res = create_node("constant", NodeItem::Type::Float);
res.set_input("value", get_output_default("Value"));
return res;
}
NODE_SHADER_MATERIALX_END
} // namespace blender::nodes::node_shader_value_cc } // namespace blender::nodes::node_shader_value_cc
void register_node_type_sh_value() void register_node_type_sh_value()
@ -50,6 +58,7 @@ void register_node_type_sh_value()
ntype.declare = file_ns::sh_node_value_declare; ntype.declare = file_ns::sh_node_value_declare;
ntype.gpu_fn = file_ns::gpu_shader_value; ntype.gpu_fn = file_ns::gpu_shader_value;
ntype.build_multi_function = file_ns::sh_node_value_build_multi_function; ntype.build_multi_function = file_ns::sh_node_value_build_multi_function;
ntype.materialx_fn = file_ns::node_shader_materialx;
nodeRegisterType(&ntype); nodeRegisterType(&ntype);
} }