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:
authorJulian Eisel <julian@blender.org>2022-06-30 19:36:42 +0300
committerJulian Eisel <julian@blender.org>2022-06-30 19:38:44 +0300
commit65166e145b4d6292abc289b71894c53b25c186ba (patch)
tree707513038d00a964d7a400ac8e7e22251fffb02d /source/blender/editors/space_graph/graph_ops.c
parent66de653784ab06ccea46413de6b2f086b5a69d30 (diff)
Cleanup: Remove scene frame macros (`CFRA` et al.)
Removes the following macros for scene/render frame values: - `CFRA` - `SUBFRA` - `SFRA` - `EFRA` These macros don't add much, other than saving a few characters when typing. It's not immediately clear what they refer to, they just hide what they actually access. Just be explicit and clear about that. Plus these macros gave read and write access to the variables, so eyesores like this would be done (eyesore because it looks like assigning to a constant): ``` CFRA = some_frame_nbr; ``` Reviewed By: sergey Differential Revision: https://developer.blender.org/D15311
Diffstat (limited to 'source/blender/editors/space_graph/graph_ops.c')
-rw-r--r--source/blender/editors/space_graph/graph_ops.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c
index 158f2eae88f..8deea21318c 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -72,21 +72,21 @@ static void graphview_cursor_apply(bContext *C, wmOperator *op)
* NOTE: sync this part of the code with ANIM_OT_change_frame
*/
/* 1) frame is rounded to the nearest int, since frames are ints */
- CFRA = round_fl_to_int(frame);
+ scene->r.cfra = round_fl_to_int(frame);
if (scene->r.flag & SCER_LOCK_FRAME_SELECTION) {
/* Clip to preview range
* NOTE: Preview range won't go into negative values,
* so only clamping once should be fine.
*/
- CLAMP(CFRA, PSFRA, PEFRA);
+ CLAMP(scene->r.cfra, PSFRA, PEFRA);
}
else {
/* Prevent negative frames */
- FRAMENUMBER_MIN_CLAMP(CFRA);
+ FRAMENUMBER_MIN_CLAMP(scene->r.cfra);
}
- SUBFRA = 0.0f;
+ scene->r.subframe = 0.0f;
DEG_id_tag_update(&scene->id, ID_RECALC_FRAME_CHANGE);
}