[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55911] trunk/blender/source/blender: Compatibility and robustness:

Antony Riakiotakis kalast at gmail.com
Mon Apr 8 21:56:39 CEST 2013


Revision: 55911
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55911
Author:   psy-fi
Date:     2013-04-08 19:56:38 +0000 (Mon, 08 Apr 2013)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/blender/blenloader/intern/readfile.c
    trunk/blender/source/blender/editors/sculpt_paint/paint_image_proj.c

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c	2013-04-08 18:55:08 UTC (rev 55910)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c	2013-04-08 19:56:38 UTC (rev 55911)
@@ -9266,6 +9266,10 @@
 		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;
+			}
 		}
 	}
 

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image_proj.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_image_proj.c	2013-04-08 18:55:08 UTC (rev 55910)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_image_proj.c	2013-04-08 19:56:38 UTC (rev 55911)
@@ -4158,7 +4158,9 @@
 		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;
 	}




More information about the Bf-blender-cvs mailing list