[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56097] trunk/blender/source/blender/ editors/sculpt_paint/paint_utils.c: Fix: texture scaling for sculpting is different between overlay and

Antony Riakiotakis kalast at gmail.com
Tue Apr 16 18:22:27 CEST 2013


Revision: 56097
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56097
Author:   psy-fi
Date:     2013-04-16 16:22:26 +0000 (Tue, 16 Apr 2013)
Log Message:
-----------
Fix: texture scaling for sculpting is different between overlay and
stroke. The reason is that we use a different sampling function.
Reported by Michalis Zissiou, thanks!

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

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_utils.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_utils.c	2013-04-16 16:18:14 UTC (rev 56096)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_utils.c	2013-04-16 16:22:26 UTC (rev 56097)
@@ -179,16 +179,13 @@
 
 float paint_get_tex_pixel(MTex *mtex, float u, float v, struct ImagePool *pool)
 {
-	TexResult texres = {0};
+	float intensity, rgba[4];
 	float co[3] = {u, v, 0.0f};
-	int hasrgb;
 
-	hasrgb = multitex_ext(mtex->tex, co, NULL, NULL, 0, &texres, pool);
+	externtex(mtex, co, &intensity,
+		                   rgba, rgba + 1, rgba + 2, rgba + 3, 0, pool);
 
-	if (hasrgb & TEX_RGB)
-		texres.tin = rgb_to_grayscale(&texres.tr) * texres.ta;
-
-	return texres.tin;
+	return intensity;
 }
 
 void paint_get_tex_pixel_col(MTex *mtex, float u, float v, float rgba[4], struct ImagePool *pool)




More information about the Bf-blender-cvs mailing list