From c1dcdf6109dbe29549517d683d85b81c0ade8611 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 11 Apr 2019 14:35:23 -0300 Subject: No more metadata and dependency indices kept in resources saved. -Node folding is now saved externally together with the properties -External resources remember their ID when scenes are saved. --- core/resource.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'core/resource.h') diff --git a/core/resource.h b/core/resource.h index a4d9e998ac..853b2859c7 100644 --- a/core/resource.h +++ b/core/resource.h @@ -88,7 +88,9 @@ protected: void _set_path(const String &p_path); void _take_over_path(const String &p_path); - +#ifdef TOOLS_ENABLED + Map id_for_path; +#endif public: static Node *(*_get_local_scene_func)(); //used by editor @@ -137,6 +139,12 @@ public: virtual RID get_rid() const; // some resources may offer conversion to RID +#ifdef TOOLS_ENABLED + //helps keep IDs same number when loading/saving scenes. -1 clears ID and it Returns -1 when no id stored + void set_id_for_path(const String &p_path, int p_id); + int get_id_for_path(const String &p_path) const; +#endif + Resource(); ~Resource(); }; -- cgit v1.2.3