2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2010-03-21 01:14:04 +00:00
|
|
|
* $Id$
|
2009-01-05 15:19:31 +00:00
|
|
|
*
|
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2009-01-05 15:19:31 +00:00
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2009 Blender Foundation.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Contributor(s): Blender Foundation
|
|
|
|
*
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
*/
|
2011-02-27 20:29:51 +00:00
|
|
|
|
|
|
|
/** \file blender/editors/armature/armature_intern.h
|
|
|
|
* \ingroup edarmature
|
|
|
|
*/
|
|
|
|
|
2009-01-05 15:19:31 +00:00
|
|
|
#ifndef ED_ARMATURE_INTERN_H
|
|
|
|
#define ED_ARMATURE_INTERN_H
|
|
|
|
|
|
|
|
/* internal exports only */
|
2009-02-01 19:53:24 +00:00
|
|
|
struct wmOperatorType;
|
2009-01-05 15:19:31 +00:00
|
|
|
|
2010-02-19 11:42:21 +00:00
|
|
|
struct bContext;
|
|
|
|
struct Scene;
|
|
|
|
struct Object;
|
|
|
|
struct bAction;
|
|
|
|
struct bPoseChannel;
|
|
|
|
|
|
|
|
struct bArmature;
|
|
|
|
struct EditBone;
|
|
|
|
|
|
|
|
struct ListBase;
|
|
|
|
struct LinkData;
|
|
|
|
|
|
|
|
/* ******************************************************* */
|
2009-03-17 21:44:58 +00:00
|
|
|
/* editarmature.c operators */
|
2009-02-18 02:13:36 +00:00
|
|
|
void ARMATURE_OT_bone_primitive_add(struct wmOperatorType *ot);
|
2009-07-21 10:18:08 +00:00
|
|
|
|
2009-07-25 05:11:28 +00:00
|
|
|
void ARMATURE_OT_align(struct wmOperatorType *ot);
|
2009-02-06 10:48:00 +00:00
|
|
|
void ARMATURE_OT_calculate_roll(struct wmOperatorType *ot);
|
2009-02-08 23:41:21 +00:00
|
|
|
void ARMATURE_OT_switch_direction(struct wmOperatorType *ot);
|
2009-07-21 10:18:08 +00:00
|
|
|
|
2010-10-15 03:24:47 +00:00
|
|
|
void ARMATURE_OT_subdivide(struct wmOperatorType *ot);
|
2009-07-21 10:18:08 +00:00
|
|
|
|
2009-02-10 06:12:35 +00:00
|
|
|
void ARMATURE_OT_parent_set(struct wmOperatorType *ot);
|
|
|
|
void ARMATURE_OT_parent_clear(struct wmOperatorType *ot);
|
2009-07-21 10:18:08 +00:00
|
|
|
|
2009-11-29 22:16:29 +00:00
|
|
|
void ARMATURE_OT_select_all(struct wmOperatorType *ot);
|
2009-07-08 21:31:28 +00:00
|
|
|
void ARMATURE_OT_select_inverse(struct wmOperatorType *ot);
|
2009-02-16 17:18:24 +00:00
|
|
|
void ARMATURE_OT_select_hierarchy(struct wmOperatorType *ot);
|
2009-03-29 02:15:13 +00:00
|
|
|
void ARMATURE_OT_select_linked(struct wmOperatorType *ot);
|
2009-07-21 10:18:08 +00:00
|
|
|
|
2009-03-29 02:15:13 +00:00
|
|
|
void ARMATURE_OT_delete(struct wmOperatorType *ot);
|
2009-07-25 05:11:28 +00:00
|
|
|
void ARMATURE_OT_duplicate(struct wmOperatorType *ot);
|
2009-02-25 13:48:39 +00:00
|
|
|
void ARMATURE_OT_extrude(struct wmOperatorType *ot);
|
2010-09-19 13:18:05 +00:00
|
|
|
void ARMATURE_OT_hide(struct wmOperatorType *ot);
|
|
|
|
void ARMATURE_OT_reveal(struct wmOperatorType *ot);
|
2009-02-25 13:48:39 +00:00
|
|
|
void ARMATURE_OT_click_extrude(struct wmOperatorType *ot);
|
2009-07-25 05:11:28 +00:00
|
|
|
void ARMATURE_OT_fill(struct wmOperatorType *ot);
|
|
|
|
void ARMATURE_OT_merge(struct wmOperatorType *ot);
|
|
|
|
void ARMATURE_OT_separate(struct wmOperatorType *ot);
|
2009-02-06 01:39:55 +00:00
|
|
|
|
2009-07-24 13:02:16 +00:00
|
|
|
void ARMATURE_OT_autoside_names(struct wmOperatorType *ot);
|
|
|
|
void ARMATURE_OT_flip_names(struct wmOperatorType *ot);
|
|
|
|
|
2011-01-11 21:12:48 +00:00
|
|
|
void ARMATURE_OT_layers_show_all(struct wmOperatorType *ot);
|
2009-07-26 11:01:56 +00:00
|
|
|
void ARMATURE_OT_armature_layers(struct wmOperatorType *ot);
|
|
|
|
void ARMATURE_OT_bone_layers(struct wmOperatorType *ot);
|
|
|
|
|
2009-07-21 10:18:08 +00:00
|
|
|
/* ******************************************************* */
|
|
|
|
/* Pose-Mode Operators */
|
2009-02-01 19:53:24 +00:00
|
|
|
void POSE_OT_hide(struct wmOperatorType *ot);
|
2009-02-12 03:48:56 +00:00
|
|
|
void POSE_OT_reveal(struct wmOperatorType *ot);
|
2009-07-21 10:18:08 +00:00
|
|
|
|
2010-02-19 15:34:26 +00:00
|
|
|
void POSE_OT_armature_apply(struct wmOperatorType *ot);
|
|
|
|
void POSE_OT_visual_transform_apply(struct wmOperatorType *ot);
|
2009-07-25 05:11:28 +00:00
|
|
|
|
2009-02-05 05:13:08 +00:00
|
|
|
void POSE_OT_rot_clear(struct wmOperatorType *ot);
|
|
|
|
void POSE_OT_loc_clear(struct wmOperatorType *ot);
|
|
|
|
void POSE_OT_scale_clear(struct wmOperatorType *ot);
|
2011-01-11 11:09:37 +00:00
|
|
|
void POSE_OT_transforms_clear(struct wmOperatorType *ot);
|
2009-07-21 10:18:08 +00:00
|
|
|
|
2009-07-21 13:12:40 +00:00
|
|
|
void POSE_OT_copy(struct wmOperatorType *ot);
|
|
|
|
void POSE_OT_paste(struct wmOperatorType *ot);
|
|
|
|
|
2009-11-29 22:16:29 +00:00
|
|
|
void POSE_OT_select_all(struct wmOperatorType *ot);
|
2009-07-08 21:31:28 +00:00
|
|
|
void POSE_OT_select_inverse(struct wmOperatorType *ot);
|
2009-02-11 16:17:34 +00:00
|
|
|
void POSE_OT_select_parent(struct wmOperatorType *ot);
|
2009-02-16 17:18:24 +00:00
|
|
|
void POSE_OT_select_hierarchy(struct wmOperatorType *ot);
|
2009-03-29 02:15:13 +00:00
|
|
|
void POSE_OT_select_linked(struct wmOperatorType *ot);
|
2009-07-08 15:34:41 +00:00
|
|
|
void POSE_OT_select_constraint_target(struct wmOperatorType *ot);
|
2010-01-25 10:16:36 +00:00
|
|
|
void POSE_OT_select_grouped(struct wmOperatorType *ot);
|
2011-02-23 04:58:08 +00:00
|
|
|
void POSE_OT_select_flip_active(struct wmOperatorType *ot);
|
2009-01-05 15:19:31 +00:00
|
|
|
|
2009-07-21 10:18:08 +00:00
|
|
|
void POSE_OT_group_add(struct wmOperatorType *ot);
|
|
|
|
void POSE_OT_group_remove(struct wmOperatorType *ot);
|
2011-07-07 04:31:53 +00:00
|
|
|
void POSE_OT_group_move(struct wmOperatorType *ot);
|
|
|
|
void POSE_OT_group_sort(struct wmOperatorType *ot);
|
2009-07-21 10:18:08 +00:00
|
|
|
void POSE_OT_group_assign(struct wmOperatorType *ot);
|
|
|
|
void POSE_OT_group_unassign(struct wmOperatorType *ot);
|
2010-07-14 03:19:19 +00:00
|
|
|
void POSE_OT_group_select(struct wmOperatorType *ot);
|
|
|
|
void POSE_OT_group_deselect(struct wmOperatorType *ot);
|
2009-07-21 10:18:08 +00:00
|
|
|
|
2009-07-24 13:02:16 +00:00
|
|
|
void POSE_OT_paths_calculate(struct wmOperatorType *ot);
|
|
|
|
void POSE_OT_paths_clear(struct wmOperatorType *ot);
|
|
|
|
|
|
|
|
void POSE_OT_autoside_names(struct wmOperatorType *ot);
|
|
|
|
void POSE_OT_flip_names(struct wmOperatorType *ot);
|
|
|
|
|
2010-01-25 10:16:36 +00:00
|
|
|
void POSE_OT_quaternions_flip(struct wmOperatorType *ot);
|
|
|
|
|
2009-07-26 11:01:56 +00:00
|
|
|
void POSE_OT_armature_layers(struct wmOperatorType *ot);
|
|
|
|
void POSE_OT_bone_layers(struct wmOperatorType *ot);
|
|
|
|
|
2009-07-21 10:18:08 +00:00
|
|
|
/* ******************************************************* */
|
|
|
|
/* Etch-A-Ton */
|
|
|
|
|
2009-03-22 00:30:18 +00:00
|
|
|
void SKETCH_OT_gesture(struct wmOperatorType *ot);
|
|
|
|
void SKETCH_OT_delete(struct wmOperatorType *ot);
|
|
|
|
void SKETCH_OT_draw_stroke(struct wmOperatorType *ot);
|
|
|
|
void SKETCH_OT_draw_preview(struct wmOperatorType *ot);
|
|
|
|
void SKETCH_OT_finish_stroke(struct wmOperatorType *ot);
|
|
|
|
void SKETCH_OT_cancel_stroke(struct wmOperatorType *ot);
|
2010-06-19 20:25:00 +00:00
|
|
|
void SKETCH_OT_convert(struct wmOperatorType *ot);
|
2009-03-22 00:30:18 +00:00
|
|
|
void SKETCH_OT_select(struct wmOperatorType *ot);
|
|
|
|
|
2010-02-19 11:42:21 +00:00
|
|
|
/* ******************************************************* */
|
|
|
|
/* Pose Tool Utilities (for PoseLib, Pose Sliding, etc.) */
|
|
|
|
/* poseUtils.c */
|
|
|
|
|
|
|
|
/* Temporary data linking PoseChannels with the F-Curves they affect */
|
|
|
|
typedef struct tPChanFCurveLink {
|
|
|
|
struct tPChanFCurveLink *next, *prev;
|
|
|
|
|
2011-03-13 12:22:57 +00:00
|
|
|
ListBase fcurves; /* F-Curves for this PoseChannel (wrapped with LinkData) */
|
|
|
|
struct bPoseChannel *pchan; /* Pose Channel which data is attached to */
|
2010-02-19 11:42:21 +00:00
|
|
|
|
2011-03-13 12:22:57 +00:00
|
|
|
char *pchan_path; /* RNA Path to this Pose Channel (needs to be freed when we're done) */
|
2010-02-19 11:42:21 +00:00
|
|
|
|
2011-03-13 12:22:57 +00:00
|
|
|
float oldloc[3]; /* transform values at start of operator (to be restored before each modal step) */
|
2010-02-19 11:42:21 +00:00
|
|
|
float oldrot[3];
|
|
|
|
float oldscale[3];
|
|
|
|
float oldquat[4];
|
2011-03-13 12:22:57 +00:00
|
|
|
float oldangle;
|
|
|
|
float oldaxis[3];
|
|
|
|
|
|
|
|
struct IDProperty *oldprops; /* copy of custom properties at start of operator (to be restored before each modal step) */
|
2010-02-19 11:42:21 +00:00
|
|
|
} tPChanFCurveLink;
|
|
|
|
|
|
|
|
/* ----------- */
|
|
|
|
|
|
|
|
void poseAnim_mapping_get(struct bContext *C, ListBase *pfLinks, struct Object *ob, struct bAction *act);
|
|
|
|
void poseAnim_mapping_free(ListBase *pfLinks);
|
|
|
|
|
|
|
|
void poseAnim_mapping_refresh(struct bContext *C, struct Scene *scene, struct Object *ob);
|
|
|
|
void poseAnim_mapping_reset(ListBase *pfLinks);
|
|
|
|
void poseAnim_mapping_autoKeyframe(struct bContext *C, struct Scene *scene, struct Object *ob, ListBase *pfLinks, float cframe);
|
|
|
|
|
|
|
|
LinkData *poseAnim_mapping_getNextFCurve(ListBase *fcuLinks, LinkData *prev, char *path);
|
|
|
|
|
2009-07-21 10:18:08 +00:00
|
|
|
/* ******************************************************* */
|
2009-04-15 03:22:22 +00:00
|
|
|
/* PoseLib */
|
2010-02-19 11:42:21 +00:00
|
|
|
/* poselib.c */
|
2009-09-19 00:18:42 +00:00
|
|
|
|
2011-02-16 00:17:22 +00:00
|
|
|
void POSELIB_OT_new(struct wmOperatorType *ot);
|
|
|
|
void POSELIB_OT_unlink(struct wmOperatorType *ot);
|
|
|
|
|
2011-02-16 11:28:25 +00:00
|
|
|
void POSELIB_OT_action_sanitise(struct wmOperatorType *ot);
|
|
|
|
|
2009-04-15 03:22:22 +00:00
|
|
|
void POSELIB_OT_pose_add(struct wmOperatorType *ot);
|
|
|
|
void POSELIB_OT_pose_remove(struct wmOperatorType *ot);
|
|
|
|
void POSELIB_OT_pose_rename(struct wmOperatorType *ot);
|
2011-02-16 00:17:22 +00:00
|
|
|
|
2009-04-15 12:04:10 +00:00
|
|
|
void POSELIB_OT_browse_interactive(struct wmOperatorType *ot);
|
2011-02-16 06:18:20 +00:00
|
|
|
void POSELIB_OT_apply_pose(struct wmOperatorType *ot);
|
2009-04-15 03:22:22 +00:00
|
|
|
|
2009-09-19 00:18:42 +00:00
|
|
|
/* ******************************************************* */
|
|
|
|
/* Pose Sliding Tools */
|
2010-02-19 11:42:21 +00:00
|
|
|
/* poseSlide.c */
|
2009-09-19 00:18:42 +00:00
|
|
|
|
|
|
|
void POSE_OT_push(struct wmOperatorType *ot);
|
|
|
|
void POSE_OT_relax(struct wmOperatorType *ot);
|
|
|
|
void POSE_OT_breakdown(struct wmOperatorType *ot);
|
2011-03-24 03:02:34 +00:00
|
|
|
|
|
|
|
void POSE_OT_propagate(struct wmOperatorType *ot);
|
2009-09-19 00:18:42 +00:00
|
|
|
|
2009-07-21 10:18:08 +00:00
|
|
|
/* ******************************************************* */
|
2009-03-17 21:44:58 +00:00
|
|
|
/* editarmature.c */
|
2009-03-20 18:00:51 +00:00
|
|
|
|
2009-11-09 21:03:54 +00:00
|
|
|
EditBone *make_boneList(struct ListBase *edbo, struct ListBase *bones, struct EditBone *parent, struct Bone *actBone);
|
2011-05-12 16:47:36 +00:00
|
|
|
void BIF_sk_selectStroke(struct bContext *C, const int mval[2], short extend);
|
2009-03-17 21:44:58 +00:00
|
|
|
|
|
|
|
/* duplicate method */
|
|
|
|
void preEditBoneDuplicate(struct ListBase *editbones);
|
|
|
|
struct EditBone *duplicateEditBone(struct EditBone *curBone, char *name, struct ListBase *editbones, struct Object *ob);
|
|
|
|
void updateDuplicateSubtarget(struct EditBone *dupBone, struct ListBase *editbones, struct Object *ob);
|
|
|
|
|
|
|
|
/* duplicate method (cross objects */
|
|
|
|
|
|
|
|
/* editbones is the target list */
|
|
|
|
struct EditBone *duplicateEditBoneObjects(struct EditBone *curBone, char *name, struct ListBase *editbones, struct Object *src_ob, struct Object *dst_ob);
|
|
|
|
|
|
|
|
/* editbones is the source list */
|
|
|
|
void updateDuplicateSubtargetObjects(struct EditBone *dupBone, struct ListBase *editbones, struct Object *src_ob, struct Object *dst_ob);
|
|
|
|
|
2009-01-05 15:19:31 +00:00
|
|
|
#endif /* ED_ARMATURE_INTERN_H */
|
|
|
|
|