Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "DNA_armature_types.h"
#include "DNA_constraint_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_action.h"
#include "BKE_anim_path.h"
#include "BKE_armature.h"
#include "BKE_curve.h"
#include "BKE_displist.h"
#include "BKE_fcurve.h"
#include "BKE_object.h"
#include "BKE_scene.h"
#include "BIK_api.h"
#include "DEG_depsgraph.h"
Go to the source code of this file.
Classes | |
struct | tSplineIK_Tree |
struct | tSplineIk_EvalState |
Typedefs | |
typedef struct tSplineIK_Tree | tSplineIK_Tree |
typedef struct tSplineIk_EvalState | tSplineIk_EvalState |
typedef struct tSplineIk_EvalState tSplineIk_EvalState |
typedef struct tSplineIK_Tree tSplineIK_Tree |
|
static |
Definition at line 245 of file armature_update.c.
References CONSTRAINT_SPLINEIK_NO_ROOT, bSplineIKConstraint::flag, Object::imat, mul_m4_v3(), Object::obmat, and bSplineIKConstraint::tar.
Referenced by splineik_evaluate_bone().
Definition at line 936 of file armature_update.c.
References Bone::arm_mat, BKE_pose_channel_free_bbone_cache(), bPoseChannel::bone, BONE_NO_DEFORM, bPoseChannel::chan_mat, Object::data, bPoseChannel_Runtime::deform_dual_quat, DEG_debug_print_eval_subdata(), DEG_is_active(), depsgraph, bArmature::edbo, Bone::flag, Object::id, if(), invert_m4_m4(), mat4_to_dquat(), mul_m4_m4m4(), bPoseChannel::name, ID::name, NULL, bPoseChannel::orig_pchan, pose_channel_flush_to_orig_if_needed(), bPoseChannel::pose_mat, pose_pchan_get_indexed(), bPoseChannel::runtime, and Bone::segments.
void BKE_pose_constraints_evaluate | ( | struct Depsgraph * | depsgraph, |
Scene * | scene, | ||
Object * | object, | ||
int | pchan_index | ||
) |
Definition at line 890 of file armature_update.c.
References ARM_RESTPOS, BKE_pose_where_is_bone(), BKE_scene_ctime_get(), Object::data, DEG_debug_print_eval_subdata(), depsgraph, bArmature::edbo, bPoseChannel::flag, bArmature::flag, Object::id, if(), bPoseChannel::name, ID::name, NULL, POSE_DONE, POSE_IKSPLINE, POSE_IKTREE, pose_pchan_get_indexed(), and scene.
void BKE_pose_eval_bbone_segments | ( | struct Depsgraph * | depsgraph, |
struct Object * | object, | ||
int | pchan_index | ||
) |
Definition at line 962 of file armature_update.c.
References BKE_pchan_bbone_segments_cache_compute(), BKE_pchan_bbone_segments_cache_copy(), bPoseChannel::bone, Object::data, DEG_debug_print_eval_subdata(), DEG_is_active(), depsgraph, bArmature::edbo, Object::id, if(), bPoseChannel::name, ID::name, NULL, bPoseChannel::orig_pchan, pose_pchan_get_indexed(), and Bone::segments.
void BKE_pose_eval_bone | ( | struct Depsgraph * | depsgraph, |
Scene * | scene, | ||
Object * | object, | ||
int | pchan_index | ||
) |
Definition at line 854 of file armature_update.c.
References Bone::arm_head, Bone::arm_mat, ARM_RESTPOS, Bone::arm_tail, BKE_pose_where_is_bone(), BKE_scene_ctime_get(), BLI_assert, bPoseChannel::bone, bPoseChannel::constraints, copy_m4_m4(), copy_v3_v3(), Object::data, DEG_debug_print_eval_subdata(), depsgraph, bArmature::edbo, ListBase::first, bPoseChannel::flag, bArmature::flag, Object::id, if(), bPoseChannel::name, ID::name, NULL, OB_ARMATURE, POSE_DONE, bPoseChannel::pose_head, POSE_IKSPLINE, POSE_IKTREE, bPoseChannel::pose_mat, pose_pchan_get_indexed(), bPoseChannel::pose_tail, scene, and Object::type.
Definition at line 1039 of file armature_update.c.
References BIK_release_tree(), BKE_scene_ctime_get(), BLI_assert, DEG_debug_print_eval(), depsgraph, Object::id, ID::name, NULL, OB_ARMATURE, pose_eval_cleanup_common(), scene, Object::type, and UNUSED_VARS_NDEBUG.
Definition at line 1030 of file armature_update.c.
References BLI_assert, DEG_debug_print_eval(), depsgraph, Object::id, ID::name, NULL, OB_ARMATURE, Object::type, and UNUSED_VARS_NDEBUG.
Definition at line 808 of file armature_update.c.
References BKE_pose_channel_free_bbone_cache(), BLI_assert, BLI_listbase_is_empty(), bPose::chan_array, bPose::chanbase, DEG_debug_print_eval(), depsgraph, ListBase::first, bPose::flag, Object::id, Object::imat, invert_m4_m4(), ID::name, NULL, OB_ARMATURE, Object::obmat, Object::pose, POSE_CHAIN, POSE_DONE, POSE_IKSPLINE, POSE_IKTREE, POSE_RECALC, and Object::type.
Definition at line 837 of file armature_update.c.
References ARM_RESTPOS, BIK_init_tree(), BKE_pose_splineik_init_tree(), BKE_scene_ctime_get(), BLI_assert, Object::data, DEG_debug_print_eval(), depsgraph, bArmature::flag, Object::id, if(), ID::name, OB_ARMATURE, scene, and Object::type.
void BKE_pose_iktree_evaluate | ( | struct Depsgraph * | depsgraph, |
Scene * | scene, | ||
Object * | object, | ||
int | rootchan_index | ||
) |
Definition at line 981 of file armature_update.c.
References ARM_RESTPOS, BIK_execute_tree(), BKE_scene_ctime_get(), BLI_assert, Object::data, DEG_debug_print_eval_subdata(), depsgraph, bArmature::edbo, bArmature::flag, Object::id, if(), bPoseChannel::name, ID::name, NULL, OB_ARMATURE, pose_pchan_get_indexed(), scene, and Object::type.
Definition at line 787 of file armature_update.c.
References BLI_listbase_count(), bPose::chan_array, bPose::chanbase, ListBase::first, MEM_malloc_arrayN, MEM_SAFE_FREE, and NULL.
void BKE_pose_splineik_evaluate | ( | struct Depsgraph * | depsgraph, |
Scene * | scene, | ||
Object * | object, | ||
int | rootchan_index | ||
) |
Definition at line 1001 of file armature_update.c.
References ARM_RESTPOS, BKE_scene_ctime_get(), BKE_splineik_execute_tree(), BLI_assert, Object::data, DEG_debug_print_eval_subdata(), depsgraph, bArmature::edbo, bArmature::flag, Object::id, if(), bPoseChannel::name, ID::name, NULL, OB_ARMATURE, pose_pchan_get_indexed(), scene, and Object::type.
Definition at line 774 of file armature_update.c.
References scene, and splineik_init_tree().
Referenced by BKE_pose_eval_init_ik(), and BKE_pose_where_is().
void BKE_splineik_execute_tree | ( | struct Depsgraph * | depsgraph, |
Scene * | scene, | ||
Object * | ob, | ||
bPoseChannel * | pchan_root, | ||
float | ctime | ||
) |
Definition at line 779 of file armature_update.c.
References depsgraph, scene, and splineik_execute_tree().
Referenced by BKE_pose_splineik_evaluate(), and BKE_pose_where_is().
|
static |
Definition at line 262 of file armature_update.c.
References len_v3(), point, and sub_v3_v3v3().
Referenced by position_tail_on_spline().
|
static |
Definition at line 916 of file armature_update.c.
References bPoseChannel::chan_mat, bPoseChannel::constinv, copy_m4_m4(), copy_v3_v3(), Object::data, DEG_is_active(), depsgraph, bArmature::edbo, if(), NULL, bPoseChannel::orig_pchan, bPoseChannel::pose_head, bPoseChannel::pose_mat, and bPoseChannel::pose_tail.
Referenced by BKE_pose_bone_done().
Definition at line 1022 of file armature_update.c.
References BLI_assert, BLI_listbase_is_empty(), bPose::chan_array, bPose::chanbase, NULL, and UNUSED_VARS_NDEBUG.
Referenced by BKE_pose_eval_cleanup().
BLI_INLINE bPoseChannel* pose_pchan_get_indexed | ( | Object * | ob, |
int | pchan_index | ||
) |
Definition at line 798 of file armature_update.c.
References BLI_assert, bPose::chan_array, MEM_allocN_len, NULL, and Object::pose.
Referenced by BKE_pose_bone_done(), BKE_pose_constraints_evaluate(), BKE_pose_eval_bbone_segments(), BKE_pose_eval_bone(), BKE_pose_iktree_evaluate(), and BKE_pose_splineik_evaluate().
|
static |
Definition at line 274 of file armature_update.c.
References CurveCache::anim_path_accum_length, CurveCache::bev, BevList::bevpoints, BKE_anim_path_get_array_size(), BKE_anim_path_get_length(), BLI_assert, copy_v3_v3(), Object_Runtime::curve_cache, dist_to_sphere_shell(), blender::robust_pred::epsilon, fabsf, ListBase::first, CCL_NAMESPACE_BEGIN::frac(), interp_v3_v3v3(), is_cyclic(), len_v3(), len_v3v3(), max_fff(), BevList::poly, BevPoint::radius, Object::runtime, bSplineIKConstraint::tar, BevPoint::vec, and x2.
Referenced by splineik_evaluate_bone().
|
static |
Definition at line 401 of file armature_update.c.
References acosf, apply_curve_transform(), atanf, axis_angle_to_mat3(), axis_sort_v3(), BKE_pose_where_is_bone_tail(), BKE_where_on_path(), bPoseChannel::bone, bSplineIKConstraint::bulge, bSplineIKConstraint::bulge_max, bSplineIKConstraint::bulge_min, bSplineIKConstraint::bulge_smooth, CLAMP, CLAMPIS, CONSTRAINT_SPLINEIK_NO_CURVERAD, CONSTRAINT_SPLINEIK_NO_ROOT, CONSTRAINT_SPLINEIK_USE_BULGE_MAX, CONSTRAINT_SPLINEIK_USE_BULGE_MIN, CONSTRAINT_SPLINEIK_USE_ORIGINAL_SCALE, CONSTRAINT_SPLINEIK_XZS_INVERSE, CONSTRAINT_SPLINEIK_XZS_NONE, CONSTRAINT_SPLINEIK_XZS_ORIGINAL, CONSTRAINT_SPLINEIK_XZS_VOLUMETRIC, CONSTRAINT_SPLINEIK_YS_FIT_CURVE, CONSTRAINT_SPLINEIK_YS_ORIGINAL, copy_m4_m3(), copy_v3_v3(), cross_v3_v3v3(), dot_v3v3(), fabsf, bPoseChannel::flag, bSplineIKConstraint::flag, float(), interp_v3_v3v3(), interpf(), len_v3(), len_v3v3(), Bone::length, M_PI_2, madd_m3_m3m3fl(), max_ff(), min_ff(), mul_m3_m3m3(), mul_m3_m4m4(), mul_m4_m3m4(), mul_v3_fl(), mul_v3_m4v3(), mul_v3_mat3_m4v3(), norm(), normalize_m3(), normalize_m3_m3(), normalize_v3(), NULL, order, POSE_DONE, bPoseChannel::pose_head, bPoseChannel::pose_mat, bPoseChannel::pose_tail, position_tail_on_spline(), powf, sqrtf, state, sub_m3_m3m3(), sub_v3_v3v3(), bSplineIKConstraint::tar, tree, bSplineIKConstraint::xzScaleMode, bSplineIKConstraint::yScaleMode, and zero_v3().
Referenced by splineik_execute_tree().
|
static |
Definition at line 204 of file armature_update.c.
References CurveCache::anim_path_accum_length, BKE_anim_path_get_length(), CONSTRAINT_SPLINEIK_YS_FIT_CURVE, Object_Runtime::curve_cache, ELEM, NULL, Object::runtime, state, bSplineIKConstraint::tar, tree, unit_m4(), bSplineIKConstraint::yScaleMode, and zero_v3().
Referenced by splineik_execute_tree().
|
static |
Definition at line 737 of file armature_update.c.
References BKE_pose_where_is_bone(), BLI_freelinkN(), depsgraph, ListBase::first, MEM_freeN, NULL, scene, bPoseChannel::siktree, splineik_evaluate_bone(), splineik_evaluate_init(), state, and tree.
Referenced by BKE_splineik_execute_tree().
Definition at line 179 of file armature_update.c.
References bPose::chanbase, bPoseChannel::constflag, ListBase::first, bPoseChannel::next, PCHAN_HAS_SPLINEIK, Object::pose, scene, and splineik_init_tree_from_pchan().
Referenced by BKE_pose_splineik_init_tree().
|
static |
Definition at line 55 of file armature_update.c.
References BLI_addtail(), bPoseChannel::bone, bSplineIKConstraint::chainlen, CLAMP_MIN, tSplineIK_Tree::con, CONSTRAINT_DISABLE, CONSTRAINT_OFF, CONSTRAINT_SPLINEIK_BOUND, CONSTRAINT_SPLINEIK_EVENSPLITS, CONSTRAINT_TYPE_SPLINEIK, bPoseChannel::constraints, bConstraint::data, bConstraint::enforce, ListBase::first, bPoseChannel::flag, bConstraint::flag, bSplineIKConstraint::flag, float(), tSplineIK_Tree::ik_data, Bone::length, MEM_callocN, MEM_freeN, MEM_mallocN, bConstraint::next, NULL, bSplineIKConstraint::numpoints, OB_CURVES_LEGACY, bPoseChannel::parent, bSplineIKConstraint::points, POSE_IKSPLINE, bPoseChannel::siktree, bSplineIKConstraint::tar, tSplineIK_Tree::totlength, tree, bConstraint::type, and Object::type.
Referenced by splineik_init_tree().