126 for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
146 for (fcu = act->
curves.
first; fcu; fcu = fcu->next) {
148 if (strstr(fcu->rna_path,
"bones") ==
NULL) {
157 if (
STREQ(pchanName, pchan->name)) {
162 ((fcu->grp) ? (fcu->grp->name) : (
NULL)),
178 bool do_loc =
false, do_rot =
false, do_scale =
false;
254 if (targetless_con) {
256 *temp_con_data = *targetless_con;
282 for (; con; con = con->
next) {
326 if (
data->rootbone == 0) {
389 data->max_rootbone =
data->rootbone;
398 short wentdeeper = 0, added = 0;
407 if (wentdeeper == 0) {
471 return (tot_ik) ? 1 : 0;
507 bool is_mirror_relative)
528 if (is_mirror_relative) {
529 float pchan_mtx[4][4];
530 float pchan_mtx_mirror[4][4];
532 float flip_mtx[4][4];
539 mul_m4_m4m4(pchan_mtx_mirror, pchan_mtx_mirror, flip_mtx);
540 mul_m4_m4m4(pchan_mtx_mirror, flip_mtx, pchan_mtx_mirror);
559 float pmat[3][3], omat[3][3];
560 float cmat[3][3], tmat[3][3];
580 td->loc = pchan->
loc;
691 td->loc =
data->grabtarget;
726 bool has_translate_rotate_buf[2] = {
false,
false};
737 if ((arm ==
NULL) || (pose ==
NULL)) {
745 ob,
t->mode,
t->around, has_translate_rotate);
747 if (tc->data_len == 0) {
760 int total_mirrored = 0;
772 "PoseInitData_Mirror");
777 tc->custom.type.data = pid;
778 tc->custom.type.use_free =
true;
783 if (tc->data_len == 0) {
808 for (i = 0; i < tc->data_len; i++, td++, tdx++) {
830 has_translate_rotate[0] =
true;
843 if (td != (tc->data + tc->data_len)) {
855 if (has_translate_rotate[1]) {
873 int total_mirrored = 0;
876 for (ebo = edbo->
first; ebo; ebo = ebo->
next) {
877 const int data_len_prev = tc->data_len;
900 if (mirror && (data_len_prev < tc->data_len)) {
917 tc->custom.type.data = bid;
918 tc->custom.type.use_free =
true;
920 t->data_len_all += tc->data_len;
924 t->data_len_all = -1;
935 float mtx[3][3], smtx[3][3], bonemat[3][3];
945 for (ebo = edbo->
first; ebo; ebo = ebo->
next) {
1010 td->
ob = tc->obedit;
1025 td->
ob = tc->obedit;
1046 td->loc = ebo->
tail;
1064 td->
ob = tc->obedit;
1071 td->loc = ebo->
head;
1087 td->
ob = tc->obedit;
1094 if (mirror && (td_old != td)) {
1097 bid[i].
bone = eboflip;
1155 for (ebo_child = arm->
edbo->
first; ebo_child; ebo_child = ebo_child->
next) {
1188 for (ebo = edbo->
first; ebo; ebo = ebo->
next) {
1235 for (i = 0; i < tc->data_len; i++, td++) {
1237 float vec[3], up_axis[3];
1289 float flip_mtx[4][4];
1291 flip_mtx[0][0] = -1;
1305 for (
int i = tc->
data_len; i--; td++) {
1310 if (pchan ==
NULL) {
1324 float pchan_mtx_final[4][4];
1326 mul_m4_m4m4(pchan_mtx_final, pchan_mtx_final, flip_mtx);
1327 mul_m4_m4m4(pchan_mtx_final, flip_mtx, pchan_mtx_final);
1407 Object *ob = tc->poseobj;
1433 Object *ob = tc->poseobj;
1472 GSET_ITER (gs_iter, motionpath_updates) {
1490 for (; bone; bone = bone->
next) {
1511 bool has_translate_rotate[2])
1552 if (has_translate_rotate !=
NULL) {
1556 has_translate_rotate[0] =
true;
1561 has_translate_rotate[0] =
true;
1565 has_translate_rotate[1] =
true;
1569 has_translate_rotate[0] =
true;
1582 int segcount, apply = 0;
1604 for (; parchan; parchan = parchan->
parent) {
1605 chanlist[segcount] = parchan;
1608 if (segcount ==
data->rootbone || segcount > 255) {
1612 for (; segcount; segcount--) {
1621 parchan = chanlist[segcount - 1];
1622 bone = parchan->
bone;
1628 float rmat3[3][3], qrmat[3][3], imat3[3][3], smat[3][3];
1670 bool relations_changed =
false;
1684 relations_changed =
true;
1702 if (relations_changed) {
1728 short targetless_ik = 0;
1736 struct Object *pose_ob = tc->poseobj;
1781 GSET_ITER (gs_iter, motionpath_updates) {
void BIK_clear_data(struct bPose *pose)
Blender kernel action and pose functionality.
struct bPoseChannel * BKE_pose_channel_find_name(const struct bPose *pose, const char *name)
struct bPoseChannel * BKE_pose_channel_get_mirrored(const struct bPose *pose, const char *name)
void BKE_animsys_free_nla_keyframing_context_cache(struct ListBase *cache)
AnimationEvalContext BKE_animsys_eval_context_construct(struct Depsgraph *depsgraph, float eval_time)
void BKE_bone_parent_transform_calc_from_pchan(const struct bPoseChannel *pchan, struct BoneParentTransform *r_bpt)
void BKE_pchan_to_mat4(const struct bPoseChannel *pchan, float r_chanmat[4][4])
struct bArmature * BKE_armature_from_object(struct Object *ob)
void BKE_pchan_apply_mat4(struct bPoseChannel *pchan, const float mat[4][4], bool use_compat)
void BKE_pchan_mat3_to_rot(struct bPoseChannel *pchan, const float mat[3][3], bool use_compat)
void BKE_armature_mat_pose_to_bone(struct bPoseChannel *pchan, const float inmat[4][4], float outmat[4][4])
#define PBONE_VISIBLE(arm, bone)
void BKE_pose_where_is(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
void BKE_pchan_rot_to_mat3(const struct bPoseChannel *pchan, float r_mat[3][3])
struct bConstraint * BKE_constraint_add_for_pose(struct Object *ob, struct bPoseChannel *pchan, const char *name, short type)
struct ReportList * CTX_wm_reports(const bContext *C)
struct Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
void BKE_report(ReportList *reports, ReportType type, const char *message)
GSet * BLI_gset_ptr_new(const char *info)
void BLI_gset_insert(GSet *gs, void *key)
#define GSET_ITER(gs_iter_, gset_)
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
BLI_INLINE void * BLI_gsetIterator_getKey(GSetIterator *gsi)
#define LISTBASE_FOREACH(type, var, list)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
bool invert_m4(float R[4][4])
void copy_m3_m3(float m1[3][3], const float m2[3][3])
void copy_m3_m4(float m1[3][3], const float m2[4][4])
#define PSEUDOINVERSE_EPSILON
void unit_m4(float m[4][4])
void normalize_m3(float R[3][3]) ATTR_NONNULL()
bool invert_m3_m3(float R[3][3], const float A[3][3])
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[3])
#define mul_m3_series(...)
void mul_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3])
void mat3_to_size(float size[3], const float M[3][3])
void pseudoinverse_m3_m3(float Ainv[3][3], const float A[3][3], float epsilon)
float angle_compat_rad(float angle, float angle_compat)
void rotation_between_vecs_to_quat(float q[4], const float v1[3], const float v2[3])
void mul_qt_v3(const float q[4], float r[3])
void copy_qt_qt(float q[4], const float a[4])
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float normalize_v3(float r[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
char * BLI_str_quoted_substrN(const char *__restrict str, const char *__restrict prefix) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
@ MOTIONPATH_BAKE_HAS_PATHS
@ BONE_HINGE_CHILD_TRANSFORM
@ CONSTRAINT_TYPE_KINEMATIC
@ V3D_AROUND_LOCAL_ORIGINS
@ POSE_PATH_CALC_RANGE_CURRENT_FRAME
@ POSE_PATH_CALC_RANGE_CHANGED
#define EBONE_VISIBLE(arm, ebone)
#define ANIM_KS_LOC_ROT_SCALE_ID
#define IS_AUTOKEY_FLAG(scene, flag)
#define ANIM_KS_LOCATION_ID
#define ANIM_KS_SCALING_ID
#define IS_AUTOKEY_ON(scene)
#define ANIM_KS_ROTATION_ID
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
Read Guarded memory(de)allocation.
float ED_armature_ebone_roll_to_vector(const EditBone *bone, const float align_axis[3], const bool axis_only)
void ED_armature_edit_transform_mirror_update(Object *obedit)
void ED_armature_ebone_to_mat3(EditBone *ebone, float r_mat[3][3])
EditBone * ED_armature_ebone_get_mirrored(const ListBase *edbo, EditBone *ebo)
const Depsgraph * depsgraph
bool autokeyframe_cfra_can_key(const Scene *scene, ID *id)
eInsertKeyFlags ANIM_get_keyframing_flags(Scene *scene, const bool use_autokey_mode)
int insert_keyframe(Main *bmain, ReportList *reports, ID *id, bAction *act, const char group[], const char rna_path[], int array_index, const AnimationEvalContext *anim_eval_context, eBezTriple_KeyframeType keytype, ListBase *nla_cache, eInsertKeyFlags flag)
int ANIM_apply_keyingset(bContext *C, ListBase *dsources, bAction *act, KeyingSet *ks, short mode, float cfra)
KeyingSet * ANIM_scene_get_active_keyingset(const Scene *scene)
KeyingSet * ANIM_builtin_keyingset_get_named(KeyingSet *prevKS, const char name[])
void ANIM_relative_keyingset_add_source(ListBase *dsources, ID *id, StructRNA *srna, void *data)
void(* MEM_freeN)(void *vmemh)
size_t(* MEM_allocN_len)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
void ED_pose_recalculate_paths(bContext *C, Scene *scene, Object *ob, ePosePathCalcRange range)
struct bPoseChannel * pchan
struct PoseInitData_Mirror::@572 orig
struct ToolSettings * toolsettings
TransCustomDataContainer custom
struct bConstraint * next
struct bPoseChannel * parent
struct bPoseChannel * next