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 15a0580add - Show all commits

View File

@ -39,6 +39,14 @@ static int gpu_shader_bevel(GPUMaterial *mat,
return GPU_stack_link(mat, node, "node_bevel", in, out); return GPU_stack_link(mat, node, "node_bevel", in, out);
} }
NODE_SHADER_MATERIALX_BEGIN
{
/* TODO: This node doesn't have an implementation in MaterialX 1.38.6.*/
BogdanNagirniak marked this conversation as resolved
Review

NOTE instead TODO if there is no implementation in MatX. No need 1.38.6, just in MaterialX

`NOTE` instead `TODO` if there is no implementation in MatX. No need 1.38.6, just `in MaterialX`
return val(MaterialX::Vector3(1.0f, 1.0f, 1.0f));
BogdanNagirniak marked this conversation as resolved Outdated

return get_input_link("Normal", NodeItem::Type::Vector3);

`return get_input_link("Normal", NodeItem::Type::Vector3);`
;
}
NODE_SHADER_MATERIALX_END
} // namespace blender::nodes::node_shader_bevel_cc } // namespace blender::nodes::node_shader_bevel_cc
/* node type definition */ /* node type definition */
@ -53,6 +61,7 @@ void register_node_type_sh_bevel()
ntype.draw_buttons = file_ns::node_shader_buts_bevel; ntype.draw_buttons = file_ns::node_shader_buts_bevel;
ntype.initfunc = file_ns::node_shader_init_bevel; ntype.initfunc = file_ns::node_shader_init_bevel;
ntype.gpu_fn = file_ns::gpu_shader_bevel; ntype.gpu_fn = file_ns::gpu_shader_bevel;
ntype.materialx_fn = file_ns::node_shader_materialx;
nodeRegisterType(&ntype); nodeRegisterType(&ntype);
} }