[Bf-blender-cvs] [9eeca9e] master: Depsgraph: cleanup, no functional changes

Sergey Sharybin noreply at git.blender.org
Fri Nov 11 14:04:54 CET 2016


Commit: 9eeca9e7cd37bc792592e72e6671a73b97563b73
Author: Sergey Sharybin
Date:   Fri Nov 11 13:52:22 2016 +0100
Branches: master
https://developer.blender.org/rB9eeca9e7cd37bc792592e72e6671a73b97563b73

Depsgraph: cleanup, no functional changes

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

M	source/blender/depsgraph/DEG_depsgraph_build.h
M	source/blender/depsgraph/intern/depsgraph_build.cc

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

diff --git a/source/blender/depsgraph/DEG_depsgraph_build.h b/source/blender/depsgraph/DEG_depsgraph_build.h
index 0945da4..fdc8654 100644
--- a/source/blender/depsgraph/DEG_depsgraph_build.h
+++ b/source/blender/depsgraph/DEG_depsgraph_build.h
@@ -51,8 +51,12 @@ extern "C" {
 
 /* Graph Building -------------------------------- */
 
-/* Build depsgraph for the given scene, and dump results in given graph container */
-void DEG_graph_build_from_scene(struct Depsgraph *graph, struct Main *bmain, struct Scene *scene);
+/* Build depsgraph for the given scene, and dump results in given
+ * graph container.
+ */
+void DEG_graph_build_from_scene(struct Depsgraph *graph,
+                                struct Main *bmain,
+                                struct Scene *scene);
 
 /* Tag relations from the given graph for update. */
 void DEG_graph_tag_relations_update(struct Depsgraph *graph);
@@ -85,31 +89,69 @@ struct CacheFile;
 struct Object;
 
 typedef enum eDepsSceneComponentType {
-	DEG_SCENE_COMP_PARAMETERS,     /* Parameters Component - Default when nothing else fits (i.e. just SDNA property setting) */
-	DEG_SCENE_COMP_ANIMATION,      /* Animation Component */                 // XXX: merge in with parameters?
-	DEG_SCENE_COMP_SEQUENCER,      /* Sequencer Component (Scene Only) */
+	/* Parameters Component - Default when nothing else fits
+	 * (i.e. just SDNA property setting).
+	 */
+	DEG_SCENE_COMP_PARAMETERS,
+	/* Animation Component
+	 * TODO(sergey): merge in with parameters?
+	 */
+	DEG_SCENE_COMP_ANIMATION,
+	/* Sequencer Component (Scene Only). */
+	DEG_SCENE_COMP_SEQUENCER,
 } eDepsSceneComponentType;
 
 typedef enum eDepsObjectComponentType {
-	DEG_OB_COMP_PARAMETERS,        /* Parameters Component - Default when nothing else fits (i.e. just SDNA property setting) */
-	DEG_OB_COMP_PROXY,             /* Generic "Proxy-Inherit" Component */   // XXX: Also for instancing of subgraphs?
-	DEG_OB_COMP_ANIMATION,         /* Animation Component */                 // XXX: merge in with parameters?
-	DEG_OB_COMP_TRANSFORM,         /* Transform Component (Parenting/Constraints) */
-	DEG_OB_COMP_GEOMETRY,          /* Geometry Component (DerivedMesh/Displist) */
-	
+	/* Parameters Component - Default when nothing else fits
+	 * (i.e. just SDNA property setting).
+	 */
+	DEG_OB_COMP_PARAMETERS,
+	/* Generic "Proxy-Inherit" Component.
+	 * TODO(sergey): Also for instancing of subgraphs?
+	 */
+	DEG_OB_COMP_PROXY,
+	/* Animation Component.
+	 *
+	 * TODO(sergey): merge in with parameters?
+	 */
+	DEG_OB_COMP_ANIMATION,
+	/* Transform Component (Parenting/Constraints) */
+	DEG_OB_COMP_TRANSFORM,
+	/* Geometry Component (DerivedMesh/Displist) */
+	DEG_OB_COMP_GEOMETRY,
+
 	/* Evaluation-Related Outer Types (with Subdata) */
-	DEG_OB_COMP_EVAL_POSE,         /* Pose Component - Owner/Container of Bones Eval */
-	DEG_OB_COMP_BONE,              /* Bone Component - Child/Subcomponent of Pose */
-	
-	DEG_OB_COMP_EVAL_PARTICLES,    /* Particle Systems Component */
-	DEG_OB_COMP_SHADING,           /* Material Shading Component */
-	DEG_OB_COMP_CACHE,             /* Cache Component */
+
+	/* Pose Component - Owner/Container of Bones Eval */
+	DEG_OB_COMP_EVAL_POSE,
+	/* Bone Component - Child/Subcomponent of Pose */
+	DEG_OB_COMP_BONE,
+
+	/* Particle Systems Component */
+	DEG_OB_COMP_EVAL_PARTICLES,
+	/* Material Shading Component */
+	DEG_OB_COMP_SHADING,
+	/* Cache Component */
+	DEG_OB_COMP_CACHE,
 } eDepsObjectComponentType;
 
-void DEG_add_scene_relation(struct DepsNodeHandle *node, struct Scene *scene, eDepsSceneComponentType component, const char *description);
-void DEG_add_object_relation(struct DepsNodeHandle *node, struct Object *ob, eDepsObjectComponentType component, const char *description);
-void DEG_add_bone_relation(struct DepsNodeHandle *handle, struct Object *ob, const char *bone_name, eDepsObjectComponentType component, const char *description);
-void DEG_add_object_cache_relation(struct DepsNodeHandle *handle, struct CacheFile *cache_file, eDepsObjectComponentType component, const char *description);
+void DEG_add_scene_relation(struct DepsNodeHandle *node,
+                            struct Scene *scene,
+                            eDepsSceneComponentType component,
+                            const char *description);
+void DEG_add_object_relation(struct DepsNodeHandle *node, struct
+                             Object *ob,
+                             eDepsObjectComponentType component,
+                             const char *description);
+void DEG_add_bone_relation(struct DepsNodeHandle *handle,
+                           struct Object *ob,
+                           const char *bone_name,
+                           eDepsObjectComponentType component,
+                           const char *description);
+void DEG_add_object_cache_relation(struct DepsNodeHandle *handle,
+                                   struct CacheFile *cache_file,
+                                   eDepsObjectComponentType component,
+                                   const char *description);
 
 /* TODO(sergey): Remove once all geometry update is granular. */
 void DEG_add_special_eval_flag(struct Depsgraph *graph, struct ID *id, short flag);
@@ -117,8 +159,22 @@ void DEG_add_special_eval_flag(struct Depsgraph *graph, struct ID *id, short fla
 /* Utility functions for physics modifiers */
 typedef bool (*DEG_CollobjFilterFunction)(struct Object *obj, struct ModifierData *md);
 
-void DEG_add_collision_relations(struct DepsNodeHandle *handle, struct Scene *scene, Object *ob, struct Group *group, int layer, unsigned int modifier_type, DEG_CollobjFilterFunction fn, bool dupli, const char *name);
-void DEG_add_forcefield_relations(struct DepsNodeHandle *handle, struct Scene *scene, Object *ob, struct EffectorWeights *eff, bool add_absorption, int skip_forcefield, const char *name);
+void DEG_add_collision_relations(struct DepsNodeHandle *handle,
+                                 struct Scene *scene,
+                                 Object *ob,
+                                 struct Group *group,
+                                 int layer,
+                                 unsigned int modifier_type,
+                                 DEG_CollobjFilterFunction fn,
+                                 bool dupli,
+                                 const char *name);
+void DEG_add_forcefield_relations(struct DepsNodeHandle *handle,
+                                  struct Scene *scene,
+                                  Object *ob,
+                                  struct EffectorWeights *eff,
+                                  bool add_absorption,
+                                  int skip_forcefield,
+                                  const char *name);
 
 /* ************************************************ */
 
diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc
index 7b3922a..9952f71 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build.cc
@@ -324,7 +324,15 @@ void DEG_scene_graph_free(Scene *scene)
 	}
 }
 
