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/transform/transform_convert_nla.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/transform/transform_convert_nla.c')
-rw-r--r-- | source/blender/editors/transform/transform_convert_nla.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/transform/transform_convert_nla.c b/source/blender/editors/transform/transform_convert_nla.c index 2fa8fcf65ba..b2c0cc553a7 100644 --- a/source/blender/editors/transform/transform_convert_nla.c +++ b/source/blender/editors/transform/transform_convert_nla.c @@ -87,7 +87,7 @@ void createTransNlaData(bContext *C, TransInfo *t) /* which side of the current frame should be allowed */ if (t->mode == TFM_TIME_EXTEND) { - t->frame_side = transform_convert_frame_side_dir_get(t, (float)CFRA); + t->frame_side = transform_convert_frame_side_dir_get(t, (float)scene->r.cfra); } else { /* normal transform - both sides of current frame are considered */ @@ -108,10 +108,10 @@ void createTransNlaData(bContext *C, TransInfo *t) /* transition strips can't get directly transformed */ if (strip->type != NLASTRIP_TYPE_TRANSITION) { if (strip->flag & NLASTRIP_FLAG_SELECT) { - if (FrameOnMouseSide(t->frame_side, strip->start, (float)CFRA)) { + if (FrameOnMouseSide(t->frame_side, strip->start, (float)scene->r.cfra)) { count++; } - if (FrameOnMouseSide(t->frame_side, strip->end, (float)CFRA)) { + if (FrameOnMouseSide(t->frame_side, strip->end, (float)scene->r.cfra)) { count++; } } @@ -122,7 +122,7 @@ void createTransNlaData(bContext *C, TransInfo *t) /* stop if trying to build list if nothing selected */ if (count == 0) { /* clear temp metas that may have been created but aren't needed now - * because they fell on the wrong side of CFRA + * because they fell on the wrong side of scene->r.cfra */ for (ale = anim_data.first; ale; ale = ale->next) { NlaTrack *nlt = (NlaTrack *)ale->data; @@ -181,12 +181,12 @@ void createTransNlaData(bContext *C, TransInfo *t) tdn->h2[0] = strip->end; tdn->h2[1] = yval; - center[0] = (float)CFRA; + center[0] = (float)scene->r.cfra; center[1] = yval; center[2] = 0.0f; /* set td's based on which handles are applicable */ - if (FrameOnMouseSide(t->frame_side, strip->start, (float)CFRA)) { + if (FrameOnMouseSide(t->frame_side, strip->start, (float)scene->r.cfra)) { /* just set tdn to assume that it only has one handle for now */ tdn->handle = -1; @@ -206,7 +206,7 @@ void createTransNlaData(bContext *C, TransInfo *t) td->extra = tdn; td++; } - if (FrameOnMouseSide(t->frame_side, strip->end, (float)CFRA)) { + if (FrameOnMouseSide(t->frame_side, strip->end, (float)scene->r.cfra)) { /* if tdn is already holding the start handle, * then we're doing both, otherwise, only end */ tdn->handle = (tdn->handle) ? 2 : 1; |