[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30147] branches/soc-2010-jwilkins/source/ blender/editors/sculpt_paint: * bug fix: overlay wasn' t recalculating when you zoomed it back out
Jason Wilkins
Jason.A.Wilkins at gmail.com
Fri Jul 9 11:46:11 CEST 2010
Revision: 30147
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30147
Author: jwilkins
Date: 2010-07-09 11:46:11 +0200 (Fri, 09 Jul 2010)
Log Message:
-----------
* bug fix: overlay wasn't recalculating when you zoomed it back out
* tweak: changed some < to <= so that the edge is included
* made minimum texture size for overlay 256x256
Modified Paths:
--------------
branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c
branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c
Modified: branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c 2010-07-09 09:27:24 UTC (rev 30146)
+++ branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c 2010-07-09 09:46:11 UTC (rev 30147)
@@ -226,7 +226,7 @@
mtex->size[1] == snap->size[1] &&
mtex->size[2] == snap->size[2] &&
mtex->rot == snap->rot &&
- sculpt_get_brush_size(brush) <= snap->brush_size && // make brush smaller shouldn't cause a resample
+ ((mtex->brush_map_mode == MTEX_MAP_MODE_FIXED && sculpt_get_brush_size(brush) <= snap->brush_size) || (sculpt_get_brush_size(brush) == snap->brush_size)) && // make brush smaller shouldn't cause a resample
vc->ar->winx == snap->winx &&
vc->ar->winy == snap->winy &&
mtex->brush_map_mode == snap->brush_map_mode;
@@ -286,6 +286,9 @@
size = (1<<r);
+ if (size < 256)
+ size = 256;
+
if (size < old_size)
size = old_size;
}
Modified: branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c 2010-07-09 09:27:24 UTC (rev 30146)
+++ branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c 2010-07-09 09:46:11 UTC (rev 30147)
@@ -413,7 +413,7 @@
//if (sculpt_brush_test_clip(test, co)) {
float distsq = len_squared_v3v3(co, test->location);
- if(distsq < test->radius_squared) {
+ if(distsq <= test->radius_squared) {
test->dist = sqrt(distsq);
return 1;
}
@@ -431,7 +431,7 @@
//if (sculpt_brush_test_clip(test, co)) {
float distsq = len_squared_v3v3(co, test->location);
- if(distsq < test->radius_squared) {
+ if(distsq <= test->radius_squared) {
test->dist = distsq;
return 1;
}
@@ -447,7 +447,7 @@
static int sculpt_brush_test_fast(SculptBrushTest *test, float co[3])
{
//if (sculpt_brush_test_clip(test, co)) {
- return len_squared_v3v3(co, test->location) < test->radius_squared;
+ return len_squared_v3v3(co, test->location) <= test->radius_squared;
//}
//else {
// return 0;
More information about the Bf-blender-cvs
mailing list