LineArt: Remove "soft selection" option.
After some back and forth with the GP module and some artists, this option was deemed not that useful. The use case was considered too obscure so we'll remove it. It is still posible to have this functionality by using the vertex weight modiifers or manually clamping the weights.
This commit is contained in:
parent
e1b2cf887f
commit
496df39e6f
|
@ -408,8 +408,6 @@ static void vgroup_panel_draw(const bContext *UNUSED(C), Panel *panel)
|
|||
uiItemPointerR(
|
||||
col, ptr, "vertex_group", &ob_ptr, "vertex_groups", IFACE_("Target"), ICON_NONE);
|
||||
}
|
||||
|
||||
uiItemR(col, ptr, "use_soft_selection", 0, NULL, ICON_NONE);
|
||||
}
|
||||
|
||||
static void baking_panel_draw(const bContext *UNUSED(C), Panel *panel)
|
||||
|
|
|
@ -3801,7 +3801,6 @@ static void lineart_gpencil_generate(LineartRenderBuffer *rb,
|
|||
int enabled_types = lineart_rb_edge_types(rb);
|
||||
bool invert_input = modifier_flags & LRT_GPENCIL_INVERT_SOURCE_VGROUP;
|
||||
bool match_output = modifier_flags & LRT_GPENCIL_MATCH_OUTPUT_VGROUP;
|
||||
bool preserve_weight = modifier_flags & LRT_GPENCIL_SOFT_SELECTION;
|
||||
|
||||
LISTBASE_FOREACH (LineartLineChain *, rlc, &rb->chains) {
|
||||
|
||||
|
@ -3885,18 +3884,13 @@ static void lineart_gpencil_generate(LineartRenderBuffer *rb,
|
|||
}
|
||||
MDeformWeight *mdw = BKE_defvert_ensure_index(&me->dvert[vindex], dindex);
|
||||
MDeformWeight *gdw = BKE_defvert_ensure_index(&gps->dvert[sindex], gpdg);
|
||||
if (preserve_weight) {
|
||||
float use_weight = mdw->weight;
|
||||
if (invert_input) {
|
||||
use_weight = 1 - use_weight;
|
||||
}
|
||||
gdw->weight = MAX2(use_weight, gdw->weight);
|
||||
}
|
||||
else {
|
||||
if (mdw->weight > 0.999f) {
|
||||
gdw->weight = 1.0f;
|
||||
}
|
||||
|
||||
float use_weight = mdw->weight;
|
||||
if (invert_input) {
|
||||
use_weight = 1 - use_weight;
|
||||
}
|
||||
gdw->weight = MAX2(use_weight, gdw->weight);
|
||||
|
||||
sindex++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -288,7 +288,7 @@
|
|||
.edge_types = LRT_EDGE_FLAG_ALL_TYPE, \
|
||||
.thickness = 25, \
|
||||
.opacity = 1.0f, \
|
||||
.flags = LRT_GPENCIL_MATCH_OUTPUT_VGROUP | LRT_GPENCIL_SOFT_SELECTION, \
|
||||
.flags = LRT_GPENCIL_MATCH_OUTPUT_VGROUP, \
|
||||
.crease_threshold = DEG2RAD(140.0f), \
|
||||
.calculation_flags = LRT_ALLOW_DUPLI_OBJECTS | LRT_ALLOW_CLIPPING_BOUNDARIES, \
|
||||
.angle_splitting_threshold = DEG2RAD(60.0f), \
|
||||
|
|
|
@ -819,7 +819,7 @@ typedef enum eLineartGpencilModifierSource {
|
|||
typedef enum eLineArtGPencilModifierFlags {
|
||||
LRT_GPENCIL_INVERT_SOURCE_VGROUP = (1 << 0),
|
||||
LRT_GPENCIL_MATCH_OUTPUT_VGROUP = (1 << 1),
|
||||
LRT_GPENCIL_SOFT_SELECTION = (1 << 2),
|
||||
LRT_GPENCIL_BINARY_WEIGHTS = (1 << 2) /* Deprecated, this is removed for lack of use case. */,
|
||||
LRT_GPENCIL_IS_BAKED = (1 << 3),
|
||||
} eLineArtGPencilModifierFlags;
|
||||
|
||||
|
|
|
@ -2501,12 +2501,6 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
|
|||
RNA_def_property_ui_text(prop, "Match Output", "Match output vertex group based on name");
|
||||
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
|
||||
|
||||
prop = RNA_def_property(srna, "use_soft_selection", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flags", LRT_GPENCIL_SOFT_SELECTION);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Clip", "Preserve original vertex weight instead of clipping to 0/1");
|
||||
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
|
||||
|
||||
prop = RNA_def_property(srna, "is_baked", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flags", LRT_GPENCIL_IS_BAKED);
|
||||
RNA_def_property_ui_text(prop, "Is Baked", "This modifier has baked data");
|
||||
|
|
Loading…
Reference in New Issue