[Bf-blender-cvs] [4e4c1f40e0f] sculpt-dev: Sculpt Expand: Use visibility state for enabled values
Pablo Dobarro
noreply at git.blender.org
Sun Feb 7 20:46:27 CET 2021
Commit: 4e4c1f40e0f108a61f3c8ac26746bb4d67a00db9
Author: Pablo Dobarro
Date: Sun Feb 7 18:54:13 2021 +0100
Branches: sculpt-dev
https://developer.blender.org/rB4e4c1f40e0f108a61f3c8ac26746bb4d67a00db9
Sculpt Expand: Use visibility state for enabled values
===================================================================
M source/blender/editors/sculpt_paint/sculpt_expand.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/sculpt_expand.c b/source/blender/editors/sculpt_paint/sculpt_expand.c
index b5ea9b676f4..d5ecef86e59 100644
--- a/source/blender/editors/sculpt_paint/sculpt_expand.c
+++ b/source/blender/editors/sculpt_paint/sculpt_expand.c
@@ -118,6 +118,10 @@ static EnumPropertyItem prop_sculpt_expand_target_type_items[] = {
static bool sculpt_expand_state_get(SculptSession *ss, ExpandCache *expand_cache, const int i)
{
+ if (!SCULPT_vertex_visible_get(ss, i)) {
+ return false;
+ }
+
bool enabled = false;
if (expand_cache->snap) {
@@ -142,7 +146,13 @@ static bool sculpt_expand_state_get(SculptSession *ss, ExpandCache *expand_cache
static bool sculpt_expand_face_state_get(SculptSession *ss, ExpandCache *expand_cache, const int f)
{
+ if (ss->face_sets[f] <= 0) {
+ return false;
+ }
+
bool enabled = false;
+
+
if (expand_cache->snap_enabled_face_sets) {
const int face_set = ss->face_sets[f];
enabled = BLI_gset_haskey(expand_cache->snap_enabled_face_sets, POINTER_FROM_INT(face_set));
More information about the Bf-blender-cvs
mailing list