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

View File

@ -86,6 +86,13 @@ static int node_shader_gpu_tangent(GPUMaterial *mat,
return GPU_stack_link(mat, node, "node_tangent", in, out, orco);
}
NODE_SHADER_MATERIALX_BEGIN
{
/* TODO: This node doesn't have an implementation in MaterialX 1.38.6.*/
return val(MaterialX::Vector3(1.0f, 1.0f, 1.0f));
}
NODE_SHADER_MATERIALX_END
} // namespace blender::nodes::node_shader_tangent_cc
/* node type definition */
@ -103,6 +110,7 @@ void register_node_type_sh_tangent()
ntype.gpu_fn = file_ns::node_shader_gpu_tangent;
node_type_storage(
&ntype, "NodeShaderTangent", node_free_standard_storage, node_copy_standard_storage);
ntype.materialx_fn = file_ns::node_shader_materialx;
nodeRegisterType(&ntype);
}