From: Anthony Geay Date: Tue, 27 Mar 2018 06:22:31 +0000 (+0200) Subject: Improve SimpleMode plugin ergonomy X-Git-Tag: V8_5_0b1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c10a0e35cd4833bf803b13d82264843fa99bd45b;p=modules%2Fparavis.git Improve SimpleMode plugin ergonomy --- diff --git a/src/Plugins/SimpleMode/IO/vtkSimpleMode.cxx b/src/Plugins/SimpleMode/IO/vtkSimpleMode.cxx index 7942578b..9a351f4b 100644 --- a/src/Plugins/SimpleMode/IO/vtkSimpleMode.cxx +++ b/src/Plugins/SimpleMode/IO/vtkSimpleMode.cxx @@ -96,7 +96,6 @@ vtkSmartPointer ForceTo3Compo(vtkDoubleArray *arr) if(nbCompo==3) { vtkSmartPointer ret(arr); - arr->Register(0); return ret; } if(nbCompo==6) @@ -410,12 +409,16 @@ int vtkSimpleMode::RequestData(vtkInformation *request, vtkInformationVector **i vtkDataArray *dummy(0); ExtractInfo3(ds,this->Internal->getFieldForReal(),dummy,idx2); } - ds->GetPointData()->SetActiveAttribute(idx2,vtkDataSetAttributes::SCALARS); // vtkInformation *outInfo(outputVector->GetInformationObject(0)); vtkPolyData *output(vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()))); output->ShallowCopy(ds); - + + vtkDataArray* array = ds->GetPointData()->GetArray(idx2); + vtkSmartPointer result = vtkSmartPointer::Take(vtkDataArray::CreateDataArray(array->GetDataType())); + result->ShallowCopy(array); + result->SetName("Result"); + output->GetPointData()->SetScalars(result); } catch(MZCException& e) { diff --git a/src/Plugins/SimpleMode/ParaViewPlugin/Resources/SimpleModeServer.xml b/src/Plugins/SimpleMode/ParaViewPlugin/Resources/SimpleModeServer.xml index 45b9c0a3..68a0714a 100644 --- a/src/Plugins/SimpleMode/ParaViewPlugin/Resources/SimpleModeServer.xml +++ b/src/Plugins/SimpleMode/ParaViewPlugin/Resources/SimpleModeServer.xml @@ -61,7 +61,6 @@ Select the array that represents the requested mode. command="SetAnimationTime" default_values="0" name="AnimationTime" - panel_visibility="advanced" number_of_elements="1"> The value of this property sets the scale factor applied for all nodes displacement.