summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorJuan Linietsky <juan@godotengine.org>2019-03-06 12:50:24 -0300
committerJuan Linietsky <juan@godotengine.org>2019-03-06 12:50:24 -0300
commit3d34df0e79d58e638ac7c94db18c8b3f6ca7b382 (patch)
treee97a405b3fb5941750ee75282693ef7301467ea8 /scene/resources
parent6eac6889520aa901fbff75a744e69c3fada11fdb (diff)
Hide StreamTexture flags, fixes #26640
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/texture.cpp6
-rw-r--r--scene/resources/texture.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 08b2a05d43..3ca2b56d08 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -842,6 +842,12 @@ void StreamTexture::reload_from_file() {
load(path);
}
+void StreamTexture::_validate_property(PropertyInfo &property) const {
+ if (property.name == "flags") {
+ property.usage = PROPERTY_USAGE_NOEDITOR;
+ }
+}
+
void StreamTexture::_bind_methods() {
ClassDB::bind_method(D_METHOD("load", "path"), &StreamTexture::load);
diff --git a/scene/resources/texture.h b/scene/resources/texture.h
index 21d3782897..281a33929c 100644
--- a/scene/resources/texture.h
+++ b/scene/resources/texture.h
@@ -203,6 +203,7 @@ private:
protected:
static void _bind_methods();
+ void _validate_property(PropertyInfo &property) const;
public:
typedef void (*TextureFormatRequestCallback)(const Ref<StreamTexture> &);