diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-09-20 16:01:16 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-09-20 16:01:16 +0400 |
commit | 7172316b945c62797e6beba953ff203766614531 (patch) | |
tree | 640ac56fadded9c7686399b5a1f1c64f1a135700 /source/blender/editors/interface | |
parent | 2015eefef70350382931881dd65ed2da09f8f2cd (diff) | |
parent | 78d4260144dbf01166fac8bc9303e6d5aa022f71 (diff) |
Merging r40366 through r40392 from trunk into soc-2011-garlicsoc-2011-garlic
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 12 | ||||
-rw-r--r-- | source/blender/editors/interface/view2d.c | 8 |
2 files changed, 16 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 095c90797f1..af515bf8061 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -2138,6 +2138,18 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe //uiItemR(row, itemptr, "mute", 0, "", ICON_MUTE_IPO_OFF); uiBlockSetEmboss(block, UI_EMBOSS); } + else if(itemptr->type == &RNA_VertexGroup) { + bDeformGroup *dg= (bDeformGroup *)itemptr->data; + uiItemL(sub, name, icon); + /* RNA does not allow nice lock icons, use lower level buttons */ +#if 0 + uiDefButR(block, OPTION, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, itemptr, "lock_weight", 0, 0, 0, 0, 0, NULL); +#else + uiBlockSetEmboss(block, UI_EMBOSSN); + uiDefIconButBitC(block, TOG, DG_LOCK_WEIGHT, 0, (dg->flag & DG_LOCK_WEIGHT) ? ICON_LOCKED : ICON_UNLOCKED, 0, 0, UI_UNIT_X, UI_UNIT_Y, &dg->flag, 0, 0, 0, 0, "Maintain relative weights while painting"); + uiBlockSetEmboss(block, UI_EMBOSS); +#endif + } else if(itemptr->type == &RNA_KeyingSetPath) { KS_Path *ksp = (KS_Path*)itemptr->data; diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 3f5bc21814d..18db1c8c894 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -420,8 +420,8 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize) /* check if we should restore aspect ratio (if view size changed) */ if (v2d->keepzoom & V2D_KEEPASPECT) { - short do_x=0, do_y=0, do_cur, do_win; - float curRatio, winRatio; + short do_x=0, do_y=0, do_cur /* , do_win */ /* UNUSED */; + float /* curRatio, */ /* UNUSED */ winRatio; /* when a window edge changes, the aspect ratio can't be used to * find which is the best new 'cur' rect. thats why it stores 'old' @@ -429,7 +429,7 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize) if (winx != v2d->oldwinx) do_x= 1; if (winy != v2d->oldwiny) do_y= 1; - curRatio= height / width; + /* curRatio= height / width; */ /* UNUSED */ winRatio= winy / winx; /* both sizes change (area/region maximised) */ @@ -443,7 +443,7 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize) else do_x= 1; } do_cur= do_x; - do_win= do_y; + /* do_win= do_y; */ /* UNUSED */ if (do_cur) { if ((v2d->keeptot == V2D_KEEPTOT_STRICT) && (winx != v2d->oldwinx)) { |