Skip to content

ocioview image and PySide6 updates#1912

Merged
michdolan merged 7 commits into
AcademySoftwareFoundation:mainfrom
michdolan:feature/ocioview_3
Apr 17, 2024
Merged

ocioview image and PySide6 updates#1912
michdolan merged 7 commits into
AcademySoftwareFoundation:mainfrom
michdolan:feature/ocioview_3

Conversation

@michdolan
Copy link
Copy Markdown
Collaborator

This PR makes the following changes to ocioview:

  • Image viewer operates on RGB instead of RGBA, with an assumed opaque alpha
  • Image viewer pan and zoom regression fixed following change from imath to NumPy for transform implementation
  • Image read implementations moved to utility module
  • NumPy array used for image data messages instead of oiio ImageBuf
  • UI size adjustments to account for Qt6 style changes
  • Pyide6 compatibility fixes

Signed-off-by: Michael Dolan <michdolan@gmail.com>
Signed-off-by: Michael Dolan <michdolan@gmail.com>
@michdolan michdolan requested review from KelSolaar and remia November 21, 2023 02:01
Signed-off-by: Michael Dolan <michdolan@gmail.com>
Copy link
Copy Markdown
Collaborator

@remia remia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the issue @michdolan, looks good to me and confirm it works fine on mac OS.

Copy link
Copy Markdown
Contributor

@KelSolaar KelSolaar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, only a minor comment about maybe using properties in the MessageRouter class.

Comment on lines +105 to +121
def image_updates_allowed(self) -> bool:
return self._image_updates_allowed

def set_image_updates_allowed(self, allowed: bool) -> None:
self._image_updates_allowed = allowed
if allowed and self._prev_image_array is not None:
# Rebroadcast last image record
message_queue.put_nowait(self._prev_image_array)

def processor_updates_allowed(self) -> bool:
return self._processor_updates_allowed

def set_processor_updates_allowed(self, allowed: bool) -> None:
self._processor_updates_allowed = allowed
if allowed and self._prev_config is not None:
# Rebroadcast last config record
message_queue.put_nowait(self._prev_config)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we use properties here?

    @property
    def image_updates_allowed(self) -> bool:
        return self._image_updates_allowed

    @image_updates_allowed.setter
    def image_updates_allowed(self, allowed: bool) -> None:
        self._image_updates_allowed = allowed
        if allowed and self._prev_image_array is not None:
            # Rebroadcast last image record
            message_queue.put_nowait(self._prev_image_array)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I will address this in a future PR

@doug-walker
Copy link
Copy Markdown
Collaborator

@michdolan , should we go ahead and merge this?

@michdolan
Copy link
Copy Markdown
Collaborator Author

@remia thoughts on the CI failure I'm getting since updating the base? It's related to CMake, but this work only changed Python files internal to ocioview. Safe to ignore?

@remia
Copy link
Copy Markdown
Collaborator

remia commented Apr 17, 2024

@remia thoughts on the CI failure I'm getting since updating the base? It's related to CMake, but this work only changed Python files internal to ocioview. Safe to ignore?

I haven't time to investigate properly this week but it seems like the issue we have in #1964 ? I didn't see the error as the job was in canceled state today, I relaunched it and it now passes so this might have been fixed with a CMake update.

@michdolan michdolan merged commit 813785e into AcademySoftwareFoundation:main Apr 17, 2024
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

Successfully merging this pull request may close these issues.

4 participants