MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / sShowObject

Method sShowObject

src/Gui/ApplicationPy.cpp:966–980  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

964}
965
966PyObject* ApplicationPy::sShowObject(PyObject* /*self*/, PyObject* args)
967{
968 PyObject* object = nullptr;
969 if (!PyArg_ParseTuple(args, "O!", &(App::DocumentObjectPy::Type), &object)) {
970 return nullptr;
971 }
972
973 requirePythonMainThread("FreeCADGui.showObject");
974
975 // NOLINTNEXTLINE(cppcoreguidelines-pro-type-static-cast-downcast)
976 App::DocumentObject* obj = static_cast<App::DocumentObjectPy*>(object)->getDocumentObjectPtr();
977 Application::Instance->showViewProvider(obj);
978
979 Py_Return;
980}
981
982PyObject* ApplicationPy::sOpen(PyObject* /*self*/, PyObject* args)
983{

Callers

nothing calls this directly

Calls 2

requirePythonMainThreadFunction · 0.85
showViewProviderMethod · 0.80

Tested by

no test coverage detected