Skip to content

Conversation

@theblackunknown
Copy link
Contributor

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
Collaborator

Filed as internal issue #USD-10343

@jesschimein
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@theblackunknown
Copy link
Contributor 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
Collaborator

/AzurePipelines run

@azure-pipelines
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