Skip to content

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

@mjtitchener-fn

Description

@mjtitchener-fn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions