Skip to content

Conversation

@AlexSchwank
Copy link
Collaborator

Description of Change(s)

Added HioImageIO as optional feature to replace OIIO with ImageIO on macOS. Credit goes to Nicholas Blasingame.

Fixes Issue(s)

  • I have verified that all unit tests pass with the proposed changes
  • I have submitted a signed Contributor License Agreement

@AlexSchwank AlexSchwank changed the title Added HioImageIO as optional feature on macOS Apple: Added HioImageIO as optional feature on macOS Jul 3, 2024
@jesschimein
Copy link
Collaborator

Filed as internal issue #USD-9827

❗ Please make sure that a signed CLA has been submitted!

@jesschimein
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jesschimein
Copy link
Collaborator

jesschimein commented Jul 3, 2024

Disregard the note above about missing a signed CLA; we do have your CLA on file, Alex. Sorry for any confusion!

if MacOS():
group.add_argument("--imageio", dest="build_imageio", action="store_true",
default=False,
help="Build ImageIO plugin for USD (Uses ImageIO.framework). Overrides OpenImageIO")
Copy link
Member

Choose a reason for hiding this comment

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

"Overrides" is a little vague, since it could refer to runtime behavior. Instead, could we say "Disables building OpenImageIO" ?

@AlexSchwank AlexSchwank force-pushed the feature/Apple_HioImageIO branch from 7275e1b to 17ff229 Compare November 9, 2024 06:33
@jesschimein
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jesschimein
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dgovil dgovil force-pushed the feature/Apple_HioImageIO branch from c4c9a7f to deb247e Compare April 10, 2025 17:36
@dgovil
Copy link
Collaborator

dgovil commented Apr 10, 2025

I've updated the PR:

  1. Rebased on latest dev commits
  2. It is now enabled by default and gets disabled when OpenImageIO is enabled. This feels more intuitive to me.
  3. It now better handles textures inside packages based on the HioAVIF code.

@jesschimein
Copy link
Collaborator

/AzurePipelines run

Copy link
Contributor

@tcauchois tcauchois left a comment

Choose a reason for hiding this comment

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

Hey all,

I'm going to try to land this momentarily but we had a few requested changes to the CMake. If you're ok with the changes but would like me to make them I'm happy to do so as I pull it down. Alternatively, if you want me to hold on while you rev the PR let me know.

Thanks!

and self.buildTests))
and not embedded)
if MacOS():
self.buildImageIO = args.build_imageio and not self.buildOIIO
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we change this so that ImageIO and OpenImageIO don't turn each other off? i.e. get rid of the "and not self.buildOIIO" here...

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure, would you like me to document somewhere that they should ideally not be used together? Or just let Hio pick one itself at runtime?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I ended up going with your suggestion below to make ImageIO take precedence.

group.add_argument("--imageio", dest="build_imageio", action="store_true",
default=True,
help="Build the ImageIO.framework plugin for USD (default). "
"Will be turned off if the OpenImageIO plugin is enabled")
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment update.


if (PXR_BUILD_OPENIMAGEIO_PLUGIN)
add_subdirectory(hioOiio)
elseif (APPLE AND PXR_BUILD_IMAGEIO_PLUGIN)
Copy link
Contributor

Choose a reason for hiding this comment

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

elseif -> if

"HioImageIO_Image" : {
"bases": ["HioImage"],
"imageTypes": ["tif", "tiff", "zfile", "tx"],
"precedence": 10
Copy link
Contributor

Choose a reason for hiding this comment

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

If we build both OpenImageIO and ImageIO, we choose the plugin to use based on precedence. Since hioOiio is "10", we could bump this to like "15" and then it would be used preferentially.

@dgovil
Copy link
Collaborator

dgovil commented May 15, 2025

Either way works for me! I can take a pass in the morning so you don't have to. I think your changes all sound good to me and simplify things

@dgovil dgovil force-pushed the feature/Apple_HioImageIO branch from deb247e to 4f5357c Compare May 15, 2025 06:04
@dgovil
Copy link
Collaborator

dgovil commented May 15, 2025

Okay, I've rebased on latest dev + addressed your changes.
I also realized that the original PR had zfile and tx listed, which sips --formats does not list as supported, so I removed them. It's now just the two tif extensions.

@tcauchois
Copy link
Contributor

Two more documentation suggestions, which I can make inline or you can approve here.

@dgovil
Copy link
Collaborator

dgovil commented May 22, 2025

Thanks @tcauchois , I just accepted your changes.

@pixar-oss pixar-oss closed this in 7f496ee May 27, 2025
meshula pushed a commit to meshula/USD that referenced this pull request Sep 11, 2025
Added HioImageIO as optional feature to replace OIIO with ImageIO on macOS. Credit goes to Nicholas Blasingame.

Closes PixarAnimationStudios#3148

(Internal change: 2368537)

Co-authored-by: Dhruv Govil <[email protected]>
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.

5 participants