Nodes: Add non-const access to cached group output node pointer

This commit is contained in:
Hans Goudey 2022-12-20 22:51:13 -06:00
parent 8fe1499796
commit 908c539219
2 changed files with 7 additions and 0 deletions

View File

@ -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));

View File

@ -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;