[Bf-blender-cvs] [aa5ea9f0fe8] functions: New UInt32 attribute type
Jacques Lucke
noreply at git.blender.org
Fri Sep 6 16:56:12 CEST 2019
Commit: aa5ea9f0fe84381e3f02a48ba32694026003447a
Author: Jacques Lucke
Date: Fri Sep 6 16:51:32 2019 +0200
Branches: functions
https://developer.blender.org/rBaa5ea9f0fe84381e3f02a48ba32694026003447a
New UInt32 attribute type
===================================================================
M source/blender/blenkernel/BKE_attributes_ref.hpp
M source/blender/simulations/bparticles/particle_function_builder.cpp
===================================================================
diff --git a/source/blender/blenkernel/BKE_attributes_ref.hpp b/source/blender/blenkernel/BKE_attributes_ref.hpp
index c0d4f38d6d7..229b5726e24 100644
--- a/source/blender/blenkernel/BKE_attributes_ref.hpp
+++ b/source/blender/blenkernel/BKE_attributes_ref.hpp
@@ -60,7 +60,8 @@ using BLI::Vector;
*/
enum AttributeType {
Byte,
- Integer,
+ Int32,
+ UInt32,
Float,
Float2,
Float3,
@@ -77,7 +78,8 @@ template<typename T> struct attribute_type_by_type {
}
ATTRIBUTE_TYPE_BY_TYPE(uint8_t, Byte);
-ATTRIBUTE_TYPE_BY_TYPE(int32_t, Integer);
+ATTRIBUTE_TYPE_BY_TYPE(int32_t, Int32);
+ATTRIBUTE_TYPE_BY_TYPE(uint32_t, UInt32);
ATTRIBUTE_TYPE_BY_TYPE(float, Float);
ATTRIBUTE_TYPE_BY_TYPE(float2, Float2);
ATTRIBUTE_TYPE_BY_TYPE(float3, Float3);
@@ -94,8 +96,10 @@ inline uint size_of_attribute_type(AttributeType type)
switch (type) {
case AttributeType::Byte:
return sizeof(uint8_t);
- case AttributeType::Integer:
+ case AttributeType::Int32:
return sizeof(int32_t);
+ case AttributeType::UInt32:
+ return sizeof(uint32_t);
case AttributeType::Float:
return sizeof(float);
case AttributeType::Float2:
diff --git a/source/blender/simulations/bparticles/particle_function_builder.cpp b/source/blender/simulations/bparticles/particle_function_builder.cpp
index 91be5bb7dcc..c259d6ae060 100644
--- a/source/blender/simulations/bparticles/particle_function_builder.cpp
+++ b/source/blender/simulations/bparticles/particle_function_builder.cpp
@@ -60,7 +60,7 @@ static AttributeType attribute_type_from_socket_type(FN::Type *type)
return AttributeType::Float;
}
else if (type == FN::Types::TYPE_int32) {
- return AttributeType::Integer;
+ return AttributeType::Int32;
}
else {
BLI_assert(false);
More information about the Bf-blender-cvs
mailing list