Blender  V3.3
BKE_armature.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 #pragma once
4 
8 #include "BLI_listbase.h"
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
15 struct BMEditMesh;
16 struct Bone;
17 struct Depsgraph;
18 struct IDProperty;
19 struct ListBase;
20 struct Main;
21 struct Mesh;
22 struct Object;
23 struct PoseTree;
24 struct Scene;
25 struct bAction;
26 struct bArmature;
27 struct bConstraint;
28 struct bGPDstroke;
29 struct bPose;
30 struct bPoseChannel;
31 
32 typedef struct EditBone {
33  struct EditBone *next, *prev;
35  struct IDProperty *prop;
41  struct EditBone *parent;
43  char name[64];
50  float roll;
51 
53  float head[3];
54  float tail[3];
60  int flag;
61  int layer;
63 
64  /* Envelope distance & weight */
65  float dist, weight;
67  float xwidth, length, zwidth;
69 
70  /* Bendy-Bone parameters */
71  short segments;
72  float roll1, roll2;
75  float ease1, ease2;
76  float scale_in[3], scale_out[3];
77 
79  float oldlength;
80 
91 
92  /* Used for display */
94  float disp_mat[4][4];
96  float disp_tail_mat[4][4];
98  float disp_bbone_mat[32][4][4];
99 
102 
103  /* Used to store temporary data */
104  union {
105  struct EditBone *ebone;
106  struct Bone *bone;
107  void *p;
108  int i;
109  } temp;
111 
112 typedef struct PoseTarget {
113  struct PoseTarget *next, *prev;
114 
115  struct bConstraint *con; /* the constraint of this target */
116  int tip; /* index of tip pchan in PoseTree */
118 
119 typedef struct PoseTree {
120  struct PoseTree *next, *prev;
121 
122  int type; /* type of IK that this serves (CONSTRAINT_TYPE_KINEMATIC or ..._SPLINEIK) */
123  int totchannel; /* number of pose channels */
124 
125  struct ListBase targets; /* list of targets of the tree */
126  struct bPoseChannel **pchan; /* array of pose channels */
127  int *parent; /* and their parents */
128 
129  float (*basis_change)[3][3]; /* basis change result from solver */
130  int iterations; /* iterations from the constraint */
131  int stretch; /* disable stretching */
133 
134 /* Core armature functionality. */
135 
136 struct bArmature *BKE_armature_add(struct Main *bmain, const char *name);
137 struct bArmature *BKE_armature_from_object(struct Object *ob);
138 int BKE_armature_bonelist_count(const struct ListBase *lb);
139 void BKE_armature_bonelist_free(struct ListBase *lb, bool do_id_user);
140 void BKE_armature_editbonelist_free(struct ListBase *lb, bool do_id_user);
141 
143  const struct bArmature *armature_src);
144 
145 void BKE_armature_transform(struct bArmature *arm, const float mat[4][4], bool do_props);
146 
147 /* Bounding box. */
148 struct BoundBox *BKE_armature_boundbox_get(struct Object *ob);
149 
165 void BKE_pchan_minmax(const struct Object *ob,
166  const struct bPoseChannel *pchan,
167  const bool use_empty_drawtype,
168  float r_min[3],
169  float r_max[3]);
178 bool BKE_pose_minmax(
179  struct Object *ob, float r_min[3], float r_max[3], bool use_hidden, bool use_select);
180 
189 bool bone_autoside_name(char name[64], int strip_number, short axis, float head, float tail);
190 
195 struct Bone *BKE_armature_find_bone_name(struct bArmature *arm, const char *name);
196 
197 void BKE_armature_bone_hash_make(struct bArmature *arm);
198 void BKE_armature_bone_hash_free(struct bArmature *arm);
199 
200 bool BKE_armature_bone_flag_test_recursive(const struct Bone *bone, int flag);
201 
203 
207 float distfactor_to_bone(
208  const float vec[3], const float b1[3], const float b2[3], float rad1, float rad2, float rdist);
209 
214 void BKE_armature_where_is(struct bArmature *arm);
220  const struct Bone *bone_parent,
221  bool use_recursion);
226 void BKE_pose_clear_pointers(struct bPose *pose);
227 void BKE_pose_remap_bone_pointers(struct bArmature *armature, struct bPose *pose);
231 void BKE_pchan_rebuild_bbone_handles(struct bPose *pose, struct bPoseChannel *pchan);
232 void BKE_pose_channels_clear_with_null_bone(struct bPose *pose, bool do_id_user);
240 void BKE_pose_rebuild(struct Main *bmain,
241  struct Object *ob,
242  struct bArmature *arm,
243  bool do_id_user);
249 void BKE_pose_ensure(struct Main *bmain,
250  struct Object *ob,
251  struct bArmature *arm,
252  bool do_id_user);
257 void BKE_pose_where_is(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob);
265  struct Scene *scene,
266  struct Object *ob,
267  struct bPoseChannel *pchan,
268  float ctime,
269  bool do_extra);
273 void BKE_pose_where_is_bone_tail(struct bPoseChannel *pchan);
274 
280  struct bAction *action,
281  struct AnimationEvalContext *anim_eval_context);
286  struct bAction *action,
287  struct AnimationEvalContext *anim_eval_context);
288 
289 void BKE_pose_apply_action_blend(struct Object *ob,
290  struct bAction *action,
291  struct AnimationEvalContext *anim_eval_context,
292  float blend_factor);
293 
294 void vec_roll_to_mat3(const float vec[3], float roll, float r_mat[3][3]);
295 
299 void vec_roll_to_mat3_normalized(const float nor[3], float roll, float r_mat[3][3]);
304 void mat3_to_vec_roll(const float mat[3][3], float r_vec[3], float *r_roll);
309 void mat3_vec_to_roll(const float mat[3][3], const float vec[3], float *r_roll);
310 
311 /* Common Conversions Between Co-ordinate Spaces */
312 
316 void BKE_armature_mat_world_to_pose(struct Object *ob,
317  const float inmat[4][4],
318  float outmat[4][4]);
324 void BKE_armature_loc_world_to_pose(struct Object *ob, const float inloc[3], float outloc[3]);
331  const float inmat[4][4],
332  float outmat[4][4]);
339  const float inloc[3],
340  float outloc[3]);
345  const float inmat[4][4],
346  float outmat[4][4]);
352 void BKE_armature_mat_pose_to_delta(float delta_mat[4][4],
353  float pose_mat[4][4],
354  float arm_mat[4][4]);
355 
357  struct Object *ob,
358  struct bPoseChannel *pchan,
359  const float inmat[4][4],
360  float outmat[4][4]);
361 
365 void BKE_pchan_mat3_to_rot(struct bPoseChannel *pchan, const float mat[3][3], bool use_compat);
369 void BKE_pchan_rot_to_mat3(const struct bPoseChannel *pchan, float r_mat[3][3]);
374 void BKE_pchan_apply_mat4(struct bPoseChannel *pchan, const float mat[4][4], bool use_compat);
378 void BKE_pchan_to_mat4(const struct bPoseChannel *pchan, float r_chanmat[4][4]);
379 
384 void BKE_pchan_calc_mat(struct bPoseChannel *pchan);
385 
390 void BKE_bone_offset_matrix_get(const struct Bone *bone, float offs_bone[4][4]);
391 
392 /* Transformation inherited from the parent bone. These matrices apply the effects of
393  * HINGE/NO_SCALE/NO_LOCAL_LOCATION options over the pchan loc/rot/scale transformations. */
394 typedef struct BoneParentTransform {
395  float rotscale_mat[4][4]; /* parent effect on rotation & scale pose channels */
396  float loc_mat[4][4]; /* parent effect on location pose channel */
397  float post_scale[3]; /* additional scale to apply with post-multiply */
399 
400 /* Matrix-like algebra operations on the transform */
404  const struct BoneParentTransform *in2,
405  struct BoneParentTransform *result);
406 
408  const float inmat[4][4],
409  float outmat[4][4]);
410 
433  struct BoneParentTransform *r_bpt);
444  int inherit_scale_mode,
445  const float offs_bone[4][4],
446  const float parent_arm_mat[4][4],
447  const float parent_pose_mat[4][4],
448  struct BoneParentTransform *r_bpt);
449 
458  float quat[4], float eul[3], float axis[3], float *angle, short oldMode, short newMode);
459 
460 /* B-Bone support */
461 #define MAX_BBONE_SUBDIV 32
462 
463 typedef struct Mat4 {
464  float mat[4][4];
466 
467 typedef struct BBoneSplineParameters {
468  int segments;
469  float length;
470 
471  /* Non-uniform scale correction. */
472  bool do_scale;
473  float scale[3];
474 
475  /* Handle control bone data. */
478 
479  float prev_h[3], next_h[3];
480  float prev_mat[4][4], next_mat[4][4];
481 
482  /* Control values. */
483  float ease1, ease2;
484  float roll1, roll2;
485  float scale_in[3], scale_out[3];
488 
492 void BKE_pchan_bbone_handles_get(struct bPoseChannel *pchan,
493  struct bPoseChannel **r_prev,
494  struct bPoseChannel **r_next);
499  bool rest,
500  struct BBoneSplineParameters *r_param);
501 
506 void BKE_pchan_bbone_spline_setup(struct bPoseChannel *pchan,
507  bool rest,
508  bool for_deform,
509  Mat4 *result_array);
510 
515  float h1[3],
516  float *r_roll1,
517  float h2[3],
518  float *r_roll2,
519  bool ease,
520  bool offsets);
526  bool for_deform,
527  Mat4 *result_array);
528 
537  struct bPoseChannel *pchan_from);
538 
544  float pos,
545  int *r_index,
546  float *r_blend_next);
547 
548 /* like EBONE_VISIBLE */
549 #define PBONE_VISIBLE(arm, bone) \
550  (CHECK_TYPE_INLINE(arm, bArmature *), \
551  CHECK_TYPE_INLINE(bone, Bone *), \
552  (((bone)->layer & (arm)->layer) && !((bone)->flag & BONE_HIDDEN_P)))
553 
554 #define PBONE_SELECTABLE(arm, bone) \
555  (PBONE_VISIBLE(arm, bone) && !((bone)->flag & BONE_UNSELECTABLE))
556 
557 #define PBONE_SELECTED(arm, bone) (((bone)->flag & BONE_SELECTED) & PBONE_VISIBLE(arm, bone))
558 
559 /* context.selected_pose_bones */
560 #define FOREACH_PCHAN_SELECTED_IN_OBJECT_BEGIN(_ob, _pchan) \
561  for (bPoseChannel *_pchan = (_ob)->pose->chanbase.first; _pchan; _pchan = _pchan->next) { \
562  if (PBONE_VISIBLE(((bArmature *)(_ob)->data), (_pchan)->bone) && \
563  ((_pchan)->bone->flag & BONE_SELECTED)) {
564 #define FOREACH_PCHAN_SELECTED_IN_OBJECT_END \
565  } \
566  } \
567  ((void)0)
568 /* context.visible_pose_bones */
569 #define FOREACH_PCHAN_VISIBLE_IN_OBJECT_BEGIN(_ob, _pchan) \
570  for (bPoseChannel *_pchan = (_ob)->pose->chanbase.first; _pchan; _pchan = _pchan->next) { \
571  if (PBONE_VISIBLE(((bArmature *)(_ob)->data), (_pchan)->bone)) {
572 #define FOREACH_PCHAN_VISIBLE_IN_OBJECT_END \
573  } \
574  } \
575  ((void)0)
576 
577 /* Evaluation helpers */
578 struct bKinematicConstraint;
579 struct bPose;
580 struct bSplineIKConstraint;
581 
583  struct bKinematicConstraint *data);
585  struct bSplineIKConstraint *data);
586 
587 void BKE_pose_splineik_init_tree(struct Scene *scene, struct Object *ob, float ctime);
589  struct Scene *scene,
590  struct Object *ob,
591  struct bPoseChannel *pchan_root,
592  float ctime);
593 
594 void BKE_pose_pchan_index_rebuild(struct bPose *pose);
595 
596 void BKE_pose_eval_init(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *object);
597 
599  struct Scene *scene,
600  struct Object *object);
601 
603  struct Scene *scene,
604  struct Object *object,
605  int pchan_index);
606 
608  struct Scene *scene,
609  struct Object *object,
610  int pchan_index);
611 
612 void BKE_pose_bone_done(struct Depsgraph *depsgraph, struct Object *object, int pchan_index);
613 
615  struct Object *object,
616  int pchan_index);
617 
619  struct Scene *scene,
620  struct Object *object,
621  int rootchan_index);
622 
624  struct Scene *scene,
625  struct Object *object,
626  int rootchan_index);
627 
628 void BKE_pose_eval_done(struct Depsgraph *depsgraph, struct Object *object);
629 
631  struct Scene *scene,
632  struct Object *object);
633 
634 /* -------------------------------------------------------------------- */
638 /* Note that we could have a 'BKE_armature_deform_coords' that doesn't take object data
639  * currently there are no callers for this though. */
640 
642  const struct Object *ob_target,
643  float (*vert_coords)[3],
644  float (*vert_deform_mats)[3][3],
645  int vert_coords_len,
646  int deformflag,
647  float (*vert_coords_prev)[3],
648  const char *defgrp_name,
649  struct bGPDstroke *gps_target);
650 
652  const struct Object *ob_target,
653  float (*vert_coords)[3],
654  float (*vert_deform_mats)[3][3],
655  int vert_coords_len,
656  int deformflag,
657  float (*vert_coords_prev)[3],
658  const char *defgrp_name,
659  const struct Mesh *me_target);
660 
662  const struct Object *ob_target,
663  float (*vert_coords)[3],
664  float (*vert_deform_mats)[3][3],
665  int vert_coords_len,
666  int deformflag,
667  float (*vert_coords_prev)[3],
668  const char *defgrp_name,
669  struct BMEditMesh *em_target);
670 
673 #ifdef __cplusplus
674 }
675 #endif
typedef float(TangentPoint)[2]
void BKE_pchan_bbone_handles_get(struct bPoseChannel *pchan, struct bPoseChannel **r_prev, struct bPoseChannel **r_next)
Definition: armature.c:907
void BKE_bone_parent_transform_calc_from_pchan(const struct bPoseChannel *pchan, struct BoneParentTransform *r_bpt)
void BKE_pchan_to_mat4(const struct bPoseChannel *pchan, float r_chanmat[4][4])
void BKE_armature_where_is_bone(struct Bone *bone, const struct Bone *bone_parent, bool use_recursion)
bool BKE_pose_minmax(struct Object *ob, float r_min[3], float r_max[3], bool use_hidden, bool use_select)
Definition: armature.c:2711
void BKE_pose_splineik_evaluate(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *object, int rootchan_index)
void BKE_pose_splineik_init_tree(struct Scene *scene, struct Object *ob, float ctime)
struct BoneParentTransform BoneParentTransform
void BKE_pose_iktree_evaluate(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *object, int rootchan_index)
void BKE_pose_apply_action_selected_bones(struct Object *ob, struct bAction *action, struct AnimationEvalContext *anim_eval_context)
struct Bone * BKE_armature_find_bone_name(struct bArmature *arm, const char *name)
Definition: armature.c:594
struct bArmature * BKE_armature_from_object(struct Object *ob)
Definition: armature.c:342
void BKE_armature_refresh_layer_used(struct Depsgraph *depsgraph, struct bArmature *arm)
Definition: armature.c:675
void BKE_pose_apply_action_all_bones(struct Object *ob, struct bAction *action, struct AnimationEvalContext *anim_eval_context)
void BKE_armature_mat_world_to_pose(struct Object *ob, const float inmat[4][4], float outmat[4][4])
Definition: armature.c:1589
struct PoseTarget PoseTarget
void BKE_pchan_rebuild_bbone_handles(struct bPose *pose, struct bPoseChannel *pchan)
Definition: armature.c:2345
void BKE_pose_eval_bone(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *object, int pchan_index)
void mat3_vec_to_roll(const float mat[3][3], const float vec[3], float *r_roll)
Definition: armature.c:2067
void BKE_pchan_bbone_segments_cache_compute(struct bPoseChannel *pchan)
Definition: armature.c:1484
struct bPoseChannel * BKE_armature_ik_solver_find_root(struct bPoseChannel *pchan, struct bKinematicConstraint *data)
Definition: armature.c:2740
void BKE_pchan_bbone_deform_segment_index(const struct bPoseChannel *pchan, float pos, int *r_index, float *r_blend_next)
void BKE_armature_loc_pose_to_bone(struct bPoseChannel *pchan, const float inloc[3], float outloc[3])
Definition: armature.c:1870
void BKE_pose_eval_bbone_segments(struct Depsgraph *depsgraph, struct Object *object, int pchan_index)
void BKE_armature_bone_hash_free(struct bArmature *arm)
Definition: armature.c:636
void BKE_pose_bone_done(struct Depsgraph *depsgraph, struct Object *object, int pchan_index)
void BKE_pchan_apply_mat4(struct bPoseChannel *pchan, const float mat[4][4], bool use_compat)
Definition: armature.c:1958
struct BBoneSplineParameters BBoneSplineParameters
void BKE_pose_ensure(struct Main *bmain, struct Object *ob, struct bArmature *arm, bool do_id_user)
Definition: armature.c:2419
float distfactor_to_bone(const float vec[3], const float b1[3], const float b2[3], float rad1, float rad2, float rdist)
void BKE_splineik_execute_tree(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan_root, float ctime)
void BKE_pchan_mat3_to_rot(struct bPoseChannel *pchan, const float mat[3][3], bool use_compat)
Definition: armature.c:1912
void BKE_pchan_minmax(const struct Object *ob, const struct bPoseChannel *pchan, const bool use_empty_drawtype, float r_min[3], float r_max[3])
void BKE_bone_parent_transform_combine(const struct BoneParentTransform *in1, const struct BoneParentTransform *in2, struct BoneParentTransform *result)
Definition: armature.c:1827
void BKE_pose_clear_pointers(struct bPose *pose)
Definition: armature.c:2324
void BKE_pose_eval_init(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *object)
void BKE_armature_transform(struct bArmature *arm, const float mat[4][4], bool do_props)
Definition: armature.c:556
bool BKE_armature_bone_flag_test_recursive(const struct Bone *bone, int flag)
void BKE_armature_mat_pose_to_bone(struct bPoseChannel *pchan, const float inmat[4][4], float outmat[4][4])
Definition: armature.c:1849
void BKE_armature_mat_pose_to_bone_ex(struct Depsgraph *depsgraph, struct Object *ob, struct bPoseChannel *pchan, const float inmat[4][4], float outmat[4][4])
Definition: armature.c:1892
void BKE_pose_where_is_bone_tail(struct bPoseChannel *pchan)
Definition: armature.c:2465
struct BoundBox * BKE_armature_boundbox_get(struct Object *ob)
Definition: armature.c:2657
struct bArmature * BKE_armature_add(struct Main *bmain, const char *name)
Definition: armature.c:334
void BKE_pchan_bbone_spline_params_get(struct bPoseChannel *pchan, bool rest, struct BBoneSplineParameters *r_param)
Definition: armature.c:933
void BKE_bone_parent_transform_invert(struct BoneParentTransform *bpt)
Definition: armature.c:1820
void BKE_bone_offset_matrix_get(const struct Bone *bone, float offs_bone[4][4])
struct PoseTree PoseTree
void BKE_armature_mat_bone_to_pose(struct bPoseChannel *pchan, const float inmat[4][4], float outmat[4][4])
Definition: armature.c:1860
void BKE_pose_eval_done(struct Depsgraph *depsgraph, struct Object *object)
void BKE_pose_remap_bone_pointers(struct bArmature *armature, struct bPose *pose)
Definition: armature.c:2332
void BKE_pose_apply_action_blend(struct Object *ob, struct bAction *action, struct AnimationEvalContext *anim_eval_context, float blend_factor)
void BKE_rotMode_change_values(float quat[4], float eul[3], float axis[3], float *angle, short oldMode, short newMode)
Definition: armature.c:1983
void BKE_pose_where_is_bone(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, float ctime, bool do_extra)
Definition: armature.c:2474
void BKE_bone_parent_transform_clear(struct BoneParentTransform *bpt)
Definition: armature.c:1813
void BKE_pose_pchan_index_rebuild(struct bPose *pose)
void BKE_pose_eval_cleanup(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *object)
void BKE_armature_loc_world_to_pose(struct Object *ob, const float inloc[3], float outloc[3])
Definition: armature.c:1605
void BKE_armature_mat_pose_to_delta(float delta_mat[4][4], float pose_mat[4][4], float arm_mat[4][4])
Definition: armature.c:1965
void BKE_armature_deform_coords_with_editmesh(const struct Object *ob_arm, const struct Object *ob_target, float(*vert_coords)[3], float(*vert_deform_mats)[3][3], int vert_coords_len, int deformflag, float(*vert_coords_prev)[3], const char *defgrp_name, struct BMEditMesh *em_target)
void vec_roll_to_mat3(const float vec[3], float roll, float r_mat[3][3])
Definition: armature.c:2211
void BKE_pchan_bbone_spline_setup(struct bPoseChannel *pchan, bool rest, bool for_deform, Mat4 *result_array)
Definition: armature.c:1178
struct EditBone EditBone
void BKE_pose_where_is(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
Definition: armature.c:2538
int BKE_armature_bonelist_count(const struct ListBase *lb)
void BKE_pchan_calc_mat(struct bPoseChannel *pchan)
Definition: armature.c:2457
int BKE_pchan_bbone_spline_compute(struct BBoneSplineParameters *param, bool for_deform, Mat4 *result_array)
Definition: armature.c:1350
void BKE_pose_constraints_evaluate(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *object, int pchan_index)
void BKE_armature_where_is(struct bArmature *arm)
Definition: armature.c:2263
void BKE_armature_copy_bone_transforms(struct bArmature *armature_dst, const struct bArmature *armature_src)
void mat3_to_vec_roll(const float mat[3][3], float r_vec[3], float *r_roll)
Definition: armature.c:2056
void BKE_pose_channels_clear_with_null_bone(struct bPose *pose, bool do_id_user)
Definition: armature.c:2351
void BKE_armature_editbonelist_free(struct ListBase *lb, bool do_id_user)
Definition: armature.c:374
void BKE_bone_parent_transform_calc_from_matrices(int bone_flag, int inherit_scale_mode, const float offs_bone[4][4], const float parent_arm_mat[4][4], const float parent_pose_mat[4][4], struct BoneParentTransform *r_bpt)
Definition: armature.c:1668
void BKE_pchan_rot_to_mat3(const struct bPoseChannel *pchan, float r_mat[3][3])
void BKE_armature_deform_coords_with_mesh(const struct Object *ob_arm, const struct Object *ob_target, float(*vert_coords)[3], float(*vert_deform_mats)[3][3], int vert_coords_len, int deformflag, float(*vert_coords_prev)[3], const char *defgrp_name, const struct Mesh *me_target)
void BKE_armature_deform_coords_with_gpencil_stroke(const struct Object *ob_arm, const struct Object *ob_target, float(*vert_coords)[3], float(*vert_deform_mats)[3][3], int vert_coords_len, int deformflag, float(*vert_coords_prev)[3], const char *defgrp_name, struct bGPDstroke *gps_target)
void BKE_bone_parent_transform_apply(const struct BoneParentTransform *bpt, const float inmat[4][4], float outmat[4][4])
Definition: armature.c:1836
void vec_roll_to_mat3_normalized(const float nor[3], float roll, float r_mat[3][3])
Definition: armature.c:2082
void BKE_pose_rebuild(struct Main *bmain, struct Object *ob, struct bArmature *arm, bool do_id_user)
Definition: armature.c:2362
void BKE_pchan_bbone_segments_cache_copy(struct bPoseChannel *pchan, struct bPoseChannel *pchan_from)
Definition: armature.c:1535
bool bone_autoside_name(char name[64], int strip_number, short axis, float head, float tail)
void BKE_armature_bone_hash_make(struct bArmature *arm)
Definition: armature.c:629
void BKE_armature_bonelist_free(struct ListBase *lb, bool do_id_user)
Definition: armature.c:360
void BKE_pose_eval_init_ik(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *object)
struct Mat4 Mat4
void BKE_pchan_bbone_handles_compute(const BBoneSplineParameters *param, float h1[3], float *r_roll1, float h2[3], float *r_roll2, bool ease, bool offsets)
Definition: armature.c:1190
struct bPoseChannel * BKE_armature_splineik_solver_find_root(struct bPoseChannel *pchan, struct bSplineIKConstraint *data)
Definition: armature.c:2761
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
Definition: btVector3.h:356
Scene scene
const Depsgraph * depsgraph
uint pos
uint nor
float loc_mat[4][4]
Definition: BKE_armature.h:396
float rotscale_mat[4][4]
Definition: BKE_armature.h:395
float roll
char name[64]
float arm_mat[4][4]
float curve_out_z
Definition: BKE_armature.h:74
float scale_in[3]
Definition: BKE_armature.h:76
char name[64]
Definition: BKE_armature.h:43
short bbone_prev_flag
Definition: BKE_armature.h:86
float ease2
Definition: BKE_armature.h:75
float weight
Definition: BKE_armature.h:65
struct EditBone * bbone_child
Definition: BKE_armature.h:101
float oldlength
Definition: BKE_armature.h:79
float roll1
Definition: BKE_armature.h:72
int bbone_flag
Definition: BKE_armature.h:85
struct EditBone * next
Definition: BKE_armature.h:33
short segments
Definition: BKE_armature.h:71
float tail[3]
Definition: BKE_armature.h:54
float roll
Definition: BKE_armature.h:50
char bbone_prev_type
Definition: BKE_armature.h:82
float roll2
Definition: BKE_armature.h:72
float disp_bbone_mat[32][4][4]
Definition: BKE_armature.h:98
struct EditBone * ebone
Definition: BKE_armature.h:105
float curve_in_x
Definition: BKE_armature.h:73
float disp_mat[4][4]
Definition: BKE_armature.h:94
struct Bone * bone
Definition: BKE_armature.h:106
float zwidth
Definition: BKE_armature.h:67
short bbone_next_flag
Definition: BKE_armature.h:87
struct EditBone * bbone_next
Definition: BKE_armature.h:90
float curve_in_z
Definition: BKE_armature.h:73
float length
Definition: BKE_armature.h:67
float xwidth
Definition: BKE_armature.h:67
float disp_tail_mat[4][4]
Definition: BKE_armature.h:96
float dist
Definition: BKE_armature.h:65
char bbone_next_type
Definition: BKE_armature.h:83
struct EditBone * parent
Definition: BKE_armature.h:41
void * p
Definition: BKE_armature.h:107
float rad_tail
Definition: BKE_armature.h:68
union EditBone::@3 temp
struct IDProperty * prop
Definition: BKE_armature.h:35
float ease1
Definition: BKE_armature.h:75
struct EditBone * prev
Definition: BKE_armature.h:33
float rad_head
Definition: BKE_armature.h:68
float scale_out[3]
Definition: BKE_armature.h:76
char inherit_scale_mode
Definition: BKE_armature.h:62
float curve_out_x
Definition: BKE_armature.h:74
struct EditBone * bbone_prev
Definition: BKE_armature.h:89
float head[3]
Definition: BKE_armature.h:53
Definition: BKE_main.h:121
float mat[4][4]
Definition: BKE_armature.h:464
struct PoseTarget * next
Definition: BKE_armature.h:113
struct bConstraint * con
Definition: BKE_armature.h:115
struct PoseTarget * prev
Definition: BKE_armature.h:113
float(* basis_change)[3][3]
Definition: BKE_armature.h:129
int iterations
Definition: BKE_armature.h:130
struct ListBase targets
Definition: BKE_armature.h:125
struct bPoseChannel ** pchan
Definition: BKE_armature.h:126
int * parent
Definition: BKE_armature.h:127
int totchannel
Definition: BKE_armature.h:123
struct PoseTree * next
Definition: BKE_armature.h:120
struct PoseTree * prev
Definition: BKE_armature.h:120