diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-11-23 10:39:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-23 10:39:24 +0100 |
commit | 3c002510b65f66561633f5a685d88f2c1b1c06c0 (patch) | |
tree | ebb4e85be300a8bddafcd74a24acbfd20bd64b49 | |
parent | 1e71cab79775137beade1d9f78c709a1a4f97cfc (diff) | |
parent | f8d9e4afdbc6dd7a35076e91d976daf3841de6a3 (diff) |
Merge pull request #55242 from Calinou/doc-node-groups-internal
-rw-r--r-- | doc/classes/Node.xml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 423002d058..6b3aa30dd2 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -233,6 +233,14 @@ <description> Returns an array listing the groups that the node is a member of. [b]Note:[/b] For performance reasons, the order of node groups is [i]not[/i] guaranteed. The order of node groups should not be relied upon as it can vary across project runs. + [b]Note:[/b] The engine uses some group names internally (all starting with an underscore). To avoid conflicts with internal groups, do not add custom groups whose name starts with an underscore. To exclude internal groups while looping over [method get_groups], use the following snippet: + [codeblock] + # Stores the node's non-internal groups only (as an array of Strings). + var non_internal_groups = [] + for group in get_groups(): + if not group.begins_with("_"): + non_internal_groups.push_back(group) + [/codeblock] </description> </method> <method name="get_index" qualifiers="const"> |