diff options
-rw-r--r-- | source/blender/blenkernel/BKE_derived_node_tree.hh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_derived_node_tree.hh b/source/blender/blenkernel/BKE_derived_node_tree.hh index 1c586f9b4c6..b5ced6ab772 100644 --- a/source/blender/blenkernel/BKE_derived_node_tree.hh +++ b/source/blender/blenkernel/BKE_derived_node_tree.hh @@ -67,6 +67,10 @@ class DSocket : NonCopyable, NonMovable { PointerRNA *rna() const; StringRefNull idname() const; StringRefNull name() const; + + const SocketRef &socket_ref() const; + + bool is_available() const; }; class DInputSocket : public DSocket { @@ -187,6 +191,8 @@ class DerivedNodeTree : NonCopyable, NonMovable { Span<const DInputSocket *> input_sockets() const; Span<const DOutputSocket *> output_sockets() const; + Span<const DGroupInput *> group_inputs() const; + std::string to_dot() const; private: @@ -280,6 +286,16 @@ inline StringRefNull DSocket::name() const return m_socket_ref->name(); } +inline const SocketRef &DSocket::socket_ref() const +{ + return *m_socket_ref; +} + +inline bool DSocket::is_available() const +{ + return (m_socket_ref->bsocket()->flag & SOCK_UNAVAIL) == 0; +} + /* -------------------------------------------------------------------- * DInputSocket inline methods. */ @@ -446,6 +462,11 @@ inline Span<const DNode *> DerivedNodeTree::nodes_by_type(const bNodeType *nodet } } +inline Span<const DSocket *> DerivedNodeTree::sockets() const +{ + return m_sockets_by_id.as_span(); +} + inline Span<const DInputSocket *> DerivedNodeTree::input_sockets() const { return m_input_sockets.as_span(); @@ -456,6 +477,11 @@ inline Span<const DOutputSocket *> DerivedNodeTree::output_sockets() const return m_output_sockets.as_span(); } +inline Span<const DGroupInput *> DerivedNodeTree::group_inputs() const +{ + return m_group_inputs.as_span(); +} + } // namespace bke } // namespace blender |