rename things
This commit is contained in:
@@ -779,13 +779,13 @@ void ui::Canvas::clear_context()
|
||||
}
|
||||
};
|
||||
|
||||
void ui::Canvas::export_equirectangular(std::string data_path)
|
||||
void ui::Canvas::export_equirectangular(std::string file_path)
|
||||
{
|
||||
std::thread t(&ui::Canvas::export_equirectangular_thread, this, data_path);
|
||||
std::thread t(&ui::Canvas::export_equirectangular_thread, this, file_path);
|
||||
t.detach();
|
||||
}
|
||||
|
||||
void ui::Canvas::export_equirectangular_thread(std::string data_path)
|
||||
void ui::Canvas::export_equirectangular_thread(std::string file_path)
|
||||
{
|
||||
gl_state gl;
|
||||
|
||||
@@ -918,13 +918,11 @@ void ui::Canvas::export_equirectangular_thread(std::string data_path)
|
||||
}
|
||||
}
|
||||
|
||||
static char name[128];
|
||||
sprintf(name, "%s", data_path.c_str());
|
||||
LOG("writing %s", name);
|
||||
LOG("writing %s", file_path.c_str());
|
||||
jpge::params params;
|
||||
params.m_quality = 100;
|
||||
bool saved = jpge::compress_image_to_jpeg_file(name, m_latlong.getWidth(), m_latlong.getHeight(), 4, latlong_data.get(), params);
|
||||
inject_xmp(name);
|
||||
bool saved = jpge::compress_image_to_jpeg_file(file_path.c_str(), m_latlong.getWidth(), m_latlong.getHeight(), 4, latlong_data.get(), params);
|
||||
inject_xmp(file_path.c_str());
|
||||
|
||||
{
|
||||
progress++;
|
||||
@@ -1138,21 +1136,21 @@ void ui::Canvas::export_anim(std::string data_path)
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
}
|
||||
|
||||
void ui::Canvas::project_save(std::string data_path)
|
||||
void ui::Canvas::project_save(std::string file_path)
|
||||
{
|
||||
std::thread t(&ui::Canvas::project_save_thread, this, data_path);
|
||||
std::thread t(&ui::Canvas::project_save_thread, this, file_path);
|
||||
t.detach();
|
||||
}
|
||||
|
||||
void ui::Canvas::project_save_thread(std::string data_path)
|
||||
void ui::Canvas::project_save_thread(std::string file_path)
|
||||
{
|
||||
gl_state gl;
|
||||
// static char name[128];
|
||||
// sprintf(name, "%s/latlong.pano", data_path.c_str());
|
||||
FILE* fp = fopen(data_path.c_str(), "wb");
|
||||
FILE* fp = fopen(file_path.c_str(), "wb");
|
||||
if (!fp)
|
||||
{
|
||||
LOG("cannot write project to %s", data_path.c_str());
|
||||
LOG("cannot write project to %s", file_path.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1195,7 +1193,7 @@ void ui::Canvas::project_save_thread(std::string data_path)
|
||||
fwrite(m_layers[i].m_name.data(), name_len, 1, fp);
|
||||
|
||||
App::I.async_start();
|
||||
auto snap = m_layers[i].snapshot(data_path);
|
||||
auto snap = m_layers[i].snapshot(file_path);
|
||||
App::I.async_update();
|
||||
App::I.async_end();
|
||||
for (int plane_index = 0; plane_index < 6; plane_index++)
|
||||
@@ -1232,7 +1230,7 @@ void ui::Canvas::project_save_thread(std::string data_path)
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
LOG("project saved to %s", data_path.c_str());
|
||||
LOG("project saved to %s", file_path.c_str());
|
||||
|
||||
// App::I.upload(data_path);
|
||||
// LOG("uploaded");
|
||||
@@ -1243,21 +1241,21 @@ void ui::Canvas::project_save_thread(std::string data_path)
|
||||
App::I.async_end();
|
||||
}
|
||||
|
||||
void ui::Canvas::project_open(std::string data_path)
|
||||
void ui::Canvas::project_open(std::string file_path)
|
||||
{
|
||||
std::thread t(&ui::Canvas::project_open_thread, this, data_path);
|
||||
std::thread t(&ui::Canvas::project_open_thread, this, file_path);
|
||||
t.detach();
|
||||
//project_open_thread(data_path);
|
||||
}
|
||||
|
||||
void ui::Canvas::project_open_thread(std::string data_path)
|
||||
void ui::Canvas::project_open_thread(std::string file_path)
|
||||
{
|
||||
// static char name[128];
|
||||
// sprintf(name, "%s/latlong.pano", data_path.c_str());
|
||||
FILE* fp = fopen(data_path.c_str(), "rb");
|
||||
FILE* fp = fopen(file_path.c_str(), "rb");
|
||||
if (!fp)
|
||||
{
|
||||
LOG("cannot write project to %s", data_path.c_str());
|
||||
LOG("cannot write project to %s", file_path.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1364,7 +1362,7 @@ void ui::Canvas::project_open_thread(std::string data_path)
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
LOG("project restore from %s", data_path.c_str());
|
||||
LOG("project restore from %s", file_path.c_str());
|
||||
|
||||
if (App::I.layout.m_loaded)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user