diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-11-17 20:11:02 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-11-17 20:11:02 +0400 |
commit | 469324b049012667a083017afa21538026008734 (patch) | |
tree | 5b3b1e12364ea0962e7f3907416dcf390446965b /source/blender/editors/interface | |
parent | e2b58126a21df283c8f3ab93bc3c46b57825f69d (diff) |
Fix compositing normal node not properly showing vector XYZ values when opening
socket menu, and make the normal animatable.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 9eec7c195b2..e000265bb1e 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -430,7 +430,7 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in but->type = NUMSLI; } } - else if (subtype == PROP_DIRECTION) { + else if (subtype == PROP_DIRECTION && !expand) { uiDefButR_prop(block, BUT_NORMAL, 0, name, x, y, UI_UNIT_X * 3, UI_UNIT_Y * 3, ptr, prop, 0, 0, 0, -1, -1, NULL); } else { diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index c836d62021e..527f383c837 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -2623,6 +2623,11 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat } +static void widget_normal(uiBut *but, uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int UNUSED(roundboxalign)) +{ + ui_draw_but_NORMAL(but, wcol, rect); +} + static void widget_icon_has_anim(uiBut *UNUSED(but), uiWidgetColors *wcol, rcti *rect, int state, int UNUSED(roundboxalign)) { if (state & (UI_BUT_ANIMATED | UI_BUT_ANIMATED_KEY | UI_BUT_DRIVEN | UI_BUT_REDALERT)) { @@ -3030,6 +3035,7 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type) break; case UI_WTYPE_NORMAL: + wt.custom = widget_normal; break; case UI_WTYPE_SCROLL: @@ -3269,7 +3275,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct break; case BUT_NORMAL: - ui_draw_but_NORMAL(but, &tui->wcol_regular, rect); + wt = widget_type(UI_WTYPE_NORMAL); break; case BUT_IMAGE: |