Depsgraph: Silence obviously noisy relations build errors
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 2 Mar 2018 14:50:28 +0000 (15:50 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 2 Mar 2018 14:51:44 +0000 (15:51 +0100)
Those were happening for drivers which points to invalid drivers, and those
drivers will have their own dedicated error prints.

source/blender/depsgraph/intern/builder/deg_builder_relations.cc

index 0d85b1d..914c8ef 100644 (file)
@@ -1126,7 +1126,16 @@ void DepsgraphRelationBuilder::build_driver_data(ID *id, FCurve *fcu)
        }
        else {
                RNAPathKey target_key(id, rna_path);
-               add_relation(driver_key, target_key, "Driver -> Target");
+               if (RNA_pointer_is_null(&target_key.ptr)) {
+                       /* TODO(sergey): This would only mean that driver is broken.
+                        * so we can't create relation anyway. However, we need to avoid
+                        * adding drivers which are known to be buggy to a dependency
+                        * graph, in order to save computational power.
+                        */
+               }
+               else {
+                       add_relation(driver_key, target_key, "Driver -> Target");
+               }
        }
 }