Merge pull request #108507 from dementive/optimize-scene-tree-groups

Optimize scene tree groups
This commit is contained in:
Thaddeus Crews 2025-11-14 14:22:57 -06:00
commit 7d5034c50a
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
8 changed files with 35 additions and 43 deletions

View file

@ -117,8 +117,7 @@ PackedStringArray CanvasModulate::get_configuration_warnings() const {
PackedStringArray warnings = Node2D::get_configuration_warnings();
if (is_in_canvas && is_visible_in_tree()) {
List<Node *> nodes;
get_tree()->get_nodes_in_group("_canvas_modulate_" + itos(get_canvas().get_id()), &nodes);
Vector<Node *> nodes = get_tree()->get_nodes_in_group("_canvas_modulate_" + itos(get_canvas().get_id()));
if (nodes.size() > 1) {
warnings.push_back(RTR("Only one visible CanvasModulate is allowed per canvas.\nWhen there are more than one, only one of them will be active. Which one is undefined."));