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:
authorAntonio Vazquez <blendergit@gmail.com>2021-05-26 13:43:03 +0300
committerAntonio Vazquez <blendergit@gmail.com>2021-05-26 13:43:03 +0300
commit8a6604f253e22bbade3dcf60b9a1c437ace44151 (patch)
treefee875d0a0b09fbe0df52aa83094159144048205 /source/blender/nodes/NOD_derived_node_tree.hh
parentedf1b833674a6e54df7a16c14f0c6193fbbb482e (diff)
parentafec66c024dc2b75447537d45406c06342ec201e (diff)
Merge branch 'master' into temp-gpencil-maskingtemp-gpencil-masking
Conflicts: source/blender/blenloader/intern/versioning_300.c
Diffstat (limited to 'source/blender/nodes/NOD_derived_node_tree.hh')
-rw-r--r--source/blender/nodes/NOD_derived_node_tree.hh13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/nodes/NOD_derived_node_tree.hh b/source/blender/nodes/NOD_derived_node_tree.hh
index e294bef2ea8..7ff05449c0b 100644
--- a/source/blender/nodes/NOD_derived_node_tree.hh
+++ b/source/blender/nodes/NOD_derived_node_tree.hh
@@ -92,6 +92,9 @@ class DNode {
operator bool() const;
uint64_t hash() const;
+
+ DInputSocket input(int index) const;
+ DOutputSocket output(int index) const;
};
/* A (nullable) reference to a socket and the context it is in. It is unique within an entire
@@ -274,6 +277,16 @@ inline uint64_t DNode::hash() const
return get_default_hash_2(context_, node_ref_);
}
+inline DInputSocket DNode::input(int index) const
+{
+ return {context_, &node_ref_->input(index)};
+}
+
+inline DOutputSocket DNode::output(int index) const
+{
+ return {context_, &node_ref_->output(index)};
+}
+
/* --------------------------------------------------------------------
* DSocket inline methods.
*/