From 65166e145b4d6292abc289b71894c53b25c186ba Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Thu, 30 Jun 2022 18:36:42 +0200 Subject: 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 --- source/blender/editors/space_clip/clip_graph_ops.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/space_clip/clip_graph_ops.c') diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c index d07cf09ffa6..67565a88bab 100644 --- a/source/blender/editors/space_clip/clip_graph_ops.c +++ b/source/blender/editors/space_clip/clip_graph_ops.c @@ -629,8 +629,8 @@ static int view_all_exec(bContext *C, wmOperator *UNUSED(op)) NULL); /* set extents of view to start/end frames */ - v2d->cur.xmin = (float)SFRA; - v2d->cur.xmax = (float)EFRA; + v2d->cur.xmin = (float)scene->r.sfra; + v2d->cur.xmax = (float)scene->r.efra; if (userdata.min < userdata.max) { v2d->cur.ymin = userdata.min; @@ -675,8 +675,8 @@ void ED_clip_graph_center_current_frame(Scene *scene, ARegion *region) float extra = BLI_rctf_size_x(&v2d->cur) / 2.0f; /* set extents of view to start/end frames */ - v2d->cur.xmin = (float)CFRA - extra; - v2d->cur.xmax = (float)CFRA + extra; + v2d->cur.xmin = (float)scene->r.cfra - extra; + v2d->cur.xmax = (float)scene->r.cfra + extra; } static int center_current_frame_exec(bContext *C, wmOperator *UNUSED(op)) -- cgit v1.2.3