Commit Graph
8 Commits
Author SHA1 Message Date
Bernard LefebvreandPatrick Hodoul fbdf889b86 Adsk Contrib - Add ViewingRules, DisplayViewTransform, and ViewingPipeline (#1038)
* Add ViewingRules, DisplayViewTransform, and ViewingPipeline

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

* Add version check to config sanity check.

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

* Adjust comments

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

* Update ViewingPipeline.cpp

Fix indentation

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

Co-authored-by: Patrick Hodoul <patrickhodoul@gmail.com>
2020-06-29 08:49:08 -04:00
Patrick Hodoul 44e092db46 Adsk Contrib - Add version validation (#975)
Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>
2020-04-14 08:53:35 -04:00
Patrick Hodoul d5230e6096 Adsk Contrib - Add arguments to unit test binaries (#944)
* Adsk Contrib - Add arguments to unit test binaries

Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>

* Fix Clang build break

Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>

* Fix merge breaks

Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>

* Fix merge breaks

Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>
2020-03-20 12:27:21 -04:00
Bernard LefebvreandPatrick Hodoul 44510edd48 Adsk Contrib - Add the Display reference space (#939)
* Display reference space

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

* Fix tests on linux & macos: expacted exception message is not the same because typeid(*this).name() does not give the same result on different platforms.

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

* Change how ColorSpace is serialized

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

Co-authored-by: Patrick Hodoul <patrickhodoul@gmail.com>
2020-03-10 15:02:01 -04:00
Bernard LefebvreandPatrick Hodoul 9e537793b9 Adsk Contrib - Adjust FileRules API (#938)
* Adjust FileRules API

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

* Adjust comment refering to a function of FileRules

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

Co-authored-by: Patrick Hodoul <patrickhodoul@gmail.com>
2020-03-10 13:22:50 -04:00
Patrick Hodoul 0e53238b39 Adsk Contrib - Centralize string manipulation helpers (#937)
* Adsk Contrib - Centralize string manipulation helpers

Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>
2020-03-07 16:35:28 -05:00
Patrick Hodoul 94bda10b93 Adsk Contrib - File rule improvements (#925)
Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>
2020-02-14 14:40:13 -05: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