summaryrefslogtreecommitdiffstats
path: root/core/resource.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-04-11 14:35:23 -0300
committerJuan Linietsky <reduzio@gmail.com>2019-04-11 14:36:58 -0300
commitc1dcdf6109dbe29549517d683d85b81c0ade8611 (patch)
tree08f36df9d058386df46f0eaae81939b8cedf2704 /core/resource.h
parentabb8e9712239bae7e1d3524c1ae1b96b6c8d4c3b (diff)
downloadredot-engine-c1dcdf6109dbe29549517d683d85b81c0ade8611.tar.gz
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.
Diffstat (limited to 'core/resource.h')
-rw-r--r--core/resource.h10
1 files changed, 9 insertions, 1 deletions
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<String, int> 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();
};