diff options
author | Hans Goudey <h.goudey@me.com> | 2022-11-03 19:40:33 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-11-03 19:40:33 +0300 |
commit | f4e261bfed553c98f6e987dc84591ecc680e1ebb (patch) | |
tree | 4fd7816190c0b3af1c8a25e686d1a17e951fd3ab /source/blender/blenkernel/intern/customdata.cc | |
parent | 0c79e9df4b88f6a063e7437943e6560b89fbd749 (diff) | |
parent | 41c692ee2f0f5a92d6162e65652e6f8d399df1a9 (diff) |
Merge branch 'master' into refactor-mesh-position-generic
Diffstat (limited to 'source/blender/blenkernel/intern/customdata.cc')
-rw-r--r-- | source/blender/blenkernel/intern/customdata.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc index b46ab2fd799..357e2ac11b3 100644 --- a/source/blender/blenkernel/intern/customdata.cc +++ b/source/blender/blenkernel/intern/customdata.cc @@ -19,6 +19,7 @@ #include "BLI_bitmap.h" #include "BLI_color.hh" +#include "BLI_cpp_type_make.hh" #include "BLI_endian_switch.h" #include "BLI_index_range.hh" #include "BLI_math.h" @@ -5388,6 +5389,8 @@ const blender::CPPType *custom_data_type_to_cpp_type(const eCustomDataType type) return &CPPType::get<int8_t>(); case CD_PROP_BYTE_COLOR: return &CPPType::get<ColorGeometry4b>(); + case CD_PROP_STRING: + return &CPPType::get<MStringProperty>(); default: return nullptr; } @@ -5420,6 +5423,9 @@ eCustomDataType cpp_type_to_custom_data_type(const blender::CPPType &type) if (type.is<ColorGeometry4b>()) { return CD_PROP_BYTE_COLOR; } + if (type.is<MStringProperty>()) { + return CD_PROP_STRING; + } return static_cast<eCustomDataType>(-1); } @@ -5431,3 +5437,5 @@ size_t CustomData_get_elem_size(CustomDataLayer *layer) { return LAYERTYPEINFO[layer->type].size; } + +BLI_CPP_TYPE_MAKE(MStringProperty, MStringProperty, CPPTypeFlags::None); |