Depsgraph: Cleanup, split build_animation
This commit is contained in:
parent
9f9b666d9a
commit
f1ad6b43b3
@ -870,26 +870,35 @@ void DepsgraphRelationBuilder::build_constraints(ID *id,
|
||||
}
|
||||
|
||||
void DepsgraphRelationBuilder::build_animdata(ID *id)
|
||||
{
|
||||
/* Animation curves and NLA. */
|
||||
build_animdata_curves(id);
|
||||
/* Drivers. */
|
||||
build_animdata_drievrs(id);
|
||||
}
|
||||
|
||||
void DepsgraphRelationBuilder::build_animdata_curves(ID *id)
|
||||
{
|
||||
AnimData *adt = BKE_animdata_from_id(id);
|
||||
|
||||
if (adt == NULL)
|
||||
if (adt == NULL) {
|
||||
return;
|
||||
|
||||
}
|
||||
ComponentKey adt_key(id, DEG_NODE_TYPE_ANIMATION);
|
||||
|
||||
/* animation */
|
||||
if (adt->action || adt->nla_tracks.first) {
|
||||
/* wire up dependency to time source */
|
||||
if (adt->action == NULL && adt->nla_tracks.first == NULL) {
|
||||
return;
|
||||
}
|
||||
/* Wire up dependency to time source. */
|
||||
TimeSourceKey time_src_key;
|
||||
add_relation(time_src_key, adt_key, "TimeSrc -> Animation");
|
||||
}
|
||||
|
||||
// XXX: Hook up specific update callbacks for special properties which may need it...
|
||||
|
||||
// XXX: animdata "hierarchy" - top-level overrides need to go after lower-down
|
||||
void DepsgraphRelationBuilder::build_animdata_drievrs(ID *id)
|
||||
{
|
||||
AnimData *adt = BKE_animdata_from_id(id);
|
||||
if (adt == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* drivers */
|
||||
ComponentKey adt_key(id, DEG_NODE_TYPE_ANIMATION);
|
||||
LINKLIST_FOREACH (FCurve *, fcu, &adt->drivers) {
|
||||
OperationKey driver_key(id,
|
||||
DEG_NODE_TYPE_PARAMETERS,
|
||||
|
@ -197,6 +197,8 @@ struct DepsgraphRelationBuilder
|
||||
ListBase *constraints,
|
||||
RootPChanMap *root_map);
|
||||
void build_animdata(ID *id);
|
||||
void build_animdata_curves(ID *id);
|
||||
void build_animdata_drievrs(ID *id);
|
||||
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
Block a user