Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/NOD_node_tree_ref.hh
| Show First 20 Lines • Show All 176 Lines • ▼ Show 20 Lines | private: | ||||
| friend NodeTreeRef; | friend NodeTreeRef; | ||||
| public: | public: | ||||
| const NodeTreeRef &tree() const; | const NodeTreeRef &tree() const; | ||||
| Span<const InputSocketRef *> inputs() const; | Span<const InputSocketRef *> inputs() const; | ||||
| Span<const OutputSocketRef *> outputs() const; | Span<const OutputSocketRef *> outputs() const; | ||||
| Span<const InternalLinkRef *> internal_links() const; | Span<const InternalLinkRef *> internal_links() const; | ||||
| Span<const SocketRef *> sockets(eNodeSocketInOut in_out) const; | |||||
| const InputSocketRef &input(int index) const; | const InputSocketRef &input(int index) const; | ||||
| const OutputSocketRef &output(int index) const; | const OutputSocketRef &output(int index) const; | ||||
| const InputSocketRef &input_by_identifier(StringRef identifier) const; | const InputSocketRef &input_by_identifier(StringRef identifier) const; | ||||
| const OutputSocketRef &output_by_identifier(StringRef identifier) const; | const OutputSocketRef &output_by_identifier(StringRef identifier) const; | ||||
| bool any_input_is_directly_linked() const; | |||||
| bool any_output_is_directly_linked() const; | |||||
| bool any_socket_is_directly_linked(eNodeSocketInOut in_out) const; | |||||
| bNode *bnode() const; | bNode *bnode() const; | ||||
| bNodeTree *btree() const; | bNodeTree *btree() const; | ||||
| PointerRNA *rna() const; | PointerRNA *rna() const; | ||||
| StringRefNull idname() const; | StringRefNull idname() const; | ||||
| StringRefNull name() const; | StringRefNull name() const; | ||||
| bNodeType *typeinfo() const; | bNodeType *typeinfo() const; | ||||
| ▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | public: | ||||
| Span<const InputSocketRef *> input_sockets() const; | Span<const InputSocketRef *> input_sockets() const; | ||||
| Span<const OutputSocketRef *> output_sockets() const; | Span<const OutputSocketRef *> output_sockets() const; | ||||
| Span<const LinkRef *> links() const; | Span<const LinkRef *> links() const; | ||||
| bool has_link_cycles() const; | bool has_link_cycles() const; | ||||
| bool has_undefined_nodes_or_sockets() const; | bool has_undefined_nodes_or_sockets() const; | ||||
| enum class ToposortDirection { | |||||
| LeftToRight, | |||||
| RightToLeft, | |||||
| }; | |||||
| Vector<const NodeRef *> toposort(ToposortDirection direction) const; | |||||
| bNodeTree *btree() const; | bNodeTree *btree() const; | ||||
| StringRefNull name() const; | StringRefNull name() const; | ||||
| std::string to_dot() const; | std::string to_dot() const; | ||||
| private: | private: | ||||
| /* Utility functions used during construction. */ | /* Utility functions used during construction. */ | ||||
| InputSocketRef &find_input_socket(Map<bNode *, NodeRef *> &node_mapping, | InputSocketRef &find_input_socket(Map<bNode *, NodeRef *> &node_mapping, | ||||
| ▲ Show 20 Lines • Show All 208 Lines • ▼ Show 20 Lines | inline Span<const InputSocketRef *> NodeRef::inputs() const | ||||
| return inputs_; | return inputs_; | ||||
| } | } | ||||
| inline Span<const OutputSocketRef *> NodeRef::outputs() const | inline Span<const OutputSocketRef *> NodeRef::outputs() const | ||||
| { | { | ||||
| return outputs_; | return outputs_; | ||||
| } | } | ||||
| inline Span<const SocketRef *> NodeRef::sockets(const eNodeSocketInOut in_out) const | |||||
| { | |||||
| return in_out == SOCK_IN ? inputs_.as_span().cast<const SocketRef *>() : | |||||
| outputs_.as_span().cast<const SocketRef *>(); | |||||
| } | |||||
| inline Span<const InternalLinkRef *> NodeRef::internal_links() const | inline Span<const InternalLinkRef *> NodeRef::internal_links() const | ||||
| { | { | ||||
| return internal_links_; | return internal_links_; | ||||
| } | } | ||||
| inline const InputSocketRef &NodeRef::input(int index) const | inline const InputSocketRef &NodeRef::input(int index) const | ||||
| { | { | ||||
| return *inputs_[index]; | return *inputs_[index]; | ||||
| ▲ Show 20 Lines • Show All 193 Lines • Show Last 20 Lines | |||||