Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2021-07-12 17:15:03 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-07-12 18:41:15 +0300
commit2ea565b0ec94136d01fb3ff5bdc31cecfe1c2440 (patch)
treedaf7a21f5fc3af2b75c74978e13e7d7072e2c905 /source/blender/render
parentf709f12d93583d7e476077753241227eb4030954 (diff)
Cleanup: improve naming and comments of scene frame/ctime functions
Confusingly, BKE_scene_frame_get did not match the frame number as expected by BKE_scene_frame_set. Instead it return the value after time remapping, which is commonly named "ctime". * Rename BKE_scene_frame_get to BKE_scene_ctime_get * Add a new BKE_scene_frame_get that matches BKE_scene_frame_set * Use int/float depending if fractional frame is expected
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/pipeline.c2
-rw-r--r--source/blender/render/intern/texture_pointdensity.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/render/intern/pipeline.c b/source/blender/render/intern/pipeline.c
index bc03158f036..eb2b58a46cb 100644
--- a/source/blender/render/intern/pipeline.c
+++ b/source/blender/render/intern/pipeline.c
@@ -2410,7 +2410,7 @@ void RE_RenderAnim(Render *re,
* -sergey-
*/
{
- float ctime = BKE_scene_frame_get(scene);
+ float ctime = BKE_scene_ctime_get(scene);
AnimData *adt = BKE_animdata_from_id(&scene->id);
const AnimationEvalContext anim_eval_context = BKE_animsys_eval_context_construct(
re->pipeline_depsgraph, ctime);
diff --git a/source/blender/render/intern/texture_pointdensity.c b/source/blender/render/intern/texture_pointdensity.c
index c0ff00d4f59..8c578976059 100644
--- a/source/blender/render/intern/texture_pointdensity.c
+++ b/source/blender/render/intern/texture_pointdensity.c
@@ -169,7 +169,7 @@ static void pointdensity_cache_psys(
ParticleCacheKey *cache;
ParticleSimulationData sim = {NULL};
ParticleData *pa = NULL;
- float cfra = BKE_scene_frame_get(scene);
+ float cfra = BKE_scene_ctime_get(scene);
int i /*, Childexists*/ /* UNUSED */;
int total_particles;
int data_used;
@@ -782,7 +782,7 @@ static void particle_system_minmax(Depsgraph *depsgraph,
float max[3])
{
const float size[3] = {radius, radius, radius};
- const float cfra = BKE_scene_frame_get(scene);
+ const float cfra = BKE_scene_ctime_get(scene);
ParticleSettings *part = psys->part;
ParticleSimulationData sim = {NULL};
ParticleData *pa = NULL;