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

Method setCustomAttributes

src/App/ComplexGeoDataPyImp.cpp:601–617  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

599}
600
601int 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}

Callers

nothing calls this directly

Calls 2

valueMethod · 0.45
setTransformMethod · 0.45

Tested by

no test coverage detected