getActivePart() python function as complement to setActivePart()
This commit is contained in:
committed by
Stefan Tröger
parent
f7874306b9
commit
5c18e947e6
@@ -78,10 +78,22 @@ static PyObject * setActivePart(PyObject *self, PyObject *args)
|
||||
|
||||
Py_Return;
|
||||
}
|
||||
static PyObject * getActivePart(PyObject *, PyObject *)
|
||||
{
|
||||
if (PartDesignGui::ActivePartObject == NULL) {
|
||||
return Py::_None();
|
||||
}
|
||||
|
||||
return PartDesignGui::ActivePartObject->getPyObject();
|
||||
}
|
||||
|
||||
/* registration table */
|
||||
struct PyMethodDef Assembly_methods[] = {
|
||||
{"setActivePart" ,setActivePart ,METH_VARARGS,
|
||||
"setActivePart(BodyObject) -- Set the PartBody object in work."},
|
||||
|
||||
{"getActivePart" ,getActivePart ,METH_NOARGS,
|
||||
"getActivePart() -- Get the PartBody object in work."},
|
||||
|
||||
{NULL, NULL} /* end of table marker */
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user