[Bf-blender-cvs] [e73f56a] strand_nodes: Merge branch 'master' into strand_nodes

Lukas Tönne noreply at git.blender.org
Tue Aug 9 16:43:16 CEST 2016


Commit: e73f56a15a7d8f584580c38a0d963b3977f2e656
Author: Lukas Tönne
Date:   Tue Aug 9 16:26:38 2016 +0200
Branches: strand_nodes
https://developer.blender.org/rBe73f56a15a7d8f584580c38a0d963b3977f2e656

Merge branch 'master' into strand_nodes

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



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

diff --cc source/blender/blenkernel/BKE_particle.h
index d871029,b3e3968..3fc8184
--- a/source/blender/blenkernel/BKE_particle.h
+++ b/source/blender/blenkernel/BKE_particle.h
@@@ -62,8 -62,9 +62,10 @@@ struct RNG
  struct BVHTreeRay;
  struct BVHTreeRayHit; 
  struct EdgeHash;
 +struct EffectorContext;
  
+ #define PARTICLE_COLLISION_MAX_COLLISIONS 10
+ 
  #define PARTICLE_P              ParticleData * pa; int p
  #define LOOP_PARTICLES  for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++)
  #define LOOP_EXISTING_PARTICLES for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++) if (!(pa->flag & PARS_UNEXIST))
diff --cc source/blender/depsgraph/DEG_depsgraph_build.h
index ce30df2,0209e94..c6ded92
--- a/source/blender/depsgraph/DEG_depsgraph_build.h
+++ b/source/blender/depsgraph/DEG_depsgraph_build.h
@@@ -81,74 -77,37 +81,84 @@@ void DEG_scene_graph_free(struct Scene 
   * as a symbolic reference to the current DepsNode.
   * All relations will be defined in reference to that node.
   */
 -struct DepsNodeHandle;
 -
+ 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) */
 -} 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) */
 -	
 -	/* 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 */
 -} 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);
 +typedef enum {
 +	DEG_COMPONENT_PARAMETERS,        /* Parameters Component - Default when nothing else fits (i.e. just SDNA property setting) */
 +	DEG_COMPONENT_PROXY,             /* Generic "Proxy-Inherit" Component */
 +	DEG_COMPONENT_ANIMATION,         /* Animation Component */
 +	DEG_COMPONENT_TRANSFORM,         /* Transform Component (Parenting/Constraints) */
 +	DEG_COMPONENT_GEOMETRY,          /* Geometry Component (DerivedMesh/Displist) */
 +	DEG_COMPONENT_SEQUENCER,         /* Sequencer Component (Scene Only) */
 +	DEG_COMPONENT_EVAL_POSE,         /* Pose Component - Owner/Container of Bones Eval */
 +	DEG_COMPONENT_BONE,              /* Bone Component - Child/Subcomponent of Pose */
 +	DEG_COMPONENT_EVAL_PARTICLES,    /* Particle Systems Component */
 +	DEG_COMPONENT_SHADING,           /* Material Shading Component */
++	DEG_COMPONENT_CACHE,             /* Cache Component */
 +} eDepsComponent;
 +
 +struct DepsNodeHandle
 +{
 +	void (*add_scene_relation)(struct DepsNodeHandle *handle,
 +	                           struct Scene *scene,
 +	                           eDepsComponent component,
 +	                           const char *description);
 +	void (*add_object_relation)(struct DepsNodeHandle *handle,
 +	                            struct Object *ob,
 +	                            eDepsComponent component,
 +	                            const char *description);
 +	void (*add_bone_relation)(struct DepsNodeHandle *handle,
 +	                          struct Object *ob,
 +	                          const char *bone_name,
 +	                          eDepsComponent component,
 +	                          const char *description);
 +	void (*add_texture_relation)(struct DepsNodeHandle *handle,
 +	                             struct Tex *tex,
 +	                             eDepsComponent component,
 +	                             const char *description);
 +	void (*add_nodetree_relation)(struct DepsNodeHandle *handle,
 +	                              struct bNodeTree *ntree,
 +	                              eDepsComponent component,
 +	                              const char *description);
 +	void (*add_image_relation)(struct DepsNodeHandle *handle,
 +	                           struct Image *ima,
 +	                           eDepsComponent component,
 +	                           const char *description);
++	void (*add_cache_relation)(struct DepsNodeHandle *handle,
++	                           struct CacheFile *cache_file,
++	                           eDepsComponent component,
++	                           const char *description);
 +};
 +
 +void DEG_add_scene_relation(struct DepsNodeHandle *node,
 +                            struct Scene *scene,
 +                            eDepsComponent component,
 +                            const char *description);
 +void DEG_add_object_relation(struct DepsNodeHandle *node,
 +                             struct Object *ob,
 +                             eDepsComponent component,
 +                             const char *description);
 +void DEG_add_bone_relation(struct DepsNodeHandle *handle,
 +                           struct Object *ob,
 +                           const char *bone_name,
 +                           eDepsComponent component,
 +                           const char *description);
 +void DEG_add_texture_relation(struct DepsNodeHandle *handle,
 +                              struct Tex *tex,
 +                              eDepsComponent component,
 +                              const char *description);
 +void DEG_add_nodetree_relation(struct DepsNodeHandle *handle,
 +                               struct bNodeTree *ntree,
 +                               eDepsComponent component,
 +                               const char *description);
 +void DEG_add_image_relation(struct DepsNodeHandle *handle,
 +                            struct Image *ima,
 +                            eDepsComponent component,
 +                            const char *description);
