Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r--source/blender/blenkernel/intern/brush.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 5dbef017f9d..eddca8d0073 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -35,6 +35,7 @@
#include "DNA_brush_types.h"
#include "DNA_color_types.h"
#include "DNA_image_types.h"
+#include "DNA_object_types.h"
#include "DNA_texture_types.h"
#include "DNA_scene_types.h"
#include "DNA_windowmanager_types.h"
@@ -187,7 +188,7 @@ void make_local_brush(Brush *brush)
Brush **current_brush_source(Scene *sce)
{
- if(G.f & G_SCULPTMODE)
+ if(sce->basact && sce->basact->object->mode & OB_MODE_SCULPT)
return &sce->toolsettings->sculpt->brush;
else if(G.f & G_VERTEXPAINT)
return &sce->toolsettings->vpaint->brush;