Commit c034fd6c authored by Nicolas Vuaille's avatar Nicolas Vuaille

Calculator supports graphs and molecules

parent 53f15974
607ea177c2ba56bb739b1914c2575bb2a612476547b1cbe0f76d201b728f380da157670c950f13ef9a538fd5199ee3d200ce193ff615a868c717d0f2ade88232
......@@ -649,6 +649,7 @@ list(APPEND TESTS_WITH_BASELINES
3DWidgetInCustomFilter.xml
CalcParens.xml
Calculator.xml
CalculatorInput.xml
ChangeGlyphRepVisibility.xml
ChangingTimestepsInStateFiles.xml
ChartAxisRangeAndLabels.xml
......
<?xml version="1.0" ?>
<pqevents>
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menu_File" />
<pqevent object="pqClientMainWindow/menubar/menu_File" command="activate" arguments="actionFileOpen" />
<pqevent object="pqClientMainWindow/FileOpenDialog" command="filesSelected" arguments="$PARAVIEW_DATA_ROOT/Testing/Data/porphyrin.cml"/>
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.0/CentralWidgetFrame/Viewport" command="mouseMove" arguments="(0.395741,0.494137,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.0/CentralWidgetFrame/Viewport" command="mouseRelease" arguments="(0.395741,0.494137,1,0,0)" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuFilters" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/Alphabetical" command="activate" arguments="Calculator" />
<pqcheck object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/AttributeType/ComboBox" property="currentText" arguments="Vertex Data" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Function/Scalars" command="activate" arguments="" />
<pqevent object="1QMenu0" command="activate" arguments="Atomic Numbers" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Function/Function" command="set_string" arguments="Atomic Numbers+1" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/variableToolbar/displayColor/Variables" command="activated" arguments="Result" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuSources" />
<pqevent object="pqClientMainWindow/menubar/menuSources/Alphabetical" command="activate" arguments="SphereSource" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/pqProxyGroupMenuManager0/Calculator" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/AttributeType/ComboBox" command="activated" arguments="Cell Data" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Function/Function" command="set_string" arguments="1" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
</pqevents>
......@@ -2570,9 +2570,10 @@ being of a vtkDoubleArray.</Documentation>
</ProxyGroupDomain>
<DataTypeDomain name="input_type">
<DataType value="vtkDataSet" />
<DataType value="vtkGraph"/>
</DataTypeDomain>
<InputArrayDomain name="input_array" optional="1"/>
<Documentation>This property specifies the input dataset to the
<Documentation>This property specifies the input dataset (vtkDataSet or vtkGraph) to the
Calculator filter. The scalar and vector variables may be chosen from
this dataset's arrays.</Documentation>
</InputProperty>
......@@ -2580,12 +2581,14 @@ being of a vtkDoubleArray.</Documentation>
default_values="0"
name="AttributeType"
number_of_elements="1">
<EnumerationDomain name="enum">
<Entry text="Point Data" value="0" />
<Entry text="Cell Data" value="1" />
</EnumerationDomain>
<Documentation>This property determines whether the computation is to
be performed on point-centered or cell-centered data.</Documentation>
<FieldDataDomain name="enum">
<RequiredProperties>
<Property function="Input"
name="Input" />
</RequiredProperties>
</FieldDataDomain>
<Documentation>This property determines on which types of field data the computation is to
be performed on.</Documentation>
</IntVectorProperty>
<IntVectorProperty command="SetCoordinateResults"
default_values="0"
......
......@@ -195,6 +195,14 @@ void pqCalculatorWidget::updateVariables(const QString& mode)
{
fdi = input->GetDataInformation(0)->GetCellDataInformation();
}
else if (mode == "Vertex Data")
{
fdi = input->GetDataInformation(0)->GetVertexDataInformation();
}
else if (mode == "Edge Data")
{
fdi = input->GetDataInformation(0)->GetEdgeDataInformation();
}
if (!fdi)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment