[Bf-blender-cvs] [90cf9bcc7d5] blender2.8: Depsgraph: Make drivers builder less noisy
Sergey Sharybin
noreply at git.blender.org
Thu Nov 15 12:14:21 CET 2018
Commit: 90cf9bcc7d52f98889e96f1bef4ddf2125a33755
Author: Sergey Sharybin
Date: Thu Nov 15 12:12:08 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB90cf9bcc7d52f98889e96f1bef4ddf2125a33755
Depsgraph: Make drivers builder less noisy
Do early output when trying to add target relation with wrong rna_path.
We can't do anything reliably in that case anyway, so hopefully it is
a no-functional-change for artists, just avoids noisy error prints in
the terminal.
===================================================================
M source/blender/depsgraph/intern/builder/deg_builder_relations.cc
===================================================================
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 3fb6138d001..b6eb0af589c 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -1412,8 +1412,16 @@ void DepsgraphRelationBuilder::build_driver_data(ID *id, FCurve *fcu)
rna_path);
}
}
- else {
+ else if (rna_path != NULL && rna_path[0] != '\0') {
RNAPathKey target_key(id, rna_path);
+ 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.
+ */
+ return;
+ }
add_relation(driver_key, target_key, "Driver -> Target");
/* Similar to the case with f-curves, driver might drive a nested
* datablock, which means driver execution should wait for that
@@ -1434,24 +1442,15 @@ void DepsgraphRelationBuilder::build_driver_data(ID *id, FCurve *fcu)
}
}
}
- 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 {
- if (target_key.prop != NULL &&
- RNA_property_is_idprop(target_key.prop))
- {
- OperationKey parameters_key(id,
- DEG_NODE_TYPE_PARAMETERS,
- DEG_OPCODE_PARAMETERS_EVAL);
- add_relation(target_key,
- parameters_key,
- "Driver Target -> Properties");
- }
+ if (target_key.prop != NULL &&
+ RNA_property_is_idprop(target_key.prop))
+ {
+ OperationKey parameters_key(id,
+ DEG_NODE_TYPE_PARAMETERS,
+ DEG_OPCODE_PARAMETERS_EVAL);
+ add_relation(target_key,
+ parameters_key,
+ "Driver Target -> Properties");
}
}
}
@@ -1518,7 +1517,7 @@ void DepsgraphRelationBuilder::build_driver_variables(ID *id, FCurve *fcu)
DEG_OPCODE_TRANSFORM_FINAL);
add_relation(target_key, driver_key, "Target -> Driver");
}
- else if (dtar->rna_path) {
+ else if (dtar->rna_path != NULL && dtar->rna_path[0] != '\0') {
RNAPathKey variable_key(dtar->id, dtar->rna_path);
if (RNA_pointer_is_null(&variable_key.ptr)) {
continue;
More information about the Bf-blender-cvs
mailing list