Allow to remove user-defined properties

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

View File

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