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:
Diffstat (limited to 'source/blender/editors/physics/particle_object.c')
-rw-r--r--source/blender/editors/physics/particle_object.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index 6bea6e2c19e..f13b7519cd7 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -26,6 +26,7 @@
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_mesh.h"
+#include "BKE_mesh_legacy_convert.h"
#include "BKE_mesh_runtime.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
@@ -703,7 +704,7 @@ static bool remap_hair_emitter(Depsgraph *depsgraph,
PTCacheEditKey *ekey;
BVHTreeFromMesh bvhtree = {NULL};
MFace *mface = NULL, *mf;
- MEdge *medge = NULL, *me;
+ const MEdge *medge = NULL, *me;
MVert *mvert;
Mesh *mesh, *target_mesh;
int numverts;
@@ -749,7 +750,7 @@ static bool remap_hair_emitter(Depsgraph *depsgraph,
BKE_mesh_tessface_ensure(mesh);
numverts = mesh->totvert;
- mvert = mesh->mvert;
+ mvert = BKE_mesh_verts_for_write(mesh);
/* convert to global coordinates */
for (int i = 0; i < numverts; i++) {
@@ -757,11 +758,11 @@ static bool remap_hair_emitter(Depsgraph *depsgraph,
}
if (mesh->totface != 0) {
- mface = mesh->mface;
+ mface = CustomData_get_layer(&mesh->fdata, CD_MFACE);
BKE_bvhtree_from_mesh_get(&bvhtree, mesh, BVHTREE_FROM_FACES, 2);
}
else if (mesh->totedge != 0) {
- medge = mesh->medge;
+ medge = BKE_mesh_edges(mesh);
BKE_bvhtree_from_mesh_get(&bvhtree, mesh, BVHTREE_FROM_EDGES, 2);
}
else {