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:
authorErik <ecke101@gmail.com>2021-11-19 19:53:48 +0300
committerErik <ecke101@gmail.com>2021-11-19 19:53:48 +0300
commit97533eede444217bd28df50a721707bdce340403 (patch)
tree0d3577b480ffd4b1c7f8030186b08ea95cb5d7b8 /source/blender/blenkernel/BKE_geometry_set.hh
parent9e3a913b35df9f9519d48e18223192a34ab8f22a (diff)
Geometry Nodes: Support custom instance attributes
Adds an attribute provider for instance attributes. A new domain `ATTR_DOMAIN_INSTANCE` is implemented. Instance attributes are not yet realized correctly. Differential Revision: D13149
Diffstat (limited to 'source/blender/blenkernel/BKE_geometry_set.hh')
-rw-r--r--source/blender/blenkernel/BKE_geometry_set.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh
index 63ada807c55..35e66908d54 100644
--- a/source/blender/blenkernel/BKE_geometry_set.hh
+++ b/source/blender/blenkernel/BKE_geometry_set.hh
@@ -651,6 +651,8 @@ class InstancesComponent : public GeometryComponent {
mutable std::mutex almost_unique_ids_mutex_;
mutable blender::Array<int> almost_unique_ids_;
+ blender::bke::CustomDataAttributes attributes_;
+
public:
InstancesComponent();
~InstancesComponent() = default;
@@ -685,6 +687,9 @@ class InstancesComponent : public GeometryComponent {
blender::Span<int> almost_unique_ids() const;
+ blender::bke::CustomDataAttributes &attributes();
+ const blender::bke::CustomDataAttributes &attributes() const;
+
int attribute_domain_size(const AttributeDomain domain) const final;
void foreach_referenced_geometry(