Part.show() python return the new document object instead of None

This commit is contained in:
mwganson
2022-01-29 15:18:24 -06:00
committed by Uwe
parent 23c1fb78bf
commit d6350d4f33

View File

@@ -793,7 +793,7 @@ private:
}
Py::Object show(const Py::Tuple& args)
{
PyObject *pcObj = 0;
PyObject *pcObj = nullptr;
char *name = "Shape";
if (!PyArg_ParseTuple(args.ptr(), "O!|s", &(TopoShapePy::Type), &pcObj, &name))
throw Py::Exception();
@@ -806,8 +806,7 @@ private:
// copy the data
pcFeature->Shape.setValue(pShape->getTopoShapePtr()->getShape());
pcDoc->recompute();
return Py::None();
return Py::asObject(pcFeature->getPyObject());
}
Py::Object getFacets(const Py::Tuple& args)
{