Blender V2.61 - r43446
Classes | Typedefs | Functions

action.c File Reference

#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <stddef.h>
#include "MEM_guardedalloc.h"
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_constraint_types.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "BLI_blenlib.h"
#include "BLI_bpath.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
#include "BKE_animsys.h"
#include "BKE_action.h"
#include "BKE_anim.h"
#include "BKE_constraint.h"
#include "BKE_global.h"
#include "BKE_fcurve.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_idprop.h"
#include "BIK_api.h"
#include "RNA_access.h"

Go to the source code of this file.

Classes

struct  tMakeLocalActionContext

Typedefs

typedef struct
tMakeLocalActionContext 
tMakeLocalActionContext

Functions

bActionadd_empty_action (const char name[])
static void make_localact_init_cb (ID *id, AnimData *adt, void *mlac_ptr)
static void make_localact_apply_cb (ID *id, AnimData *adt, void *mlac_ptr)
void make_local_action (bAction *act)
void free_action (bAction *act)
bActioncopy_action (bAction *src)
bActionGroupget_active_actiongroup (bAction *act)
void set_active_action_group (bAction *act, bActionGroup *agrp, short select)
bActionGroupaction_groups_add_new (bAction *act, const char name[])
void action_groups_add_channel (bAction *act, bActionGroup *agrp, FCurve *fcurve)
void action_groups_remove_channel (bAction *act, FCurve *fcu)
bActionGroupaction_groups_find_named (bAction *act, const char name[])
void action_groups_clear_tempflags (bAction *act)
bPoseChannelget_pose_channel (const bPose *pose, const char *name)
bPoseChannelverify_pose_channel (bPose *pose, const char *name)
bPoseChannelget_active_posechannel (Object *ob)
const char * get_ikparam_name (bPose *pose)
void copy_pose (bPose **dst, bPose *src, int copycon)
void init_pose_itasc (bItasc *itasc)
void init_pose_ikparam (bPose *pose)
void make_pose_channels_hash (bPose *pose)
void free_pose_channels_hash (bPose *pose)
void free_pose_channel (bPoseChannel *pchan)
void free_pose_channels (bPose *pose)
void free_pose (bPose *pose)
static void copy_pose_channel_data (bPoseChannel *pchan, const bPoseChannel *chan)
void duplicate_pose_channel_data (bPoseChannel *pchan, const bPoseChannel *pchan_from)
void update_pose_constraint_flags (bPose *pose)
void framechange_poses_clear_unkeyed (void)
void pose_add_group (Object *ob)
void pose_remove_group (Object *ob)
short action_has_motion (const bAction *act)
void calc_action_range (const bAction *act, float *start, float *end, short incl_modifiers)
short action_get_item_transforms (bAction *act, Object *ob, bPoseChannel *pchan, ListBase *curves)
void extract_pose_from_pose (bPose *pose, const bPose *src)
void rest_pose (bPose *pose)
void copy_pose_result (bPose *to, bPose *from)
void what_does_obaction (Object *ob, Object *workob, bPose *pose, bAction *act, char groupname[], float cframe)

Detailed Description

Definition in file action.c.


Typedef Documentation


Function Documentation

short action_get_item_transforms ( bAction act,
Object ob,
bPoseChannel pchan,
ListBase curves 
)
void action_groups_add_channel ( bAction act,
bActionGroup agrp,
FCurve fcurve 
)
bActionGroup* action_groups_add_new ( bAction act,
const char  name[] 
) [read]
void action_groups_clear_tempflags ( bAction act)
bActionGroup* action_groups_find_named ( bAction act,
const char  name[] 
) [read]
void action_groups_remove_channel ( bAction act,
FCurve fcu 
)
short action_has_motion ( const bAction act)

Definition at line 849 of file action.c.

References bAction::curves, ListBase::first, FCurve::next, and FCurve::totvert.

bAction* add_empty_action ( const char  name[]) [read]
void calc_action_range ( const bAction act,
float *  start,
float *  end,
short  incl_modifiers 
)
bAction* copy_action ( bAction src) [read]
void copy_pose ( struct bPose **  dst,
struct bPose src,
int  copyconstraints 
)

