diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.C index bfdbbcb566..40f60a7c86 100644 --- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.C +++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.C @@ -244,7 +244,8 @@ void Foam::fieldVisualisationBase::setField const scalar position, const word& colourFieldName, vtkPolyDataMapper* mapper, - vtkRenderer* renderer + vtkRenderer* renderer, + vtkPolyData* pData ) const { mapper->InterpolateScalarsBeforeMappingOn(); @@ -269,7 +270,6 @@ void Foam::fieldVisualisationBase::setField mapper->SetScalarRange(range_.first(), range_.second()); // Set to use either cell or point data - vtkPolyData* pData = mapper->GetInput(); const char* fieldName = colourFieldName.c_str(); if (pData->GetCellData()->HasArray(fieldName) == 1) { @@ -439,7 +439,7 @@ void Foam::fieldVisualisationBase::addGlyphs { glyph->Update(); - setField(position, colourFieldName, glyphMapper, renderer); + setField(position, colourFieldName, glyphMapper, renderer, data); glyphMapper->Update(); diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.H b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.H index 65fe8a36b0..2c20154076 100644 --- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.H +++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -158,7 +158,8 @@ protected: const scalar position, const word& colourFieldName, vtkPolyDataMapper* mapper, - vtkRenderer* renderer + vtkRenderer* renderer, + vtkPolyData* pData ) const; //- Add glyphs diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C index 1455eb6191..cb150e0e3a 100644 --- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C +++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -110,7 +110,7 @@ void Foam::functionObjectLine::addGeometryToScene vtkSmartPointer mapper = vtkSmartPointer::New(); - setField(position, fieldName_, mapper, renderer); + setField(position, fieldName_, mapper, renderer, lines->GetOutput()); actor_->SetMapper(mapper); diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C index 88c7a52340..a2a09be360 100644 --- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C +++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C @@ -137,7 +137,7 @@ void Foam::functionObjectSurface::addGeometryToScene vtkSmartPointer::New(); mapper->SetInputConnection(surf->GetOutputPort()); - setField(position, fieldName_, mapper, renderer); + setField(position, fieldName_, mapper, renderer, surf->GetOutput()); surfaceActor_->SetMapper(mapper);