Commit 81b4b35c authored by Ken Martin's avatar Ken Martin Committed by Kitware Robot

Merge topic 'xml_writer_progress2'

a1dee02e fix progress reporting on writing XMLMultiBlockDataSets
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: Berk Geveci's avatarBerk Geveci <berk.geveci@kitware.com>
Merge-request: !1285
parents 2684ed8a a1dee02e
......@@ -254,6 +254,9 @@ int vtkXMLCompositeDataWriter::WriteNonCompositeData(
}
// FIXME
// Ken's note, I do not think you can fix this, the
// setprogress range has to be done in the loop that calls
// this function.
// this->SetProgressRange(progressRange, myWriterIndex,
// GetNumberOfInputConnections(0)+writeCollection);
......
......@@ -60,6 +60,15 @@ int vtkXMLMultiBlockDataWriter::WriteComposite(vtkCompositeDataSet* compositeDat
iter->VisitOnlyLeavesOff();
iter->TraverseSubTreeOff();
iter->SkipEmptyNodesOff();
int toBeWritten = 0;
for (iter->InitTraversal(); !iter->IsDoneWithTraversal();
iter->GoToNextItem())
{
toBeWritten++;
}
float progressRange[2] = { 0.f, 0.f };
this->GetProgressRange(progressRange);
int index = 0;
int RetVal = 0;
......@@ -115,6 +124,8 @@ int vtkXMLMultiBlockDataWriter::WriteComposite(vtkCompositeDataSet* compositeDat
datasetXML->SetAttribute("name", name);
}
vtkStdString fileName = this->CreatePieceFileName(writerIdx);
this->SetProgressRange(progressRange, writerIdx, toBeWritten);
if (this->WriteNonCompositeData( curDO, datasetXML, writerIdx,
fileName.c_str()))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment