|
Blender V4.3
|
#include <node_parser.h>
Inherited by blender::nodes::materialx::DefaultMaterialNodeParser, and blender::nodes::materialx::GroupNodeParser.
Public Member Functions | |
| NodeParser (MaterialX::GraphElement *graph, const Depsgraph *depsgraph, const Material *material, const bNode *node, const bNodeSocket *socket_out, NodeItem::Type to_type, GroupNodeParser *group_parser, const ExportParams &export_params) | |
| virtual | ~NodeParser ()=default |
| virtual NodeItem | compute ()=0 |
| virtual NodeItem | compute_full () |
Protected Attributes | |
| MaterialX::GraphElement * | graph_ |
| const Depsgraph * | depsgraph_ |
| const Material * | material_ |
| const bNode * | node_ |
| const bNodeSocket * | socket_out_ |
| NodeItem::Type | to_type_ |
| GroupNodeParser * | group_parser_ |
| ExportParams | export_params_ |
This is base abstraction class for parsing Blender nodes into MaterialX nodes. NodeParser::compute() should be overridden in child classes.
Definition at line 26 of file node_parser.h.
| blender::nodes::materialx::NodeParser::NodeParser | ( | MaterialX::GraphElement * | graph, |
| const Depsgraph * | depsgraph, | ||
| const Material * | material, | ||
| const bNode * | node, | ||
| const bNodeSocket * | socket_out, | ||
| NodeItem::Type | to_type, | ||
| GroupNodeParser * | group_parser, | ||
| const ExportParams & | export_params ) |
Definition at line 21 of file node_parser.cc.
References depsgraph, depsgraph_, export_params_, graph_, group_parser_, material_, node_, socket_out_, blender::gpu::shader::to_type(), and to_type_.
|
virtualdefault |
|
pure virtual |
Implemented in blender::nodes::materialx::DefaultMaterialNodeParser, blender::nodes::materialx::GroupInputNodeParser, blender::nodes::materialx::GroupNodeParser, and blender::nodes::materialx::GroupOutputNodeParser.
References data, inputs, T, blender::gpu::shader::to_type(), and blender::nodes::materialx::NodeItem::Vector2.
Referenced by compute_full().
|
virtual |
Reimplemented in blender::nodes::materialx::GroupInputNodeParser, blender::nodes::materialx::GroupNodeParser, and blender::nodes::materialx::GroupOutputNodeParser.
Definition at line 40 of file node_parser.cc.
References CLOG_INFO, compute(), blender::nodes::materialx::NodeItem::convert(), empty(), graph_, blender::nodes::materialx::NodeItem::is_arithmetic(), blender::nodes::materialx::LOG_MATERIALX_SHADER, blender::nodes::materialx::NodeItem::node, node_, node_name(), to_type_, and blender::nodes::materialx::NodeItem::type().
|
protected |
Definition at line 118 of file node_parser.cc.
References blender::nodes::materialx::NodeItem::create_input(), and empty().
|
protected |
Definition at line 106 of file node_parser.cc.
References blender::nodes::materialx::NodeItem::create_node(), and empty().
Referenced by blender::nodes::materialx::DefaultMaterialNodeParser::compute(), blender::nodes::materialx::GroupOutputNodeParser::compute(), blender::nodes::materialx::DefaultMaterialNodeParser::compute_error(), and texcoord_node().
|
protected |
Definition at line 111 of file node_parser.cc.
References blender::nodes::materialx::NodeItem::create_node(), empty(), and inputs.
|
protected |
Definition at line 123 of file node_parser.cc.
References blender::nodes::materialx::NodeItem::create_output(), and empty().
|
protected |
Definition at line 168 of file node_parser.cc.
References graph_.
Referenced by blender::nodes::materialx::GroupInputNodeParser::compute(), blender::nodes::materialx::GroupNodeParser::compute(), blender::nodes::materialx::GroupInputNodeParser::compute_full(), blender::nodes::materialx::GroupOutputNodeParser::compute_full(), compute_full(), create_input(), create_node(), create_node(), create_output(), texcoord_node(), and val().
|
protected |
Definition at line 128 of file node_parser.cc.
References node_, and blender::gpu::shader::to_type().
|
protected |
Definition at line 133 of file node_parser.cc.
References node_, and blender::gpu::shader::to_type().
|
protected |
Definition at line 138 of file node_parser.cc.
References get_input_link(), node_, and blender::gpu::shader::to_type().
Referenced by get_input_link(), and get_input_link().
|
protected |
Definition at line 143 of file node_parser.cc.
References get_input_link(), node_, and blender::gpu::shader::to_type().
|
protected |
Definition at line 148 of file node_parser.cc.
References get_input_value(), node_, and blender::gpu::shader::to_type().
Referenced by blender::nodes::materialx::GroupOutputNodeParser::compute(), get_input_value(), and get_input_value().
|
protected |
Definition at line 153 of file node_parser.cc.
References get_input_value(), node_, and blender::gpu::shader::to_type().
|
protected |
Definition at line 158 of file node_parser.cc.
References node_, and blender::gpu::shader::to_type().
|
protected |
Definition at line 163 of file node_parser.cc.
References node_, and blender::gpu::shader::to_type().
|
protected |
Definition at line 65 of file node_parser.cc.
References blender::nodes::materialx::NodeItem::BSDF, blender::nodes::materialx::NodeItem::EDF, ELEM, group_parser_, bNode::id, bNodeTree::id, ID::name, node_, socket_out_, blender::nodes::materialx::NodeItem::SurfaceOpacity, to_type_, and blender::nodes::materialx::NodeItem::type().
Referenced by compute_full().
|
protected |
Definition at line 173 of file node_parser.cc.
References BLI_assert, create_node(), ELEM, empty(), export_params_, graph_, blender::nodes::materialx::NodeItem::node, blender::nodes::materialx::TEXCOORD_NODE_NAME, val(), blender::nodes::materialx::NodeItem::Vector2, and blender::nodes::materialx::NodeItem::Vector3.
|
protected |
Definition at line 80 of file node_parser.h.
References data, empty(), T, and blender::nodes::materialx::NodeItem::val().
Referenced by blender::nodes::materialx::DefaultMaterialNodeParser::compute(), blender::nodes::materialx::DefaultMaterialNodeParser::compute_error(), and texcoord_node().
|
protected |
Definition at line 29 of file node_parser.h.
Referenced by blender::nodes::materialx::GroupNodeParser::compute(), and NodeParser().
|
protected |
Definition at line 35 of file node_parser.h.
Referenced by blender::nodes::materialx::GroupNodeParser::compute(), NodeParser(), and texcoord_node().
|
protected |
Definition at line 28 of file node_parser.h.
Referenced by blender::nodes::materialx::GroupNodeParser::compute(), blender::nodes::materialx::GroupInputNodeParser::compute_full(), blender::nodes::materialx::GroupOutputNodeParser::compute_full(), compute_full(), empty(), NodeParser(), and texcoord_node().
|
protected |
Definition at line 34 of file node_parser.h.
Referenced by blender::nodes::materialx::GroupInputNodeParser::compute(), node_name(), and NodeParser().
|
protected |
Definition at line 30 of file node_parser.h.
Referenced by blender::nodes::materialx::DefaultMaterialNodeParser::compute(), blender::nodes::materialx::GroupNodeParser::compute(), and NodeParser().
|
protected |
Definition at line 31 of file node_parser.h.
Referenced by blender::nodes::materialx::GroupNodeParser::compute(), blender::nodes::materialx::GroupOutputNodeParser::compute(), blender::nodes::materialx::GroupInputNodeParser::compute_full(), blender::nodes::materialx::GroupOutputNodeParser::compute_full(), compute_full(), get_input_default(), get_input_default(), get_input_link(), get_input_link(), get_input_value(), get_input_value(), get_output_default(), get_output_default(), node_name(), and NodeParser().
|
protected |
Definition at line 32 of file node_parser.h.
Referenced by blender::nodes::materialx::GroupInputNodeParser::compute(), blender::nodes::materialx::GroupNodeParser::compute(), blender::nodes::materialx::GroupOutputNodeParser::compute_full(), node_name(), and NodeParser().
|
protected |
Definition at line 33 of file node_parser.h.
Referenced by blender::nodes::materialx::GroupInputNodeParser::compute(), blender::nodes::materialx::GroupNodeParser::compute(), blender::nodes::materialx::GroupOutputNodeParser::compute(), blender::nodes::materialx::GroupInputNodeParser::compute_full(), blender::nodes::materialx::GroupNodeParser::compute_full(), blender::nodes::materialx::GroupOutputNodeParser::compute_full(), compute_full(), node_name(), and NodeParser().