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

hio: Add CMake options to handled image file formats by plugins #3373

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

theblackunknown
Copy link

Description of Change(s)

This PR introduces CMake options to determine which image file formats are handled by each HioImage plugins.
Options defaults to the same behavior as before this PR for backward compatibility.

Those new options allow for an integration to control which plugins should handled which file formats.
For example it is possible to disable Hio_StbImage and let Hio_Oiio handle all image formats.

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

@meshula
Copy link
Member

meshula commented Oct 22, 2024

Hi @theblackunknown!

The built in mechanism for this is the pluginfo.json priority scheme. If you add exr and stb to your pluginfo for HioOIIO, and assign a higher priority there, you can get what you are after without the need to conditionally compile the library.

@jesschimein
Copy link
Contributor

Filed as internal issue #USD-10343

@jesschimein
Copy link
Contributor

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@theblackunknown
Copy link
Author

Hi @theblackunknown!

The built in mechanism for this is the pluginfo.json priority scheme. If you add exr and stb to your pluginfo for HioOIIO, and assign a higher priority there, you can get what you are after without the need to conditionally compile the library.

Good observation !
This is partly why I have exposed both supported image file formats and precedence for each plugin, so I would say that this PR also support implementing what you suggest.

Another part which interest my use case is to entirely avoid embedding the vendored STB implementation: as a single source library the USD vendored one is out of sync with other part of our system also using STB.
And because hio embeds Hio_StbImage by default we have no way to remove it from a build.

@jesschimein
Copy link
Contributor

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

3 participants