Cavity masking now has a checkbox in the UI, instead of simply turning
itself on if the concave mask factor is > 0.
This commit is contained in:
parent
6f91eaad39
commit
881df30a46
|
@ -926,8 +926,13 @@ def brush_settings_advanced(layout, context, brush, popover=False):
|
|||
# topology automasking
|
||||
col.prop(brush, "use_automasking_topology", text="Topology")
|
||||
|
||||
col.prop(brush, "concave_mask_factor", text="Cavity Factor");
|
||||
col.prop(brush, "invert_automasking_concavity", text="Invert Cavity Mask");
|
||||
col.prop(brush, "use_automasking_concave")
|
||||
|
||||
col2 = col.column()
|
||||
col2.enabled = brush.use_automasking_concave
|
||||
|
||||
col2.prop(brush, "concave_mask_factor", text="Cavity Factor");
|
||||
col2.prop(brush, "invert_automasking_concavity", text="Invert Cavity Mask");
|
||||
|
||||
# face masks automasking
|
||||
col.prop(brush, "use_automasking_face_sets", text="Face Sets")
|
||||
|
|
|
@ -145,7 +145,7 @@ float SCULPT_automasking_factor_get(AutomaskingCache *automasking,
|
|||
return mask;
|
||||
}
|
||||
|
||||
do_concave = ss->cache->brush->concave_mask_factor > 0.0f ||
|
||||
do_concave = ss->cache->brush->concave_mask_factor > 0.0f &&
|
||||
(automasking->settings.flags & BRUSH_AUTOMASKING_CONCAVITY);
|
||||
|
||||
/* If the cache is initialized with valid info, use the cache. This is used when the
|
||||
|
@ -373,10 +373,6 @@ static void SCULPT_automasking_cache_settings_update(AutomaskingCache *automaski
|
|||
{
|
||||
automasking->settings.flags = sculpt_automasking_mode_effective_bits(sd, brush);
|
||||
|
||||
if (brush->concave_mask_factor != 0.0f) {
|
||||
automasking->settings.flags |= BRUSH_AUTOMASKING_CONCAVITY;
|
||||
}
|
||||
|
||||
automasking->settings.initial_face_set = SCULPT_active_face_set_get(ss);
|
||||
automasking->settings.concave_factor = brush->concave_mask_factor;
|
||||
}
|
||||
|
|
|
@ -111,7 +111,8 @@
|
|||
\
|
||||
.mtex = _DNA_DEFAULT_MTex, \
|
||||
.mask_mtex = _DNA_DEFAULT_MTex, \
|
||||
.dyntopo = {0.4f, 25.0f, 3.0f, DYNTOPO_COLLAPSE|DYNTOPO_SUBDIVIDE, DYNTOPO_DETAIL_RELATIVE, DYNTOPO_INHERIT_ALL, 25}\
|
||||
.dyntopo = {0.4f, 25.0f, 3.0f, DYNTOPO_COLLAPSE|DYNTOPO_SUBDIVIDE, DYNTOPO_DETAIL_RELATIVE, DYNTOPO_INHERIT_ALL, 25},\
|
||||
.concave_mask_factor = 0.75f\
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
|
|
@ -2941,7 +2941,6 @@ static void rna_def_brush(BlenderRNA *brna)
|
|||
|
||||
prop = RNA_def_property(srna, "concave_mask_factor", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_float_sdna(prop, NULL, "concave_mask_factor");
|
||||
RNA_def_property_float_default(prop, 0);
|
||||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
|
||||
RNA_def_property_ui_text(
|
||||
|
@ -3115,6 +3114,13 @@ static void rna_def_brush(BlenderRNA *brna)
|
|||
"Invert mask to expose convex instead of concave areas");
|
||||
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
||||
|
||||
prop = RNA_def_property(srna, "use_automasking_concave", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "automasking_flags", BRUSH_AUTOMASKING_CONCAVITY);
|
||||
RNA_def_property_ui_text(prop,
|
||||
"Cavity Auto-Masking",
|
||||
"Filter verts by concavity; use with paint brushes");
|
||||
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
||||
|
||||
prop = RNA_def_property(srna, "use_automasking_topology", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "automasking_flags", BRUSH_AUTOMASKING_TOPOLOGY);
|
||||
RNA_def_property_ui_text(prop,
|
||||
|
|
Loading…
Reference in New Issue