[Bf-blender-cvs] [1685f5824d9] master: Cleanup: remove unused scene argument

Campbell Barton noreply at git.blender.org
Thu Apr 16 03:09:51 CEST 2020


Commit: 1685f5824d91a6a8651f92a03229cd6ec58742ea
Author: Campbell Barton
Date:   Thu Apr 16 11:05:52 2020 +1000
Branches: master
https://developer.blender.org/rB1685f5824d91a6a8651f92a03229cd6ec58742ea

Cleanup: remove unused scene argument

===================================================================

M	source/blender/blenkernel/BKE_animsys.h
M	source/blender/blenkernel/intern/action.c
M	source/blender/blenkernel/intern/anim_sys.c
M	source/blender/blenkernel/intern/object.c
M	source/blender/blenkernel/intern/particle_system.c
M	source/blender/blenkernel/intern/seqprefetch.c
M	source/blender/blenkernel/intern/sequencer.c
M	source/blender/draw/engines/eevee/eevee_motion_blur.c
M	source/blender/editors/armature/pose_transform.c
M	source/blender/editors/object/object_modifier.c
M	source/blender/render/intern/source/pipeline.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h
index a8915c178d4..4076bca3b19 100644
--- a/source/blender/blenkernel/BKE_animsys.h
+++ b/source/blender/blenkernel/BKE_animsys.h
@@ -207,17 +207,15 @@ bool BKE_animsys_read_rna_setting(struct PathResolvedRNA *anim_rna, float *r_val
 bool BKE_animsys_write_rna_setting(struct PathResolvedRNA *anim_rna, const float value);
 
 /* Evaluation loop for evaluating animation data  */
-void BKE_animsys_evaluate_animdata(struct Scene *scene,
-                                   struct ID *id,
+void BKE_animsys_evaluate_animdata(struct ID *id,
                                    struct AnimData *adt,
                                    float ctime,
-                                   short recalc,
+                                   eAnimData_Recalc recalc,
                                    const bool flush_to_original);
 
 /* Evaluation of all ID-blocks with Animation Data blocks - Animation Data Only */
 void BKE_animsys_evaluate_all_animation(struct Main *main,
                                         struct Depsgraph *depsgraph,
-                                        struct Scene *scene,
                                         float ctime);
 
 /* ------------ Specialized API --------------- */
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index ba77538bfb6..4f51e23496c 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -1665,6 +1665,6 @@ void what_does_obaction(
     adt.action = act;
 
     /* execute effects of Action on to workob (or it's PoseChannels) */
-    BKE_animsys_evaluate_animdata(NULL, &workob->id, &adt, cframe, ADT_RECALC_ANIM, false);
+    BKE_animsys_evaluate_animdata(&workob->id, &adt, cframe, ADT_RECALC_ANIM, false);
   }
 }
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 5f463be58b4..5825d7e4acd 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -2500,7 +2500,7 @@ static void animsys_evaluate_overrides(PointerRNA *ptr, AnimData *adt)
  * have been set already by the depsgraph. Now, we use the recalc
  */
 void BKE_animsys_evaluate_animdata(
-    Scene *scene, ID *id, AnimData *adt, float ctime, short recalc, const bool flush_to_original)
+    ID *id, AnimData *adt, float ctime, eAnimData_Recalc recalc, const bool flush_to_original)
 {
   PointerRNA id_ptr;
 
@@ -2556,10 +2556,7 @@ void BKE_animsys_evaluate_animdata(
  * 'local' (i.e. belonging in the nearest ID-block that setting is related to, not a
  * standard 'root') block are overridden by a larger 'user'
  */
-void BKE_animsys_evaluate_all_animation(Main *main,
-                                        Depsgraph *depsgraph,
-                                        Scene *scene,
-                                        float ctime)
+void BKE_animsys_evaluate_all_animation(Main *main, Depsgraph *depsgraph, float ctime)
 {
   ID *id;
 
@@ -2578,7 +2575,7 @@ void BKE_animsys_evaluate_all_animation(Main *main,
   for (id = first; id; id = id->next) { \
     if (ID_REAL_USERS(id) > 0) { \
       AnimData *adt = BKE_animdata_from_id(id); \
-      BKE_animsys_evaluate_animdata(scene, id, adt, ctime, aflag, flush_to_original); \
+      BKE_animsys_evaluate_animdata(id, adt, ctime, aflag, flush_to_original); \
     } \
   } \
   (void)0
@@ -2597,9 +2594,9 @@ void BKE_animsys_evaluate_all_animation(Main *main,
       if (ntp->nodetree) { \
         AnimData *adt2 = BKE_animdata_from_id((ID *)ntp->nodetree); \
         BKE_animsys_evaluate_animdata( \
-            scene, (ID *)ntp->nodetree, adt2, ctime, ADT_RECALC_ANIM, flush_to_original); \
+            &ntp->nodetree->id, adt2, ctime, ADT_RECALC_ANIM, flush_to_original); \
       } \
-      BKE_animsys_evaluate_animdata(scene, id, adt, ctime, aflag, flush_to_original); \
+      BKE_animsys_evaluate_animdata(id, adt, ctime, aflag, flush_to_original); \
     } \
   } \
   (void)0
@@ -2714,7 +2711,7 @@ void BKE_animsys_eval_animdata(Depsgraph *depsgraph, ID *id)
   Scene *scene = NULL;
   DEG_debug_print_eval_time(depsgraph, __func__, id->name, id, ctime);
   const bool flush_to_original = DEG_is_active(depsgraph);
-  BKE_animsys_evaluate_animdata(scene, id, adt, ctime, ADT_RECALC_ANIM, flush_to_original);
+  BKE_animsys_evaluate_animdata(id, adt, ctime, ADT_RECALC_ANIM, flush_to_original);
 }
 
 void BKE_animsys_update_driver_array(ID *id)
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index f68b1a4d314..2f281a29211 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -2677,7 +2677,7 @@ void BKE_object_where_is_calc_time(Depsgraph *depsgraph, Scene *scene, Object *o
 {
   /* Execute drivers and animation. */
   const bool flush_to_original = DEG_is_active(depsgraph);
-  BKE_animsys_evaluate_animdata(scene, &ob->id, ob->adt, ctime, ADT_RECALC_ALL, flush_to_original);
+  BKE_animsys_evaluate_animdata(&ob->id, ob->adt, ctime, ADT_RECALC_ALL, flush_to_original);
   object_where_is_calc_ex(depsgraph, scene, ob, ctime, NULL, NULL);
 }
 
@@ -4567,8 +4567,7 @@ bool BKE_object_modifier_update_subframe(Depsgraph *depsgraph,
   /* TODO(sergey): What about animation? */
   ob->id.recalc |= ID_RECALC_ALL;
   if (update_mesh) {
-    BKE_animsys_evaluate_animdata(
-        scene, &ob->id, ob->adt, frame, ADT_RECALC_ANIM, flush_to_original);
+    BKE_animsys_evaluate_animdata(&ob->id, ob->adt, frame, ADT_RECALC_ANIM, flush_to_original);
     /* ignore cache clear during subframe updates
      * to not mess up cache validity */
     object_cacheIgnoreClear(ob, 1);
@@ -4582,14 +4581,12 @@ bool BKE_object_modifier_update_subframe(Depsgraph *depsgraph,
   /* for curve following objects, parented curve has to be updated too */
   if (ob->type == OB_CURVE) {
     Curve *cu = ob->data;
-    BKE_animsys_evaluate_animdata(
-        scene, &cu->id, cu->adt, frame, ADT_RECALC_ANIM, flush_to_original);
+    BKE_animsys_evaluate_animdata(&cu->id, cu->adt, frame, ADT_RECALC_ANIM, flush_to_original);
   }
   /* and armatures... */
   if (ob->type == OB_ARMATURE) {
     bArmature *arm = ob->data;
-    BKE_animsys_evaluate_animdata(
-        scene, &arm->id, arm->adt, frame, ADT_RECALC_ANIM, flush_to_original);
+    BKE_animsys_evaluate_animdata(&arm->id, arm->adt, frame, ADT_RECALC_ANIM, flush_to_original);
     BKE_pose_where_is(depsgraph, scene, ob);
   }
 
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index cc49f500a5f..5ef2f7aeeff 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -4847,7 +4847,7 @@ void particle_system_update(struct Depsgraph *depsgraph,
         hcfra = 100.0f * (float)i / (float)psys->part->hair_step;
         if ((part->flag & PART_HAIR_REGROW) == 0) {
           BKE_animsys_evaluate_animdata(
-              scene, &part_local->id, part_local->adt, hcfra, ADT_RECALC_ANIM, false);
+              &part_local->id, part_local->adt, hcfra, ADT_RECALC_ANIM, false);
         }
         system_step(&sim, hcfra, use_render_params);
         psys->cfra = hcfra;
diff --git a/source/blender/blenkernel/intern/seqprefetch.c b/source/blender/blenkernel/intern/seqprefetch.c
index 1bd02212908..4f57776f2ad 100644
--- a/source/blender/blenkernel/intern/seqprefetch.c
+++ b/source/blender/blenkernel/intern/seqprefetch.c
@@ -332,8 +332,7 @@ static void *seq_prefetch_frames(void *job)
     pfjob->scene_eval->ed->prefetch_job = NULL;
 
     AnimData *adt = BKE_animdata_from_id(&pfjob->context_cpy.scene->id);
-    BKE_animsys_evaluate_animdata(pfjob->context_cpy.scene,
-                                  &pfjob->context_cpy.scene->id,
+    BKE_animsys_evaluate_animdata(&pfjob->context_cpy.scene->id,
                                   adt,
                                   pfjob->cfra + pfjob->num_frames_prefetched,
                                   ADT_RECALC_ALL,
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 93e5a3bbd74..c0ab5cf5816 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -3330,8 +3330,7 @@ static ImBuf *seq_render_mask(const SeqRenderData *context, Mask *mask, float nr
 
     /* anim-data */
     adt = BKE_animdata_from_id(&mask->id);
-    BKE_animsys_evaluate_animdata(
-        context->scene, &mask_temp->id, adt, mask->sfra + nr, ADT_RECALC_ANIM, false);
+    BKE_animsys_evaluate_animdata(&mask_temp->id, adt, mask->sfra + nr, ADT_RECALC_ANIM, false);
 
     maskbuf = MEM_mallocN(sizeof(float) * context->rectx * context->recty, __func__);
 
@@ -3660,8 +3659,7 @@ static ImBuf *do_render_strip_seqbase(const SeqRenderData *context,
   if (seqbase && !BLI_listbase_is_empty(seqbase)) {
 
     if (seq->flag & SEQ_SCENE_STRIPS && seq->scene) {
-      BKE_animsys_evaluate_all_animation(
-          context->bmain, context->depsgraph, seq->scene, nr + offset);
+      BKE_animsys_evaluate_all_animation(context->bmain, context->depsgraph, nr + offset);
     }
 
     ibuf = seq_render_strip_stack(context,
diff --git a/source/blender/draw/engines/eevee/eevee_motion_blur.c b/source/blender/draw/engines/eevee/eevee_motion_blur.c
index 13927cd5124..a6e6b30a6b1 100644
--- a/source/blender/draw/engines/eevee/eevee_motion_blur.c
+++ b/source/blender/draw/engines/eevee/eevee_motion_blur.c
@@ -73,8 +73,7 @@ static void eevee_motion_blur_camera_get_matrix_at_time(Scene *scene,
   /* Past matrix */
   /* FIXME : This is a temporal solution that does not take care of parent animations */
   /* Recalc Anim manually */
-  BKE_animsys_evaluate_animdata(
-      scene, &camdata_cpy.id, camdata_cpy.adt, time, ADT_RECALC_ALL, false);
+  BKE_animsys_evaluate_animdata(&camdata_cpy.id, camdata_cpy.adt, time, ADT_RECALC_ALL, false);
   BKE_object_where_is_calc_time(draw_ctx->depsgraph, scene, &cam_cpy, time);
 
   /* Compute winmat */
diff --git a/source/blender/editors/armature/pose_transform.c b/sour

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list