[Paraview] Two input plugin not available
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Thu Apr 22 17:40:05 EDT 2010
Filters have different ways of specifying inputs: you can have
multiple input connections on an input port, and/or you can have
multiple input ports.
Your filter is a multi-input port filter which accepts a single
connection on each of the 2 ports. If user selects, multiple sources
in the pipeline browser, ParaView assumes multiple connections on an
input port, thus enabling only those filters that have the "Input"
property such that it accepts multiple connections (like the Append
filter, Group Datasets filter etc.).
For multiple input ports, ParaView convention is that you simply
select the value for one input port; ParaView will popup a input
selection dialog to allow user to explicitly specify the sources for
the other input ports.
On Thu, Apr 22, 2010 at 5:30 PM, David Doria <daviddoria at gmail.com> wrote:
> 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
>
More information about the ParaView
mailing list