[Bf-blender-cvs] CVS commit: blender/source/blender/blenkernel/intern library.c blender/source/blender/include BIF_interface.h BIF_resources.h BIF_toolbox.h BSE_headerbuttons.h interface.h blender/source/blender/src editobject.c editscreen.c editview.c header_info.c header_view3d.c interface.c toolbox.c
Ton Roosendaal
ton at blender.org
Sat Oct 25 02:08:12 CEST 2003
ton (Ton Roosendaal) 2003/10/25 02:08:12 CEST
Modified files:
blender/source/blender/blenkernel/intern library.c
blender/source/blender/include BIF_interface.h BIF_resources.h
BIF_toolbox.h
BSE_headerbuttons.h interface.h
blender/source/blender/src editobject.c editscreen.c
editview.c header_info.c
header_view3d.c interface.c
toolbox.c
Log:
First commit of a new toolbox system.
Aim was to find a simple & easy system, script alike, to add and configure
a toolbox system, so that others can experiment, but also of course Python.
Summary:
- spacebar calls it up. SHIFT+A still does old toolbox
- hold left or rightmouse for 0.4 second, and it pops up as well
this is experimental! Can be tweaked with Userdef var "ThresA"
- it is a little bit complete for Object mode only. Needs still work
at information desing/structure level
- the code works like an engine, interpreting structs like this:
static TBitem addmenu_curve[]= {
{ 0, "Bezier Curve", 0, NULL},
{ 0, "Bezier Circle", 1, NULL},
{ 0, "NURBS Curve", 2, NULL},
{ 0, "NURBS Circle", 3, NULL},
{ 0, "Path", 4, NULL},
{ -1, "", 0, do_info_add_curvemenu}};
- first value is ICON code,
- then name
- return value
- pointer to optional child
last row has -1 to indicate its the last...
plus a callback to event function.
I also built an old toolbox style callback for this:
static TBitem tb_object_select[]= {
{ 0, "Border Select|B", 'b', NULL},
{ 0, "(De)select All|A", 'a', NULL},
{ 0, "Linked...|Shift L", 'L', NULL},
{ 0, "Grouped...|Shift G", 'G', NULL},
{ -1, "", 0, tb_do_hotkey}};
here the return values are put back as hotkeys in mainqueue.
A mainloop can do all context switching, and build menus on the fly.
Meaning, it also allows other designs such as radials...
Revision Changes Path
1.5 +12 -8 blender/source/blender/blenkernel/intern/library.c
1.22 +14 -6 blender/source/blender/include/BIF_interface.h
1.16 +2 -1 blender/source/blender/include/BIF_resources.h
1.10 +3 -1 blender/source/blender/include/BIF_toolbox.h
1.9 +8 -1 blender/source/blender/include/BSE_headerbuttons.h
1.16 +3 -1 blender/source/blender/include/interface.h
1.31 +10 -3 blender/source/blender/src/editobject.c
1.44 +8 -6 blender/source/blender/src/editscreen.c
1.13 +17 -5 blender/source/blender/src/editview.c
1.10 +12 -7 blender/source/blender/src/header_info.c
1.15 +5 -5 blender/source/blender/src/header_view3d.c
1.78 +141 -111 blender/source/blender/src/interface.c
1.21 +324 -5 blender/source/blender/src/toolbox.c
More information about the Bf-blender-cvs
mailing list