summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-01-12 05:53:59 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-01-12 05:54:45 -0300
commiteab1e5b5967ccebf00ce1d456eb1fd6ee28ec96d (patch)
treed7db1603069df70cfa729fac15f217cfe533f26b
parent7393e404521350cbb3e69ce87a19ee602ec2a7a4 (diff)
small hack to make collisionobjects work with replace, fixes #2992
-rw-r--r--tools/editor/scene_tree_dock.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp
index 75f1597b20..89036d2581 100644
--- a/tools/editor/scene_tree_dock.cpp
+++ b/tools/editor/scene_tree_dock.cpp
@@ -1268,6 +1268,11 @@ void SceneTreeDock::_create() {
editor->set_edited_scene(newnode);
}
+ //small hack to make collisionshapes and other kind of nodes to work
+ for(int i=0;i<newnode->get_child_count();i++) {
+ Node *c=newnode->get_child(i);
+ c->call("set_transform", c->call("get_transform") );
+ }
editor_data->get_undo_redo().clear_history();
newnode->set_name(newname);