Skip to content

Conversation

@justinlaughlin
Copy link
Contributor

@justinlaughlin justinlaughlin commented Jun 3, 2025

  • Adds the option to specify a palette using CLI arg -pname or --palette-name
  • Adds option to specify an external palette file and/or palette name to use in glvis "scripts" and streams
  • Internally, use PaletteState.SetFallbackIndex() over PaletteState.SetIndex() to specify a fallback index if the default is not specified (implementation would have been more invasive via PaletteState so it is done through the global BasePalettes)

@najlkin
Copy link
Contributor

najlkin commented Jun 4, 2025

How about script and stream commands. Could you add them too? 😉 If you branch this from #335 , it would be very easy. It makes sense especially with palette files, because it is not that easy to sort out what will be the index when loaded to GLVis.

@najlkin najlkin linked an issue Jun 5, 2025 that may be closed by this pull request
@tzanio tzanio mentioned this pull request Jan 5, 2026
33 tasks
@tzanio tzanio self-requested a review January 6, 2026 19:21
@tzanio
Copy link
Member

tzanio commented Jan 14, 2026

@justinlaughlin, can you resolve the conflicts?

@justinlaughlin justinlaughlin changed the base branch from master to scripts-refac January 20, 2026 18:45
@justinlaughlin
Copy link
Contributor Author

justinlaughlin commented Jan 20, 2026

Updated to branch off of #335 ; I added script/stream commands. ping @najlkin @tzanio

To test the script I ran this script with mesh/solution generated from a mfem example

solution refined.mesh sol.gf
palette_file share/palettes-crameri.txt
palette_name batlow

To test the stream I modified capacitor.saved and added this at the end

palette_file share/palettes-crameri.txt
palette_name batlow

@najlkin
Copy link
Contributor

najlkin commented Jan 20, 2026

A rather tangential, but also when you change the palette, the number that is shown is off by one compared to the list 🫣 .

@justinlaughlin justinlaughlin mentioned this pull request Jan 20, 2026
8 tasks
@najlkin
Copy link
Contributor

najlkin commented Jan 21, 2026

Everything seems to work! 🤩

@najlkin najlkin added this to the glvis-4.5 milestone Jan 21, 2026
Copy link
Contributor

@najlkin najlkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🎉 Pls mention it in changelog.

@najlkin
Copy link
Contributor

najlkin commented Jan 22, 2026

Ahh, I do not like that "palettes", that "palette_file" was better in my opinion 😛 I do not think that there must be consistency with command line parameters. This is rather confusing, because "palette" command takes the index and "palettes" a file 🤪 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please support color pallete command argument

4 participants