diff --git a/source/blender/blenkernel/BKE_attribute_math.hh b/source/blender/blenkernel/BKE_attribute_math.hh index 1e7b331aac5..8e5401c3f48 100644 --- a/source/blender/blenkernel/BKE_attribute_math.hh +++ b/source/blender/blenkernel/BKE_attribute_math.hh @@ -426,4 +426,43 @@ template using DefaultMixer = typename DefaultMixerStruct::type; /** \} */ +/* -------------------------------------------------------------------- */ +/** \name Attribute type name collection. + * + * This is just basic name for indexing or printing. + * \{ */ + +template StringRefNull DefaultName(T /**/){ + return ""; +} + +template<> static StringRefNull DefaultName(bool /**/){ + return "Bool"; +} + +template<> static StringRefNull DefaultName(int /**/){ + return "Int"; +} + +template<> static StringRefNull DefaultName(float /**/){ + return "Float"; +} + +template<> static StringRefNull DefaultName(float2 /**/){ + return "Vector 2"; +} + +template<> static StringRefNull DefaultName(float3 /**/){ + return "Vector"; +} + +template<> static StringRefNull DefaultName(ColorGeometry4f /**/){ + return "Color"; +} + +template<> static StringRefNull DefaultName(ColorGeometry4b /**/){ + return "Byte Color"; +} + +/** \} */ } // namespace blender::attribute_math