brush settings reset button, hook crash handler on every thread, update changelog

This commit is contained in:
2019-03-13 10:08:13 +01:00
parent 5a6f6f524a
commit 3d625567aa
14 changed files with 59 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces="uap mp rescap">
<Identity Name="OmixLabLtd.PanoPainter" Publisher="CN=A7839FC0-1534-49A5-BD18-1D5AF8852B9B" Version="0.1.6.0" />
<Identity Name="OmixLabLtd.PanoPainter" Publisher="CN=A7839FC0-1534-49A5-BD18-1D5AF8852B9B" Version="0.1.7.0" />
<Properties>
<DisplayName>PanoPainter</DisplayName>
<PublisherDisplayName>OmixLab Ltd</PublisherDisplayName>

View File

@@ -95,7 +95,7 @@ android {
// Specifies the ABI configurations of your native
// libraries Gradle should build and package with your APK.
// abiFilters 'x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'arm64-v8a'
abiFilters 'armeabi-v7a', 'arm64-v8a'
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
}

View File

@@ -636,6 +636,7 @@
</node>
</node>
<button id="brush-settings-reset" text="Reset brush settings" height="40" margin="10 10 0 10"/>
</scroll>
</border>
</node>
@@ -1156,7 +1157,21 @@ Roboto Font License:
<!--window content-->
<border color=".2" width="100%" height="400">
<scroll pad="10" margin="5" color=".3 .3 .3 .4" dir="col" shrink="1">
<text margin="0 0 0 5" font-size="30" text="0.1.6"/>
<text margin="0 0 0 5" font-size="30" text="0.1.7"/>
<text margin="10 0 0 5" text=
"- Completely redesigned UI.
- Side panel for quick access to brush settings.
- Popup panels.
- New heightmap tool for landscapes generation.
- Raytraced shadows generation.
- Multithreading for faster computation.
- Overall performance optimization.
- Import Photoshop Brushes ABR file.
- Improved color picker.
- Layer blending modes.
- Improved Brush Engine with Dual-Brush and Patterns.
"/>
<text margin="20 0 0 5" font-size="30" text="0.1.6"/>
<text margin="10 0 0 5" text=
"- [FIX] Set system message box on top when recovery
- [FIX] Skip Apple Pencil first samples to overcome the initial pressure spike

View File

@@ -22,12 +22,14 @@ bool ABR::section_desc()
if (auto desc = std::dynamic_pointer_cast<Descriptor>(pr))
m_presets.push_back(desc);
}
#ifdef _DEBUG
auto out = presets->str(0, "");
auto lines = split(out, '\n');
for (const auto& l : lines)
{
LOG("%s", l.c_str());
}
#endif // _DEBUG
}
snap();
return true;

View File

