|
Blender V4.3
|
#include <algorithm>#include "MEM_guardedalloc.h"#include "BIK_api.h"#include "BLI_blenlib.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "BLI_utildefines.h"#include "BLI_vector.hh"#include "BKE_armature.hh"#include "BKE_constraint.h"#include "DNA_action_types.h"#include "DNA_armature_types.h"#include "DNA_constraint_types.h"#include "DNA_object_types.h"#include "IK_solver.h"#include "iksolver_plugin.h"#include <cstring>Go to the source code of this file.
Macros | |
| #define | USE_NONUNIFORM_SCALE |
Functions | |
| static void | find_ik_constraints (ListBase *constraints, blender::Vector< bConstraint * > &ik_constraints) |
| static void | initialize_posetree (Object *, bPoseChannel *pchan_tip) |
| static void | make_dmats (bPoseChannel *pchan) |
| static void | where_is_ik_bone (bPoseChannel *pchan, float ik_mat[3][3]) |
| static void | execute_posetree (Depsgraph *depsgraph, Scene *scene, Object *ob, PoseTree *tree) |
| static void | free_posetree (PoseTree *tree) |
| void | iksolver_initialize_tree (Depsgraph *, Scene *, Object *ob, float) |
| void | iksolver_execute_tree (Depsgraph *depsgraph, Scene *scene, Object *ob, bPoseChannel *pchan_root, float ctime) |
| void | iksolver_release_tree (Scene *, Object *ob, float) |
| void | iksolver_clear_data (bPose *pose) |
| #define USE_NONUNIFORM_SCALE |
Definition at line 34 of file iksolver_plugin.cc.
|
static |
Called from within the core BKE_pose_where_is loop, all animation-systems and constraints were executed & assigned. Now as last we do an IK pass.
Definition at line 288 of file iksolver_plugin.cc.
References BKE_constraint_target_matrix_get(), blend_m3_m3m3(), bPoseChannel::bone, BONE_IK_NO_XDOF, BONE_IK_NO_XDOF_TEMP, BONE_IK_NO_YDOF, BONE_IK_NO_YDOF_TEMP, BONE_IK_NO_ZDOF, BONE_IK_NO_ZDOF_TEMP, BONE_IK_XLIMIT, BONE_IK_YLIMIT, BONE_IK_ZLIMIT, Bone::bone_mat, CONSTRAINT_IK_AUTO, CONSTRAINT_IK_GETANGLE, CONSTRAINT_IK_POS, CONSTRAINT_IK_ROT, CONSTRAINT_IK_SETANGLE, CONSTRAINT_OBTYPE_OBJECT, CONSTRAINT_OFF, copy_m3_m3(), copy_m3_m4(), copy_m4_m4(), copy_v3_v3(), data, depsgraph, bKinematicConstraint::flag, flag, IK_CreateSegment(), IK_CreateSolver(), IK_FreeSegment(), IK_FreeSolver(), IK_GetBasisChange(), IK_GetTranslationChange(), IK_SetLimit(), IK_SetParent(), IK_SetStiffness(), IK_SetTransform(), IK_Solve(), IK_SolverAddGoal(), IK_SolverAddGoalOrientation(), IK_SolverGetPoleAngle(), IK_SolverSetPoleVectorConstraint(), IK_STRETCH_STIFF_MAX, IK_STRETCH_STIFF_MIN, IK_TRANS_Y, IK_TRANS_YDOF, IK_X, IK_XDOF, IK_Y, IK_YDOF, IK_Z, IK_ZDOF, bPoseChannel::ikflag, bPoseChannel::ikstretch, interp_qt_qtqt(), invert_m3_m3(), invert_m4_m4(), len_v3(), Bone::length, length(), bPoseChannel::limitmax, bPoseChannel::limitmin, LISTBASE_FOREACH, mat3_to_quat(), mat4_to_quat(), MEM_freeN(), MEM_mallocN, mul_m3_m3m3(), mul_m3_v3(), mul_m4_m4m4(), mul_m4_series, mul_v3_fl(), normalize_m3(), normalize_m4(), bPoseChannel::parent, bKinematicConstraint::poleangle, bPoseChannel::pose_head, bPoseChannel::pose_mat, bPoseChannel::pose_tail, q1, quat_to_mat3(), square_f(), bPoseChannel::stiffness, sub_v3_v3v3(), transpose_m3_m3(), tree, unit_m3(), and unit_m4().
Referenced by iksolver_execute_tree().
|
static |
Definition at line 38 of file iksolver_plugin.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), CONSTRAINT_DISABLE, CONSTRAINT_IK_AUTO, CONSTRAINT_TYPE_KINEMATIC, constraints, LISTBASE_FOREACH, and OB_ARMATURE.
Referenced by initialize_posetree().
|
static |
Definition at line 579 of file iksolver_plugin.cc.
References BLI_freelistN(), MEM_freeN(), and tree.
Referenced by iksolver_clear_data(), and iksolver_execute_tree().
| void iksolver_clear_data | ( | bPose * | pose | ) |
Definition at line 673 of file iksolver_plugin.cc.
References BLI_remlink(), bPose::chanbase, CONSTRAINT_TYPE_KINEMATIC, free_posetree(), LISTBASE_FOREACH, POSE_IKTREE, and tree.
Referenced by iksolver_release_tree().
| void iksolver_execute_tree | ( | Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| Object * | ob, | ||
| bPoseChannel * | pchan_root, | ||
| float | ctime ) |
Definition at line 610 of file iksolver_plugin.cc.
References BKE_pose_where_is_bone(), BLI_remlink(), CONSTRAINT_OFF, CONSTRAINT_TYPE_KINEMATIC, depsgraph, execute_posetree(), ListBase::first, free_posetree(), bPoseChannel::iktree, LISTBASE_FOREACH, make_dmats(), POSE_CHAIN, POSE_DONE, tree, and where_is_ik_bone().
Definition at line 597 of file iksolver_plugin.cc.
References bPose::chanbase, bPose::flag, initialize_posetree(), LISTBASE_FOREACH, PCHAN_HAS_IK, and Object::pose.
Definition at line 668 of file iksolver_plugin.cc.
References iksolver_clear_data(), and Object::pose.
|
static |
Definition at line 65 of file iksolver_plugin.cc.
References BLI_addtail(), BLI_remlink(), PoseTarget::con, CONSTRAINT_IK_STRETCH, CONSTRAINT_IK_TIP, CONSTRAINT_OFF, CONSTRAINT_TYPE_KINEMATIC, bPoseChannel::constraints, find_ik_constraints(), ListBase::first, bPoseChannel::flag, bPoseChannel::iktree, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), MEM_callocN, MEM_freeN(), PoseTarget::next, bPoseChannel::parent, POSE_CHAIN, POSE_IKTREE, tree, and PoseTree::type.
Referenced by iksolver_initialize_tree().
|
static |
Definition at line 227 of file iksolver_plugin.cc.
References bPoseChannel::chan_mat, copy_m4_m4(), invert_m4_m4(), mul_m4_m4m4(), bPoseChannel::parent, and bPoseChannel::pose_mat.
Referenced by iksolver_execute_tree().
|
static |
Definition at line 242 of file iksolver_plugin.cc.
References add_v3_v3v3(), bPoseChannel::bone, bPoseChannel::chan_mat, copy_m4_m3(), copy_m4_m4(), copy_v3_v3(), bPoseChannel::flag, Bone::length, mat3_to_size(), mat4_to_size(), mul_m4_m4m4(), mul_v3_fl(), normalize_v3_length(), bPoseChannel::parent, POSE_DONE, bPoseChannel::pose_head, bPoseChannel::pose_mat, and bPoseChannel::pose_tail.
Referenced by iksolver_execute_tree().