Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ocioview] Unable to load image in ocioview on macOS #1978

Open
mjtitchener-fn opened this issue May 17, 2024 · 1 comment
Open

[ocioview] Unable to load image in ocioview on macOS #1978

mjtitchener-fn opened this issue May 17, 2024 · 1 comment

Comments

@mjtitchener-fn
Copy link

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...

self._ocio_proc_context.direction,

It seems the fix is simply...

self._ocio_proc_context.transform_direction

(I've tested this locally and it works).

From referring to...

transform_direction: ocio.TransformDirection = ocio.TRANSFORM_DIR_FORWARD

@michdolan If this is all that's required I'm happy to create a PR with this simple change.

@KelSolaar
Copy link
Contributor

Confirming that this is the only requirement (I have it in my draft PR for the chromaticity inspector).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants