From 2681cc66a50f16c77c8ad46915a53640f65bb51f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 15 Dec 2012 16:31:25 +0000 Subject: minor edits with recent commits, also avoid calling BKE_mesh_from_object() in vertex paint, just pass the mesh. --- source/blender/blenkernel/BKE_bpath.h | 2 +- source/blender/blenkernel/BKE_pbvh.h | 4 ++-- source/blender/editors/sculpt_paint/paint_vertex.c | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/source/blender/blenkernel/BKE_bpath.h b/source/blender/blenkernel/BKE_bpath.h index 7c350fdb03b..16a8b1be85b 100644 --- a/source/blender/blenkernel/BKE_bpath.h +++ b/source/blender/blenkernel/BKE_bpath.h @@ -26,7 +26,7 @@ */ /** \file BKE_bpath.h - * \ingroup bli + * \ingroup bke * \attention Based on ghash, difference is ghash is not a fixed size, * so for BPath we don't need to malloc */ diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h index 59ecdb359c9..302de593963 100644 --- a/source/blender/blenkernel/BKE_pbvh.h +++ b/source/blender/blenkernel/BKE_pbvh.h @@ -21,8 +21,8 @@ #ifndef __BLI_PBVH_H__ #define __BLI_PBVH_H__ -/** \file BLI_pbvh.h - * \ingroup bli +/** \file BKE_pbvh.h + * \ingroup bke * \brief A BVH for high poly meshes. */ diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 073aee1d974..a7d75c617be 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -2646,13 +2646,12 @@ static int vpaint_stroke_test_start(bContext *C, struct wmOperator *op, const fl return 1; } -static void vpaint_paint_poly(VPaint *vp, VPaintData *vpd, Object *ob, +static void vpaint_paint_poly(VPaint *vp, VPaintData *vpd, Mesh *me, const unsigned int index, const float mval[2], const float brush_size_pressure, const float brush_alpha_pressure) { ViewContext *vc = &vpd->vc; Brush *brush = paint_brush(&vp->paint); - Mesh *me = BKE_mesh_from_object(ob); MPoly *mpoly = &me->mpoly[index]; MFace *mf; MCol *mc; @@ -2786,7 +2785,7 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P for (index = 0; index < totindex; index++) { if (indexar[index] && indexar[index] <= me->totpoly) { - vpaint_paint_poly(vp, vpd, ob, indexar[index] - 1, mval, brush_size_pressure, brush_alpha_pressure); + vpaint_paint_poly(vp, vpd, me, indexar[index] - 1, mval, brush_size_pressure, brush_alpha_pressure); } } -- cgit v1.2.3