OptrisOptrisDocumentation

Documentation/OTC SDK/OTC SDK — C++ API referencev12.0

optris::sdk::PaletteEntry

One palette the machine has, listed by name.

Public attributes

name

std::string name

What it is called -- the stem of its file, or the built-in name from GetPaletteName(). Unique within the library.

source

PaletteSource source = PaletteSource::kBuiltIn

Whether the colours come out of the binary or off the disk.

path

std::filesystem::path path

The file this palette was read from, or for a built-in, the shipped CSV that holds the same colours.

Empty when a built-in's shipped CSV was not found -- which is the sign of an incomplete installation, since the SDK installs one for every Palette. The palette still works; the compiled table does not depend on the file being there.

For a log line or a tooltip that answers "which of my three palette directories is this one actually coming from".

builtin

std::optional< Palette > builtin

The Palette this name belongs to, when it is a built-in name.

Set for the SDK's own palettes whether or not a file was found for them -- so a picker can offer the enum value, which is cheaper to persist, when one exists. Empty for a palette an operator added.