2.5 Texture paint:
[blender.git] / source / blender / editors / space_image / image_draw.c
index ff25a2635d242e9d334bd018554835ba378beff4..2f5fc805367122bf6d2bf4a5b6e7d46eafe0e640 100644 (file)
@@ -47,6 +47,7 @@
 #include "BKE_colortools.h"
 #include "BKE_global.h"
 #include "BKE_image.h"
+#include "BKE_paint.h"
 #include "BKE_utildefines.h"
 
 #include "BIF_gl.h"
@@ -577,7 +578,7 @@ static void draw_image_view_tool(Scene *scene)
 
 static unsigned char *get_alpha_clone_image(Scene *scene, int *width, int *height)
 {
-       Brush *brush = scene->toolsettings->imapaint.brush;
+       Brush *brush = paint_brush(&scene->toolsettings->imapaint.paint);
        ImBuf *ibuf;
        unsigned int size, alpha;
        unsigned char *rect, *cp;
@@ -615,7 +616,7 @@ static void draw_image_paint_helpers(SpaceImage *sima, ARegion *ar, Scene *scene
        int x, y, w, h;
        unsigned char *clonerect;
 
-       brush= scene->toolsettings->imapaint.brush;
+       brush= paint_brush(&scene->toolsettings->imapaint.paint);
 
        if(brush && (scene->toolsettings->imapaint.tool == PAINT_TOOL_CLONE)) {
                /* this is not very efficient, but glDrawPixels doesn't allow