diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-03-29 11:32:57 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-03-29 12:11:54 +0300 |
commit | dd662c74ae9533dae02b3e9b01417b71a7f3ff26 (patch) | |
tree | 8111db63d9e1e38f04e687cf034cbaaf779973ee /source/blender/editors | |
parent | a7ca9918414f87aa55aa1eaeba66c5728f45117f (diff) |
Fix skin mark operator
Accessed custom-data layer offset before creating.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index d601f5c3b14..06d306ded42 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -1484,7 +1484,6 @@ static int skin_root_mark_exec(bContext *C, wmOperator *UNUSED(op)) Object *ob = CTX_data_edit_object(C); BMEditMesh *em = BKE_editmesh_from_object(ob); BMesh *bm = em->bm; - const int cd_vert_skin_offset = CustomData_get_offset(&bm->vdata, CD_MVERT_SKIN); BMVert *bm_vert; BMIter bm_iter; GSet *visited; @@ -1493,6 +1492,8 @@ static int skin_root_mark_exec(bContext *C, wmOperator *UNUSED(op)) BKE_mesh_ensure_skin_customdata(ob->data); + const int cd_vert_skin_offset = CustomData_get_offset(&bm->vdata, CD_MVERT_SKIN); + BM_ITER_MESH (bm_vert, &bm_iter, bm, BM_VERTS_OF_MESH) { if (BM_elem_flag_test(bm_vert, BM_ELEM_SELECT) && BLI_gset_add(visited, bm_vert)) |