From af02a0aa4e0b80c3c1154e7be095f4a387f81179 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 22 Apr 2009 18:39:44 +0000 Subject: 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. --- source/blender/editors/physics/editparticle.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'source/blender/editors/physics') diff --git a/source/blender/editors/physics/editparticle.c b/source/blender/editors/physics/editparticle.c index 96f3ad2f8df..0d58a0bfdcd 100644 --- a/source/blender/editors/physics/editparticle.c +++ b/source/blender/editors/physics/editparticle.c @@ -3839,19 +3839,21 @@ void PE_change_act_psys(Scene *scene, Object *ob, ParticleSystem *psys) static int specials_menu_invoke(bContext *C, wmOperator *op, wmEvent *event) { Scene *scene= CTX_data_scene(C); - uiMenuItem *head; + uiPopupMenu *pup; + uiLayout *layout; - head= uiPupMenuBegin("Specials", 0); + pup= uiPupMenuBegin("Specials", 0); + layout= uiPupMenuLayout(pup); - uiMenuItemO(head, 0, "PARTICLE_OT_rekey"); + uiItemO(layout, NULL, 0, "PARTICLE_OT_rekey"); if(scene->selectmode & SCE_SELECT_POINT) { - uiMenuItemO(head, 0, "PARTICLE_OT_subdivide"); - uiMenuItemO(head, 0, "PARTICLE_OT_select_first"); - uiMenuItemO(head, 0, "PARTICLE_OT_select_last"); + uiItemO(layout, NULL, 0, "PARTICLE_OT_subdivide"); + uiItemO(layout, NULL, 0, "PARTICLE_OT_select_first"); + uiItemO(layout, NULL, 0, "PARTICLE_OT_select_last"); } - uiMenuItemO(head, 0, "PARTICLE_OT_remove_doubles"); + uiItemO(layout, NULL, 0, "PARTICLE_OT_remove_doubles"); - uiPupMenuEnd(C, head); + uiPupMenuEnd(C, pup); return OPERATOR_CANCELLED; } -- cgit v1.2.3