diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-04-22 22:39:44 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-04-22 22:39:44 +0400 |
commit | af02a0aa4e0b80c3c1154e7be095f4a387f81179 (patch) | |
tree | 3f714e683c96929cc4e44962570860ab0f635bc9 /source/blender/editors/uvedit | |
parent | 643d59bb9bf3bdd46f41a0b8c79384146629f9c8 (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/uvedit')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_unwrap_ops.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 4d12700d98c..be571c132ab 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -1284,18 +1284,22 @@ void UV_OT_cube_project(wmOperatorType *ot) static int mapping_menu_invoke(bContext *C, wmOperator *op, wmEvent *event) { - uiMenuItem *head; - - head= uiPupMenuBegin("UV Mapping", 0); - uiMenuItemO(head, 0, "UV_OT_unwrap"); - uiMenuSeparator(head); - uiMenuItemO(head, 0, "UV_OT_cube_project"); - uiMenuItemO(head, 0, "UV_OT_cylinder_project"); - uiMenuItemO(head, 0, "UV_OT_sphere_project"); - uiMenuItemO(head, 0, "UV_OT_project_from_view"); - uiMenuSeparator(head); - uiMenuItemO(head, 0, "UV_OT_reset"); - uiPupMenuEnd(C, head); + uiPopupMenu *pup; + uiLayout *layout; + + pup= uiPupMenuBegin("UV Mapping", 0); + layout= uiPupMenuLayout(pup); + + uiItemO(layout, NULL, 0, "UV_OT_unwrap"); + uiItemS(layout); + uiItemO(layout, NULL, 0, "UV_OT_cube_project"); + uiItemO(layout, NULL, 0, "UV_OT_cylinder_project"); + uiItemO(layout, NULL, 0, "UV_OT_sphere_project"); + uiItemO(layout, NULL, 0, "UV_OT_project_from_view"); + uiItemS(layout); + uiItemO(layout, NULL, 0, "UV_OT_reset"); + + uiPupMenuEnd(C, pup); /* XXX python */ #ifndef DISABLE_PYTHON |