[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45224] trunk/blender/source/blender/ editors/sculpt_paint: fix [#30666] Texturepaint "Soften" brush gets stuck
Campbell Barton
ideasman42 at gmail.com
Wed Mar 28 02:42:53 CEST 2012
Revision: 45224
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45224
Author: campbellbarton
Date: 2012-03-28 00:42:38 +0000 (Wed, 28 Mar 2012)
Log Message:
-----------
fix [#30666] Texturepaint "Soften" brush gets stuck
use derived mesh tessfaces since the mesh doesnt ensure this, also means non-project-painting in the viewport works with modifiers now.
Modified Paths:
--------------
trunk/blender/source/blender/editors/sculpt_paint/paint_intern.h
trunk/blender/source/blender/editors/sculpt_paint/paint_utils.c
Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_intern.h
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_intern.h 2012-03-27 23:23:47 UTC (rev 45223)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_intern.h 2012-03-28 00:42:38 UTC (rev 45224)
@@ -132,7 +132,7 @@
void projectf(struct bglMats *mats, const float v[3], float p[2]);
float paint_calc_object_space_radius(struct ViewContext *vc, const float center[3], float pixel_radius);
float paint_get_tex_pixel(struct Brush* br, float u, float v);
-int imapaint_pick_face(struct ViewContext *vc, struct Mesh *me, const int mval[2], unsigned int *index);
+int imapaint_pick_face(struct ViewContext *vc, const int mval[2], unsigned int *index, unsigned int totface);
void imapaint_pick_uv(struct Scene *scene, struct Object *ob, unsigned int faceindex, const int xy[2], float uv[2]);
void paint_sample_color(struct Scene *scene, struct ARegion *ar, int x, int y);
Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_utils.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_utils.c 2012-03-27 23:23:47 UTC (rev 45223)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_utils.c 2012-03-28 00:42:38 UTC (rev 45224)
@@ -314,17 +314,18 @@
dm->release(dm);
}
-///* returns 0 if not found, otherwise 1 */
-int imapaint_pick_face(ViewContext *vc, Mesh *me, const int mval[2], unsigned int *index)
+/* returns 0 if not found, otherwise 1 */
+int imapaint_pick_face(ViewContext *vc, const int mval[2], unsigned int *index, unsigned int totface)
{
- if (!me || me->totface==0)
+ if (totface == 0)
return 0;
/* sample only on the exact position */
*index = view3d_sample_backbuf(vc, mval[0], mval[1]);
- if ((*index)<=0 || (*index)>(unsigned int)me->totface)
+ if ((*index) <= 0 || (*index) > (unsigned int)totface) {
return 0;
+ }
(*index)--;
More information about the Bf-blender-cvs
mailing list