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 image and PySide6 updates #1912

Merged

Conversation

michdolan
Copy link
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

Copy link
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
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
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
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
Collaborator

@michdolan , should we go ahead and merge this?

@michdolan
Copy link
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
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
25 checks passed
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.

None yet

4 participants