diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2022-07-19 17:43:38 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2022-07-19 20:13:00 +0300 |
commit | d14c2d549b2fdde2a116f6a37837a1e3776da3cb (patch) | |
tree | 474953da9d9674d57c85e1172e53509c300b6a4c /source/blender/editors/transform/transform_mode_edge_crease.c | |
parent | 597955d0a82eb20805d1c9d567b82b1a51b39ccf (diff) |
Fix T99643: Vertex Crease fails with symmetry
Create a transform conversion type that only considers the Vertex
Custom Data.
This reduces the complexity of converting Meshes and slightly
optimizes the transformation.
Diffstat (limited to 'source/blender/editors/transform/transform_mode_edge_crease.c')
-rw-r--r-- | source/blender/editors/transform/transform_mode_edge_crease.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/editors/transform/transform_mode_edge_crease.c b/source/blender/editors/transform/transform_mode_edge_crease.c index f1acc2a4c9a..1a3ccf30387 100644 --- a/source/blender/editors/transform/transform_mode_edge_crease.c +++ b/source/blender/editors/transform/transform_mode_edge_crease.c @@ -44,17 +44,12 @@ static void transdata_elem_crease(const TransInfo *UNUSED(t), TransData *td, const float crease) { - if (td->val == NULL) { + if (td->loc == NULL) { return; } - *td->val = td->ival + crease * td->factor; - if (*td->val < 0.0f) { - *td->val = 0.0f; - } - if (*td->val > 1.0f) { - *td->val = 1.0f; - } + *td->loc = td->iloc[0] + crease * td->factor; + CLAMP(*td->loc, 0.0f, 1.0f); } static void transdata_elem_crease_fn(void *__restrict iter_data_v, |