Synergy Color Management Component - SDK -  2018.0.80
SYNCOLOR::Config Class Referenceabstract

Configuration. More...

Public Types

enum  ColorSpaceTypes { InputColorSpaces, ViewTransforms, AllColorSpaces }
 List of all types of color space. More...
 
typedef SharedPtr< ConfigPtr
 shared pointer More...
 

Public Member Functions

virtual ~Config ()
 Destructor. More...
 
virtual SynStatus getColorSpace (const char *name, ColorSpace::Ptr &pColorSpace) const =0
 
virtual unsigned getNumColorSpaces (ColorSpaceTypes type) const =0
 
virtual const char * getColorSpaceName (ColorSpaceTypes type, unsigned index) const =0
 
virtual SynStatus getTemplate (TemplateType type, TemplatePtr &pTemplate) const =0
 

Static Public Member Functions

static SynStatus get (const char *configFile, const char *ocioConfigFile, Ptr &pConfig)
 Get an initialized configuration using a configuration file. More...
 
static SynStatus get (const char *transformPath, const char *sharedPath, const char *ocioConfigFile, Ptr &pConfig)
 Get an initialized configuration using existing native catalog and shared transform directories. More...
 
static SynStatus create (const char *configFile, const char *transformPath, const char *sharedPath, const char *ocioConfigFile, Ptr &pConfig)
 Create an initialized configuration using the catalog and shared transform paths. More...
 

Detailed Description

Configuration.

Member Typedef Documentation

shared pointer

Member Enumeration Documentation

List of all types of color space.

Enumerator
InputColorSpaces 

Only the input color spaces.

ViewTransforms 

Only the view transforms.

AllColorSpaces 

All the color spaces.

Constructor & Destructor Documentation

virtual SYNCOLOR::Config::~Config ( )
virtual

Destructor.

Member Function Documentation

static SynStatus SYNCOLOR::Config::get ( const char *  configFile,
const char *  ocioConfigFile,
Ptr pConfig 
)
static

Get an initialized configuration using a configuration file.

Parameters
configFileis the configuration file
ocioConfigFileis an OCIO configuration file; it could be null
pConfig[out] is the config class instance
Returns
Returns a SYNCOLOR::SynStatus.
static SynStatus SYNCOLOR::Config::get ( const char *  transformPath,
const char *  sharedPath,
const char *  ocioConfigFile,
Ptr pConfig 
)
static

Get an initialized configuration using existing native catalog and shared transform directories.

Note
The method will revert all the aliases to their default values.

The method is initializing a configuration using a minimum set of information. It's dedicated to external tools consuming existing a color managed 'scene' (i.e. without the need to change anything, Arnold makeTx, Arnold kick). As a concrete example, the default Maya windows paths are:

  • transformPath is [Maya installation path]
  • sharedPath is C:[user name]
Parameters
transformPathis the directory of the native catalog
sharedPathis the directory of the custom color space catalog
ocioConfigFileis an OCIO configuration file; it could be null
pConfig[out] is the config class instance
Returns
Returns a SYNCOLOR::SynStatus.
static SynStatus SYNCOLOR::Config::create ( const char *  configFile,
const char *  transformPath,
const char *  sharedPath,
const char *  ocioConfigFile,
Ptr pConfig 
)
static

Create an initialized configuration using the catalog and shared transform paths.

The method creates a new configuration file using the native catalog and shared catalog directories. It overwrites any existing configuration file.

Parameters
configFileis the configuration file to be created
transformPathis the directory of the native catalog
sharedPathis the directory of the custom color space catalog
ocioConfigFileis an OCIO configuration file; it could be null if not used
pConfig[out] is the config class instance
Returns
Returns a SYNCOLOR::SynStatus.
virtual SynStatus SYNCOLOR::Config::getColorSpace ( const char *  name,
ColorSpace::Ptr pColorSpace 
) const
pure virtual

Get a color space using its name

Parameters
nameis the color space unique name
pColorSpace[out] is the color space class instance
Returns
Returns a SYNCOLOR::SynStatus.
virtual unsigned SYNCOLOR::Config::getNumColorSpaces ( ColorSpaceTypes  type) const
pure virtual

Get the number of color spaces

Parameters
typeis the type of the requested color spaces
Returns
the number of color spaces
virtual const char* SYNCOLOR::Config::getColorSpaceName ( ColorSpaceTypes  type,
unsigned  index 
) const
pure virtual

Get a color space using its index

Parameters
typeis the type of the requested color spaces
indexis the color space index
Returns
the color space name or NULL in case of error
virtual SynStatus SYNCOLOR::Config::getTemplate ( TemplateType  type,
TemplatePtr pTemplate 
) const
pure virtual

Get the template based on its type

Parameters
typeis the template type
pTemplate[out] is the template class instance
Returns
Returns a SYNCOLOR::SynStatus.