@@ -401,7 +401,7 @@ void App::init()
LOG("OPENGL: %.*s", length, message);
FlushConsoleInputBuffer(GetStdHandle(STD_OUTPUT_HANDLE));
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), info.wAttributes);
#ifdef _WIN32
#ifdef _WIN32 && _DEBUG
if (severity == GL_DEBUG_SEVERITY_HIGH)
__debugbreak();
#endif
@@ -960,6 +960,7 @@ void App::rec_export(std::string path)
void App::rec_loop()
{
BT_SetTerminate();
rec_running = true;
while(rec_running)
{

View File

@@ -21,6 +21,7 @@ void App::cloud_upload()
else
{
auto upload_thread = [this] {
BT_SetTerminate();
if (Canvas::I->m_unsaved)
{
Canvas::I->project_save_thread(doc_path);
@@ -74,6 +75,7 @@ void App::cloud_upload()
void App::cloud_upload_all()
{
std::thread([this] {
BT_SetTerminate();
auto names = Asset::list_files(data_path, ".*\\.ppi");
gl_state gl;
@@ -140,6 +142,7 @@ void App::cloud_browse()
return;
dialog->destroy();
std::thread([this, dialog] {
BT_SetTerminate();
async_start();
auto* m = layout[main_id]->add_child<NodeMessageBox>();
m->m_title->set_text("Downloading");

View File

@@ -1175,6 +1175,7 @@ void Canvas::import_equirectangular(std::string file_path)
void Canvas::import_equirectangular_thread(std::string file_path)
{
BT_SetTerminate();
App::I.async_start();
gl_state gl;
@@ -1243,6 +1244,7 @@ void Canvas::export_equirectangular(std::string file_path, std::function<void()>
if (App::I.check_license())
{
std::thread t([=] {
BT_SetTerminate();
export_equirectangular_thread(file_path);
if (on_complete)
on_complete();
@@ -1547,6 +1549,7 @@ void Canvas::export_layers(std::string file_name, std::function<void()> on_compl
if (App::I.check_license())
{
std::thread t([=] {
BT_SetTerminate();
export_layers_thread(file_name);
if (on_complete)
on_complete();
@@ -1802,6 +1805,7 @@ void Canvas::project_save(std::function<void(bool)> on_complete)
if (App::I.check_license())
{
std::thread t([=] {
BT_SetTerminate();
bool ret = project_save_thread(App::I.doc_path);
if (on_complete)
on_complete(ret);
@@ -1816,6 +1820,7 @@ void Canvas::project_save(std::string file_path, std::function<void(bool)> on_co
if (App::I.check_license())
{
std::thread t([=] {
BT_SetTerminate();
bool ret = project_save_thread(file_path);
if (on_complete)
on_complete(ret);
@@ -2012,6 +2017,7 @@ bool Canvas::project_save_thread(std::string file_path)
void Canvas::project_open(std::string file_path, std::function<void(bool)> on_complete)
{
std::thread t([=] {
BT_SetTerminate();
bool result = project_open_thread(file_path);
if (on_complete)
on_complete(result);

View File

@@ -11,9 +11,7 @@ void LogRemote::start()
m_running = true;
m_thread = std::thread([&] {
#ifdef _WIN32
BT_SetTerminate();
#endif
net_init();
auto session_string = net_request("/start");
m_session = atoi(session_string.c_str());

View File

@@ -50,6 +50,7 @@ void NodeDialogCloud::removed(Node* parent)
void NodeDialogCloud::load_thumbs_thread()
{
BT_SetTerminate();
CURL *curl = curl_easy_init();
std::string res;
if (curl)

View File

@@ -400,6 +400,7 @@ void NodePanelGrid::bake_uvs()
const auto radius = get_radius();
std::thread worker([&]
{
BT_SetTerminate();
__block float* d_pos = data_pos.get();
__block float* d_nor = data_nor.get();
__block glm::u8vec4* d_out = reinterpret_cast<glm::u8vec4*>(data_out.get());

View File

@@ -25,6 +25,8 @@ void NodePanelStroke::init()
bool NodePanelStroke::import_abr(const std::string& path)
{
BT_SetTerminate();
ABR abr;
LOG("ABR detected");
@@ -285,8 +287,8 @@ void NodePanelStroke::init_controls()
// init main brush
auto b = std::make_shared<Brush>();
b->load_tip(m_brush_popup->get_texture_path(br_idx), m_brush_popup->get_thumb_path(br_idx));
b->load_dual(m_brush_popup->get_texture_path(br_idx), m_brush_popup->get_thumb_path(br_idx));
b->load_pattern(m_pattern_popup->get_texture_path(0), m_pattern_popup->get_thumb_path(0));
//b->load_dual(m_brush_popup->get_texture_path(br_idx), m_brush_popup->get_thumb_path(br_idx));
//b->load_pattern(m_pattern_popup->get_texture_path(0), m_pattern_popup->get_thumb_path(0));
b->m_tip_size = 30;
b->m_tip_flow = .9f;
b->m_tip_spacing = .1f;
@@ -635,6 +637,21 @@ void NodePanelStroke::init_controls()
};
}
m_brush_settings_reset = find<NodeButton>("brush-settings-reset");
m_brush_settings_reset->on_click = [br_idx,this](Node*) {
auto b = std::make_shared<Brush>();
b->load_tip(m_brush_popup->get_texture_path(br_idx), m_brush_popup->get_thumb_path(br_idx));
//b->load_dual(m_brush_popup->get_texture_path(br_idx), m_brush_popup->get_thumb_path(br_idx));
//b->load_pattern(m_pattern_popup->get_texture_path(0), m_pattern_popup->get_thumb_path(0));
b->m_tip_size = 30;
b->m_tip_flow = .9f;
b->m_tip_spacing = .1f;
b->m_tip_opacity = 1.f;
Canvas::I->m_current_brush = b;
update_controls();
App::I.brush_update();
};
update_controls();
}

View File

@@ -84,6 +84,8 @@ public:
NodeSliderH* m_pattern_contrast;
NodeSliderH* m_pattern_depth;
NodeButton* m_brush_settings_reset;
std::shared_ptr<NodePanelBrush> m_brush_popup;
std::shared_ptr<NodePanelBrush> m_pattern_popup;
std::function<void(Node* target)> on_stroke_change;

View File

@@ -484,6 +484,7 @@ void NodeStrokePreview::draw_stroke()
{
s_running = true;
s_renderer = std::thread([] {
BT_SetTerminate();
while (s_running)
{
auto node = s_queue.Get();

View File

@@ -37,6 +37,7 @@
#include <sys/types.h>
#include <dirent.h>
#include <dispatch/dispatch.h>
#define BT_SetTerminate void
#elif __ANDROID__
@@ -52,7 +53,8 @@
#define SHADER_VERSION "#version 300 es\n"
#define PP_OS "android"
#define __block
#define STBI_NEON
//#define STBI_NEON
#define BT_SetTerminate void
#elif _WIN32