diff options
author | Jacques Lucke <jacques@blender.org> | 2020-07-29 13:03:21 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-07-29 13:03:30 +0300 |
commit | 9c807325ddff72b87e615e11dc2385035c4e1fc5 (patch) | |
tree | 7489af1c05bc6f52a24b5e19ea86fa23169f1153 /source/blender | |
parent | 91150c9ef5aad3a21dd9f7c9d28223b2c1ed5a14 (diff) |
Particles: rename Size attribute to Radius
Doing this change for consistency with the point cloud attributes.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/modifiers/intern/MOD_simulation.cc | 6 | ||||
-rw-r--r-- | source/blender/simulation/intern/simulation_collect_influences.cc | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_simulation.cc b/source/blender/modifiers/intern/MOD_simulation.cc index 382d9a6be36..edfcc16af85 100644 --- a/source/blender/modifiers/intern/MOD_simulation.cc +++ b/source/blender/modifiers/intern/MOD_simulation.cc @@ -114,12 +114,12 @@ static PointCloud *modifyPointCloud(ModifierData *md, const float3 *positions = (const float3 *)CustomData_get_layer_named( &state->attributes, CD_PROP_FLOAT3, "Position"); - const float *sizes = (const float *)CustomData_get_layer_named( - &state->attributes, CD_PROP_FLOAT, "Size"); + const float *radii = (const float *)CustomData_get_layer_named( + &state->attributes, CD_PROP_FLOAT, "Radius"); memcpy(pointcloud->co, positions, sizeof(float3) * state->tot_particles); for (int i = 0; i < state->tot_particles; i++) { - pointcloud->radius[i] = sizes[i] / 2.0f; + pointcloud->radius[i] = radii[i]; } return pointcloud; diff --git a/source/blender/simulation/intern/simulation_collect_influences.cc b/source/blender/simulation/intern/simulation_collect_influences.cc index c947b28fd50..c744defb7d5 100644 --- a/source/blender/simulation/intern/simulation_collect_influences.cc +++ b/source/blender/simulation/intern/simulation_collect_influences.cc @@ -740,7 +740,7 @@ static void initialize_particle_attribute_builders(CollectContext &context) /* TODO: Use uint32_t, but we don't have a corresponding custom property type. */ attributes_builder.add<int>("Hash", 0); attributes_builder.add<float>("Birth Time", 0.0f); - attributes_builder.add<float>("Size", 0.03f); + attributes_builder.add<float>("Radius", 0.02f); context.influences.particle_attributes_builder.add_new(name, &attributes_builder); } } |