| 362 | } |
| 363 | |
| 364 | PyObject* PropertyContainerPy::getEditorMode(PyObject* args) |
| 365 | { |
| 366 | char* name {}; |
| 367 | if (!PyArg_ParseTuple(args, "s", &name)) { |
| 368 | return nullptr; |
| 369 | } |
| 370 | |
| 371 | App::Property* prop = getPropertyContainerPtr()->getPropertyByName(name); |
| 372 | if (!prop) { |
| 373 | PyErr_Format(PyExc_AttributeError, "Property container has no property '%s'", name); |
| 374 | return nullptr; |
| 375 | } |
| 376 | |
| 377 | Py::List ret; |
| 378 | if (prop) { |
| 379 | short Type = prop->getType(); |
| 380 | if ((prop->testStatus(Property::ReadOnly)) || (Type & Prop_ReadOnly)) { |
| 381 | ret.append(Py::String("ReadOnly")); |
| 382 | } |
| 383 | if ((prop->testStatus(Property::Hidden)) || (Type & Prop_Hidden)) { |
| 384 | ret.append(Py::String("Hidden")); |
| 385 | } |
| 386 | } |
| 387 | return Py::new_reference_to(ret); |
| 388 | } |
| 389 | |
| 390 | PyObject* PropertyContainerPy::getGroupOfProperty(PyObject* args) |
| 391 | { |
nothing calls this directly
no test coverage detected