Anim: allow 'Push Down' on empty Action #121078

Open
Sybren A. Stüvel wants to merge 1 commits from dr.sybren/blender:anim/pushdown-empty-action into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 0 additions and 18 deletions

View File

@ -2150,15 +2150,6 @@ void BKE_nla_action_pushdown(AnimData *adt, const bool is_liboverride)
return;
}
/* if the action is empty, we also shouldn't try to add to stack,
* as that will cause us grief down the track
*/
/* TODO: what about modifiers? */
if (BKE_action_has_motion(adt->action) == 0) {
CLOG_ERROR(&LOG, "action has no data");
return;
}
/* add a new NLA strip to the track, which references the active action */
strip = BKE_nlastack_add_strip(adt, adt->action, is_liboverride);
if (strip == nullptr) {

View File

@ -327,15 +327,6 @@ static int action_pushdown_exec(bContext *C, wmOperator *op)
/* Do the deed... */
if (adt) {
/* Perform the push-down operation
* - This will deal with all the AnimData-side user-counts. */
if (BKE_action_has_motion(adt->action) == 0) {
/* action may not be suitable... */
BKE_report(op->reports, RPT_WARNING, "Action must have at least one keyframe or F-Modifier");
return OPERATOR_CANCELLED;
}
/* action can be safely added */
BKE_nla_action_pushdown(adt, ID_IS_OVERRIDE_LIBRARY(adt_id_owner));
Main *bmain = CTX_data_main(C);