[Bf-blender-cvs] [716cc34a877] functions: move AttributesRef to BKE namespace

Jacques Lucke noreply at git.blender.org
Wed Sep 4 11:14:14 CEST 2019


Commit: 716cc34a877cbe94b404db2c80f537e1202f01ec
Author: Jacques Lucke
Date:   Wed Sep 4 11:09:36 2019 +0200
Branches: functions
https://developer.blender.org/rB716cc34a877cbe94b404db2c80f537e1202f01ec

move AttributesRef to BKE namespace

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

R099	source/blender/simulations/bparticles/attributes.hpp	source/blender/blenkernel/BKE_attributes_ref.hpp
M	source/blender/blenkernel/CMakeLists.txt
R097	source/blender/simulations/bparticles/attributes.cpp	source/blender/blenkernel/intern/attributes_ref.cpp
M	source/blender/simulations/CMakeLists.txt
M	source/blender/simulations/bparticles/action_contexts.hpp
M	source/blender/simulations/bparticles/block_step_data.hpp
M	source/blender/simulations/bparticles/c_wrapper.cpp
M	source/blender/simulations/bparticles/event_interface.hpp
M	source/blender/simulations/bparticles/events.hpp
M	source/blender/simulations/bparticles/force_interface.hpp
M	source/blender/simulations/bparticles/integrator.cpp
M	source/blender/simulations/bparticles/node_frontend.cpp
M	source/blender/simulations/bparticles/particle_allocator.hpp
M	source/blender/simulations/bparticles/particle_function.hpp
M	source/blender/simulations/bparticles/particle_function_input_providers.cpp
M	source/blender/simulations/bparticles/particles_container.hpp
M	source/blender/simulations/bparticles/particles_state.hpp
M	source/blender/simulations/bparticles/time_span.hpp

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

diff --git a/source/blender/simulations/bparticles/attributes.hpp b/source/blender/blenkernel/BKE_attributes_ref.hpp
similarity index 99%
rename from source/blender/simulations/bparticles/attributes.hpp
rename to source/blender/blenkernel/BKE_attributes_ref.hpp
index 451dd5f5c73..88d780ce4b9 100644
--- a/source/blender/simulations/bparticles/attributes.hpp
+++ b/source/blender/blenkernel/BKE_attributes_ref.hpp
@@ -3,16 +3,16 @@
 #include <string>
 
 #include "BLI_array_ref.hpp"
-#include "BLI_vector.hpp"
 #include "BLI_math.hpp"
-#include "BLI_string_ref.hpp"
-#include "BLI_string_map.hpp"
+#include "BLI_optional.hpp"
 #include "BLI_range.hpp"
-#include "BLI_set.hpp"
 #include "BLI_set_vector.hpp"
-#include "BLI_optional.hpp"
+#include "BLI_set.hpp"
+#include "BLI_string_map.hpp"
+#include "BLI_string_ref.hpp"
+#include "BLI_vector.hpp"
 
