[Bf-blender-cvs] [9d793630980] functions: move functions to correct file
Jacques Lucke
noreply at git.blender.org
Mon Jul 8 17:57:32 CEST 2019
Commit: 9d79363098085348cbd7fee04bf216ee995d58d9
Author: Jacques Lucke
Date: Mon Jul 8 17:09:29 2019 +0200
Branches: functions
https://developer.blender.org/rB9d79363098085348cbd7fee04bf216ee995d58d9
move functions to correct file
===================================================================
M source/blender/simulations/bparticles/action_interface.cpp
M source/blender/simulations/bparticles/actions.cpp
===================================================================
diff --git a/source/blender/simulations/bparticles/action_interface.cpp b/source/blender/simulations/bparticles/action_interface.cpp
index f6c4a5ea96e..d2eab9d9394 100644
--- a/source/blender/simulations/bparticles/action_interface.cpp
+++ b/source/blender/simulations/bparticles/action_interface.cpp
@@ -2,6 +2,36 @@
namespace BParticles {
+Action::~Action()
+{
+}
+
+void ActionInterface::execute_action_for_subset(ArrayRef<uint> indices,
+ std::unique_ptr<Action> &action)
+{
+ EventExecuteInterface &interface = m_event_execute_interface;
+
+ ParticleSet &particles = interface.particles();
+ auto current_times = interface.current_times();
+
+ SmallVector<float> sub_current_times;
+ SmallVector<uint> particle_indices;
+ for (uint i : indices) {
+ particle_indices.append(particles.get_particle_index(i));
+ sub_current_times.append(current_times[i]);
+ }
+
+ ParticleSet sub_particles(particles.block(), particle_indices);
+ EventExecuteInterface sub_execute_interface(sub_particles,
+ interface.block_allocator(),
+ sub_current_times,
+ interface.event_storage(),
+ interface.attribute_offsets(),
+ interface.step_end_time());
+ ActionInterface sub_interface(sub_execute_interface, m_event_info);
+ action->execute(sub_interface);
+}
+
ParticleFunctionCaller ParticleFunction::get_caller(AttributeArrays attributes,
EventInfo &event_info)
{
diff --git a/source/blender/simulations/bparticles/actions.cpp b/source/blender/simulations/bparticles/actions.cpp
index 2349660de82..752cd3fa334 100644
--- a/source/blender/simulations/bparticles/actions.cpp
+++ b/source/blender/simulations/bparticles/actions.cpp
@@ -4,36 +4,6 @@
namespace BParticles {
-Action::~Action()
-{
-}
-
-void ActionInterface::execute_action_for_subset(ArrayRef<uint> indices,
- std::unique_ptr<Action> &action)
-{
- EventExecuteInterface &interface = m_event_execute_interface;
-
- ParticleSet &particles = interface.particles();
- auto current_times = interface.current_times();
-
- SmallVector<float> sub_current_times;
- SmallVector<uint> particle_indices;
- for (uint i : indices) {
- particle_indices.append(particles.get_particle_index(i));
- sub_current_times.append(current_times[i]);
- }
-
- ParticleSet sub_particles(particles.block(), particle_indices);
- EventExecuteInterface sub_execute_interface(sub_particles,
- interface.block_allocator(),
- sub_current_times,
- interface.event_storage(),
- interface.attribute_offsets(),
- interface.step_end_time());
- ActionInterface sub_interface(sub_execute_interface, m_event_info);
- action->execute(sub_interface);
-}
-
class NoneAction : public Action {
void execute(ActionInterface &UNUSED(interface)) override
{
More information about the Bf-blender-cvs
mailing list