diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-02-01 21:05:00 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-02-01 21:08:49 +0300 |
commit | 81159e99b819910b72cb3caba6b3cd4f35184ea9 (patch) | |
tree | 558a4f1fb544cbf1ebb8d0e0d531ca78a57dc6a7 /intern | |
parent | d70350403fb8e5a51a4449be0b5efc09cecdd975 (diff) |
Fix T61078: Cycles crash with adaptive smoke sim playback.
3D image dimensions should be updated on the Cycles side before loading
the smoke data.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/render/image.cpp | 4 | ||||
-rw-r--r-- | intern/cycles/render/image.h | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp index a8e6f41e57a..341a95c0258 100644 --- a/intern/cycles/render/image.cpp +++ b/intern/cycles/render/image.cpp @@ -333,6 +333,10 @@ int ImageManager::add_image(const string& filename, img->use_alpha = use_alpha; img->need_load = true; } + if(!(img->metadata == metadata)) { + img->metadata = metadata; + img->need_load = true; + } img->users++; return type_index_to_flattened_slot(slot, type); } diff --git a/intern/cycles/render/image.h b/intern/cycles/render/image.h index b608bc30e70..cd7130b3898 100644 --- a/intern/cycles/render/image.h +++ b/intern/cycles/render/image.h @@ -44,6 +44,18 @@ public: /* Automatically set. */ ImageDataType type; bool is_linear; + + bool operator==(const ImageMetaData& other) const + { + return is_float == other.is_float && + is_half == other.is_half && + channels == other.channels && + width == other.width && + height == other.height && + depth == other.depth && + type == other.type && + is_linear == other.is_linear; + } }; class ImageManager { |