We are adding new Python functions to Cinema and our solution works fine in R19 and previous versions but we are having problems parsing the parameters in R20
static _PyObject *MyprojectPyAPI_MakeThing(_PyObject *self, _PyObject *args, _PyObject *keywords)
{
PythonLibrary pylib;
String str;
const Char *kwlist[] = { "str", nullptr };
if (!pylib.ParseTupleAndKeywords(args, keywords, "$", kwlist, &str))
return nullptr;
#if API_VERSION < 20000
if (str.Content())
#else
if (str.IsEmpty()!=false)
#endif
{
Utils::addLog("Parameter is: " + str);
}
else
{
Utils::addLog("Cannot parse the parameter correctly.");
}
return pylib.ReturnPyNone();
}
As you can imagine the problem is that it always throws "Cannot parse the parameter correctly."
Any idea on what is wrong for R20? something related to PythonLibrary changed?
Thank you in advance!