summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/scene_format_text.cpp2
-rw-r--r--scene/resources/scene_format_text.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/scene/resources/scene_format_text.cpp b/scene/resources/scene_format_text.cpp
index 0faa0dc770..91c801c016 100644
--- a/scene/resources/scene_format_text.cpp
+++ b/scene/resources/scene_format_text.cpp
@@ -1312,6 +1312,8 @@ Error ResourceFormatLoaderText::rename_dependencies(const String &p_path, const
return ria->rename_dependencies(f, p_path, p_map);
}
+ResourceFormatLoaderText *ResourceFormatLoaderText::singleton = NULL;
+
Error ResourceFormatLoaderText::convert_file_to_binary(const String &p_src_path, const String &p_dst_path) {
Error err;
diff --git a/scene/resources/scene_format_text.h b/scene/resources/scene_format_text.h
index c014b9bfae..c28ded3d77 100644
--- a/scene/resources/scene_format_text.h
+++ b/scene/resources/scene_format_text.h
@@ -128,7 +128,9 @@ public:
};
class ResourceFormatLoaderText : public ResourceFormatLoader {
+
public:
+ static ResourceFormatLoaderText *singleton;
virtual Ref<ResourceInteractiveLoader> load_interactive(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const;
virtual void get_recognized_extensions(List<String> *p_extensions) const;
@@ -138,6 +140,8 @@ public:
virtual Error rename_dependencies(const String &p_path, const Map<String, String> &p_map);
static Error convert_file_to_binary(const String &p_src_path, const String &p_dst_path);
+
+ ResourceFormatLoaderText() { singleton = this; }
};
class ResourceFormatSaverTextInstance {