visit-dav / visit

VisIt - Visualization and Data Analysis for Mesh-based Scientific Data
https://visit.llnl.gov
BSD 3-Clause "New" or "Revised" License
405 stars 110 forks source link

Many color tables not useable with -noconfig #17713

Open biagas opened 2 years ago

biagas commented 2 years ago

Describe the bug

I came across this trying to use the 'Accent' color table in a test script, via GetColorTable('Accent') It caused an exception: visit.VisItException: The argument must be a color table name.

GetColorTable('Accent') works from the CLI.

I also tried using it with a Pseudocolor plot:

pc = PseudocolorAttributes()
pc.colorTableName="Accent"
SetPlotOptions(pc)

Error:

VisIt: Error - Pseudocolor:  (InvalidColortableException)
viewer.exe: There is no color table named "Accent". You need to specify the name of a valid color table.

This is due to -noconfig not loading the color tables.

Helpful additional information

To Reproduce

Steps to reproduce the behavior. For example:

  1. Add GetColorTable('Accent') to the beginning of test script and run that test
  2. See the exception

Or

  1. Run visit -noconfig
  2. Open the ColorTables window, see only the hardcoded tables.
  3. Expected behavior

    I expected all color tables to be useable from the testing infrastructure and when -noconfig is used.

Desktop

biagas commented 2 years ago

@JustinPrivitera pointed out our docs regarding '-noconfig' not loading users' color tables (in ~/.visit). Turns out -noconfig prevents even the loading of the color tables in resources/colortables . The test suite is run with -noconfig.

biagas commented 2 years ago

ViewerStateManager::ProcessSettings() calls avtColorTables::Instance()->ImportColorTables only if 'noconfig' is not set.

avtColorTables::ImportColorTables is responsible for importing both visit internal tables stored in resources/colortables and for user's color tables stored in ~/.visit (or equivalent).

If it is decided that the tables stored in resources/colortables should be imported regardless of the 'noconfig' setting, then avtColorTables::ImportColorTables can be split into two, an import-from-resources and an import-from-user, with import-from-resources always called, and import-from-user only called when 'noconfig' is not set.

brugger1 commented 2 years ago

We should have -noconfig only affect the reading of the configuration file. We can add separate options to turn off color tables or host profiles.