From 4c753f60b16e3cd536818557ee0798357d7bed48 Mon Sep 17 00:00:00 2001 From: hondres Date: Wed, 20 Jan 2016 00:08:04 +0100 Subject: [PATCH] duplicate groups and signals --- scene/main/node.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 0780a4bdafa..191e3ec04c0 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -1510,6 +1510,15 @@ Node *Node::duplicate(bool p_use_instancing) const { node->set_name(get_name()); + List gi; + get_groups(&gi); + for (List::Element *E=gi.front();E;E=E->next()) { + + node->add_to_group(E->get().name, E->get().persistent); + } + + _duplicate_signals(this, node); + for(int i=0;idata.parent_owned)