From 3d34df0e79d58e638ac7c94db18c8b3f6ca7b382 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Wed, 6 Mar 2019 12:50:24 -0300 Subject: [PATCH] Hide StreamTexture flags, fixes #26640 --- scene/resources/texture.cpp | 6 ++++++ scene/resources/texture.h | 1 + 2 files changed, 7 insertions(+) diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 08b2a05d435c..3ca2b56d0810 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 21d3782897b7..281a33929c27 100644 --- a/scene/resources/texture.h +++ b/scene/resources/texture.h @@ -203,6 +203,7 @@ class StreamTexture : public Texture { protected: static void _bind_methods(); + void _validate_property(PropertyInfo &property) const; public: typedef void (*TextureFormatRequestCallback)(const Ref &);