[Bf-blender-cvs] [908c539219c] master: Nodes: Add non-const access to cached group output node pointer
Hans Goudey
noreply at git.blender.org
Wed Dec 21 19:29:08 CET 2022
Commit: 908c539219c30238668e3d42d20fb1e1268bf95b
Author: Hans Goudey
Date: Tue Dec 20 22:51:13 2022 -0600
Branches: master
https://developer.blender.org/rB908c539219c30238668e3d42d20fb1e1268bf95b
Nodes: Add non-const access to cached group output node pointer
===================================================================
M source/blender/blenkernel/BKE_node_runtime.hh
M source/blender/makesdna/DNA_node_types.h
===================================================================
diff --git a/source/blender/blenkernel/BKE_node_runtime.hh b/source/blender/blenkernel/BKE_node_runtime.hh
index 4ecc82b7fc3..2c9f05c08a6 100644
--- a/source/blender/blenkernel/BKE_node_runtime.hh
+++ b/source/blender/blenkernel/BKE_node_runtime.hh
@@ -417,6 +417,12 @@ inline bool bNodeTree::has_undefined_nodes_or_sockets() const
return this->runtime->has_undefined_nodes_or_sockets;
}
+inline bNode *bNodeTree::group_output_node()
+{
+ BLI_assert(blender::bke::node_tree_runtime::topology_cache_is_available(*this));
+ return this->runtime->group_output_node;
+}
+
inline const bNode *bNodeTree::group_output_node() const
{
BLI_assert(blender::bke::node_tree_runtime::topology_cache_is_available(*this));
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index 97505fdf5fe..5a50e53ba98 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -632,6 +632,7 @@ typedef struct bNodeTree {
*/
bool has_undefined_nodes_or_sockets() const;
/** Get the active group output node. */
+ bNode *group_output_node();
const bNode *group_output_node() const;
/** Get all input nodes of the node group. */
blender::Span<const bNode *> group_input_nodes() const;
More information about the Bf-blender-cvs
mailing list