Commit f3267876 authored by Ken Martin's avatar Ken Martin Committed by Kitware Robot

Merge topic 'fix_glyph_modified'

1e235197 glyphrep was always marking itself modified
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: Allison Vacanti's avatarAllison Vacanti <allison.vacanti@kitware.com>
Merge-request: !2035
parents 63ddf4dd 1e235197
Pipeline #82081 running with stage
...@@ -262,34 +262,32 @@ int vtkGlyph3DRepresentation::ProcessViewRequest( ...@@ -262,34 +262,32 @@ int vtkGlyph3DRepresentation::ProcessViewRequest(
this->GlyphMapper->SetInputConnection(0, producerPort); this->GlyphMapper->SetInputConnection(0, producerPort);
this->LODGlyphMapper->SetInputConnection(0, producerPortLOD); this->LODGlyphMapper->SetInputConnection(0, producerPortLOD);
// Clear these out in case glyph source extraction fails (See below).
this->GlyphMapper->SetInputDataObject(1, NULL);
this->LODGlyphMapper->SetInputDataObject(1, NULL);
// Extract the real glyph source from the MBDS wrapper (see note above // Extract the real glyph source from the MBDS wrapper (see note above
// vtkGlyphRepresentationMultiBlockMaker) // vtkGlyphRepresentationMultiBlockMaker)
producerGlyphPort->GetProducer()->Update(); producerGlyphPort->GetProducer()->Update();
vtkMultiBlockDataSet* glyphMBDS = vtkMultiBlockDataSet::SafeDownCast( vtkMultiBlockDataSet* glyphMBDS = vtkMultiBlockDataSet::SafeDownCast(
producerGlyphPort->GetProducer()->GetOutputDataObject(producerGlyphPort->GetIndex())); producerGlyphPort->GetProducer()->GetOutputDataObject(producerGlyphPort->GetIndex()));
if (glyphMBDS) if (glyphMBDS && glyphMBDS->GetNumberOfBlocks() == 1)
{ {
if (glyphMBDS->GetNumberOfBlocks() == 1) vtkDataObject* realGlyph = glyphMBDS->GetBlock(0);
{ this->GlyphMapper->SetInputDataObject(1, realGlyph);
vtkDataObject* realGlyph = glyphMBDS->GetBlock(0); }
this->GlyphMapper->SetInputDataObject(1, realGlyph); else
} {
this->GlyphMapper->SetInputDataObject(1, NULL);
} }
producerGlyphPortLOD->GetProducer()->Update(); producerGlyphPortLOD->GetProducer()->Update();
vtkMultiBlockDataSet* glyphMBDSLOD = vtkMultiBlockDataSet::SafeDownCast( vtkMultiBlockDataSet* glyphMBDSLOD = vtkMultiBlockDataSet::SafeDownCast(
producerGlyphPortLOD->GetProducer()->GetOutputDataObject(producerGlyphPortLOD->GetIndex())); producerGlyphPortLOD->GetProducer()->GetOutputDataObject(producerGlyphPortLOD->GetIndex()));
if (glyphMBDSLOD) if (glyphMBDSLOD && glyphMBDSLOD->GetNumberOfBlocks() == 1)
{ {
if (glyphMBDSLOD->GetNumberOfBlocks() == 1) vtkDataObject* realGlyphLOD = glyphMBDSLOD->GetBlock(0);
{ this->LODGlyphMapper->SetInputDataObject(1, realGlyphLOD);
vtkDataObject* realGlyphLOD = glyphMBDSLOD->GetBlock(0); }
this->LODGlyphMapper->SetInputDataObject(1, realGlyphLOD); else
} {
this->LODGlyphMapper->SetInputDataObject(1, NULL);
} }
bool lod = this->SuppressLOD ? false : (inInfo->Has(vtkPVRenderView::USE_LOD()) == 1); bool lod = this->SuppressLOD ? false : (inInfo->Has(vtkPVRenderView::USE_LOD()) == 1);
......
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