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:
authorJacques Lucke <jacques@blender.org>2020-07-15 17:48:30 +0300
committerJacques Lucke <jacques@blender.org>2020-07-15 17:48:30 +0300
commit19d17b217ae0d1a89413e0f3f3b7be16614a535c (patch)
tree3d8b26cbbeca12727c3d043a9ad6f45d853737b4 /source/blender/blenkernel/intern/simulation.cc
parent57ec1f37e9a8c59a77f8cbdd1e22dd7b6c031c29 (diff)
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.
Diffstat (limited to 'source/blender/blenkernel/intern/simulation.cc')
-rw-r--r--source/blender/blenkernel/intern/simulation.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/simulation.cc b/source/blender/blenkernel/intern/simulation.cc
index e163bb8da8d..e735c30ffae 100644
--- a/source/blender/blenkernel/intern/simulation.cc
+++ b/source/blender/blenkernel/intern/simulation.cc
@@ -168,13 +168,13 @@ namespace blender::bke {
static void ensure_attributes_exist(ParticleSimulationState *state)
{
- if (CustomData_get_layer_named(&state->attributes, CD_LOCATION, "Position") == nullptr) {
+ if (CustomData_get_layer_named(&state->attributes, CD_PROP_FLOAT3, "Position") == nullptr) {
CustomData_add_layer_named(
- &state->attributes, CD_LOCATION, CD_CALLOC, nullptr, state->tot_particles, "Position");
+ &state->attributes, CD_PROP_FLOAT3, CD_CALLOC, nullptr, state->tot_particles, "Position");
}
- if (CustomData_get_layer_named(&state->attributes, CD_LOCATION, "Velocity") == nullptr) {
+ if (CustomData_get_layer_named(&state->attributes, CD_PROP_FLOAT3, "Velocity") == nullptr) {
CustomData_add_layer_named(
- &state->attributes, CD_LOCATION, CD_CALLOC, nullptr, state->tot_particles, "Velocity");
+ &state->attributes, CD_PROP_FLOAT3, CD_CALLOC, nullptr, state->tot_particles, "Velocity");
}
if (CustomData_get_layer_named(&state->attributes, CD_PROP_INT32, "ID") == nullptr) {
CustomData_add_layer_named(
@@ -288,7 +288,7 @@ class CustomDataAttributesRef {
builder.add<int32_t>(layer.name, 0);
break;
}
- case CD_LOCATION: {
+ case CD_PROP_FLOAT3: {
builder.add<float3>(layer.name, {0, 0, 0});
break;
}