[Paraview] Two input plugin not available

David Doria daviddoria at gmail.com
Thu Apr 22 17:30:20 EDT 2010


I have a VTK class that takes two inputs:

int vtkRestorePolyDataPointIds::FillInputPortInformation(
                                            int port, vtkInformation* info)
{
  if ( port == 0 ) //this is the polydata we want to correct
    {
    info->Set(vtkDataObject::DATA_TYPE_NAME(), "vtkPolyData" );
    return 1;
    }
  else if(port == 1) //this is the object we want to use to match the ids to
    {
    info->Set(vtkDataObject::DATA_TYPE_NAME(), "vtkPointSet" );
    return 1;
    }

  return 0; //invalid port requested
}

So I made two InputProperty entires in the xml:

<!--input-->
      <InputProperty
         name="Input"
         port_index="0"
         command="SetInputConnection">
        <ProxyGroupDomain name="groups">
          <Group name="sources"/>
          <Group name="filters"/>
        </ProxyGroupDomain>

        <DataTypeDomain name="input_type">
          <DataType value="vtkPolyData"/>
        </DataTypeDomain>
        <Documentation>
          Set the input point set.
        </Documentation>
      </InputProperty>

<!--target ids-->
      <InputProperty
         name="TargetIds"
         port_index="1"
         command="SetInputConnection">
        <ProxyGroupDomain name="groups">
          <Group name="sources"/>
          <Group name="filters"/>
        </ProxyGroupDomain>

        <DataTypeDomain name="input_type">
          <DataType value="vtkPointSet"/>
        </DataTypeDomain>
        <Documentation>
          Set the target point set.
        </Documentation>
      </InputProperty>

However, if I create two sources ( a box and a cone), select one,
ctrl+click the other one, then go to the filters list, it is greyed
out. Can anyone see a problem with the above?

Thanks,

David


More information about the ParaView mailing list