remove unneeded scene pointer
This commit is contained in:
@@ -118,7 +118,6 @@ typedef struct BMesh {
|
||||
struct BMEdge **edar;
|
||||
struct BMLoop **lpar;
|
||||
struct BMFace **plar;
|
||||
struct Scene *scene;
|
||||
int vtarlen, edarlen, lparlen, plarlen;
|
||||
int totvert, totedge, totface, totloop;
|
||||
int nextv, nexte, nextp, nextl;
|
||||
@@ -170,7 +169,7 @@ typedef struct BMFace {
|
||||
void bmesh_error(void);
|
||||
|
||||
/*Mesh Level Ops */
|
||||
struct BMesh *BM_Make_Mesh(int allocsize[4], struct Scene *scene);
|
||||
struct BMesh *BM_Make_Mesh(int allocsize[4]);
|
||||
void BM_Free_Mesh(struct BMesh *bm);
|
||||
void BM_Compute_Normals(struct BMesh *bm);
|
||||
|
||||
@@ -199,7 +198,7 @@ void BM_Data_Facevert_Edgeinterp(struct BMesh *bm, struct BMVert *v1, struct BMV
|
||||
//void bmesh_data_interp_from_face(struct BMesh *bm, struct BMFace *source, struct BMFace *target);
|
||||
|
||||
struct EditMesh;
|
||||
BMesh *editmesh_to_bmesh(struct EditMesh *em, struct Scene *scene);
|
||||
BMesh *editmesh_to_bmesh(struct EditMesh *em);
|
||||
struct EditMesh *bmesh_to_editmesh(BMesh *bm);
|
||||
|
||||
/*include the rest of the API*/
|
||||
|
||||
@@ -97,7 +97,7 @@ int bmesh_test_sysflag(BMHeader *head, int flag)
|
||||
*
|
||||
*/
|
||||
|
||||
BMesh *BM_Make_Mesh(int allocsize[4], struct Scene *scene)
|
||||
BMesh *BM_Make_Mesh(int allocsize[4])
|
||||
{
|
||||
/*allocate the structure*/
|
||||
BMesh *bm = MEM_callocN(sizeof(BMesh),"BM");
|
||||
@@ -106,7 +106,6 @@ BMesh *BM_Make_Mesh(int allocsize[4], struct Scene *scene)
|
||||
bm->epool = BLI_mempool_create(sizeof(BMEdge), allocsize[1], allocsize[1]);
|
||||
bm->lpool = BLI_mempool_create(sizeof(BMLoop), allocsize[2], allocsize[2]);
|
||||
bm->ppool = BLI_mempool_create(sizeof(BMFace), allocsize[3], allocsize[3]);
|
||||
bm->scene = scene;
|
||||
|
||||
/*allocate one flag pool that we dont get rid of.*/
|
||||
bm->flagpool = BLI_mempool_create(sizeof(BMFlagLayer), 512, 512);
|
||||
|
||||
@@ -201,8 +201,6 @@ EditMesh *bmesh_to_editmesh_intern(BMesh *bm)
|
||||
if(bm->selectmode & BM_EDGE) em->selectmode |= SCE_SELECT_EDGE;
|
||||
if(bm->selectmode & BM_FACE) em->selectmode |= SCE_SELECT_FACE;
|
||||
|
||||
bm->scene->selectmode = em->selectmode;
|
||||
|
||||
CustomData_copy(&bm->vdata, &em->vdata, CD_MASK_BMESH, CD_CALLOC, 0);
|
||||
CustomData_copy(&bm->edata, &em->edata, CD_MASK_BMESH, CD_CALLOC, 0);
|
||||
CustomData_copy(&bm->pdata, &em->fdata, CD_MASK_BMESH, CD_CALLOC, 0);
|
||||
|
||||
@@ -395,14 +395,14 @@ void edit2bmesh_exec(BMesh *bmesh, BMOperator *op)
|
||||
editmesh_to_bmesh_intern(op->slots[BMOP_FROM_EDITMESH_EM].data.p, bmesh);
|
||||
}
|
||||
|
||||
BMesh *editmesh_to_bmesh(EditMesh *em, struct Scene *scene)
|
||||
BMesh *editmesh_to_bmesh(EditMesh *em)
|
||||
{
|
||||
BMOperator conv;
|
||||
BMesh *bm;
|
||||
int allocsize[4] = {512,512,2048,512}, numTex, numCol;
|
||||
|
||||
/*allocate a bmesh*/
|
||||
bm = BM_Make_Mesh(allocsize, scene);
|
||||
bm = BM_Make_Mesh(allocsize);
|
||||
|
||||
BMO_Init_Op(&conv, BMOP_FROM_EDITMESH);
|
||||
BMO_Set_Pnt(&conv, BMOP_FROM_EDITMESH_EM, em);
|
||||
|
||||
Reference in New Issue
Block a user