diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-03-27 15:26:10 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-03-27 15:26:10 +0400 |
commit | 68d8c6ad3d9aa54219da9bce4abdb4bc424a3154 (patch) | |
tree | d1cb04bc8ebe7575f2a62e23a6fe272976687908 /source/blender/blenkernel/intern/image.c | |
parent | cb6f4160cce25fb3f233e0e0a623d035836caa32 (diff) |
Fix #34779: Channels disappear from multilayer exr sequence
Issue was caused by delayed or missing image user frame
number update, which lead to image loading failure in
cases node is updating from image signal callback.
Solved in a way that file from image datablock is used
for sockets detection instead of loading image for
current frame.
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 26651d76f68..c9034cfe7bb 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -3430,3 +3430,15 @@ float *BKE_image_get_float_pixels_for_frame(struct Image *image, int frame) return pixels; } + +int BKE_image_sequence_guess_offset(Image *image) +{ + unsigned short numlen; + char head[FILE_MAX], tail[FILE_MAX]; + char num[FILE_MAX] = {0}; + + BLI_stringdec(image->name, head, tail, &numlen); + BLI_strncpy(num, image->name + strlen(head), numlen + 1); + + return atoi(num); +} |