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>2020-12-03 18:25:48 +0300
committerJacques Lucke <jacques@blender.org>2020-12-03 18:25:48 +0300
commit107231eb956a953c89a2ab134371988ebe338c59 (patch)
treeb8e46bf488b089766e5f2e41dd9affd096efd38c /source/blender/blenkernel/BKE_attribute_access.hh
parent2c181521ec0c4e0fca579fb512801410570800fb (diff)
Geometry Nodes: improve support for Color attributes
* Add typed attribute accessors for color attributes. * Support implicit conversions between colors and floats.
Diffstat (limited to 'source/blender/blenkernel/BKE_attribute_access.hh')
-rw-r--r--source/blender/blenkernel/BKE_attribute_access.hh6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_attribute_access.hh b/source/blender/blenkernel/BKE_attribute_access.hh
index f5ee2cf2bf5..c4a704ef385 100644
--- a/source/blender/blenkernel/BKE_attribute_access.hh
+++ b/source/blender/blenkernel/BKE_attribute_access.hh
@@ -23,6 +23,7 @@
#include "BKE_attribute.h"
+#include "BLI_color.hh"
#include "BLI_float3.hh"
struct Mesh;
@@ -267,10 +268,9 @@ template<typename T> class TypedWriteAttribute {
using FloatReadAttribute = TypedReadAttribute<float>;
using Float3ReadAttribute = TypedReadAttribute<float3>;
+using Color4fReadAttribute = TypedReadAttribute<Color4f>;
using FloatWriteAttribute = TypedWriteAttribute<float>;
using Float3WriteAttribute = TypedWriteAttribute<float3>;
-
-const CPPType *custom_data_type_to_cpp_type(const CustomDataType type);
-CustomDataType cpp_type_to_custom_data_type(const CPPType &type);
+using Color4fWriteAttribute = TypedWriteAttribute<Color4f>;
} // namespace blender::bke