Fix T79111: Cycles: Image Sequence not rendering
Caused by c7aa0f9d74
.
Since above commit, BKE_image_user_frame_calc requires an image (not
just the iuser) to get the framenumber.
Cycles used to call this with NULL image (in `image_user_file_path` and
`image_user_frame_number`), now pass the image as well.
Maniphest Tasks: T79111
Differential Revision: https://developer.blender.org/D8439
This commit is contained in:
parent
1ff1a2be9c
commit
cab9673bed
Notes:
blender-bot
2023-02-13 23:17:13 +01:00
Referenced by issue #80180, Shader Editor Image Sequence don't show up Referenced by issue #80062, cycles not rendering image sequence Referenced by issue #79952, Cycles video texture bug (fixed in 2.90 beta and 2.91 alpha -- 2.83 LTS issue) Referenced by issue #79312, Videos imported only render the first frame of the respective video file Referenced by issue #79111, Cycles: Image Sequence not rendering Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
|
@ -678,7 +678,7 @@ static ShaderNode *add_node(Scene *scene,
|
|||
* builtin names for packed images and movies
|
||||
*/
|
||||
int scene_frame = b_scene.frame_current();
|
||||
int image_frame = image_user_frame_number(b_image_user, scene_frame);
|
||||
int image_frame = image_user_frame_number(b_image_user, b_image, scene_frame);
|
||||
image->handle = scene->image_manager->add_image(
|
||||
new BlenderImageLoader(b_image, image_frame), image->image_params());
|
||||
}
|
||||
|
@ -713,7 +713,7 @@ static ShaderNode *add_node(Scene *scene,
|
|||
|
||||
if (is_builtin) {
|
||||
int scene_frame = b_scene.frame_current();
|
||||
int image_frame = image_user_frame_number(b_image_user, scene_frame);
|
||||
int image_frame = image_user_frame_number(b_image_user, b_image, scene_frame);
|
||||
env->handle = scene->image_manager->add_image(new BlenderImageLoader(b_image, image_frame),
|
||||
env->image_params());
|
||||
}
|
||||
|
|
|
@ -238,7 +238,7 @@ static inline string image_user_file_path(BL::ImageUser &iuser,
|
|||
{
|
||||
char filepath[1024];
|
||||
iuser.tile(0);
|
||||
BKE_image_user_frame_calc(NULL, iuser.ptr.data, cfra);
|
||||
BKE_image_user_frame_calc(ima.ptr.data, iuser.ptr.data, cfra);
|
||||
BKE_image_user_file_path(iuser.ptr.data, ima.ptr.data, filepath);
|
||||
|
||||
string filepath_str = string(filepath);
|
||||
|
@ -248,9 +248,9 @@ static inline string image_user_file_path(BL::ImageUser &iuser,
|
|||
return filepath_str;
|
||||
}
|
||||
|
||||
static inline int image_user_frame_number(BL::ImageUser &iuser, int cfra)
|
||||
static inline int image_user_frame_number(BL::ImageUser &iuser, BL::Image &ima, int cfra)
|
||||
{
|
||||
BKE_image_user_frame_calc(NULL, iuser.ptr.data, cfra);
|
||||
BKE_image_user_frame_calc(ima.ptr.data, iuser.ptr.data, cfra);
|
||||
return iuser.frame_current();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue