vtkInformationVector *theOutputVector)
{
bool anIsExecuted = false;
- if(GetNumberOfInputConnections(0) > 1 || IsMergingInputs() || IsMappingInputs())
+ if( IsMergingInputs() || IsMappingInputs() )
anIsExecuted = VISU::UnstructuredGridRequestData(theInputVector,
- this->GetNumberOfInputConnections(0),
+ GetNumberOfInputConnections( 0 ),
theOutputVector,
GetSharedPointSet(),
IsMergingInputs(),
IsMappingInputs());
- if(!anIsExecuted)
+ if( !anIsExecuted )
anIsExecuted = Superclass::RequestData(theRequest,
theInputVector,
theOutputVector);
bool theIsMergingInputs,
bool theIsMappingInputs)
{
- if(theSharedPointSet){
+ if ( theNumberOfInputConnections == 1 ) {
+ // get the input and ouptut
+ vtkDataSet *anInput = VISU::GetInput( theInputVector, 0 );
+ vtkDataSet* anOutput = VISU::GetOutput( theOutputVector );
+
+ if ( anInput->GetDataObjectType() != anOutput->GetDataObjectType() )
+ return false;
+
+ // This has to be here because it initialized all field datas.
+ anOutput->CopyStructure( anInput );
+
+ // Pass all. (data object's field data is passed by the
+ // superclass after this method)
+ anOutput->GetPointData()->PassData( anInput->GetPointData() );
+ anOutput->GetCellData()->PassData( anInput->GetCellData() );
+
+ return true;
+ }
+
+ if ( theSharedPointSet ) {
vtkPoints* aPoints = theSharedPointSet->GetPoints();
if(aPoints->GetNumberOfPoints() < 1)
return true;
TDataSet* anOutput = TDataSet::SafeDownCast(VISU::GetOutput(theOutputVector));
vtkIdType anNbInputs = theNumberOfInputConnections;
- if(theIsMergingInputs){
+ if ( theIsMergingInputs ) {
TCellIdMerger aFunctor(anNbInputs);
ForEachInput<TCellIdMerger>(theInputVector, anNbInputs, aFunctor);