From 2ea565b0ec94136d01fb3ff5bdc31cecfe1c2440 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 12 Jul 2021 16:15:03 +0200 Subject: Cleanup: improve naming and comments of scene frame/ctime functions Confusingly, BKE_scene_frame_get did not match the frame number as expected by BKE_scene_frame_set. Instead it return the value after time remapping, which is commonly named "ctime". * Rename BKE_scene_frame_get to BKE_scene_ctime_get * Add a new BKE_scene_frame_get that matches BKE_scene_frame_set * Use int/float depending if fractional frame is expected --- source/blender/blenkernel/intern/cachefile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/cachefile.c') diff --git a/source/blender/blenkernel/intern/cachefile.c b/source/blender/blenkernel/intern/cachefile.c index 30e9ae39b67..eaba5d33a20 100644 --- a/source/blender/blenkernel/intern/cachefile.c +++ b/source/blender/blenkernel/intern/cachefile.c @@ -314,7 +314,7 @@ bool BKE_cachefile_filepath_get(const Main *bmain, if (cache_file->is_sequence && BLI_path_frame_get(r_filepath, &fframe, &frame_len)) { Scene *scene = DEG_get_evaluated_scene(depsgraph); - const float ctime = BKE_scene_frame_get(scene); + const float ctime = BKE_scene_ctime_get(scene); const float fps = (((double)scene->r.frs_sec) / (double)scene->r.frs_sec_base); const float frame = BKE_cachefile_time_offset(cache_file, ctime, fps); -- cgit v1.2.3