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-05 14:57:01 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-12-06 12:21:33 +0300
commitabc55bf84a236f3e591d34a480a6fe0f8d3c7688 (patch)
treecaa1de3d610288cff65031cc36edd8e32d07c387 /source/blender/depsgraph
parent4a99cc5850bff6033080a27d81e73f3355af996a (diff)
Depsgraph: Use build_animation() to build relations to animated properties
Before that it was up to lots of other places to keep track on whether something is to be dependent on time or not. Was annoying, and unreliable, and fragile. This commit avoids hacks in object builder. Other areas will be adopted soon.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc22
1 files changed, 5 insertions, 17 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index c1570f310ef..54d3259bc0f 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -486,11 +486,6 @@ void DepsgraphRelationBuilder::build_object(Object *object)
}
/* Animation data */
build_animdata(&object->id);
- // XXX: This should be hooked up by the build_animdata code
- if (needs_animdata_node(&object->id)) {
- ComponentKey adt_key(&object->id, DEG_NODE_TYPE_ANIMATION);
- add_relation(adt_key, local_transform_key, "Object Animation");
- }
/* Object data. */
build_object_data(object);
/* Particle systems. */
@@ -899,19 +894,12 @@ void DepsgraphRelationBuilder::build_animdata_curves(ID *id)
PointerRNA id_ptr;
RNA_id_pointer_create(id, &id_ptr);
LINKLIST_FOREACH(FCurve *, fcu, &adt->action->curves) {
- PointerRNA ptr;
- PropertyRNA *prop;
- int index;
- if (!RNA_path_resolve_full(&id_ptr, fcu->rna_path,
- &ptr, &prop, &index))
- {
- continue;
- }
/* TODO(sergey): Avoid duplicated relations. */
- if (prop != NULL && RNA_property_is_idprop(prop)) {
- RNAPathKey prop_key(id, fcu->rna_path);
- add_relation(adt_key, prop_key, "Animation -> ID Prop");
- }
+ /* TODO(sergey): FCurve on a bone should be hooking up to pose
+ * init rather than to bone local.
+ */
+ RNAPathKey prop_key(id, fcu->rna_path);
+ add_relation(adt_key, prop_key, "Animation -> Prop", true);
}
}
}