diff options
author | Jacques Lucke <jacques@blender.org> | 2020-12-11 20:00:37 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-12-11 20:00:37 +0300 |
commit | f5dc34ec9c05cc8f1163313baafe634f4798c29b (patch) | |
tree | b3cc27fc8009fc0180f4b35c5c3646cb2527a72c /source/blender/blenkernel/BKE_geometry_set.h | |
parent | 5ced167336d49ef42e96e205c72d3935ff302a7e (diff) |
Geometry Nodes: support instancing collections
The Point Instance node can instance entire collections now.
Before, only individual collections were supported.
Randomly selecting objects from the collection on a per point basis
is not support, yet.
Last part of D9739.
Ref T82372.
Diffstat (limited to 'source/blender/blenkernel/BKE_geometry_set.h')
-rw-r--r-- | source/blender/blenkernel/BKE_geometry_set.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_geometry_set.h b/source/blender/blenkernel/BKE_geometry_set.h index 026f4d39d51..87bb96be145 100644 --- a/source/blender/blenkernel/BKE_geometry_set.h +++ b/source/blender/blenkernel/BKE_geometry_set.h @@ -26,16 +26,30 @@ extern "C" { struct Object; struct GeometrySet; +struct Collection; 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; + int BKE_geometry_set_instances(const struct GeometrySet *geometry_set, float (**r_positions)[3], float (**r_rotations)[3], float (**r_scales)[3], - struct Object ***r_objects); + struct InstancedData **r_instanced_data); #ifdef __cplusplus } |