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/blenkernel/BKE_attribute_access.hh | |
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/blenkernel/BKE_attribute_access.hh')
-rw-r--r-- | source/blender/blenkernel/BKE_attribute_access.hh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_attribute_access.hh b/source/blender/blenkernel/BKE_attribute_access.hh index 564e912551a..eafd86d176b 100644 --- a/source/blender/blenkernel/BKE_attribute_access.hh +++ b/source/blender/blenkernel/BKE_attribute_access.hh @@ -264,9 +264,11 @@ template<typename T> class TypedWriteAttribute { } }; +using BooleanReadAttribute = TypedReadAttribute<bool>; using FloatReadAttribute = TypedReadAttribute<float>; using Float3ReadAttribute = TypedReadAttribute<float3>; using Color4fReadAttribute = TypedReadAttribute<Color4f>; +using BooleanWriteAttribute = TypedWriteAttribute<bool>; using FloatWriteAttribute = TypedWriteAttribute<float>; using Float3WriteAttribute = TypedWriteAttribute<float3>; using Color4fWriteAttribute = TypedWriteAttribute<Color4f>; |