++void DEG_add_object_cache_relation(struct DepsNodeHandle *handle,
++                                   struct CacheFile *cache_file,
++                                   eDepsComponent 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);
diff --cc source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index b786aad,1812384..d7241ba
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@@ -114,39 -112,6 +115,49 @@@ namespace DEG 
  /* ************ */
  /* Node Builder */
  
 +struct NodeBuilderHandle
 +{
 +	static void add_texture_relation(DepsNodeHandle *_handle, struct Tex *tex, eDepsComponent /*component*/, const char */*description*/)
 +	{
 +		NodeBuilderHandle *handle = (NodeBuilderHandle *)_handle;
 +		handle->builder->build_texture(NULL, tex);
 +	}
 +	
 +	static void add_nodetree_relation(DepsNodeHandle *_handle, struct bNodeTree *ntree, eDepsComponent /*component*/, const char */*description*/)
 +	{
 +		NodeBuilderHandle *handle = (NodeBuilderHandle *)_handle;
 +		handle->builder->build_nodetree(NULL, ntree);
 +	}
 +	
 +	static void add_image_relation(DepsNodeHandle *_handle, struct Image *ima, eDepsComponent /*component*/, const char */*description*/)
 +	{
 +		NodeBuilderHandle *handle = (NodeBuilderHandle *)_handle;
 +		handle->builder->build_image(ima);
 +	}
 +	
++	static void add_cache_relation(DepsNodeHandle *_handle,
++	                               CacheFile *cache_file,
++	                               eDepsComponent component,
++	                               const char *description)
++	{
++		NodeBuilderHandle *handle = (NodeBuilderHandle *)_handle;
++		handle->builder->build_cachefile(cache_file);
++	}
++	
 +	NodeBuilderHandle(DepsgraphNodeBuilder *builder) :
 +	    builder(builder)
 +	{
 +		memset(&base, 0, sizeof(base));
 +		base.add_texture_relation = add_texture_relation;
 +		base.add_nodetree_relation = add_nodetree_relation;
 +		base.add_image_relation = add_image_relation;
++		base.add_cache_relation = add_cache_relation;
 +	}
 +	
 +	DepsNodeHandle base;
 +	DepsgraphNodeBuilder *builder;
 +};
 +
  /* **** General purpose functions **** */
  
  DepsgraphNodeBuilder::DepsgraphNodeBuilder(Main *bmain, Depsgraph *graph) :
@@@ -375,10 -340,17 +386,18 @@@ void DepsgraphNodeBuilder::build_scene(
  	if (scene->gpd) {
  		build_gpencil(scene->gpd);
  	}
+ 
+ 	/* cache files */
+ 	for (CacheFile *cachefile = static_cast<CacheFile *>(bmain->cachefiles.first);
+ 	     cachefile;
+ 	     cachefile = static_cast<CacheFile *>(cachefile->id.next))
+ 	{
+ 		build_cachefile(cachefile);
+ 	}
  }
  
 -void DepsgraphNodeBuilder::build_group(Scene *scene,
 +void DepsgraphNodeBuilder::build_group(Main *bmain,
 +                                       Scene *scene,
                                         Base *base,
                                         Group *group)
  {
diff --cc source/blender/depsgraph/i

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list