Fixing textures not triggering _change_notify

This commit is contained in:
groud 2019-01-23 21:47:54 +01:00
parent 2c9536b655
commit 0577f93cf6

View File

@ -185,6 +185,7 @@ void ImageTexture::create(int p_width, int p_height, Image::Format p_format, uin
format = p_format; format = p_format;
w = p_width; w = p_width;
h = p_height; h = p_height;
_change_notify();
} }
void ImageTexture::create_from_image(const Ref<Image> &p_image, uint32_t p_flags) { void ImageTexture::create_from_image(const Ref<Image> &p_image, uint32_t p_flags) {
@ -211,6 +212,7 @@ void ImageTexture::set_flags(uint32_t p_flags) {
return; //uninitialized, do not set to texture return; //uninitialized, do not set to texture
} }
VisualServer::get_singleton()->texture_set_flags(texture, p_flags); VisualServer::get_singleton()->texture_set_flags(texture, p_flags);
_change_notify("flags");
} }
uint32_t ImageTexture::get_flags() const { uint32_t ImageTexture::get_flags() const {
@ -712,6 +714,7 @@ Error StreamTexture::load(const String &p_path) {
path_to_file = p_path; path_to_file = p_path;
format = image->get_format(); format = image->get_format();
_change_notify();
return OK; return OK;
} }
String StreamTexture::get_load_path() const { String StreamTexture::get_load_path() const {
@ -801,6 +804,7 @@ bool StreamTexture::is_pixel_opaque(int p_x, int p_y) const {
void StreamTexture::set_flags(uint32_t p_flags) { void StreamTexture::set_flags(uint32_t p_flags) {
flags = p_flags; flags = p_flags;
VS::get_singleton()->texture_set_flags(texture, flags); VS::get_singleton()->texture_set_flags(texture, flags);
_change_notify("flags");
} }
void StreamTexture::reload_from_file() { void StreamTexture::reload_from_file() {