5 Commits
Author SHA1 Message Date
Mei ChuandPatrick Hodoul 99c5f40af4 Created a TransformsBaseTest module. (#1288)
* Created a TransformsBaseTest module.
Moving some unit testing of Transforms module to a base class.

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Updated four transforms tests to use TransformsBaseTest.
- AllocationTransformTest
- BuiltinTranformTest
- CDLTransformTest
- ColorSpaceTransformTest
Updated to add a space at the end of TransformBaseTest per feedback.

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Updated four transforms tests to use TransformsBaseTest.
- DisplayViewTransformTest
- ExponentTransformTest
- ExponentWithLinearTransformTest
- ExposureContrastTransformTest
- FileTransformTest
- FixedFunctionTransformTest
- LogTransformTest
- LookTransformTest

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Address feedback https://github.com/AcademySoftwareFoundation/OpenColorIO/pull/1288#discussion_r565265034

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Updated a few transforms unit tests with TransformsBaseTest.

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Updated to prioritize setUp methods first in individual python unit tests.

Signed-off-by: Mei Chu <meimchu@gmail.com>

Co-authored-by: Patrick Hodoul <patrick.hodoul@autodesk.com>
2021-02-17 14:50:47 -05:00
Bernard Lefebvre 844978bbae Adsk Contrib - CDLTransform cleanup (#1221)
* CDLTransform cleanup

Rework CDLTranform interface to implement the proposal made in issue #1155.
CDLTransform can be created from a file and an id.
Files containing several CDL (such as ccc and cdl) can be loaded as GroupTransform to give a way to check the content of such CDLs.
Functions to get/set ID should be replaced by calls on the transform's formatMetadata.
Functions to get/set description have been renamed and documention has been added to explain how formatMetadata can be used.
FormatMetadata has helper functions to get/set common attributes 'name' and 'id'.
Write related functions have been moved to GroupTransform so that a processor does not have to be create to write a transform.

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

* Missing override keyword

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

* FormatMetadata::addChildElement does not return a value, call to back() should have been removed with the return statement.

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

* Update RST files

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

* Revert rst files that have only white space changes or windows related changes

Signed-off-by: Bernard Lefebvre <bernard.lefebvre@autodesk.com>
2020-12-16 19:08:59 -05:00
Bernard Lefebvreanddoug-walker 9362128bb2 Adsk Contrib - Remove unknown direction enums (#1177)
* Remove unknown direction enums

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

* Add missing test variables initialization

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

Co-authored-by: doug-walker <43830961+doug-walker@users.noreply.github.com>
2020-11-04 13:42:12 -05:00
Bernard LefebvreandPatrick Hodoul 50e4daf6b1 Adsk Contrib - Improve FileTransform interpolation (#1157)
* FileTransform interpolation

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

* Fix typo and add missing stream reset

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

* Dummy commit to trigger Easy CLA

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

Co-authored-by: Patrick Hodoul <patrick.hodoul@autodesk.com>
2020-10-15 15:03:43 -04:00
Mei Chu 17144fbd47 Initial update to Transforms python unit tests: (#1036)
* Updated Transforms python unit tests first by breaking them down. Starting with:
- AllocatioNTransformTest
- ColorSpaceTransformTest

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Updated AllocationTransform and ColorSpaceTransform tests based on feedback. Also updated ExponentTransformTest and LogTransformTest.

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Updated FileTransformTest. Also cleaned up some previous transform tests based on recent pybind changes.

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Updated PyFileTransform to match #1042.

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Updated ExponentWithLinearTransform python test.

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Updated ColorSpaceTransform constructor from dir to direction.

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Updated ExposureContrastTransformTest and addressed previous feedbacks.

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Added new ExposureContrastTransformTest to OCIOTestSuite.

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Updated ExposureContrastTransform's python binding.

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Added FixedFunctionTransform python test. Small typo fix for ExposureContrastTransform python test.

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Fixed ExposureContrastTransform python test.

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Updated GroupTransform python unit test.

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Updated ExponentWithLinearTransform and ExposureContrastTransform python unit tests per feedback.

Signed-off-by: Mei Chu <meimchu@gmail.com>
2020-09-10 09:27:59 -04:00