Merge branch 'refactor-mesh-position-generic' into refactor-mesh-corners-generic
This commit is contained in:
commit
9687da93e5
|
@ -1434,7 +1434,7 @@ static void init_particle_interpolation(Object *ob,
|
|||
pind->dietime = (key + pa->totkey - 1)->time;
|
||||
|
||||
if (pind->mesh) {
|
||||
blender::MutableSpan<float3> positions = pind->mesh->vert_positions_for_write();
|
||||
float3 *positions = pind->mesh->vert_positions_for_write().data();
|
||||
pind->positions[0] = &positions[pa->hair_index];
|
||||
pind->positions[1] = pind->positions[0] + 1;
|
||||
}
|
||||
|
@ -1554,7 +1554,7 @@ static void do_particle_interpolation(ParticleSystem *psys,
|
|||
|
||||
while (pind->hkey[1]->time < real_t) {
|
||||
pind->hkey[1]++;
|
||||
pind->positions[1] += 3;
|
||||
pind->positions[1]++;
|
||||
}
|
||||
|
||||
pind->hkey[0] = pind->hkey[1] - 1;
|
||||
|
@ -1566,7 +1566,7 @@ static void do_particle_interpolation(ParticleSystem *psys,
|
|||
edit_to_particle(keys + 2, pind->ekey[1]);
|
||||
}
|
||||
else if (pind->mesh) {
|
||||
pind->positions[0] = pind->positions[1] - 3;
|
||||
pind->positions[0] = pind->positions[1] - 1;
|
||||
mvert_to_particle(keys + 1, pind->positions[0], pind->hkey[0]);
|
||||
mvert_to_particle(keys + 2, pind->positions[1], pind->hkey[1]);
|
||||
}
|
||||
|
@ -1594,7 +1594,7 @@ static void do_particle_interpolation(ParticleSystem *psys,
|
|||
}
|
||||
else if (pind->mesh) {
|
||||
if (pind->hkey[0] != pa->hair) {
|
||||
mvert_to_particle(keys, pind->positions[0] - 3, pind->hkey[0] - 3);
|
||||
mvert_to_particle(keys, pind->positions[0] - 1, pind->hkey[0] - 1);
|
||||
}
|
||||
else {
|
||||
mvert_to_particle(keys, pind->positions[0], pind->hkey[0]);
|
||||
|
@ -1619,7 +1619,7 @@ static void do_particle_interpolation(ParticleSystem *psys,
|
|||
}
|
||||
else if (pind->mesh) {
|
||||
if (pind->hkey[1] != pa->hair + pa->totkey - 1) {
|
||||
mvert_to_particle(keys + 3, pind->positions[1] + 3, pind->hkey[1] + 3);
|
||||
mvert_to_particle(keys + 3, pind->positions[1] + 1, pind->hkey[1] + 1);
|
||||
}
|
||||
else {
|
||||
mvert_to_particle(keys + 3, pind->positions[1], pind->hkey[1]);
|
||||
|
|
Loading…
Reference in New Issue