diff options
author | Jacques Lucke <jacques@blender.org> | 2021-05-04 11:16:24 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-05-04 11:16:24 +0300 |
commit | 4599cea15dcf7563bfbcb8be148ef5f89cf2dddd (patch) | |
tree | 041575dbb43b425fc04bfde4cb4676c4882c41e3 /source/blender/blenkernel/BKE_geometry_set.h | |
parent | e6bf272abd92e0b524ac35e81599075f21537c97 (diff) |
Geometry Nodes: refactor instances component
The main goal of this refactor is to not store Object/Collection
pointers for every individual instance. Instead instances now
store a handle for the referenced data. The actual Object/Collection
pointers are stored in a new `InstanceReference` class.
This refactor also allows for some better optimizations further down
the line, because one does not have to search through all instances
anymore to find what data is instanced.
Furthermore, this refactor makes it easier to support instancing
`GeometrySet` or any other data that has to be owned by the
`InstancesComponent`.
Differential Revision: https://developer.blender.org/D11125
Diffstat (limited to 'source/blender/blenkernel/BKE_geometry_set.h')
-rw-r--r-- | source/blender/blenkernel/BKE_geometry_set.h | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/source/blender/blenkernel/BKE_geometry_set.h b/source/blender/blenkernel/BKE_geometry_set.h index cb5526cd690..5f6a9ec7b91 100644 --- a/source/blender/blenkernel/BKE_geometry_set.h +++ b/source/blender/blenkernel/BKE_geometry_set.h @@ -43,19 +43,6 @@ void BKE_geometry_set_free(struct GeometrySet *geometry_set); bool BKE_geometry_set_has_instances(const struct GeometrySet *geometry_set); -typedef enum InstancedDataType { - INSTANCE_DATA_TYPE_OBJECT = 0, - INSTANCE_DATA_TYPE_COLLECTION = 1, -} InstancedDataType; - -typedef struct InstancedData { - InstancedDataType type; - union { - struct Object *object; - struct Collection *collection; - } data; -} InstancedData; - #ifdef __cplusplus } #endif |