diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/editmesh_tangent.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/effect.c | 19 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh_runtime.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh_validate.c | 1 |
5 files changed, 15 insertions, 18 deletions
diff --git a/source/blender/blenkernel/intern/editmesh_tangent.c b/source/blender/blenkernel/intern/editmesh_tangent.c index 9e8b4fa8782..4231ad54ea8 100644 --- a/source/blender/blenkernel/intern/editmesh_tangent.c +++ b/source/blender/blenkernel/intern/editmesh_tangent.c @@ -25,7 +25,9 @@ #include "BLI_math.h" #include "BLI_task.h" -#include "BKE_DerivedMesh.h" +#include "DNA_defs.h" +#include "DNA_customdata_types.h" +#include "DNA_meshdata_types.h" #include "BKE_mesh.h" #include "BKE_mesh_tangent.h" /* for utility functions */ @@ -360,7 +362,7 @@ void BKE_editmesh_loop_tangent_calc( mesh2tangent->face_as_quad_map = face_as_quad_map; mesh2tangent->num_face_as_quad_map = num_face_as_quad_map; #endif - mesh2tangent->precomputedFaceNormals = poly_normals; /* dm->getPolyDataArray(dm, CD_NORMAL) */ + mesh2tangent->precomputedFaceNormals = poly_normals; /* Note, we assume we do have tessellated loop normals at this point (in case it is object-enabled), * have to check this is valid... */ diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index bb4cf1c5753..b6eb26443ea 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -40,6 +40,7 @@ #include "DNA_curve_types.h" #include "DNA_group_types.h" #include "DNA_listBase.h" +#include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" #include "DNA_object_types.h" #include "DNA_object_force_types.h" @@ -57,12 +58,11 @@ #include "PIL_time.h" #include "BKE_anim.h" /* needed for where_on_path */ +#include "BKE_bvhutils.h" #include "BKE_collection.h" #include "BKE_collision.h" #include "BKE_curve.h" #include "BKE_displist.h" -#include "BKE_DerivedMesh.h" -#include "BKE_cdderivedmesh.h" #include "BKE_effect.h" #include "BKE_global.h" #include "BKE_layer.h" @@ -314,7 +314,7 @@ ListBase *BKE_effectors_create( else if (weights->weight[ob->pd->forcefield] == 0.0f) { continue; } - else if (ob->pd->shape == PFIELD_SHAPE_POINTS && !ob->derivedFinal) { + else if (ob->pd->shape == PFIELD_SHAPE_POINTS && ob->runtime.mesh_eval == NULL) { continue; } @@ -606,12 +606,10 @@ int get_effector_data(EffectorCache *eff, EffectorData *efd, EffectedPoint *poin efd->size = 0.0f; } else if (eff->pd && eff->pd->shape==PFIELD_SHAPE_POINTS) { - - if (eff->ob->derivedFinal) { - DerivedMesh *dm = eff->ob->derivedFinal; - - dm->getVertCo(dm, *efd->index, efd->loc); - dm->getVertNo(dm, *efd->index, efd->nor); + Mesh *me_eval = eff->ob->runtime.mesh_eval; + if (me_eval != NULL) { + copy_v3_v3(efd->loc, me_eval->mvert[*efd->index].co); + normal_short_to_float_v3(efd->nor, me_eval->mvert[*efd->index].no); mul_m4_v3(eff->ob->obmat, efd->loc); mul_mat3_m4_v3(eff->ob->obmat, efd->nor); @@ -719,7 +717,8 @@ static void get_effector_tot(EffectorCache *eff, EffectorData *efd, EffectedPoin efd->index = p; if (eff->pd->shape == PFIELD_SHAPE_POINTS) { - *tot = eff->ob->derivedFinal ? eff->ob->derivedFinal->numVertData : 1; + Mesh *me_eval = eff->ob->runtime.mesh_eval; + *tot = me_eval != NULL ? me_eval->totvert : 1; if (*tot && eff->pd->forcefield == PFIELD_HARMONIC && point->index >= 0) { *p = point->index % *tot; diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index f502d7e394f..b13f45499f1 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -32,8 +32,10 @@ #include "DNA_object_types.h" #include "DNA_key_types.h" #include "DNA_mesh_types.h" +#include "DNA_meshdata_types.h" #include "BLI_utildefines.h" +#include "BLI_bitmap.h" #include "BLI_math.h" #include "BLI_linklist.h" #include "BLI_memarena.h" @@ -43,7 +45,6 @@ #include "BKE_animsys.h" #include "BKE_idcode.h" #include "BKE_main.h" -#include "BKE_DerivedMesh.h" #include "BKE_global.h" #include "BKE_mesh.h" #include "BKE_mesh_runtime.h" diff --git a/source/blender/blenkernel/intern/mesh_runtime.c b/source/blender/blenkernel/intern/mesh_runtime.c index 657cd3b6c52..07c354559b8 100644 --- a/source/blender/blenkernel/intern/mesh_runtime.c +++ b/source/blender/blenkernel/intern/mesh_runtime.c @@ -44,10 +44,6 @@ #include "BKE_mesh.h" #include "BKE_mesh_runtime.h" -#ifdef USE_DERIVEDMESH -#include "BKE_DerivedMesh.h" -#endif - /* -------------------------------------------------------------------- */ /** \name Mesh Runtime Struct Utils * \{ */ diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c index 2b43d49a10f..62d8210d147 100644 --- a/source/blender/blenkernel/intern/mesh_validate.c +++ b/source/blender/blenkernel/intern/mesh_validate.c @@ -43,7 +43,6 @@ #include "BLI_math_vector.h" #include "BKE_deform.h" -#include "BKE_DerivedMesh.h" #include "BKE_mesh.h" #include "DEG_depsgraph.h" |