diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-01-05 15:45:22 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-01-05 15:46:07 +0300 |
commit | f41de6dc46ad0849d93b72580fefffdde4546cba (patch) | |
tree | 68b65f9ca33504f16bc25706e48d77f7f67c01dc /source/blender/editors | |
parent | fab772860d95a24e9989a40f72487b82af5dc388 (diff) |
Fix T84404: Crash when using Skin Resize in mesh without Skin modifier
Caused by rB54ee4109143b
Before that commit `TD_SKIP` was marked for all vertices.
Now skip the whole operation as all vertices are skipped.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/transform/transform_convert_mesh_skin.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_convert_mesh_skin.c b/source/blender/editors/transform/transform_convert_mesh_skin.c index f2c35bb1048..4c42ed6ca1e 100644 --- a/source/blender/editors/transform/transform_convert_mesh_skin.c +++ b/source/blender/editors/transform/transform_convert_mesh_skin.c @@ -52,6 +52,7 @@ static void mesh_skin_transdata_create(TransDataBasic *td, BMEditMesh *em, BMVer { BLI_assert(BM_elem_flag_test(eve, BM_ELEM_HIDDEN) == 0); MVertSkin *vs = CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MVERT_SKIN); + td->flag = 0; if (vs) { copy_v3_v3(td->iloc, vs->radius); td->loc = vs->radius; @@ -60,8 +61,6 @@ static void mesh_skin_transdata_create(TransDataBasic *td, BMEditMesh *em, BMVer td->flag |= TD_SKIP; } - td->flag = 0; - if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) { td->flag |= TD_SELECTED; } @@ -93,6 +92,10 @@ void createTransMeshSkin(TransInfo *t) * transform data is created by selected vertices. */ + if (!CustomData_has_layer(&bm->vdata, CD_MVERT_SKIN)) { + continue; + } + /* Support other objects using PET to adjust these, unless connected is enabled. */ if ((!prop_mode || (prop_mode & T_PROP_CONNECTED)) && (bm->totvertsel == 0)) { continue; |