Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Member Functions | Static Public Member Functions | List of all members
ColorIOAutoDetection Class Reference

Public Member Functions

 ColorIOAutoDetection (OfApp *of_app)
 
bool load_config (ParserEntry *preferences)
 Loads the configuration that has been defined in the Color Space editor by the user, from the application preferences.
 
bool save_config (ParserEntry *preferences)
 Saves the configuration that has been defined in the Color Space editor by the user, to the application preferences.
 
unsigned int get_categories_count () const
 
void add_file_format (const CoreString &file_format_name, const CoreString &extensions, const CoreString &color_space)
 
void remove_file_format (unsigned int file_format_index)
 
CoreString get_file_format (unsigned int index) const
 
void set_file_format (unsigned int index, const CoreString &name)
 
void set_extension_from_file_format (unsigned int file_format_index, const CoreString &extensions)
 
CoreString get_extension_from_file_format (const CoreString &file_format_name) const
 
void set_default_color_space_from_file_format (unsigned int file_format_index, const CoreString &color_space)
 
CoreString get_default_color_space_from_extension (const CoreString &extension) const
 Get the color space associated to the given file format extension.
 
CoreString get_default_color_space_from_file_format (const CoreString &file_format_name) const
 Get the color space associated to the given file format name.
 
void init_default_color_spaces ()
 
void use_file_config (bool use_file)
 
bool is_file_config () const
 
bool check_mappings () const
 

Static Public Member Functions

static bool static_init (OfApp *of_app)
 
static void destroy ()
 
static ColorIOAutoDetectionget_instance ()
 

Constructor & Destructor Documentation

ColorIOAutoDetection::ColorIOAutoDetection ( OfApp of_app)

Constructor.

Member Function Documentation

bool ColorIOAutoDetection::check_mappings ( ) const

Check if the current mappings are valid.

The mappings are valid if all file formats use a color space that is available in the current OCIO configuration. An error and a help message are printed if the mappings are invalid.

Returns
true if no errors, false if there is one or more invalid mappings.
void ColorIOAutoDetection::init_default_color_spaces ( )

Initialize the built-in associations.

bool ColorIOAutoDetection::load_config ( ParserEntry preferences)

Loads the configuration that has been defined in the Color Space editor by the user, from the application preferences.

Load the configuration from the application preferences.

Parameters
preferencesThe entry 'color_space' from the preferences.
Returns
True on success.
bool ColorIOAutoDetection::save_config ( ParserEntry preferences)

Saves the configuration that has been defined in the Color Space editor by the user, to the application preferences.

Save the current configuration (not the file one) to the application preferences.

Parameters
preferencesThe entry 'color_space' from the preferences.
Returns
True on success.
void ColorIOAutoDetection::use_file_config ( bool  use_file)

Enable or disable the custom configuration file.

Parameters
use_fileIf true, the custom configuration file will be used. But if the file path isn't set it will default to the default configuration. If false, will use the default configuration.