Revision: 60747
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60747
Author:   nazgul
Date:     2013-10-14 11:42:36 +0000 (Mon, 14 Oct 2013)
Log Message:
-----------
FIx #37005: Mask tool + "Area" Brush Mapping + "Anchored" Stroke = crash

Was caused by area normal calvultion using undo nodes to get coords
from and undo nodes does not contain coords whe using mask tool.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/sculpt_paint/sculpt.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/sculpt.c  2013-10-14 
08:45:43 UTC (rev 60746)
+++ trunk/blender/source/blender/editors/sculpt_paint/sculpt.c  2013-10-14 
11:42:36 UTC (rev 60747)
@@ -1082,6 +1082,7 @@
        float out_flip[3] = {0.0f, 0.0f, 0.0f};
 
        SculptSession *ss = ob->sculpt;
+       const Brush *brush = BKE_paint_brush(&sd->paint);
        int n, original;
 
        /* Grab brush requires to test on original data (see r33888 and
@@ -1090,8 +1091,14 @@
                    TRUE : ss->cache->original);
 
        /* In general the original coords are not available with dynamic
-        * topology */
-       if (ss->bm)
+        * topology
+        *
+        * Mask tool could not use undo nodes to get coordinates from
+        * since the coordinates are not stored in those odes.
+        * And mask tool is not gonna to modify vertex coordinates,
+        * so we don't actually need to use modified coords.
+        */
+       if (ss->bm || brush->sculpt_tool == SCULPT_TOOL_MASK)
                original = FALSE;
 
        (void)sd; /* unused w/o openmp */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to