Blender V2.61 - r43446
|
Go to the source code of this file.
Classes | |
struct | PoseTarget |
struct | PoseTree |
struct | Mat4 |
Defines | |
#define | PBONE_VISIBLE(arm, bone) (((bone)->layer & (arm)->layer) && !((bone)->flag & BONE_HIDDEN_P)) |
#define | _BONE_VISIBLE(arm, bone) (((bone)->layer & (arm)->layer) && !((bone)->flag & BONE_HIDDEN_P)) |
Typedefs | |
typedef struct PoseTarget | PoseTarget |
typedef struct PoseTree | PoseTree |
typedef struct Mat4 | Mat4 |
Functions | |
struct bArmature * | add_armature (const char *name) |
struct bArmature * | get_armature (struct Object *ob) |
void | free_bonelist (struct ListBase *lb) |
void | free_armature (struct bArmature *arm) |
void | make_local_armature (struct bArmature *arm) |
struct bArmature * | copy_armature (struct bArmature *arm) |
int | bone_autoside_name (char name[64], int strip_number, short axis, float head, float tail) |
struct Bone * | get_named_bone (struct bArmature *arm, const char *name) |
float | distfactor_to_bone (float vec[3], float b1[3], float b2[3], float rad1, float rad2, float rdist) |
void | where_is_armature (struct bArmature *arm) |
void | where_is_armature_bone (struct Bone *bone, struct Bone *prevbone) |
void | armature_rebuild_pose (struct Object *ob, struct bArmature *arm) |
void | where_is_pose (struct Scene *scene, struct Object *ob) |
void | where_is_pose_bone (struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, float ctime, int do_extra) |
void | where_is_pose_bone_tail (struct bPoseChannel *pchan) |
void | get_objectspace_bone_matrix (struct Bone *bone, float M_accumulatedMatrix[][4], int root, int posed) |
void | vec_roll_to_mat3 (float *vec, float roll, float mat[][3]) |
void | mat3_to_vec_roll (float mat[][3], float *vec, float *roll) |
int | get_selected_defgroups (struct Object *ob, char *defbase_sel, int defbase_len) |
void | armature_mat_world_to_pose (struct Object *ob, float inmat[][4], float outmat[][4]) |
void | armature_loc_world_to_pose (struct Object *ob, float *inloc, float *outloc) |
void | armature_mat_pose_to_bone (struct bPoseChannel *pchan, float inmat[][4], float outmat[][4]) |
void | armature_loc_pose_to_bone (struct bPoseChannel *pchan, float *inloc, float *outloc) |
void | armature_mat_pose_to_delta (float delta_mat[][4], float pose_mat[][4], float arm_mat[][4]) |
void | pchan_mat3_to_rot (struct bPoseChannel *pchan, float mat[][3], short use_compat) |
void | pchan_apply_mat4 (struct bPoseChannel *pchan, float mat[][4], short use_comat) |
void | pchan_to_mat4 (struct bPoseChannel *pchan, float chan_mat[4][4]) |
void | pchan_calc_mat (struct bPoseChannel *pchan) |
void | BKE_rotMode_change_values (float quat[4], float eul[3], float axis[3], float *angle, short oldMode, short newMode) |
Mat4 * | b_bone_spline_setup (struct bPoseChannel *pchan, int rest) |
Definition in file BKE_armature.h.
#define _BONE_VISIBLE | ( | arm, | |
bone | |||
) | (((bone)->layer & (arm)->layer) && !((bone)->flag & BONE_HIDDEN_P)) |
Definition at line 129 of file BKE_armature.h.
#define PBONE_VISIBLE | ( | arm, | |
bone | |||
) | (((bone)->layer & (arm)->layer) && !((bone)->flag & BONE_HIDDEN_P)) |
Definition at line 128 of file BKE_armature.h.
Referenced by count_set_pose_transflags(), do_lasso_select_pose(), ED_pose_deselectall(), ed_screen_context(), pose_select_hierarchy_exec(), and pose_select_same_keyingset().
typedef struct PoseTarget PoseTarget |
struct 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_loc_pose_to_bone | ( | struct 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 | ( | struct 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 | ( | struct 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 | ( | struct 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().
Mat4* b_bone_spline_setup | ( | struct 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[64], |
int | strip_number, | ||
short | axis, | ||
float | head, | ||
float | tail | ||
) |
Referenced by armature_autoside_names_exec(), and pose_autoside_names_exec().
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().
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().
void free_armature | ( | struct 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 | ( | struct 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().
void get_objectspace_bone_matrix | ( | struct Bone * | bone, |
float | M_accumulatedMatrix[][4], | ||
int | root, | ||
int | posed | ||
) |
int get_selected_defgroups | ( | struct Object * | ob, |
char * | defbase_sel, | ||
int | defbase_len | ||
) |
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 | ( | struct 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 | ( | struct bPoseChannel * | pchan, |
float | mat[][4], | ||
short | use_comat | ||
) |
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().
void pchan_calc_mat | ( | struct 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().
void pchan_mat3_to_rot | ( | struct 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 | ( | struct 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().
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 | ( | struct 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 | ( | struct Scene * | scene, |
struct Object * | ob, | ||
struct 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 | ( | struct 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().