Follow up to the offset scale fix for texture painting: texture mask had
authorAntony Riakiotakis <kalast@gmail.com>
Tue, 4 Mar 2014 18:35:39 +0000 (20:35 +0200)
committerAntony Riakiotakis <kalast@gmail.com>
Tue, 4 Mar 2014 18:36:03 +0000 (20:36 +0200)
the same issue.

source/blender/blenkernel/intern/brush.c

index 4b2e791b66e514e26a841f988104ba63fe671d79..68da8f1a4d87fb8234d27c079bb744789fc4e169 100644 (file)
@@ -684,11 +684,8 @@ float BKE_brush_sample_masktex(const Scene *scene, Brush *br,
                x /= (br->mask_stencil_dimension[0]);
                y /= (br->mask_stencil_dimension[1]);
 
-               x *= mtex->size[0];
-               y *= mtex->size[1];
-
-               co[0] = x + mtex->ofs[0];
-               co[1] = y + mtex->ofs[1];
+               co[0] = x;
+               co[1] = y;
                co[2] = 0.0f;
 
                externtex(mtex, co, &intensity,
@@ -744,11 +741,8 @@ float BKE_brush_sample_masktex(const Scene *scene, Brush *br,
                        y = flen * sinf(angle);
                }
 
-               x *= mtex->size[0];
-               y *= mtex->size[1];
-
-               co[0] = x + mtex->ofs[0];
-               co[1] = y + mtex->ofs[1];
+               co[0] = x;
+               co[1] = y;
                co[2] = 0.0f;
 
                externtex(mtex, co, &intensity,