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
path: root/source
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2013-04-08 23:56:38 +0400
committerAntony Riakiotakis <kalast@gmail.com>2013-04-08 23:56:38 +0400
commiteaa577dfc928b5ad9e227c5da1377e3bddfbfcd4 (patch)
tree2a8c8f144917b0cc2612e5e36aba427927a4afd3 /source
parent2b2099cd519d2723dd79af2e1d9035c7cbb12022 (diff)
Compatibility and robustness:
* Make masking depend on texture mode only if there's an actual texture present * New stroke system uses diameter to calculate stroke spacing, while old texture painting brushes and system used radius. So divide spacing of brushes in old files to half. Since I expect trunk users to have already adapted this, I do this for an old subversion of blender.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenloader/intern/readfile.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index bd2fbfe7eda..3723fe54cec 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9266,6 +9266,10 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
Brush *brush;
for (brush = main->brush.first; brush; brush = brush->id.next) {
default_mtex(&brush->mask_mtex);
+
+ if (brush->ob_mode & OB_MODE_TEXTURE_PAINT) {
+ brush->spacing /= 2;
+ }
}
}
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index f7a064cad0d..bf897913b6c 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -4158,7 +4158,9 @@ static void project_state_init(bContext *C, Object *ob, ProjPaintState *ps, int
ps->blend = brush->blend;
/* disable for 3d mapping also because painting on mirrored mesh can create "stripes" */
- ps->do_masking = (brush->flag & BRUSH_AIRBRUSH || brush->mtex.brush_map_mode != MTEX_MAP_MODE_TILED) ? false : true;
+ ps->do_masking = (brush->flag & BRUSH_AIRBRUSH || (brush->mtex.tex &&
+ !ELEM(brush->mtex.brush_map_mode, MTEX_MAP_MODE_TILED, MTEX_MAP_MODE_STENCIL)))
+ ? false : true;
ps->is_texbrush = (brush->mtex.tex && brush->imagepaint_tool == PAINT_TOOL_DRAW) ? true : false;
ps->is_maskbrush = (brush->mask_mtex.tex) ? true : false;
}