Blender V4.5
pose_utils.cc File Reference
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_math_rotation.h"
#include "BLI_math_vector.h"
#include "BLI_string.h"
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_object_types.h"
#include "BKE_action.hh"
#include "BKE_anim_data.hh"
#include "BKE_idprop.hh"
#include "BKE_layer.hh"
#include "BKE_object.hh"
#include "BKE_context.hh"
#include "DEG_depsgraph.hh"
#include "RNA_access.hh"
#include "RNA_path.hh"
#include "RNA_prototypes.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "ED_armature.hh"
#include "ED_keyframing.hh"
#include "ANIM_action.hh"
#include "ANIM_action_iterators.hh"
#include "ANIM_keyframing.hh"
#include "ANIM_keyingsets.hh"
#include "armature_intern.hh"

Go to the source code of this file.

Enumerations

enum  eAction_TransformFlags {
  ACT_TRANS_LOC = (1 << 0) , ACT_TRANS_ROT = (1 << 1) , ACT_TRANS_SCALE = (1 << 2) , ACT_TRANS_BBONE = (1 << 3) ,
  ACT_TRANS_PROP = (1 << 4) , ACT_TRANS_ONLY = (ACT_TRANS_LOC | ACT_TRANS_ROT | ACT_TRANS_SCALE) , ACT_TRANS_ALL = (ACT_TRANS_ONLY | ACT_TRANS_PROP)
}

Functions

static eAction_TransformFlags get_item_transform_flags_and_fcurves (Object &ob, bPoseChannel &pchan, ListBase &r_curves)
static void fcurves_to_pchan_links_get (ListBase &pfLinks, Object &ob, bPoseChannel &pchan)
ObjectposeAnim_object_get (Object *ob_)
void poseAnim_mapping_get (bContext *C, ListBase *pfLinks)
void poseAnim_mapping_free (ListBase *pfLinks)
void poseAnim_mapping_refresh (bContext *C, Scene *, Object *ob)
void poseAnim_mapping_reset (ListBase *pfLinks)
void poseAnim_mapping_autoKeyframe (bContext *C, Scene *scene, ListBase *pfLinks, float cframe)
LinkDataposeAnim_mapping_getNextFCurve (ListBase *fcuLinks, LinkData *prev, const char *path)

Enumeration Type Documentation

◆ eAction_TransformFlags

Types of transforms applied to the given item:

  • these are the return flags for get_item_transform_flags()
Enumerator
ACT_TRANS_LOC 
ACT_TRANS_ROT 
ACT_TRANS_SCALE 
ACT_TRANS_BBONE 
ACT_TRANS_PROP 
ACT_TRANS_ONLY 
ACT_TRANS_ALL 

Definition at line 62 of file pose_utils.cc.

Function Documentation

◆ fcurves_to_pchan_links_get()

void fcurves_to_pchan_links_get ( ListBase & pfLinks,
Object & ob,
bPoseChannel & pchan )
static

Definition at line 168 of file pose_utils.cc.

References ACT_TRANS_BBONE, ACT_TRANS_LOC, ACT_TRANS_PROP, ACT_TRANS_ROT, ACT_TRANS_SCALE, BLI_addtail(), BLI_strdup(), copy_qt_qt(), copy_v3_v3(), bPoseChannel::curve_in_x, tPChanFCurveLink::curve_in_x, bPoseChannel::curve_in_z, tPChanFCurveLink::curve_in_z, bPoseChannel::curve_out_x, tPChanFCurveLink::curve_out_x, bPoseChannel::curve_out_z, tPChanFCurveLink::curve_out_z, bPoseChannel::ease1, tPChanFCurveLink::ease1, bPoseChannel::ease2, tPChanFCurveLink::ease2, bPoseChannel::eul, tPChanFCurveLink::fcurves, fcurves_to_pchan_links_get(), bPoseChannel::flag, get_item_transform_flags_and_fcurves(), IDP_CopyProperty(), bPoseChannel::loc, MEM_callocN(), tPChanFCurveLink::ob, tPChanFCurveLink::old_system_properties, tPChanFCurveLink::oldangle, tPChanFCurveLink::oldaxis, tPChanFCurveLink::oldloc, tPChanFCurveLink::oldprops, tPChanFCurveLink::oldquat, tPChanFCurveLink::oldrot, tPChanFCurveLink::oldscale, tPChanFCurveLink::pchan, tPChanFCurveLink::pchan_path, POSE_BBONE_SHAPE, POSE_LOC, POSE_ROT, POSE_SCALE, bPoseChannel::prop, bPoseChannel::quat, RNA_path_from_ID_to_struct(), RNA_pointer_create_discrete(), bPoseChannel::roll1, tPChanFCurveLink::roll1, bPoseChannel::roll2, tPChanFCurveLink::roll2, bPoseChannel::rotAngle, bPoseChannel::rotAxis, bPoseChannel::scale, bPoseChannel::scale_in, tPChanFCurveLink::scale_in, bPoseChannel::scale_out, tPChanFCurveLink::scale_out, and bPoseChannel::system_properties.

Referenced by fcurves_to_pchan_links_get(), and poseAnim_mapping_get().

◆ get_item_transform_flags_and_fcurves()

◆ poseAnim_mapping_autoKeyframe()

◆ poseAnim_mapping_free()

◆ poseAnim_mapping_get()

void poseAnim_mapping_get ( bContext * C,
ListBase * pfLinks )

Build up a list of tPChanFCurveLink. First only selected, and if that yields no result, all visible.

Definition at line 246 of file pose_utils.cc.

References AnimData::action, Object::adt, BLI_assert, BLI_listbase_is_empty(), C, CTX_DATA_BEGIN_WITH_ID, CTX_DATA_END, fcurves_to_pchan_links_get(), poseAnim_mapping_get(), and poseAnim_object_get().

Referenced by pose_propagate_exec(), pose_slide_init(), and poseAnim_mapping_get().

◆ poseAnim_mapping_getNextFCurve()

LinkData * poseAnim_mapping_getNextFCurve ( ListBase * fcuLinks,
LinkData * prev,
const char * path )

Find the next F-Curve for a PoseChannel with matching path.

  • path is not just the tPChanFCurveLink (pfl) rna_path, since that path doesn't have property info yet.

Definition at line 444 of file pose_utils.cc.

References LinkData::data, ListBase::first, LinkData::next, poseAnim_mapping_getNextFCurve(), FCurve::rna_path, and STREQ.

Referenced by pose_slide_apply_quat(), pose_slide_apply_vec3(), and poseAnim_mapping_getNextFCurve().

◆ poseAnim_mapping_refresh()

◆ poseAnim_mapping_reset()

◆ poseAnim_object_get()

Object * poseAnim_object_get ( Object * ob_)

Returns a valid pose armature for this object, else returns NULL.

Definition at line 237 of file pose_utils.cc.

References AnimData::action, Object::adt, BKE_object_pose_armature_get(), Object::data, ELEM, and poseAnim_object_get().

Referenced by pose_slide_init(), poseAnim_mapping_autoKeyframe(), poseAnim_mapping_get(), and poseAnim_object_get().