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 cf81887a2e - Show all commits

View File

@ -27,6 +27,14 @@ static int node_shader_gpu_layer_weight(GPUMaterial *mat,
return GPU_stack_link(mat, node, "node_layer_weight", in, out);
}
NODE_SHADER_MATERIALX_BEGIN
{
/* TODO: some outputs expected be implemented partially within the next iteration (see nodedef
* <artistic_ior>) */
return val(1.0f);
}
NODE_SHADER_MATERIALX_END
} // namespace blender::nodes::node_shader_layer_weight_cc
/* node type definition */
@ -39,6 +47,7 @@ void register_node_type_sh_layer_weight()
sh_node_type_base(&ntype, SH_NODE_LAYER_WEIGHT, "Layer Weight", NODE_CLASS_INPUT);
ntype.declare = file_ns::node_declare;
ntype.gpu_fn = file_ns::node_shader_gpu_layer_weight;
ntype.materialx_fn = file_ns::node_shader_materialx;
nodeRegisterType(&ntype);
}