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/physics | |
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/physics')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 6 | ||||
-rw-r--r-- | source/blender/editors/physics/physics_fluid.c | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 0e03feba340..64d5ee91215 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -1512,7 +1512,7 @@ static void PE_update_selection(Depsgraph *depsgraph, Scene *scene, Object *ob, } } - psys_cache_edit_paths(depsgraph, scene, ob, edit, CFRA, G.is_rendering); + psys_cache_edit_paths(depsgraph, scene, ob, edit, scene->r.cfra, G.is_rendering); /* disable update flag */ LOOP_POINTS { @@ -1647,11 +1647,11 @@ void PE_update_object(Depsgraph *depsgraph, Scene *scene, Object *ob, int usefla * and flagging with PEK_HIDE will prevent selection. This might get restored once this is * supported in drawing (but doesn't make much sense for hair anyways). */ if (edit->psys && edit->psys->part->type == PART_EMITTER) { - PE_hide_keys_time(scene, edit, CFRA); + PE_hide_keys_time(scene, edit, scene->r.cfra); } /* regenerate path caches */ - psys_cache_edit_paths(depsgraph, scene, ob, edit, CFRA, G.is_rendering); + psys_cache_edit_paths(depsgraph, scene, ob, edit, scene->r.cfra, G.is_rendering); /* disable update flag */ LOOP_POINTS { diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 96195bdcc2e..80de8fae072 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -256,8 +256,8 @@ static void fluid_bake_sequence(FluidJob *job) frame = is_first_frame ? fds->cache_frame_start : (*pause_frame); /* Save orig frame and update scene frame. */ - orig_frame = CFRA; - CFRA = frame; + orig_frame = scene->r.cfra; + scene->r.cfra = frame; /* Loop through selected frames. */ for (; frame <= fds->cache_frame_end; frame++) { @@ -280,7 +280,7 @@ static void fluid_bake_sequence(FluidJob *job) *(job->progress) = progress; } - CFRA = frame; + scene->r.cfra = frame; /* Update animation system. */ ED_update_for_newframe(job->bmain, job->depsgraph); @@ -293,7 +293,7 @@ static void fluid_bake_sequence(FluidJob *job) } /* Restore frame position that we were on before bake. */ - CFRA = orig_frame; + scene->r.cfra = orig_frame; } static void fluid_bake_endjob(void *customdata) |