diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-06 11:10:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-06 11:10:33 +0300 |
commit | 6c43490616973af78f91062df402e2ca34cedac5 (patch) | |
tree | 3eafb5d94fbe597e30c336e9a81321dcbdc20905 /source/blender/editors/sculpt_paint/sculpt.c | |
parent | 8ef757df3d2ab5867f2361908e524a7de0f4489e (diff) |
Vertex Paint: use view normal w/ 2D falloff
When projecting to the view, cull faces pointing
away from the view normal.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 5f38eaa4de2..ad58adfe4af 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -651,6 +651,19 @@ SculptBrushTestFn sculpt_brush_test_init_with_falloff_shape( return sculpt_brush_test_sq_fn; } +const float *sculpt_brush_frontface_normal_from_falloff_shape( + SculptSession *ss, char falloff_shape) +{ + if (falloff_shape == PAINT_FALLOFF_SHAPE_SPHERE) { + return ss->cache->sculpt_normal_symm; + } + else { + /* PAINT_FALLOFF_SHAPE_TUBE */ + return ss->cache->view_normal; + } +} + + static float frontface(const Brush *br, const float sculpt_normal[3], const short no[3], const float fno[3]) { |