Skip to content

Commit

Permalink
Gui: [skip ci] allow to pass multi-sampling in Python wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Dec 27, 2019
1 parent 7115471 commit 9e4710d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Gui/View3DPy.cpp
Expand Up @@ -953,8 +953,9 @@ Py::Object View3DInventorPy::saveImage(const Py::Tuple& args)
{
char *cFileName,*cColor="Current",*cComment="$MIBA";
int w=-1,h=-1;
int s=View3DInventorViewer::getNumSamples();

if (!PyArg_ParseTuple(args.ptr(), "et|iiss","utf-8",&cFileName,&w,&h,&cColor,&cComment))
if (!PyArg_ParseTuple(args.ptr(), "et|iissi","utf-8",&cFileName,&w,&h,&cColor,&cComment,&s))
throw Py::Exception();

std::string encodedName = std::string(cFileName);
Expand All @@ -972,7 +973,7 @@ Py::Object View3DInventorPy::saveImage(const Py::Tuple& args)
bg.setNamedColor(colname);

QImage img;
_view->getViewer()->savePicture(w, h, 8, bg, img);
_view->getViewer()->savePicture(w, h, s, bg, img);

SoFCOffscreenRenderer& renderer = SoFCOffscreenRenderer::instance();
SoCamera* cam = _view->getViewer()->getSoRenderManager()->getCamera();
Expand Down

0 comments on commit 9e4710d

Please sign in to comment.