Hi,

we try to get rid of the huge crypto matte headers in exr files and instead load the data from an external file. To eliminate the crypto data I tried to copy the original image spec, clear the extra_attribs and only copy the non crypto data from the origial spec like this:

localImage = oiio.ImageInput.open("C:/data/crypto.00090.exr")
spec = localImage.spec()
specCopy = oiio.ImageSpec(spec)
specCopy.extra_attribs.clear()
crypto = {}
for inParm in spec.extra_attribs:
    pv = oiio.ParamValue(inParm.name, inParm.value)
    specCopy.extra_attribs.append(pv)

If I try it this way I get an error:

# Error: Python argument types in
#     ParamValue.__init__(ParamValue, str, str)
# did not match C++ signature:
#     __init__(struct _object * __ptr64)
# Traceback (most recent call last):
#   File "<maya console>", line 13, in <module>
# ArgumentError: Python argument types in
#     ParamValue.__init__(ParamValue, str, str)
# did not match C++ signature:
#     __init__(struct _object * __ptr64) #

In c++ the ParamValue can be initialized with a string and a value, so I'm a bit confused. What's the correct way to add values to a ParamValueList in python?


haggi
_______________________________________________
Oiio-dev mailing list
Oiio-dev@lists.openimageio.org
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to