Commit 10589c43 authored by Nicolas Vuaille's avatar Nicolas Vuaille

Add MapScalars option to the molecule represenation

  molecules can now be colored using RGB values from 3-components array.
parent b0164bd0
4759c9e43290c278ec2cde9b83e54b54e1cd529c145d35cce044b6cc1c71e3778f3464b6413bb7cc9926d11508c80ac6bba1ce5c0fa04329edf234a4182170dc
......@@ -11,6 +11,7 @@ ExternalData_Expand_Arguments(ParaViewData _
"DATA{${paraview_test_data_directory_input}/Data/AMReX-MFIX/plt00005/Level_0/,REGEX:.*}"
"DATA{${paraview_test_data_directory_input}/Data/AMReX-MFIX/plt00005/particles/,REGEX:.*}"
"DATA{${paraview_test_data_directory_input}/Data/AMReX-MFIX/plt00005/particles/Level_0/,REGEX:.*}"
"DATA{${paraview_test_data_directory_input}/Data/3GQP.pdb}"
"DATA{${paraview_test_data_directory_input}/Data/can-restarts/,REGEX:.*}"
"DATA{${paraview_test_data_directory_input}/Data/CompositeGlyphInput.vtp}"
"DATA{${paraview_test_data_directory_input}/Data/CompositeGlyphTree.vtm}"
......@@ -721,6 +722,7 @@ list(APPEND TESTS_WITH_BASELINES
LoadSaveStateVolume.xml
ManyTypesXMLWriterReader.xml
MoleculeBonds.xml
MoleculeColoring.xml
MoleculeToLines.xml
MultiBlockAttributes1.xml
MultiBlockInspector.xml
......@@ -1401,6 +1403,8 @@ set (ResetToVisibleRange_DISABLE_CRS TRUE)
# Molecules are not supported in client-serve modes, currently.
set (Molecule_DISABLE_CS TRUE)
set (Molecule_DISABLE_CRS TRUE)
set (MoleculeColoring_DISABLE_CS TRUE)
set (MoleculeColoring_DISABLE_CRS TRUE)
##########################################################
# List of known incompatible tests for Collaboration
......
<?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/3GQP.pdb" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mousePress" arguments="1,1,0,11,11,/0:0/0:0/1:1" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,11,11,/0:0/0:0/1:1" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuFilters" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/Chemistry" command="activate" arguments="PointSetToMolecule" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/variableToolbar/displayColor/Variables" command="activated" arguments="rgb_colors" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/DisplayFrame/ProxyPanel/MapScalars/CheckBox" command="set_boolean" arguments="false" />
</pqevents>
# Improvements to Graph and Molecules support
We introduced the following features:
* Panel information handles values for graphs and molecules
* Calculator supports graphs and molecules as input
* Molecule representation supports 'map scalars' option: as for other datasets,
it allows to disable the color mapping and then use direct RGB values from 3-components array.
......@@ -323,3 +323,8 @@ void vtkMoleculeRepresentation::UpdateColoringParameters()
}
vtkForwardPropertyCallMacro(SetOpacity, value, double);
void vtkMoleculeRepresentation::SetMapScalars(bool map)
{
this->Mapper->SetMapScalars(map);
}
......@@ -50,6 +50,8 @@ public:
// Forwarded to Actor->GetProperty()
virtual void SetOpacity(double val);
void SetMapScalars(bool map);
// Description:
// No-op. For compatibility with vtkPVCompositeRepresentation, which calls
// SetRepresentation on it's subproxies.
......
......@@ -6566,6 +6566,18 @@
The opacity to use when rendering the model.
</Documentation>
</DoubleVectorProperty>
<IntVectorProperty command="SetMapScalars"
default_values="1"
name="MapScalars"
number_of_elements="1">
<BooleanDomain name="bool" />
<Documentation>When enabled, LookupTable will always be
used for scalar mapping. Otherwise, when up to 4 component
scalars are present, the components are clamped to a valid
color interval (0-255 for an integral type and 0.0-1.0 for a
floating point type) and then directly used as
color.</Documentation>
</IntVectorProperty>
<IntVectorProperty command="SetRenderAtoms"
default_values="1"
name="RenderAtoms"
......@@ -6759,6 +6771,8 @@
<PropertyGroup label="Coloring">
<Property name="Opacity"
panel_visibility="default" />
<Property name="MapScalars"
panel_visibility="default" />
<Property name="ColorArrayName"
panel_visibility="default" />
<Property name="LookupTable"
......
576d5924de8ce581b22abb3a4903d76d380ff9aa22d9f8c8eddeb627c055f4bbcf86bb81b92f9734625867aa18ab3b8b1a3aec6626889abacab971351f0973db
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