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:
authorCampbell Barton <ideasman42@gmail.com>2009-11-02 19:39:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-11-02 19:39:45 +0300
commit8557f617f0ce5a299b75998ef8b3f9d76e493329 (patch)
tree825b1a89970de3be546c814d569584b1e5e1019b /source/blender/editors/armature
parent1d9f90ed42ba61d615dd0188e39cc12f0b71493f (diff)
Pose bone menu (Ctrl+G) wasnt working, replace with a reference to python menu.
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/armature_intern.h1
-rw-r--r--source/blender/editors/armature/armature_ops.c4
-rw-r--r--source/blender/editors/armature/poseobject.c48
3 files changed, 2 insertions, 51 deletions
diff --git a/source/blender/editors/armature/armature_intern.h b/source/blender/editors/armature/armature_intern.h
index 6f5a5f44d87..d31a3bda332 100644
--- a/source/blender/editors/armature/armature_intern.h
+++ b/source/blender/editors/armature/armature_intern.h
@@ -87,7 +87,6 @@ void POSE_OT_select_hierarchy(struct wmOperatorType *ot);
void POSE_OT_select_linked(struct wmOperatorType *ot);
void POSE_OT_select_constraint_target(struct wmOperatorType *ot);
-void POSE_OT_groups_menu(struct wmOperatorType *ot);
void POSE_OT_group_add(struct wmOperatorType *ot);
void POSE_OT_group_remove(struct wmOperatorType *ot);
void POSE_OT_group_remove(struct wmOperatorType *ot);
diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c
index cc359deca07..159effe0960 100644
--- a/source/blender/editors/armature/armature_ops.c
+++ b/source/blender/editors/armature/armature_ops.c
@@ -128,7 +128,6 @@ void ED_operatortypes_armature(void)
WM_operatortype_append(POSE_OT_select_linked);
WM_operatortype_append(POSE_OT_select_constraint_target);
- WM_operatortype_append(POSE_OT_groups_menu);
WM_operatortype_append(POSE_OT_group_add);
WM_operatortype_append(POSE_OT_group_remove);
WM_operatortype_append(POSE_OT_group_assign);
@@ -312,7 +311,8 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "POSE_OT_ik_add", IKEY, KM_PRESS, /*KM_CTRL|*/KM_SHIFT, 0);
WM_keymap_add_item(keymap, "POSE_OT_ik_clear", IKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
- WM_keymap_add_item(keymap, "POSE_OT_groups_menu", GKEY, KM_PRESS, KM_CTRL, 0);
+ kmi= WM_keymap_add_item(keymap, "WM_OT_call_menu", GKEY, KM_PRESS, KM_CTRL, 0);
+ RNA_string_set(kmi->ptr, "name", "VIEW3D_MT_pose_group");
/* set flags */
kmi= WM_keymap_add_item(keymap, "POSE_OT_flags_set", WKEY, KM_PRESS, KM_SHIFT, 0);
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index 331bd6fa28f..f04aaafb97f 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -1438,54 +1438,6 @@ void POSE_OT_group_unassign (wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
-/* ----------------- */
-
-static int pose_groupOps_menu_invoke (bContext *C, wmOperator *op, wmEvent *evt)
-{
- Object *ob= CTX_data_active_object(C);
- uiPopupMenu *pup= uiPupMenuBegin(C, op->type->name, 0);
- uiLayout *layout= uiPupMenuLayout(pup);
-
- /* sanity check - must have object with pose */
- if ELEM(NULL, ob, ob->pose)
- return OPERATOR_CANCELLED;
-
- /* get mode of action */
- if (CTX_DATA_COUNT(C, selected_pchans)) {
- /* if selected bone(s), include options to add/remove to active group */
- uiItemO(layout, "Add Selected to Active Group", 0, "POSE_OT_group_assign");
-
- uiItemS(layout);
-
- uiItemO(layout, "Remove Selected from All Groups", 0, "POSE_OT_group_unassign");
- uiItemO(layout, "Remove Active Group", 0, "POSE_OT_group_remove");
- }
- else {
- /* no selected bones - so just options for groups management */
- uiItemO(layout, "Add New Group", 0, "POSE_OT_group_add");
- uiItemO(layout, "Remove Active Group", 0, "POSE_OT_group_remove");
- }
-
- return OPERATOR_CANCELLED;
-}
-
-void POSE_OT_groups_menu (wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Bone Group Tools";
- ot->idname= "POSE_OT_groups_menu";
- ot->description= "Menu displaying available tools for Bone Groups.";
-
- /* api callbacks (only invoke needed) */
- ot->invoke= pose_groupOps_menu_invoke;
- ot->poll= ED_operator_posemode;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER;
-}
-
-/* ********************************************** */
-
static short pose_select_same_group (Object *ob)
{
bPose *pose= (ob)? ob->pose : NULL;