diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-09-20 20:59:19 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-09-20 21:04:20 -0300 |
commit | 423ca9bcaf4781abd62db47d6f232c279af72429 (patch) | |
tree | a610ea87af0313129fc27fa1f75f3d422eee697e /core/io/resource_import.h | |
parent | 71e4fae3a1fb8ab684f5366442e5325ebcb99d8d (diff) | |
download | redot-engine-423ca9bcaf4781abd62db47d6f232c279af72429.tar.gz |
Fix import order, so scenes are imported after textures.
Also fix bugs when meshes are always generated.
Diffstat (limited to 'core/io/resource_import.h')
-rw-r--r-- | core/io/resource_import.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/io/resource_import.h b/core/io/resource_import.h index b10255fbab..28489b5d34 100644 --- a/core/io/resource_import.h +++ b/core/io/resource_import.h @@ -38,6 +38,7 @@ class ResourceFormatImporter : public ResourceFormatLoader { struct PathAndType { String path; String type; + String importer; }; Error _get_path_and_type(const String &p_path, PathAndType &r_path_and_type, bool *r_valid = NULL) const; @@ -58,14 +59,15 @@ public: virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false); virtual bool can_be_imported(const String &p_path) const; + virtual int get_import_order(const String &p_path) const; String get_internal_resource_path(const String &p_path) const; void get_internal_resource_path_list(const String &p_path, List<String> *r_paths); void add_importer(const Ref<ResourceImporter> &p_importer) { importers.insert(p_importer); } void remove_importer(const Ref<ResourceImporter> &p_importer) { importers.erase(p_importer); } - Ref<ResourceImporter> get_importer_by_name(const String &p_name); - Ref<ResourceImporter> get_importer_by_extension(const String &p_extension); + Ref<ResourceImporter> get_importer_by_name(const String &p_name) const; + Ref<ResourceImporter> get_importer_by_extension(const String &p_extension) const; void get_importers_for_extension(const String &p_extension, List<Ref<ResourceImporter> > *r_importers); String get_import_base_path(const String &p_for_file) const; @@ -82,6 +84,7 @@ public: virtual String get_save_extension() const = 0; virtual String get_resource_type() const = 0; virtual float get_priority() const { return 1.0; } + virtual int get_import_order() const { return 0; } struct ImportOption { PropertyInfo option; |