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>2022-09-07 11:24:34 +0300
committerJacques Lucke <jacques@blender.org>2022-09-07 11:24:51 +0300
commit17d8028181e268f728ced259f7f9960b0fae7722 (patch)
treefedf4dc1ce28e83b8b17f1ecbcd6b95076bdedea /source/blender/blenkernel
parent2b43173fa922b04e5e1db092964aa6c263450667 (diff)
Nodes: add owner_tree method to nodes
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_node_runtime.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_node_runtime.hh b/source/blender/blenkernel/BKE_node_runtime.hh
index 49a6953d0a3..f2e551a9f32 100644
--- a/source/blender/blenkernel/BKE_node_runtime.hh
+++ b/source/blender/blenkernel/BKE_node_runtime.hh
@@ -361,6 +361,12 @@ inline const bNodeSocket &bNode::output_by_identifier(blender::StringRef identif
return *this->runtime->outputs_by_identifier.lookup_as(identifier);
}
+inline const bNodeTree &bNode::owner_tree() const
+{
+ BLI_assert(blender::bke::node_tree_runtime::topology_cache_is_available(*this));
+ return *this->runtime->owner_tree;
+}
+
inline blender::StringRefNull bNode::label_or_name() const
{
if (this->label[0] == '\0') {