Automatically unfold sections of properties that someone else edited (no local info exists).

This commit is contained in:
Juan Linietsky
2018-10-29 17:38:51 -03:00
parent 4d9b8a98ba
commit 4761c6bb7b
7 changed files with 63 additions and 9 deletions

View File

@ -1,5 +1,6 @@
#include "editor_folding.h"
#include "core/os/file_access.h"
#include "editor_settings.h"
PoolVector<String> EditorFolding::_get_unfolds(const Object *p_object) {
@ -164,5 +165,12 @@ void EditorFolding::load_scene_folding(Node *p_scene, const String &p_path) {
}
}
bool EditorFolding::has_folding_data(const String &p_path) {
String path = EditorSettings::get_singleton()->get_project_settings_dir();
String file = p_path.get_file() + "-folding-" + p_path.md5_text() + ".cfg";
file = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(file);
return FileAccess::exists(file);
}
EditorFolding::EditorFolding() {
}