Blender V2.61 - r43446
|
#include <ctype.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <stdio.h>
#include <float.h>
#include "MEM_guardedalloc.h"
#include "BLI_bpath.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_constraint_types.h"
#include "DNA_mesh_types.h"
#include "DNA_lattice_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_nla_types.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "BKE_animsys.h"
#include "BKE_armature.h"
#include "BKE_action.h"
#include "BKE_anim.h"
#include "BKE_constraint.h"
#include "BKE_curve.h"
#include "BKE_depsgraph.h"
#include "BKE_DerivedMesh.h"
#include "BKE_deform.h"
#include "BKE_displist.h"
#include "BKE_global.h"
#include "BKE_idprop.h"
#include "BKE_library.h"
#include "BKE_lattice.h"
#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_scene.h"
#include "BIK_api.h"
#include "BKE_sketch.h"
Go to the source code of this file.
Classes | |
struct | bPoseChanDeform |
struct | tSplineIK_Tree |
Defines | |
#define | MAX_BBONE_SUBDIV 32 |
Typedefs | |
typedef struct bPoseChanDeform | bPoseChanDeform |
typedef struct tSplineIK_Tree | tSplineIK_Tree |
Functions | |
bArmature * | add_armature (const char *name) |
bArmature * | get_armature (Object *ob) |
void | free_bonelist (ListBase *lb) |
void | free_armature (bArmature *arm) |
void | make_local_armature (bArmature *arm) |
static void | copy_bonechildren (Bone *newBone, Bone *oldBone, Bone *actBone, Bone **newActBone) |
bArmature * | copy_armature (bArmature *arm) |
static Bone * | get_named_bone_bonechildren (Bone *bone, const char *name) |
Bone * | get_named_bone (bArmature *arm, const char *name) |
int | bone_autoside_name (char name[MAXBONENAME], int UNUSED(strip_number), short axis, float head, float tail) |
static void | equalize_bezier (float *data, int desired) |
Mat4 * | b_bone_spline_setup (bPoseChannel *pchan, int rest) |
static void | pchan_b_bone_defmats (bPoseChannel *pchan, bPoseChanDeform *pdef_info, int use_quaternion) |
static void | b_bone_deform (bPoseChanDeform *pdef_info, Bone *bone, float *co, DualQuat *dq, float defmat[][3]) |
float | distfactor_to_bone (float vec[3], float b1[3], float b2[3], float rad1, float rad2, float rdist) |
static void | pchan_deform_mat_add (bPoseChannel *pchan, float weight, float bbonemat[][3], float mat[][3]) |
static float | dist_bone_deform (bPoseChannel *pchan, bPoseChanDeform *pdef_info, float *vec, DualQuat *dq, float mat[][3], float *co) |
static void | pchan_bone_deform (bPoseChannel *pchan, bPoseChanDeform *pdef_info, float weight, float *vec, DualQuat *dq, float mat[][3], float *co, float *contrib) |
void | armature_deform_verts (Object *armOb, Object *target, DerivedMesh *dm, float(*vertexCos)[3], float(*defMats)[3][3], int numVerts, int deformflag, float(*prevCos)[3], const char *defgrp_name) |
void | get_objectspace_bone_matrix (struct Bone *bone, float M_accumulatedMatrix[][4], int UNUSED(root), int UNUSED(posed)) |
void | armature_mat_world_to_pose (Object *ob, float inmat[][4], float outmat[][4]) |
void | armature_loc_world_to_pose (Object *ob, float *inloc, float *outloc) |
void | armature_mat_pose_to_bone (bPoseChannel *pchan, float inmat[][4], float outmat[][4]) |
void | armature_loc_pose_to_bone (bPoseChannel *pchan, float *inloc, float *outloc) |
void | pchan_mat3_to_rot (bPoseChannel *pchan, float mat[][3], short use_compat) |
void | pchan_apply_mat4 (bPoseChannel *pchan, float mat[][4], short use_compat) |
void | armature_mat_pose_to_delta (float delta_mat[][4], float pose_mat[][4], float arm_mat[][4]) |
void | BKE_rotMode_change_values (float quat[4], float eul[3], float axis[3], float *angle, short oldMode, short newMode) |
void | mat3_to_vec_roll (float mat[][3], float *vec, float *roll) |
void | vec_roll_to_mat3 (float *vec, float roll, float mat[][3]) |
void | where_is_armature_bone (Bone *bone, Bone *prevbone) |
void | where_is_armature (bArmature *arm) |
static void | pose_proxy_synchronize (Object *ob, Object *from, int layer_protected) |
static int | rebuild_pose_bone (bPose *pose, Bone *bone, bPoseChannel *parchan, int counter) |
void | armature_rebuild_pose (Object *ob, bArmature *arm) |
static void | splineik_init_tree_from_pchan (Scene *scene, Object *UNUSED(ob), bPoseChannel *pchan_tip) |
static void | splineik_init_tree (Scene *scene, Object *ob, float UNUSED(ctime)) |
static void | splineik_evaluate_bone (tSplineIK_Tree *tree, Scene *scene, Object *ob, bPoseChannel *pchan, int index, float ctime) |
static void | splineik_execute_tree (Scene *scene, Object *ob, bPoseChannel *pchan_root, float ctime) |
void | pchan_to_mat4 (bPoseChannel *pchan, float chan_mat[4][4]) |
void | pchan_calc_mat (bPoseChannel *pchan) |
void | where_is_pose_bone_tail (bPoseChannel *pchan) |
void | where_is_pose_bone (Scene *scene, Object *ob, bPoseChannel *pchan, float ctime, int do_extra) |
void | where_is_pose (Scene *scene, Object *ob) |
int | get_selected_defgroups (Object *ob, char *dg_selection, int defbase_tot) |
Definition in file armature.c.
#define MAX_BBONE_SUBDIV 32 |
Definition at line 381 of file armature.c.
Referenced by b_bone_spline_setup(), and equalize_bezier().
typedef struct bPoseChanDeform bPoseChanDeform |
typedef struct tSplineIK_Tree tSplineIK_Tree |
bArmature* add_armature | ( | const char * | name | ) | [read] |
Definition at line 78 of file armature.c.
References alloc_libblock(), ARM_COL_CUSTOM, ARM_DEF_ENVELOPE, ARM_DEF_VGROUP, bArmature::deformflag, bArmature::flag, G, ID_AR, and bArmature::layer.
Referenced by add_obdata_from_type().
void armature_deform_verts | ( | Object * | armOb, |
Object * | target, | ||
DerivedMesh * | dm, | ||
float(*) | vertexCos[3], | ||
float(*) | defMats[3][3], | ||
int | numVerts, | ||
int | deformflag, | ||
float(*) | prevCos[3], | ||
const char * | defgrp_name | ||
) |
Definition at line 813 of file armature.c.
References add_v3_v3(), add_v3_v3v3(), ARM_DEF_ENVELOPE, ARM_DEF_INVERT_VGROUP, ARM_DEF_QUATERNION, ARM_DEF_VGROUP, Bone::arm_head, Bone::arm_mat, Bone::arm_tail, bPoseChanDeform::b_bone_dual_quats, bPoseChanDeform::b_bone_mats, BLI_countlist(), BLI_findindex(), bPoseChannel::bone, BONE_MULT_VG_ENV, BONE_NO_DEFORM, CD_MDEFORMVERT, bPoseChannel::chan_mat, bPose::chanbase, co, copy_m3_m3(), copy_m3_m4(), copy_m4_m4(), copy_v3_v3(), Object::data, MDeformWeight::def_nr, Object::defbase, defgroup_name_index(), defvert_find_weight(), Bone::dist, dist_bone_deform(), distfactor_to_bone(), bPoseChanDeform::dual_quat, Lattice::dvert, Mesh::dvert, MDeformVert::dw, bArmature::edbo, ELEM, ListBase::first, bPoseChannel::flag, Bone::flag, get_pose_channel(), DerivedMesh::getVertData, i, invert_m4_m4(), mat4_to_dquat(), MEM_callocN(), MEM_freeN(), mul_m3_fl(), mul_m4_v3(), mul_serie_m3(), mul_v3_fl(), mul_v3m3_dq(), mult_m4_m4m4(), bDeformGroup::name, bPoseChannel::next, bDeformGroup::next, normalize_dq(), NULL, OB_LATTICE, OB_MESH, Object::obmat, pchan_b_bone_defmats(), pchan_bone_deform(), Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, Object::pose, post, Bone::rad_head, Bone::rad_tail, Bone::segments, sub_v3_v3(), Mesh::totvert, MDeformVert::totweight, Object::type, MDeformWeight::weight, and zero_m3().
Referenced by BL_SkinDeformer::BlenderDeformVerts(), deformMatrices(), deformMatricesEM(), deformVerts(), and deformVertsEM().
void armature_loc_pose_to_bone | ( | bPoseChannel * | pchan, |
float * | inloc, | ||
float * | outloc | ||
) |
Definition at line 1192 of file armature.c.
References armature_mat_pose_to_bone(), copy_v3_v3(), and MAT4_UNITY.
void armature_loc_world_to_pose | ( | Object * | ob, |
float * | inloc, | ||
float * | outloc | ||
) |
Definition at line 1113 of file armature.c.
References armature_mat_world_to_pose(), copy_v3_v3(), and MAT4_UNITY.
void armature_mat_pose_to_bone | ( | bPoseChannel * | pchan, |
float | inmat[][4], | ||
float | outmat[][4] | ||
) |
Definition at line 1130 of file armature.c.
References bPoseChannel::bone, BONE_NO_LOCAL_LOCATION, copy_m4_m4(), copy_v3_v3(), bPoseChannel::eul, Bone::flag, invert_m4_m4(), bPoseChannel::loc, loc_axisangle_size_to_mat4(), loc_eul_size_to_mat4(), loc_quat_size_to_mat4(), mult_m4_m4m4(), NULL, bPoseChannel::parent, bPoseChannel::pose_mat, bPoseChannel::quat, ROT_MODE_AXISANGLE, ROT_MODE_QUAT, bPoseChannel::rotAngle, bPoseChannel::rotAxis, bPoseChannel::rotmode, bPoseChannel::size, and unit_m4().
Referenced by armature_loc_pose_to_bone().
void armature_mat_pose_to_delta | ( | float | delta_mat[][4], |
float | pose_mat[][4], | ||
float | arm_mat[][4] | ||
) |
Definition at line 1235 of file armature.c.
References invert_m4_m4(), and mult_m4_m4m4().
void armature_mat_world_to_pose | ( | Object * | ob, |
float | inmat[][4], | ||
float | outmat[][4] | ||
) |
Definition at line 1095 of file armature.c.
References invert_m4_m4(), mult_m4_m4m4(), NULL, and Object::obmat.
Referenced by armature_loc_world_to_pose().
Definition at line 1583 of file armature.c.
References animviz_settings_init(), bPose::avs, BLI_freelinkN(), bPoseChannel::bone, bArmature::bonebase, bPose::chanbase, bPoseChannel::child, DAG_pose_sort(), ListBase::first, bPose::flag, free_pose_channel(), free_pose_channels_hash(), bArmature::layer_protected, make_pose_channels_hash(), MEM_callocN(), Bone::next, bPoseChannel::next, next, NULL, object_copy_proxy_drivers(), Object::pose, pose_proxy_synchronize(), POSE_RECALC, POSE_WAS_REBUILT, Object::proxy, rebuild_pose_bone(), and update_pose_constraint_flags().
Referenced by copy_object(), draw_ghost_poses(), draw_ghost_poses_keys(), draw_ghost_poses_range(), ED_armature_from_edit(), object_add_duplicate_internal(), object_handle_update(), object_make_proxy(), single_obdata_users(), and where_is_pose().
static void b_bone_deform | ( | bPoseChanDeform * | pdef_info, |
Bone * | bone, | ||
float * | co, | ||
DualQuat * | dq, | ||
float | defmat[][3] | ||
) | [static] |
Definition at line 638 of file armature.c.
References bPoseChanDeform::b_bone_dual_quats, bPoseChanDeform::b_bone_mats, CLAMP(), copy_dq_dq(), copy_m3_m4(), Bone::length, Mat4::mat, mul_m4_v3(), and Bone::segments.
Referenced by dist_bone_deform(), and pchan_bone_deform().
Mat4* b_bone_spline_setup | ( | bPoseChannel * | pchan, |
int | rest | ||
) |
Definition at line 428 of file armature.c.
References Bone::arm_head, Bone::arm_mat, Bone::arm_tail, KDL::atan2(), bPoseChannel::bone, BONE_CONNECTED, bPoseChannel::child, copy_m3_m4(), copy_m4_m3(), copy_m4_m4(), copy_v3_v3(), data, credits_svn_gen::e, Bone::ease1, Bone::ease2, equalize_bezier(), fabsf, Bone::flag, forward_diff_bezier(), invert_m3_m3(), invert_m4_m4(), len_v3(), length(), Bone::length, MAX_BBONE_SUBDIV, mul_m3_m3m3(), mul_m4_v3(), mul_serie_m4(), mul_v3_fl(), mult_m4_m4m4(), next, normalize_m4(), normalize_v3(), NULL, bPoseChannel::parent, bPoseChannel::pose_head, bPoseChannel::pose_mat, bPoseChannel::pose_tail, Bone::segments, sub_v3_v3v3(), unit_m4(), and vec_roll_to_mat3().
Referenced by add_verts_to_dgroups(), draw_b_bone_boxes(), draw_wire_bone(), and pchan_b_bone_defmats().
void BKE_rotMode_change_values | ( | float | quat[4], |
float | eul[3], | ||
float | axis[3], | ||
float * | angle, | ||
short | oldMode, | ||
short | newMode | ||
) |
Definition at line 1250 of file armature.c.
References axis_angle_to_eulO(), axis_angle_to_quat(), eulO_to_axis_angle(), eulO_to_quat(), IS_EQF, normalize_qt(), quat_to_axis_angle(), quat_to_eulO(), ROT_MODE_AXISANGLE, and ROT_MODE_QUAT.
int bone_autoside_name | ( | char | name[MAXBONENAME], |
int | UNUSEDstrip_number, | ||
short | axis, | ||
float | head, | ||
float | tail | ||
) |
Definition at line 267 of file armature.c.
References BLI_snprintf(), BLI_strncpy(), IS_EQ, len(), MAXBONENAME, and strlen().
Definition at line 201 of file armature.c.
References bArmature::act_bone, bArmature::act_edbone, BLI_duplicatelist(), bArmature::bonebase, copy_bonechildren(), copy_libblock(), bArmature::edbo, ListBase::first, bArmature::id, Bone::next, NULL, Bone::parent, and bArmature::sketch.
Referenced by id_copy(), make_local_armature(), object_add_duplicate_internal(), and single_obdata_users().
static void copy_bonechildren | ( | Bone * | newBone, |
Bone * | oldBone, | ||
Bone * | actBone, | ||
Bone ** | newActBone | ||
) | [static] |
Definition at line 179 of file armature.c.
References BLI_duplicatelist(), Bone::childbase, ListBase::first, IDP_CopyProperty(), Bone::next, Bone::parent, and Bone::prop.
Referenced by copy_armature().
static float dist_bone_deform | ( | bPoseChannel * | pchan, |
bPoseChanDeform * | pdef_info, | ||
float * | vec, | ||
DualQuat * | dq, | ||
float | mat[][3], | ||
float * | co | ||
) | [static] |
Definition at line 731 of file armature.c.
References add_weighted_dq_dq(), Bone::arm_head, Bone::arm_tail, b_bone_deform(), bPoseChannel::bone, bPoseChannel::chan_mat, copy_v3_v3(), Bone::dist, distfactor_to_bone(), bPoseChanDeform::dual_quat, madd_v3_v3fl(), mul_m4_v3(), NULL, pchan_deform_mat_add(), Bone::rad_head, Bone::rad_tail, Bone::segments, sub_v3_v3(), and Bone::weight.
Referenced by armature_deform_verts().
float distfactor_to_bone | ( | float | vec[3], |
float | b1[3], | ||
float | b2[3], | ||
float | rad1, | ||
float | rad2, | ||
float | rdist | ||
) |
Definition at line 668 of file armature.c.
References F, normalize_v3(), sqrt(), and sub_v3_v3v3().
Referenced by armature_deform_verts(), dist_bone_deform(), and envelope_bone_weighting().
static void equalize_bezier | ( | float * | data, |
int | desired | ||
) | [static] |
Definition at line 384 of file armature.c.
References copy_qt_qt(), len_v3v3(), and MAX_BBONE_SUBDIV.
Referenced by b_bone_spline_setup().
void free_armature | ( | bArmature * | arm | ) |
Definition at line 111 of file armature.c.
References bArmature::adt, BKE_free_animdata(), BLI_freelistN(), bArmature::bonebase, bArmature::edbo, free_bonelist(), freeSketch(), bArmature::id, MEM_freeN(), NULL, and bArmature::sketch.
Referenced by free_libblock().
void free_bonelist | ( | ListBase * | lb | ) |
Definition at line 96 of file armature.c.
References BLI_freelistN(), Bone::childbase, ListBase::first, free_bonelist(), IDP_FreeProperty(), MEM_freeN(), Bone::next, and Bone::prop.
Referenced by ED_armature_from_edit(), free_armature(), and free_bonelist().
Definition at line 89 of file armature.c.
References Object::data, NULL, OB_ARMATURE, and Object::type.
Referenced by apply_armature_pose2bones_exec(), createTransPose(), and test_constraints().
Definition at line 244 of file armature.c.
References bArmature::bonebase, ListBase::first, get_named_bone_bonechildren(), and NULL.
Referenced by AnimationImporter::apply_matrix_curves(), BL_ConvertBlenderObjects(), bone_unique_check(), ED_armature_bone_rename(), lib_link_pose(), test_constraints(), and AnimationImporter::translate_animation_OLD().
Definition at line 227 of file armature.c.
References Bone::childbase, ListBase::first, Bone::name, Bone::next, and NULL.
Referenced by get_named_bone().
void get_objectspace_bone_matrix | ( | struct Bone * | bone, |
float | M_accumulatedMatrix[][4], | ||
int | UNUSEDroot, | ||
int | UNUSEDposed | ||
) |
Definition at line 1087 of file armature.c.
References Bone::arm_mat, and copy_m4_m4().
int get_selected_defgroups | ( | Object * | ob, |
char * | dg_selection, | ||
int | defbase_tot | ||
) |
Definition at line 2477 of file armature.c.
References bPoseChannel::bone, BONE_SELECTED, Object::defbase, FALSE, ListBase::first, Bone::flag, get_pose_channel(), i, bDeformGroup::name, next, object_pose_armature_get(), Object::pose, and TRUE.
Referenced by calc_weightpaint_vert_array(), and wpaint_stroke_update_step().
void make_local_armature | ( | bArmature * | arm | ) |
Definition at line 138 of file armature.c.
References BKE_id_lib_local_paths(), copy_armature(), Object::data, ELEM, FALSE, ListBase::first, G, Object::id, bArmature::id, id_clear_lib_data(), ID::lib, ID::next, NULL, Main::object, TRUE, and ID::us.
Referenced by id_make_local().
void mat3_to_vec_roll | ( | float | mat[][3], |
float * | vec, | ||
float * | roll | ||
) |
Definition at line 1316 of file armature.c.
References KDL::atan2(), copy_v3_v3(), invert_m3_m3(), mul_m3_m3m3(), and vec_roll_to_mat3().
Referenced by do_version_bone_roll_256(), and ED_armature_apply_transform().
void pchan_apply_mat4 | ( | bPoseChannel * | pchan, |
float | mat[][4], | ||
short | use_compat | ||
) |
Definition at line 1224 of file armature.c.
References bPoseChannel::loc, mat4_to_loc_rot_size(), pchan_mat3_to_rot(), rot, and bPoseChannel::size.
Referenced by pose_visual_transform_apply_exec().
static void pchan_b_bone_defmats | ( | bPoseChannel * | pchan, |
bPoseChanDeform * | pdef_info, | ||
int | use_quaternion | ||
) | [static] |
Definition at line 598 of file armature.c.
References Bone::arm_mat, bPoseChanDeform::b_bone_dual_quats, bPoseChanDeform::b_bone_mats, b_bone_spline_setup(), bPoseChannel::bone, bPoseChannel::chan_mat, invert_m4_m4(), Mat4::mat, mat4_to_dquat(), MAT4_UNITY, MEM_mallocN(), mul_serie_m4(), NULL, and Bone::segments.
Referenced by armature_deform_verts().
static void pchan_bone_deform | ( | bPoseChannel * | pchan, |
bPoseChanDeform * | pdef_info, | ||
float | weight, | ||
float * | vec, | ||
DualQuat * | dq, | ||
float | mat[][3], | ||
float * | co, | ||
float * | contrib | ||
) | [static] |
Definition at line 777 of file armature.c.
References add_weighted_dq_dq(), b_bone_deform(), bPoseChannel::bone, bPoseChannel::chan_mat, copy_v3_v3(), bPoseChanDeform::dual_quat, mul_m4_v3(), NULL, pchan_deform_mat_add(), and Bone::segments.
Referenced by armature_deform_verts().
void pchan_calc_mat | ( | bPoseChannel * | pchan | ) |
Definition at line 2116 of file armature.c.
References bPoseChannel::chan_mat, and pchan_to_mat4().
Referenced by actcon_get_tarmat(), and where_is_pose_bone().
static void pchan_deform_mat_add | ( | bPoseChannel * | pchan, |
float | weight, | ||
float | bbonemat[][3], | ||
float | mat[][3] | ||
) | [static] |
Definition at line 718 of file armature.c.
References add_m3_m3m3(), bPoseChannel::bone, bPoseChannel::chan_mat, copy_m3_m3(), copy_m3_m4(), mul_m3_fl(), and Bone::segments.
Referenced by dist_bone_deform(), and pchan_bone_deform().
void pchan_mat3_to_rot | ( | bPoseChannel * | pchan, |
float | mat[][3], | ||
short | use_compat | ||
) |
Definition at line 1206 of file armature.c.
References bPoseChannel::eul, mat3_to_axis_angle(), mat3_to_compatible_eulO(), mat3_to_eulO(), mat3_to_quat(), bPoseChannel::quat, ROT_MODE_AXISANGLE, ROT_MODE_QUAT, bPoseChannel::rotAngle, bPoseChannel::rotAxis, and bPoseChannel::rotmode.
Referenced by pchan_apply_mat4().
void pchan_to_mat4 | ( | bPoseChannel * | pchan, |
float | chan_mat[4][4] | ||
) |
Definition at line 2073 of file armature.c.
References axis_angle_to_mat3(), bPoseChannel::bone, BONE_CONNECTED, copy_m4_m3(), copy_v3_v3(), bPoseChannel::eul, eulO_to_mat3(), Bone::flag, bPoseChannel::loc, mul_m3_m3m3(), normalize_qt_qt(), NULL, bPoseChannel::quat, quat_to_mat3(), ROT_MODE_AXISANGLE, bPoseChannel::rotAngle, bPoseChannel::rotAxis, bPoseChannel::rotmode, bPoseChannel::size, and size_to_mat3().
Referenced by dvar_eval_transChan(), and pchan_calc_mat().
Definition at line 1441 of file armature.c.
References bPose::active_group, bPose::agroups, BLI_duplicatelist(), BLI_freelistN(), BLI_movelisttolist(), bPoseChannel::bone, bPose::chanbase, bPoseChannel::child, constraint_get_typeinfo(), bPoseChannel::constraints, copy_constraints(), bPoseChannel::custom, bPoseChannel::custom_tx, error(), extract_proxylocal_constraints(), FALSE, ListBase::first, bConstraintTypeInfo::flush_constraint_targets, free_pose_channel(), bConstraintTypeInfo::get_constraint_targets, get_pose_channel(), Object::id, IDP_CopyProperty(), IDP_FreeProperty(), IDP_SyncGroupValues(), Bone::layer, MEM_freeN(), bPoseChannel::name, ID::name, bPoseChannel::next, bConstraint::next, bConstraintTarget::next, NULL, bPoseChannel::parent, Object::pose, bPoseChannel::prev, bPoseChannel::prop, rest_pose(), and bConstraintTarget::tar.
Referenced by armature_rebuild_pose().
static int rebuild_pose_bone | ( | bPose * | pose, |
Bone * | bone, | ||
bPoseChannel * | parchan, | ||
int | counter | ||
) | [static] |
Definition at line 1562 of file armature.c.
References bPoseChannel::bone, BONE_CONNECTED, bPoseChannel::child, Bone::childbase, ListBase::first, Bone::flag, get_pose_channel(), Bone::name, Bone::next, bPoseChannel::parent, and verify_pose_channel().
Referenced by armature_rebuild_pose().
static void splineik_evaluate_bone | ( | tSplineIK_Tree * | tree, |
Scene * | scene, | ||
Object * | ob, | ||
bPoseChannel * | pchan, | ||
int | index, | ||
float | ctime | ||
) | [static] |
Definition at line 1844 of file armature.c.
References acos(), axis_angle_to_mat3(), bPoseChannel::bone, CLAMP(), tSplineIK_Tree::con, CONSTRAINT_SPLINEIK_NO_CURVERAD, CONSTRAINT_SPLINEIK_NO_ROOT, CONSTRAINT_SPLINEIK_XZS_ORIGINAL, CONSTRAINT_SPLINEIK_XZS_VOLUMETRIC, copy_m4_m3(), copy_m4_m4(), copy_v3_v3(), cross_v3_v3v3(), dot_v3v3(), bConstraint::enforce, fabsf, bPoseChannel::flag, bSplineIKConstraint::flag, tSplineIK_Tree::ikData, Object::imat, interp_v3_v3v3(), len_v3(), Bone::length, MAX2, MIN2, mul_m3_m3m3(), mul_m4_v3(), mul_v3_fl(), normalize_m3(), normalize_v3(), NULL, Object::obmat, bPoseChannel::parent, tSplineIK_Tree::points, POSE_DONE, bPoseChannel::pose_head, bPoseChannel::pose_mat, bPoseChannel::pose_tail, sub_v3_v3v3(), bSplineIKConstraint::tar, where_is_pose_bone(), where_is_pose_bone_tail(), where_on_path(), and bSplineIKConstraint::xzScaleMode.
Referenced by splineik_execute_tree().
static void splineik_execute_tree | ( | Scene * | scene, |
Object * | ob, | ||
bPoseChannel * | pchan_root, | ||
float | ctime | ||
) | [static] |
Definition at line 2044 of file armature.c.
References BLI_freelinkN(), tSplineIK_Tree::chain, tSplineIK_Tree::chainlen, ListBase::first, tSplineIK_Tree::free_points, i, MEM_freeN(), NULL, tSplineIK_Tree::points, bPoseChannel::siktree, and splineik_evaluate_bone().
Referenced by where_is_pose().
Definition at line 1830 of file armature.c.
References bPose::chanbase, bPoseChannel::constflag, ListBase::first, bPoseChannel::next, PCHAN_HAS_SPLINEIK, Object::pose, and splineik_init_tree_from_pchan().
Referenced by where_is_pose().
static void splineik_init_tree_from_pchan | ( | Scene * | scene, |
Object * | UNUSEDob, | ||
bPoseChannel * | pchan_tip | ||
) | [static] |
Definition at line 1664 of file armature.c.
References BLI_addtail(), bPoseChannel::bone, tSplineIK_Tree::chain, tSplineIK_Tree::chainlen, bSplineIKConstraint::chainlen, tSplineIK_Tree::con, CONSTRAINT_DISABLE, CONSTRAINT_OFF, CONSTRAINT_SPLINEIK_BOUND, CONSTRAINT_SPLINEIK_EVENSPLITS, CONSTRAINT_SPLINEIK_SCALE_LIMITED, CONSTRAINT_TYPE_SPLINEIK, bPoseChannel::constraints, Object::data, bConstraint::data, Path::data, bConstraint::enforce, ListBase::first, bConstraint::flag, bPoseChannel::flag, bSplineIKConstraint::flag, tSplineIK_Tree::free_points, i, tSplineIK_Tree::ikData, Bone::length, makeDispListCurveTypes(), MEM_callocN(), MEM_dupallocN(), MEM_freeN(), bConstraint::next, NULL, bSplineIKConstraint::numpoints, OB_CURVE, bPoseChannel::parent, Curve::path, tSplineIK_Tree::points, bSplineIKConstraint::points, POSE_IKSPLINE, tSplineIK_Tree::root, bPoseChannel::siktree, bSplineIKConstraint::tar, Path::totdist, bConstraint::type, Object::type, and tSplineIK_Tree::type.
Referenced by splineik_init_tree().
void vec_roll_to_mat3 | ( | float * | vec, |
float | roll, | ||
float | mat[][3] | ||
) |
Definition at line 1334 of file armature.c.
References angle_normalized_v3v3(), cross_v3_v3v3(), dot_v3v3(), mul_m3_m3m3(), normalize_v3(), normalize_v3_v3(), and vec_rot_to_mat3().
Referenced by apply_armature_pose2bones_exec(), armature_calc_roll_exec(), b_bone_spline_setup(), createTransArmatureVerts(), ED_armature_apply_transform(), ED_armature_from_edit(), ED_rollBoneToVector(), fix_bonelist_roll(), get_matrix_editbone(), getEditBoneRollUpAxis(), getTransformOrientation(), join_armature_exec(), mat3_to_vec_roll(), and where_is_armature_bone().
void where_is_armature | ( | bArmature * | arm | ) |
Definition at line 1429 of file armature.c.
References bArmature::bonebase, ListBase::first, Bone::next, NULL, and where_is_armature_bone().
Referenced by do_versions().
Definition at line 1383 of file armature.c.
References Bone::arm_mat, Bone::bone_mat, Bone::childbase, copy_m4_m3(), copy_v3_v3(), ListBase::first, Bone::head, len_v3v3(), Bone::length, mult_m4_m4m4(), Bone::next, Bone::roll, Bone::segments, sub_v3_v3v3(), Bone::tail, vec_roll_to_mat3(), where_is_armature_bone(), Bone::xwidth, and Bone::zwidth.
Referenced by fix_bonelist_roll(), where_is_armature(), and where_is_armature_bone().
Definition at line 2400 of file armature.c.
References Bone::arm_head, Bone::arm_mat, ARM_RESTPOS, Bone::arm_tail, armature_rebuild_pose(), BIK_execute_tree(), BIK_initialize_tree(), BIK_release_tree(), BKE_curframe(), bPoseChannel::bone, bPoseChannel::chan_mat, bPose::chanbase, copy_m4_m4(), copy_v3_v3(), Object::data, bArmature::edbo, ELEM, ListBase::first, bPoseChannel::flag, bArmature::flag, bPose::flag, Object::imat, invert_m4_m4(), mult_m4_m4m4(), bPoseChannel::next, NULL, OB_ARMATURE, Object::obmat, Object::pose, POSE_CHAIN, POSE_DONE, bPoseChannel::pose_head, POSE_IKSPLINE, POSE_IKTREE, bPoseChannel::pose_mat, POSE_RECALC, bPoseChannel::pose_tail, splineik_execute_tree(), splineik_init_tree(), Object::type, and where_is_pose_bone().
Referenced by apply_armature_pose2bones_exec(), apply_objects_internal(), BL_ArmatureObject::ApplyPose(), child_get_inverse_matrix(), draw_ghost_poses(), draw_ghost_poses_keys(), draw_ghost_poses_range(), object_handle_update(), object_origin_set_exec(), poseAnim_mapping_refresh(), poselib_preview_apply(), poselib_preview_cleanup(), recalcData_view3d(), AnimationExporter::sample_and_write_bone_animation(), AnimationExporter::sample_and_write_bone_animation_matrix(), and special_aftertrans_update().
void where_is_pose_bone | ( | Scene * | scene, |
Object * | ob, | ||
bPoseChannel * | pchan, | ||
float | ctime, | ||
int | do_extra | ||
) |
Definition at line 2264 of file armature.c.
References add_v3_v3(), add_v3_v3v3(), Bone::arm_mat, bPoseChannel::bone, BONE_CONNECTED, BONE_HINGE, Bone::bone_mat, BONE_NO_CYCLICOFFSET, BONE_NO_LOCAL_LOCATION, BONE_NO_SCALE, bPoseChannel::chan_mat, CONSTRAINT_OBTYPE_BONE, bPoseChannel::constraints, constraints_clear_evalob(), constraints_make_evalob(), copy_m4_m3(), copy_m4_m4(), copy_v3_v3(), bPose::cyclic_offset, ListBase::first, Bone::flag, Bone::head, Bone::length, mat4_to_size(), mul_mat3_m4_v3(), mul_serie_m4(), mul_v3_m4v3(), mult_m4_m4m4(), normalize_m4(), NULL, bPoseChannel::parent, Bone::parent, pchan_calc_mat(), Object::pose, bPoseChannel::pose_head, bPoseChannel::pose_mat, size_to_mat4(), solve_constraints(), unit_m4(), and where_is_pose_bone_tail().
Referenced by AnimationExporter::create_4x4_source(), execute_scene(), iksolver_execute_tree(), AnimationExporter::sample_animation(), splineik_evaluate_bone(), and where_is_pose().
void where_is_pose_bone_tail | ( | bPoseChannel * | pchan | ) |
Definition at line 2251 of file armature.c.
References add_v3_v3v3(), bPoseChannel::bone, copy_v3_v3(), Bone::length, mul_v3_fl(), bPoseChannel::pose_head, bPoseChannel::pose_mat, and bPoseChannel::pose_tail.
Referenced by splineik_evaluate_bone(), and where_is_pose_bone().