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