| 599 | } |
| 600 | |
| 601 | int ComplexGeoDataPy::setCustomAttributes(const char* attr, PyObject* obj) |
| 602 | { |
| 603 | // Support for backward compatibility |
| 604 | if (strcmp(attr, "Matrix") == 0) { |
| 605 | if (PyObject_TypeCheck(obj, &(Base::MatrixPy::Type))) { |
| 606 | Base::Matrix4D mat = static_cast<Base::MatrixPy*>(obj)->value(); |
| 607 | getComplexGeoDataPtr()->setTransform(mat); |
| 608 | return 1; |
| 609 | } |
| 610 | else { |
| 611 | std::string error = std::string("type must be 'Matrix', not "); |
| 612 | error += obj->ob_type->tp_name; |
| 613 | throw Py::TypeError(error); |
| 614 | } |
| 615 | } |
| 616 | return 0; |
| 617 | } |
nothing calls this directly
no test coverage detected