Removed support for saving paths as relative, closes #5728
Editor now has good refactoring tools, so this function is mostly obsolete
This commit is contained in:
parent
e4cd01ac8c
commit
3aeafcae04
6 changed files with 14 additions and 12 deletions
|
@ -38,6 +38,8 @@ class ImmediateGeometry : public GeometryInstance {
|
||||||
|
|
||||||
|
|
||||||
RID im;
|
RID im;
|
||||||
|
//a list of texures drawn need to be kept, to avoid references
|
||||||
|
// in VisualServer from becoming invalid if the texture is no longer used
|
||||||
List<Ref<Texture> > cached_textures;
|
List<Ref<Texture> > cached_textures;
|
||||||
bool empty;
|
bool empty;
|
||||||
AABB aabb;
|
AABB aabb;
|
||||||
|
|
|
@ -565,8 +565,8 @@ void EditorNode::save_resource_in_path(const Ref<Resource>& p_resource,const Str
|
||||||
int flg=0;
|
int flg=0;
|
||||||
if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources"))
|
if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources"))
|
||||||
flg|=ResourceSaver::FLAG_COMPRESS;
|
flg|=ResourceSaver::FLAG_COMPRESS;
|
||||||
if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative"))
|
//if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative"))
|
||||||
flg|=ResourceSaver::FLAG_RELATIVE_PATHS;
|
// flg|=ResourceSaver::FLAG_RELATIVE_PATHS;
|
||||||
|
|
||||||
String path = Globals::get_singleton()->localize_path(p_path);
|
String path = Globals::get_singleton()->localize_path(p_path);
|
||||||
Error err = ResourceSaver::save(path,p_resource,flg|ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
|
Error err = ResourceSaver::save(path,p_resource,flg|ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
|
||||||
|
@ -1012,8 +1012,8 @@ void EditorNode::_save_scene(String p_file, int idx) {
|
||||||
int flg=0;
|
int flg=0;
|
||||||
if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources"))
|
if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources"))
|
||||||
flg|=ResourceSaver::FLAG_COMPRESS;
|
flg|=ResourceSaver::FLAG_COMPRESS;
|
||||||
if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative"))
|
//if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative"))
|
||||||
flg|=ResourceSaver::FLAG_RELATIVE_PATHS;
|
// flg|=ResourceSaver::FLAG_RELATIVE_PATHS;
|
||||||
flg|=ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS;
|
flg|=ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -611,8 +611,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
||||||
|
|
||||||
set("on_save/compress_binary_resources",true);
|
set("on_save/compress_binary_resources",true);
|
||||||
set("on_save/save_modified_external_resources",true);
|
set("on_save/save_modified_external_resources",true);
|
||||||
set("on_save/save_paths_as_relative",false);
|
//set("on_save/save_paths_as_relative",false);
|
||||||
set("on_save/save_paths_without_extension",false);
|
//set("on_save/save_paths_without_extension",false);
|
||||||
|
|
||||||
set("text_editor/create_signal_callbacks",true);
|
set("text_editor/create_signal_callbacks",true);
|
||||||
|
|
||||||
|
|
|
@ -377,8 +377,8 @@ void AnimationPlayerEditor::_animation_save_in_path(const Ref<Resource>& p_resou
|
||||||
int flg = 0;
|
int flg = 0;
|
||||||
if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources"))
|
if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources"))
|
||||||
flg |= ResourceSaver::FLAG_COMPRESS;
|
flg |= ResourceSaver::FLAG_COMPRESS;
|
||||||
if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative"))
|
//if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative"))
|
||||||
flg |= ResourceSaver::FLAG_RELATIVE_PATHS;
|
// flg |= ResourceSaver::FLAG_RELATIVE_PATHS;
|
||||||
|
|
||||||
String path = Globals::get_singleton()->localize_path(p_path);
|
String path = Globals::get_singleton()->localize_path(p_path);
|
||||||
Error err = ResourceSaver::save(path, p_resource, flg | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
|
Error err = ResourceSaver::save(path, p_resource, flg | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
|
||||||
|
|
|
@ -126,8 +126,8 @@ void ResourcesDock::save_resource(const String& p_path,const Ref<Resource>& p_re
|
||||||
int flg=0;
|
int flg=0;
|
||||||
if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources"))
|
if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources"))
|
||||||
flg|=ResourceSaver::FLAG_COMPRESS;
|
flg|=ResourceSaver::FLAG_COMPRESS;
|
||||||
if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative"))
|
//if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative"))
|
||||||
flg|=ResourceSaver::FLAG_RELATIVE_PATHS;
|
// flg|=ResourceSaver::FLAG_RELATIVE_PATHS;
|
||||||
|
|
||||||
String path = Globals::get_singleton()->localize_path(p_path);
|
String path = Globals::get_singleton()->localize_path(p_path);
|
||||||
Error err = ResourceSaver::save(path,p_resource,flg|ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
|
Error err = ResourceSaver::save(path,p_resource,flg|ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
|
||||||
|
|
|
@ -1489,8 +1489,8 @@ void SceneTreeDock::_new_scene_from(String p_file) {
|
||||||
int flg=0;
|
int flg=0;
|
||||||
if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources"))
|
if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources"))
|
||||||
flg|=ResourceSaver::FLAG_COMPRESS;
|
flg|=ResourceSaver::FLAG_COMPRESS;
|
||||||
if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative"))
|
//if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative"))
|
||||||
flg|=ResourceSaver::FLAG_RELATIVE_PATHS;
|
// flg|=ResourceSaver::FLAG_RELATIVE_PATHS;
|
||||||
|
|
||||||
|
|
||||||
err = ResourceSaver::save(p_file,sdata,flg);
|
err = ResourceSaver::save(p_file,sdata,flg);
|
||||||
|
|
Loading…
Reference in a new issue