summaryrefslogtreecommitdiff
path: root/tools/editor
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-06-27 13:17:20 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-06-27 13:17:20 -0300
commitefdcf205d2b428580ee9b4a50572649bc06b4276 (patch)
tree3d091cf77bd4033436a0d33314c021efbe6e4239 /tools/editor
parent88e28af5e360d826ee0e83944dff0003375e3daf (diff)
Make most resources (save for packedscenes and scripts) reload if they change on disk. Closes #4059.
Diffstat (limited to 'tools/editor')
-rw-r--r--tools/editor/editor_node.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 3ba9f3b799..35b41a8bb9 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -2804,10 +2804,12 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
List<Ref<Resource> > cached;
ResourceCache::get_cached_resources(&cached);
-
+ //this should probably be done in a thread..
for(List<Ref<Resource> >::Element *E=cached.front();E;E=E->next()) {
- if (!E->get()->can_reload_from_file())
+ if (!E->get()->editor_can_reload_from_file())
+ continue;
+ if (!E->get()->get_path().is_resource_file() && !E->get()->get_path().is_abs_path())
continue;
if (!FileAccess::exists(E->get()->get_path()))
continue;