-namespace BParticles {
+namespace BKE {
 
 using BLI::ArrayRef;
 using BLI::float2;
@@ -497,4 +497,4 @@ class AttributesRefGroup {
   void fill_elements(uint index, void *value);
 };
 
-}  // namespace BParticles
+}  // namespace BKE
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index c432f2d9bad..f20b138d36b 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -73,6 +73,7 @@ set(SRC
   intern/appdir.c
   intern/armature.c
   intern/armature_update.c
+  intern/attributes_ref.cpp
   intern/autoexec.c
   intern/blender.c
   intern/blender_copybuffer.c
@@ -233,6 +234,7 @@ set(SRC
   BKE_animsys.h
   BKE_appdir.h
   BKE_armature.h
+  BKE_attributes_ref.hpp
   BKE_autoexec.h
   BKE_blender.h
   BKE_blender_copybuffer.h
diff --git a/source/blender/simulations/bparticles/attributes.cpp b/source/blender/blenkernel/intern/attributes_ref.cpp
similarity index 97%
rename from source/blender/simulations/bparticles/attributes.cpp
rename to source/blender/blenkernel/intern/attributes_ref.cpp
index d8ddc3dd88a..66b2367b665 100644
--- a/source/blender/simulations/bparticles/attributes.cpp
+++ b/source/blender/blenkernel/intern/attributes_ref.cpp
@@ -1,6 +1,6 @@
-#include "attributes.hpp"
+#include "BKE_attributes_ref.hpp"
 
-namespace BParticles {
+namespace BKE {
 
 void AttributesDeclaration::join(AttributesDeclaration &other)
 {
@@ -110,4 +110,4 @@ void AttributesRefGroup::fill_elements(uint index, void *value)
   }
 }
 
-}  // namespace BParticles
+}  // namespace BKE
diff --git a/source/blender/simulations/CMakeLists.txt b/source/blender/simulations/CMakeLists.txt
index fa36dbd9db2..f59673b8f1c 100644
--- a/source/blender/simulations/CMakeLists.txt
+++ b/source/blender/simulations/CMakeLists.txt
@@ -33,8 +33,6 @@ set(SRC
   bparticles/action_contexts.hpp
   bparticles/events.hpp
   bparticles/events.cpp
-  bparticles/attributes.hpp
-  bparticles/attributes.cpp
   bparticles/emitter_interface.hpp
   bparticles/block_step_data.hpp
   bparticles/event_interface.hpp
diff --git a/source/blender/simulations/bparticles/action_contexts.hpp b/source/blender/simulations/bparticles/action_contexts.hpp
index 229a9493048..3501ec6d635 100644
--- a/source/blender/simulations/bparticles/action_contexts.hpp
+++ b/source/blender/simulations/bparticles/action_contexts.hpp
@@ -6,6 +6,7 @@ struct Object;
 
 namespace BParticles {
 
+using BLI::float3;
 using BLI::float4x4;
 
 class MeshSurfaceActionContext : public ActionContext {
diff --git a/source/blender/simulations/bparticles/block_step_data.hpp b/source/blender/simulations/bparticles/block_step_data.hpp
index fb6040c0bc4..6472942a634 100644
--- a/source/blender/simulations/bparticles/block_step_data.hpp
+++ b/source/blender/simulations/bparticles/block_step_data.hpp
@@ -1,10 +1,12 @@
 #pragma once
 
-#include "attributes.hpp"
+#include "BKE_attributes_ref.hpp"
 #include "time_span.hpp"
 
 namespace BParticles {
 
+using BKE::AttributesRef;
+
 struct BlockStepData {
   AttributesRef attributes;
   AttributesRef attribute_offsets;
diff --git a/source/blender/simulations/bparticles/c_wrapper.cpp b/source/blender/simulations/bparticles/c_wrapper.cpp
index e91e7d7d55f..aed6eb6c522 100644
--- a/source/blender/simulations/bparticles/c_wrapper.cpp
+++ b/source/blender/simulations/bparticles/c_wrapper.cpp
@@ -32,6 +32,7 @@ using namespace BParticles;
 
 using BLI::ArrayRef;
 using BLI::float3;
+using BLI::rgba_f;
 using BLI::StringRef;
 using BLI::Vector;
 
diff --git a/source/blender/simulations/bparticles/event_interface.hpp b/source/blender/simulations/bparticles/event_interface.hpp
index 383601aca83..9a5ebc52d25 100644
--- a/source/blender/simulations/bparticles/event_interface.hpp
+++ b/source/blender/simulations/bparticles/event_interface.hpp
@@ -1,11 +1,12 @@
 #pragma once
 
-#include "attributes.hpp"
 #include "block_step_data.hpp"
 #include "particle_allocator.hpp"
 
 namespace BParticles {
 
+using BKE::AttributesDeclaration;
+
 /**
  * Utility array wrapper that can hold different kinds of plain-old-data values.
  */
diff --git a/source/blender/simulations/bparticles/events.hpp b/source/blender/simulations/bparticles/events.hpp
index 0c0c270d07a..72efea5fd16 100644
--- a/source/blender/simulations/bparticles/events.hpp
+++ b/source/blender/simulations/bparticles/events.hpp
@@ -13,6 +13,7 @@ struct Object;
 
 namespace BParticles {
 
+using BLI::float3;
 using BLI::float4x4;
 
 class AgeReachedEvent : public Event {
diff --git a/source/blender/simulations/bparticles/force_interface.hpp b/source/blender/simulations/bparticles/force_interface.hpp
index 88de2154c8f..595ac0534f0 100644
--- a/source/blender/simulations/bparticles/force_interface.hpp
+++ b/source/blender/simulations/bparticles/force_interface.hpp
@@ -4,6 +4,8 @@
 
 namespace BParticles {
 
+using BLI::float3;
+
 class ForceInterface : public BlockStepDataAccess {
  private:
   ArrayRef<uint> m_pindices;
diff --git a/source/blender/simulations/bparticles/integrator.cpp b/source/blender/simulations/bparticles/integrator.cpp
index 8f546f225c5..a2aba213e94 100644
--- a/source/blender/simulations/bparticles/integrator.cpp
+++ b/source/blender/simulations/bparticles/integrator.cpp
@@ -2,6 +2,8 @@
 
 namespace BParticles {
 
+using BLI::float3;
+
 ConstantVelocityIntegrator::ConstantVelocityIntegrator()
 {
   AttributesDeclaration builder;
diff --git a/source/blender/simulations/bparticles/node_frontend.cpp b/source/blender/simulations/bparticles/node_frontend.cpp
index c9f9337a19d..48e4deba78d 100644
--- a/source/blender/simulations/bparticles/node_frontend.cpp
+++ b/source/blender/simulations/bparticles/node_frontend.cpp
@@ -17,6 +17,7 @@ namespace BParticles {
 using BKE::VirtualNode;
 using BKE::VirtualSocket;
 using BLI::MultiMap;
+using BLI::rgba_f;
 using BLI::ValueOrError;
 using FN::Function;
 using FN::FunctionBuilder;
diff --git a/source/blender/simulations/bparticles/particle_allocator.hpp b/source/blender/simulations/bparticles/particle_allocator.hpp
index 90d5e8c8ce4..123f4737be9 100644
--- a/source/blender/simulations/bparticles/particle_allocator.hpp
+++ b/source/blender/simulations/bparticles/particle_allocator.hpp
@@ -4,6 +4,8 @@
 
 namespace BParticles {
 
+using BKE::AttributesRefGroup;
+
 /**
  * This class allows allocating new blocks from different particle containers.
  * A single instance is not thread safe, but multiple allocator instances can
diff --git a/source/blender/simulations/bparticles/particle_function.hpp b/source/blender/simulations/bparticles/particle_function.hpp
index ab03b425e4f..c3695f2557c 100644
--- a/source/blender/simulations/bparticles/particle_function.hpp
+++ b/source/blender/simulations/bparticles/particle_function.hpp
@@ -4,13 +4,13 @@
 #include "FN_functions.hpp"
 #include "BLI_array.hpp"
 
-#include "attributes.hpp"
 #include "action_interface.hpp"
 #include "force_interface.hpp"
 
 namespace BParticles {
 
 using BLI::ArrayRef;
+using BLI::Optional;
 using BLI::TemporaryArray;
 using BLI::TemporaryVector;
 using BLI::Vector;
diff --git a/source/blender/simulations/bparticles/particle_function_input_providers.cpp b/source/blender/simulations/bparticles/particle_function_input_providers.cpp
index aa5e904e921..a18ddfbaeac 100644
--- a/source/blender/simulations/bparticles/particle_function_input_providers.cpp
+++ b/source/blender/simulations/bparticles/particle_function_input_providers.cpp
@@ -11,6 +11,10 @@
 
 namespace BParticles {
 
+using BLI::float2;
+using BLI::rgba_b;
+using BLI::rgba_f;
+
 Optional<ParticleFunctionInputArray> AttributeInputProvider::get(InputProviderInterface &interface)
 {
   AttributesRef attributes = interface.attributes();
diff --git a/source/blender/simulations/bparticles/particles_container.hpp b/source/blender/simulations/bparticles/particles_container.hpp
index 9a3de766969..267f6c79169 100644
--- a/source/blender/simulations/bparticles/particles_container.hpp
+++ b/source/blender/simulations/bparticles/particles_container.hpp
@@ -6,13 +6,24 @@
 #include "BLI_map.hpp"
 #include "BLI_stack.hpp"
 
-#include "attributes.hpp"
+#include "BKE_attributes_ref.hpp"
 
 namespace BParticles {
 
+using BKE::attribute_type_by_type;
+using BKE::AttributesInfo;
+using BKE::AttributesRef;
+using BKE::AttributeType;
+using BLI::ArrayRef;
 using BLI::Map;
+using BLI::MutableArrayRef;
+using BLI::Range;
 using BLI::Set;
+using BLI::SetVector;
 using BLI::Stack;
+using BLI::StringRef;
+using BLI::StringRefNull;
+using BLI::Vector;
 
 class ParticlesContainer;
 class ParticlesBlock;
diff --git a/source/blender/simulations/bparticles/particles_state.hpp b/source/blender/simulations/bparticles/particles_state.hpp
index 527fe95f2c5..56a0bf895ee 100644
--- a/source/blender/simulations/bparticles/particles_state.hpp
+++ b/source/blender/simulations/bparticles/particles_state.hpp
@@ -4,6 +4,8 @@
 
 namespace BParticles {
 
+using BLI::StringMap;
+
 class ParticlesState {
  private:
   StringMap<ParticlesContainer *> m_container_by_id;
diff --git a/source/blender/simulations/bparticles/time_span.hpp b/source/blender/simulations/bparticles/time_span.hpp
index fcd0a157654..f4608cb0c18 100644
--- a/source/blender/simulations/bparticles/time_span.hpp
+++ b/source/blender/simulations/bparticles/time_span.hpp
@@ -1,7 +1,12 @@
 #pragma once
 
+#include "BLI_array_ref.hpp"
+
 namespac

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list