mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-25 06:26:42 +01:00
Fix array composite, convolute error when dealing with non array input.
This commit is contained in:
parent
8c49699416
commit
72d3ccb998
4 changed files with 20 additions and 14 deletions
|
@ -35,6 +35,8 @@ function Node_Array_Composite(_x, _y, _group = noone) : Node(_x, _y, _group) con
|
|||
var _arr = getInputData(0);
|
||||
var _ker = getInputData(1);
|
||||
|
||||
|
||||
if(!is_array(_arr) || !is_array(_ker)) return;
|
||||
if(array_empty(_arr) || array_empty(_ker)) return;
|
||||
|
||||
var res;
|
||||
|
|
|
@ -43,6 +43,7 @@ function Node_Array_Convolute(_x, _y, _group = noone) : Node(_x, _y, _group) con
|
|||
var _arr = getInputData(0);
|
||||
var _ker = getInputData(1);
|
||||
|
||||
if(!is_array(_arr) || !is_array(_ker)) return;
|
||||
if(array_empty(_arr) || array_empty(_ker)) return;
|
||||
|
||||
var res;
|
||||
|
|
|
@ -111,8 +111,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
.setDisplay(VALUE_DISPLAY.slider_range, { range: [0, TOTAL_FRAMES, 1] });
|
||||
|
||||
png_format = [ "INDEX4", "INDEX8", "Default (PNG32)" ];
|
||||
png_format_r = [ "PNG4", "PNG8" ];
|
||||
inputs[| 13] = nodeValue("Subformat", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4)
|
||||
inputs[| 13] = nodeValue("Subformat", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2)
|
||||
.setDisplay(VALUE_DISPLAY.enum_scroll, { data: png_format, update_hover: false });
|
||||
|
||||
outputs[| 0] = nodeValue("Loop exit", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, 0);
|
||||
|
@ -462,18 +461,22 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
|
||||
switch(ext) {
|
||||
case ".png":
|
||||
if(indx == 0) {
|
||||
surface_save_safe(_surf, _pathTemp);
|
||||
switch(indx) {
|
||||
case 0 :
|
||||
surface_save_safe(_surf, _pathTemp);
|
||||
|
||||
var shell_cmd = $"convert \"{_pathTemp}\" \"{_pathOut}\"";
|
||||
shell_execute(magick, shell_cmd, self);
|
||||
} else if(indx == 2) {
|
||||
surface_save_safe(_surf, _pathOut);
|
||||
} else {
|
||||
surface_save_safe(_surf, _pathTemp);
|
||||
var shell_cmd = $"convert \"{_pathTemp}\" \"{_pathOut}\"";
|
||||
shell_execute(magick, shell_cmd, self);
|
||||
break;
|
||||
case 1 :
|
||||
surface_save_safe(_surf, _pathTemp);
|
||||
|
||||
var shell_cmd = $"convert {_pathTemp} {png_format_r[indx]}:\"{_pathOut}\"";
|
||||
shell_execute(magick, shell_cmd, self);
|
||||
var shell_cmd = $"convert {_pathTemp} PNG8:\"{_pathOut}\"";
|
||||
shell_execute(magick, shell_cmd, self);
|
||||
break;
|
||||
case 2 :
|
||||
surface_save_safe(_surf, _pathOut);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -153,8 +153,8 @@
|
|||
ds_map_add_list(map, "key", save_l);
|
||||
|
||||
PREF_MAP[? "window_maximize"] = gameframe_is_maximized();
|
||||
PREF_MAP[? "window_width"] = gameframe_restoreRect_hx[2];
|
||||
PREF_MAP[? "window_height"] = gameframe_restoreRect_hx[3];
|
||||
PREF_MAP[? "window_width"] = WIN_W;
|
||||
PREF_MAP[? "window_height"] = WIN_H;
|
||||
|
||||
var _pref = ds_map_create();
|
||||
ds_map_override(_pref, PREF_MAP);
|
||||
|
|
Loading…
Reference in a new issue