Blender V4.3
iksolver_plugin.cc File Reference
#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)
 

Macro Definition Documentation

◆ USE_NONUNIFORM_SCALE

#define USE_NONUNIFORM_SCALE

Definition at line 34 of file iksolver_plugin.cc.

Function Documentation

◆ execute_posetree()

static void execute_posetree ( Depsgraph * depsgraph,
Scene * scene,
Object * ob,
PoseTree * tree )
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().

◆ find_ik_constraints()

static void find_ik_constraints ( ListBase * constraints,
blender::Vector< bConstraint * > & ik_constraints )
static

◆ free_posetree()

static void free_posetree ( PoseTree * tree)
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().

◆ iksolver_clear_data()

void iksolver_clear_data ( bPose * pose)

◆ iksolver_execute_tree()

◆ iksolver_initialize_tree()

void iksolver_initialize_tree ( Depsgraph * depsgraph,
Scene * scene,
Object * ob,
float ctime )

◆ iksolver_release_tree()

void iksolver_release_tree ( Scene * scene,
Object * ob,
float ctime )

Definition at line 668 of file iksolver_plugin.cc.

References iksolver_clear_data(), and Object::pose.

◆ initialize_posetree()

◆ make_dmats()

static void make_dmats ( bPoseChannel * pchan)
static

◆ where_is_ik_bone()