Blender V4.3
action_data.cc File Reference
#include <cfloat>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include "BLI_utildefines.h"
#include "BLT_translation.hh"
#include "DNA_anim_types.h"
#include "DNA_key_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "RNA_prototypes.hh"
#include "BKE_action.hh"
#include "BKE_context.hh"
#include "BKE_key.hh"
#include "BKE_lib_id.hh"
#include "BKE_nla.hh"
#include "BKE_report.hh"
#include "BKE_scene.hh"
#include "ANIM_action.hh"
#include "ED_anim_api.hh"
#include "ED_screen.hh"
#include "DEG_depsgraph.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "UI_interface.hh"
#include "UI_interface_c.hh"
#include "action_intern.hh"

Go to the source code of this file.

Functions

Utilities
AnimDataED_actedit_animdata_from_context (const bContext *C, ID **r_adt_id_owner)
 
Create New Action
static bActionaction_create_new (bContext *C, bAction *oldact)
 
static void actedit_change_action (bContext *C, bAction *act)
 
New Action Operator

Criteria: 1) There must be an dope-sheet/action editor, and it must be in a mode which uses actions... OR The NLA Editor is active (i.e. Animation Data panel -> new action) 2) The associated AnimData block must not be in tweak-mode.

static bool action_new_poll (bContext *C)
 
static int action_new_exec (bContext *C, wmOperator *)
 
void ACTION_OT_new (wmOperatorType *ot)
 
Action Push-Down Operator

Criteria: 1) There must be an dope-sheet/action editor, and it must be in a mode which uses actions. 2) There must be an action active. 3) The associated AnimData block must not be in tweak-mode.

static bool action_pushdown_poll (bContext *C)
 
static int action_pushdown_exec (bContext *C, wmOperator *op)
 
void ACTION_OT_push_down (wmOperatorType *ot)
 
Action Stash Operator
static int action_stash_exec (bContext *C, wmOperator *op)
 
void ACTION_OT_stash (wmOperatorType *ot)
 
Action Stash & Create Operator

Criteria: 1) There must be an dope-sheet/action editor, and it must be in a mode which uses actions. 2) The associated AnimData block must not be in tweak-mode.

static bool action_stash_create_poll (bContext *C)
 
static int action_stash_create_exec (bContext *C, wmOperator *op)
 
void ACTION_OT_stash_and_create (wmOperatorType *ot)
 
Action Unlink Operator

We use a custom unlink operator here, as there are some technicalities which need special care: 1) When in Tweak Mode, it shouldn't be possible to unlink the active action, or else, everything turns to custard. 2) If the Action doesn't have any other users, the user should at least get a warning that it is going to get lost. 3) We need a convenient way to exit Tweak Mode from the Action Editor

void ED_animedit_unlink_action (bContext *C, ID *id, AnimData *adt, bAction *act, ReportList *reports, bool force_delete)
 
static bool action_unlink_poll (bContext *C)
 
static int action_unlink_exec (bContext *C, wmOperator *op)
 
static int action_unlink_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
void ACTION_OT_unlink (wmOperatorType *ot)
 
Action Browsing
static NlaStripaction_layer_get_nlastrip (ListBase *strips, float ctime)
 
static void action_layer_switch_strip (const OwnedAnimData owned_adt, NlaTrack *old_track, NlaStrip *old_strip, NlaTrack *nlt, NlaStrip *strip)
 
One Layer Up Operator
static bool action_layer_next_poll (bContext *C)
 
static int action_layer_next_exec (bContext *C, wmOperator *op)
 
void ACTION_OT_layer_next (wmOperatorType *ot)
 
One Layer Down Operator
static bool action_layer_prev_poll (bContext *C)
 
static int action_layer_prev_exec (bContext *C, wmOperator *op)
 
void ACTION_OT_layer_prev (wmOperatorType *ot)
 

Function Documentation

◆ actedit_change_action()

◆ action_create_new()

◆ action_layer_get_nlastrip()

static NlaStrip * action_layer_get_nlastrip ( ListBase * strips,
float ctime )
static

Definition at line 771 of file action_data.cc.

References IN_RANGE_INCL, and LISTBASE_FOREACH.

Referenced by action_layer_next_exec(), and action_layer_prev_exec().

◆ action_layer_next_exec()

◆ action_layer_next_poll()

◆ action_layer_prev_exec()

◆ action_layer_prev_poll()

◆ action_layer_switch_strip()

◆ action_new_exec()

◆ action_new_poll()

◆ ACTION_OT_layer_next()

◆ ACTION_OT_layer_prev()

◆ ACTION_OT_new()

◆ ACTION_OT_push_down()

◆ ACTION_OT_stash()

◆ ACTION_OT_stash_and_create()

◆ ACTION_OT_unlink()

◆ action_pushdown_exec()

◆ action_pushdown_poll()

static bool action_pushdown_poll ( bContext * C)
static

◆ action_stash_create_exec()

◆ action_stash_create_poll()

◆ action_stash_exec()

◆ action_unlink_exec()

◆ action_unlink_invoke()

static int action_unlink_invoke ( bContext * C,
wmOperator * op,
const wmEvent * event )
static

◆ action_unlink_poll()

◆ ED_actedit_animdata_from_context()

◆ ED_animedit_unlink_action()