From b2a10fa615efcf403a9ca23005d86ca149ebf56b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 2 Oct 2017 21:07:25 +1100 Subject: Vertex Paint: projection options This makes vertex paint match image painting more closely. - Add falloff shape option sphere/circle where sphere uses a 3D radius around the cursor and circle uses a 2D radius (projected), like previous releases. - Add normal angle option so you can control the falloff. - Add Cull option, to paint onto faces pointing away. Disabling normals, culling and using circle falloff allows you to paint through the mesh. --- source/blender/editors/sculpt_paint/sculpt_intern.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source/blender/editors/sculpt_paint/sculpt_intern.h') diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index 7d9d3ad783d..425cecb0010 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -188,6 +188,8 @@ typedef struct SculptBrushTest { struct RegionView3D *clip_rv3d; } SculptBrushTest; +typedef bool (*SculptBrushTestFn)(SculptBrushTest *test, const float co[3]); + typedef struct { struct Sculpt *sd; struct SculptSession *ss; @@ -195,12 +197,22 @@ typedef struct { bool original; } SculptSearchSphereData; +typedef struct { + struct Sculpt *sd; + struct SculptSession *ss; + float radius_squared; + bool original; + struct DistRayAABB_Precalc *dist_ray_to_aabb_precalc; +} SculptSearchCircleData; + void sculpt_brush_test_init(struct SculptSession *ss, SculptBrushTest *test); bool sculpt_brush_test_sphere(SculptBrushTest *test, const float co[3]); bool sculpt_brush_test_sphere_sq(SculptBrushTest *test, const float co[3]); bool sculpt_brush_test_sphere_fast(const SculptBrushTest *test, const float co[3]); bool sculpt_brush_test_cube(SculptBrushTest *test, const float co[3], float local[4][4]); +bool sculpt_brush_test_circle_sq(SculptBrushTest *test, const float co[3]); bool sculpt_search_sphere_cb(PBVHNode *node, void *data_v); +bool sculpt_search_circle_cb(PBVHNode *node, void *data_v); float tex_strength( struct SculptSession *ss, struct Brush *br, const float point[3], -- cgit v1.2.3