2
0
Эх сурвалжийг харах

Hide StreamTexture flags, fixes #26640

Juan Linietsky 6 жил өмнө
parent
commit
3d34df0e79

+ 6 - 0
scene/resources/texture.cpp

@@ -842,6 +842,12 @@ void StreamTexture::reload_from_file() {
 	load(path);
 	load(path);
 }
 }
 
 
+void StreamTexture::_validate_property(PropertyInfo &property) const {
+	if (property.name == "flags") {
+		property.usage = PROPERTY_USAGE_NOEDITOR;
+	}
+}
+
 void StreamTexture::_bind_methods() {
 void StreamTexture::_bind_methods() {
 
 
 	ClassDB::bind_method(D_METHOD("load", "path"), &StreamTexture::load);
 	ClassDB::bind_method(D_METHOD("load", "path"), &StreamTexture::load);

+ 1 - 0
scene/resources/texture.h

@@ -203,6 +203,7 @@ private:
 
 
 protected:
 protected:
 	static void _bind_methods();
 	static void _bind_methods();
+	void _validate_property(PropertyInfo &property) const;
 
 
 public:
 public:
 	typedef void (*TextureFormatRequestCallback)(const Ref<StreamTexture> &);
 	typedef void (*TextureFormatRequestCallback)(const Ref<StreamTexture> &);