Allocate a new pose on the heap, and copy the src pose and it's channels into the new pose. *dst is set to the newly allocated structure, and assumed to be NULL.

Definition at line 493 of file action.c.

References bPose::agroups, BLI_duplicatelist(), bPose::chanbase, bPoseChannel::constraints, copy_constraints(), ListBase::first, IDP_CopyProperty(), bPose::ikdata, bPose::ikparam, bPose::iksolver, MEM_callocN(), MEM_dupallocN(), bPoseChannel::mpath, bPoseChannel::next, NULL, bPoseChannel::prop, and TRUE.

Referenced by copy_object_pose(), draw_ghost_poses(), draw_ghost_poses_keys(), draw_ghost_poses_range(), pose_clear_user_transforms_exec(), and pose_copy_exec().

static void copy_pose_channel_data ( bPoseChannel pchan,
const bPoseChannel chan 
) [static]
void copy_pose_result ( bPose to,
bPose from 
)
void duplicate_pose_channel_data ( bPoseChannel pchan,
const bPoseChannel pchan_from 
)
void extract_pose_from_pose ( bPose pose,
const bPose src 
)
void framechange_poses_clear_unkeyed ( void  )
void free_action ( bAction act)
void free_pose ( struct bPose pose)

Removes and deallocates all data from a pose, and also frees the pose.

Definition at line 621 of file action.c.

References bPose::agroups, BIK_clear_data(), BLI_freelistN(), ListBase::first, free_pose_channels(), bPose::ikparam, and MEM_freeN().

Referenced by actcon_get_tarmat(), draw_ghost_poses(), draw_ghost_poses_keys(), draw_ghost_poses_range(), free_object(), and lib_link_object().

void free_pose_channel ( struct bPoseChannel pchan)
void free_pose_channels ( struct bPose pose)

Removes and deallocates all channels from a pose. Does not free the pose itself.

Definition at line 607 of file action.c.

References BLI_freelistN(), bPose::chanbase, ListBase::first, free_pose_channel(), free_pose_channels_hash(), and bPoseChannel::next.

Referenced by free_pose(), and game_free_pose().

void free_pose_channels_hash ( bPose pose)
bActionGroup* get_active_actiongroup ( bAction act) [read]
bPoseChannel* get_active_posechannel ( struct Object ob) [read]
const char* get_ikparam_name ( bPose pose)

Definition at line 480 of file action.c.

References bPose::iksolver, IKSOLVER_ITASC, IKSOLVER_LEGACY, and NULL.

Referenced by write_pose().

bPoseChannel* get_pose_channel ( const bPose pose,
const char *  name 
)

Definition at line 413 of file action.c.

References BLI_findstring(), BLI_ghash_lookup(), bPose::chanhash, ELEM, and NULL.

void init_pose_ikparam ( bPose pose)
void init_pose_itasc ( bItasc itasc)
void make_local_action ( bAction act)
static void make_localact_apply_cb ( ID id,
AnimData adt,
void *  mlac_ptr 
) [static]
static void make_localact_init_cb ( ID id,
AnimData adt,
void *  mlac_ptr 
) [static]
void make_pose_channels_hash ( struct bPose pose)

Removes the hash for quick lookup of channels, must be done when adding/removing channels.

Definition at line 571 of file action.c.

References BLI_ghash_insert(), BLI_ghash_new(), BLI_ghashutil_strcmp(), BLI_ghashutil_strhash(), bPose::chanbase, bPose::chanhash, ListBase::first, bPoseChannel::name, and bPoseChannel::next.

Referenced by armature_rebuild_pose(), game_copy_pose(), and object_handle_update().

void pose_add_group ( Object ob)
void pose_remove_group ( Object ob)
void rest_pose ( bPose pose)
void set_active_action_group ( bAction act,
bActionGroup agrp,
short  select 
)
void update_pose_constraint_flags ( bPose pose)
bPoseChannel* verify_pose_channel ( struct bPose pose,
const char *  name 
) [read]
void what_does_obaction ( Object ob,
Object workob,
bPose pose,
bAction act,
char  groupname[],
float  cframe 
)