[Export] Exporting to .webp is now synchronous to prevent export error.

This commit is contained in:
Tanasart 2024-10-21 09:36:08 +07:00
parent 1790d564ca
commit 5db70bc632
9 changed files with 28 additions and 19 deletions

View file

@ -188,11 +188,11 @@
{"name":"blinker","order":19,"path":"folders/shader/generator/blinker.yy",},
{"name":"cell","order":20,"path":"folders/shader/generator/cell.yy",},
{"name":"grid","order":18,"path":"folders/shader/generator/grid.yy",},
{"name":"sky model","order":31,"path":"folders/shader/generator/sky model.yy",},
{"name":"interpret","order":17,"path":"folders/shader/generator/interpret.yy",},
{"name":"random_shape","order":21,"path":"folders/shader/generator/random_shape.yy",},
{"name":"reaction_diffusion","order":22,"path":"folders/shader/generator/reaction_diffusion.yy",},
{"name":"region","order":23,"path":"folders/shader/generator/region.yy",},
{"name":"sky model","order":31,"path":"folders/shader/generator/sky model.yy",},
{"name":"texture repeat","order":28,"path":"folders/shader/generator/texture repeat.yy",},
{"name":"vector_mapper","order":24,"path":"folders/shader/generator/vector_mapper.yy",},
{"name":"mask","order":10,"path":"folders/shader/mask.yy",},

View file

