diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/main/node.cpp | 12 | ||||
-rw-r--r-- | scene/main/node.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp index f261693841..29925b62f5 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -1244,7 +1244,19 @@ void Node::get_groups(List<GroupInfo> *p_groups) const { } +bool Node::has_persistent_groups() const { + const StringName *K=NULL; + + while ((K=data.grouped.next(K))) { + + if (data.grouped[*K].persistent) + return true; + } + + return false; + +} void Node::_print_tree(const Node *p_node) { print_line(String(p_node->get_path_to(this))); diff --git a/scene/main/node.h b/scene/main/node.h index a4683e602f..cf62e7cdea 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -223,6 +223,7 @@ public: }; void get_groups(List<GroupInfo> *p_groups) const; + bool has_persistent_groups() const; void move_child(Node *p_child,int p_pos); void raise(); |