[Bf-blender-cvs] [f10bc11061c] blender2.8: Remove defunct NLA_OT_bake

Dalai Felinto noreply at git.blender.org
Fri Oct 19 21:35:58 CEST 2018


Commit: f10bc11061cf3872f9a8b085c47f85bed6ddca93
Author: Dalai Felinto
Date:   Fri Oct 19 16:12:35 2018 -0300
Branches: blender2.8
https://developer.blender.org/rBf10bc11061cf3872f9a8b085c47f85bed6ddca93

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.

===================================================================

M	source/blender/blenkernel/intern/nla.c
M	source/blender/editors/space_nla/nla_edit.c

===================================================================

diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index dede83d97dd..9850ce9b517 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -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 */
-}
-
-/* *************************************************** */
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index 23cd504978c..b304b071ee0 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -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) */



More information about the Bf-blender-cvs mailing list