diff options
author | Hans Goudey <h.goudey@me.com> | 2020-12-16 21:33:13 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-12-16 21:33:13 +0300 |
commit | c484b54453e6072399dd79daccf237bb4bd73b41 (patch) | |
tree | 71c659eee2541f55daacce87e0a3f47704dd1bbb /source/blender/makesdna/DNA_customdata_types.h | |
parent | c06c5d617a8b0e72acdeb60674172d748093bf24 (diff) |
Geometry Nodes: Boolean attribute type
This adds a boolean attribute and custom data type, to be used in the
point separate node. It also adds it as supported data types in the
random attribute and attribute fill nodes.
There are more clever ways of storing a boolean attribute that make
more sense in certain situations-- sets, bitfields, and others, this
commit keeps it simple, saving those changes for when there is a proper
use case for them. In any case, we will still probably always want the
idea of a boolean attribute.
Differential Revision: https://developer.blender.org/D9818
Diffstat (limited to 'source/blender/makesdna/DNA_customdata_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_customdata_types.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index ae0bb20e529..832d55ea151 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -75,8 +75,7 @@ typedef struct CustomData { * MUST be >= CD_NUMTYPES, but we cant use a define here. * Correct size is ensured in CustomData_update_typemap assert(). */ - int typemap[50]; - char _pad[4]; + int typemap[51]; /** Number of layers, size of layers array. */ int totlayer, maxlayer; /** In editmode, total size of all data layers. */ @@ -156,7 +155,9 @@ typedef enum CustomDataType { CD_PROP_FLOAT3 = 48, CD_PROP_FLOAT2 = 49, - CD_NUMTYPES = 50, + CD_PROP_BOOL = 50, + + CD_NUMTYPES = 51, } CustomDataType; /* Bits for CustomDataMask */ @@ -208,6 +209,7 @@ typedef enum CustomDataType { #define CD_MASK_PROP_COLOR (1ULL << CD_PROP_COLOR) #define CD_MASK_PROP_FLOAT3 (1ULL << CD_PROP_FLOAT3) #define CD_MASK_PROP_FLOAT2 (1ULL << CD_PROP_FLOAT2) +#define CD_MASK_PROP_BOOL (1ULL << CD_PROP_BOOL) /** Multires loop data. */ #define CD_MASK_MULTIRES_GRIDS (CD_MASK_MDISPS | CD_GRID_PAINT_MASK) |