diff options
author | Ton Roosendaal <ton@blender.org> | 2009-01-25 23:22:05 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-01-25 23:22:05 +0300 |
commit | 3c088f3434f7900d430b01d2e210a0aa529c93bc (patch) | |
tree | c5739218b7fafa62736389813f199edffb9996f0 /source/blender/editors/object/object_intern.h | |
parent | cfd93426002d20a29827503e195d8773d45bef23 (diff) |
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
Diffstat (limited to 'source/blender/editors/object/object_intern.h')
-rw-r--r-- | source/blender/editors/object/object_intern.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h index 27455fd8a50..9abc896198b 100644 --- a/source/blender/editors/object/object_intern.h +++ b/source/blender/editors/object/object_intern.h @@ -66,6 +66,11 @@ void OBJECT_OT_make_dupli_real(struct wmOperatorType *ot); void OBJECT_OT_object_add(struct wmOperatorType *ot); void OBJECT_OT_add_duplicate(struct wmOperatorType *ot); +void OBJECT_OT_mesh_add(struct wmOperatorType *ot); +void OBJECT_OT_curve_add(struct wmOperatorType *ot); + /* only used as menu */ +void OBJECT_OT_primitive_add(struct wmOperatorType *ot); + /* editlattice.c */ void free_editLatt(Object *ob); void make_editLatt(Object *obedit); |