OpenImageIO icon indicating copy to clipboard operation
OpenImageIO copied to clipboard

Add get_texture_info_type to query TypeDesc of arbitrary texture metadata

Open olegul opened this issue 3 years ago • 1 comments

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.

olegul avatar Nov 30 '21 21:11 olegul

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.

lgritz avatar Nov 30 '21 22:11 lgritz