diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-02 13:07:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-02 14:07:58 +0300 |
commit | b2a10fa615efcf403a9ca23005d86ca149ebf56b (patch) | |
tree | ac611243d2de0e5cb0ce7d5bc81ce27da7d5b561 /source/blender/editors/sculpt_paint/sculpt_intern.h | |
parent | 9d34ae604827813ead8c9071ff1c346e9aff7e29 (diff) |
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.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_intern.h')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_intern.h | 12 |
1 files changed, 12 insertions, 0 deletions
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], |