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>2012-03-02 00:09:17 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-02 00:09:17 +0400
commit9aafe32147064a41aa653a95c89b50d9585ab3c1 (patch)
tree8d3f000b54f9adf3245548cb4586973ea5f3ec22 /source/blender/editors
parentd534f0e16dfdf3ed2a3360ad9f317a258cd8cc8e (diff)
bmmesh api - use struct rather than int[4] to initialize mesh sizes.
also correct bad assert() in previous commit.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/mesh/bmesh_tools.c10
-rw-r--r--source/blender/editors/mesh/bmesh_utils.c2
-rw-r--r--source/blender/editors/mesh/knifetool.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/mesh/bmesh_tools.c b/source/blender/editors/mesh/bmesh_tools.c
index cf30af4f7e2..8cf798e4a4a 100644
--- a/source/blender/editors/mesh/bmesh_tools.c
+++ b/source/blender/editors/mesh/bmesh_tools.c
@@ -3206,16 +3206,16 @@ static int mesh_separate_selected(Main *bmain, Scene *scene, Base *editbase, wmO
if (!em)
return OPERATOR_CANCELLED;
- bmnew = BM_mesh_create(obedit, bm_mesh_allocsize_default);
+ bmnew = BM_mesh_create(obedit, &bm_mesh_allocsize_default);
CustomData_copy(&em->bm->vdata, &bmnew->vdata, CD_MASK_BMESH, CD_CALLOC, 0);
CustomData_copy(&em->bm->edata, &bmnew->edata, CD_MASK_BMESH, CD_CALLOC, 0);
CustomData_copy(&em->bm->ldata, &bmnew->ldata, CD_MASK_BMESH, CD_CALLOC, 0);
CustomData_copy(&em->bm->pdata, &bmnew->pdata, CD_MASK_BMESH, CD_CALLOC, 0);
- CustomData_bmesh_init_pool(&bmnew->vdata, bm_mesh_allocsize_default[0]);
- CustomData_bmesh_init_pool(&bmnew->edata, bm_mesh_allocsize_default[1]);
- CustomData_bmesh_init_pool(&bmnew->ldata, bm_mesh_allocsize_default[2]);
- CustomData_bmesh_init_pool(&bmnew->pdata, bm_mesh_allocsize_default[3]);
+ CustomData_bmesh_init_pool(&bmnew->vdata, bm_mesh_allocsize_default.totvert);
+ CustomData_bmesh_init_pool(&bmnew->edata, bm_mesh_allocsize_default.totedge);
+ CustomData_bmesh_init_pool(&bmnew->ldata, bm_mesh_allocsize_default.totloop);
+ CustomData_bmesh_init_pool(&bmnew->pdata, bm_mesh_allocsize_default.totface);
basenew = ED_object_add_duplicate(bmain, scene, editbase, USER_DUP_MESH); /* 0 = fully linked */
assign_matarar(basenew->object, give_matarar(obedit), *give_totcolp(obedit)); /* new in 2.5 */
diff --git a/source/blender/editors/mesh/bmesh_utils.c b/source/blender/editors/mesh/bmesh_utils.c
index e5c79150dab..830534e3315 100644
--- a/source/blender/editors/mesh/bmesh_utils.c
+++ b/source/blender/editors/mesh/bmesh_utils.c
@@ -546,7 +546,7 @@ static void undoMesh_to_editbtMesh(void *umv, void *emv, void *UNUSED(obdata))
BMEdit_Free(em);
- bm = BM_mesh_create(ob, bm_mesh_allocsize_default);
+ bm = BM_mesh_create(ob, &bm_mesh_allocsize_default);
BMO_op_callf(bm, "mesh_to_bmesh mesh=%p object=%p set_shapekey=%b", &um->me, ob, FALSE);
em2 = BMEdit_Create(bm, TRUE);
diff --git a/source/blender/editors/mesh/knifetool.c b/source/blender/editors/mesh/knifetool.c
index bc2f01a2483..ba0067faaaa 100644
--- a/source/blender/editors/mesh/knifetool.c
+++ b/source/blender/editors/mesh/knifetool.c
@@ -29,13 +29,13 @@
#include "MEM_guardedalloc.h"
-
#include "BLI_blenlib.h"
#include "BLI_array.h"
#include "BLI_math.h"
#include "BLI_rand.h"
#include "BLI_smallhash.h"
#include "BLI_scanfill.h"
+#include "BLI_memarena.h"
#include "BKE_DerivedMesh.h"
#include "BKE_context.h"