diff options
Diffstat (limited to 'source/blender')
-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 | ||||
-rw-r--r-- | source/blender/collada/collada_utils.cpp | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_bake.c | 4 | ||||
-rw-r--r-- | source/blender/editors/util/crazyspace.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_armature.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_collision.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_util.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_weightvgproximity.c | 2 |
16 files changed, 32 insertions, 32 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); diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp index 2e805ce18f1..f5b81c6f6b0 100644 --- a/source/blender/collada/collada_utils.cpp +++ b/source/blender/collada/collada_utils.cpp @@ -160,7 +160,7 @@ Mesh *bc_get_mesh_copy(Scene *scene, Object *ob, BC_export_mesh_type export_mesh } } else { - dm = mesh_create_derived((Mesh *)ob->data, ob, NULL); + dm = mesh_create_derived((Mesh *)ob->data, NULL); } tmpmesh = BKE_mesh_add(G.main, "ColladaMesh"); // name is not important here diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index 55564703a87..b8a96bba874 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -209,7 +209,7 @@ static DerivedMesh *multiresbake_create_loresdm(Scene *scene, Object *ob, int *l MultiresModifierData *mmd = get_multires_modifier(scene, ob, 0); Mesh *me = (Mesh *)ob->data; MultiresModifierData tmp_mmd = *mmd; - DerivedMesh *cddm = CDDM_from_mesh(me, ob); + DerivedMesh *cddm = CDDM_from_mesh(me); if (mmd->lvl > 0) { *lvl = mmd->lvl; @@ -234,7 +234,7 @@ static DerivedMesh *multiresbake_create_hiresdm(Scene *scene, Object *ob, int *l Mesh *me = (Mesh *)ob->data; MultiresModifierData *mmd = get_multires_modifier(scene, ob, 0); MultiresModifierData tmp_mmd = *mmd; - DerivedMesh *cddm = CDDM_from_mesh(me, ob); + DerivedMesh *cddm = CDDM_from_mesh(me); DerivedMesh *dm; DM_set_only_copy(cddm, CD_MASK_BAREMESH); diff --git a/source/blender/editors/util/crazyspace.c b/source/blender/editors/util/crazyspace.c index ff65e11f53e..e8146c34f5e 100644 --- a/source/blender/editors/util/crazyspace.c +++ b/source/blender/editors/util/crazyspace.c @@ -344,7 +344,7 @@ int sculpt_get_first_deform_matrices(Scene *scene, Object *ob, float (**deformma if (mti->type == eModifierTypeType_OnlyDeform) { if (!defmats) { Mesh *me = (Mesh *)ob->data; - dm = mesh_create_derived(me, ob, NULL); + dm = mesh_create_derived(me, NULL); deformedVerts = BKE_mesh_vertexCos_get(me, &numVerts); defmats = MEM_callocN(sizeof(*defmats) * numVerts, "defmats"); diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index 0f71e26b687..f29eb7800b5 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -384,7 +384,7 @@ void rna_Object_dm_info(struct Object *ob, int type, char *result) switch (type) { case 0: if (ob->type == OB_MESH) { - dm = CDDM_from_mesh(ob->data, ob); + dm = CDDM_from_mesh(ob->data); ret = DM_debug_info(dm); dm_release = TRUE; } diff --git a/source/blender/modifiers/intern/MOD_armature.c b/source/blender/modifiers/intern/MOD_armature.c index 3ab7bff0e63..e81fc44f238 100644 --- a/source/blender/modifiers/intern/MOD_armature.c +++ b/source/blender/modifiers/intern/MOD_armature.c @@ -179,7 +179,7 @@ static void deformMatrices(ModifierData *md, Object *ob, DerivedMesh *derivedDat ArmatureModifierData *amd = (ArmatureModifierData *) md; DerivedMesh *dm = derivedData; - if (!derivedData) dm = CDDM_from_mesh((Mesh *)ob->data, ob); + if (!derivedData) dm = CDDM_from_mesh((Mesh *)ob->data); armature_deform_verts(amd->object, ob, dm, vertexCos, defMats, numVerts, amd->deformflag, NULL, amd->defgrp_name); diff --git a/source/blender/modifiers/intern/MOD_collision.c b/source/blender/modifiers/intern/MOD_collision.c index 9335d7577c7..1f24662960a 100644 --- a/source/blender/modifiers/intern/MOD_collision.c +++ b/source/blender/modifiers/intern/MOD_collision.c @@ -116,7 +116,7 @@ static void deformVerts(ModifierData *md, Object *ob, /* if possible use/create DerivedMesh */ if (derivedData) dm = CDDM_copy(derivedData); - else if (ob->type == OB_MESH) dm = CDDM_from_mesh(ob->data, ob); + else if (ob->type == OB_MESH) dm = CDDM_from_mesh(ob->data); if (!ob->pd) { printf("CollisionModifier deformVerts: Should not happen!\n"); diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c index a46314cd749..62a02928920 100644 --- a/source/blender/modifiers/intern/MOD_util.c +++ b/source/blender/modifiers/intern/MOD_util.c @@ -183,7 +183,7 @@ DerivedMesh *get_dm(Object *ob, struct BMEditMesh *em, DerivedMesh *dm, } else if (ob->type == OB_MESH) { if (em) dm = CDDM_from_editbmesh(em, FALSE, FALSE); - else dm = CDDM_from_mesh((struct Mesh *)(ob->data), ob); + else dm = CDDM_from_mesh((struct Mesh *)(ob->data)); if (vertexCos) { CDDM_apply_vert_coords(dm, vertexCos); diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 06f4664c11b..ecb99974472 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -473,7 +473,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der if (me->edit_btmesh) target_dm = CDDM_from_editbmesh(me->edit_btmesh, FALSE, FALSE); else - target_dm = CDDM_from_mesh(me, obr); + target_dm = CDDM_from_mesh(me); } free_target_dm = TRUE; } |