diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_DerivedMesh.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_cdderivedmesh.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 16 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/cdderivedmesh.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/multires.c | 14 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/rigidbody.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 2 |
8 files changed, 23 insertions, 23 deletions
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h index 2bba968e03b..6ffa126713d 100644 --- a/source/blender/blenkernel/BKE_DerivedMesh.h +++ b/source/blender/blenkernel/BKE_DerivedMesh.h @@ -651,7 +651,7 @@ DerivedMesh *getEditDerivedBMesh(struct BMEditMesh *em, struct Object *ob, DerivedMesh *mesh_create_derived_index_render(struct Scene *scene, struct Object *ob, CustomDataMask dataMask, int index); /* same as above but wont use render settings */ -DerivedMesh *mesh_create_derived(struct Mesh *me, struct Object *ob, float (*vertCos)[3]); +DerivedMesh *mesh_create_derived(struct Mesh *me, float (*vertCos)[3]); DerivedMesh *mesh_create_derived_view(struct Scene *scene, struct Object *ob, CustomDataMask dataMask); DerivedMesh *mesh_create_derived_no_deform(struct Scene *scene, struct Object *ob, diff --git a/source/blender/blenkernel/BKE_cdderivedmesh.h b/source/blender/blenkernel/BKE_cdderivedmesh.h index 560617db474..7006b2904ac 100644 --- a/source/blender/blenkernel/BKE_cdderivedmesh.h +++ b/source/blender/blenkernel/BKE_cdderivedmesh.h @@ -53,7 +53,7 @@ int CDDM_Check(struct DerivedMesh *dm); * original data in Mesh, but it is safe to apply vertex coordinates or * calculate normals as those functions will automatically create new * data to not overwrite the original */ -struct DerivedMesh *CDDM_from_mesh(struct Mesh *mesh, struct Object *ob); +struct DerivedMesh *CDDM_from_mesh(struct Mesh *mesh); struct DerivedMesh *CDDM_from_bmesh(struct BMesh *bm, int use_mdisps); diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 5c98fe48ea6..341e8e671c7 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -838,9 +838,9 @@ void DM_interp_poly_data(DerivedMesh *source, DerivedMesh *dest, } /// -DerivedMesh *mesh_create_derived(Mesh *me, Object *ob, float (*vertCos)[3]) +DerivedMesh *mesh_create_derived(Mesh *me, float (*vertCos)[3]) { - DerivedMesh *dm = CDDM_from_mesh(me, ob); + DerivedMesh *dm = CDDM_from_mesh(me); if (!dm) return NULL; @@ -874,7 +874,7 @@ DerivedMesh *mesh_create_derived_for_modifier(Scene *scene, Object *ob, float (*deformedVerts)[3] = BKE_mesh_vertexCos_get(me, &numVerts); modwrap_deformVerts(md, ob, NULL, deformedVerts, numVerts, 0); - dm = mesh_create_derived(me, ob, deformedVerts); + dm = mesh_create_derived(me, deformedVerts); if (build_shapekey_layers) add_shapekey_layers(dm, me, ob); @@ -882,7 +882,7 @@ DerivedMesh *mesh_create_derived_for_modifier(Scene *scene, Object *ob, MEM_freeN(deformedVerts); } else { - DerivedMesh *tdm = mesh_create_derived(me, ob, NULL); + DerivedMesh *tdm = mesh_create_derived(me, NULL); if (build_shapekey_layers) add_shapekey_layers(tdm, me, ob); @@ -953,7 +953,7 @@ static DerivedMesh *create_orco_dm(Object *ob, Mesh *me, BMEditMesh *em, int lay int free; if (em) dm = CDDM_from_editbmesh(em, FALSE, FALSE); - else dm = CDDM_from_mesh(me, ob); + else dm = CDDM_from_mesh(me); orco = get_orco_coords_dm(ob, em, layer, &free); @@ -1533,7 +1533,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos * coordinates (vpaint, etc.) */ if (deform_r) { - *deform_r = CDDM_from_mesh(me, ob); + *deform_r = CDDM_from_mesh(me); if (build_shapekey_layers) add_shapekey_layers(dm, me, ob); @@ -1659,7 +1659,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos } } else { - dm = CDDM_from_mesh(me, ob); + dm = CDDM_from_mesh(me); ASSERT_IS_VALID_DM(dm); if (build_shapekey_layers) @@ -1823,7 +1823,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos #endif } else { - finaldm = CDDM_from_mesh(me, ob); + finaldm = CDDM_from_mesh(me); if (build_shapekey_layers) { add_shapekey_layers(finaldm, me, ob); diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index d9447e51aa3..32914dedde1 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -1802,9 +1802,9 @@ DerivedMesh *CDDM_new(int numVerts, int numEdges, int numTessFaces, int numLoops return dm; } -DerivedMesh *CDDM_from_mesh(Mesh *mesh, Object *UNUSED(ob)) +DerivedMesh *CDDM_from_mesh(Mesh *mesh) { - CDDerivedMesh *cddm = cdDM_create("CDDM_from_mesh dm"); + CDDerivedMesh *cddm = cdDM_create(__func__); DerivedMesh *dm = &cddm->dm; CustomDataMask mask = CD_MASK_MESH & (~CD_MASK_MDISPS); int alloctype; diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index 722ea536ed2..2189fbd2f55 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -769,7 +769,7 @@ void multiresModifier_base_apply(MultiresModifierData *mmd, Object *ob) /* XXX - probably not necessary to regenerate the cddm so much? */ /* generate highest level with displacements */ - cddm = CDDM_from_mesh(me, NULL); + cddm = CDDM_from_mesh(me); DM_set_only_copy(cddm, CD_MASK_BAREMESH); dispdm = multires_dm_create_local(ob, cddm, totlvl, totlvl, 0, 0); cddm->release(cddm); @@ -782,7 +782,7 @@ void multiresModifier_base_apply(MultiresModifierData *mmd, Object *ob) /* heuristic to produce a better-fitting base mesh */ - cddm = CDDM_from_mesh(me, NULL); + cddm = CDDM_from_mesh(me); pmap = cddm->getPolyMap(ob, cddm); origco = MEM_callocN(sizeof(float) * 3 * me->totvert, "multires apply base origco"); for (i = 0; i < me->totvert; ++i) @@ -865,7 +865,7 @@ void multiresModifier_base_apply(MultiresModifierData *mmd, Object *ob) BKE_mesh_calc_normals(me); /* subdivide the mesh to highest level without displacements */ - cddm = CDDM_from_mesh(me, NULL); + cddm = CDDM_from_mesh(me); DM_set_only_copy(cddm, CD_MASK_BAREMESH); origdm = subsurf_dm_create_local(ob, cddm, totlvl, 0, 0, mmd->flags & eMultiresModifierFlag_PlainUv, 0); cddm->release(cddm); @@ -902,7 +902,7 @@ static void multires_subdivide(MultiresModifierData *mmd, Object *ob, int totlvl int has_mask = CustomData_has_layer(&me->ldata, CD_GRID_PAINT_MASK); /* create subsurf DM from original mesh at high level */ - cddm = CDDM_from_mesh(me, NULL); + cddm = CDDM_from_mesh(me); DM_set_only_copy(cddm, CD_MASK_BAREMESH); highdm = subsurf_dm_create_local(ob, cddm, totlvl, simple, 0, mmd->flags & eMultiresModifierFlag_PlainUv, has_mask); ss = ((CCGDerivedMesh *)highdm)->ss; @@ -1174,7 +1174,7 @@ void multires_modifier_update_mdisps(struct DerivedMesh *dm) /* create subsurf DM from original mesh at high level */ if (ob->derivedDeform) cddm = CDDM_copy(ob->derivedDeform); - else cddm = CDDM_from_mesh(me, NULL); + else cddm = CDDM_from_mesh(me); DM_set_only_copy(cddm, CD_MASK_BAREMESH); highdm = subsurf_dm_create_local(ob, cddm, totlvl, mmd->simple, 0, mmd->flags & eMultiresModifierFlag_PlainUv, has_mask); @@ -1236,7 +1236,7 @@ void multires_modifier_update_mdisps(struct DerivedMesh *dm) int has_mask = CustomData_has_layer(&me->ldata, CD_GRID_PAINT_MASK); if (ob->derivedDeform) cddm = CDDM_copy(ob->derivedDeform); - else cddm = CDDM_from_mesh(me, NULL); + else cddm = CDDM_from_mesh(me); DM_set_only_copy(cddm, CD_MASK_BAREMESH); subdm = subsurf_dm_create_local(ob, cddm, mmd->totlvl, mmd->simple, 0, mmd->flags & eMultiresModifierFlag_PlainUv, has_mask); @@ -2114,7 +2114,7 @@ void multires_load_old(Object *ob, Mesh *me) multiresModifier_subdivide(mmd, ob, 1, 0); mmd->lvl = mmd->totlvl; - orig = CDDM_from_mesh(me, NULL); + orig = CDDM_from_mesh(me); /* XXX We *must* alloc paint mask here, else we have some kind of mismatch in * multires_modifier_update_mdisps() (called by dm->release(dm)), which always creates the * reference subsurfed dm with this option, before calling multiresModifier_disp_run(), diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 0f5707f9a60..37ca502970d 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -1106,7 +1106,7 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D /* Grid distribution */ if (part->distr==PART_DISTR_GRID && from != PART_FROM_VERT) { BLI_srandom(31415926 + psys->seed); - dm= CDDM_from_mesh((Mesh*)ob->data, ob); + dm= CDDM_from_mesh((Mesh*)ob->data); DM_ensure_tessface(dm); distribute_grid(dm,psys); dm->release(dm); @@ -1145,7 +1145,7 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D if (psys->part->use_modifier_stack) dm = finaldm; else - dm= CDDM_from_mesh((Mesh*)ob->data, ob); + dm= CDDM_from_mesh((Mesh*)ob->data); /* BMESH ONLY, for verts we don't care about tessfaces */ if (from != PART_FROM_VERT) { diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c index 600805e71ce..1a7782f4b89 100644 --- a/source/blender/blenkernel/intern/rigidbody.c +++ b/source/blender/blenkernel/intern/rigidbody.c @@ -256,7 +256,7 @@ static rbCollisionShape *rigidbody_get_shape_trimesh_from_mesh(Object *ob) rbCollisionShape *shape = NULL; if (ob->type == OB_MESH) { - DerivedMesh *dm = CDDM_from_mesh(ob->data, ob); + DerivedMesh *dm = CDDM_from_mesh(ob->data); MVert *mvert; MFace *mface; diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index e94db6f637c..188c80e7cc8 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -3693,7 +3693,7 @@ void subsurf_calculate_limit_positions(Mesh *me, float (*positions_r)[3]) CCGSubSurf *ss = _getSubSurf(NULL, 1, 3, CCG_USE_ARENA); float edge_sum[3], face_sum[3]; CCGVertIterator *vi; - DerivedMesh *dm = CDDM_from_mesh(me, NULL); + DerivedMesh *dm = CDDM_from_mesh(me); ss_sync_from_derivedmesh(ss, dm, NULL, 0); |