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/makesrna/intern/rna_particle.c')
-rw-r--r--source/blender/makesrna/intern/rna_particle.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index a56e7d28ef7..17433ffc23e 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -212,10 +212,9 @@ static void rna_ParticleHairKey_location_object_get(PointerRNA *ptr, float *valu
if (pa) {
Mesh *hair_mesh = (psmd->psys->flag & PSYS_HAIR_DYNAMICS) ? psmd->psys->hair_out_mesh : NULL;
- const MVert *verts = BKE_mesh_verts(hair_mesh);
+ const float(*positions)[3] = BKE_mesh_positions(hair_mesh);
if (hair_mesh) {
- const MVert *mv = &verts[pa->hair_index + (hkey - pa->hair)];
- copy_v3_v3(values, mv->co);
+ copy_v3_v3(values, positions[pa->hair_index + (hkey - pa->hair)]);
}
else {
float hairmat[4][4];
@@ -279,9 +278,8 @@ static void hair_key_location_object_set(HairKey *hair_key,
if (hair_key_index == -1) {
return;
}
- MVert *verts = BKE_mesh_verts_for_write(hair_mesh);
- MVert *mv = &verts[particle->hair_index + (hair_key_index)];
- copy_v3_v3(mv->co, src_co);
+ float(*positions)[3] = BKE_mesh_positions_for_write(hair_mesh);
+ copy_v3_v3(positions[particle->hair_index + (hair_key_index)], src_co);
return;
}
@@ -324,9 +322,8 @@ static void rna_ParticleHairKey_co_object(HairKey *hairkey,
NULL;
if (particle) {
if (hair_mesh) {
- const MVert *verts = BKE_mesh_verts(hair_mesh);
- const MVert *mv = &verts[particle->hair_index + (hairkey - particle->hair)];
- copy_v3_v3(n_co, mv->co);
+ const float(*positions)[3] = BKE_mesh_positions(hair_mesh);
+ copy_v3_v3(n_co, positions[particle->hair_index + (hairkey - particle->hair)]);
}
else {
float hairmat[4][4];