Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2021-07-12 17:15:03 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-07-12 18:41:15 +0300
commit2ea565b0ec94136d01fb3ff5bdc31cecfe1c2440 (patch)
treedaf7a21f5fc3af2b75c74978e13e7d7072e2c905 /source/blender/editors/space_action
parentf709f12d93583d7e476077753241227eb4030954 (diff)
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
Diffstat (limited to 'source/blender/editors/space_action')
-rw-r--r--source/blender/editors/space_action/action_data.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_action/action_data.c b/source/blender/editors/space_action/action_data.c
index 9e69b0a72db..d69c7ab8d48 100644
--- a/source/blender/editors/space_action/action_data.c
+++ b/source/blender/editors/space_action/action_data.c
@@ -813,7 +813,7 @@ static int action_layer_next_exec(bContext *C, wmOperator *op)
NlaTrack *act_track;
Scene *scene = CTX_data_scene(C);
- float ctime = BKE_scene_frame_get(scene);
+ float ctime = BKE_scene_ctime_get(scene);
/* Get active track */
act_track = BKE_nlatrack_find_tweaked(adt);
@@ -925,7 +925,7 @@ static int action_layer_prev_exec(bContext *C, wmOperator *op)
NlaTrack *nlt;
Scene *scene = CTX_data_scene(C);
- float ctime = BKE_scene_frame_get(scene);
+ float ctime = BKE_scene_ctime_get(scene);
/* Sanity Check */
if (adt == NULL) {