summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-01-24 15:34:44 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-01-24 15:34:44 -0300
commit021fc47434f68028167cf4bb914c92c86d72a493 (patch)
treea0bd421c5d1943fde3027ea3fcf918858c2bfae2 /scene
parent35a28f34426eb6c44a5e321bbd630c64d8b38de0 (diff)
parent2493cb1e26ba9a0a85ae46a81a054dabd9f68e57 (diff)
Merge pull request #3431 from TheHX/pr-tscn-groups
Fix .tscn format not loading groups
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/scene_format_text.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/scene/resources/scene_format_text.cpp b/scene/resources/scene_format_text.cpp
index 2f18e70d7f..0a8eddcc3b 100644
--- a/scene/resources/scene_format_text.cpp
+++ b/scene/resources/scene_format_text.cpp
@@ -394,6 +394,13 @@ Error ResourceInteractiveLoaderText::poll() {
int node_id = packed_scene->get_state()->add_node(parent,owner,type,name,instance);
+ if (next_tag.fields.has("groups")) {
+
+ Array groups = next_tag.fields["groups"];
+ for (int i=0;i<groups.size();i++) {
+ packed_scene->get_state()->add_node_group(node_id,packed_scene->get_state()->add_name(groups[i]));
+ }
+ }
while(true) {