Depsgraph: Fix missing relation from action to animation when it's shared
This commit is contained in:
parent
c3594f6469
commit
05bcb2d5f5
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue