Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-02-04 19:29:11 +0300
committerHans Goudey <h.goudey@me.com>2022-02-04 19:29:11 +0300
commite7912dfa1959be671f77e4e67eab01de9de86c77 (patch)
treecd0df5a3457b9bb0e33b1856fb32a1b01622d99b /source/blender/functions
parentb4563ab2dfe1e553bfe48d50592823ff13a49692 (diff)
Attributes: Infrastructure for generic 8-bit integer data type
This commit adds infrastructure for 8 bit signed integer attributes. This can be useful given the discussion in T94193, where we want to store spline type, Bezier handle type, and other small enums as attributes. This is only exposed in the interface in the attribute lists, so it shouldn't be an option in geometry nodes, at least for now. I expect that this type won't be used directly very often, it should mostly be cast to an enum type. However, with support for 8 bit integers, it also makes sense to add things like mixing implementations for consistency. Differential Revision: https://developer.blender.org/D13721
Diffstat (limited to 'source/blender/functions')
-rw-r--r--source/blender/functions/intern/cpp_types.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/functions/intern/cpp_types.cc b/source/blender/functions/intern/cpp_types.cc
index 0bbfbc8cb10..7f1eb8bc1a7 100644
--- a/source/blender/functions/intern/cpp_types.cc
+++ b/source/blender/functions/intern/cpp_types.cc
@@ -31,6 +31,7 @@ MAKE_CPP_TYPE(float3, blender::float3, CPPTypeFlags::BasicType)
MAKE_CPP_TYPE(float4x4, blender::float4x4, CPPTypeFlags::BasicType)
MAKE_CPP_TYPE(int32, int32_t, CPPTypeFlags::BasicType)
+MAKE_CPP_TYPE(int8, int8_t, CPPTypeFlags::BasicType)
MAKE_CPP_TYPE(uint32, uint32_t, CPPTypeFlags::BasicType)
MAKE_CPP_TYPE(uint8, uint8_t, CPPTypeFlags::BasicType)
@@ -44,6 +45,7 @@ MAKE_FIELD_CPP_TYPE(Float2Field, float2);
MAKE_FIELD_CPP_TYPE(Float3Field, float3);
MAKE_FIELD_CPP_TYPE(ColorGeometry4fField, blender::ColorGeometry4f);
MAKE_FIELD_CPP_TYPE(BoolField, bool);
+MAKE_FIELD_CPP_TYPE(Int8Field, int8_t);
MAKE_FIELD_CPP_TYPE(Int32Field, int32_t);
MAKE_FIELD_CPP_TYPE(StringField, std::string);