Remove defunct NLA_OT_bake
It's been 9 years too long. And don't get this one confused with nla.bake (why would you even?). The·BakeAction operator will be renamed to NLA_TO_bake next.
This commit is contained in:
@@ -2013,30 +2013,3 @@ void BKE_nla_tweakmode_exit(AnimData *adt)
|
||||
adt->actstrip = NULL;
|
||||
adt->flag &= ~ADT_NLA_EDIT_ON;
|
||||
}
|
||||
|
||||
/* Baking Tools ------------------------------------------- */
|
||||
|
||||
static void UNUSED_FUNCTION(BKE_nla_bake) (Scene *scene, ID *UNUSED(id), AnimData *adt, int UNUSED(flag))
|
||||
{
|
||||
|
||||
/* verify that data is valid
|
||||
* 1) Scene and AnimData must be provided
|
||||
* 2) there must be tracks to merge...
|
||||
*/
|
||||
if (ELEM(NULL, scene, adt, adt->nla_tracks.first))
|
||||
return;
|
||||
|
||||
/* if animdata currently has an action, 'push down' this onto the stack first */
|
||||
if (adt->action)
|
||||
BKE_nla_action_pushdown(adt);
|
||||
|
||||
/* get range of motion to bake, and the channels involved... */
|
||||
|
||||
/* temporarily mute the action, and start keying to it */
|
||||
|
||||
/* start keying... */
|
||||
|
||||
/* unmute the action */
|
||||
}
|
||||
|
||||
/* *************************************************** */
|
||||
|
||||
@@ -1345,60 +1345,6 @@ void NLA_OT_split(wmOperatorType *ot)
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
/* ******************** Bake Strips Operator ***************************** */
|
||||
/* Bakes the NLA Strips for the active AnimData blocks */
|
||||
|
||||
static int nlaedit_bake_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
bAnimContext ac;
|
||||
|
||||
ListBase anim_data = {NULL, NULL};
|
||||
bAnimListElem *ale;
|
||||
int filter;
|
||||
// int flag = 0;
|
||||
|
||||
/* get editor data */
|
||||
if (ANIM_animdata_get_context(C, &ac) == 0)
|
||||
return OPERATOR_CANCELLED;
|
||||
|
||||
/* get a list of the editable tracks being shown in the NLA */
|
||||
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ANIMDATA | ANIMFILTER_FOREDIT);
|
||||
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
|
||||
|
||||
/* for each AnimData block, bake strips to animdata... */
|
||||
for (ale = anim_data.first; ale; ale = ale->next) {
|
||||
//BKE_nla_bake(ac.scene, ale->id, ale->data, flag);
|
||||
}
|
||||
|
||||
/* free temp data */
|
||||
ANIM_animdata_freelist(&anim_data);
|
||||
|
||||
/* refresh auto strip properties */
|
||||
ED_nla_postop_refresh(&ac);
|
||||
|
||||
/* set notifier that things have changed */
|
||||
WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
|
||||
|
||||
/* done */
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
/* why isn't this used? */
|
||||
static void UNUSED_FUNCTION(NLA_OT_bake)(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name = "Bake Strips";
|
||||
ot->idname = "NLA_OT_bake";
|
||||
ot->description = "Bake all strips of selected AnimData blocks";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = nlaedit_bake_exec;
|
||||
ot->poll = nlaop_poll_tweakmode_off;
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
/* *********************************************** */
|
||||
/* NLA Editing Operations (Modifying) */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user