[Bf-blender-cvs] [8d3c4aa2d73] master: Nodes: add utility method to access bsocket
Jacques Lucke
noreply at git.blender.org
Wed Jul 1 09:33:45 CEST 2020
Commit: 8d3c4aa2d734fe9ff342b9bacff832993b60e89a
Author: Jacques Lucke
Date: Wed Jul 1 09:33:29 2020 +0200
Branches: master
https://developer.blender.org/rB8d3c4aa2d734fe9ff342b9bacff832993b60e89a
Nodes: add utility method to access bsocket
===================================================================
M source/blender/blenkernel/BKE_derived_node_tree.hh
===================================================================
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;
More information about the Bf-blender-cvs
mailing list