0000535: request for python editible Properties panels

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5273 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
wmayer
2011-12-12 12:40:08 +00:00
parent 3556a43e99
commit 05b6123bb2
7 changed files with 17 additions and 39 deletions

View File

@@ -78,14 +78,18 @@ PyObject* PropertyContainerPy::getTypeOfProperty(PyObject *args)
return Py::new_reference_to(ret);
}
PyObject* PropertyContainerPy::setTypeOfProperty(PyObject *args)
PyObject* PropertyContainerPy::setEditorMode(PyObject *args)
{
char* name;
short type;
if (!PyArg_ParseTuple(args, "sh", &name, &type)) // convert args: Python->C
return NULL; // NULL triggers exception
getPropertyContainerPtr()->setPropertyType(name, type);
App::Property* prop = getPropertyContainerPtr()->getPropertyByName(name);
if (prop) {
prop->StatusBits.set(2,(type & 1) > 0);
prop->StatusBits.set(3,(type & 2) > 0);
}
Py_Return;
}