rename things
This commit is contained in:
@@ -446,7 +446,7 @@
|
||||
-->
|
||||
<button-custom id="file-newdoc" text="Menu" height="40" align="center" color=".2" pad="0 0 0 10" dir="row">
|
||||
<icon icon="page_add" width="20"/>
|
||||
<text text="New Panodoc" margin="0 0 0 5" font-face="arial" font-size="11"/>
|
||||
<text text="New Pano" margin="0 0 0 5" font-face="arial" font-size="11"/>
|
||||
</button-custom>
|
||||
<button-custom id="file-open" text="Menu" height="40" align="center" color=".2" pad="0 0 0 10" dir="row">
|
||||
<icon icon="page_add" width="20"/>
|
||||
@@ -462,15 +462,15 @@
|
||||
</button-custom>
|
||||
<button-custom id="file-save-as" text="Menu" height="40" align="center" color=".2" pad="0 0 0 10" dir="row">
|
||||
<icon icon="disk" width="20"/>
|
||||
<text text="Save as.." margin="0 0 0 5" font-face="arial" font-size="11"/>
|
||||
<text text="Save As.." margin="0 0 0 5" font-face="arial" font-size="11"/>
|
||||
</button-custom>
|
||||
<button-custom id="file-save-ver" text="Menu" height="40" align="center" color=".2" pad="0 0 0 10" dir="row">
|
||||
<icon icon="disk" width="20"/>
|
||||
<text text="Save version" margin="0 0 0 5" font-face="arial" font-size="11"/>
|
||||
<text text="Save Version" margin="0 0 0 5" font-face="arial" font-size="11"/>
|
||||
</button-custom>
|
||||
<button-custom id="file-export" text="Menu" height="40" align="center" color=".2" pad="0 0 0 10" dir="row">
|
||||
<icon icon="disk" width="20"/>
|
||||
<text text="Export PNG" margin="0 0 0 5" font-face="arial" font-size="11"/>
|
||||
<text text="Export JPG" margin="0 0 0 5" font-face="arial" font-size="11"/>
|
||||
</button-custom>
|
||||
<button-custom id="file-upload" text="Menu" height="40" align="center" color=".2" pad="0 0 0 10" dir="row">
|
||||
<icon icon="weather_clouds" width="20"/>
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -129,13 +129,13 @@ public:
|
||||
void snapshot_restore();
|
||||
void snap_history(const std::vector<int>& planes);
|
||||
void clear_context();
|
||||
void export_equirectangular(std::string data_path);
|
||||
void export_equirectangular_thread(std::string data_path);
|
||||
void export_equirectangular(std::string file_path);
|
||||
void export_equirectangular_thread(std::string file_path);
|
||||
void export_anim(std::string data_path);
|
||||
void project_save(std::string data_path);
|
||||
void project_save_thread(std::string data_path);
|
||||
void project_open(std::string data_path);
|
||||
void project_open_thread(std::string data_path);
|
||||
void project_save(std::string file_path);
|
||||
void project_save_thread(std::string file_path);
|
||||
void project_open(std::string file_path);
|
||||
void project_open_thread(std::string file_path);
|
||||
void inject_xmp(std::string jpg_path);
|
||||
ui::Image thumbnail_generate(int w, int h);
|
||||
ui::Image thumbnail_read(std::string data_path);
|
||||
|
||||
Reference in New Issue
Block a user