Blender V2.61 - r43446

armature_intern.h

Go to the documentation of this file.
00001 /*
00002  * ***** BEGIN GPL LICENSE BLOCK *****
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version. 
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  *
00018  * The Original Code is Copyright (C) 2009 Blender Foundation.
00019  * All rights reserved.
00020  *
00021  * 
00022  * Contributor(s): Blender Foundation
00023  *
00024  * ***** END GPL LICENSE BLOCK *****
00025  */
00026 
00031 #ifndef ED_ARMATURE_INTERN_H
00032 #define ED_ARMATURE_INTERN_H
00033 
00034 /* internal exports only */
00035 struct wmOperatorType;
00036 
00037 struct bContext;
00038 struct Scene;
00039 struct Object;
00040 struct bAction;
00041 struct bPoseChannel;
00042 
00043 struct bArmature;
00044 struct EditBone;
00045 
00046 struct ListBase;
00047 struct LinkData;
00048 
00049 /* ******************************************************* */
00050 /* editarmature.c operators */
00051 void ARMATURE_OT_bone_primitive_add(struct wmOperatorType *ot);
00052 
00053 void ARMATURE_OT_align(struct wmOperatorType *ot);
00054 void ARMATURE_OT_calculate_roll(struct wmOperatorType *ot);
00055 void ARMATURE_OT_switch_direction(struct wmOperatorType *ot);
00056 
00057 void ARMATURE_OT_subdivide(struct wmOperatorType *ot);
00058 
00059 void ARMATURE_OT_parent_set(struct wmOperatorType *ot);
00060 void ARMATURE_OT_parent_clear(struct wmOperatorType *ot);
00061 
00062 void ARMATURE_OT_select_all(struct wmOperatorType *ot);
00063 void ARMATURE_OT_select_inverse(struct wmOperatorType *ot);
00064 void ARMATURE_OT_select_hierarchy(struct wmOperatorType *ot);
00065 void ARMATURE_OT_select_linked(struct wmOperatorType *ot);
00066 
00067 void ARMATURE_OT_delete(struct wmOperatorType *ot);
00068 void ARMATURE_OT_duplicate(struct wmOperatorType *ot);
00069 void ARMATURE_OT_extrude(struct wmOperatorType *ot);
00070 void ARMATURE_OT_hide(struct wmOperatorType *ot);
00071 void ARMATURE_OT_reveal(struct wmOperatorType *ot);
00072 void ARMATURE_OT_click_extrude(struct wmOperatorType *ot);
00073 void ARMATURE_OT_fill(struct wmOperatorType *ot);
00074 void ARMATURE_OT_merge(struct wmOperatorType *ot);
00075 void ARMATURE_OT_separate(struct wmOperatorType *ot);
00076 
00077 void ARMATURE_OT_autoside_names(struct wmOperatorType *ot);
00078 void ARMATURE_OT_flip_names(struct wmOperatorType *ot);
00079 
00080 void ARMATURE_OT_layers_show_all(struct wmOperatorType *ot);
00081 void ARMATURE_OT_armature_layers(struct wmOperatorType *ot);
00082 void ARMATURE_OT_bone_layers(struct wmOperatorType *ot);
00083 
00084 /* ******************************************************* */
00085 /* Pose-Mode Operators */
00086 void POSE_OT_hide(struct wmOperatorType *ot);
00087 void POSE_OT_reveal(struct wmOperatorType *ot);
00088 
00089 void POSE_OT_armature_apply(struct wmOperatorType *ot);
00090 void POSE_OT_visual_transform_apply(struct wmOperatorType *ot);
00091 
00092 void POSE_OT_rot_clear(struct wmOperatorType *ot);
00093 void POSE_OT_loc_clear(struct wmOperatorType *ot);
00094 void POSE_OT_scale_clear(struct wmOperatorType *ot);
00095 void POSE_OT_transforms_clear(struct wmOperatorType *ot);
00096 void POSE_OT_user_transforms_clear(struct wmOperatorType *ot);
00097 
00098 void POSE_OT_copy(struct wmOperatorType *ot);
00099 void POSE_OT_paste(struct wmOperatorType *ot);
00100 
00101 void POSE_OT_select_all(struct wmOperatorType *ot);
00102 void POSE_OT_select_parent(struct wmOperatorType *ot);
00103 void POSE_OT_select_hierarchy(struct wmOperatorType *ot);
00104 void POSE_OT_select_linked(struct wmOperatorType *ot);
00105 void POSE_OT_select_constraint_target(struct wmOperatorType *ot);
00106 void POSE_OT_select_grouped(struct wmOperatorType *ot);
00107 void POSE_OT_select_flip_active(struct wmOperatorType *ot);
00108 
00109 void POSE_OT_group_add(struct wmOperatorType *ot);
00110 void POSE_OT_group_remove(struct wmOperatorType *ot);
00111 void POSE_OT_group_move(struct wmOperatorType *ot);
00112 void POSE_OT_group_sort(struct wmOperatorType *ot);
00113 void POSE_OT_group_assign(struct wmOperatorType *ot);
00114 void POSE_OT_group_unassign(struct wmOperatorType *ot);
00115 void POSE_OT_group_select(struct wmOperatorType *ot);
00116 void POSE_OT_group_deselect(struct wmOperatorType *ot);
00117 
00118 void POSE_OT_paths_calculate(struct wmOperatorType *ot);
00119 void POSE_OT_paths_clear(struct wmOperatorType *ot);
00120 
00121 void POSE_OT_autoside_names(struct wmOperatorType *ot);
00122 void POSE_OT_flip_names(struct wmOperatorType *ot);
00123 
00124 void POSE_OT_rotation_mode_set(struct wmOperatorType *ot);
00125 
00126 void POSE_OT_quaternions_flip(struct wmOperatorType *ot);
00127 
00128 void POSE_OT_armature_layers(struct wmOperatorType *ot);
00129 void POSE_OT_bone_layers(struct wmOperatorType *ot);
00130 
00131 /* ******************************************************* */
00132 /* Etch-A-Ton */
00133 
00134 void SKETCH_OT_gesture(struct wmOperatorType *ot);
00135 void SKETCH_OT_delete(struct wmOperatorType *ot);
00136 void SKETCH_OT_draw_stroke(struct wmOperatorType *ot);
00137 void SKETCH_OT_draw_preview(struct wmOperatorType *ot);
00138 void SKETCH_OT_finish_stroke(struct wmOperatorType *ot);
00139 void SKETCH_OT_cancel_stroke(struct wmOperatorType *ot);
00140 void SKETCH_OT_convert(struct wmOperatorType *ot);
00141 void SKETCH_OT_select(struct wmOperatorType *ot);
00142 
00143 /* ******************************************************* */
00144 /* Pose Tool Utilities (for PoseLib, Pose Sliding, etc.) */
00145 /* poseUtils.c */
00146 
00147 /* Temporary data linking PoseChannels with the F-Curves they affect */
00148 typedef struct tPChanFCurveLink {
00149     struct tPChanFCurveLink *next, *prev;
00150     
00151     ListBase fcurves;               /* F-Curves for this PoseChannel (wrapped with LinkData) */
00152     struct bPoseChannel *pchan;     /* Pose Channel which data is attached to */
00153     
00154     char *pchan_path;               /* RNA Path to this Pose Channel (needs to be freed when we're done) */
00155     
00156     float oldloc[3];                /* transform values at start of operator (to be restored before each modal step) */
00157     float oldrot[3];
00158     float oldscale[3];
00159     float oldquat[4];
00160     float oldangle;
00161     float oldaxis[3];
00162     
00163     struct IDProperty *oldprops;    /* copy of custom properties at start of operator (to be restored before each modal step) */    
00164 } tPChanFCurveLink;
00165 
00166 /* ----------- */
00167 
00168 void poseAnim_mapping_get(struct bContext *C, ListBase *pfLinks, struct Object *ob, struct bAction *act);
00169 void poseAnim_mapping_free(ListBase *pfLinks);
00170 
00171 void poseAnim_mapping_refresh(struct bContext *C, struct Scene *scene, struct Object *ob);
00172 void poseAnim_mapping_reset(ListBase *pfLinks);
00173 void poseAnim_mapping_autoKeyframe(struct bContext *C, struct Scene *scene, struct Object *ob, ListBase *pfLinks, float cframe);
00174 
00175 LinkData *poseAnim_mapping_getNextFCurve(ListBase *fcuLinks, LinkData *prev, const char *path);
00176 
00177 /* ******************************************************* */
00178 /* PoseLib */
00179 /* poselib.c */
00180 
00181 void POSELIB_OT_new(struct wmOperatorType *ot);
00182 void POSELIB_OT_unlink(struct wmOperatorType *ot);
00183 
00184 void POSELIB_OT_action_sanitise(struct wmOperatorType *ot);
00185 
00186 void POSELIB_OT_pose_add(struct wmOperatorType *ot);
00187 void POSELIB_OT_pose_remove(struct wmOperatorType *ot);
00188 void POSELIB_OT_pose_rename(struct wmOperatorType *ot);
00189 
00190 void POSELIB_OT_browse_interactive(struct wmOperatorType *ot);
00191 void POSELIB_OT_apply_pose(struct wmOperatorType *ot);
00192 
00193 /* ******************************************************* */
00194 /* Pose Sliding Tools */
00195 /* poseSlide.c */
00196 
00197 void POSE_OT_push(struct wmOperatorType *ot);
00198 void POSE_OT_relax(struct wmOperatorType *ot);
00199 void POSE_OT_breakdown(struct wmOperatorType *ot);
00200 
00201 void POSE_OT_propagate(struct wmOperatorType *ot);
00202 
00203 /* ******************************************************* */
00204 /* editarmature.c */
00205 
00206 EditBone *make_boneList(struct ListBase *edbo, struct ListBase *bones, struct EditBone *parent, struct Bone *actBone);
00207 void BIF_sk_selectStroke(struct bContext *C, const int mval[2], short extend);
00208 
00209 /* duplicate method */
00210 void preEditBoneDuplicate(struct ListBase *editbones);
00211 struct EditBone *duplicateEditBone(struct EditBone *curBone, const char *name, struct ListBase *editbones, struct Object *ob);
00212 void updateDuplicateSubtarget(struct EditBone *dupBone, struct ListBase *editbones, struct Object *ob);
00213 
00214 /* duplicate method (cross objects */
00215 
00216 /* editbones is the target list */
00217 struct EditBone *duplicateEditBoneObjects(struct EditBone *curBone, const char *name, struct ListBase *editbones, struct Object *src_ob, struct Object *dst_ob);
00218 
00219 /* editbones is the source list */
00220 void updateDuplicateSubtargetObjects(struct EditBone *dupBone, struct ListBase *editbones, struct Object *src_ob, struct Object *dst_ob);
00221 
00222 #endif /* ED_ARMATURE_INTERN_H */
00223