Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-02-05 06:28:07 +0300
committerJoshua Leung <aligorith@gmail.com>2009-02-05 06:28:07 +0300
commitf89e3d251711f3617c982cae35f33d4c6115e72b (patch)
tree83b0399aba32a346ae448960f5153e26b2ebdabd /source/blender/blenkernel/BKE_context.h
parent61a6e1957a4a1555564f1eb8dbdb9707fb276826 (diff)
2.5 - Context API access for Bones (EditMode and PoseMode)
* Added selected, selected+editable, and active to access EditBones for Armature Operators to use. These take into account X-Axis Mirror too, so there is really no need to check that sort of thing anymore in tools. * Added a quick testing operator for verifying that these loops filter the data correctly. I've dumped this in armature_ops.c for now. It can be activated using the TKEY hotkey in Armature EditMode only. This should be removed once we have a few more functional tools. * Ported over cleaned up roll-calculation tools from AnimSys2 * Removed a few ugly stubs from posemode code
Diffstat (limited to 'source/blender/blenkernel/BKE_context.h')
-rw-r--r--source/blender/blenkernel/BKE_context.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h
index c489aba3326..5af97a7d8d5 100644
--- a/source/blender/blenkernel/BKE_context.h
+++ b/source/blender/blenkernel/BKE_context.h
@@ -51,6 +51,8 @@ struct StructRNA;
struct ToolSettings;
struct Image;
struct ImBuf;
+struct EditBone;
+struct bPoseChannel;
struct wmWindow;
struct wmWindowManager;
@@ -81,7 +83,14 @@ enum {
CTX_DATA_EDIT_IMAGE,
CTX_DATA_EDIT_IMAGE_BUFFER,
- CTX_DATA_SELECTED_NODES
+ CTX_DATA_SELECTED_NODES,
+
+ CTX_DATA_SELECTED_BONES,
+ CTX_DATA_SELECTED_EDITABLE_BONES,
+ CTX_DATA_SELECTED_PCHANS,
+
+ CTX_DATA_ACTIVE_BONE,
+ CTX_DATA_ACTIVE_PCHAN,
};
typedef int bContextDataMember;
@@ -185,6 +194,13 @@ struct ImBuf *CTX_data_edit_image_buffer(const bContext *C);
int CTX_data_selected_nodes(const bContext *C, ListBase *list);
+struct EditBone *CTX_data_active_bone(const bContext *C);
+int CTX_data_selected_bones(const bContext *C, ListBase *list);
+int CTX_data_selected_editable_bones(const bContext *C, ListBase *list);
+
+struct bPoseChannel *CTX_data_active_pchan(const bContext *C);
+int CTX_data_selected_pchans(const bContext *C, ListBase *list);
+
/* Data Evaluation Context */
float CTX_eval_frame(const bContext *C);