Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/NOD_node_declaration.hh
| Show First 20 Lines • Show All 154 Lines • ▼ Show 20 Lines | public: | ||||
| bool no_mute_links = false; | bool no_mute_links = false; | ||||
| bool is_unavailable = false; | bool is_unavailable = false; | ||||
| bool is_attribute_name = false; | bool is_attribute_name = false; | ||||
| bool is_default_link_socket = false; | bool is_default_link_socket = false; | ||||
| InputSocketFieldType input_field_type = InputSocketFieldType::None; | InputSocketFieldType input_field_type = InputSocketFieldType::None; | ||||
| OutputFieldDependency output_field_dependency; | OutputFieldDependency output_field_dependency; | ||||
| private: | |||||
| /** The priority of the input for determining the domain of the node. See | /** The priority of the input for determining the domain of the node. See | ||||
| * realtime_compositor::InputDescriptor for more information. */ | * realtime_compositor::InputDescriptor for more information. */ | ||||
| int compositor_domain_priority_ = 0; | int compositor_domain_priority_ = 0; | ||||
| /** This input shouldn't be realized on the operation domain of the node. See | /** This input shouldn't be realized on the operation domain of the node. See | ||||
| * realtime_compositor::InputDescriptor for more information. */ | * realtime_compositor::InputDescriptor for more information. */ | ||||
| bool compositor_skip_realization_ = false; | bool compositor_skip_realization_ = false; | ||||
| ▲ Show 20 Lines • Show All 285 Lines • ▼ Show 20 Lines | |||||
| using SocketDeclarationPtr = std::unique_ptr<SocketDeclaration>; | using SocketDeclarationPtr = std::unique_ptr<SocketDeclaration>; | ||||
| class NodeDeclaration { | class NodeDeclaration { | ||||
| public: | public: | ||||
| Vector<SocketDeclarationPtr> inputs; | Vector<SocketDeclarationPtr> inputs; | ||||
| Vector<SocketDeclarationPtr> outputs; | Vector<SocketDeclarationPtr> outputs; | ||||
| std::unique_ptr<aal::RelationsInNode> anonymous_attribute_relations_; | std::unique_ptr<aal::RelationsInNode> anonymous_attribute_relations_; | ||||
| /** Leave the sockets in place, even if they don't match the declaration. Used for dynamic | |||||
| * declarations when the information used to build the declaration is missing, but might become | |||||
| * available again in the future. */ | |||||
| bool skip_updating_sockets = false; | |||||
| friend NodeDeclarationBuilder; | friend NodeDeclarationBuilder; | ||||
| bool matches(const bNode &node) const; | bool matches(const bNode &node) const; | ||||
| Span<SocketDeclarationPtr> sockets(eNodeSocketInOut in_out) const; | Span<SocketDeclarationPtr> sockets(eNodeSocketInOut in_out) const; | ||||
| const aal::RelationsInNode *anonymous_attribute_relations() const | const aal::RelationsInNode *anonymous_attribute_relations() const | ||||
| { | { | ||||
| return anonymous_attribute_relations_.get(); | return anonymous_attribute_relations_.get(); | ||||
| ▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | |||||
| namespace implicit_field_inputs { | namespace implicit_field_inputs { | ||||
| void position(const bNode &node, void *r_value); | void position(const bNode &node, void *r_value); | ||||
| void normal(const bNode &node, void *r_value); | void normal(const bNode &node, void *r_value); | ||||
| void index(const bNode &node, void *r_value); | void index(const bNode &node, void *r_value); | ||||
| void id_or_index(const bNode &node, void *r_value); | void id_or_index(const bNode &node, void *r_value); | ||||
| } // namespace implicit_field_inputs | } // namespace implicit_field_inputs | ||||
| void build_node_declaration(const bNodeType &typeinfo, NodeDeclaration &r_declaration); | void build_node_declaration(const bNodeType &typeinfo, NodeDeclaration &r_declaration); | ||||
| void build_node_declaration_dynamic(const bNodeTree &node_tree, | |||||
| const bNode &node, | |||||
| NodeDeclaration &r_declaration); | |||||
| template<typename SocketDecl> | template<typename SocketDecl> | ||||
| typename SocketDeclarationBuilder<SocketDecl>::Self &SocketDeclarationBuilder< | typename SocketDeclarationBuilder<SocketDecl>::Self &SocketDeclarationBuilder< | ||||
| SocketDecl>::reference_pass(const Span<int> input_indices) | SocketDecl>::reference_pass(const Span<int> input_indices) | ||||
| { | { | ||||
| aal::RelationsInNode &relations = node_decl_builder_->get_anonymous_attribute_relations(); | aal::RelationsInNode &relations = node_decl_builder_->get_anonymous_attribute_relations(); | ||||
| for (const int from_input : input_indices) { | for (const int from_input : input_indices) { | ||||
| aal::ReferenceRelation relation; | aal::ReferenceRelation relation; | ||||
| ▲ Show 20 Lines • Show All 203 Lines • Show Last 20 Lines | |||||