summaryrefslogtreecommitdiff
path: root/tools/editor/editor_data.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/editor_data.cpp')
-rw-r--r--tools/editor/editor_data.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/tools/editor/editor_data.cpp b/tools/editor/editor_data.cpp
index 35ec1ebfcc..8fc18b5b39 100644
--- a/tools/editor/editor_data.cpp
+++ b/tools/editor/editor_data.cpp
@@ -877,8 +877,7 @@ bool EditorSelection::is_selected(Node * p_node) const {
return selection.has(p_node);
}
-
-Array EditorSelection::_get_selected_nodes() {
+Array EditorSelection::_get_transformable_selected_nodes() {
Array ret;
@@ -890,6 +889,18 @@ Array EditorSelection::_get_selected_nodes() {
return ret;
}
+Array EditorSelection::_get_selected_nodes() {
+
+ Array ret;
+
+ for (Map<Node*,Object*>::Element *E=selection.front();E;E=E->next()) {
+
+ ret.push_back(E->key());
+ }
+
+ return ret;
+}
+
void EditorSelection::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_node_removed"),&EditorSelection::_node_removed);
@@ -897,6 +908,7 @@ void EditorSelection::_bind_methods() {
ObjectTypeDB::bind_method(_MD("add_node","node:Node"),&EditorSelection::add_node);
ObjectTypeDB::bind_method(_MD("remove_node","node:Node"),&EditorSelection::remove_node);
ObjectTypeDB::bind_method(_MD("get_selected_nodes"),&EditorSelection::_get_selected_nodes);
+ ObjectTypeDB::bind_method(_MD("get_transformable_selected_nodes"),&EditorSelection::_get_transformable_selected_nodes);
ADD_SIGNAL( MethodInfo("selection_changed") );
}