Depsgraph: add proper handling of actions contained in NLA strips.
This commit is contained in:
@@ -859,6 +859,11 @@ void DepsgraphNodeBuilder::build_animdata(ID *id)
|
||||
*/
|
||||
}
|
||||
|
||||
/* NLA strips contain actions */
|
||||
LISTBASE_FOREACH (NlaTrack *, nlt, &adt->nla_tracks) {
|
||||
build_animdata_nlastrip_targets(&nlt->strips);
|
||||
}
|
||||
|
||||
/* drivers */
|
||||
int driver_index = 0;
|
||||
LISTBASE_FOREACH (FCurve *, fcu, &adt->drivers) {
|
||||
@@ -868,6 +873,18 @@ void DepsgraphNodeBuilder::build_animdata(ID *id)
|
||||
}
|
||||
}
|
||||
|
||||
void DepsgraphNodeBuilder::build_animdata_nlastrip_targets(ListBase *strips)
|
||||
{
|
||||
LISTBASE_FOREACH (NlaStrip *, strip, strips) {
|
||||
if (strip->act != NULL) {
|
||||
build_action(strip->act);
|
||||
}
|
||||
else if (strip->strips.first != NULL) {
|
||||
build_animdata_nlastrip_targets(&strip->strips);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DepsgraphNodeBuilder::build_action(bAction *action)
|
||||
{
|
||||
if (built_map_.checkIsBuiltAndTag(action)) {
|
||||
|
||||
@@ -192,6 +192,7 @@ struct DepsgraphNodeBuilder {
|
||||
void build_particle_settings(ParticleSettings *part);
|
||||
void build_cloth(Object *object);
|
||||
void build_animdata(ID *id);
|
||||
void build_animdata_nlastrip_targets(ListBase *strips);
|
||||
void build_action(bAction *action);
|
||||
void build_driver(ID *id, FCurve *fcurve, int driver_index);
|
||||
void build_driver_variables(ID *id, FCurve *fcurve);
|
||||
|
||||
@@ -1192,6 +1192,11 @@ void DepsgraphRelationBuilder::build_animdata_nlastrip_targets(
|
||||
{
|
||||
LISTBASE_FOREACH(NlaStrip *, strip, strips) {
|
||||
if (strip->act != NULL) {
|
||||
build_action(strip->act);
|
||||
|
||||
ComponentKey action_key(&strip->act->id, DEG_NODE_TYPE_ANIMATION);
|
||||
add_relation(action_key, adt_key, "Action -> Animation");
|
||||
|
||||
build_animdata_curves_targets(id, adt_key,
|
||||
operation_from,
|
||||
&strip->act->curves);
|
||||
|
||||
Reference in New Issue
Block a user