Blender  V3.3
armature_intern.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2009 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 /* internal exports only */
11 struct wmOperatorType;
12 
13 struct Base;
14 struct GPUSelectResult;
15 struct Object;
16 struct Scene;
17 struct bContext;
18 struct bPoseChannel;
19 
20 struct Bone;
21 struct EditBone;
22 struct bArmature;
23 
24 struct LinkData;
25 struct ListBase;
26 
27 /* -------------------------------------------------------------------- */
32 
33 void ARMATURE_OT_align(struct wmOperatorType *ot);
37 
39 
42 
52 
58 void ARMATURE_OT_hide(struct wmOperatorType *ot);
61 void ARMATURE_OT_fill(struct wmOperatorType *ot);
63 void ARMATURE_OT_split(struct wmOperatorType *ot);
64 
67 
71 
74 /* -------------------------------------------------------------------- */
78 void POSE_OT_hide(struct wmOperatorType *ot);
79 void POSE_OT_reveal(struct wmOperatorType *ot);
80 
83 
84 void POSE_OT_rot_clear(struct wmOperatorType *ot);
85 void POSE_OT_loc_clear(struct wmOperatorType *ot);
89 
90 void POSE_OT_copy(struct wmOperatorType *ot);
91 void POSE_OT_paste(struct wmOperatorType *ot);
92 
101 
102 void POSE_OT_group_add(struct wmOperatorType *ot);
104 void POSE_OT_group_move(struct wmOperatorType *ot);
105 void POSE_OT_group_sort(struct wmOperatorType *ot);
110 
115 
117 void POSE_OT_flip_names(struct wmOperatorType *ot);
118 
120 
122 
124 
127 /* -------------------------------------------------------------------- */
131 /* pose_utils.c */
132 
133 /* Temporary data linking PoseChannels with the F-Curves they affect */
134 typedef struct tPChanFCurveLink {
136 
138  struct Object *ob;
139 
144 
146  char *pchan_path;
147 
149  float oldloc[3];
150  float oldrot[3];
151  float oldscale[3];
152  float oldquat[4];
153  float oldangle;
154  float oldaxis[3];
155 
157  float roll1, roll2;
161  float ease1, ease2;
162  float scale_in[3];
163  float scale_out[3];
164 
168 
169 /* ----------- */
170 
172 struct Object *poseAnim_object_get(struct Object *ob_);
174 void poseAnim_mapping_get(struct bContext *C, ListBase *pfLinks);
176 void poseAnim_mapping_free(ListBase *pfLinks);
177 
181 void poseAnim_mapping_refresh(struct bContext *C, struct Scene *scene, struct Object *ob);
185 void poseAnim_mapping_reset(ListBase *pfLinks);
188  struct Scene *scene,
189  ListBase *pfLinks,
190  float cframe);
191 
196 LinkData *poseAnim_mapping_getNextFCurve(ListBase *fcuLinks, LinkData *prev, const char *path);
197 
200 /* -------------------------------------------------------------------- */
204 /* pose_lib.c */
205 
206 void POSELIB_OT_new(struct wmOperatorType *ot);
207 void POSELIB_OT_unlink(struct wmOperatorType *ot);
208 
210 
215 
218 
219 /* pose_lib_2.c */
220 
223 
226 /* -------------------------------------------------------------------- */
230 /* pose_slide.c */
231 
232 void POSE_OT_push(struct wmOperatorType *ot);
233 void POSE_OT_relax(struct wmOperatorType *ot);
234 void POSE_OT_push_rest(struct wmOperatorType *ot);
235 void POSE_OT_relax_rest(struct wmOperatorType *ot);
236 void POSE_OT_breakdown(struct wmOperatorType *ot);
238 
239 void POSE_OT_propagate(struct wmOperatorType *ot);
240 
243 /* -------------------------------------------------------------------- */
247 /* Ideally, many of these defines would not be needed as everything would be strictly
248  * self-contained within each file,
249  * but some tools still have a bit of overlap which makes things messy -- Feb 2013
250  */
251 
252 struct EditBone *make_boneList(struct ListBase *edbo,
253  struct ListBase *bones,
254  struct Bone *actBone);
255 
256 /* Duplicate method. */
257 
259 void preEditBoneDuplicate(struct ListBase *editbones);
260 void postEditBoneDuplicate(struct ListBase *editbones, struct Object *ob);
261 struct EditBone *duplicateEditBone(struct EditBone *cur_bone,
262  const char *name,
263  struct ListBase *editbones,
264  struct Object *ob);
265 
266 /* Duplicate method (cross objects). */
267 
271 struct EditBone *duplicateEditBoneObjects(struct EditBone *cur_bone,
272  const char *name,
273  struct ListBase *editbones,
274  struct Object *src_ob,
275  struct Object *dst_ob);
276 
278 struct EditBone *add_points_bone(struct Object *obedit, float head[3], float tail[3]);
279 void bone_free(struct bArmature *arm, struct EditBone *bone);
280 
281 void armature_tag_select_mirrored(struct bArmature *arm);
286 void armature_select_mirrored_ex(struct bArmature *arm, int flag);
287 void armature_select_mirrored(struct bArmature *arm);
289 void armature_tag_unselect(struct bArmature *arm);
290 
293 /* -------------------------------------------------------------------- */
297 struct EditBone *ED_armature_pick_ebone(struct bContext *C,
298  const int xy[2],
299  bool findunsel,
300  struct Base **r_base);
302  const int xy[2],
303  bool findunsel,
304  struct Base **r_base);
305 struct Bone *ED_armature_pick_bone(struct bContext *C,
306  const int xy[2],
307  bool findunsel,
308  struct Base **r_base);
309 
311  uint bases_len,
312  const struct GPUSelectResult *buffer,
313  short hits,
314  bool findunsel,
315  bool do_nearest,
316  struct Base **r_base);
318  uint bases_len,
319  const struct GPUSelectResult *buffer,
320  short hits,
321  bool findunsel,
322  bool do_nearest,
323  struct Base **r_base);
325  uint bases_len,
326  const struct GPUSelectResult *buffer,
327  short hits,
328  bool findunsel,
329  bool do_nearest,
330  struct Base **r_base);
331 
334 /* -------------------------------------------------------------------- */
342 int bone_looper(struct Object *ob,
343  struct Bone *bone,
344  void *data,
345  int (*bone_func)(struct Object *, struct Bone *, void *));
346 
unsigned int uint
Definition: BLI_sys_types.h:67
#define C
Definition: RandGen.cpp:25
void ARMATURE_OT_reveal(struct wmOperatorType *ot)
void POSELIB_OT_unlink(struct wmOperatorType *ot)
Definition: pose_lib.c:270
void POSE_OT_relax_rest(struct wmOperatorType *ot)
Definition: pose_slide.c:1618
void ARMATURE_OT_bone_primitive_add(struct wmOperatorType *ot)
struct Bone * ED_armature_pick_bone(struct bContext *C, const int xy[2], bool findunsel, struct Base **r_base)
void ARMATURE_OT_select_less(struct wmOperatorType *ot)
void ARMATURE_OT_select_all(struct wmOperatorType *ot)
void POSE_OT_select_hierarchy(struct wmOperatorType *ot)
Definition: pose_select.c:810
void ARMATURE_OT_symmetrize(struct wmOperatorType *ot)
void ARMATURE_OT_shortest_path_pick(struct wmOperatorType *ot)
void postEditBoneDuplicate(struct ListBase *editbones, struct Object *ob)
Definition: armature_add.c:317
void ARMATURE_OT_calculate_roll(struct wmOperatorType *ot)
void ARMATURE_OT_select_mirror(struct wmOperatorType *ot)
void ARMATURE_OT_separate(struct wmOperatorType *ot)
void POSE_OT_group_unassign(struct wmOperatorType *ot)
Definition: pose_group.c:275
void poseAnim_mapping_free(ListBase *pfLinks)
Definition: pose_utils.c:175
struct EditBone * add_points_bone(struct Object *obedit, float head[3], float tail[3])
Definition: armature_add.c:262
void preEditBoneDuplicate(struct ListBase *editbones)
Definition: armature_add.c:289
int bone_looper(struct Object *ob, struct Bone *bone, void *data, int(*bone_func)(struct Object *, struct Bone *, void *))
void POSE_OT_reveal(struct wmOperatorType *ot)
Definition: pose_edit.c:1093
void ARMATURE_OT_parent_set(struct wmOperatorType *ot)
void armature_tag_unselect(struct bArmature *arm)
void POSE_OT_scale_clear(struct wmOperatorType *ot)
void POSE_OT_group_deselect(struct wmOperatorType *ot)
Definition: pose_group.c:522
void POSE_OT_group_sort(struct wmOperatorType *ot)
Definition: pose_group.c:431
void POSE_OT_quaternions_flip(struct wmOperatorType *ot)
Definition: pose_edit.c:1149
void ARMATURE_OT_switch_direction(struct wmOperatorType *ot)
struct bPoseChannel * ED_armature_pick_pchan(struct bContext *C, const int xy[2], bool findunsel, struct Base **r_base)
void POSE_OT_autoside_names(struct wmOperatorType *ot)
Definition: pose_edit.c:583
struct EditBone * duplicateEditBoneObjects(struct EditBone *cur_bone, const char *name, struct ListBase *editbones, struct Object *src_ob, struct Object *dst_ob)
Definition: armature_add.c:896
void poseAnim_mapping_reset(ListBase *pfLinks)
Definition: pose_utils.c:212
void POSELIB_OT_apply_pose(struct wmOperatorType *ot)
Definition: pose_lib.c:1876
void POSE_OT_relax(struct wmOperatorType *ot)
Definition: pose_slide.c:1505
void POSELIB_OT_pose_rename(struct wmOperatorType *ot)
Definition: pose_lib.c:734
void POSELIB_OT_browse_interactive(struct wmOperatorType *ot)
Definition: pose_lib.c:1829
LinkData * poseAnim_mapping_getNextFCurve(ListBase *fcuLinks, LinkData *prev, const char *path)
Definition: pose_utils.c:316
void ARMATURE_OT_select_more(struct wmOperatorType *ot)
void POSE_OT_group_move(struct wmOperatorType *ot)
Definition: pose_group.c:334
void POSE_OT_paths_calculate(struct wmOperatorType *ot)
Definition: pose_edit.c:286
void POSE_OT_group_remove(struct wmOperatorType *ot)
Definition: pose_group.c:110
void POSELIB_OT_pose_add(struct wmOperatorType *ot)
Definition: pose_lib.c:522
void POSE_OT_copy(struct wmOperatorType *ot)
void ARMATURE_OT_hide(struct wmOperatorType *ot)
void ARMATURE_OT_subdivide(struct wmOperatorType *ot)
void ARMATURE_OT_delete(struct wmOperatorType *ot)
void POSE_OT_rot_clear(struct wmOperatorType *ot)
void POSELIB_OT_apply_pose_asset(struct wmOperatorType *ot)
Definition: pose_lib_2.c:549
void POSELIB_OT_new(struct wmOperatorType *ot)
Definition: pose_lib.c:232
void POSE_OT_select_linked(struct wmOperatorType *ot)
Definition: pose_select.c:557
void POSE_OT_hide(struct wmOperatorType *ot)
Definition: pose_edit.c:1030
void ARMATURE_OT_select_linked(struct wmOperatorType *ot)
void POSE_OT_select_mirror(struct wmOperatorType *ot)
Definition: pose_select.c:1266
void ARMATURE_OT_split(struct wmOperatorType *ot)
void ARMATURE_OT_fill(struct wmOperatorType *ot)
void POSE_OT_group_assign(struct wmOperatorType *ot)
Definition: pose_group.c:226
void POSE_OT_flip_names(struct wmOperatorType *ot)
Definition: pose_edit.c:530
void ARMATURE_OT_flip_names(struct wmOperatorType *ot)
void POSE_OT_select_grouped(struct wmOperatorType *ot)
Definition: pose_select.c:1157
void POSE_OT_select_linked_pick(struct wmOperatorType *ot)
Definition: pose_select.c:490
void ARMATURE_OT_dissolve(struct wmOperatorType *ot)
void POSE_OT_push_rest(struct wmOperatorType *ot)
Definition: pose_slide.c:1561
void armature_select_mirrored(struct bArmature *arm)
struct tPChanFCurveLink tPChanFCurveLink
void POSE_OT_visual_transform_apply(struct wmOperatorType *ot)
void ARMATURE_OT_click_extrude(struct wmOperatorType *ot)
Definition: armature_add.c:244
void ARMATURE_OT_align(struct wmOperatorType *ot)
void armature_select_mirrored_ex(struct bArmature *arm, int flag)
void poseAnim_mapping_autoKeyframe(struct bContext *C, struct Scene *scene, ListBase *pfLinks, float cframe)
Definition: pose_utils.c:248
void POSE_OT_paths_range_update(struct wmOperatorType *ot)
Definition: pose_edit.c:482
void ARMATURE_OT_roll_clear(struct wmOperatorType *ot)
void ARMATURE_OT_parent_clear(struct wmOperatorType *ot)
void ARMATURE_OT_select_linked_pick(struct wmOperatorType *ot)
void POSE_OT_select_all(struct wmOperatorType *ot)
Definition: pose_select.c:611
void POSE_OT_push(struct wmOperatorType *ot)
Definition: pose_slide.c:1448
struct Bone * ED_armature_pick_bone_from_selectbuffer(struct Base **bases, uint bases_len, const struct GPUSelectResult *buffer, short hits, bool findunsel, bool do_nearest, struct Base **r_base)
void POSELIB_OT_pose_move(struct wmOperatorType *ot)
Definition: pose_lib.c:812
void ARMATURE_OT_select_hierarchy(struct wmOperatorType *ot)
void POSE_OT_bone_layers(struct wmOperatorType *ot)
Definition: pose_edit.c:884
struct EditBone * duplicateEditBone(struct EditBone *cur_bone, const char *name, struct ListBase *editbones, struct Object *ob)
Definition: armature_add.c:919
void POSE_OT_blend_to_neighbors(struct wmOperatorType *ot)
Definition: pose_slide.c:1725
void poseAnim_mapping_get(struct bContext *C, ListBase *pfLinks)
Definition: pose_utils.c:130
void POSE_OT_propagate(struct wmOperatorType *ot)
Definition: pose_slide.c:2094
struct EditBone * make_boneList(struct ListBase *edbo, struct ListBase *bones, struct Bone *actBone)
struct EditBone * ED_armature_pick_ebone_from_selectbuffer(struct Base **bases, uint bases_len, const struct GPUSelectResult *buffer, short hits, bool findunsel, bool do_nearest, struct Base **r_base)
void POSE_OT_rotation_mode_set(struct wmOperatorType *ot)
Definition: pose_edit.c:640
void POSE_OT_user_transforms_clear(struct wmOperatorType *ot)
void POSELIB_OT_pose_remove(struct wmOperatorType *ot)
Definition: pose_lib.c:643
void POSELIB_OT_action_sanitize(struct wmOperatorType *ot)
Definition: pose_lib.c:357
struct bPoseChannel * ED_armature_pick_pchan_from_selectbuffer(struct Base **bases, uint bases_len, const struct GPUSelectResult *buffer, short hits, bool findunsel, bool do_nearest, struct Base **r_base)
void POSE_OT_paths_update(struct wmOperatorType *ot)
Definition: pose_edit.c:361
void ARMATURE_OT_armature_layers(struct wmOperatorType *ot)
Definition: pose_edit.c:795
void POSE_OT_breakdown(struct wmOperatorType *ot)
Definition: pose_slide.c:1675
void POSE_OT_select_constraint_target(struct wmOperatorType *ot)
Definition: pose_select.c:718
void ARMATURE_OT_bone_layers(struct wmOperatorType *ot)
Definition: pose_edit.c:960
void POSE_OT_select_parent(struct wmOperatorType *ot)
Definition: pose_select.c:658
void ARMATURE_OT_select_similar(struct wmOperatorType *ot)
void ARMATURE_OT_duplicate(struct wmOperatorType *ot)
void poseAnim_mapping_refresh(struct bContext *C, struct Scene *scene, struct Object *ob)
void armature_tag_select_mirrored(struct bArmature *arm)
void bone_free(struct bArmature *arm, struct EditBone *bone)
void POSE_OT_group_add(struct wmOperatorType *ot)
Definition: pose_group.c:76
void POSE_OT_transforms_clear(struct wmOperatorType *ot)
struct EditBone * ED_armature_pick_ebone(struct bContext *C, const int xy[2], bool findunsel, struct Base **r_base)
void POSE_OT_loc_clear(struct wmOperatorType *ot)
void ARMATURE_OT_autoside_names(struct wmOperatorType *ot)
void POSE_OT_group_select(struct wmOperatorType *ot)
Definition: pose_group.c:487
void POSELIB_OT_blend_pose_asset(struct wmOperatorType *ot)
Definition: pose_lib_2.c:580
void POSE_OT_paths_clear(struct wmOperatorType *ot)
Definition: pose_edit.c:439
void POSE_OT_armature_apply(struct wmOperatorType *ot)
void ARMATURE_OT_layers_show_all(struct wmOperatorType *ot)
Definition: pose_edit.c:723
void ARMATURE_OT_extrude(struct wmOperatorType *ot)
void POSE_OT_paste(struct wmOperatorType *ot)
struct Object * poseAnim_object_get(struct Object *ob_)
Definition: pose_utils.c:121
Scene scene
ccl_global float * buffer
SymEdge< T > * prev(const SymEdge< T > *se)
Definition: delaunay_2d.cc:105
char name[64]
Definition: BKE_armature.h:43
float tail[3]
Definition: BKE_armature.h:54
struct Bone * bone
Definition: BKE_armature.h:106
float head[3]
Definition: BKE_armature.h:53
int xy[2]
Definition: wm_draw.c:135
wmOperatorType * ot
Definition: wm_files.c:3479