Skip to content

Commit

Permalink
Hide StreamTexture flags, fixes #26640
Browse files Browse the repository at this point in the history
  • Loading branch information
reduz committed Mar 6, 2019
1 parent 6eac688 commit 3d34df0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scene/resources/texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions scene/resources/texture.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<StreamTexture> &);
Expand Down

0 comments on commit 3d34df0

Please sign in to comment.