WIP: Fix #116458: Added decay factor for flattening brushes. #118699

Draft
Raul Fernandez Hernandez wants to merge 87 commits from farsthary/blender:Fix-#116458-Sculpt-Clay-strip-sculpts-on-back-face-when-front-face-only-is-turned-on into blender-v4.1-release

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 3 additions and 3 deletions
Showing only changes of commit b0a8b976b8 - Show all commits

View File

@ -44,7 +44,7 @@
/* How far above or below the plane that is found by averaging the faces. */ \
.plane_offset = 0.0f, \
.plane_trim = 0.5f, \
.plane_trim_decay = 0, \
.plane_trim_decay = 0.0f, \
farsthary marked this conversation as resolved Outdated

Nitpick: 0.0f instead of 0 to remain consistent with the rest of the file.

Nitpick: `0.0f` instead of `0` to remain consistent with the rest of the file.
.clone.alpha = 0.5f, \
.normal_weight = 0.0f, \
.fill_threshold = 0.2f, \

View File

@ -3011,13 +3011,13 @@ static void rna_def_brush(BlenderRNA *brna)
"If a vertex is further away from offset plane than this, then it is not affected");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop = RNA_def_property(srna, "plane_trim_decay", PROP_FLOAT, PROP_DISTANCE);
prop = RNA_def_property(srna, "plane_trim_decay", PROP_FLOAT, PROP_NONE);
farsthary marked this conversation as resolved Outdated

Based on your comment in the chat, I assume you wanted this to be a raw value instead of distance, the subtype here should be PROP_NONE then instead of PROP_DISTANCE

Based on your comment in the chat, I assume you wanted this to be a raw value instead of distance, the subtype here should be `PROP_NONE` then instead of `PROP_DISTANCE`
RNA_def_property_float_sdna(prop, nullptr, "plane_trim_decay");
RNA_def_property_range(prop, 0, 50.0f);
RNA_def_property_ui_text(
prop,
"Plane Trim Decay",
"If a vertex is away from offset plane, its deformation exponentially attenuates");
"Exponential decay's rate of the brush strength based on the distance from the offset plane");
farsthary marked this conversation as resolved Outdated

This description is a bit confusing to me from a user perspective. I don't have a good suggestion for rewording it, but I think making it clear that this value is the strength (rate?) of the falloff would be clearer.

This description is a bit confusing to me from a user perspective. I don't have a good suggestion for rewording it, but I think making it clear that this value is the strength (rate?) of the falloff would be clearer.
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop = RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE);