diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-03-11 03:43:08 +0300 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-03-11 03:43:08 +0300 |
commit | 33509e851077fa108bfb1e8934098d67e6b1b16f (patch) | |
tree | 1c464e1fcb10b4549eb90cb4becd77c3531d269b /source/blender/blenkernel/intern/brush.c | |
parent | 47311475ba16b59b7e5751cc63d5800bdd971586 (diff) |
Changed vertexpaint and weightpaint to use the standard Brush struct, so they too work with the brush panel.
Note: these modes are only using color/alpha/size from Brush, so there's more integration work todo yet.
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 398993be1a4..30a35cbe91c 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -185,6 +185,19 @@ void make_local_brush(Brush *brush) /* Library Operations */ +Brush **current_brush_source(Scene *sce) +{ + if(G.f & G_SCULPTMODE) + return &sce->toolsettings->sculpt->brush; + else if(G.f & G_VERTEXPAINT) + return &sce->toolsettings->vpaint->brush; + else if(G.f & G_WEIGHTPAINT) + return &sce->toolsettings->wpaint->brush; + else if(G.f & G_TEXTUREPAINT) + return &sce->toolsettings->imapaint.brush; + return NULL; +} + int brush_set_nr(Brush **current_brush, int nr) { ID *idtest, *id; |