[ocioview] Unable to load image in ocioview on macOS
After the recent changes committed for ocioview I can no longer load an image. The following error is printed in the Terminal when I attempt this.
[ocioview Error]: 'ProcessorContext' object has no attribute 'direction'
Traceback (most recent call last):
File "/Volumes/ws/ocio/dev/source/src/apps/ocioview/ocioview/viewer_dock.py", line 111, in load_image
image_viewer.load_image(image_path=image_path)
File "/Volumes/ws/ocio/dev/source/src/apps/ocioview/ocioview/viewer/image_viewer.py", line 330, in load_image
self.image_plane.load_image(image_path)
File "/Volumes/ws/ocio/dev/source/src/apps/ocioview/ocioview/viewer/image_plane.py", line 355, in load_image
self._ocio_proc_context.direction,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ProcessorContext' object has no attribute 'direction'
<LogRecord: ocioview, 40, /Volumes/ws/ocio/dev/source/src/apps/ocioview/main.py, 26, "[ocioview Error]: 'ProcessorContext' object has no attribute 'direction'
Traceback (most recent call last):
File "/Volumes/ws/ocio/dev/source/src/apps/ocioview/ocioview/viewer_dock.py", line 111, in load_image
image_viewer.load_image(image_path=image_path)
File "/Volumes/ws/ocio/dev/source/src/apps/ocioview/ocioview/viewer/image_viewer.py", line 330, in load_image
self.image_plane.load_image(image_path)
File "/Volumes/ws/ocio/dev/source/src/apps/ocioview/ocioview/viewer/image_plane.py", line 355, in load_image
self._ocio_proc_context.direction,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ProcessorContext' object has no attribute 'direction'">
I believe the problem is here... https://github.com/AcademySoftwareFoundation/OpenColorIO/blob/7e91b0e9a6e194181e11a777d338ea2b4c4d315f/src/apps/ocioview/ocioview/viewer/image_plane.py#L355
It seems the fix is simply...
self._ocio_proc_context.transform_direction
(I've tested this locally and it works).
From referring to... https://github.com/AcademySoftwareFoundation/OpenColorIO/blob/7e91b0e9a6e194181e11a777d338ea2b4c4d315f/src/apps/ocioview/ocioview/processor_context.py#L27
@michdolan If this is all that's required I'm happy to create a PR with this simple change.
Confirming that this is the only requirement (I have it in my draft PR for the chromaticity inspector).
This is no longer an issue since the PR from @KelSolaar was merged. Closing.