From c484b54453e6072399dd79daccf237bb4bd73b41 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Wed, 16 Dec 2020 12:33:13 -0600 Subject: 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 --- source/blender/blenkernel/intern/customdata.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source/blender/blenkernel/intern/customdata.c') diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index fdb3e246382..1e2bc570c65 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -1837,6 +1837,21 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = { layerMultiply_propfloat2, NULL, layerAdd_propfloat2}, + /* 50: CD_PROP_POOL */ + {sizeof(bool), + "bool", + 1, + N_("Boolean"), + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL}, }; static const char *LAYERTYPENAMES[CD_NUMTYPES] = { @@ -1892,6 +1907,7 @@ static const char *LAYERTYPENAMES[CD_NUMTYPES] = { "CDPropCol", "CDPropFloat3", "CDPropFloat2", + "CDPropBoolean", }; const CustomData_MeshMasks CD_MASK_BAREMESH = { -- cgit v1.2.3