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:
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc51
1 files changed, 19 insertions, 32 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
index f0018e91478..d2a3c339301 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
@@ -593,22 +593,15 @@ static void duplicate_faces(GeometrySet &geometry_set,
loop_mapping,
offsets,
selection,
- bke::mesh_attributes(mesh),
- bke::mesh_attributes_for_write(*new_mesh));
+ mesh.attributes(),
+ new_mesh->attributes_for_write());
- copy_stable_id_faces(mesh,
- selection,
- offsets,
- vert_mapping,
- bke::mesh_attributes(mesh),
- bke::mesh_attributes_for_write(*new_mesh));
+ copy_stable_id_faces(
+ mesh, selection, offsets, vert_mapping, mesh.attributes(), new_mesh->attributes_for_write());
if (attribute_outputs.duplicate_index) {
- create_duplicate_index_attribute(bke::mesh_attributes_for_write(*new_mesh),
- ATTR_DOMAIN_FACE,
- selection,
- attribute_outputs,
- offsets);
+ create_duplicate_index_attribute(
+ new_mesh->attributes_for_write(), ATTR_DOMAIN_FACE, selection, attribute_outputs, offsets);
}
geometry_set.replace_mesh(new_mesh);
@@ -769,17 +762,14 @@ static void duplicate_edges(GeometrySet &geometry_set,
vert_orig_indices,
edge_offsets,
selection,
- bke::mesh_attributes(mesh),
- bke::mesh_attributes_for_write(*new_mesh));
+ mesh.attributes(),
+ new_mesh->attributes_for_write());
- copy_stable_id_edges(mesh,
- selection,
- edge_offsets,
- bke::mesh_attributes(mesh),
- bke::mesh_attributes_for_write(*new_mesh));
+ copy_stable_id_edges(
+ mesh, selection, edge_offsets, mesh.attributes(), new_mesh->attributes_for_write());
if (attribute_outputs.duplicate_index) {
- create_duplicate_index_attribute(bke::mesh_attributes_for_write(*new_mesh),
+ create_duplicate_index_attribute(new_mesh->attributes_for_write(),
ATTR_DOMAIN_EDGE,
selection,
attribute_outputs,
@@ -926,14 +916,13 @@ static void duplicate_points_mesh(GeometrySet &geometry_set,
ATTR_DOMAIN_POINT,
offsets,
selection,
- bke::mesh_attributes(mesh),
- bke::mesh_attributes_for_write(*new_mesh));
+ mesh.attributes(),
+ new_mesh->attributes_for_write());
- copy_stable_id_point(
- offsets, bke::mesh_attributes(mesh), bke::mesh_attributes_for_write(*new_mesh));
+ copy_stable_id_point(offsets, mesh.attributes(), new_mesh->attributes_for_write());
if (attribute_outputs.duplicate_index) {
- create_duplicate_index_attribute(bke::mesh_attributes_for_write(*new_mesh),
+ create_duplicate_index_attribute(new_mesh->attributes_for_write(),
ATTR_DOMAIN_POINT,
selection,
attribute_outputs,
@@ -973,15 +962,13 @@ static void duplicate_points_pointcloud(GeometrySet &geometry_set,
ATTR_DOMAIN_POINT,
offsets,
selection,
- bke::pointcloud_attributes(src_points),
- bke::pointcloud_attributes_for_write(*pointcloud));
+ src_points.attributes(),
+ pointcloud->attributes_for_write());
- copy_stable_id_point(offsets,
- bke::pointcloud_attributes(src_points),
- bke::pointcloud_attributes_for_write(*pointcloud));
+ copy_stable_id_point(offsets, src_points.attributes(), pointcloud->attributes_for_write());
if (attribute_outputs.duplicate_index) {
- create_duplicate_index_attribute(bke::pointcloud_attributes_for_write(*pointcloud),
+ create_duplicate_index_attribute(pointcloud->attributes_for_write(),
ATTR_DOMAIN_POINT,
selection,
attribute_outputs,