[Bf-blender-cvs] [4a801f6] object_nodes strand_nodes: Merge branch 'master' into object_nodes
Lukas Tönne
noreply at git.blender.org
Tue Aug 9 16:43:12 CEST 2016
Commit: 4a801f6c6f0421ffd515c12422dd197441440520
Author: Lukas Tönne
Date: Tue Aug 9 16:37:15 2016 +0200
Branches: object_nodes strand_nodes
https://developer.blender.org/rB4a801f6c6f0421ffd515c12422dd197441440520
Merge branch 'master' into object_nodes
===================================================================
===================================================================
diff --cc source/blender/blenkernel/BKE_particle.h
index ace30b3,b3e3968..42eaba6
--- 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..98ccce7
--- 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_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.cc
index 7ca2ef0,6169100..42b0043
--- a/source/blender/depsgraph/intern/builder/deg_builder.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder.cc
@@@ -126,22 -126,4 +126,23 @@@ void deg_graph_build_finalize(Depsgrap
GHASH_FOREACH_END();
}
+DEG::eDepsNode_Type deg_build_get_component_type(
+ eDepsComponent component)
+{
+ switch (component) {
+ case DEG_COMPONENT_PARAMETERS: return DEG::DEPSNODE_TYPE_PARAMETERS;
+ case DEG_COMPONENT_PROXY: return DEG::DEPSNODE_TYPE_PROXY;
+ case DEG_COMPONENT_ANIMATION: return DEG::DEPSNODE_TYPE_ANIMATION;
+ case DEG_COMPONENT_TRANSFORM: return DEG::DEPSNODE_TYPE_TRANSFORM;
+ case DEG_COMPONENT_GEOMETRY: return DEG::DEPSNODE_TYPE_GEOMETRY;
+ case DEG_COMPONENT_SEQUENCER: return DEG::DEPSNODE_TYPE_SEQUENCER;
+ case DEG_COMPONENT_EVAL_POSE: return DEG::DEPSNODE_TYPE_EVAL_POSE;
+ case DEG_COMPONENT_BONE: return DEG::DEPSNODE_TYPE_BONE;
+ case DEG_COMPONENT_EVAL_PARTICLES: return DEG::DEPSNODE_TYPE_EVAL_PARTICLES;
+ case DEG_COMPONENT_SHADING: return DEG::DEPSNODE_TYPE_SHADING;
++ case DEG_COMPONENT_CACHE: return DEG::DEPSNODE_TYPE_CACHE;
+ }
+ return DEG::DEPSNODE_TYPE_UNDEFINED;
+}
+
} // namespace DEG
diff --cc source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 9c0f88a,1812384..71b2cc1
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@@ -113,39 -112,6 +114,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_
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list