Skip to content

Commit

Permalink
Fix scalar name output.
Browse files Browse the repository at this point in the history
  • Loading branch information
akenmorris committed Jun 21, 2021
1 parent c0966e0 commit 9e33de1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Studio/src/Application/Visualization/ShapeWorksStudioApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1400,14 +1400,14 @@ bool ShapeWorksStudioApp::write_scalars(vtkSmartPointer<vtkPolyData> poly_data,
output << "point,x,y,z";

int num_arrays = poly_data->GetPointData()->GetNumberOfArrays();
std::cerr << "number of arrays = " << num_arrays << "\n";

for (int i = 0; i < num_arrays; i++) {
if (!poly_data->GetPointData()->GetArrayName(i)) {
output << "," << "scalars";
}
else {
output << "," << poly_data->GetPointData()->GetArrayName(i);
std::cout << "array: " << poly_data->GetPointData()->GetArrayName(i) << "\n";
}
}

Expand Down Expand Up @@ -1514,7 +1514,7 @@ void ShapeWorksStudioApp::on_action_export_mesh_scalars_triggered()
base + "_" + QString::fromStdString(domain_names[domain]) + "." + fi.completeSuffix();

auto poly_data = meshes[domain];
if (!this->write_scalars(poly_data, base)) {
if (!this->write_scalars(poly_data, name)) {
return;
}

Expand Down

0 comments on commit 9e33de1

Please sign in to comment.