Geometry Nodes: Change "Separate Components" node output order to match Spreadsheet #107868

Merged
Hans Goudey merged 2 commits from kartiz0l/blender:change_geo_separate_components_output_order into main 2023-05-12 18:08:14 +02:00
1 changed files with 6 additions and 6 deletions

View File

@ -8,8 +8,8 @@ static void node_declare(NodeDeclarationBuilder &b)
{
b.add_input<decl::Geometry>(N_("Geometry"));
b.add_output<decl::Geometry>(N_("Mesh")).propagate_all();
b.add_output<decl::Geometry>(N_("Point Cloud")).propagate_all();
b.add_output<decl::Geometry>(N_("Curve")).propagate_all();
b.add_output<decl::Geometry>(N_("Point Cloud")).propagate_all();
b.add_output<decl::Geometry>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume"))
.translation_context(BLT_I18NCONTEXT_ID_ID)
.propagate_all();
@ -21,20 +21,20 @@ static void node_geo_exec(GeoNodeExecParams params)
GeometrySet geometry_set = params.extract_input<GeometrySet>("Geometry");
GeometrySet meshes;
GeometrySet curves;
GeometrySet point_clouds;
GeometrySet volumes;
GeometrySet curves;
GeometrySet instances;
if (geometry_set.has<MeshComponent>()) {
meshes.add(*geometry_set.get_component_for_read<MeshComponent>());
}
if (geometry_set.has<PointCloudComponent>()) {
point_clouds.add(*geometry_set.get_component_for_read<PointCloudComponent>());
}
if (geometry_set.has<CurveComponent>()) {
curves.add(*geometry_set.get_component_for_read<CurveComponent>());
}
if (geometry_set.has<PointCloudComponent>()) {
point_clouds.add(*geometry_set.get_component_for_read<PointCloudComponent>());
}
if (geometry_set.has<VolumeComponent>()) {
volumes.add(*geometry_set.get_component_for_read<VolumeComponent>());
}
@ -43,8 +43,8 @@ static void node_geo_exec(GeoNodeExecParams params)
}
params.set_output("Mesh", meshes);
params.set_output("Point Cloud", point_clouds);
params.set_output("Curve", curves);
params.set_output("Point Cloud", point_clouds);
params.set_output("Volume", volumes);
params.set_output("Instances", instances);
}