diff options
author | Jacques Lucke <jacques@blender.org> | 2022-11-12 20:33:31 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-11-12 20:33:31 +0300 |
commit | a6c822733ac7da4921297804475adadd50c08ed9 (patch) | |
tree | b34cc2924d7effa33d9ca9abfa026c8917fb953a /source/blender/blenkernel/intern/customdata.cc | |
parent | a145b96396c4d2b8dd5ae027c676e838df0bd701 (diff) |
BLI: improve CPPType system
* Support bidirectional type lookups. E.g. finding the base type of a
field was supported, but not the other way around. This also removes
the todo in `get_vector_type`. To achieve this, types have to be
registered up-front.
* Separate `CPPType` from other "type traits". For example, previously
`ValueOrFieldCPPType` adds additional behavior on top of `CPPType`.
Previously, it was a subclass, now it just contains a reference to the
`CPPType` it corresponds to. This follows the composition-over-inheritance
idea. This makes it easier to have self-contained "type traits" without
having to put everything into `CPPType`.
Differential Revision: https://developer.blender.org/D16479
Diffstat (limited to 'source/blender/blenkernel/intern/customdata.cc')
-rw-r--r-- | source/blender/blenkernel/intern/customdata.cc | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc index bccb625feb2..c8d7c4f2fdc 100644 --- a/source/blender/blenkernel/intern/customdata.cc +++ b/source/blender/blenkernel/intern/customdata.cc @@ -19,7 +19,6 @@ #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" @@ -5407,5 +5406,3 @@ size_t CustomData_get_elem_size(CustomDataLayer *layer) { return LAYERTYPEINFO[layer->type].size; } - -BLI_CPP_TYPE_MAKE(MStringProperty, MStringProperty, CPPTypeFlags::None); |