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:
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index a577760cf9b..0b4f853b677 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -296,6 +296,12 @@ float *SCULPT_brush_deform_target_vertex_co_get(SculptSession *ss,
return iter->co;
}
+char SCULPT_mesh_symmetry_xyz_get(Object *object)
+{
+ const Mesh *mesh = BKE_mesh_from_object(object);
+ return mesh->symmetry;
+}
+
/* Sculpt Face Sets and Visibility. */
int SCULPT_active_face_set_get(SculptSession *ss)
@@ -1057,7 +1063,7 @@ void SCULPT_floodfill_add_initial_with_symmetry(
Sculpt *sd, Object *ob, SculptSession *ss, SculptFloodFill *flood, int index, float radius)
{
/* Add active vertex and symmetric vertices to the queue. */
- const char symm = sd->paint.symmetry_flags & PAINT_SYMM_AXIS_ALL;
+ const char symm = SCULPT_mesh_symmetry_xyz_get(ob);
for (char i = 0; i <= symm; ++i) {
if (SCULPT_is_symmetry_iteration_valid(i, symm)) {
int v = -1;
@@ -1081,7 +1087,7 @@ void SCULPT_floodfill_add_active(
Sculpt *sd, Object *ob, SculptSession *ss, SculptFloodFill *flood, float radius)
{
/* Add active vertex and symmetric vertices to the queue. */
- const char symm = sd->paint.symmetry_flags & PAINT_SYMM_AXIS_ALL;
+ const char symm = SCULPT_mesh_symmetry_xyz_get(ob);
for (char i = 0; i <= symm; ++i) {
if (SCULPT_is_symmetry_iteration_valid(i, symm)) {
int v = -1;
@@ -6247,7 +6253,7 @@ static void do_symmetrical_brush_actions(Sculpt *sd,
Brush *brush = BKE_paint_brush(&sd->paint);
SculptSession *ss = ob->sculpt;
StrokeCache *cache = ss->cache;
- const char symm = sd->paint.symmetry_flags & PAINT_SYMM_AXIS_ALL;
+ const char symm = SCULPT_mesh_symmetry_xyz_get(ob);
float feather = calc_symmetry_feather(sd, ss->cache);