Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-07-01 10:33:29 +0300
committerJacques Lucke <jacques@blender.org>2020-07-01 10:33:35 +0300
commit8d3c4aa2d734fe9ff342b9bacff832993b60e89a (patch)
tree2d05bbce6ee0fb9e51bc733623d445aebe893d2e /source/blender
parent6c7d0aebcbf05f35e256e32603be4b9026c16327 (diff)
Nodes: add utility method to access bsocket
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/BKE_derived_node_tree.hh12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_derived_node_tree.hh b/source/blender/blenkernel/BKE_derived_node_tree.hh
index b5ced6ab772..84b36f675e0 100644
--- a/source/blender/blenkernel/BKE_derived_node_tree.hh
+++ b/source/blender/blenkernel/BKE_derived_node_tree.hh
@@ -69,6 +69,7 @@ class DSocket : NonCopyable, NonMovable {
StringRefNull name() const;
const SocketRef &socket_ref() const;
+ bNodeSocket *bsocket() const;
bool is_available() const;
};
@@ -111,6 +112,7 @@ class DGroupInput : NonCopyable, NonMovable {
public:
const InputSocketRef &socket_ref() const;
+ bNodeSocket *bsocket() const;
const DParentNode *parent() const;
Span<const DInputSocket *> linked_sockets() const;
uint id() const;
@@ -291,6 +293,11 @@ inline const SocketRef &DSocket::socket_ref() const
return *m_socket_ref;
}
+inline bNodeSocket *DSocket::bsocket() const
+{
+ return m_socket_ref->bsocket();
+}
+
inline bool DSocket::is_available() const
{
return (m_socket_ref->bsocket()->flag & SOCK_UNAVAIL) == 0;
@@ -343,6 +350,11 @@ inline const InputSocketRef &DGroupInput::socket_ref() const
return *m_socket_ref;
}
+inline bNodeSocket *DGroupInput::bsocket() const
+{
+ return m_socket_ref->bsocket();
+}
+
inline const DParentNode *DGroupInput::parent() const
{
return m_parent;