forked from blender/blender
MaterialX: Implement export of Input nodes #20
@ -29,6 +29,17 @@ static int node_shader_gpu_hair_info(GPUMaterial *mat,
|
||||
return GPU_stack_link(mat, node, "node_hair_info", in, out, length_link);
|
||||
}
|
||||
|
||||
NODE_SHADER_MATERIALX_BEGIN
|
||||
{
|
||||
/* TODO: This node doesn't have an implementation in MaterialX 1.38.6.*/
|
||||
NodeItem res = val(MaterialX::Vector3(1.0f, 1.0f, 1.0f));
|
||||
if (!STREQ(socket_out_->name, "Tangent Normal")) {
|
||||
res = res.extract(2);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
NODE_SHADER_MATERIALX_END
|
||||
|
||||
} // namespace blender::nodes::node_shader_hair_info_cc
|
||||
|
||||
/* node type definition */
|
||||
@ -41,6 +52,7 @@ void register_node_type_sh_hair_info()
|
||||
sh_node_type_base(&ntype, SH_NODE_HAIR_INFO, "Curves Info", NODE_CLASS_INPUT);
|
||||
ntype.declare = file_ns::node_declare;
|
||||
ntype.gpu_fn = file_ns::node_shader_gpu_hair_info;
|
||||
ntype.materialx_fn = file_ns::node_shader_materialx;
|
||||
|
||||
nodeRegisterType(&ntype);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user