]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Improve SimpleMode plugin ergonomy
authorAnthony Geay <anthony.geay@edf.fr>
Tue, 27 Mar 2018 06:22:31 +0000 (08:22 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Wed, 28 Mar 2018 14:22:01 +0000 (16:22 +0200)
src/Plugins/SimpleMode/IO/vtkSimpleMode.cxx
src/Plugins/SimpleMode/ParaViewPlugin/Resources/SimpleModeServer.xml

index 7942578b8293374c46e207773e74223086a054bc..9a351f4b72805b7407cb8fabcfbc665d52666ea3 100644 (file)
@@ -96,7 +96,6 @@ vtkSmartPointer<vtkDoubleArray> ForceTo3Compo(vtkDoubleArray *arr)
   if(nbCompo==3)
     {
       vtkSmartPointer<vtkDoubleArray> 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<vtkDataArray> result = vtkSmartPointer<vtkDataArray>::Take(vtkDataArray::CreateDataArray(array->GetDataType()));
+      result->ShallowCopy(array);
+      result->SetName("Result");
+      output->GetPointData()->SetScalars(result);            
     }
   catch(MZCException& e)
     {
index 45b9c0a313f1675e17e075630b53860ea62d3b37..68a0714aa14d07605311f6dea32ff214b7fbb6c7 100644 (file)
@@ -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">
         <DoubleRangeDomain max="1" min="0" name="range" />
         <Documentation>The value of this property sets the scale factor applied for all nodes displacement.</Documentation>