Blender V5.0
action_data.cc File Reference
#include <cfloat>
#include <cstdlib>
#include <cstring>
#include "BLI_listbase.h"
#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_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)
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 wmOperatorStatus 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 wmOperatorStatus action_pushdown_exec (bContext *C, wmOperator *)
void ACTION_OT_push_down (wmOperatorType *ot)
Action Stash Operator
static wmOperatorStatus 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 wmOperatorStatus 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 wmOperatorStatus action_unlink_exec (bContext *C, wmOperator *op)
static wmOperatorStatus action_unlink_invoke (bContext *C, wmOperator *op, const wmEvent *event)
void ACTION_OT_unlink (wmOperatorType *ot)

Function Documentation

◆ action_create_new()

bAction * action_create_new ( bContext * C,
bAction * oldact )
static

◆ action_new_exec()

◆ action_new_poll()

◆ ACTION_OT_new()

void ACTION_OT_new ( wmOperatorType * ot)

Definition at line 261 of file action_data.cc.

References action_new_exec(), action_new_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.

Referenced by action_operatortypes().

◆ ACTION_OT_push_down()

void ACTION_OT_push_down ( wmOperatorType * ot)

◆ ACTION_OT_stash()

void ACTION_OT_stash ( wmOperatorType * ot)

◆ ACTION_OT_stash_and_create()

void ACTION_OT_stash_and_create ( wmOperatorType * ot)

◆ ACTION_OT_unlink()

◆ action_pushdown_exec()

◆ action_pushdown_poll()

bool action_pushdown_poll ( bContext * C)
static

◆ action_stash_create_exec()

◆ action_stash_create_poll()

◆ action_stash_exec()

◆ action_unlink_exec()

◆ action_unlink_invoke()

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

◆ action_unlink_poll()

bool action_unlink_poll ( bContext * C)
static

◆ ED_actedit_animdata_from_context()

◆ ED_animedit_unlink_action()