diff options
author | hondres <liu.gam3@gmail.com> | 2016-01-20 00:08:04 +0100 |
---|---|---|
committer | hondres <liu.gam3@gmail.com> | 2016-01-20 00:08:04 +0100 |
commit | 4c753f60b16e3cd536818557ee0798357d7bed48 (patch) | |
tree | 074ee185d05ca8058b9b5d29555bcf8cb7406b3e | |
parent | 4cca09921d7515b5896c4a60615399a879616b73 (diff) |
duplicate groups and signals
-rw-r--r-- | scene/main/node.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 0780a4bdaf..191e3ec04c 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<GroupInfo> gi; + get_groups(&gi); + for (List<GroupInfo>::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;i<get_child_count();i++) { if (get_child(i)->data.parent_owned) |