From 19d17b217ae0d1a89413e0f3f3b7be16614a535c Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Wed, 15 Jul 2020 16:48:30 +0200 Subject: Particles: use CD_PROP_FLOAT3 instead of CD_LOCATION `CD_LOCATION` was only used temporarily due to the lack of a better alternative. This also removes the name from `CD_LOCATION` again, because at most one layer of this type should exist. --- source/blender/blenkernel/intern/pointcache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/intern/pointcache.c') diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 9a9d8dc215b..aa93c6cb854 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -1900,7 +1900,7 @@ static int ptcache_sim_particle_write(int index, void *state_v, void **data, int ParticleSimulationState *state = (ParticleSimulationState *)state_v; const float *positions = (const float *)CustomData_get_layer_named( - &state->attributes, CD_LOCATION, "Position"); + &state->attributes, CD_PROP_FLOAT3, "Position"); PTCACHE_DATA_FROM(data, BPHYS_DATA_LOCATION, positions + (index * 3)); @@ -1913,7 +1913,7 @@ static void ptcache_sim_particle_read( BLI_assert(index < state->tot_particles); float *positions = (float *)CustomData_get_layer_named( - &state->attributes, CD_LOCATION, "Position"); + &state->attributes, CD_PROP_FLOAT3, "Position"); PTCACHE_DATA_TO(data, BPHYS_DATA_LOCATION, 0, positions + (index * 3)); } -- cgit v1.2.3