Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c7
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 1a2848f1b38..806a9e4b0fb 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -1591,10 +1591,14 @@ void SCULPT_brush_test_init(SculptSession *ss, SculptBrushTest *test)
if (ss->cache) {
copy_v3_v3(test->location, ss->cache->location);
test->mirror_symmetry_pass = ss->cache->mirror_symmetry_pass;
+ test->radial_symmetry_pass = ss->cache->radial_symmetry_pass;
+ copy_m4_m4(test->symm_rot_mat_inv, ss->cache->symm_rot_mat_inv);
}
else {
copy_v3_v3(test->location, ss->cursor_location);
test->mirror_symmetry_pass = 0;
+ test->radial_symmetry_pass = 0;
+ unit_m4(test->symm_rot_mat_inv);
}
/* Just for initialize. */
@@ -1622,6 +1626,9 @@ BLI_INLINE bool sculpt_brush_test_clipping(const SculptBrushTest *test, const fl
}
float symm_co[3];
flip_v3_v3(symm_co, co, test->mirror_symmetry_pass);
+ if (test->radial_symmetry_pass) {
+ mul_m4_v3(test->symm_rot_mat_inv, symm_co);
+ }
return ED_view3d_clipping_test(rv3d, symm_co, true);
}
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index e6710e27115..84a47ab86ba 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -735,6 +735,9 @@ typedef struct SculptBrushTest {
float dist;
int mirror_symmetry_pass;
+ int radial_symmetry_pass;
+ float symm_rot_mat_inv[4][4];
+
/* For circle (not sphere) projection. */
float plane_view[4];