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_clip/clip_draw.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_clip/clip_draw.c')
-rw-r--r-- | source/blender/editors/space_clip/clip_draw.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index 171fb580fb7..78174160eb8 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -131,7 +131,7 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *region, MovieClip *clip { float x; int *points, totseg, i, a; - float sfra = SFRA, efra = EFRA, framelen = region->winx / (efra - sfra + 1); + float sfra = scene->r.sfra, efra = scene->r.efra, framelen = region->winx / (efra - sfra + 1); MovieTracking *tracking = &clip->tracking; MovieTrackingObject *act_object = BKE_tracking_object_get_active(tracking); MovieTrackingTrack *act_track = BKE_tracking_track_get_active(&clip->tracking); @@ -245,14 +245,16 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *region, MovieClip *clip /* solver keyframes */ immUniformColor4ub(175, 255, 0, 255); - draw_keyframe(act_object->keyframe1 + clip->start_frame - 1, CFRA, sfra, framelen, 2, pos); - draw_keyframe(act_object->keyframe2 + clip->start_frame - 1, CFRA, sfra, framelen, 2, pos); + draw_keyframe( + act_object->keyframe1 + clip->start_frame - 1, scene->r.cfra, sfra, framelen, 2, pos); + draw_keyframe( + act_object->keyframe2 + clip->start_frame - 1, scene->r.cfra, sfra, framelen, 2, pos); immUnbindProgram(); /* movie clip animation */ if ((sc->mode == SC_MODE_MASKEDIT) && sc->mask_info.mask) { - ED_mask_draw_frames(sc->mask_info.mask, region, CFRA, sfra, efra); + ED_mask_draw_frames(sc->mask_info.mask, region, scene->r.cfra, sfra, efra); } } |