diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-01-02 17:18:45 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-01-02 17:18:45 -0300 |
commit | 2db78e8f87fc208711bf8625fcb679723ce46fb7 (patch) | |
tree | ac1f1a007b817292d2192052c15a8a73c7784878 /scene/main/scene_main_loop.cpp | |
parent | 8fb70142e41ab09cd3c6fc3b4545a3be66276be8 (diff) |
Properly clear/restore current camera when switching scenes. Fixes #2137
Diffstat (limited to 'scene/main/scene_main_loop.cpp')
-rw-r--r-- | scene/main/scene_main_loop.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scene/main/scene_main_loop.cpp b/scene/main/scene_main_loop.cpp index da1d6b3204..f8585b93cf 100644 --- a/scene/main/scene_main_loop.cpp +++ b/scene/main/scene_main_loop.cpp @@ -620,6 +620,10 @@ void SceneTree::set_editor_hint(bool p_enabled) { editor_hint=p_enabled; } +bool SceneTree::is_node_being_edited(const Node* p_node) const { + return editor_hint && edited_scene_root && edited_scene_root->is_a_parent_of(p_node); +} + bool SceneTree::is_editor_hint() const { return editor_hint; @@ -965,6 +969,10 @@ Array SceneTree::_get_nodes_in_group(const StringName& p_group) { return ret; } +bool SceneTree::has_group(const StringName& p_identifier) const { + + return group_map.has(p_identifier); +} void SceneTree::get_nodes_in_group(const StringName& p_group,List<Node*> *p_list) { @@ -1589,6 +1597,7 @@ void SceneTree::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_nodes_in_group","group"),&SceneTree::_get_nodes_in_group); ObjectTypeDB::bind_method(_MD("get_root:Viewport"),&SceneTree::get_root); + ObjectTypeDB::bind_method(_MD("has_group","name"),&SceneTree::has_group); ObjectTypeDB::bind_method(_MD("set_auto_accept_quit","enabled"),&SceneTree::set_auto_accept_quit); |