Hey Larry (et all),
I was trying to use erase_attribute from python in oiio 2.0.x since
that's what I'm currently using. Looks like the python function wrap
isn't working. No matter what I do with casting things etc. For
example
...Load some image and store it's spec via spec()...
for attribute in spec.extra_attribs:
if attribute.name == 'oiio:ColorSpace':
spec.erase_attribute(atttribute.name)
raises this exception:
Traceback (most recent call last):
File "<console>", line 8, in <module>
TypeError: erase_attribute(): incompatible function arguments. The
following argument types are supported:
1. (self: OpenImageIO.ImageSpec, name:
OpenImageIO_v2_0::string_view=u'', type:
OpenImageIO.TypeDesc=<TypeDesc 'unknown'>, casesensitive: bool=False)
-> None
Invoked with: <OpenImageIO.ImageSpec object at 0x7f3808120148>,
'oiio:ColorSpace'
I tried passing in the TypeDesc and bool as well and no luck, I putzed
around on the oiio side and changed the python wrapping to this and it
seemed to work...not sure it's a good patch though.
--from py_imagedesc.cpp line 255
.def("erase_attribute",
[] (const ImageSpec& spec, const std::string name,
TypeDesc searchtype, bool casesensitive) {},
"name"_a, "searchtype"_a = TypeUnknown, "casesensitive"_a = false)
Thoughts? Apologies for crappy code formatting also I was going to try
the latest release branch but looking at the source in github I don't
think this bit has changed since 1.6.x or something like that other
than formatting.
Cheers,
~Andrew
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org