diff options
author | Julian Eisel <julian@blender.org> | 2022-06-30 19:36:42 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-06-30 19:38:44 +0300 |
commit | 65166e145b4d6292abc289b71894c53b25c186ba (patch) | |
tree | 707513038d00a964d7a400ac8e7e22251fffb02d /source/blender/editors/space_sequencer/sequencer_select.c | |
parent | 66de653784ab06ccea46413de6b2f086b5a69d30 (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_sequencer/sequencer_select.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_select.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index cfdbeaf0658..3f48404053d 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -589,8 +589,8 @@ static void sequencer_select_side_of_frame(const bContext *C, const float x = UI_view2d_region_to_view_x(v2d, mval[0]); LISTBASE_FOREACH (Sequence *, seq_iter, SEQ_active_seqbase_get(ed)) { - if (((x < CFRA) && (SEQ_time_right_handle_frame_get(scene, seq_iter) <= CFRA)) || - ((x >= CFRA) && (SEQ_time_left_handle_frame_get(scene, seq_iter) >= CFRA))) { + if (((x < scene->r.cfra) && (SEQ_time_right_handle_frame_get(scene, seq_iter) <= scene->r.cfra)) || + ((x >= scene->r.cfra) && (SEQ_time_left_handle_frame_get(scene, seq_iter) >= scene->r.cfra))) { /* Select left or right. */ seq_iter->flag |= SELECT; recurs_sel_seq(seq_iter); @@ -603,8 +603,8 @@ static void sequencer_select_side_of_frame(const bContext *C, TimeMarker *tmarker; for (tmarker = scene->markers.first; tmarker; tmarker = tmarker->next) { - if (((x < CFRA) && (tmarker->frame <= CFRA)) || - ((x >= CFRA) && (tmarker->frame >= CFRA))) { + if (((x < scene->r.cfra) && (tmarker->frame <= scene->r.cfra)) || + ((x >= scene->r.cfra) && (tmarker->frame >= scene->r.cfra))) { tmarker->flag |= SELECT; } else { @@ -1443,7 +1443,7 @@ static int sequencer_select_side_of_frame_exec(bContext *C, wmOperator *op) if (extend == false) { ED_sequencer_deselect_all(scene); } - const int timeline_frame = CFRA; + const int timeline_frame = scene->r.cfra; LISTBASE_FOREACH (Sequence *, seq, SEQ_active_seqbase_get(ed)) { bool test = false; switch (side) { |