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
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to