Navigation Menu

Skip to content

Commit

Permalink
only render image once for each frame when exporting animations
Browse files Browse the repository at this point in the history
  • Loading branch information
NEDJIMAbelgacem authored and wonder-sk committed Mar 1, 2021
1 parent ea2e7fa commit 65779a9
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/3d/qgs3dutils.cpp
Expand Up @@ -153,10 +153,6 @@ bool Qgs3DUtils::exportAnimation( const Qgs3DAnimationSettings &animationSetting
fileName.replace( token, frameNoPaddedLeft );
const QString path = QDir( outputDirectory ).filePath( fileName );

// It would initially return empty rendered image.
// Capturing the initial image and throwing it away fixes that.
// Hopefully we will find a better fix in the future.
Qgs3DUtils::captureSceneImage( engine, scene );
QImage img = Qgs3DUtils::captureSceneImage( engine, scene );

img.save( path );
Expand Down

0 comments on commit 65779a9

Please sign in to comment.