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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-04-22 22:39:44 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-04-22 22:39:44 +0400
commitaf02a0aa4e0b80c3c1154e7be095f4a387f81179 (patch)
tree3f714e683c96929cc4e44962570860ab0f635bc9 /source/blender/editors/armature/editarmature.c
parent643d59bb9bf3bdd46f41a0b8c79384146629f9c8 (diff)
UI
* Headers and menus can now be created in python. * Replaced the uiMenuItem functions to create menus with equivalent uiItem functions using a layout, removing duplicated code. * More uiItem functions are now exposed to python. * The text editor header, panels and one of its menus are now created in space_text.py. * Buttons window data context icon new changes depending on active object. Issues * Icons are not wrapped yet, hardcoded ints at the moment. * The ID browse template is unfinished.
Diffstat (limited to 'source/blender/editors/armature/editarmature.c')
-rw-r--r--source/blender/editors/armature/editarmature.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 80f51f3797c..ca0694a7ece 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -3460,11 +3460,13 @@ void ARMATURE_OT_subdivide_multi(wmOperatorType *ot)
static int armature_subdivs_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- uiMenuItem *head;
+ uiPopupMenu *pup;
+ uiLayout *layout;
- head= uiPupMenuBegin("Subdivision Type", 0);
- uiMenuItemsEnumO(head, "ARMATURE_OT_subdivs", "type");
- uiPupMenuEnd(C, head);
+ pup= uiPupMenuBegin("Subdivision Type", 0);
+ layout= uiPupMenuLayout(pup);
+ uiItemsEnumO(layout, "ARMATURE_OT_subdivs", "type");
+ uiPupMenuEnd(C, pup);
return OPERATOR_CANCELLED;
}
@@ -3744,7 +3746,8 @@ static int armature_parent_set_exec(bContext *C, wmOperator *op)
static int armature_parent_set_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
EditBone *actbone = CTX_data_active_bone(C);
- uiMenuItem *head= uiPupMenuBegin("Make Parent ", 0);
+ uiPopupMenu *pup= uiPupMenuBegin("Make Parent ", 0);
+ uiLayout *layout= uiPupMenuLayout(pup);
int allchildbones = 0;
CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones) {
@@ -3754,13 +3757,13 @@ static int armature_parent_set_invoke(bContext *C, wmOperator *op, wmEvent *even
}
CTX_DATA_END;
- uiMenuItemEnumO(head, "", 0, "ARMATURE_OT_parent_set", "type", ARM_PAR_CONNECT);
+ uiItemEnumO(layout, NULL, 0, "ARMATURE_OT_parent_set", "type", ARM_PAR_CONNECT);
/* ob becomes parent, make the associated menus */
if (allchildbones)
- uiMenuItemEnumO(head, "", 0, "ARMATURE_OT_parent_set", "type", ARM_PAR_OFFSET);
+ uiItemEnumO(layout, NULL, 0, "ARMATURE_OT_parent_set", "type", ARM_PAR_OFFSET);
- uiPupMenuEnd(C, head);
+ uiPupMenuEnd(C, pup);
return OPERATOR_CANCELLED;
}