Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/intern/node_declaration.cc
| Show All 10 Lines | |||||
| void build_node_declaration(const bNodeType &typeinfo, NodeDeclaration &r_declaration) | void build_node_declaration(const bNodeType &typeinfo, NodeDeclaration &r_declaration) | ||||
| { | { | ||||
| NodeDeclarationBuilder node_decl_builder{r_declaration}; | NodeDeclarationBuilder node_decl_builder{r_declaration}; | ||||
| typeinfo.declare(node_decl_builder); | typeinfo.declare(node_decl_builder); | ||||
| node_decl_builder.finalize(); | node_decl_builder.finalize(); | ||||
| } | } | ||||
| void build_node_declaration_dynamic(const bNodeTree &node_tree, | |||||
| const bNode &node, | |||||
| NodeDeclaration &r_declaration) | |||||
| { | |||||
| r_declaration.inputs.clear(); | |||||
| r_declaration.outputs.clear(); | |||||
| node.typeinfo->declare_dynamic(node_tree, node, r_declaration); | |||||
| } | |||||
| void NodeDeclarationBuilder::finalize() | void NodeDeclarationBuilder::finalize() | ||||
| { | { | ||||
| if (is_function_node_) { | if (is_function_node_) { | ||||
| for (std::unique_ptr<BaseSocketDeclarationBuilder> &socket_builder : input_builders_) { | for (std::unique_ptr<BaseSocketDeclarationBuilder> &socket_builder : input_builders_) { | ||||
| SocketDeclaration &socket_decl = *socket_builder->declaration(); | SocketDeclaration &socket_decl = *socket_builder->declaration(); | ||||
| if (socket_decl.input_field_type != InputSocketFieldType::Implicit) { | if (socket_decl.input_field_type != InputSocketFieldType::Implicit) { | ||||
| socket_decl.input_field_type = InputSocketFieldType::IsSupported; | socket_decl.input_field_type = InputSocketFieldType::IsSupported; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 204 Lines • Show Last 20 Lines | |||||