From e7912dfa1959be671f77e4e67eab01de9de86c77 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 4 Feb 2022 10:29:11 -0600 Subject: 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 --- source/blender/functions/intern/cpp_types.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/functions/intern') 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); -- cgit v1.2.3