-void DEG_add_collision_relations(DepsNodeHandle *handle, Scene *scene, Object *ob, Group *group, int layer, unsigned int modifier_type, DEG_CollobjFilterFunction fn, bool dupli, const char *name)
+void DEG_add_collision_relations(DepsNodeHandle *handle,
+                                 Scene *scene,
+                                 Object *ob,
+                                 Group *group,
+                                 int layer,
+                                 unsigned int modifier_type,
+                                 DEG_CollobjFilterFunction fn,
+                                 bool dupli,
+                                 const char *name)
 {
 	unsigned int numcollobj;
 	Object **collobjs = get_collisionobjects_ext(scene, ob, group, layer, &numcollobj, modifier_type, dupli);
@@ -342,7 +350,13 @@ void DEG_add_collision_relations(DepsNodeHandle *handle, Scene *scene, Object *o
 		MEM_freeN(collobjs);
 }
 
-void DEG_add_forcefield_relations(DepsNodeHandle *handle, Scene *scene, Object *ob, EffectorWeights *effector_weights, bool add_absorption, int skip_forcefield, const char *name)
+void DEG_add_forcefield_relations(DepsNodeHandle *handle,
+                                  Scene *scene,
+                                  Object *ob,
+                                  EffectorWeights *effector_weights,
+                                  bool add_absorption,
+                                  int skip_forcefield,
+                                  const char *name)
 {
 	ListBase *effectors = pdInitEffectors(scene, ob, NULL, effector_weights, false);
 
@@ -354,17 +368,33 @@ void DEG_add_forcefield_relations(DepsNodeHandle *handle, Scene *scene, Object *
 				if (eff->psys) {
 					DEG_add_object_relation(handle, eff->ob, DEG_OB_COMP_EVAL_PARTICLES, name);
 
-					/* TODO: remove this when/if EVAL_PARTICLES is sufficient for up to date particles */
+					/* TODO: remove this when/if EVAL_PARTICLES is sufficient
+					 * for up to date particles.
+					 */
 					DEG_add_object_relation(handle, eff->ob, DEG_OB_COMP_GEOMETRY, name);
 				}
 
 				if (eff->pd->forcefield == PFIELD_SMOKEFLOW && eff->pd->f_source) {
-					DEG_add_object_relation(handle, eff->pd->f_source, DEG_OB_COMP_TRANSFORM, "Smoke Force Domain");
-					DEG_add_object_relation(handle, eff->pd->f_source, DEG_OB_COMP_GEOMETRY, "Smoke Force Domain");
+					DEG_add_object_relation(handle,
+					                        eff->pd->f_source,
+					                        DEG_OB_COMP_TRANSFORM,
+					                        "Smoke Force Domain");
+					DEG_add_object_relation(handle,
+					                        eff->pd->f_source,
+					                        DEG_OB_COMP_GEOMETRY,
+					                        "Smoke Force Domain");
 				}
 
 				if (add_absorption && (eff->pd->flag & PFIELD_VISIBILITY)) {
-					DEG_add_collision_relations(handle, scene, ob, NULL, eff->ob->lay, eModifierType_Collision, NULL, true, "Force Absorption");
+					DEG_add_collision_relations(handle,
+					                            scene,
+					                            o

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list