mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-02-03 00:35:14 +01:00
Lua update, array processor
This commit is contained in:
parent
9235a9f9fe
commit
f9e5e3ea9c
12 changed files with 172 additions and 144 deletions
|
@ -1,4 +1,4 @@
|
||||||
function APPEND(_path, context = PANEL_GRAPH.getCurrentContext()) {
|
function APPEND(_path, context = PANEL_GRAPH.getCurrentContext()) { #region
|
||||||
if(_path == "") return noone;
|
if(_path == "") return noone;
|
||||||
var _map = json_load_struct(_path);
|
var _map = json_load_struct(_path);
|
||||||
|
|
||||||
|
@ -12,9 +12,9 @@ function APPEND(_path, context = PANEL_GRAPH.getCurrentContext()) {
|
||||||
log_message("FILE", "append file " + _path, THEME.noti_icon_file_load);
|
log_message("FILE", "append file " + _path, THEME.noti_icon_file_load);
|
||||||
|
|
||||||
return node_create;
|
return node_create;
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function __APPEND_MAP(_map, context = PANEL_GRAPH.getCurrentContext()) {
|
function __APPEND_MAP(_map, context = PANEL_GRAPH.getCurrentContext()) { #region
|
||||||
static log = false;
|
static log = false;
|
||||||
UNDO_HOLDING = true;
|
UNDO_HOLDING = true;
|
||||||
|
|
||||||
|
@ -149,13 +149,13 @@ function __APPEND_MAP(_map, context = PANEL_GRAPH.getCurrentContext()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return node_create;
|
return node_create;
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function GetAppendID(old_id) {
|
function GetAppendID(old_id) { #region
|
||||||
if(old_id == noone) return noone;
|
if(old_id == noone) return noone;
|
||||||
|
|
||||||
if(ds_map_exists(APPEND_MAP, old_id))
|
if(ds_map_exists(APPEND_MAP, old_id))
|
||||||
return APPEND_MAP[? old_id];
|
return APPEND_MAP[? old_id];
|
||||||
print("Get append ID error: " + string(old_id));
|
print("Get append ID error: " + string(old_id));
|
||||||
return noone;
|
return noone;
|
||||||
}
|
} #endregion
|
|
@ -1,4 +1,4 @@
|
||||||
function LOAD(safe = false) {
|
function LOAD(safe = false) { #region
|
||||||
if(DEMO) return false;
|
if(DEMO) return false;
|
||||||
|
|
||||||
var path = get_open_filename("Pixel Composer PROJECT (.pxc)|*.pxc", "");
|
var path = get_open_filename("Pixel Composer PROJECT (.pxc)|*.pxc", "");
|
||||||
|
@ -8,9 +8,9 @@ function LOAD(safe = false) {
|
||||||
|
|
||||||
gc_collect();
|
gc_collect();
|
||||||
var proj = LOAD_PATH(path, false, safe);
|
var proj = LOAD_PATH(path, false, safe);
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function TEST_PATH(path) {
|
function TEST_PATH(path) { #region
|
||||||
TESTING = true;
|
TESTING = true;
|
||||||
TEST_ERROR = true;
|
TEST_ERROR = true;
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@ function TEST_PATH(path) {
|
||||||
PANEL_GRAPH.setProject(PROJECT);
|
PANEL_GRAPH.setProject(PROJECT);
|
||||||
|
|
||||||
__LOAD_PATH(path);
|
__LOAD_PATH(path);
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function LOAD_PATH(path, readonly = false, safe_mode = false) {
|
function LOAD_PATH(path, readonly = false, safe_mode = false) { #region
|
||||||
for( var i = 0, n = array_length(PROJECTS); i < n; i++ )
|
for( var i = 0, n = array_length(PROJECTS); i < n; i++ )
|
||||||
if(PROJECTS[i].path == path) return;
|
if(PROJECTS[i].path == path) return;
|
||||||
|
|
||||||
|
@ -47,9 +47,9 @@ function LOAD_PATH(path, readonly = false, safe_mode = false) {
|
||||||
setFocus(PANEL_GRAPH.panel);
|
setFocus(PANEL_GRAPH.panel);
|
||||||
|
|
||||||
return PROJECT;
|
return PROJECT;
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function __LOAD_PATH(path, readonly = false, override = false) {
|
function __LOAD_PATH(path, readonly = false, override = false) { #region
|
||||||
if(DEMO) return false;
|
if(DEMO) return false;
|
||||||
|
|
||||||
if(!file_exists(path)) {
|
if(!file_exists(path)) {
|
||||||
|
@ -250,4 +250,24 @@ function __LOAD_PATH(path, readonly = false, override = false) {
|
||||||
PANEL_GRAPH.toCenterNode();
|
PANEL_GRAPH.toCenterNode();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
|
function __IMPORT_ZIP() { #region
|
||||||
|
var path = get_open_filename("Pixel Composer portable project (.zip)|*.zip", "");
|
||||||
|
|
||||||
|
var _fname = filename_name_only(path);
|
||||||
|
var _fext = filename_ext(path);
|
||||||
|
if(_fext != ".zip") return false;
|
||||||
|
|
||||||
|
directory_verify(TEMPDIR + "proj/");
|
||||||
|
var _dir = TEMPDIR + "proj/" + _fname;
|
||||||
|
directory_create(_dir);
|
||||||
|
zip_unzip(path, _dir);
|
||||||
|
|
||||||
|
var _f = file_find_first(_dir + "/*.pxc", fa_none);
|
||||||
|
var _proj = $"{_dir}/{_f}";
|
||||||
|
print(_proj);
|
||||||
|
if(!file_exists(_proj)) return false;
|
||||||
|
|
||||||
|
LOAD_PATH(_proj, true);
|
||||||
|
} #endregion
|
|
@ -42,10 +42,10 @@ function Node_3D_Depth(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
var right_y = sin(x_rad) * sin(y_rad) * cos(z_rad) - cos(x_rad) * sin(z_rad);
|
var right_y = sin(x_rad) * sin(y_rad) * cos(z_rad) - cos(x_rad) * sin(z_rad);
|
||||||
var right_z = cos(x_rad) * sin(y_rad) * cos(z_rad) + sin(x_rad) * sin(z_rad);
|
var right_z = cos(x_rad) * sin(y_rad) * cos(z_rad) + sin(x_rad) * sin(z_rad);
|
||||||
|
|
||||||
print($"POS: {_cx}, {_cy}, {_cz}");
|
//print($"POS: {_cx}, {_cy}, {_cz}");
|
||||||
print($"UP: {up_x}, {up_y}, {up_z}");
|
//print($"UP: {up_x}, {up_y}, {up_z}");
|
||||||
print($"RIGHT: {right_x}, {right_y}, {right_z}");
|
//print($"RIGHT: {right_x}, {right_y}, {right_z}");
|
||||||
print("");
|
//print("");
|
||||||
|
|
||||||
surface_set_shader(_outSurf, sh_3d_depth);
|
surface_set_shader(_outSurf, sh_3d_depth);
|
||||||
DRAW_CLEAR
|
DRAW_CLEAR
|
||||||
|
|
|
@ -119,13 +119,13 @@ function Node_3D_Mesh_Obj(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group)
|
||||||
use_display_list = true;
|
use_display_list = true;
|
||||||
if(obj_raw == noone) return;
|
if(obj_raw == noone) return;
|
||||||
|
|
||||||
var txt = $"========== OBJ import ==========\n";
|
//var txt = $"========== OBJ import ==========\n";
|
||||||
txt += $"Vertex counts: {obj_raw.vertex_count}\n";
|
//txt += $"Vertex counts: {obj_raw.vertex_count}\n";
|
||||||
txt += $"Object counts: {obj_raw.object_counts}\n";
|
//txt += $"Object counts: {obj_raw.object_counts}\n";
|
||||||
txt += $"Material counts: {array_length(obj_raw.materials)}\n";
|
//txt += $"Material counts: {array_length(obj_raw.materials)}\n";
|
||||||
txt += $"Model BBOX: {obj_raw.model_size}\n";
|
//txt += $"Model BBOX: {obj_raw.model_size}\n";
|
||||||
txt += $"Load completed in {(get_timer() - obj_read_time) / 1000} ms\n";
|
//txt += $"Load completed in {(get_timer() - obj_read_time) / 1000} ms\n";
|
||||||
print(txt);
|
//print(txt);
|
||||||
|
|
||||||
var span = max(abs(obj_raw.model_size.x), abs(obj_raw.model_size.y), abs(obj_raw.model_size.z));
|
var span = max(abs(obj_raw.model_size.x), abs(obj_raw.model_size.y), abs(obj_raw.model_size.z));
|
||||||
if(span > 10) noti_warning($"The model is tool large to display properly ({span}u). Scale the model down to preview.");
|
if(span > 10) noti_warning($"The model is tool large to display properly ({span}u). Scale the model down to preview.");
|
||||||
|
|
|
@ -551,6 +551,7 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc
|
||||||
|
|
||||||
static getGraphPreviewSurface = function() { #region
|
static getGraphPreviewSurface = function() { #region
|
||||||
var _output_junc = outputs[| preview_channel];
|
var _output_junc = outputs[| preview_channel];
|
||||||
|
|
||||||
for( var i = 0, n = ds_list_size(nodes); i < n; i++ ) {
|
for( var i = 0, n = ds_list_size(nodes); i < n; i++ ) {
|
||||||
if(!nodes[| i].active) continue;
|
if(!nodes[| i].active) continue;
|
||||||
if(is_instanceof(nodes[| i], Node_Group_Thumbnail))
|
if(is_instanceof(nodes[| i], Node_Group_Thumbnail))
|
||||||
|
|
|
@ -5,6 +5,9 @@ function Node_Group_Thumbnail(_x, _y, _group = noone) : Node(_x, _y, _group) con
|
||||||
|
|
||||||
inputs[| 0] = nodeValue("Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone)
|
inputs[| 0] = nodeValue("Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone)
|
||||||
.setVisible(true, true);
|
.setVisible(true, true);
|
||||||
|
|
||||||
|
outputs[| 0] = nodeValue("Output", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone)
|
||||||
|
.setVisible(false, false);
|
||||||
|
|
||||||
static getGraphPreviewSurface = function() { #region
|
static getGraphPreviewSurface = function() { #region
|
||||||
return getInputData(0);
|
return getInputData(0);
|
||||||
|
|
|
@ -15,19 +15,6 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
|
|
||||||
inputs[| 4] = nodeValue("Execute on frame", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true)
|
inputs[| 4] = nodeValue("Execute on frame", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true)
|
||||||
|
|
||||||
static createNewInput = function() {
|
|
||||||
var index = ds_list_size(inputs);
|
|
||||||
inputs[| index + 0] = nodeValue("Argument name", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "" );
|
|
||||||
|
|
||||||
inputs[| index + 1] = nodeValue("Argument type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 )
|
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Number", "String", "Surface", "Struct" ], update_hover: false });
|
|
||||||
inputs[| index + 1].editWidget.interactable = false;
|
|
||||||
|
|
||||||
inputs[| index + 2] = nodeValue("Argument value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 )
|
|
||||||
.setVisible(true, true);
|
|
||||||
inputs[| index + 2].editWidget.interactable = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
outputs[| 0] = nodeValue("Execution thread", self, JUNCTION_CONNECT.output, VALUE_TYPE.node, noone );
|
outputs[| 0] = nodeValue("Execution thread", self, JUNCTION_CONNECT.output, VALUE_TYPE.node, noone );
|
||||||
|
|
||||||
outputs[| 1] = nodeValue("Return value", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, 0);
|
outputs[| 1] = nodeValue("Return value", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, 0);
|
||||||
|
@ -51,9 +38,20 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
error_notification = noone;
|
error_notification = noone;
|
||||||
compiled = false;
|
compiled = false;
|
||||||
|
|
||||||
if(!LOADING && !APPENDING) createNewInput();
|
static createNewInput = function() { #region
|
||||||
|
var index = ds_list_size(inputs);
|
||||||
|
inputs[| index + 0] = nodeValue("Argument name", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "" );
|
||||||
|
|
||||||
|
inputs[| index + 1] = nodeValue("Argument type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 )
|
||||||
|
.setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Number", "String", "Surface", "Struct" ], update_hover: false });
|
||||||
|
inputs[| index + 1].editWidget.interactable = false;
|
||||||
|
|
||||||
|
inputs[| index + 2] = nodeValue("Argument value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 )
|
||||||
|
.setVisible(true, true);
|
||||||
|
inputs[| index + 2].editWidget.interactable = false;
|
||||||
|
} if(!LOADING && !APPENDING) createNewInput(); #endregion
|
||||||
|
|
||||||
static stepBegin = function() {
|
static stepBegin = function() { #region
|
||||||
if(PROJECT.animator.frame_progress)
|
if(PROJECT.animator.frame_progress)
|
||||||
setRenderStatus(false);
|
setRenderStatus(false);
|
||||||
|
|
||||||
|
@ -77,15 +75,15 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
case 1 : outputs[| 1].setType(VALUE_TYPE.text); break;
|
case 1 : outputs[| 1].setType(VALUE_TYPE.text); break;
|
||||||
case 2 : outputs[| 1].setType(VALUE_TYPE.struct); break;
|
case 2 : outputs[| 1].setType(VALUE_TYPE.struct); break;
|
||||||
}
|
}
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static getState = function() {
|
static getState = function() { #region
|
||||||
if(inputs[| 3].isLeaf())
|
if(inputs[| 3].isLeaf())
|
||||||
return lua_state;
|
return lua_state;
|
||||||
return inputs[| 3].value_from.node.getState();
|
return inputs[| 3].value_from.node.getState();
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static refreshDynamicInput = function() {
|
static refreshDynamicInput = function() { #region
|
||||||
var _in = ds_list_create();
|
var _in = ds_list_create();
|
||||||
|
|
||||||
for( var i = 0; i < input_fix_len; i++ )
|
for( var i = 0; i < input_fix_len; i++ )
|
||||||
|
@ -127,13 +125,13 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
inputs = _in;
|
inputs = _in;
|
||||||
|
|
||||||
createNewInput();
|
createNewInput();
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static onValueFromUpdate = function(index) {
|
static onValueFromUpdate = function(index) { #region
|
||||||
if(index == 0 || index == 2) compiled = false;
|
if(index == 0 || index == 2) compiled = false;
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static onValueUpdate = function(index = 0) {
|
static onValueUpdate = function(index = 0) { #region
|
||||||
if(index == 0 || index == 2) compiled = false;
|
if(index == 0 || index == 2) compiled = false;
|
||||||
|
|
||||||
if(index == 3) {
|
if(index == 3) {
|
||||||
|
@ -149,16 +147,16 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
|
|
||||||
compiled = false;
|
compiled = false;
|
||||||
refreshDynamicInput();
|
refreshDynamicInput();
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static step = function() {
|
static step = function() { #region
|
||||||
for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) {
|
for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) {
|
||||||
var name = getInputData(i + 0);
|
var name = getInputData(i + 0);
|
||||||
inputs[| i + 2].name = name;
|
inputs[| i + 2].name = name;
|
||||||
}
|
}
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static update = function(frame = CURRENT_FRAME) {
|
static update = function(frame = CURRENT_FRAME) { #region
|
||||||
if(!compiled) return;
|
if(!compiled) return;
|
||||||
//if(!PROJECT.animator.is_playing || !PROJECT.animator.frame_progress) return;
|
//if(!PROJECT.animator.is_playing || !PROJECT.animator.frame_progress) return;
|
||||||
|
|
||||||
|
@ -172,12 +170,6 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length )
|
for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length )
|
||||||
array_push(argument_val, getInputData(i + 2));
|
array_push(argument_val, getInputData(i + 2));
|
||||||
|
|
||||||
//if(CURRENT_FRAME == 0) { //refresh state on the first frame
|
|
||||||
// lua_state_destroy(lua_state);
|
|
||||||
// lua_state = lua_create();
|
|
||||||
// addCode();
|
|
||||||
//}
|
|
||||||
|
|
||||||
lua_projectData(getState());
|
lua_projectData(getState());
|
||||||
|
|
||||||
var res = 0;
|
var res = 0;
|
||||||
|
@ -188,9 +180,9 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
}
|
}
|
||||||
|
|
||||||
outputs[| 1].setValue(res);
|
outputs[| 1].setValue(res);
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static addCode = function() {
|
static addCode = function() { #region
|
||||||
var _func = getInputData(0);
|
var _func = getInputData(0);
|
||||||
var _code = getInputData(2);
|
var _code = getInputData(2);
|
||||||
argument_name = [];
|
argument_name = [];
|
||||||
|
@ -207,15 +199,14 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
lua_code += ")\n";
|
lua_code += ")\n";
|
||||||
lua_code += _code;
|
lua_code += _code;
|
||||||
lua_code += "\nend";
|
lua_code += "\nend";
|
||||||
//print(lua_code);
|
|
||||||
|
|
||||||
lua_add_code(getState(), lua_code);
|
lua_add_code(getState(), lua_code);
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
insp1UpdateTooltip = __txt("Compile");
|
insp1UpdateTooltip = __txt("Compile");
|
||||||
insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ];
|
insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ];
|
||||||
|
|
||||||
static onInspector1Update = function() { //compile
|
static onInspector1Update = function() { #region
|
||||||
var thrd = inputs[| 3].value_from;
|
var thrd = inputs[| 3].value_from;
|
||||||
if(thrd == noone) {
|
if(thrd == noone) {
|
||||||
doCompile();
|
doCompile();
|
||||||
|
@ -223,9 +214,9 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
}
|
}
|
||||||
|
|
||||||
thrd.node.onInspector1Update();
|
thrd.node.onInspector1Update();
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static doCompile = function() {
|
static doCompile = function() { #region
|
||||||
compiled = true;
|
compiled = true;
|
||||||
addCode();
|
addCode();
|
||||||
|
|
||||||
|
@ -236,9 +227,9 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
}
|
}
|
||||||
|
|
||||||
doUpdate();
|
doUpdate();
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static doApplyDeserialize = function() {
|
static doApplyDeserialize = function() { #region
|
||||||
refreshDynamicInput();
|
refreshDynamicInput();
|
||||||
|
|
||||||
for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) {
|
for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) {
|
||||||
|
@ -256,11 +247,13 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
|
|
||||||
inputs[| i + 2].setDisplay(VALUE_DISPLAY._default);
|
inputs[| i + 2].setDisplay(VALUE_DISPLAY._default);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
doCompile();
|
||||||
|
} #endregion
|
||||||
|
|
||||||
static onDestroy = function() {
|
static onDestroy = function() { #region
|
||||||
lua_state_destroy(lua_state);
|
lua_state_destroy(lua_state);
|
||||||
if(error_notification != noone)
|
if(error_notification != noone)
|
||||||
noti_remove(error_notification);
|
noti_remove(error_notification);
|
||||||
}
|
} #endregion
|
||||||
}
|
}
|
|
@ -24,7 +24,7 @@ function Node_Lua_Global(_x, _y, _group = noone) : Node(_x, _y, _group) construc
|
||||||
error_notification = noone;
|
error_notification = noone;
|
||||||
compiled = false;
|
compiled = false;
|
||||||
|
|
||||||
static stepBegin = function() {
|
static stepBegin = function() { #region
|
||||||
var _type = getInputData(1);
|
var _type = getInputData(1);
|
||||||
|
|
||||||
if(PROJECT.animator.is_playing && PROJECT.animator.frame_progress && (CURRENT_FRAME == 0 || _type == 1))
|
if(PROJECT.animator.is_playing && PROJECT.animator.frame_progress && (CURRENT_FRAME == 0 || _type == 1))
|
||||||
|
@ -43,22 +43,22 @@ function Node_Lua_Global(_x, _y, _group = noone) : Node(_x, _y, _group) construc
|
||||||
noti_remove(error_notification);
|
noti_remove(error_notification);
|
||||||
error_notification = noone;
|
error_notification = noone;
|
||||||
}
|
}
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static getState = function() {
|
static getState = function() { #region
|
||||||
if(inputs[| 2].isLeaf()) return lua_state;
|
if(inputs[| 2].isLeaf()) return lua_state;
|
||||||
return inputs[| 2].value_from.node.getState();
|
return inputs[| 2].value_from.node.getState();
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static onValueFromUpdate = function(index) {
|
static onValueFromUpdate = function(index) { #region
|
||||||
if(index == 0 || index == 2) compiled = false;
|
if(index == 0 || index == 2) compiled = false;
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static onValueUpdate = function(index = 0) {
|
static onValueUpdate = function(index = 0) { #region
|
||||||
if(index == 0 || index == 2) compiled = false;
|
if(index == 0 || index == 2) compiled = false;
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static update = function(frame = CURRENT_FRAME) {
|
static update = function(frame = CURRENT_FRAME) { #region
|
||||||
if(!compiled) return;
|
if(!compiled) return;
|
||||||
//if(!PROJECT.animator.is_playing || !PROJECT.animator.frame_progress) return;
|
//if(!PROJECT.animator.is_playing || !PROJECT.animator.frame_progress) return;
|
||||||
|
|
||||||
|
@ -77,9 +77,9 @@ function Node_Lua_Global(_x, _y, _group = noone) : Node(_x, _y, _group) construc
|
||||||
try { lua_add_code(getState(), _code); }
|
try { lua_add_code(getState(), _code); }
|
||||||
catch(e) { noti_warning(exception_print(e),, self); }
|
catch(e) { noti_warning(exception_print(e),, self); }
|
||||||
}
|
}
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static onInspector1Update = function() { //compile
|
static onInspector1Update = function() { #region
|
||||||
var thrd = inputs[| 2].value_from;
|
var thrd = inputs[| 2].value_from;
|
||||||
if(thrd == noone) {
|
if(thrd == noone) {
|
||||||
doCompile();
|
doCompile();
|
||||||
|
@ -87,9 +87,9 @@ function Node_Lua_Global(_x, _y, _group = noone) : Node(_x, _y, _group) construc
|
||||||
}
|
}
|
||||||
|
|
||||||
thrd.node.onInspector1Update();
|
thrd.node.onInspector1Update();
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static doCompile = function() {
|
static doCompile = function() { #region
|
||||||
compiled = true;
|
compiled = true;
|
||||||
|
|
||||||
for( var i = 0; i < ds_list_size(outputs[| 0].value_to); i++ ) {
|
for( var i = 0; i < ds_list_size(outputs[| 0].value_to); i++ ) {
|
||||||
|
@ -99,11 +99,13 @@ function Node_Lua_Global(_x, _y, _group = noone) : Node(_x, _y, _group) construc
|
||||||
}
|
}
|
||||||
|
|
||||||
doUpdate();
|
doUpdate();
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static onDestroy = function() {
|
static doApplyDeserialize = function() { doCompile(); }
|
||||||
|
|
||||||
|
static onDestroy = function() { #region
|
||||||
lua_state_destroy(lua_state);
|
lua_state_destroy(lua_state);
|
||||||
if(error_notification != noone)
|
if(error_notification != noone)
|
||||||
noti_remove(error_notification);
|
noti_remove(error_notification);
|
||||||
}
|
} #endregion
|
||||||
}
|
}
|
|
@ -15,19 +15,6 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
|
|
||||||
inputs[| 4] = nodeValue("Execute on frame", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true)
|
inputs[| 4] = nodeValue("Execute on frame", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true)
|
||||||
|
|
||||||
static createNewInput = function() {
|
|
||||||
var index = ds_list_size(inputs);
|
|
||||||
inputs[| index + 0] = nodeValue("Argument name", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "" );
|
|
||||||
|
|
||||||
inputs[| index + 1] = nodeValue("Argument type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 )
|
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Number", "String", "Surface", "Struct" ], update_hover: false });
|
|
||||||
inputs[| index + 1].editWidget.interactable = false;
|
|
||||||
|
|
||||||
inputs[| index + 2] = nodeValue("Argument value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 )
|
|
||||||
.setVisible(true, true);
|
|
||||||
inputs[| index + 2].editWidget.interactable = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
outputs[| 0] = nodeValue("Execution thread", self, JUNCTION_CONNECT.output, VALUE_TYPE.node, noone );
|
outputs[| 0] = nodeValue("Execution thread", self, JUNCTION_CONNECT.output, VALUE_TYPE.node, noone );
|
||||||
|
|
||||||
outputs[| 1] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
outputs[| 1] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||||
|
@ -52,9 +39,20 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
error_notification = noone;
|
error_notification = noone;
|
||||||
compiled = false;
|
compiled = false;
|
||||||
|
|
||||||
if(!LOADING && !APPENDING) createNewInput();
|
static createNewInput = function() { #region
|
||||||
|
var index = ds_list_size(inputs);
|
||||||
|
inputs[| index + 0] = nodeValue("Argument name", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "" );
|
||||||
|
|
||||||
|
inputs[| index + 1] = nodeValue("Argument type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 )
|
||||||
|
.setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Number", "String", "Surface", "Struct" ], update_hover: false });
|
||||||
|
inputs[| index + 1].editWidget.interactable = false;
|
||||||
|
|
||||||
|
inputs[| index + 2] = nodeValue("Argument value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 )
|
||||||
|
.setVisible(true, true);
|
||||||
|
inputs[| index + 2].editWidget.interactable = false;
|
||||||
|
} if(!LOADING && !APPENDING) createNewInput(); #endregion
|
||||||
|
|
||||||
static stepBegin = function() {
|
static stepBegin = function() { #region
|
||||||
if(PROJECT.animator.frame_progress)
|
if(PROJECT.animator.frame_progress)
|
||||||
setRenderStatus(false);
|
setRenderStatus(false);
|
||||||
|
|
||||||
|
@ -71,15 +69,15 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
noti_remove(error_notification);
|
noti_remove(error_notification);
|
||||||
error_notification = noone;
|
error_notification = noone;
|
||||||
}
|
}
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static getState = function() {
|
static getState = function() { #region
|
||||||
if(inputs[| 3].isLeaf())
|
if(inputs[| 3].isLeaf())
|
||||||
return lua_state;
|
return lua_state;
|
||||||
return inputs[| 3].value_from.node.getState();
|
return inputs[| 3].value_from.node.getState();
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static refreshDynamicInput = function() {
|
static refreshDynamicInput = function() { #region
|
||||||
var _in = ds_list_create();
|
var _in = ds_list_create();
|
||||||
|
|
||||||
for( var i = 0; i < input_fix_len; i++ )
|
for( var i = 0; i < input_fix_len; i++ )
|
||||||
|
@ -121,13 +119,13 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
inputs = _in;
|
inputs = _in;
|
||||||
|
|
||||||
createNewInput();
|
createNewInput();
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static onValueFromUpdate = function(index) {
|
static onValueFromUpdate = function(index) { #region
|
||||||
if(index == 0 || index == 2) compiled = false;
|
if(index == 0 || index == 2) compiled = false;
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static onValueUpdate = function(index = 0) {
|
static onValueUpdate = function(index = 0) { #region
|
||||||
if(index == 0 || index == 2) compiled = false;
|
if(index == 0 || index == 2) compiled = false;
|
||||||
|
|
||||||
if(index == 3) {
|
if(index == 3) {
|
||||||
|
@ -143,16 +141,16 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
|
|
||||||
compiled = false;
|
compiled = false;
|
||||||
refreshDynamicInput();
|
refreshDynamicInput();
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static step = function() {
|
static step = function() { #region
|
||||||
for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) {
|
for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) {
|
||||||
var name = getInputData(i + 0);
|
var name = getInputData(i + 0);
|
||||||
inputs[| i + 2].name = name;
|
inputs[| i + 2].name = name;
|
||||||
}
|
}
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static update = function(frame = CURRENT_FRAME) {
|
static update = function(frame = CURRENT_FRAME) { #region
|
||||||
if(!compiled) return;
|
if(!compiled) return;
|
||||||
//if(!PROJECT.animator.is_playing || !PROJECT.animator.frame_progress) return;
|
//if(!PROJECT.animator.is_playing || !PROJECT.animator.frame_progress) return;
|
||||||
|
|
||||||
|
@ -184,9 +182,9 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
surface_reset_target();
|
surface_reset_target();
|
||||||
|
|
||||||
outputs[| 1].setValue(_outSurf);
|
outputs[| 1].setValue(_outSurf);
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static addCode = function() {
|
static addCode = function() { #region
|
||||||
var _func = getInputData(0);
|
var _func = getInputData(0);
|
||||||
var _code = getInputData(2);
|
var _code = getInputData(2);
|
||||||
argument_name = [];
|
argument_name = [];
|
||||||
|
@ -205,12 +203,12 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
lua_code += "\nend";
|
lua_code += "\nend";
|
||||||
|
|
||||||
lua_add_code(getState(), lua_code);
|
lua_add_code(getState(), lua_code);
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
insp1UpdateTooltip = __txt("Compile");
|
insp1UpdateTooltip = __txt("Compile");
|
||||||
insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ];
|
insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ];
|
||||||
|
|
||||||
static onInspector1Update = function() { //compile
|
static onInspector1Update = function() { #region
|
||||||
var thrd = inputs[| 3].value_from;
|
var thrd = inputs[| 3].value_from;
|
||||||
if(thrd == noone) {
|
if(thrd == noone) {
|
||||||
doCompile();
|
doCompile();
|
||||||
|
@ -218,9 +216,9 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
}
|
}
|
||||||
|
|
||||||
thrd.node.onInspector1Update();
|
thrd.node.onInspector1Update();
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static doCompile = function() {
|
static doCompile = function() { #region
|
||||||
addCode();
|
addCode();
|
||||||
compiled = true;
|
compiled = true;
|
||||||
|
|
||||||
|
@ -231,9 +229,9 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
}
|
}
|
||||||
|
|
||||||
doUpdate();
|
doUpdate();
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static doApplyDeserialize = function() {
|
static doApplyDeserialize = function() { #region
|
||||||
refreshDynamicInput();
|
refreshDynamicInput();
|
||||||
|
|
||||||
for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) {
|
for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) {
|
||||||
|
@ -251,11 +249,13 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
|
|
||||||
inputs[| i + 2].setDisplay(VALUE_DISPLAY._default);
|
inputs[| i + 2].setDisplay(VALUE_DISPLAY._default);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
doCompile();
|
||||||
|
} #endregion
|
||||||
|
|
||||||
static onDestroy = function() {
|
static onDestroy = function() { #region
|
||||||
lua_state_destroy(lua_state);
|
lua_state_destroy(lua_state);
|
||||||
if(error_notification != noone)
|
if(error_notification != noone)
|
||||||
noti_remove(error_notification);
|
noti_remove(error_notification);
|
||||||
}
|
} #endregion
|
||||||
}
|
}
|
|
@ -49,6 +49,8 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||||
if(!_n.isArray()) return _in;
|
if(!_n.isArray()) return _in;
|
||||||
|
|
||||||
var _aIndex = _arr;
|
var _aIndex = _arr;
|
||||||
|
if(!is_array(_arr)) return 0;
|
||||||
|
|
||||||
switch(attributes.array_process) {
|
switch(attributes.array_process) {
|
||||||
case ARRAY_PROCESS.loop : _aIndex = safe_mod(_arr, array_length(_in)); break;
|
case ARRAY_PROCESS.loop : _aIndex = safe_mod(_arr, array_length(_in)); break;
|
||||||
case ARRAY_PROCESS.hold : _aIndex = min(_arr, array_length(_in) - 1); break;
|
case ARRAY_PROCESS.hold : _aIndex = min(_arr, array_length(_in) - 1); break;
|
||||||
|
|
|
@ -32,6 +32,13 @@ function Panel_Menu() : PanelContent() constructor {
|
||||||
return submenuCall(_dat, arr);
|
return submenuCall(_dat, arr);
|
||||||
}).setIsShelf(),
|
}).setIsShelf(),
|
||||||
menuItem(__txtx("panel_menu_auto_save_folder", "Open autosave folder"), function() { shellOpenExplorer(DIRECTORY + "autosave"); }, THEME.save_auto),
|
menuItem(__txtx("panel_menu_auto_save_folder", "Open autosave folder"), function() { shellOpenExplorer(DIRECTORY + "autosave"); }, THEME.save_auto),
|
||||||
|
menuItem(__txt("Import"), function(_dat) {
|
||||||
|
var arr = [
|
||||||
|
menuItem(__txt("Portable project (.zip)") + "...", function() { __IMPORT_ZIP(); }),
|
||||||
|
];
|
||||||
|
|
||||||
|
return submenuCall(_dat, arr);
|
||||||
|
}).setIsShelf(),
|
||||||
menuItem(__txt("Export"), function(_dat) {
|
menuItem(__txt("Export"), function(_dat) {
|
||||||
var arr = [
|
var arr = [
|
||||||
menuItem(__txt("Portable project (.zip)") + "...", function() { exportPortable(PROJECT); }),
|
menuItem(__txt("Portable project (.zip)") + "...", function() { exportPortable(PROJECT); }),
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
globalvar SAVING;
|
globalvar SAVING;
|
||||||
SAVING = false;
|
SAVING = false;
|
||||||
|
|
||||||
function NEW() {
|
function NEW() { #region
|
||||||
PROJECT = new Project();
|
PROJECT = new Project();
|
||||||
array_push(PROJECTS, PROJECT);
|
array_push(PROJECTS, PROJECT);
|
||||||
|
|
||||||
var graph = new Panel_Graph(PROJECT);
|
var graph = new Panel_Graph(PROJECT);
|
||||||
PANEL_GRAPH.panel.setContent(graph, true);
|
PANEL_GRAPH.panel.setContent(graph, true);
|
||||||
PANEL_GRAPH = graph;
|
PANEL_GRAPH = graph;
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function save_serialize(project = PROJECT, _outMap = false) {
|
function save_serialize(project = PROJECT, _outMap = false) { #region
|
||||||
var _map = {};
|
var _map = {};
|
||||||
_map.version = SAVE_VERSION;
|
_map.version = SAVE_VERSION;
|
||||||
|
|
||||||
|
@ -57,9 +57,9 @@ function save_serialize(project = PROJECT, _outMap = false) {
|
||||||
if(_outMap) return _map;
|
if(_outMap) return _map;
|
||||||
|
|
||||||
return PREFERENCES.save_file_minify? json_stringify_minify(_map) : json_stringify(_map, true);
|
return PREFERENCES.save_file_minify? json_stringify_minify(_map) : json_stringify(_map, true);
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function SET_PATH(project, path) {
|
function SET_PATH(project, path) { #region
|
||||||
if(path == "") {
|
if(path == "") {
|
||||||
project.readonly = false;
|
project.readonly = false;
|
||||||
} else if(!project.readonly) {
|
} else if(!project.readonly) {
|
||||||
|
@ -73,22 +73,22 @@ function SET_PATH(project, path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
project.path = path;
|
project.path = path;
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function SAVE_ALL() {
|
function SAVE_ALL() { #region
|
||||||
for( var i = 0, n = array_length(PROJECTS); i < n; i++ )
|
for( var i = 0, n = array_length(PROJECTS); i < n; i++ )
|
||||||
SAVE(PROJECTS[i]);
|
SAVE(PROJECTS[i]);
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function SAVE(project = PROJECT) {
|
function SAVE(project = PROJECT) { #region
|
||||||
if(DEMO) return false;
|
if(DEMO) return false;
|
||||||
|
|
||||||
if(project.path == "" || project.readonly)
|
if(project.path == "" || project.readonly)
|
||||||
return SAVE_AS(project);
|
return SAVE_AS(project);
|
||||||
return SAVE_AT(project, project.path);
|
return SAVE_AT(project, project.path);
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function SAVE_AS(project = PROJECT) {
|
function SAVE_AS(project = PROJECT) { #region
|
||||||
if(DEMO) return false;
|
if(DEMO) return false;
|
||||||
|
|
||||||
var path = get_save_filename("Pixel Composer project (.pxc)|*.pxc", "");
|
var path = get_save_filename("Pixel Composer project (.pxc)|*.pxc", "");
|
||||||
|
@ -104,9 +104,9 @@ function SAVE_AS(project = PROJECT) {
|
||||||
SET_PATH(project, path);
|
SET_PATH(project, path);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function SAVE_AT(project = PROJECT, path = "", log = "save at ") {
|
function SAVE_AT(project = PROJECT, path = "", log = "save at ") { #region
|
||||||
if(DEMO) return false;
|
if(DEMO) return false;
|
||||||
|
|
||||||
SAVING = true;
|
SAVING = true;
|
||||||
|
@ -125,11 +125,11 @@ function SAVE_AT(project = PROJECT, path = "", log = "save at ") {
|
||||||
PANEL_MENU.setNotiIcon(THEME.noti_icon_file_save);
|
PANEL_MENU.setNotiIcon(THEME.noti_icon_file_save);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
/////////////////////////////////////////////////////// COLLECTION ///////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////// COLLECTION ///////////////////////////////////////////////////////
|
||||||
|
|
||||||
function SAVE_COLLECTIONS(_list, _path, save_surface = true, metadata = noone, context = PANEL_GRAPH.getCurrentContext()) {
|
function SAVE_COLLECTIONS(_list, _path, save_surface = true, metadata = noone, context = PANEL_GRAPH.getCurrentContext()) { #region
|
||||||
var _content = {};
|
var _content = {};
|
||||||
_content.version = SAVE_VERSION;
|
_content.version = SAVE_VERSION;
|
||||||
|
|
||||||
|
@ -171,9 +171,9 @@ function SAVE_COLLECTIONS(_list, _path, save_surface = true, metadata = noone, c
|
||||||
|
|
||||||
log_message("COLLECTION", "save collection at " + _path, THEME.noti_icon_file_save);
|
log_message("COLLECTION", "save collection at " + _path, THEME.noti_icon_file_save);
|
||||||
PANEL_MENU.setNotiIcon(THEME.noti_icon_file_save);
|
PANEL_MENU.setNotiIcon(THEME.noti_icon_file_save);
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function SAVE_COLLECTION(_node, _path, save_surface = true, metadata = noone, context = PANEL_GRAPH.getCurrentContext()) {
|
function SAVE_COLLECTION(_node, _path, save_surface = true, metadata = noone, context = PANEL_GRAPH.getCurrentContext()) { #region
|
||||||
if(save_surface) {
|
if(save_surface) {
|
||||||
var preview_surface = PANEL_PREVIEW.getNodePreviewSurface();
|
var preview_surface = PANEL_PREVIEW.getNodePreviewSurface();
|
||||||
if(is_surface(preview_surface)) {
|
if(is_surface(preview_surface)) {
|
||||||
|
@ -206,9 +206,9 @@ function SAVE_COLLECTION(_node, _path, save_surface = true, metadata = noone, co
|
||||||
|
|
||||||
log_message("COLLECTION", "save collection at " + _path, THEME.noti_icon_file_save);
|
log_message("COLLECTION", "save collection at " + _path, THEME.noti_icon_file_save);
|
||||||
PANEL_MENU.setNotiIcon(THEME.noti_icon_file_save);
|
PANEL_MENU.setNotiIcon(THEME.noti_icon_file_save);
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function SAVE_NODE(_arr, _node, dx = 0, dy = 0, scale = false, context = PANEL_GRAPH.getCurrentContext()) {
|
function SAVE_NODE(_arr, _node, dx = 0, dy = 0, scale = false, context = PANEL_GRAPH.getCurrentContext()) { #region
|
||||||
if(struct_has(_node, "nodes")) {
|
if(struct_has(_node, "nodes")) {
|
||||||
for(var i = 0; i < ds_list_size(_node.nodes); i++)
|
for(var i = 0; i < ds_list_size(_node.nodes); i++)
|
||||||
SAVE_NODE(_arr, _node.nodes[| i], dx, dy, scale, context);
|
SAVE_NODE(_arr, _node.nodes[| i], dx, dy, scale, context);
|
||||||
|
@ -222,4 +222,4 @@ function SAVE_NODE(_arr, _node, dx = 0, dy = 0, scale = false, context = PANEL_G
|
||||||
if(m.group == c) m.group = noone;
|
if(m.group == c) m.group = noone;
|
||||||
|
|
||||||
array_push(_arr, m);
|
array_push(_arr, m);
|
||||||
}
|
} #endregion
|
Loading…
Reference in a new issue