diff options
author | Colin Basnett <cmbasnett@gmail.com> | 2022-09-17 03:50:37 +0300 |
---|---|---|
committer | Colin Basnett <cmbasnett@gmail.com> | 2022-09-17 03:50:37 +0300 |
commit | 564bda241a973396da51d7c3ccd9efd97d51728a (patch) | |
tree | 4d9aa4cccd82e2e606b47774afa5e1015bf14768 /source/blender/blenkernel/intern/particle_system.c | |
parent | 0fff238150d076576053c25b646f653d6e3b0edb (diff) | |
parent | 48d7ff68f0df209c77bbb081ab46fbc109fd825a (diff) |
Merge branch 'master' into feature-imformatfeature-imformat
Diffstat (limited to 'source/blender/blenkernel/intern/particle_system.c')
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 3ad770c5429..9608676a153 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -47,6 +47,7 @@ #include "BKE_effect.h" #include "BKE_lib_id.h" #include "BKE_lib_query.h" +#include "BKE_mesh_legacy_convert.h" #include "BKE_particle.h" #include "BKE_bvhutils.h" @@ -836,7 +837,7 @@ void psys_get_birth_coords( cross_v3_v3v3(mat[1], mat[2], mat[0]); /* apply rotation */ - mat3_to_quat_is_ok(q, mat); + mat3_to_quat_legacy(q, mat); copy_qt_qt(state->rot, q); } else { @@ -968,7 +969,7 @@ void psys_get_birth_coords( float tmat[3][3]; /* NOTE: utan_local is not taken from 'utan', we calculate from rot_vec/vtan. */ - /* NOTE(campbell): it looks like rotation phase may be applied twice + /* NOTE(@campbellbarton): it looks like rotation phase may be applied twice * (once with vtan, again below) however this isn't the case. */ float *rot_vec_local = tmat[0]; float *vtan_local = tmat[1]; @@ -3321,12 +3322,10 @@ static void hair_create_input_mesh(ParticleSimulationData *sim, mesh = *r_mesh; if (!mesh) { *r_mesh = mesh = BKE_mesh_new_nomain(totpoint, totedge, 0, 0, 0); - CustomData_add_layer(&mesh->vdata, CD_MDEFORMVERT, CD_CALLOC, NULL, mesh->totvert); - BKE_mesh_update_customdata_pointers(mesh, false); } - mvert = mesh->mvert; - medge = mesh->medge; - dvert = mesh->dvert; + mvert = BKE_mesh_verts_for_write(mesh); + medge = BKE_mesh_edges_for_write(mesh); + dvert = BKE_mesh_deform_verts_for_write(mesh); if (psys->clmd->hairdata == NULL) { psys->clmd->hairdata = MEM_mallocN(sizeof(ClothHairData) * totpoint, "hair data"); |