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>2018-06-27 15:36:37 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-06-27 17:35:06 +0300
commit05bcb2d5f55240edf2855176d98be697ab540254 (patch)
tree6ed3f448d96809a3ea9f00bbdf2cb01981dc3d31 /source/blender/depsgraph
parentc3594f6469fbbdd433ee20923cab62c33c271946 (diff)
Depsgraph: Fix missing relation from action to animation when it's shared
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.cc22
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.h2
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc14
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.h2
4 files changed, 29 insertions, 11 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index cfb2f1bc8d6..cb455130d4c 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -749,19 +749,14 @@ void DepsgraphNodeBuilder::build_animdata(ID *id)
if (adt == NULL) {
return;
}
+ if (adt->action != NULL) {
+ build_action(adt->action);
+ }
/* animation */
if (adt->action || adt->nla_tracks.first || adt->drivers.first) {
(void) add_id_node(id);
ID *id_cow = get_cow_id(id);
- if (adt->action != NULL &&
- !built_map_.checkIsBuiltAndTag(&adt->action->id))
- {
- add_operation_node(&adt->action->id, DEG_NODE_TYPE_ANIMATION,
- NULL,
- DEG_OPCODE_ANIMATION);
- }
-
// XXX: Hook up specific update callbacks for special properties which
// may need it...
@@ -792,6 +787,17 @@ void DepsgraphNodeBuilder::build_animdata(ID *id)
}
}
+void DepsgraphNodeBuilder::build_action(bAction *action)
+{
+ if (built_map_.checkIsBuiltAndTag(action)) {
+ return;
+ }
+ add_operation_node(&action->id,
+ DEG_NODE_TYPE_ANIMATION,
+ NULL,
+ DEG_OPCODE_ANIMATION);
+}
+
/**
* Build graph node(s) for Driver
* \param id: ID-Block that driver is attached to
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
index 487b834bd07..6899a86b3e9 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
@@ -37,6 +37,7 @@
struct Base;
struct bArmature;
+struct bAction;
struct CacheFile;
struct Camera;
struct bGPdata;
@@ -185,6 +186,7 @@ struct DepsgraphNodeBuilder {
void build_particle_settings(ParticleSettings *part);
void build_cloth(Object *object);
void build_animdata(ID *id);
+ void build_action(bAction *action);
void build_driver(ID *id, FCurve *fcurve, int driver_index);
void build_driver_variables(ID *id, FCurve *fcurve);
void build_driver_id_property(ID *id, const char *rna_path);
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 06c17b19a8c..252f9a60a0e 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -1032,6 +1032,9 @@ void DepsgraphRelationBuilder::build_animdata_curves(ID *id)
if (adt == NULL) {
return;
}
+ if (adt->action != NULL) {
+ build_action(adt->action);
+ }
if (adt->action == NULL && adt->nla_tracks.first == NULL) {
return;
}
@@ -1040,9 +1043,7 @@ void DepsgraphRelationBuilder::build_animdata_curves(ID *id)
TimeSourceKey time_src_key;
add_relation(time_src_key, adt_key, "TimeSrc -> Animation");
/* Relation from action itself. */
- if (adt->action != NULL &&
- !built_map_.checkIsBuiltAndTag(&adt->action->id))
- {
+ if (adt->action != NULL) {
ComponentKey action_key(&adt->action->id, DEG_NODE_TYPE_ANIMATION);
add_relation(action_key, adt_key, "Action -> Animation");
}
@@ -1204,6 +1205,13 @@ void DepsgraphRelationBuilder::build_animdata_drivers(ID *id)
}
}
+void DepsgraphRelationBuilder::build_action(bAction *action)
+{
+ if (built_map_.checkIsBuiltAndTag(action)) {
+ return;
+ }
+}
+
void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)
{
ChannelDriver *driver = fcu->driver;
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.h b/source/blender/depsgraph/intern/builder/deg_builder_relations.h
index 9996e420663..d4f1271b217 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.h
@@ -50,6 +50,7 @@
struct Base;
struct bArmature;
+struct bAction;
struct bGPdata;
struct CacheFile;
struct Camera;
@@ -231,6 +232,7 @@ struct DepsgraphRelationBuilder
OperationDepsNode *operation_from,
ListBase *strips);
void build_animdata_drivers(ID *id);
+ void build_action(bAction *action);
void build_driver(ID *id, FCurve *fcurve);
void build_driver_data(ID *id, FCurve *fcurve);
void build_driver_variables(ID *id, FCurve *fcurve);