diff options
Diffstat (limited to 'core/resource.h')
-rw-r--r-- | core/resource.h | 54 |
1 files changed, 8 insertions, 46 deletions
diff --git a/core/resource.h b/core/resource.h index 2b071c8e1c..b29077a3b8 100644 --- a/core/resource.h +++ b/core/resource.h @@ -46,47 +46,6 @@ virtual String get_base_extension() const { return m_ext; }\ private: -class ResourceImportMetadata : public Reference { - - GDCLASS( ResourceImportMetadata, Reference ); - - struct Source { - String path; - String md5; - }; - - Vector<Source> sources; - String editor; - - Map<String,Variant> options; - - PoolStringArray _get_options() const; - -protected: - - static void _bind_methods(); -public: - - void set_editor(const String& p_editor); - String get_editor() const; - - void add_source(const String& p_path,const String& p_md5=""); - String get_source_path(int p_idx) const; - String get_source_md5(int p_idx) const; - void set_source_md5(int p_idx,const String& p_md5); - void remove_source(int p_idx); - int get_source_count() const; - - void set_option(const String& p_key, const Variant& p_value); - Variant get_option(const String& p_key) const; - bool has_option(const String& p_key) const; - - void get_options(List<String> *r_options) const; - - - ResourceImportMetadata(); -}; - class Resource : public Reference { @@ -106,8 +65,9 @@ friend class ResourceCache; virtual bool _use_builtin_script() const { return true; } #ifdef TOOLS_ENABLED - Ref<ResourceImportMetadata> import_metadata; uint64_t last_modified_time; + uint64_t import_last_modified_time; + String import_path; #endif bool local_to_scene; @@ -147,10 +107,6 @@ public: Ref<Resource> duplicate(bool p_subresources=false); Ref<Resource> duplicate_for_local_scene(Node *p_scene,Map<Ref<Resource>,Ref<Resource> >& remap_cache); - - void set_import_metadata(const Ref<ResourceImportMetadata>& p_metadata); - Ref<ResourceImportMetadata> get_import_metadata() const; - void set_local_to_scene(bool p_enable); bool is_local_to_scene() const; virtual void setup_local_to_scene(); @@ -164,6 +120,12 @@ public: virtual void set_last_modified_time(uint64_t p_time) { last_modified_time=p_time; } uint64_t get_last_modified_time() const { return last_modified_time; } + virtual void set_import_last_modified_time(uint64_t p_time) { import_last_modified_time=p_time; } + uint64_t get_import_last_modified_time() const { return import_last_modified_time; } + + void set_import_path(const String& p_path) { import_path=p_path; } + String get_import_path() const { return import_path; } + #endif virtual RID get_rid() const; // some resources may offer conversion to RID |