Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-12-18 18:50:21 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-12-18 18:51:05 +0300
commit90021402e2de56ba9100c3c2464165d1a1d358a2 (patch)
treeca58fb9353df74a49647d12843d5f42e416b8b14 /source/blender
parentfbfb35741c79f0b268514cb04475ed7f44c08f3c (diff)
parent443789d7c67369d0144545837d52474d797ee459 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_intern.h2
-rw-r--r--source/blender/depsgraph/intern/nodes/deg_node.cc9
-rw-r--r--source/blender/depsgraph/intern/nodes/deg_node.h4
-rw-r--r--source/blender/depsgraph/intern/nodes/deg_node_component.cc42
-rw-r--r--source/blender/depsgraph/intern/nodes/deg_node_component.h47
-rw-r--r--source/blender/makesdna/DNA_ID.h1
6 files changed, 59 insertions, 46 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_intern.h b/source/blender/depsgraph/intern/depsgraph_intern.h
index 4484d4ed94f..ba984f1c13b 100644
--- a/source/blender/depsgraph/intern/depsgraph_intern.h
+++ b/source/blender/depsgraph/intern/depsgraph_intern.h
@@ -62,6 +62,7 @@ struct DepsNodeFactory {
virtual eDepsNode_Type type() const = 0;
virtual eDepsNode_Class tclass() const = 0;
virtual const char *tname() const = 0;
+ virtual int id_recalc_tag() const = 0;
virtual DepsNode *create_node(const ID *id,
const char *subdata,
@@ -73,6 +74,7 @@ struct DepsNodeFactoryImpl : public DepsNodeFactory {
eDepsNode_Type type() const { return NodeType::typeinfo.type; }
eDepsNode_Class tclass() const { return NodeType::typeinfo.tclass; }
const char *tname() const { return NodeType::typeinfo.tname; }
+ int id_recalc_tag() const { return NodeType::typeinfo.id_recalc_tag; }
DepsNode *create_node(const ID *id, const char *subdata, const char *name) const
{
diff --git a/source/blender/depsgraph/intern/nodes/deg_node.cc b/source/blender/depsgraph/intern/nodes/deg_node.cc
index 3f70f8e1281..de340907114 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node.cc
+++ b/source/blender/depsgraph/intern/nodes/deg_node.cc
@@ -61,16 +61,19 @@ namespace DEG {
/* Add ------------------------------------------------ */
-DepsNode::TypeInfo::TypeInfo(eDepsNode_Type type, const char *tname)
+DepsNode::TypeInfo::TypeInfo(eDepsNode_Type type,
+ const char *tname,
+ int id_recalc_tag)
+ : type(type),
+ tname(tname),
+ id_recalc_tag(id_recalc_tag)
{
- this->type = type;
if (type == DEG_NODE_TYPE_OPERATION)
this->tclass = DEG_NODE_CLASS_OPERATION;
else if (type < DEG_NODE_TYPE_PARAMETERS)
this->tclass = DEG_NODE_CLASS_GENERIC;
else
this->tclass = DEG_NODE_CLASS_COMPONENT;
- this->tname = tname;
}
DepsNode::DepsNode()
diff --git a/source/blender/depsgraph/intern/nodes/deg_node.h b/source/blender/depsgraph/intern/nodes/deg_node.h
index fd3ed694c9c..c699de67eda 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node.h
+++ b/source/blender/depsgraph/intern/nodes/deg_node.h
@@ -51,11 +51,13 @@ struct OperationDepsNode;
struct DepsNode {
/* Helper class for static typeinfo in subclasses. */
struct TypeInfo {
- TypeInfo(eDepsNode_Type type, const char *tname);
+ TypeInfo(eDepsNode_Type type, const char *tname, int id_recalc_tag = 0);
eDepsNode_Type type;
eDepsNode_Class tclass;
const char *tname;
+
+ int id_recalc_tag;
};
/* Identifier - mainly for debugging purposes. */
diff --git a/source/blender/depsgraph/intern/nodes/deg_node_component.cc b/source/blender/depsgraph/intern/nodes/deg_node_component.cc
index f4530ecebdb..d3405118f57 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node_component.cc
+++ b/source/blender/depsgraph/intern/nodes/deg_node_component.cc
@@ -355,30 +355,6 @@ void ComponentDepsNode::finalize_build(Depsgraph * /*graph*/)
operations_map = NULL;
}
-/* Register all components. =============================== */
-
-#define DEG_COMPONENT_DEFINE(name, NAME) \
- DEG_DEPSNODE_DEFINE(name ## ComponentDepsNode, \
- DEG_NODE_TYPE_ ## NAME, \
- #name " Component"); \
-static DepsNodeFactoryImpl<name ## ComponentDepsNode> DNTI_ ## NAME
-
-
-DEG_COMPONENT_DEFINE(Animation, ANIMATION);
-DEG_COMPONENT_DEFINE(BatchCache, BATCH_CACHE);
-DEG_COMPONENT_DEFINE(Cache, CACHE);
-DEG_COMPONENT_DEFINE(CopyOnWrite, COPY_ON_WRITE);
-DEG_COMPONENT_DEFINE(Geometry, GEOMETRY);
-DEG_COMPONENT_DEFINE(LayerCollections, LAYER_COLLECTIONS);
-DEG_COMPONENT_DEFINE(Parameters, PARAMETERS);
-DEG_COMPONENT_DEFINE(Particles, EVAL_PARTICLES);
-DEG_COMPONENT_DEFINE(Proxy, PROXY);
-DEG_COMPONENT_DEFINE(Pose, EVAL_POSE);
-DEG_COMPONENT_DEFINE(Sequencer, SEQUENCER);
-DEG_COMPONENT_DEFINE(Shading, SHADING);
-DEG_COMPONENT_DEFINE(ShadingParameters, SHADING_PARAMETERS);
-DEG_COMPONENT_DEFINE(Transform, TRANSFORM);
-
/* Bone Component ========================================= */
/* Initialize 'bone component' node - from pointer data given */
@@ -398,7 +374,23 @@ void BoneComponentDepsNode::init(const ID *id, const char *subdata)
this->pchan = BKE_pose_channel_find_name(object->pose, subdata);
}
-DEG_COMPONENT_DEFINE(Bone, BONE);
+/* Register all components. =============================== */
+
+DEG_COMPONENT_NODE_DEFINE(Animation, ANIMATION, ID_RECALC_NONE);
+DEG_COMPONENT_NODE_DEFINE(BatchCache, BATCH_CACHE, ID_RECALC_NONE);
+DEG_COMPONENT_NODE_DEFINE(Bone, BONE, ID_RECALC_NONE);
+DEG_COMPONENT_NODE_DEFINE(Cache, CACHE, ID_RECALC_NONE);
+DEG_COMPONENT_NODE_DEFINE(CopyOnWrite, COPY_ON_WRITE, ID_RECALC_NONE);
+DEG_COMPONENT_NODE_DEFINE(Geometry, GEOMETRY, ID_RECALC_NONE);
+DEG_COMPONENT_NODE_DEFINE(LayerCollections, LAYER_COLLECTIONS, ID_RECALC_NONE);
+DEG_COMPONENT_NODE_DEFINE(Parameters, PARAMETERS, ID_RECALC_NONE);
+DEG_COMPONENT_NODE_DEFINE(Particles, EVAL_PARTICLES, ID_RECALC_NONE);
+DEG_COMPONENT_NODE_DEFINE(Proxy, PROXY, ID_RECALC_NONE);
+DEG_COMPONENT_NODE_DEFINE(Pose, EVAL_POSE, ID_RECALC_NONE);
+DEG_COMPONENT_NODE_DEFINE(Sequencer, SEQUENCER, ID_RECALC_NONE);
+DEG_COMPONENT_NODE_DEFINE(Shading, SHADING, ID_RECALC_NONE);
+DEG_COMPONENT_NODE_DEFINE(ShadingParameters, SHADING_PARAMETERS, ID_RECALC_NONE);
+DEG_COMPONENT_NODE_DEFINE(Transform, TRANSFORM, ID_RECALC_NONE);
/* Node Types Register =================================== */
diff --git a/source/blender/depsgraph/intern/nodes/deg_node_component.h b/source/blender/depsgraph/intern/nodes/deg_node_component.h
index ba4f8551fea..882a16adf82 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node_component.h
+++ b/source/blender/depsgraph/intern/nodes/deg_node_component.h
@@ -164,25 +164,38 @@ struct ComponentDepsNode : public DepsNode {
/* ---------------------------------------- */
-#define DEG_COMPONENT_DECLARE_GENERIC(name) \
+#define DEG_COMPONENT_NODE_DEFINE_TYPEINFO(NodeType, type_, tname_, id_recalc_tag) \
+ const DepsNode::TypeInfo NodeType::typeinfo = \
+ DepsNode::TypeInfo(type_, tname_, id_recalc_tag)
+
+#define DEG_COMPONENT_NODE_DECLARE DEG_DEPSNODE_DECLARE
+
+#define DEG_COMPONENT_NODE_DEFINE(name, NAME, id_recalc_tag) \
+ DEG_COMPONENT_NODE_DEFINE_TYPEINFO(name ## ComponentDepsNode, \
+ DEG_NODE_TYPE_ ## NAME, \
+ #name " Component", \
+ id_recalc_tag) ; \
+ static DepsNodeFactoryImpl<name ## ComponentDepsNode> DNTI_ ## NAME
+
+#define DEG_COMPONENT_NODE_DECLARE_GENERIC(name) \
struct name ## ComponentDepsNode : public ComponentDepsNode { \
- DEG_DEPSNODE_DECLARE; \
+ DEG_COMPONENT_NODE_DECLARE; \
}
-DEG_COMPONENT_DECLARE_GENERIC(Animation);
-DEG_COMPONENT_DECLARE_GENERIC(BatchCache);
-DEG_COMPONENT_DECLARE_GENERIC(Cache);
-DEG_COMPONENT_DECLARE_GENERIC(CopyOnWrite);
-DEG_COMPONENT_DECLARE_GENERIC(Geometry);
-DEG_COMPONENT_DECLARE_GENERIC(LayerCollections);
-DEG_COMPONENT_DECLARE_GENERIC(Parameters);
-DEG_COMPONENT_DECLARE_GENERIC(Particles);
-DEG_COMPONENT_DECLARE_GENERIC(Proxy);
-DEG_COMPONENT_DECLARE_GENERIC(Pose);
-DEG_COMPONENT_DECLARE_GENERIC(Sequencer);
-DEG_COMPONENT_DECLARE_GENERIC(Shading);
-DEG_COMPONENT_DECLARE_GENERIC(ShadingParameters);
-DEG_COMPONENT_DECLARE_GENERIC(Transform);
+DEG_COMPONENT_NODE_DECLARE_GENERIC(Animation);
+DEG_COMPONENT_NODE_DECLARE_GENERIC(BatchCache);
+DEG_COMPONENT_NODE_DECLARE_GENERIC(Cache);
+DEG_COMPONENT_NODE_DECLARE_GENERIC(CopyOnWrite);
+DEG_COMPONENT_NODE_DECLARE_GENERIC(Geometry);
+DEG_COMPONENT_NODE_DECLARE_GENERIC(LayerCollections);
+DEG_COMPONENT_NODE_DECLARE_GENERIC(Parameters);
+DEG_COMPONENT_NODE_DECLARE_GENERIC(Particles);
+DEG_COMPONENT_NODE_DECLARE_GENERIC(Proxy);
+DEG_COMPONENT_NODE_DECLARE_GENERIC(Pose);
+DEG_COMPONENT_NODE_DECLARE_GENERIC(Sequencer);
+DEG_COMPONENT_NODE_DECLARE_GENERIC(Shading);
+DEG_COMPONENT_NODE_DECLARE_GENERIC(ShadingParameters);
+DEG_COMPONENT_NODE_DECLARE_GENERIC(Transform);
/* Bone Component */
struct BoneComponentDepsNode : public ComponentDepsNode {
@@ -190,7 +203,7 @@ struct BoneComponentDepsNode : public ComponentDepsNode {
struct bPoseChannel *pchan; /* the bone that this component represents */
- DEG_DEPSNODE_DECLARE;
+ DEG_COMPONENT_NODE_DECLARE;
};
void deg_register_component_depsnodes();
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 0b8778674b3..ae908b1aabc 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -458,6 +458,7 @@ enum {
enum {
/* RESET_AFTER_USE, used by update code (depsgraph). */
+ ID_RECALC_NONE = 0,
ID_RECALC = 1 << 0,
ID_RECALC_ALL = ID_RECALC,
};