Realize depth code review fixes #6

Merged
Arye Ramaty merged 10 commits from David-Haver/blender:realize-depth into WIP-realize-depth 2024-04-22 11:18:11 +02:00
Showing only changes of commit 702784e07c - Show all commits

View File

@ -942,13 +942,14 @@ static void execute_instances_tasks(
std::unique_ptr<bke::Instances> dst_instances = std::make_unique<bke::Instances>();
dst_instances->resize(offsets.total_size());
/* Prepare generic output attributes. */
/* Makes sure generic output attributes exists. */
for (const int attribute_index : all_instances_attributes.index_range()) {
bke::AttrDomain domain = bke::AttrDomain::Instance;
bke::AttributeIDRef id = all_instances_attributes.ids[attribute_index];
eCustomDataType type = all_instances_attributes.kinds[attribute_index].data_type;
blender::bke::MutableAttributeAccessor attr = dst_instances->attributes_for_write();
attr.lookup_or_add_for_write_only_span(id, domain, type).finish();
dst_instances->attributes_for_write()
.lookup_or_add_for_write_only_span(id, domain, type)
.finish();
}
MutableSpan<float4x4> all_transforms = dst_instances->transforms_for_write();