Allow to remove user-defined properties

This commit is contained in:
wmayer
2012-11-04 13:24:22 +01:00
parent 482a73b302
commit 77144681ef
9 changed files with 57 additions and 0 deletions

View File

@@ -62,6 +62,16 @@ PyObject* FeaturePythonPy::addProperty(PyObject *args)
return Py::new_reference_to(this);
}
PyObject* FeaturePythonPy::removeProperty(PyObject *args)
{
char *sName;
if (!PyArg_ParseTuple(args, "s", &sName))
return NULL;
bool ok = getFeaturePythonPtr()->removeDynamicProperty(sName);
return Py_BuildValue("O", (ok ? Py_True : Py_False));
}
PyObject* FeaturePythonPy::supportedProperties(PyObject *args)
{
if (!PyArg_ParseTuple(args, "")) // convert args: Python->C