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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user