OpenImageIO
OpenImageIO copied to clipboard
Add get_texture_info_type to query TypeDesc of arbitrary texture metadata
This patch is originally written for a pretty specific use-case outlined below, but hopefully it's generic enough to be useful.
It is sort-of a follow up to the maketx-patch that writes arbitrary length float arrays metadata in EXRs, and ties in with a patch on the OSL side: If we can query the TypeDesc of a metadata attribute, we can make more a lenient variant of OSL's gettextureinfo call that will fill arrays as long as the array on the OSL side is large enough.
Another thing worth mentioning: Because this breaks the ABI (by adding virtual methods to this class, we change he vtbl), we can't backport to 2.3.* and maintain binary compatibility, so this can only be in 2.4 and later. That's not a problem, just want to be sure it's understood.