diff options
Diffstat (limited to 'scene/main')
| -rw-r--r-- | scene/main/node.cpp | 11 | ||||
| -rw-r--r-- | scene/main/node.h | 2 | ||||
| -rw-r--r-- | scene/main/scene_tree.h | 4 | ||||
| -rw-r--r-- | scene/main/viewport.h | 3 |
4 files changed, 8 insertions, 12 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 0aaba5491a..0b3a193d18 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -1716,14 +1716,17 @@ void Node::get_groups(List<GroupInfo> *p_groups) const { } } -bool Node::has_persistent_groups() const { +int Node::get_persistent_group_count() const { + + int count = 0; for (const Map<StringName, GroupData>::Element *E = data.grouped.front(); E; E = E->next()) { - if (E->get().persistent) - return true; + if (E->get().persistent) { + count += 1; + } } - return false; + return count; } void Node::_print_tree_pretty(const String &prefix, const bool last) { diff --git a/scene/main/node.h b/scene/main/node.h index 982bfcd620..67b40f6dfc 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -300,7 +300,7 @@ public: }; void get_groups(List<GroupInfo> *p_groups) const; - bool has_persistent_groups() const; + int get_persistent_group_count() const; void move_child(Node *p_child, int p_pos); void raise(); diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h index 98f2fe5e35..afb653e242 100644 --- a/scene/main/scene_tree.h +++ b/scene/main/scene_tree.h @@ -39,10 +39,6 @@ #include "scene/resources/world.h" #include "scene/resources/world_2d.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ - class PackedScene; class Node; class Viewport; diff --git a/scene/main/viewport.h b/scene/main/viewport.h index b7160d5139..6393785b22 100644 --- a/scene/main/viewport.h +++ b/scene/main/viewport.h @@ -36,9 +36,6 @@ #include "scene/resources/texture.h" #include "scene/resources/world_2d.h" #include "servers/visual_server.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ class Camera; class Camera2D; |