Fix T61078: Cycles crash with adaptive smoke sim playback.

3D image dimensions should be updated on the Cycles side before loading
the smoke data.
This commit is contained in:
Brecht Van Lommel
2019-02-01 19:05:00 +01:00
parent d70350403f
commit 81159e99b8
2 changed files with 16 additions and 0 deletions

View File

@@ -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);
}

View File

@@ -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 {