[Bf-blender-cvs] [02a55a324c6] refactor-mesh-position-generic: Merge branch 'master' into refactor-mesh-position-generic
Hans Goudey
noreply at git.blender.org
Mon Jan 9 19:12:28 CET 2023
Commit: 02a55a324c6c22563725d7d3bef25b9cfce4d856
Author: Hans Goudey
Date: Mon Jan 9 13:00:16 2023 -0500
Branches: refactor-mesh-position-generic
https://developer.blender.org/rB02a55a324c6c22563725d7d3bef25b9cfce4d856
Merge branch 'master' into refactor-mesh-position-generic
===================================================================
===================================================================
diff --cc source/blender/blenkernel/intern/particle.cc
index 4400fab6f21,0b1d8606807..857dd71d48f
--- a/source/blender/blenkernel/intern/particle.cc
+++ b/source/blender/blenkernel/intern/particle.cc
@@@ -2172,11 -2184,12 +2184,11 @@@ void psys_particle_on_dm(Mesh *mesh_fin
else { /* PART_FROM_FACE / PART_FROM_VOLUME */
MFace *mface;
MTFace *mtface;
- MVert *mvert;
- MFace *mfaces = CustomData_get_layer(&mesh_final->fdata, CD_MFACE);
+ MFace *mfaces = static_cast<MFace *>(CustomData_get_layer(&mesh_final->fdata, CD_MFACE));
mface = &mfaces[mapindex];
- mvert = BKE_mesh_verts_for_write(mesh_final);
+ const float(*positions)[3] = BKE_mesh_vert_positions(mesh_final);
- mtface = CustomData_get_layer(&mesh_final->fdata, CD_MTFACE);
+ mtface = static_cast<MTFace *>(CustomData_get_layer(&mesh_final->fdata, CD_MTFACE));
if (mtface) {
mtface += mapindex;
@@@ -3892,13 -3910,13 +3909,13 @@@ static void psys_face_mat(Object *ob, M
}
}
else {
- const MVert *verts = BKE_mesh_verts(mesh);
- copy_v3_v3(v[0], verts[mface->v1].co);
- copy_v3_v3(v[1], verts[mface->v2].co);
- copy_v3_v3(v[2], verts[mface->v3].co);
+ const float(*positions)[3] = BKE_mesh_vert_positions(mesh);
+ copy_v3_v3(v[0], positions[mface->v1]);
+ copy_v3_v3(v[1], positions[mface->v2]);
+ copy_v3_v3(v[2], positions[mface->v3]);
}
- triatomat(v[0], v[1], v[2], (osface) ? osface->uv : NULL, mat);
+ triatomat(v[0], v[1], v[2], (osface) ? osface->uv : nullptr, mat);
}
void psys_mat_hair_to_object(
More information about the Bf-blender-cvs
mailing list