Blender Git Loki
Git Commits -> Revision 3c088f3
Revision 3c088f3 by Ton Roosendaal (master) January 25, 2009, 20:22 (GMT) |
2.5 Simple toolbox-style menu system. Brecht will review it though, and/or check on way to use it for menus. I tried to avoid uiBlock and rna stuff all over. :) Quick image test: http://www.blender.org/bf/rt.jpg Examples you can read in: - editors/screen/screen_ops.c:testing123() (press F5) - editors/object/object_edit.c:object_add_primitive_invoke() (press SHIFT+A) Concept is simple: uiMenuBegin(): returns a handle. uiMenuEnd(): puts it all to work. In between you can add items like: uiMenuItemVal(): a name, icon, retval (use uiMenuFunc()) uiMenuItemO(): an operator + icon uiMenuItemEnumO(): an operator, property name, value Sublevels go easy too: uiMenuLevel(): creates item for sublevel, with function pointer. Inside that function you can use all menu calls again. Levels can go as deep you want. uiMenuLevelEnumO(): creates operator sublevel for an enum |
Commit Details:
Full Hash: 3c088f3434f7900d430b01d2e210a0aa529c93bc
SVN Revision: 18672
Parent Commit: cfd9342
Lines Changed: +677, -23
10 Modified Paths:
/source/blender/blenkernel/intern/screen.c (+3, -2) (Diff)
/source/blender/editors/include/UI_interface.h (+17, -0) (Diff)
/source/blender/editors/interface/interface.c (+2, -1) (Diff)
/source/blender/editors/interface/interface_handlers.c (+4, -4) (Diff)
/source/blender/editors/interface/interface_regions.c (+431, -0) (Diff)
/source/blender/editors/mesh/mesh_ops.c (+1, -12) (Diff)
/source/blender/editors/object/object_edit.c (+169, -0) (Diff)
/source/blender/editors/object/object_intern.h (+5, -0) (Diff)
/source/blender/editors/object/object_ops.c (+6, -2) (Diff)
/source/blender/editors/screen/screen_ops.c (+39, -2) (Diff)
/source/blender/editors/include/UI_interface.h (+17, -0) (Diff)
/source/blender/editors/interface/interface.c (+2, -1) (Diff)
/source/blender/editors/interface/interface_handlers.c (+4, -4) (Diff)
/source/blender/editors/interface/interface_regions.c (+431, -0) (Diff)
/source/blender/editors/mesh/mesh_ops.c (+1, -12) (Diff)
/source/blender/editors/object/object_edit.c (+169, -0) (Diff)
/source/blender/editors/object/object_intern.h (+5, -0) (Diff)
/source/blender/editors/object/object_ops.c (+6, -2) (Diff)
/source/blender/editors/screen/screen_ops.c (+39, -2) (Diff)