[Bf-blender-cvs] [ab0c7b8485e] functions: rename block.slice_all() to block.attributes_all()

Jacques Lucke noreply at git.blender.org
Mon Jul 1 15:37:08 CEST 2019


Commit: ab0c7b8485ed6a1861632adc34884f055d1e7102
Author: Jacques Lucke
Date:   Mon Jul 1 15:19:24 2019 +0200
Branches: functions
https://developer.blender.org/rBab0c7b8485ed6a1861632adc34884f055d1e7102

rename block.slice_all() to block.attributes_all()

===================================================================

M	source/blender/simulations/bparticles/core.cpp
M	source/blender/simulations/bparticles/core.hpp
M	source/blender/simulations/bparticles/particles_container.hpp

===================================================================

diff --git a/source/blender/simulations/bparticles/core.cpp b/source/blender/simulations/bparticles/core.cpp
index 1d3fd648271..bb1b894d504 100644
--- a/source/blender/simulations/bparticles/core.cpp
+++ b/source/blender/simulations/bparticles/core.cpp
@@ -212,7 +212,8 @@ void EmitTargetBase::fill_elements(uint index, void *value)
   for (uint part = 0; part < m_ranges.size(); part++) {
     ParticlesBlock &block = *m_blocks[part];
 
-    void *dst = block.slice_all().get_ptr(index);
+    /* TODO(jacques): Check if this is correct. */
+    void *dst = block.attributes_all().get_ptr(index);
     for (uint i : m_ranges[part]) {
       memcpy(POINTER_OFFSET(dst, element_size * i), value, element_size);
     }
diff --git a/source/blender/simulations/bparticles/core.hpp b/source/blender/simulations/bparticles/core.hpp
index ac6e913de64..3d1a54492ca 100644
--- a/source/blender/simulations/bparticles/core.hpp
+++ b/source/blender/simulations/bparticles/core.hpp
@@ -745,7 +745,7 @@ inline ParticlesBlock &ParticleSet::block()
 
 inline AttributeArrays ParticleSet::attributes()
 {
-  return m_block->slice_all();
+  return m_block->attributes();
 }
 
 inline ArrayRef<uint> ParticleSet::indices()
diff --git a/source/blender/simulations/bparticles/particles_container.hpp b/source/blender/simulations/bparticles/particles_container.hpp
index fbda6653be2..46d9458b153 100644
--- a/source/blender/simulations/bparticles/particles_container.hpp
+++ b/source/blender/simulations/bparticles/particles_container.hpp
@@ -111,7 +111,7 @@ class ParticlesBlock {
   AttributeArraysCore &attributes_core();
   AttributeArrays slice(Range<uint> range);
   AttributeArrays slice(uint start, uint length);
-  AttributeArrays slice_all();
+  AttributeArrays attributes_all();
   AttributeArrays attributes();
 
   void move(uint old_index, uint new_index);
@@ -213,7 +213,7 @@ inline AttributeArrays ParticlesBlock::slice(uint start, uint length)
   return m_attributes_core.slice_all().slice(start, length);
 }
 
-inline AttributeArrays ParticlesBlock::slice_all()
+inline AttributeArrays ParticlesBlock::attributes_all()
 {
   return m_attributes_core.slice_all();
 }
@@ -231,7 +231,7 @@ inline AttributeArraysCore &ParticlesBlock::attributes_core()
 inline void ParticlesBlock::move(uint old_index, uint new_index)
 {
   AttributesInfo &attributes = m_container.attributes_info();
-  AttributeArrays arrays = this->slice_all();
+  AttributeArrays arrays = this->attributes_all();
 
   for (uint i : attributes.byte_attributes()) {
     auto buffer = arrays.get_byte(i);



More information about the Bf-blender-cvs mailing list