Blender  V2.93
BKE_armature.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
19 #pragma once
20 
24 #include "BLI_listbase.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
31 struct bAction;
32 struct BMEditMesh;
33 struct Bone;
34 struct Depsgraph;
35 struct IDProperty;
36 struct ListBase;
37 struct Main;
38 struct Mesh;
39 struct Object;
40 struct PoseTree;
41 struct Scene;
42 struct bArmature;
43 struct bConstraint;
44 struct bGPDstroke;
45 struct bPose;
46 struct bPoseChannel;
47 
48 typedef struct EditBone {
49  struct EditBone *next, *prev;
51  struct IDProperty *prop;
55  struct EditBone *parent;
57  char name[64];
62  float roll;
63 
65  float head[3];
66  float tail[3];
70  int flag;
71  int layer;
73 
74  /* Envelope distance & weight */
75  float dist, weight;
77  float xwidth, length, zwidth;
79 
80  /* Bendy-Bone parameters */
81  short segments;
82  float roll1, roll2;
85  float ease1, ease2;
88 
90  float oldlength;
91 
98 
99  /* Used for display */
101  float disp_mat[4][4];
103  float disp_tail_mat[4][4];
105  float disp_bbone_mat[32][4][4];
106 
109 
110  /* Used to store temporary data */
111  union {
112  struct EditBone *ebone;
113  struct Bone *bone;
114  void *p;
115  int i;
116  } temp;
118 
119 typedef struct PoseTarget {
120  struct PoseTarget *next, *prev;
121 
122  struct bConstraint *con; /* the constraint of this target */
123  int tip; /* index of tip pchan in PoseTree */
125 
126 typedef struct PoseTree {
127  struct PoseTree *next, *prev;
128 
129  int type; /* type of IK that this serves (CONSTRAINT_TYPE_KINEMATIC or ..._SPLINEIK) */
130  int totchannel; /* number of pose channels */
131 
132  struct ListBase targets; /* list of targets of the tree */
133  struct bPoseChannel **pchan; /* array of pose channels */
134  int *parent; /* and their parents */
135 
136  float (*basis_change)[3][3]; /* basis change result from solver */
137  int iterations; /* iterations from the constraint */
138  int stretch; /* disable stretching */
140 
141 /* Core armature functionality. */
142 
143 struct bArmature *BKE_armature_add(struct Main *bmain, const char *name);
144 struct bArmature *BKE_armature_from_object(struct Object *ob);
145 int BKE_armature_bonelist_count(struct ListBase *lb);
146 void BKE_armature_bonelist_free(struct ListBase *lb, const bool do_id_user);
147 void BKE_armature_editbonelist_free(struct ListBase *lb, const bool do_id_user);
148 
150  const struct bArmature *armature_src);
151 
152 void BKE_armature_transform(struct bArmature *arm, const float mat[4][4], const bool do_props);
153 
154 /* Bounding box. */
155 struct BoundBox *BKE_armature_boundbox_get(struct Object *ob);
156 
157 bool BKE_pose_minmax(
158  struct Object *ob, float r_min[3], float r_max[3], bool use_hidden, bool use_select);
159 
160 bool bone_autoside_name(char name[64], int strip_number, short axis, float head, float tail);
161 
162 struct Bone *BKE_armature_find_bone_name(struct bArmature *arm, const char *name);
163 
164 void BKE_armature_bone_hash_make(struct bArmature *arm);
165 void BKE_armature_bone_hash_free(struct bArmature *arm);
166 
167 bool BKE_armature_bone_flag_test_recursive(const struct Bone *bone, int flag);
168 
170 
171 float distfactor_to_bone(
172  const float vec[3], const float b1[3], const float b2[3], float rad1, float rad2, float rdist);
173 
174 void BKE_armature_where_is(struct bArmature *arm);
176  const struct Bone *bone_parent,
177  const bool use_recursion);
178 void BKE_pose_clear_pointers(struct bPose *pose);
179 void BKE_pose_remap_bone_pointers(struct bArmature *armature, struct bPose *pose);
180 void BKE_pchan_rebuild_bbone_handles(struct bPose *pose, struct bPoseChannel *pchan);
181 void BKE_pose_channels_clear_with_null_bone(struct bPose *pose, const bool do_id_user);
182 void BKE_pose_rebuild(struct Main *bmain,
183  struct Object *ob,
184  struct bArmature *arm,
185  const bool do_id_user);
186 void BKE_pose_ensure(struct Main *bmain,
187  struct Object *ob,
188  struct bArmature *arm,
189  const bool do_id_user);
190 void BKE_pose_where_is(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob);
192  struct Scene *scene,
193  struct Object *ob,
194  struct bPoseChannel *pchan,
195  float ctime,
196  bool do_extra);
197 void BKE_pose_where_is_bone_tail(struct bPoseChannel *pchan);
198 
199 /* Evaluate the action and apply it to the pose. If any pose bones are selected, only FCurves that
200  * relate to those bones are evaluated. */
201 void BKE_pose_apply_action(struct Object *ob,
202  struct bAction *action,
203  struct AnimationEvalContext *anim_eval_context);
204 
205 void vec_roll_to_mat3(const float vec[3], const float roll, float r_mat[3][3]);
206 void vec_roll_to_mat3_normalized(const float nor[3], const float roll, float r_mat[3][3]);
207 void mat3_to_vec_roll(const float mat[3][3], float r_vec[3], float *r_roll);
208 void mat3_vec_to_roll(const float mat[3][3], const float vec[3], float *r_roll);
209 
210 /* Common Conversions Between Co-ordinate Spaces */
211 void BKE_armature_mat_world_to_pose(struct Object *ob,
212  const float inmat[4][4],
213  float outmat[4][4]);
214 void BKE_armature_loc_world_to_pose(struct Object *ob, const float inloc[3], float outloc[3]);
216  const float inmat[4][4],
217  float outmat[4][4]);
219  const float inloc[3],
220  float outloc[3]);
222  const float inmat[4][4],
223  float outmat[4][4]);
224 void BKE_armature_mat_pose_to_delta(float delta_mat[4][4],
225  float pose_mat[4][4],
226  float arm_mat[4][4]);
227 
229  struct Object *ob,
230  struct bPoseChannel *pchan,
231  const float inmat[4][4],
232  float outmat[4][4]);
233 
234 void BKE_pchan_mat3_to_rot(struct bPoseChannel *pchan, const float mat[3][3], bool use_compat);
235 void BKE_pchan_rot_to_mat3(const struct bPoseChannel *pchan, float r_mat[3][3]);
236 void BKE_pchan_apply_mat4(struct bPoseChannel *pchan, const float mat[4][4], bool use_compat);
237 void BKE_pchan_to_mat4(const struct bPoseChannel *pchan, float r_chanmat[4][4]);
238 void BKE_pchan_calc_mat(struct bPoseChannel *pchan);
239 
240 /* Simple helper, computes the offset bone matrix. */
241 void BKE_bone_offset_matrix_get(const struct Bone *bone, float offs_bone[4][4]);
242 
243 /* Transformation inherited from the parent bone. These matrices apply the effects of
244  * HINGE/NO_SCALE/NO_LOCAL_LOCATION options over the pchan loc/rot/scale transformations. */
245 typedef struct BoneParentTransform {
246  float rotscale_mat[4][4]; /* parent effect on rotation & scale pose channels */
247  float loc_mat[4][4]; /* parent effect on location pose channel */
248  float post_scale[3]; /* additional scale to apply with post-multiply */
250 
251 /* Matrix-like algebra operations on the transform */
255  const struct BoneParentTransform *in2,
256  struct BoneParentTransform *result);
257 
259  const float inmat[4][4],
260  float outmat[4][4]);
261 
262 /* Get the current parent transformation for the given pose bone. */
264  struct BoneParentTransform *r_bpt);
266  int inherit_scale_mode,
267  const float offs_bone[4][4],
268  const float parent_arm_mat[4][4],
269  const float parent_pose_mat[4][4],
270  struct BoneParentTransform *r_bpt);
271 
272 /* Rotation Mode Conversions - Used for PoseChannels + Objects... */
274  float quat[4], float eul[3], float axis[3], float *angle, short oldMode, short newMode);
275 
276 /* B-Bone support */
277 #define MAX_BBONE_SUBDIV 32
278 
279 typedef struct Mat4 {
280  float mat[4][4];
282 
283 typedef struct BBoneSplineParameters {
284  int segments;
285  float length;
286 
287  /* Non-uniform scale correction. */
288  bool do_scale;
289  float scale[3];
290 
291  /* Handle control bone data. */
294 
295  float prev_h[3], next_h[3];
296  float prev_mat[4][4], next_mat[4][4];
297 
298  /* Control values. */
299  float ease1, ease2;
300  float roll1, roll2;
304 
305 void BKE_pchan_bbone_handles_get(struct bPoseChannel *pchan,
306  struct bPoseChannel **r_prev,
307  struct bPoseChannel **r_next);
309  const bool rest,
310  struct BBoneSplineParameters *r_param);
311 
312 void BKE_pchan_bbone_spline_setup(struct bPoseChannel *pchan,
313  const bool rest,
314  const bool for_deform,
315  Mat4 *result_array);
316 
318  float h1[3],
319  float *r_roll1,
320  float h2[3],
321  float *r_roll2,
322  bool ease,
323  bool offsets);
325  const bool for_deform,
326  Mat4 *result_array);
327 
330  struct bPoseChannel *pchan_from);
331 
333  float pos,
334  int *r_index,
335  float *r_blend_next);
336 
337 /* like EBONE_VISIBLE */
338 #define PBONE_VISIBLE(arm, bone) \
339  (CHECK_TYPE_INLINE(arm, bArmature *), \
340  CHECK_TYPE_INLINE(bone, Bone *), \
341  (((bone)->layer & (arm)->layer) && !((bone)->flag & BONE_HIDDEN_P)))
342 
343 #define PBONE_SELECTABLE(arm, bone) \
344  (PBONE_VISIBLE(arm, bone) && !((bone)->flag & BONE_UNSELECTABLE))
345 
346 #define PBONE_SELECTED(arm, bone) (((bone)->flag & BONE_SELECTED) & PBONE_VISIBLE(arm, bone))
347 
348 /* context.selected_pose_bones */
349 #define FOREACH_PCHAN_SELECTED_IN_OBJECT_BEGIN(_ob, _pchan) \
350  for (bPoseChannel *_pchan = (_ob)->pose->chanbase.first; _pchan; _pchan = _pchan->next) { \
351  if (PBONE_VISIBLE(((bArmature *)(_ob)->data), (_pchan)->bone) && \
352  ((_pchan)->bone->flag & BONE_SELECTED)) {
353 #define FOREACH_PCHAN_SELECTED_IN_OBJECT_END \
354  } \
355  } \
356  ((void)0)
357 /* context.visible_pose_bones */
358 #define FOREACH_PCHAN_VISIBLE_IN_OBJECT_BEGIN(_ob, _pchan) \
359  for (bPoseChannel *_pchan = (_ob)->pose->chanbase.first; _pchan; _pchan = _pchan->next) { \
360  if (PBONE_VISIBLE(((bArmature *)(_ob)->data), (_pchan)->bone)) {
361 #define FOREACH_PCHAN_VISIBLE_IN_OBJECT_END \
362  } \
363  } \
364  ((void)0)
365 
366 /* Evaluation helpers */
367 struct bKinematicConstraint;
368 struct bPose;
369 struct bSplineIKConstraint;
370 
372  struct bKinematicConstraint *data);
374  struct bSplineIKConstraint *data);
375 
376 void BKE_pose_splineik_init_tree(struct Scene *scene, struct Object *ob, float ctime);
378  struct Scene *scene,
379  struct Object *ob,
380  struct bPoseChannel *pchan_root,
381  float ctime);
382 
383 void BKE_pose_pchan_index_rebuild(struct bPose *pose);
384 
385 void BKE_pose_eval_init(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *object);
386 
388  struct Scene *scene,
389  struct Object *object);
390 
392  struct Scene *scene,
393  struct Object *object,
394  int pchan_index);
395 
397  struct Scene *scene,
398  struct Object *object,
399  int pchan_index);
400 
401 void BKE_pose_bone_done(struct Depsgraph *depsgraph, struct Object *object, int pchan_index);
402 
404  struct Object *object,
405  int pchan_index);
406 
408  struct Scene *scene,
409  struct Object *object,
410  int rootchan_index);
411 
413  struct Scene *scene,
414  struct Object *object,
415  int rootchan_index);
416 
417 void BKE_pose_eval_done(struct Depsgraph *depsgraph, struct Object *object);
418 
420  struct Scene *scene,
421  struct Object *object);
422 
423 void BKE_pose_eval_proxy_init(struct Depsgraph *depsgraph, struct Object *object);
424 void BKE_pose_eval_proxy_done(struct Depsgraph *depsgraph, struct Object *object);
425 void BKE_pose_eval_proxy_cleanup(struct Depsgraph *depsgraph, struct Object *object);
426 
428  struct Object *object,
429  int pchan_index);
430 
431 /* -------------------------------------------------------------------- */
435 /* Note that we could have a 'BKE_armature_deform_coords' that doesn't take object data
436  * currently there are no callers for this though. */
437 
439  const struct Object *ob_target,
440  float (*vert_coords)[3],
441  float (*vert_deform_mats)[3][3],
442  int vert_coords_len,
443  int deformflag,
444  float (*vert_coords_prev)[3],
445  const char *defgrp_name,
446  struct bGPDstroke *gps_target);
447 
449  const struct Object *ob_target,
450  float (*vert_coords)[3],
451  float (*vert_deform_mats)[3][3],
452  int vert_coords_len,
453  int deformflag,
454  float (*vert_coords_prev)[3],
455  const char *defgrp_name,
456  const struct Mesh *me_target);
457 
459  const struct Object *ob_target,
460  float (*vert_coords)[3],
461  float (*vert_deform_mats)[3][3],
462  int vert_coords_len,
463  int deformflag,
464  float (*vert_coords_prev)[3],
465  const char *defgrp_name,
466  struct BMEditMesh *em_target);
467 
470 #ifdef __cplusplus
471 }
472 #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:921
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])
bool BKE_pose_minmax(struct Object *ob, float r_min[3], float r_max[3], bool use_hidden, bool use_select)
Definition: armature.c:2865
void BKE_pose_splineik_evaluate(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *object, int rootchan_index)
void vec_roll_to_mat3(const float vec[3], const float roll, float r_mat[3][3])
Definition: armature.c:2212
void BKE_pose_splineik_init_tree(struct Scene *scene, struct Object *ob, float ctime)
void BKE_armature_where_is_bone(struct Bone *bone, const struct Bone *bone_parent, const bool use_recursion)
struct BoneParentTransform BoneParentTransform
int BKE_pchan_bbone_spline_compute(struct BBoneSplineParameters *param, const bool for_deform, Mat4 *result_array)
Definition: armature.c:1306
void BKE_pose_iktree_evaluate(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *object, int rootchan_index)
void BKE_pose_rebuild(struct Main *bmain, struct Object *ob, struct bArmature *arm, const bool do_id_user)
Definition: armature.c:2536
struct Bone * BKE_armature_find_bone_name(struct bArmature *arm, const char *name)
Definition: armature.c:609
void BKE_armature_bonelist_free(struct ListBase *lb, const bool do_id_user)
Definition: armature.c:371
void BKE_pchan_bbone_spline_params_get(struct bPoseChannel *pchan, const bool rest, struct BBoneSplineParameters *r_param)
Definition: armature.c:948
struct bArmature * BKE_armature_from_object(struct Object *ob)
Definition: armature.c:353
void BKE_armature_refresh_layer_used(struct Depsgraph *depsgraph, struct bArmature *arm)
Definition: armature.c:690
void BKE_armature_mat_world_to_pose(struct Object *ob, const float inmat[4][4], float outmat[4][4])
Definition: armature.c:1536
struct PoseTarget PoseTarget
void BKE_pose_channels_clear_with_null_bone(struct bPose *pose, const bool do_id_user)
Definition: armature.c:2518
int BKE_armature_bonelist_count(struct ListBase *lb)
Definition: armature.c:361
void BKE_pchan_rebuild_bbone_handles(struct bPose *pose, struct bPoseChannel *pchan)
Definition: armature.c:2512
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:2072
void BKE_pchan_bbone_segments_cache_compute(struct bPoseChannel *pchan)
Definition: armature.c:1425
struct bPoseChannel * BKE_armature_ik_solver_find_root(struct bPoseChannel *pchan, struct bKinematicConstraint *data)
Definition: armature.c:2910
void BKE_pchan_bbone_deform_segment_index(const struct bPoseChannel *pchan, float pos, int *r_index, float *r_blend_next)
void BKE_armature_transform(struct bArmature *arm, const float mat[4][4], const bool do_props)
Definition: armature.c:567
void BKE_armature_loc_pose_to_bone(struct bPoseChannel *pchan, const float inloc[3], float outloc[3])
Definition: armature.c:1853
void BKE_pose_ensure(struct Main *bmain, struct Object *ob, struct bArmature *arm, const bool do_id_user)
Definition: armature.c:2608
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:651
void BKE_pose_bone_done(struct Depsgraph *depsgraph, struct Object *object, int pchan_index)
void BKE_pchan_bbone_spline_setup(struct bPoseChannel *pchan, const bool rest, const bool for_deform, Mat4 *result_array)
Definition: armature.c:1134
void BKE_pchan_apply_mat4(struct bPoseChannel *pchan, const float mat[4][4], bool use_compat)
Definition: armature.c:1951
struct BBoneSplineParameters BBoneSplineParameters
float distfactor_to_bone(const float vec[3], const float b1[3], const float b2[3], float rad1, float rad2, float rdist)
void BKE_pose_eval_proxy_done(struct Depsgraph *depsgraph, struct Object *object)
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:1898
void BKE_bone_parent_transform_combine(const struct BoneParentTransform *in1, const struct BoneParentTransform *in2, struct BoneParentTransform *result)
Definition: armature.c:1803
void BKE_pose_clear_pointers(struct bPose *pose)
Definition: armature.c:2490
void BKE_pose_eval_init(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *object)
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:1828
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:1875
void BKE_pose_where_is_bone_tail(struct bPoseChannel *pchan)
Definition: armature.c:2660
struct BoundBox * BKE_armature_boundbox_get(struct Object *ob)
Definition: armature.c:2858
struct bArmature * BKE_armature_add(struct Main *bmain, const char *name)
Definition: armature.c:345
void BKE_bone_parent_transform_invert(struct BoneParentTransform *bpt)
Definition: armature.c:1796
void BKE_bone_offset_matrix_get(const struct Bone *bone, float offs_bone[4][4])
void BKE_armature_editbonelist_free(struct ListBase *lb, const bool do_id_user)
Definition: armature.c:385
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:1840
void BKE_pose_eval_proxy_cleanup(struct Depsgraph *depsgraph, struct Object *object)
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:2498
void BKE_pose_eval_proxy_copy_bone(struct Depsgraph *depsgraph, struct Object *object, int pchan_index)
void BKE_rotMode_change_values(float quat[4], float eul[3], float axis[3], float *angle, short oldMode, short newMode)
Definition: armature.c:1984
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:2673
void BKE_bone_parent_transform_clear(struct BoneParentTransform *bpt)
Definition: armature.c:1789
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:1555
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:1963
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)
struct EditBone EditBone
void BKE_pose_where_is(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
Definition: armature.c:2739
void BKE_pchan_calc_mat(struct bPoseChannel *pchan)
Definition: armature.c:2651
void BKE_pose_apply_action(struct Object *ob, struct bAction *action, struct AnimationEvalContext *anim_eval_context)
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:2270
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:2059
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:1644
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:1812
void BKE_pose_eval_proxy_init(struct Depsgraph *depsgraph, struct Object *object)
void BKE_pchan_bbone_segments_cache_copy(struct bPoseChannel *pchan, struct bPoseChannel *pchan_from)
Definition: armature.c:1477
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:644
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:1147
struct bPoseChannel * BKE_armature_splineik_solver_find_root(struct bPoseChannel *pchan, struct bSplineIKConstraint *data)
Definition: armature.c:2931
void vec_roll_to_mat3_normalized(const float nor[3], const float roll, float r_mat[3][3])
Definition: armature.c:2155
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:51
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:247
float rotscale_mat[4][4]
Definition: BKE_armature.h:246
float roll
char name[64]
float arm_mat[4][4]
char name[64]
Definition: BKE_armature.h:57
float ease2
Definition: BKE_armature.h:85
float weight
Definition: BKE_armature.h:75
struct EditBone * bbone_child
Definition: BKE_armature.h:108
float oldlength
Definition: BKE_armature.h:90
float roll1
Definition: BKE_armature.h:82
float scale_out_y
Definition: BKE_armature.h:87
struct EditBone * next
Definition: BKE_armature.h:49
short segments
Definition: BKE_armature.h:81
float tail[3]
Definition: BKE_armature.h:66
float roll
Definition: BKE_armature.h:62
char bbone_prev_type
Definition: BKE_armature.h:93
float roll2
Definition: BKE_armature.h:82
float disp_bbone_mat[32][4][4]
Definition: BKE_armature.h:105
struct EditBone * ebone
Definition: BKE_armature.h:112
float curve_in_x
Definition: BKE_armature.h:83
float disp_mat[4][4]
Definition: BKE_armature.h:101
float scale_out_x
Definition: BKE_armature.h:87
struct Bone * bone
Definition: BKE_armature.h:113
float zwidth
Definition: BKE_armature.h:77
struct EditBone * bbone_next
Definition: BKE_armature.h:97
float length
Definition: BKE_armature.h:77
float xwidth
Definition: BKE_armature.h:77
float disp_tail_mat[4][4]
Definition: BKE_armature.h:103
float dist
Definition: BKE_armature.h:75
float curve_in_y
Definition: BKE_armature.h:83
char bbone_next_type
Definition: BKE_armature.h:94
struct EditBone * parent
Definition: BKE_armature.h:55
void * p
Definition: BKE_armature.h:114
float rad_tail
Definition: BKE_armature.h:78
union EditBone::@2 temp
struct IDProperty * prop
Definition: BKE_armature.h:51
float ease1
Definition: BKE_armature.h:85
struct EditBone * prev
Definition: BKE_armature.h:49
float rad_head
Definition: BKE_armature.h:78
char inherit_scale_mode
Definition: BKE_armature.h:72
float curve_out_y
Definition: BKE_armature.h:84
float curve_out_x
Definition: BKE_armature.h:84
struct EditBone * bbone_prev
Definition: BKE_armature.h:96
float scale_in_y
Definition: BKE_armature.h:86
float head[3]
Definition: BKE_armature.h:65
float scale_in_x
Definition: BKE_armature.h:86
Definition: BKE_main.h:116
float mat[4][4]
Definition: BKE_armature.h:280
struct PoseTarget * next
Definition: BKE_armature.h:120
struct bConstraint * con
Definition: BKE_armature.h:122
struct PoseTarget * prev
Definition: BKE_armature.h:120
float(* basis_change)[3][3]
Definition: BKE_armature.h:136
int iterations
Definition: BKE_armature.h:137
struct ListBase targets
Definition: BKE_armature.h:132
struct bPoseChannel ** pchan
Definition: BKE_armature.h:133
int * parent
Definition: BKE_armature.h:134
int totchannel
Definition: BKE_armature.h:130
struct PoseTree * next
Definition: BKE_armature.h:127
struct PoseTree * prev
Definition: BKE_armature.h:127