[Bf-blender-cvs] [a093414] master: Depsgraph: Add evaluation callbacks for granular nodes update

Sergey Sharybin noreply at git.blender.org
Tue May 12 13:07:01 CEST 2015


Commit: a09341469ee3874a0874492a7dcad79c2b99179a
Author: Sergey Sharybin
Date:   Tue May 12 13:57:11 2015 +0500
Branches: master
https://developer.blender.org/rBa09341469ee3874a0874492a7dcad79c2b99179a

Depsgraph: Add evaluation callbacks for granular nodes update

This commit only adds callbacks which then later be used with major dependency
graph commit, keeping the upcoming commit more clean to follow.

Should be no functional changes so far still.

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

M	source/blender/blenkernel/BKE_animsys.h
M	source/blender/blenkernel/BKE_armature.h
M	source/blender/blenkernel/BKE_curve.h
M	source/blender/blenkernel/BKE_depsgraph.h
M	source/blender/blenkernel/BKE_lattice.h
M	source/blender/blenkernel/BKE_mball.h
M	source/blender/blenkernel/BKE_mesh.h
M	source/blender/blenkernel/BKE_object.h
M	source/blender/blenkernel/BKE_particle.h
M	source/blender/blenkernel/BKE_rigidbody.h
M	source/blender/blenkernel/intern/anim_sys.c
M	source/blender/blenkernel/intern/armature.c
M	source/blender/blenkernel/intern/armature_update.c
M	source/blender/blenkernel/intern/curve.c
M	source/blender/blenkernel/intern/lattice.c
M	source/blender/blenkernel/intern/mball.c
M	source/blender/blenkernel/intern/mesh.c
M	source/blender/blenkernel/intern/object_update.c
M	source/blender/blenkernel/intern/particle_system.c
M	source/blender/blenkernel/intern/rigidbody.c

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

diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h
index a8e430c..dc75174 100644
--- a/source/blender/blenkernel/BKE_animsys.h
+++ b/source/blender/blenkernel/BKE_animsys.h
@@ -175,6 +175,9 @@ void BKE_animsys_evaluate_animdata(struct Scene *scene, struct ID *id, struct An
 /* Evaluation of all ID-blocks with Animation Data blocks - Animation Data Only */
 void BKE_animsys_evaluate_all_animation(struct Main *main, struct Scene *scene, float ctime);
 
+/* TODO(sergey): This is mainly a temp public function. */
+struct FCurve;
+bool BKE_animsys_execute_fcurve(struct PointerRNA *ptr, struct AnimMapper *remap, struct FCurve *fcu);
 
 /* ------------ Specialized API --------------- */
 /* There are a few special tools which require these following functions. They are NOT to be used
@@ -192,4 +195,13 @@ void animsys_evaluate_action_group(struct PointerRNA *ptr, struct bAction *act,
 
 /* ************************************* */
 
+/* ------------ Evaluation API --------------- */
+
+struct EvaluationContext;
+
+void BKE_animsys_eval_animdata(struct EvaluationContext *eval_ctx, struct ID *id);
+void BKE_animsys_eval_driver(struct EvaluationContext *eval_ctx, struct ID *id, struct FCurve *fcurve);
+
+/* ************************************* */
+
 #endif /* __BKE_ANIMSYS_H__*/
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h
index ada0781..5bdf360 100644
--- a/source/blender/blenkernel/BKE_armature.h
+++ b/source/blender/blenkernel/BKE_armature.h
@@ -143,10 +143,54 @@ void b_bone_spline_setup(struct bPoseChannel *pchan, int rest, Mat4 result_array
 	(PBONE_VISIBLE(arm, bone) && !((bone)->flag & BONE_UNSELECTABLE))
 
 /* Evaluation helpers */
+struct bKinematicConstraint;
+struct bPose;
+struct bSplineIKConstraint;
+struct EvaluationContext;
+
+struct bPoseChannel *BKE_armature_ik_solver_find_root(struct bPoseChannel *pchan,
+                                                      struct bKinematicConstraint *data);
+struct bPoseChannel* BKE_armature_splineik_solver_find_root(struct bPoseChannel *pchan,
+                                                            struct bSplineIKConstraint *data);
 
 void BKE_pose_splineik_init_tree(struct Scene *scene, struct Object *ob, float ctime);
 void BKE_splineik_execute_tree(struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan_root, float ctime);
 
+void BKE_pose_eval_init(struct EvaluationContext *eval_ctx,
+                        struct Scene *scene,
+                        struct Object *ob,
+                        struct bPose *pose);
+
+void BKE_pose_eval_bone(struct EvaluationContext *eval_ctx,
+                        struct Scene *scene,
+                        struct Object *ob,
+                        struct bPoseChannel *pchan);
+
+void BKE_pose_constraints_evaluate(struct EvaluationContext *eval_ctx,
+                                   struct Object *ob,
+                                   struct bPoseChannel *pchan);
+
+void BKE_pose_bone_done(struct EvaluationContext *eval_ctx,
+                        struct bPoseChannel *pchan);
+
+void BKE_pose_iktree_evaluate(struct EvaluationContext *eval_ctx,
+                              struct Scene *scene,
+                              struct Object *ob,
+                              struct bPoseChannel *rootchan);
+
+void BKE_pose_splineik_evaluate(struct EvaluationContext *eval_ctx,
+                                struct Scene *scene,
+                                struct Object *ob,
+                                struct bPoseChannel *rootchan);
+
+void BKE_pose_eval_flush(struct EvaluationContext *eval_ctx,
+                         struct Scene *scene,
+                         struct Object *ob,
+                         struct bPose *pose);
+
+void BKE_pose_eval_proxy_copy(struct EvaluationContext *eval_ctx,
+                              struct Object *ob);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h
index 3ecd472..9bae2ad 100644
--- a/source/blender/blenkernel/BKE_curve.h
+++ b/source/blender/blenkernel/BKE_curve.h
@@ -184,4 +184,14 @@ void BKE_nurb_handles_autocalc(struct Nurb *nu, int flag);
 void BKE_nurb_bezt_handle_test(struct BezTriple *bezt, const bool use_handle);
 void BKE_nurb_handles_test(struct Nurb *nu, const bool use_handles);
 
+/* **** Depsgraph evaluation **** */
+
+struct EvaluationContext;
+
+void BKE_curve_eval_geometry(struct EvaluationContext *eval_ctx,
+                             struct Curve *curve);
+
+void BKE_curve_eval_path(struct EvaluationContext *eval_ctx,
+                         struct Curve *curve);
+
 #endif  /* __BKE_CURVE_H__ */
diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h
index 1887a89..f3a483f 100644
--- a/source/blender/blenkernel/BKE_depsgraph.h
+++ b/source/blender/blenkernel/BKE_depsgraph.h
@@ -56,6 +56,7 @@ struct Scene;
  */
 typedef struct EvaluationContext {
 	int mode;               /* evaluation mode */
+	float ctime;            /* evaluation time */
 } EvaluationContext;
 
 typedef enum eEvaluationMode {
diff --git a/source/blender/blenkernel/BKE_lattice.h b/source/blender/blenkernel/BKE_lattice.h
index 5fb1053..4ffdb63 100644
--- a/source/blender/blenkernel/BKE_lattice.h
+++ b/source/blender/blenkernel/BKE_lattice.h
@@ -93,4 +93,11 @@ int  BKE_lattice_index_flip(struct Lattice *lt, const int index,
 void BKE_lattice_bitmap_from_flag(struct Lattice *lt, unsigned int *bitmap, const short flag,
                                   const bool clear, const bool respecthide);
 
+/* **** Depsgraph evaluation **** */
+
+struct EvaluationContext;
+
+void BKE_lattice_eval_geometry(struct EvaluationContext *eval_ctx,
+                               struct Lattice *latt);
+
 #endif  /* __BKE_LATTICE_H__ */
diff --git a/source/blender/blenkernel/BKE_mball.h b/source/blender/blenkernel/BKE_mball.h
index 321cbbb..62cd500 100644
--- a/source/blender/blenkernel/BKE_mball.h
+++ b/source/blender/blenkernel/BKE_mball.h
@@ -68,4 +68,11 @@ void BKE_mball_select_all(struct MetaBall *mb);
 void BKE_mball_deselect_all(struct MetaBall *mb);
 void BKE_mball_select_swap(struct MetaBall *mb);
 
+/* **** Depsgraph evaluation **** */
+
+struct EvaluationContext;
+
+void BKE_mball_eval_geometry(struct EvaluationContext *eval_ctx,
+                             struct MetaBall *mball);
+
 #endif
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index ebf4384..570c99b 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -360,6 +360,13 @@ void BKE_mesh_strip_loose_edges(struct Mesh *me);
 void BKE_mesh_calc_edges_legacy(struct Mesh *me, const bool use_old);
 void BKE_mesh_calc_edges(struct Mesh *mesh, bool update, const bool select);
 
+/* **** Depsgraph evaluation **** */
+
+struct EvaluationContext;
+
+void BKE_mesh_eval_geometry(struct EvaluationContext *eval_ctx,
+                            struct Mesh *mesh);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index c270ebb..7502db2 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -181,6 +181,28 @@ void BKE_object_tfm_protected_restore(struct Object *ob,
                                       const short protectflag);
 
 /* Dependency graph evaluation callbacks. */
+void BKE_object_eval_local_transform(struct EvaluationContext *eval_ctx,
+                                     struct Scene *scene,
+                                     struct Object *ob);
+void BKE_object_eval_parent(struct EvaluationContext *eval_ctx,
+                            struct Scene *scene,
+                            struct Object *ob);
+void BKE_object_eval_constraints(struct EvaluationContext *eval_ctx,
+                                 struct Scene *scene,
+                                 struct Object *ob);
+void BKE_object_eval_done(struct EvaluationContext *eval_ctx, struct Object *ob);
+
+void BKE_object_eval_modifier(struct EvaluationContext *eval_ctx,
+                              struct Scene *scene,
+                              struct Object *ob,
+                              struct ModifierData *md);
+void BKE_object_eval_uber_transform(struct EvaluationContext *eval_ctx,
+                                    struct Scene *scene,
+                                    struct Object *ob);
+void BKE_object_eval_uber_data(struct EvaluationContext *eval_ctx,
+                               struct Scene *scene,
+                               struct Object *ob);
+
 void BKE_object_handle_data_update(struct EvaluationContext *eval_ctx,
                                    struct Scene *scene,
                                    struct Object *ob);
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h
index 27eeb09..e03789f 100644
--- a/source/blender/blenkernel/BKE_particle.h
+++ b/source/blender/blenkernel/BKE_particle.h
@@ -459,4 +459,12 @@ typedef struct ParticleRenderData {
 #define DMCACHE_NOTFOUND    -1
 #define DMCACHE_ISCHILD     -2
 
+/* **** Depsgraph evaluation **** */
+
+struct EvaluationContext;
+
+void BKE_particle_system_eval(struct EvaluationContext *eval_ctx,
+                              struct Object *ob,
+                              struct ParticleSystem *psys);
+
 #endif
diff --git a/source/blender/blenkernel/BKE_rigidbody.h b/source/blender/blenkernel/BKE_rigidbody.h
index 0ae240e..b327f0c 100644
--- a/source/blender/blenkernel/BKE_rigidbody.h
+++ b/source/blender/blenkernel/BKE_rigidbody.h
@@ -98,4 +98,19 @@ void BKE_rigidbody_cache_reset(struct RigidBodyWorld *rbw);
 void BKE_rigidbody_rebuild_world(struct Scene *scene, float ctime);
 void BKE_rigidbody_do_simulation(struct Scene *scene, float ctime);
 
+/* -------------------- */
+/* Depsgraph evaluation */
+
+struct EvaluationContext;
+
+void BKE_rigidbody_rebuild_sim(struct EvaluationContext *eval_ctx,
+                               struct Scene *scene);
+
+void BKE_rigidbody_eval_simulation(struct EvaluationContext *eval

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list