@ -299,11 +299,11 @@
{"$GMFolder":"","%Name":"blinker","folderPath":"folders/shader/generator/blinker.yy","name":"blinker","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"cell","folderPath":"folders/shader/generator/cell.yy","name":"cell","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"grid","folderPath":"folders/shader/generator/grid.yy","name":"grid","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"sky model","folderPath":"folders/shader/generator/sky model.yy","name":"sky model","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"interpret","folderPath":"folders/shader/generator/interpret.yy","name":"interpret","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"random_shape","folderPath":"folders/shader/generator/random_shape.yy","name":"random_shape","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"reaction_diffusion","folderPath":"folders/shader/generator/reaction_diffusion.yy","name":"reaction_diffusion","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"region","folderPath":"folders/shader/generator/region.yy","name":"region","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"sky model","folderPath":"folders/shader/generator/sky model.yy","name":"sky model","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"texture repeat","folderPath":"folders/shader/generator/texture repeat.yy","name":"texture repeat","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"vector_mapper","folderPath":"folders/shader/generator/vector_mapper.yy","name":"vector_mapper","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"mask","folderPath":"folders/shader/mask.yy","name":"mask","resourceType":"GMFolder","resourceVersion":"2.0",},

View file

@ -139,11 +139,11 @@ event_inherited();
if(is_string(_txt)) {
draw_set_text(font, align, fa_center, _act? COLORS._main_text : COLORS._main_text_sub);
if(align == fa_center) {
var _xc = _spr? hght + (_dw - hght) / 2 : _dw / 2;
var _xc = _spr != noone? hght + (_dw - hght) / 2 : _dw / 2;
draw_text_add(_xc, _yy, _txt);
} else if(align == fa_left)
draw_text_add(text_pad + _spr * hght, _yy, _txt);
draw_text_add(text_pad + (_spr != noone) * hght, _yy, _txt);
} else if(sprite_exists(_txt)) {
draw_sprite_ext(_txt, i, _dw / 2, _yy);

View file

@ -206,11 +206,11 @@ event_inherited();
draw_set_text(font, align, fa_center, _sub? COLORS._main_text_sub : COLORS._main_text);
if(align == fa_center) {
var _xc = _spr? hght + (_dw - hght) / 2 : _dw / 2;
var _xc = _spr != noone? hght + (_dw - hght) / 2 : _dw / 2;
draw_text_add(_lx + _xc, _ly + hght / 2, _txt);
} else if(align == fa_left)
draw_text_add(_tpad + _lx + _spr * (_tpad * 2 + hght), _ly + hght / 2, _txt);
draw_text_add(_tpad + _lx + (_spr != noone) * (_tpad * 2 + hght), _ly + hght / 2, _txt);
if(_spr) draw_sprite_ext(_val.spr, _val.spr_ind, _lx + ui(8) + hght / 2, _ly + hght / 2, 1, 1, 0, _val.spr_blend, 1);

View file

@ -42,7 +42,7 @@
LATEST_VERSION = 1_18_00_0;
VERSION = 1_18_01_0;
SAVE_VERSION = 1_18_02_0;
VERSION_STRING = MAC? "1.18.003m" : "1.18.2.1";
VERSION_STRING = MAC? "1.18.003m" : "1.18.3.002";
BUILD_NUMBER = 1_18_01_0;
HOTKEYS = ds_map_create();

View file

@ -297,10 +297,10 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
while(_path != "") {
var _frame = string_quote(temp_path + string_replace_all(_path, ".png", "") + ".webp");
var _pathTemp = string_quote(temp_path + _path);
var shell_cmd = _pathTemp + " -define webp:lossless=true " + _frame;
var shell_cmd = $"{_pathTemp} -define webp:lossless=true {_frame}";
array_push(frames, _frame);
shell_execute_async(magick, shell_cmd, self, false);
shell_execute(magick, shell_cmd, self, false);
_path = file_find_next();
}

View file

@ -68,6 +68,13 @@ function Panel_Notification() : PanelContent() constructor {
var _h = ui(12) + string_height_ext(noti.txt, -1, txw);
_h += pad * 2;
if(i) {
draw_set_color(COLORS._main_icon);
draw_set_alpha(.15);
draw_line(ui(16), yy - ui(1), _w - ui(16), yy - ui(1));
draw_set_alpha(1);
}
if(yy >= -_h && yy <= sp_noti.h) {
if(pHOVER && pHOVER && point_in_rectangle(_m[0], _m[1], 0, yy, _w, yy + _h)) {

View file

@ -1,17 +1,18 @@
function shellOpenExplorer(path) { #region
function shellOpenExplorer(path) {
if(OS == os_windows) {
var _windir = environment_get_variable("WINDIR") + "/explorer.exe";
path = string_replace_all(path, "/", "\\");
shell_execute_async(_windir, path);
} else if(OS == os_macosx) {
path = string_replace_all(path, "\\", "/");
var res = shell_execute_async("open", path);
}
return 0;
} #endregion
}
function shell_execute(path, command, ref = noone) { #region
function shell_execute(path, command, ref = noone, _log = true) {
INLINE
if(OS == os_macosx) {
@ -21,12 +22,12 @@ function shell_execute(path, command, ref = noone) { #region
var txt = $"{path} {command}";
var res = ProcessExecute(txt);
print($"Execute {path} {command} | {res}");
if(_log) print($"Execute {path} {command} | {res}");
return res;
} #endregion
}
function shell_execute_async(path, command, ref = noone, _log = true) { #region
function shell_execute_async(path, command, ref = noone, _log = true) {
INLINE
if(IS_CMD) return shell_execute(path, command, ref);
@ -41,12 +42,12 @@ function shell_execute_async(path, command, ref = noone, _log = true) { #region
if(_log) print($"Execute async {path} {command} | {res}");
return res;
} #endregion
}
function env_user() { #region
function env_user() {
INLINE
if(OS == os_windows) return string(environment_get_variable("userprofile")) + "/AppData/Local/PixelComposer/";
if(OS == os_macosx) return string(environment_get_variable("HOME")) + "/PixelComposer/";
return "";
} #endregion
}

View file

@ -1,6 +1,7 @@
function close_program() {
PREF_SAVE();
if(PREFERENCES.clear_temp_on_close) directory_destroy(TEMPDIR);
//if(PREFERENCES.clear_temp_on_close) directory_destroy(TEMPDIR);
game_end();
}