[Bf-blender-cvs] [a6bb98aef99] master: Depsgraph: Cleanup, get rid of relation type
Sergey Sharybin
noreply at git.blender.org
Thu Jun 1 16:22:44 CEST 2017
Commit: a6bb98aef99d13877f0d4d32bd9c1419e8930619
Author: Sergey Sharybin
Date: Thu Jun 1 14:49:17 2017 +0200
Branches: master
https://developer.blender.org/rBa6bb98aef99d13877f0d4d32bd9c1419e8930619
Depsgraph: Cleanup, get rid of relation type
It was never actually used apart from being stored at a construciton time.
This caused some redundancy and ncertanty about which relation type to use
during construciton (often existing types were not close enough to particular
use case).
===================================================================
M source/blender/depsgraph/intern/builder/deg_builder_relations.cc
M source/blender/depsgraph/intern/builder/deg_builder_relations.h
M source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
M source/blender/depsgraph/intern/depsgraph.cc
M source/blender/depsgraph/intern/depsgraph.h
M source/blender/depsgraph/intern/depsgraph_build.cc
M source/blender/depsgraph/intern/depsgraph_types.h
===================================================================
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index df56ff5897c..7df33e07e49 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -282,7 +282,7 @@ void DepsgraphRelationBuilder::add_time_relation(TimeSourceDepsNode *timesrc,
const char *description)
{
if (timesrc && node_to) {
- m_graph->add_new_relation(timesrc, node_to, DEPSREL_TYPE_TIME, description);
+ m_graph->add_new_relation(timesrc, node_to, description);
}
else {
DEG_DEBUG_PRINTF("add_time_relation(%p = %s, %p = %s, %s) Failed\n",
@@ -295,17 +295,16 @@ void DepsgraphRelationBuilder::add_time_relation(TimeSourceDepsNode *timesrc,
void DepsgraphRelationBuilder::add_operation_relation(
OperationDepsNode *node_from,
OperationDepsNode *node_to,
- eDepsRelation_Type type,
const char *description)
{
if (node_from && node_to) {
- m_graph->add_new_relation(node_from, node_to, type, description);
+ m_graph->add_new_relation(node_from, node_to, description);
}
else {
- DEG_DEBUG_PRINTF("add_operation_relation(%p = %s, %p = %s, %d, %s) Failed\n",
+ DEG_DEBUG_PRINTF("add_operation_relation(%p = %s, %p = %s, %s) Failed\n",
node_from, (node_from) ? node_from->identifier().c_str() : "<None>",
node_to, (node_to) ? node_to->identifier().c_str() : "<None>",
- type, description);
+ description);
}
}
@@ -319,10 +318,10 @@ void DepsgraphRelationBuilder::add_collision_relations(const OperationKey &key,
Object *ob1 = collobjs[i];
ComponentKey trf_key(&ob1->id, DEPSNODE_TYPE_TRANSFORM);
- add_relation(trf_key, key, DEPSREL_TYPE_STANDARD, name);
+ add_relation(trf_key, key, name);
ComponentKey coll_key(&ob1->id, DEPSNODE_TYPE_GEOMETRY);
- add_relation(coll_key, key, DEPSREL_TYPE_STANDARD, name);
+ add_relation(coll_key, key, name);
}
if (collobjs)
@@ -337,30 +336,30 @@ void DepsgraphRelationBuilder::add_forcefield_relations(const OperationKey &key,
for (EffectorCache *eff = (EffectorCache *)effectors->first; eff; eff = eff->next) {
if (eff->ob != ob) {
ComponentKey eff_key(&eff->ob->id, DEPSNODE_TYPE_TRANSFORM);
- add_relation(eff_key, key, DEPSREL_TYPE_STANDARD, name);
+ add_relation(eff_key, key, name);
}
if (eff->psys) {
if (eff->ob != ob) {
ComponentKey eff_key(&eff->ob->id, DEPSNODE_TYPE_EVAL_PARTICLES);
- add_relation(eff_key, key, DEPSREL_TYPE_STANDARD, name);
+ add_relation(eff_key, key, name);
/* TODO: remove this when/if EVAL_PARTICLES is sufficient for up to date particles */
ComponentKey mod_key(&eff->ob->id, DEPSNODE_TYPE_GEOMETRY);
- add_relation(mod_key, key, DEPSREL_TYPE_STANDARD, name);
+ add_relation(mod_key, key, name);
}
else if (eff->psys != psys) {
OperationKey eff_key(&eff->ob->id, DEPSNODE_TYPE_EVAL_PARTICLES, DEG_OPCODE_PSYS_EVAL, eff->psys->name);
- add_relation(eff_key, key, DEPSREL_TYPE_STANDARD, name);
+ add_relation(eff_key, key, name);
}
}
if (eff->pd->forcefield == PFIELD_SMOKEFLOW && eff->pd->f_source) {
ComponentKey trf_key(&eff->pd->f_source->id, DEPSNODE_TYPE_TRANSFORM);
- add_relation(trf_key, key, DEPSREL_TYPE_STANDARD, "Smoke Force Domain");
+ add_relation(trf_key, key, "Smoke Force Domain");
ComponentKey eff_key(&eff->pd->f_source->id, DEPSNODE_TYPE_GEOMETRY);
- add_relation(eff_key, key, DEPSREL_TYPE_STANDARD, "Smoke Force Domain");
+ add_relation(eff_key, key, "Smoke Force Domain");
}
if (add_absorption && (eff->pd->flag & PFIELD_VISIBILITY)) {
@@ -407,7 +406,6 @@ void DepsgraphRelationBuilder::build_group(Main *bmain,
ComponentKey dupli_transform_key(&go->ob->id, DEPSNODE_TYPE_TRANSFORM);
add_relation(dupli_transform_key,
object_local_transform_key,
- DEPSREL_TYPE_TRANSFORM,
"Dupligroup");
}
group_id->tag |= LIB_TAG_DOIT;
@@ -438,7 +436,6 @@ void DepsgraphRelationBuilder::build_object(Main *bmain, Scene *scene, Object *o
/* local -> parent */
add_relation(local_transform_key,
parent_transform_key,
- DEPSREL_TYPE_COMPONENT_ORDER,
"[ObLocal -> ObParent]");
}
@@ -476,21 +473,17 @@ void DepsgraphRelationBuilder::build_object(Main *bmain, Scene *scene, Object *o
/* operation order */
add_relation(base_op_key,
constraint_key,
- DEPSREL_TYPE_COMPONENT_ORDER,
"[ObBase-> Constraint Stack]");
add_relation(constraint_key,
final_transform_key,
- DEPSREL_TYPE_COMPONENT_ORDER,
"[ObConstraints -> Done]");
// XXX
add_relation(constraint_key,
ob_ubereval_key,
- DEPSREL_TYPE_COMPONENT_ORDER,
"Temp Ubereval");
add_relation(ob_ubereval_key,
final_transform_key,
- DEPSREL_TYPE_COMPONENT_ORDER,
"Temp Ubereval");
}
else {
@@ -504,12 +497,10 @@ void DepsgraphRelationBuilder::build_object(Main *bmain, Scene *scene, Object *o
*/
add_relation(base_op_key,
ob_ubereval_key,
- DEPSREL_TYPE_COMPONENT_ORDER,
"Temp Ubereval");
}
add_relation(ob_ubereval_key,
final_transform_key,
- DEPSREL_TYPE_COMPONENT_ORDER,
"Temp Ubereval");
}
@@ -522,7 +513,6 @@ void DepsgraphRelationBuilder::build_object(Main *bmain, Scene *scene, Object *o
ComponentKey adt_key(&ob->id, DEPSNODE_TYPE_ANIMATION);
add_relation(adt_key,
local_transform_key,
- DEPSREL_TYPE_OPERATION,
"Object Animation");
}
@@ -571,7 +561,6 @@ void DepsgraphRelationBuilder::build_object(Main *bmain, Scene *scene, Object *o
ComponentKey key_key(&key->id, DEPSNODE_TYPE_GEOMETRY);
add_relation(key_key,
geometry_key,
- DEPSREL_TYPE_GEOMETRY_EVAL,
"Shapekeys");
}
}
@@ -595,7 +584,7 @@ void DepsgraphRelationBuilder::build_object(Main *bmain, Scene *scene, Object *o
*/
ComponentKey ob_pose_key(&ob->id, DEPSNODE_TYPE_EVAL_POSE);
ComponentKey proxy_pose_key(&ob->proxy->id, DEPSNODE_TYPE_EVAL_POSE);
- add_relation(ob_pose_key, proxy_pose_key, DEPSREL_TYPE_TRANSFORM, "Proxy");
+ add_relation(ob_pose_key, proxy_pose_key, "Proxy");
}
/* Object dupligroup. */
@@ -619,7 +608,7 @@ void DepsgraphRelationBuilder::build_object_parent(Object *ob)
case PARSKEL: /* Armature Deform (Virtual Modifier) */
{
ComponentKey parent_key(&ob->parent->id, DEPSNODE_TYPE_TRANSFORM);
- add_relation(parent_key, ob_key, DEPSREL_TYPE_STANDARD, "Armature Deform Parent");
+ add_relation(parent_key, ob_key, "Armature Deform Parent");
break;
}
@@ -627,7 +616,7 @@ void DepsgraphRelationBuilder::build_object_parent(Object *ob)
case PARVERT3:
{
ComponentKey parent_key(&ob->parent->id, DEPSNODE_TYPE_GEOMETRY);
- add_relation(parent_key, ob_key, DEPSREL_TYPE_GEOMETRY_EVAL, "Vertex Parent");
+ add_relation(parent_key, ob_key, "Vertex Parent");
/* XXX not sure what this is for or how you could be done properly - lukas */
OperationDepsNode *parent_node = find_operation_node(parent_key);
@@ -636,7 +625,7 @@ void DepsgraphRelationBuilder::build_object_parent(Object *ob)
}
ComponentKey transform_key(&ob->parent->id, DEPSNODE_TYPE_TRANSFORM);
- add_relation(transform_key, ob_key, DEPSREL_TYPE_TRANSFORM, "Vertex Parent TFM");
+ add_relation(transform_key, ob_key, "Vertex Parent TFM");
break;
}
@@ -650,11 +639,9 @@ void DepsgraphRelationBuilder::build_object_parent(Object *ob)
DEG_OPCODE_TRANSFORM_FINAL);
add_relation(parent_bone_key,
ob_key,
- DEPSREL_TYPE_TRANSFORM,
"Bone Parent");
add_relation(parent_transform_key,
ob_key,
- DEPSREL_TYPE_TRANSFORM,
"Armature Parent");
break;
}
@@ -667,8 +654,8 @@ void DepsgraphRelationBuilder::build_object_parent(Object *ob)
ComponentKey parent_key(&ob->parent->id, DEPSNODE_TYPE_TRANSFORM);
ComponentKey geom_key(&ob->parent->id, DEPSNODE_TYPE_GEOMETRY);
- add_relation(parent_key, ob_key, DEPSREL_TYPE_STANDARD, "Lattice Deform Parent");
- add_relation(geom_key, ob_key, DEPSREL_TYPE_STANDARD, "Lattice Deform Parent Geom");
+ add_relation(parent_key, ob_key, "Lattice Deform Parent");
+ add_relation(geom_key, ob_key, "Lattice Deform Parent Geom");
}
else if (ob->parent->type == OB_CURVE) {
Curve *cu = (Curve *)ob->parent->data;
@@ -676,21 +663,21 @@ void DepsgraphRelationBuilder::build_object_parent(Object *ob)
if (cu->flag & CU_PATH) {
/* Follow Path */
ComponentKey parent_key(&ob->parent->id, DEPSNODE_TYPE_GEOMETRY);
- add_relation(parent_key, ob_key, DEPSREL_TYPE_TRANSFORM, "Curve Follow Parent");
+ add_relation(parent_key, ob_key, "Curve Follow Parent");
ComponentKey transform_key(&ob->parent->id, DEPSNODE_TYPE_TRANSFORM);
- add_relation(transform_key, ob_key, DEPSREL_TYPE_TRANSFORM, "Curve Follow TFM");
+ add_relation(transform_key, ob_key, "Curve Follow TFM");
}
else {
/* Standard Parent */
ComponentKey parent_key(&ob->parent->id, DEPSNODE_TYPE_TRANSFORM);
- add_relation(parent_key, ob_key, DEPSREL_TYPE_TRANSFORM, "Curve Parent");
+ add_relation(parent_key, ob_key, "Curve Parent");
}
}
else {
/* Standard Parent */
ComponentKey parent_key(&ob->parent->id, DEPSNODE_TYPE_TRANSFORM);
- add_relation(parent_key, ob_key, DEPSREL_TYPE_TRANSFORM, "Parent");
+ add_relation(parent_key, ob_key, "Parent");
}
break;
}
@@ -730,7 +717,7 @@ void DepsgraphRelationBuilder::build_constraints(Scene *scene, ID *id, eDepsNode
if (data->depth_ob) {
// DAG_RL_DATA_OB | DAG_RL_OB_OB
ComponentKey depth_key(&data
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list