5#include <MaterialXFormat/XmlIo.h>
29 {{
"base_weight",
val(1.0f)},
44 {{
"base_color",
val(MaterialX::Color3(1.0f, 0.0f, 1.0f))}});
57 MaterialX::DocumentPtr doc = MaterialX::createDocument();
65 if (output_node && output_node->
typeinfo->materialx_fn) {
67 output_node->
typeinfo->materialx_fn(&
data, output_node,
nullptr);
68 output_item =
data.result;
83 graph.set_output_node_name(output_item);
89 MaterialX::writeToXmlString(doc).c_str());
#define CLOG_INFO(clg_ref, level,...)
struct bNode * ntreeShaderOutputNode(struct bNodeTree *ntree, int target)
NodeItem compute() override
NodeParser(NodeGraph &graph, const bNode *node, const bNodeSocket *socket_out, NodeItem::Type to_type, GroupNodeParser *group_parser)
NodeItem create_node(const std::string &category, NodeItem::Type type)
NodeItem val(const T &data) const
const Depsgraph * depsgraph
struct CLG_LogRef * LOG_MATERIALX_SHADER
MaterialX::DocumentPtr export_to_materialx(Depsgraph *depsgraph, Material *material, const ExportParams &export_params)
struct bNodeTree * nodetree
bNodeTypeHandle * typeinfo
const Material * material