summaryrefslogtreecommitdiffstats
path: root/scene/resources
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-06-27 13:17:20 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-06-27 13:17:20 -0300
commitefdcf205d2b428580ee9b4a50572649bc06b4276 (patch)
tree3d091cf77bd4033436a0d33314c021efbe6e4239 /scene/resources
parent88e28af5e360d826ee0e83944dff0003375e3daf (diff)
downloadredot-engine-efdcf205d2b428580ee9b4a50572649bc06b4276.tar.gz
Make most resources (save for packedscenes and scripts) reload if they change on disk. Closes #4059.
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/packed_scene.h1
-rw-r--r--scene/resources/sample.cpp2
-rw-r--r--scene/resources/sample.h1
-rw-r--r--scene/resources/texture.cpp4
-rw-r--r--scene/resources/texture.h1
5 files changed, 4 insertions, 5 deletions
diff --git a/scene/resources/packed_scene.h b/scene/resources/packed_scene.h
index 6bde508d72..3b6c0898e0 100644
--- a/scene/resources/packed_scene.h
+++ b/scene/resources/packed_scene.h
@@ -196,6 +196,7 @@ class PackedScene : public Resource {
protected:
+ virtual bool editor_can_reload_from_file() { return false; } // this is handled by editor better
static void _bind_methods();
public:
diff --git a/scene/resources/sample.cpp b/scene/resources/sample.cpp
index 87fcfc425d..aae4e85a27 100644
--- a/scene/resources/sample.cpp
+++ b/scene/resources/sample.cpp
@@ -187,6 +187,8 @@ RID Sample::get_rid() const {
return sample;
}
+
+
void Sample::_bind_methods(){
diff --git a/scene/resources/sample.h b/scene/resources/sample.h
index 0a88167233..18672e41c0 100644
--- a/scene/resources/sample.h
+++ b/scene/resources/sample.h
@@ -75,6 +75,7 @@ protected:
public:
+
void create(Format p_format, bool p_stereo, int p_length);
Format get_format() const;
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 2fa00c7da7..726b1938c4 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -98,10 +98,6 @@ Texture::Texture() {
-bool ImageTexture::can_reload_from_file() {
-
- return true;
-}
void ImageTexture::reload_from_file() {
diff --git a/scene/resources/texture.h b/scene/resources/texture.h
index 103b425cd8..05ea833978 100644
--- a/scene/resources/texture.h
+++ b/scene/resources/texture.h
@@ -103,7 +103,6 @@ private:
float lossy_storage_quality;
protected:
- virtual bool can_reload_from_file();
virtual void reload_from_file();
bool _set(const StringName& p_name, const Variant& p_value);