diff options
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; |