Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-05-11 21:42:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-05-11 21:42:45 +0300
commit135064c45e33ed017379b6348e7f626b07e2722d (patch)
tree8c1fabf113f3108502019350cbef6438d45e4cce
parent1b003511be5c8a048ed376f8dec9372b7b1b86fb (diff)
BMesh: remove exception from face-join function
Callers need to check for NULL, if we need to know exact cause it could be a return arg.
-rw-r--r--source/blender/bmesh/intern/bmesh_core.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c
index c03b882abb2..d86e7f6243c 100644
--- a/source/blender/bmesh/intern/bmesh_core.c
+++ b/source/blender/bmesh/intern/bmesh_core.c
@@ -1246,7 +1246,6 @@ BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface, const bool do_del)
BLI_array_staticdeclare(deledges, BM_DEFAULT_NGON_STACK_SIZE);
BLI_array_staticdeclare(delverts, BM_DEFAULT_NGON_STACK_SIZE);
BMVert *v1 = NULL, *v2 = NULL;
- const char *err = NULL;
int i, tote = 0;
const int cd_loop_mdisp_offset = CustomData_get_offset(&bm->ldata, CD_MDISPS);
@@ -1267,7 +1266,7 @@ BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface, const bool do_del)
int rlen = bm_loop_systag_count_radial(l_iter, _FLAG_JF);
if (rlen > 2) {
- err = N_("Input faces do not form a contiguous manifold region");
+ /* Input faces do not form a contiguous manifold region */
goto error;
}
else if (rlen == 1) {
@@ -1328,9 +1327,8 @@ BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface, const bool do_del)
/* create region face */
f_new = tote ? BM_face_create_ngon(bm, v1, v2, edges, tote, faces[0], BM_CREATE_NOP) : NULL;
- if (UNLIKELY(!f_new || BMO_error_occurred(bm))) {
- if (!BMO_error_occurred(bm))
- err = N_("Invalid boundary region to join faces");
+ if (UNLIKELY(f_new == NULL)) {
+ /* Invalid boundary region to join faces */
goto error;
}
@@ -1428,9 +1426,6 @@ error:
BLI_array_free(deledges);
BLI_array_free(delverts);
- if (err) {
- BMO_error_raise(bm, bm->currentop, BMERR_DISSOLVEFACES_FAILED, err);
- }
return NULL;
}