Commit Graph
5 Commits
Author SHA1 Message Date
Mei Chu 01e3a655ad Updated various python unit tests. (#1025)
Signed-off-by: Mei Chu <meimchu@gmail.com>
2020-06-04 15:08:18 -04:00
Bernard Lefebvre 71d725e659 Adsk Contrib - Adding file rules to config. (#904)
* Adding file rules to config.
The file rules are a set of filepath to color space mappings that are evaluated from first to last. The first rule to match is what determines which color space is returned. There are four types of rules available. Each rule type has a name key that may be used by applications to refer to that rule. Name values must be unique. The other keys depend on the rule type:

- Basic Rule: This is the basic rule type that uses Unix glob style pattern matching and is thus very easy to use. It contains the keys:
  * name: Name of the rule
  * colorspace: Color space name to be returned.
  * pattern: Glob pattern to be used for the main part of the name/path.
  * extension: Glob pattern to be used for the file extension. Note that if glob tokens are not used, the extension will be used in a non-case-sensitive way by default.

- Regex Rule: This is similar to the basic rule but allows additional capabilities for power-users. It contains the keys:
  * name: Name of the rule
  * colorspace: Color space name to be returned.
  * regex: Regular expression to be evaluated.

- OCIO v1 style Rule: This rule allows the use of the OCIO v1 style, where the string is searched for color space names from the config. This rule may occur 0 or 1 times in the list. The position in the list prioritizes it with respect to the other rules. It has the key:
  * name: Must be "ColorSpaceNamePathSearch".

- Default Rule: The file_rules must always end with this rule. If no prior rules match, this rule specifies the color space applications will use. It has the keys:
  * name: must be "Default".
  * colorspace : Color space name to be returned.

Signed-off-by: Bernard Lefebvre <bernard.lefebvre@autodesk.com>

* Remove unused constexpr.
Do not check system specific regex error.

Signed-off-by: Bernard Lefebvre <bernard.lefebvre@autodesk.com>

* Add comments.
Rename some FileRules releated functions for clarity.
Add new FileRules function to insert the "ColorSpaceNamePathSearch" rule with specifying its name.

Signed-off-by: Bernard Lefebvre <bernard.lefebvre@autodesk.com>

* Add new helper function setDefaultRuleColorSpace.
More comments.

Signed-off-by: Bernard Lefebvre <bernard.lefebvre@autodesk.com>
2020-01-09 18:03:10 -05:00
Patrick Hodoul 6ce405e993 Adsk Contrib - Add Raw configuration access (#849)
Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>
2019-10-09 08:50:46 -04:00
Michael Dolan fad95e7052 License cleanup following ext/ refactor (#783)
* LICENSE.md cleanup following ext/ refactor
* Cleanup ICC license markdown
* Add missing license notices
* Clean up .md licenses, Add tests/data/files LICENSE.md
2019-08-09 10:04:23 -07:00
Shootfast 2f5fbfc802 Repository Restructure and CMake refactor (#520)
* Jump to C++11
* Removed Boost dependency
* Bumped CMake Minimum 3.10
* Modernized CMake builders
* Restructured repo directories
* Set project version to 2.0.0
2018-09-28 15:28:36 +01:00