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-09 18:20:48 +0300
committerJacques Lucke <jacques@blender.org>2020-12-09 18:20:57 +0300
commit4a5f36638b0244b586607e76451669ffbc3c1174 (patch)
treec38ffdd8035e029b0c0451d91336b58fdf6bdffe /source/blender/blenkernel/BKE_geometry_set.hh
parent25e151cc34715f4f27f2cecad252b02d1498ba15 (diff)
Geometry Nodes: simplify supporting different input socket types for attributes
This is a non-functional change. The functionality introduced in this commit is not used in master yet. It is used by nodes that are being developed in other branches though.
Diffstat (limited to 'source/blender/blenkernel/BKE_geometry_set.hh')
-rw-r--r--source/blender/blenkernel/BKE_geometry_set.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh
index ef3ae3c381c..3398da9896b 100644
--- a/source/blender/blenkernel/BKE_geometry_set.hh
+++ b/source/blender/blenkernel/BKE_geometry_set.hh
@@ -157,6 +157,14 @@ class GeometryComponent {
const CustomDataType data_type,
const void *value) const;
+ /* Create a read-only dummy attribute that always returns the same value.
+ * The given value is converted to the correct type if necessary. */
+ blender::bke::ReadAttributePtr attribute_get_constant_for_read_converted(
+ const AttributeDomain domain,
+ const CustomDataType in_data_type,
+ const CustomDataType out_data_type,
+ const void *value) const;
+
/* Get a read-only dummy attribute that always returns the same value. */
template<typename T>
blender::bke::TypedReadAttribute<T> attribute_get_constant_for_read(const AttributeDomain domain,