fix for 2 errors introduced since release
- shape key NULL pointer dereference. - use uninitialized variable for bmesh free. also update credits and merge dissolve flag assignment.
This commit is contained in:
@@ -168,9 +168,8 @@ void BM_mesh_data_free(BMesh *bm)
|
|||||||
BMIter iter;
|
BMIter iter;
|
||||||
BMIter itersub;
|
BMIter itersub;
|
||||||
|
|
||||||
bool is_ldata_free;
|
const bool is_ldata_free = CustomData_bmesh_has_free(&bm->ldata);
|
||||||
bool is_pdata_free;
|
const bool is_pdata_free = CustomData_bmesh_has_free(&bm->pdata);
|
||||||
|
|
||||||
|
|
||||||
/* Check if we have to call free, if not we can avoid a lot of looping */
|
/* Check if we have to call free, if not we can avoid a lot of looping */
|
||||||
if (CustomData_bmesh_has_free(&(bm->vdata))) {
|
if (CustomData_bmesh_has_free(&(bm->vdata))) {
|
||||||
@@ -184,9 +183,7 @@ void BM_mesh_data_free(BMesh *bm)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((is_ldata_free = CustomData_bmesh_has_free(&(bm->ldata))) ||
|
if (is_ldata_free || is_pdata_free) {
|
||||||
(is_pdata_free = CustomData_bmesh_has_free(&(bm->pdata))))
|
|
||||||
{
|
|
||||||
BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) {
|
BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) {
|
||||||
if (is_pdata_free)
|
if (is_pdata_free)
|
||||||
CustomData_bmesh_free_block(&(bm->pdata), &(f->head.data));
|
CustomData_bmesh_free_block(&(bm->pdata), &(f->head.data));
|
||||||
|
@@ -403,8 +403,7 @@ void bmo_dissolve_verts_exec(BMesh *bm, BMOperator *op)
|
|||||||
}
|
}
|
||||||
|
|
||||||
BM_ITER_ELEM (f, &fiter, v, BM_FACES_OF_VERT) {
|
BM_ITER_ELEM (f, &fiter, v, BM_FACES_OF_VERT) {
|
||||||
BMO_elem_flag_enable(bm, f, FACE_ORIG);
|
BMO_elem_flag_enable(bm, f, FACE_MARK | FACE_ORIG);
|
||||||
BMO_elem_flag_enable(bm, f, FACE_MARK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check if our additions to the input to face dissolve
|
/* check if our additions to the input to face dissolve
|
||||||
@@ -412,8 +411,7 @@ void bmo_dissolve_verts_exec(BMesh *bm, BMOperator *op)
|
|||||||
if (!test_extra_verts(bm, v)) {
|
if (!test_extra_verts(bm, v)) {
|
||||||
BM_ITER_ELEM (f, &fiter, v, BM_FACES_OF_VERT) {
|
BM_ITER_ELEM (f, &fiter, v, BM_FACES_OF_VERT) {
|
||||||
if (BMO_elem_flag_test(bm, f, FACE_ORIG)) {
|
if (BMO_elem_flag_test(bm, f, FACE_ORIG)) {
|
||||||
BMO_elem_flag_disable(bm, f, FACE_MARK);
|
BMO_elem_flag_disable(bm, f, FACE_MARK | FACE_ORIG);
|
||||||
BMO_elem_flag_disable(bm, f, FACE_ORIG);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -145,7 +145,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
|
|||||||
|
|
||||||
/* derivedMesh might be needed for solving parenting,
|
/* derivedMesh might be needed for solving parenting,
|
||||||
* so re-create it here */
|
* so re-create it here */
|
||||||
makeDerivedMesh(scene, obedit, em, CD_MASK_BAREMESH|CD_MASK_ORIGINDEX, 0);
|
makeDerivedMesh(scene, obedit, em, CD_MASK_BAREMESH | CD_MASK_ORIGINDEX, 0);
|
||||||
|
|
||||||
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
|
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
|
||||||
if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
|
if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
|
||||||
|
@@ -458,10 +458,10 @@ static int shape_key_move_exec(bContext *C, wmOperator *op)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SWAP(float, kb_other->pos, kb->pos); /* for absolute shape keys */
|
SWAP(float, kb_other->pos, kb->pos); /* for absolute shape keys */
|
||||||
}
|
|
||||||
|
|
||||||
/* First key is refkey, matches interface and BKE_key_sort */
|
/* First key is refkey, matches interface and BKE_key_sort */
|
||||||
key->refkey = key->block.first;
|
key->refkey = key->block.first;
|
||||||
|
}
|
||||||
|
|
||||||
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||||
WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
|
WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
|
||||||
|
Reference in New Issue
Block a user