diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-02-02 18:04:33 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-02-02 18:04:33 +0300 |
commit | 2b445b83fe0ac8eb4ca0e8a1444bde73ff3b50b3 (patch) | |
tree | e29f4e53f250b9597df37aa4e474bfe82a69708f /source/blender/editors/sculpt_paint | |
parent | 147de2c49ea022a5d7bf86e1490a7312be7c90a8 (diff) |
Fix T46583: Sculpt symmetry don't work in clipping border view mode
This is an attempt to solve the issue by doing clip test on the original
side of the stroke. Some extra testing is required.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 5675b2e97f7..245724f95c2 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -629,6 +629,7 @@ typedef struct SculptBrushTest { float radius_squared; float location[3]; float dist; + int mirror_symmetry_pass; /* View3d clipping - only set rv3d for clipping */ RegionView3D *clip_rv3d; @@ -642,6 +643,7 @@ static void sculpt_brush_test_init(SculptSession *ss, SculptBrushTest *test) copy_v3_v3(test->location, ss->cache->location); test->dist = 0.0f; /* just for initialize */ + test->mirror_symmetry_pass = ss->cache->mirror_symmetry_pass; if (rv3d->rflag & RV3D_CLIPPING) { test->clip_rv3d = rv3d; @@ -654,7 +656,12 @@ static void sculpt_brush_test_init(SculptSession *ss, SculptBrushTest *test) BLI_INLINE bool sculpt_brush_test_clipping(const SculptBrushTest *test, const float co[3]) { RegionView3D *rv3d = test->clip_rv3d; - return (rv3d && (ED_view3d_clipping_test(rv3d, co, true))); + if (!rv3d) { + return false; + } + float symm_co[3]; + flip_v3_v3(symm_co, co, test->mirror_symmetry_pass); + return ED_view3d_clipping_test(rv3d, symm_co, true); } static bool sculpt_brush_test(SculptBrushTest *test, const float co[3]) |