Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
| Show First 20 Lines • Show All 218 Lines • ▼ Show 20 Lines | static void join_components(Span<const MeshComponent *> src_components, GeometrySet &result) | ||||
| Mesh *new_mesh = join_mesh_topology_and_builtin_attributes(src_components); | Mesh *new_mesh = join_mesh_topology_and_builtin_attributes(src_components); | ||||
| MeshComponent &dst_component = result.get_component_for_write<MeshComponent>(); | MeshComponent &dst_component = result.get_component_for_write<MeshComponent>(); | ||||
| dst_component.replace(new_mesh); | dst_component.replace(new_mesh); | ||||
| /* Don't copy attributes that are stored directly in the mesh data structs. */ | /* Don't copy attributes that are stored directly in the mesh data structs. */ | ||||
| join_attributes(to_base_components(src_components), | join_attributes(to_base_components(src_components), | ||||
| dst_component, | dst_component, | ||||
| {"position", "material_index", "vertex_normal"}); | {"position", "material_index", "vertex_normal", "shade_smooth"}); | ||||
| } | } | ||||
| static void join_components(Span<const PointCloudComponent *> src_components, GeometrySet &result) | static void join_components(Span<const PointCloudComponent *> src_components, GeometrySet &result) | ||||
| { | { | ||||
| int totpoints = 0; | int totpoints = 0; | ||||
| for (const PointCloudComponent *pointcloud_component : src_components) { | for (const PointCloudComponent *pointcloud_component : src_components) { | ||||
| totpoints += pointcloud_component->attribute_domain_size(ATTR_DOMAIN_POINT); | totpoints += pointcloud_component->attribute_domain_size(ATTR_DOMAIN_POINT); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines | |||||