diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-06-10 11:35:45 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-06-10 11:35:45 +0400 |
commit | 0586705b63fba83a70d38ea7e3035212971ce852 (patch) | |
tree | 9108da46488656e34ce06766162b5b204b091742 /intern/cycles | |
parent | 0d6ffd925df0c4a5658d6195ca0e535f0e09fdac (diff) |
Fix #31747, broken image sequence loading after r47432.
The image file name function was updating the iuser->framenr using a supposed cfra parameter. However, the actual cfra is unknown when loading movies or sequences, so the iuser->framenr value itself was passed in its place, leading to incremental addition of the iuser frame offset. Removed the cfra parameter altogether from the image path function. This should instead be done separately if necessary, it's not an inherent part of constructing the image file name.
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/blender/blender_util.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h index 9b9e0d3a425..b5a76836bed 100644 --- a/intern/cycles/blender/blender_util.h +++ b/intern/cycles/blender/blender_util.h @@ -53,7 +53,8 @@ int rna_Object_is_deform_modified(void *ob, void *scene, int settings); void BLI_timestr(double _time, char *str); void rna_ColorRamp_eval(void *coba, float position, float color[4]); void rna_Scene_frame_set(void *scene, int frame, float subframe); -void BKE_image_user_file_path(void *iuser, void *ima, int cfra, char *path); +void BKE_image_user_frame_calc(void *iuser, int cfra, int fieldnr); +void BKE_image_user_file_path(void *iuser, void *ima, char *path); } @@ -105,7 +106,8 @@ static inline bool BKE_object_is_deform_modified(BL::Object self, BL::Scene scen static inline string image_user_file_path(BL::ImageUser iuser, BL::Image ima, int cfra) { char filepath[1024]; - BKE_image_user_file_path(iuser.ptr.data, ima.ptr.data, cfra, filepath); + BKE_image_user_frame_calc(iuser.ptr.data, cfra, 0); + BKE_image_user_file_path(iuser.ptr.data, ima.ptr.data, filepath); return string(filepath); } |