| 356 | } |
| 357 | |
| 358 | bool ViewProviderFeaturePythonImp::getDetail(const char* name, SoDetail*& det) const |
| 359 | { |
| 360 | _FC_PY_CALL_CHECK(getDetail, return (false)); |
| 361 | |
| 362 | // Run the onChanged method of the proxy object. |
| 363 | Base::PyGILStateLocker lock; |
| 364 | try { |
| 365 | Py::Tuple args(1); |
| 366 | args.setItem(0, Py::String(name)); |
| 367 | Py::Object pydet(Base::pyCall(py_getDetail.ptr(), args.ptr())); |
| 368 | void* ptr = nullptr; |
| 369 | Base::Interpreter().convertSWIGPointerObj("pivy.coin", "SoDetail *", pydet.ptr(), &ptr, 0); |
| 370 | auto detail = static_cast<SoDetail*>(ptr); |
| 371 | det = detail ? detail->copy() : nullptr; |
| 372 | return true; |
| 373 | } |
| 374 | catch (const Base::Exception& e) { |
| 375 | e.reportException(); |
| 376 | } |
| 377 | catch (Py::Exception&) { |
| 378 | if (PyErr_ExceptionMatches(PyExc_NotImplementedError)) { |
| 379 | PyErr_Clear(); |
| 380 | return false; |
| 381 | } |
| 382 | Base::PyException e; // extract the Python error text |
| 383 | e.reportException(); |
| 384 | } |
| 385 | |
| 386 | return true; |
| 387 | } |
| 388 | |
| 389 | ViewProviderFeaturePythonImp::ValueT ViewProviderFeaturePythonImp::getDetailPath( |
| 390 | const char* name, |
no test coverage detected