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-11 20:00:37 +0300
committerJacques Lucke <jacques@blender.org>2020-12-11 20:00:37 +0300
commitf5dc34ec9c05cc8f1163313baafe634f4798c29b (patch)
treeb3cc27fc8009fc0180f4b35c5c3646cb2527a72c /source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
parent5ced167336d49ef42e96e205c72d3935ff302a7e (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/nodes/geometry/nodes/node_geo_join_geometry.cc')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc b/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
index dedc3213a1f..80ac45aed4e 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
@@ -218,12 +218,12 @@ static void join_components(Span<const InstancesComponent *> src_components, Geo
InstancesComponent &dst_component = result.get_component_for_write<InstancesComponent>();
for (const InstancesComponent *component : src_components) {
const int size = component->instances_amount();
- Span<const Object *> objects = component->objects();
+ Span<InstancedData> instanced_data = component->instanced_data();
Span<float3> positions = component->positions();
Span<float3> rotations = component->rotations();
Span<float3> scales = component->scales();
for (const int i : IndexRange(size)) {
- dst_component.add_instance(objects[i], positions[i], rotations[i], scales[i]);
+ dst_component.add_instance(instanced_data[i], positions[i], rotations[i], scales[i]);
}
}
}