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:
authorAntony Riakiotakis <kalast@gmail.com>2012-03-17 01:26:18 +0400
committerAntony Riakiotakis <kalast@gmail.com>2012-03-17 01:26:18 +0400
commit56da174b14de74ebc141b0242e1eb7ccf8058353 (patch)
treeeb519f6e128cf545504ba1a0bf35e17490fea718 /source/blender
parentfd2ea6b966a87aadeb2fe803f8297c4cf77c7641 (diff)
bugfix. Brush zoom could fail if uv sculpting was on
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index f8a9516c97e..a2ad3c4480b 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -5164,13 +5164,15 @@ static void brush_drawcursor(bContext *C, int x, int y, void *UNUSED(customdata)
ToolSettings *ts;
float zoomx, zoomy;
const float size= (float)brush_size(scene, brush);
- const short use_zoom= get_imapaint_zoom(C, &zoomx, &zoomy);
+ short use_zoom;
float pixel_size;
float alpha= 0.5f;
ts = scene->toolsettings;
+ use_zoom= get_imapaint_zoom(C, &zoomx, &zoomy)
+ && !(ts->use_uv_sculpt && (scene->basact->object->mode == OB_MODE_EDIT));
- if(use_zoom && !ts->use_uv_sculpt){
+ if(use_zoom){
pixel_size = MAX2(size * zoomx, size * zoomy);
}
else {
@@ -5190,7 +5192,7 @@ static void brush_drawcursor(bContext *C, int x, int y, void *UNUSED(customdata)
glTranslatef((float)x, (float)y, 0.0f);
/* No need to scale for uv sculpting, on the contrary it might be useful to keep unscaled */
- if(use_zoom && !ts->use_uv_sculpt)
+ if(use_zoom)
glScalef(zoomx, zoomy, 1.0f);
glColor4f(brush->add_col[0], brush->add_col[1], brush->add_col[2], alpha);