Merge branch 'master' into blender2.8
[blender.git] / source / blender / depsgraph / intern / builder / deg_builder_relations.cc
index 9a59dd46759f7a99ba77ecd38a2f3d082f064460..f1869fdd916805a05f75ca062b1149ff129b9169 100644 (file)
@@ -241,13 +241,14 @@ bool DepsgraphRelationBuilder::has_node(const OperationKey &key) const
        return find_node(key) != NULL;
 }
 
-void DepsgraphRelationBuilder::add_time_relation(TimeSourceDepsNode *timesrc,
-                                                 DepsNode *node_to,
-                                                 const char *description,
-                                                 bool check_unique)
+DepsRelation *DepsgraphRelationBuilder::add_time_relation(
+        TimeSourceDepsNode *timesrc,
+        DepsNode *node_to,
+        const char *description,
+        bool check_unique)
 {
        if (timesrc && node_to) {
-               graph_->add_new_relation(timesrc, node_to, description, check_unique);
+               return graph_->add_new_relation(timesrc, node_to, description, check_unique);
        }
        else {
                DEG_DEBUG_PRINTF(BUILD, "add_time_relation(%p = %s, %p = %s, %s) Failed\n",
@@ -255,16 +256,20 @@ void DepsgraphRelationBuilder::add_time_relation(TimeSourceDepsNode *timesrc,
                                 node_to,   (node_to) ? node_to->identifier().c_str() : "<None>",
                                 description);
        }
+       return NULL;
 }
 
-void DepsgraphRelationBuilder::add_operation_relation(
+DepsRelation *DepsgraphRelationBuilder::add_operation_relation(
         OperationDepsNode *node_from,
         OperationDepsNode *node_to,
         const char *description,
         bool check_unique)
 {
        if (node_from && node_to) {
-               graph_->add_new_relation(node_from, node_to, description, check_unique);
+               return graph_->add_new_relation(node_from,
+                                               node_to,
+                                               description,
+                                               check_unique);
        }
        else {
                DEG_DEBUG_PRINTF(BUILD, "add_operation_relation(%p = %s, %p = %s, %s) Failed\n",
@@ -272,6 +277,7 @@ void DepsgraphRelationBuilder::add_operation_relation(
                                 node_to,   (node_to)   ? node_to->identifier().c_str() : "<None>",
                                 description);
        }
+       return NULL;
 }
 
 void DepsgraphRelationBuilder::add_collision_relations(