add export depth menu
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user