Skip to content

Commit

Permalink
[optix] screenshot based on rendered image
Browse files Browse the repository at this point in the history
  • Loading branch information
legobadman committed Nov 2, 2023
1 parent b0345c1 commit 24d57c2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ui/zenoedit/viewport/optixviewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,13 @@ void ZOptixViewport::recordVideo(VideoRecInfo recInfo)

void ZOptixViewport::screenshoot(QString path, QString type, int resx, int resy)
{
emit sigscreenshoot(path, type, resx, resy);
std::string sType = type.toStdString();
bool ret = m_renderImage.save(path, sType.c_str());
if (!ret)
{
//meet some unsupported type by QImage.
emit sigscreenshoot(path, type, resx, resy);
}
}

void ZOptixViewport::cancelRecording(VideoRecInfo recInfo)
Expand Down

0 comments on commit 24d57c2

Please sign in to comment.