diff options
5 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/simulations/bparticles/c_wrapper.cpp b/source/blender/simulations/bparticles/c_wrapper.cpp index de724bb5560..3d517e6b416 100644 --- a/source/blender/simulations/bparticles/c_wrapper.cpp +++ b/source/blender/simulations/bparticles/c_wrapper.cpp @@ -89,7 +89,7 @@ class EulerIntegrator : public Integrator { SmallVector<float3> combined_force(amount); this->compute_combined_force(block, combined_force); - auto last_velocities = block.slice_active().get_float3("Velocity"); + auto last_velocities = block.attributes().get_float3("Velocity"); auto position_offsets = r_offsets.get_float3("Position"); auto velocity_offsets = r_offsets.get_float3("Velocity"); @@ -332,7 +332,7 @@ Mesh *BParticles_test_mesh_from_state(BParticlesState state_c) uint type_index = 0; for (ParticlesContainer *container : state.particle_containers().values()) { for (ParticlesBlock *block : container->active_blocks()) { - AttributeArrays attributes = block->slice_active(); + AttributeArrays attributes = block->attributes(); auto positions = attributes.get_float3("Position"); for (uint pindex = 0; pindex < attributes.size(); pindex++) { diff --git a/source/blender/simulations/bparticles/forces.cpp b/source/blender/simulations/bparticles/forces.cpp index c0d60dd4868..ea5fc83a79b 100644 --- a/source/blender/simulations/bparticles/forces.cpp +++ b/source/blender/simulations/bparticles/forces.cpp @@ -36,7 +36,7 @@ class TurbulenceForce : public BParticles::Force { void add_force(ParticlesBlock &block, ArrayRef<float3> r_force) override { - auto positions = block.slice_active().get_float3("Position"); + auto positions = block.attributes().get_float3("Position"); for (uint pindex = 0; pindex < block.active_amount(); pindex++) { float3 pos = positions[pindex]; diff --git a/source/blender/simulations/bparticles/particles_container.cpp b/source/blender/simulations/bparticles/particles_container.cpp index 0b087742eff..fda84001b1e 100644 --- a/source/blender/simulations/bparticles/particles_container.cpp +++ b/source/blender/simulations/bparticles/particles_container.cpp @@ -129,7 +129,7 @@ void ParticlesContainer::flatten_attribute_data(StringRef attribute_name, void * uint offset = 0; for (ParticlesBlock *block : m_blocks) { uint amount = block->active_amount(); - void *src = block->slice_active().get_ptr(attribute_index); + void *src = block->attributes().get_ptr(attribute_index); memcpy(POINTER_OFFSET(dst, offset), src, amount * element_size); offset += amount * element_size; } diff --git a/source/blender/simulations/bparticles/particles_container.hpp b/source/blender/simulations/bparticles/particles_container.hpp index f9e16ae3ede..fbda6653be2 100644 --- a/source/blender/simulations/bparticles/particles_container.hpp +++ b/source/blender/simulations/bparticles/particles_container.hpp @@ -112,7 +112,7 @@ class ParticlesBlock { AttributeArrays slice(Range<uint> range); AttributeArrays slice(uint start, uint length); AttributeArrays slice_all(); - AttributeArrays slice_active(); + AttributeArrays attributes(); void move(uint old_index, uint new_index); @@ -218,7 +218,7 @@ inline AttributeArrays ParticlesBlock::slice_all() return m_attributes_core.slice_all(); } -inline AttributeArrays ParticlesBlock::slice_active() +inline AttributeArrays ParticlesBlock::attributes() { return this->slice(0, m_active_amount); } diff --git a/source/blender/simulations/bparticles/simulate.cpp b/source/blender/simulations/bparticles/simulate.cpp index 3ad36b23d75..4a9045c63b7 100644 --- a/source/blender/simulations/bparticles/simulate.cpp +++ b/source/blender/simulations/bparticles/simulate.cpp @@ -577,7 +577,7 @@ BLI_NOINLINE static void simulate_blocks_from_birth_to_current_time( uint active_amount = block->active_amount(); SmallVector<float> durations(active_amount); - auto birth_times = block->slice_active().get_float("Birth Time"); + auto birth_times = block->attributes().get_float("Birth Time"); for (uint i = 0; i < active_amount; i++) { durations[i] = end_time - birth_times[i]; } @@ -613,7 +613,7 @@ BLI_NOINLINE static SmallVector<ParticlesBlock *> get_all_blocks(ParticlesState BLI_NOINLINE static void delete_tagged_particles_and_reorder(ParticlesBlock &block) { - auto kill_states = block.slice_active().get_byte("Kill State"); + auto kill_states = block.attributes().get_byte("Kill State"); uint index = 0; while (index < block.active_amount()) { |