diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-05-21 19:34:09 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-05-21 19:34:09 +0400 |
commit | 94902dac977cfc089e9740782a19c6ab370cdc03 (patch) | |
tree | bf715f3e99859913a741dd37e3338a6f5cfe7eb6 /source/blender/editors/interface/interface.c | |
parent | 65143c50e0cbbd111c5fa01f54d0177d1a50704f (diff) |
2.5 UI: Modifier Template
* template_modifier creates the modifier box, and returns a layout
to put the buttons in.
* Only the armature modifier is now done with python code, all other
modifiers use C code. To convert a modifier to python, remove the
corresponding C code and create a function in DATA_PT_modifiers.
* Some modifiers still require some RNA work to get it working well,
especially to make pointers editable. Mostly that is a matter of
defining an own _set callback and put some of the modifier C code
into it.
* Still various buttons that don't work, like for hooks or mesh
deform binding.
* Fix for crashing decimate modifier (still disabled).
* Removed UI_BUT_NO_HILITE, HMENU.
* Make uiLayoutBox work with align.
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r-- | source/blender/editors/interface/interface.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index b4c2969c955..3ec91975a91 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1987,7 +1987,7 @@ void uiBlockEndAlign(uiBlock *block) int ui_but_can_align(uiBut *but) { - return !ELEM(but->type, LABEL, ROUNDBOX); + return (but->type != LABEL); } static void ui_block_do_align_but(uiBlock *block, uiBut *first, int nr) @@ -2221,8 +2221,6 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short } but->flag |= (block->flag & UI_BUT_ALIGN); - if(block->flag & UI_BLOCK_NO_HILITE) - but->flag |= UI_NO_HILITE; if (but->lock) { if (but->lockstr) { @@ -2230,12 +2228,7 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short } } - if(but->type == ROUNDBOX) { - but->flag |= UI_NO_HILITE; - BLI_addhead(&block->buttons, but); - } - else - BLI_addtail(&block->buttons, but); + BLI_addtail(&block->buttons, but); if(block->curlayout) ui_layout_add_but(block->curlayout, but); @@ -2999,7 +2992,7 @@ uiBut *uiDefPulldownBut(uiBlock *block, uiBlockCreateFunc func, void *arg, char uiBut *uiDefMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, char *str, short x1, short y1, short x2, short y2, char *tip) { - uiBut *but= ui_def_but(block, HMENU, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); + uiBut *but= ui_def_but(block, PULLDOWN, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); but->menu_create_func= func; ui_check_but(but); return but; @@ -3007,7 +3000,7 @@ uiBut *uiDefMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, char *str, uiBut *uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, char *str, short x1, short y1, short x2, short y2, char *tip) { - uiBut *but= ui_def_but(block, HMENU, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); + uiBut *but= ui_def_but(block, PULLDOWN, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); but->icon= (BIFIconID) icon; but->flag|= UI_HAS_ICON; |