diff options
author | Joshua Leung <aligorith@gmail.com> | 2013-02-28 03:34:29 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2013-02-28 03:34:29 +0400 |
commit | 28a84a2c3a204bfab21541df0d6a78d718248f42 (patch) | |
tree | 1829518e5a0952bb8e52e7380007ed906992290d /source/blender/editors/armature/armature_intern.h | |
parent | 07cd75d7b04836e6d4b19f35f79c9c1283458aaa (diff) |
Code Maintenance - Splitting up Armature/Pose Editing Files
This commit splits editarmature.c and poseobject.c into several files, such that
certain types of functionality are (mostly) self-contained within particular
files (instead of being mixed in with other functionality in a large file).
In particular, this was done so that:
1) Armature EditMode tools are now in the armature_*.c files only, and Pose Mode
tools in pose_*.c files only.
- In one or two cases, this hasn't been possible as the two modes rely on
much of the same shared infrastructure.
2) The "clear loc/rot/scale" operators and pose show/hide are no longer housed
in editarmature.c
3) Selection operators, Transform operators, structural (add/delete) operators,
and supporting utilities for the modes (enter/exit/roll-calculations) are not
all interleaved in an ad-hoc manner
Notes:
* I've tried to ensure that the history of the new files has been maintained by
doing
svn copy {editarmature.c/poseobject.c} {armature_*.c/pose_*.c}
Unfortunately, this means that the diffs are a bit messy.
* There should be no functional/logic changes here. Just code moving around and
cosmetic comment tweaks where needed.
* #includes have largely been untouched for now, but could be cleaned up later
* CMake changes untested, but should work in theory.
Diffstat (limited to 'source/blender/editors/armature/armature_intern.h')
-rw-r--r-- | source/blender/editors/armature/armature_intern.h | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/source/blender/editors/armature/armature_intern.h b/source/blender/editors/armature/armature_intern.h index ddf66a6169b..02ebbe9d1ec 100644 --- a/source/blender/editors/armature/armature_intern.h +++ b/source/blender/editors/armature/armature_intern.h @@ -37,17 +37,19 @@ struct wmOperatorType; struct bContext; struct Scene; struct Object; +struct Base; struct bAction; struct bPoseChannel; struct bArmature; struct EditBone; +struct Bone; struct ListBase; struct LinkData; /* ******************************************************* */ -/* editarmature.c operators */ +/* Armature EditMode Operators */ void ARMATURE_OT_bone_primitive_add(struct wmOperatorType *ot); void ARMATURE_OT_align(struct wmOperatorType *ot); @@ -131,7 +133,7 @@ void POSE_OT_armature_layers(struct wmOperatorType *ot); void POSE_OT_bone_layers(struct wmOperatorType *ot); /* ******************************************************* */ -/* Etch-A-Ton */ +/* Etch-A-Ton (Skeleton Sketching) Operators */ void SKETCH_OT_gesture(struct wmOperatorType *ot); void SKETCH_OT_delete(struct wmOperatorType *ot); @@ -203,7 +205,11 @@ void POSE_OT_breakdown(struct wmOperatorType *ot); void POSE_OT_propagate(struct wmOperatorType *ot); /* ******************************************************* */ -/* editarmature.c */ +/* Various Armature Edit/Pose Editing API's */ + +/* Ideally, many of these defines would not be needed as everything would be strictly self-contained + * within each file, but some tools still have a bit of overlap which makes things messy -- Feb 2013 + */ EditBone *make_boneList(struct ListBase *edbo, struct ListBase *bones, struct EditBone *parent, struct Bone *actBone); void BIF_sk_selectStroke(struct bContext *C, const int mval[2], short extend); @@ -213,13 +219,29 @@ void preEditBoneDuplicate(struct ListBase *editbones); struct EditBone *duplicateEditBone(struct EditBone *curBone, const char *name, struct ListBase *editbones, struct Object *ob); void updateDuplicateSubtarget(struct EditBone *dupBone, struct ListBase *editbones, struct Object *ob); -/* duplicate method (cross objects */ - +/* duplicate method (cross objects) */ /* editbones is the target list */ struct EditBone *duplicateEditBoneObjects(struct EditBone *curBone, const 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); + +EditBone *editbone_name_exists(struct ListBase *edbo, const char *name); + +EditBone *add_points_bone(struct Object *obedit, float head[3], float tail[3]); +void bone_free(struct bArmature *arm, struct EditBone *bone); + +void armature_tag_select_mirrored(struct bArmature *arm); +void armature_select_mirrored(struct bArmature *arm); +void armature_tag_unselect(struct bArmature *arm); + +void *get_nearest_bone(struct bContext *C, short findunsel, int x, int y); +void *get_bone_from_selectbuffer(struct Scene *scene, struct Base *base, unsigned int *buffer, short hits, short findunsel); + +int bone_looper(struct Object *ob, struct Bone *bone, void *data, + int (*bone_func)(struct Object *, struct Bone *, void *)); + + #endif /* __ARMATURE_INTERN_H__ */ |