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:
authorJacques Lucke <jacques@blender.org>2022-11-12 20:33:31 +0300
committerJacques Lucke <jacques@blender.org>2022-11-12 20:33:31 +0300
commita6c822733ac7da4921297804475adadd50c08ed9 (patch)
treeb34cc2924d7effa33d9ca9abfa026c8917fb953a /source/creator/creator.c
parenta145b96396c4d2b8dd5ae027c676e838df0bd701 (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/creator/creator.c')
-rw-r--r--source/creator/creator.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 2cd54deeab5..0a6537865d4 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -37,6 +37,7 @@
#include "BKE_cachefile.h"
#include "BKE_callbacks.h"
#include "BKE_context.h"
+#include "BKE_cpp_types.h"
#include "BKE_global.h"
#include "BKE_gpencil_modifier.h"
#include "BKE_idtype.h"
@@ -425,6 +426,7 @@ int main(int argc,
BKE_blender_globals_init(); /* blender.c */
+ BKE_cpp_types_init();
BKE_idtype_init();
BKE_cachefiles_init();
BKE_modifier_init();