add export depth menu

This commit is contained in:
2019-04-24 09:57:27 +02:00
parent a1a2d2ca7b
commit 5a1f6e48ce
6 changed files with 62 additions and 2 deletions

View File

@@ -1544,6 +1544,30 @@ void Canvas::inject_xmp(std::string jpg_path)
}
void Canvas::export_depth(std::string file_name, std::function<void()> on_complete)
{
if (App::I.check_license())
{
std::thread t([=] {
BT_SetTerminate();
export_depth_thread(file_name);
if (on_complete)
on_complete();
});
t.detach();
}
}
void Canvas::export_depth_thread(std::string file_name)
{
App::I.async_start();
gl_state gl;
gl.save();
gl.restore();
App::I.async_end();
}
void Canvas::export_layers(std::string file_name, std::function<void()> on_complete)
{
if (App::I.check_license())