MCPcopy Create free account
hub / github.com/Kitware/ParaView / addObjectsToPython

Method addObjectsToPython

Qt/Python/pqPythonDebugLeaksView.cxx:68–80  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

66
67//-----------------------------------------------------------------------------
68void pqPythonDebugLeaksView::addObjectsToPython(const QList<vtkObjectBase*>& objects)
69{
70 if (auto context = consoleContext(this->shell()))
71 {
72 vtkSmartPyObject pyListObj(PyList_New(objects.size()));
73 for (int i = 0; i < objects.size(); ++i)
74 {
75 PyObject* pyObj = vtkPythonUtil::GetObjectFromPointer(objects[i]);
76 PyList_SET_ITEM(pyListObj.GetPointer(), i, pyObj);
77 }
78 PyDict_SetItemString(context, "objs", pyListObj);
79 }
80}

Callers 1

Calls 4

shellMethod · 0.95
consoleContextFunction · 0.85
sizeMethod · 0.45
GetPointerMethod · 0.45

Tested by

no test coverage detected