diff --git a/PixelComposer.resource_order b/PixelComposer.resource_order index 8a396af26..a63a5e1ad 100644 --- a/PixelComposer.resource_order +++ b/PixelComposer.resource_order @@ -146,8 +146,8 @@ {"name":"types","order":4,"path":"folders/nodes/values/types.yy",}, {"name":"3d","order":31,"path":"folders/nodes/values/types/3d.yy",}, {"name":"colors","order":32,"path":"folders/nodes/values/types/colors.yy",}, - {"name":"object","order":33,"path":"folders/nodes/values/types/object.yy",}, {"name":"numeric","order":30,"path":"folders/nodes/values/types/numeric.yy",}, + {"name":"object","order":33,"path":"folders/nodes/values/types/object.yy",}, {"name":"panels","order":150,"path":"folders/panels.yy",}, {"name":"video_banner","order":11,"path":"folders/panels/_others/video_banner.yy",}, {"name":"components","order":3,"path":"folders/panels/inspectors/components.yy",}, diff --git a/PixelComposer.yyp b/PixelComposer.yyp index ce161d68e..5b30a14b1 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -246,8 +246,8 @@ {"$GMFolder":"","%Name":"types","folderPath":"folders/nodes/values/types.yy","name":"types","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"3d","folderPath":"folders/nodes/values/types/3d.yy","name":"3d","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"colors","folderPath":"folders/nodes/values/types/colors.yy","name":"colors","resourceType":"GMFolder","resourceVersion":"2.0",}, - {"$GMFolder":"","%Name":"object","folderPath":"folders/nodes/values/types/object.yy","name":"object","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"numeric","folderPath":"folders/nodes/values/types/numeric.yy","name":"numeric","resourceType":"GMFolder","resourceVersion":"2.0",}, + {"$GMFolder":"","%Name":"object","folderPath":"folders/nodes/values/types/object.yy","name":"object","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"panels","folderPath":"folders/panels.yy","name":"panels","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"_others","folderPath":"folders/panels/_others.yy","name":"_others","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"video_banner","folderPath":"folders/panels/_others/video_banner.yy","name":"video_banner","resourceType":"GMFolder","resourceVersion":"2.0",}, diff --git a/objects/o_dialog_add_node/Create_0.gml b/objects/o_dialog_add_node/Create_0.gml index d55b9548f..9fea57174 100644 --- a/objects/o_dialog_add_node/Create_0.gml +++ b/objects/o_dialog_add_node/Create_0.gml @@ -155,15 +155,12 @@ event_inherited(); } var _new_node = noone; - var _inputs = ds_list_create(); - var _outputs = ds_list_create(); + var _inputs = []; + var _outputs = []; if(is_instanceof(_node, NodeObject)) { _new_node = _node.build(node_target_x, node_target_y,, _param); - if(!_new_node) { - ds_list_destroy(_inputs); ds_list_destroy(_outputs); - return; - } + if(!_new_node) return; if(category == NODE_CATEGORY && _node.show_in_recent) { array_remove(global.RECENT_NODES, _node.node); @@ -175,35 +172,22 @@ event_inherited(); if(is_instanceof(context, Node_Collection_Inline)) context.addNode(_new_node); - for( var i = 0, n = ds_list_size(_new_node.inputs); i < n; i++ ) - ds_list_add(_inputs, _new_node.inputs[| i]); + for( var i = 0, n = array_length(_new_node.inputs); i < n; i++ ) + array_push(_inputs, _new_node.inputs[i]); if(_new_node.dummy_input) - ds_list_add(_inputs, _new_node.dummy_input); + array_push(_inputs, _new_node.dummy_input); - for( var i = 0, n = ds_list_size(_new_node.outputs); i < n; i++ ) - ds_list_add(_outputs, _new_node.outputs[| i]); + for( var i = 0, n = array_length(_new_node.outputs); i < n; i++ ) + array_push(_outputs, _new_node.outputs[i]); } else if(is_instanceof(_node, NodeAction)) { ////////////////////////////////////////// NOT IMPLEMENTED - var res = _node.build(node_target_x, node_target_y,, _param); - - // if(_node.inputNode != noone) { - // _inputs = res[$ _node.inputNode].inputs; - // } - - // if(_node.outputNode != noone) { - // _outputs = res[$ _node.outputNode].outputs; - // } - - ds_list_destroy(_inputs); ds_list_destroy(_outputs); + _node.build(node_target_x, node_target_y,, _param); return; } else { var _new_list = APPEND(_node.path); - if(_new_list == noone) { - ds_list_destroy(_inputs); ds_list_destroy(_outputs); - return; - } + if(_new_list == noone) return; var tx = 99999; var ty = 99999; @@ -225,15 +209,15 @@ event_inherited(); for( var i = 0; i < array_length(_new_list); i++ ) { var _in = _new_list[i].inputs; - for( var j = 0; j < ds_list_size(_in); j++ ) { - if(_in[| j].value_from == noone) - ds_list_add(_inputs, _in[| j]); + for( var j = 0; j < array_length(_in); j++ ) { + if(_in[j].value_from == noone) + array_push(_inputs, _in[j]); } var _ot = _new_list[i].outputs; - for( var j = 0; j < ds_list_size(_ot); j++ ) { - if(array_empty(_ot[| j].value_to)) - ds_list_add(_outputs, _ot[| j]); + for( var j = 0; j < array_length(_ot); j++ ) { + if(array_empty(_ot[j].value_to)) + array_push(_outputs, _ot[j]); } } } @@ -243,18 +227,18 @@ event_inherited(); var _call_input = node_called.connect_type == JUNCTION_CONNECT.input; var _junc_list = _call_input? _outputs : _inputs; - for(var i = 0; i < ds_list_size(_junc_list); i++) { - var _target = _junc_list[| i]; + for(var i = 0; i < array_length(_junc_list); i++) { + var _target = _junc_list[i]; if(!_target.auto_connect) continue; - if(_call_input && node_called.isConnectableStrict(_junc_list[| i]) == 1) { - node_called.setFrom(_junc_list[| i]); + if(_call_input && node_called.isConnectableStrict(_junc_list[i]) == 1) { + node_called.setFrom(_junc_list[i]); _new_node.x -= _new_node.w; break; } - if(!_call_input && _junc_list[| i].isConnectableStrict(node_called) == 1) { - _junc_list[| i].setFrom(node_called); + if(!_call_input && _junc_list[i].isConnectableStrict(node_called) == 1) { + _junc_list[i].setFrom(node_called); break; } } @@ -263,16 +247,16 @@ event_inherited(); var to = junction_hovering; var from = junction_hovering.value_from; - for( var i = 0; i < ds_list_size(_inputs); i++ ) { - var _in = _inputs[| i]; + for( var i = 0; i < array_length(_inputs); i++ ) { + var _in = _inputs[i]; if(_in.auto_connect && _in.isConnectableStrict(from)) { _in.setFrom(from); break; } } - for( var i = 0; i < ds_list_size(_outputs); i++ ) { - var _ot = _outputs[| i]; + for( var i = 0; i < array_length(_outputs); i++ ) { + var _ot = _outputs[i]; if(to.isConnectableStrict(_ot)) { to.setFrom(_ot); break; @@ -295,9 +279,6 @@ event_inherited(); } } } - - ds_list_destroy(_inputs); - ds_list_destroy(_outputs); } catagory_pane = new scrollPane(category_width, dialog_h - ui(66), function(_y, _m) { #region catagory_pane diff --git a/objects/o_dialog_group_output_order/Create_0.gml b/objects/o_dialog_group_output_order/Create_0.gml index 53b7129e6..0345b86eb 100644 --- a/objects/o_dialog_group_output_order/Create_0.gml +++ b/objects/o_dialog_group_output_order/Create_0.gml @@ -51,7 +51,7 @@ event_inherited(); if((i == n - 1 && _m[1] > _y0) || (_m[1] > _y0 && _m[1] <= _y1) || (i == 0 && _m[1] < _y1)) hovr = i; - var ind = node.inputs[| disp]; + var ind = node.inputs[disp]; draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text_sub); draw_text_add(hg + ui(8), _y + hg / 2 - 1, ind.name); diff --git a/objects/o_dialog_output_visibility/Create_0.gml b/objects/o_dialog_output_visibility/Create_0.gml index cb4b76c2e..1641e38a7 100644 --- a/objects/o_dialog_output_visibility/Create_0.gml +++ b/objects/o_dialog_output_visibility/Create_0.gml @@ -18,10 +18,10 @@ event_inherited(); if(node == noone) return 0; var hh = line_get_height() + ui(8); - var _h = ds_list_size(node.outputs) * hh; + var _h = array_length(node.outputs) * hh; - for( var i = 0; i < ds_list_size(node.outputs); i++ ) { - var output = node.outputs[| i]; + for( var i = 0; i < array_length(node.outputs); i++ ) { + var output = node.outputs[i]; var _yy = _y + hh * i; if(sHOVER && sc_outputs.hover && point_in_rectangle(_m[0], _m[1], 0, _yy, sc_outputs.w, _yy + hh - 1)) { diff --git a/objects/o_main/Step_1.gml b/objects/o_main/Step_1.gml index 4950089db..199d26818 100644 --- a/objects/o_main/Step_1.gml +++ b/objects/o_main/Step_1.gml @@ -123,6 +123,8 @@ _FILE_DROPPED = false; NodeTopoSort(); } + if(!PROJECT.safeMode) array_foreach(PROJECT.allNodes, function(_node) /*=>*/ { if(!_node.active) return; _node.stepBegin(); }); + if(LIVE_UPDATE) Render(); else if(!PROJECT.safeMode) { @@ -130,7 +132,6 @@ _FILE_DROPPED = false; if(PROJECT.active) { PROJECT.animator.is_simulating = false; - array_foreach(PROJECT.allNodes, function(_node) { if(!_node.active) return; _node.stepBegin(); }); if(PROGRAM_ARGUMENTS._run) { if(PROJECT != noone && PROJECT.path != "") { diff --git a/scripts/__3D/__3D.gml b/scripts/__3D/__3D.gml index 9e39cec23..13d0c00d7 100644 --- a/scripts/__3D/__3D.gml +++ b/scripts/__3D/__3D.gml @@ -350,7 +350,7 @@ enum CAMERA_PROJ { if(drag_prev != undefined) { _pos[drag_index] += (mAdj - drag_prev) / 8000; - if(inputs[| input_pos].setValue(_pos)) + if(inputs[input_pos].setValue(_pos)) UNDO_HOLDING = true; } drag_prev = mAdj; @@ -416,7 +416,7 @@ enum CAMERA_PROJ { var _mulp = _currQ.Mul(_currR); var _Nrot = new BBMOD_Matrix(_mulp.ToMatrix()).ToEuler(); - if(inputs[| input_rot].setValue(_Nrot)) + if(inputs[input_rot].setValue(_Nrot)) UNDO_HOLDING = true; } @@ -467,7 +467,7 @@ enum CAMERA_PROJ { if(drag_prev != undefined) { _sca[drag_index] += (mAdj - drag_prev) / 8000; - if(inputs[| input_sca].setValue(_sca)) + if(inputs[input_sca].setValue(_sca)) UNDO_HOLDING = true; } drag_prev = mAdj; @@ -486,7 +486,7 @@ enum CAMERA_PROJ { drag_my = _my; } - inputs[| global_pos].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[global_pos].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); #endregion } diff --git a/scripts/__VFX/__VFX.gml b/scripts/__VFX/__VFX.gml index 46495751a..1ab48b21c 100644 --- a/scripts/__VFX/__VFX.gml +++ b/scripts/__VFX/__VFX.gml @@ -479,7 +479,7 @@ function __part(_node) : __particleObject() constructor { #region helper #macro UPDATE_PART_FORWARD static updateParticleForward = function() { \ - var pt = outputs[| 0]; \ + var pt = outputs[0]; \ for( var i = 0; i < array_length(pt.value_to); i++ ) { \ var _n = pt.value_to[i]; \ if(_n.value_from != pt) continue; \ diff --git a/scripts/__node/__node.gml b/scripts/__node/__node.gml index 37f90dc0c..a468e8ba4 100644 --- a/scripts/__node/__node.gml +++ b/scripts/__node/__node.gml @@ -4,9 +4,9 @@ function __Node_Base(x, y) constructor { node_id = 0; - display_name = ""; - inputs = ds_list_create(); - outputs = ds_list_create(); + display_name = ""; + inputs = []; + outputs = []; input_value_map = {}; active_index = -1; @@ -31,8 +31,8 @@ function __Node_Base(x, y) constructor { var _pre_anim = is_anim_timeline; var _cur_anim = anim_timeline; - for( var i = 0, n = ds_list_size(inputs); i < n; i++ ) { - var _inp = inputs[| i]; + for( var i = 0, n = array_length(inputs); i < n; i++ ) { + var _inp = inputs[i]; if(_inp.is_anim && _inp.value_from == noone) { _cur_anim = true; break; diff --git a/scripts/__node_3d/__node_3d.gml b/scripts/__node_3d/__node_3d.gml index 9f8a2dec5..cf53afa90 100644 --- a/scripts/__node_3d/__node_3d.gml +++ b/scripts/__node_3d/__node_3d.gml @@ -11,9 +11,9 @@ function Node_3D(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {} static getPreviewObject = function() { #region - if(ds_list_empty(outputs)) return noone; + if(array_empty(outputs)) return noone; - switch(outputs[| preview_channel].type) { + switch(outputs[preview_channel].type) { case VALUE_TYPE.d3Mesh : case VALUE_TYPE.d3Light : case VALUE_TYPE.d3Camera : @@ -22,7 +22,7 @@ function Node_3D(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr default : return noone; } - var _obj = outputs[| 0].getValue(); + var _obj = outputs[0].getValue(); if(is_array(_obj)) _obj = array_safe_get_fast(_obj, preview_index, noone); return _obj; diff --git a/scripts/__node_3d_combine/__node_3d_combine.gml b/scripts/__node_3d_combine/__node_3d_combine.gml index e48c2ccbc..58b9931e2 100644 --- a/scripts/__node_3d_combine/__node_3d_combine.gml +++ b/scripts/__node_3d_combine/__node_3d_combine.gml @@ -1,50 +1,50 @@ function __Node_3D_Combine(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "3D Combine"; - inputs[| 0] = nodeValue_Dimension(self) + inputs[0] = nodeValue_Dimension(self) .rejectArray(); - inputs[| 1] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]) + inputs[1] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]) .rejectArray(); - inputs[| 2] = nodeValue_Vector("Object rotation", self, [ 0, 0, 0 ]) + inputs[2] = nodeValue_Vector("Object rotation", self, [ 0, 0, 0 ]) .rejectArray(); - inputs[| 3] = nodeValue_Vector("Object scale", self, [ 1, 1, 1 ]) + inputs[3] = nodeValue_Vector("Object scale", self, [ 1, 1, 1 ]) .rejectArray(); - inputs[| 4] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) + inputs[4] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) .setUnitRef( function() { return getInputData(2); }, VALUE_UNIT.reference) .rejectArray(); - inputs[| 5] = nodeValue_Vector("Render scale", self, [ 1, 1 ]) + inputs[5] = nodeValue_Vector("Render scale", self, [ 1, 1 ]) .rejectArray(); - inputs[| 6] = nodeValue_Rotation("Light direction", self, 0) + inputs[6] = nodeValue_Rotation("Light direction", self, 0) .rejectArray(); - inputs[| 7] = nodeValue_Float("Light height", self, 0.5) + inputs[7] = nodeValue_Float("Light height", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }) .rejectArray(); - inputs[| 8] = nodeValue_Float("Light intensity", self, 1) + inputs[8] = nodeValue_Float("Light intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); - inputs[| 9] = nodeValue_Color("Light color", self, c_white) + inputs[9] = nodeValue_Color("Light color", self, c_white) .rejectArray(); - inputs[| 10] = nodeValue_Color("Ambient color", self, c_grey) + inputs[10] = nodeValue_Color("Ambient color", self, c_grey) .rejectArray(); - inputs[| 11] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + inputs[11] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); - inputs[| 12] = nodeValue_Float("Field of view", self, 60) + inputs[12] = nodeValue_Float("Field of view", self, 60) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 0.1 ] }) .rejectArray(); - inputs[| 13] = nodeValue_Bool("Scale view with dimension", self, true) + inputs[13] = nodeValue_Bool("Scale view with dimension", self, true) input_display_list = [ ["Output", false], 0, 13, @@ -54,19 +54,19 @@ function __Node_3D_Combine(_x, _y, _group = noone) : Node(_x, _y, _group) constr ["Objects", true], ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("3D objects", self, VALUE_TYPE.d3object, function() { return submit_vertex(); }); + outputs[1] = nodeValue_Output("3D objects", self, VALUE_TYPE.d3object, function() { return submit_vertex(); }); - outputs[| 2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); + outputs[2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); output_display_list = [ 0, 2, 1 ] _3d_node_init(1, /*Transform*/ 4, 5, 1, 2, 3); static createNewInput = function() { - var index = ds_list_size(inputs); - inputs[| index] = nodeValue("3D object", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3object, noone ) + var index = array_length(inputs); + inputs[index] = nodeValue("3D object", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3object, noone ) .setVisible(true, true); array_push(input_display_list, index); @@ -91,7 +91,7 @@ function __Node_3D_Combine(_x, _y, _group = noone) : Node(_x, _y, _group) constr _3d_local_transform(_lpos, _lrot, _lsca); - for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i++ ) { + for( var i = input_fix_len; i < array_length(inputs) - 1; i++ ) { var sv = getInputData(i); if(is_array(sv)) { @@ -125,12 +125,12 @@ function __Node_3D_Combine(_x, _y, _group = noone) : Node(_x, _y, _group) constr var _fov = getInputData(12); var _dimS = getInputData(13); - inputs[| 12].setVisible(_proj); + inputs[12].setVisible(_proj); for( var i = 0, n = array_length(output_display_list) - 1; i < n; i++ ) { var ind = output_display_list[i]; - var _outSurf = outputs[| ind].getValue(); - outputs[| ind].setValue(surface_verify(_outSurf, _dim[0], _dim[1])); + var _outSurf = outputs[ind].getValue(); + outputs[ind].setValue(surface_verify(_outSurf, _dim[0], _dim[1])); var pass = "diff"; switch(ind) { diff --git a/scripts/__node_3d_displace/__node_3d_displace.gml b/scripts/__node_3d_displace/__node_3d_displace.gml index 0f88c91c7..194c9f241 100644 --- a/scripts/__node_3d_displace/__node_3d_displace.gml +++ b/scripts/__node_3d_displace/__node_3d_displace.gml @@ -2,45 +2,45 @@ function __Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr name = "3D Displace"; batch_output = false; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]); + inputs[1] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]); - inputs[| 2] = nodeValue_Vector("Object rotation", self, [ 0, 0, 0 ]); + inputs[2] = nodeValue_Vector("Object rotation", self, [ 0, 0, 0 ]); - inputs[| 3] = nodeValue_Vector("Object scale", self, [ 1, 1, 1 ]); + inputs[3] = nodeValue_Vector("Object scale", self, [ 1, 1, 1 ]); - inputs[| 4] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) + inputs[4] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) .setUnitRef( function() { return getInputData(0); }, VALUE_UNIT.reference); - inputs[| 5] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); + inputs[5] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); - inputs[| 6] = nodeValue_Rotation("Light direction", self, 0); + inputs[6] = nodeValue_Rotation("Light direction", self, 0); - inputs[| 7] = nodeValue_Float("Light height", self, 0.5) + inputs[7] = nodeValue_Float("Light height", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[| 8] = nodeValue_Float("Light intensity", self, 1) + inputs[8] = nodeValue_Float("Light intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 9] = nodeValue_Color("Light color", self, c_white); + inputs[9] = nodeValue_Color("Light color", self, c_white); - inputs[| 10] = nodeValue_Color("Ambient color", self, c_grey); + inputs[10] = nodeValue_Color("Ambient color", self, c_grey); - inputs[| 11] = nodeValue("3D vertex", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3vertex, []) + inputs[11] = nodeValue("3D vertex", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3vertex, []) .setVisible(true, true); - inputs[| 12] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + inputs[12] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); - inputs[| 13] = nodeValue_Float("Field of view", self, 60) + inputs[13] = nodeValue_Float("Field of view", self, 60) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); - inputs[| 14] = nodeValue_Bool("Scale view with dimension", self, true); + inputs[14] = nodeValue_Bool("Scale view with dimension", self, true); - inputs[| 15] = nodeValue_Surface("Displacement map", self); + inputs[15] = nodeValue_Surface("Displacement map", self); - inputs[| 16] = nodeValue_Float("Strength", self, 1) + inputs[16] = nodeValue_Float("Strength", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); input_display_list = [ 11, @@ -51,13 +51,13 @@ function __Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr ["Light", true], 6, 7, 8, 9, 10, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("3D scene", self, VALUE_TYPE.d3object, function() { return submit_vertex(); }); + outputs[1] = nodeValue_Output("3D scene", self, VALUE_TYPE.d3object, function() { return submit_vertex(); }); - outputs[| 2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); + outputs[2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); - outputs[| 3] = nodeValue_Output("3D vertex", self, VALUE_TYPE.d3vertex, []); + outputs[3] = nodeValue_Output("3D vertex", self, VALUE_TYPE.d3vertex, []); output_display_list = [ 0, 2, 1, 3, @@ -92,7 +92,7 @@ function __Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr static step = function() { var _proj = getInputData(12); - inputs[| 13].setVisible(_proj); + inputs[13].setVisible(_proj); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/__node_3d_export/__node_3d_export.gml b/scripts/__node_3d_export/__node_3d_export.gml index 53c1815cd..c2fc8aabe 100644 --- a/scripts/__node_3d_export/__node_3d_export.gml +++ b/scripts/__node_3d_export/__node_3d_export.gml @@ -1,13 +1,13 @@ function __Node_3D_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "3D Export"; - inputs[| 0] = nodeValue("Vertex data", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3vertex, [] ) + inputs[0] = nodeValue("Vertex data", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3vertex, [] ) .setVisible(true, true); - inputs[| 1] = nodeValue_Text("Path", self, "", "Export location without '.obj' extension." ) + inputs[1] = nodeValue_Text("Path", self, "", "Export location without '.obj' extension." ) .setDisplay(VALUE_DISPLAY.path_save, { filter: "3d object|*.obj" }); - inputs[| 2] = nodeValue_Bool("Export texture", self, true ); + inputs[2] = nodeValue_Bool("Export texture", self, true ); input_display_list = [ 0, ["Export", false], 1, 2, diff --git a/scripts/__node_3d_extrude/__node_3d_extrude.gml b/scripts/__node_3d_extrude/__node_3d_extrude.gml index 68871c803..d49802613 100644 --- a/scripts/__node_3d_extrude/__node_3d_extrude.gml +++ b/scripts/__node_3d_extrude/__node_3d_extrude.gml @@ -2,50 +2,50 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro name = "3D Extrude"; batch_output = false; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Dimension(self); + inputs[1] = nodeValue_Dimension(self); - inputs[| 2] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]); + inputs[2] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]); - inputs[| 3] = nodeValue_Vector("Object rotation", self, [ 0, 180, 0 ]); + inputs[3] = nodeValue_Vector("Object rotation", self, [ 0, 180, 0 ]); - inputs[| 4] = nodeValue_Vector("Object scale", self, [ 1, 1, 0.1 ]); + inputs[4] = nodeValue_Vector("Object scale", self, [ 1, 1, 0.1 ]); - inputs[| 5] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) + inputs[5] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) .setUnitRef( function() { return getInputData(1); }, VALUE_UNIT.reference); - inputs[| 6] = nodeValue_Vector("Render rotation", self, [ 0, 0, 0 ]); + inputs[6] = nodeValue_Vector("Render rotation", self, [ 0, 0, 0 ]); - inputs[| 7] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); + inputs[7] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); - inputs[| 8] = nodeValue_Trigger("Manual generate", self, false ) + inputs[8] = nodeValue_Trigger("Manual generate", self, false ) .setDisplay(VALUE_DISPLAY.button, { name: "Generate", UI : true, onClick: function() { generateMesh(); doUpdate(); } }); - inputs[| 9] = nodeValue_Rotation("Light direction", self, 0); + inputs[9] = nodeValue_Rotation("Light direction", self, 0); - inputs[| 10] = nodeValue_Float("Light height", self, 0.5) + inputs[10] = nodeValue_Float("Light height", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[| 11] = nodeValue_Float("Light intensity", self, 1) + inputs[11] = nodeValue_Float("Light intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 12] = nodeValue_Color("Light color", self, c_white); - inputs[| 13] = nodeValue_Color("Ambient color", self, c_grey); + inputs[12] = nodeValue_Color("Light color", self, c_white); + inputs[13] = nodeValue_Color("Ambient color", self, c_grey); - inputs[| 14] = nodeValue_Surface("Height map", self); + inputs[14] = nodeValue_Surface("Height map", self); - inputs[| 15] = nodeValue_Bool("Always update", self, false); + inputs[15] = nodeValue_Bool("Always update", self, false); - inputs[| 16] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + inputs[16] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); - inputs[| 17] = nodeValue_Float("Field of view", self, 60) + inputs[17] = nodeValue_Float("Field of view", self, 60) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); - inputs[| 18] = nodeValue_Bool("Scale view with dimension", self, true) + inputs[18] = nodeValue_Bool("Scale view with dimension", self, true) - inputs[| 19] = nodeValue_Bool("Smooth", self, false) + inputs[19] = nodeValue_Bool("Smooth", self, false) input_display_list = [ ["Output", false], 1, 18, @@ -55,13 +55,13 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro ["Light", false], 9, 10, 11, 12, 13, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("3D scene", self, VALUE_TYPE.d3object, function(index) { return submit_vertex(index); }); + outputs[1] = nodeValue_Output("3D scene", self, VALUE_TYPE.d3object, function(index) { return submit_vertex(index); }); - outputs[| 2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); + outputs[2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); - outputs[| 3] = nodeValue_Output("3D vertex", self, VALUE_TYPE.d3vertex, []); + outputs[3] = nodeValue_Output("3D vertex", self, VALUE_TYPE.d3vertex, []); output_display_list = [ 0, 2, 1, 3 @@ -396,7 +396,7 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro mesh_genetated = true; RENDER_ALL - outputs[| 3].setValue(vertexObjects); + outputs[3].setValue(vertexObjects); } } @@ -451,7 +451,7 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro var _dimS = _data[18]; var _smt = _data[19]; - inputs[| 17].setVisible(_proj); + inputs[17].setVisible(_proj); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1]); if(!is_surface(_ins)) return _outSurf; diff --git a/scripts/__node_3d_light/__node_3d_light.gml b/scripts/__node_3d_light/__node_3d_light.gml index cf0541a8c..6f1469077 100644 --- a/scripts/__node_3d_light/__node_3d_light.gml +++ b/scripts/__node_3d_light/__node_3d_light.gml @@ -2,18 +2,18 @@ function Node_3D_Light(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) name = "3D Light"; if(!LOADING && !APPENDING) - inputs[| 0].setValue([ 0, 0, 1 ]); + inputs[0].setValue([ 0, 0, 1 ]); - inputs[| in_d3d + 0] = nodeValue_Bool("Active", self, true); + inputs[in_d3d + 0] = nodeValue_Bool("Active", self, true); - inputs[| in_d3d + 1] = nodeValue_Color("Color", self, c_white); + inputs[in_d3d + 1] = nodeValue_Color("Color", self, c_white); - inputs[| in_d3d + 2] = nodeValue_Float("Intensity", self, 1) + inputs[in_d3d + 2] = nodeValue_Float("Intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - in_light = ds_list_size(inputs); + in_light = array_length(inputs); - outputs[| 0] = nodeValue_Output("Light", self, VALUE_TYPE.d3Light, noone); + outputs[0] = nodeValue_Output("Light", self, VALUE_TYPE.d3Light, noone); #macro __d3d_input_list_light ["Light", false], in_d3d + 0, in_d3d + 1, in_d3d + 2 diff --git a/scripts/__node_3d_mesh/__node_3d_mesh.gml b/scripts/__node_3d_mesh/__node_3d_mesh.gml index 06c649e0e..3762b9547 100644 --- a/scripts/__node_3d_mesh/__node_3d_mesh.gml +++ b/scripts/__node_3d_mesh/__node_3d_mesh.gml @@ -1,9 +1,9 @@ function Node_3D_Mesh(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) constructor { name = "3D Mesh"; - in_mesh = ds_list_size(inputs); + in_mesh = array_length(inputs); - outputs[| 0] = nodeValue_Output("Mesh", self, VALUE_TYPE.d3Mesh, noone); + outputs[0] = nodeValue_Output("Mesh", self, VALUE_TYPE.d3Mesh, noone); #macro __d3d_input_list_mesh ["Mesh", false] diff --git a/scripts/__node_3d_modifier/__node_3d_modifier.gml b/scripts/__node_3d_modifier/__node_3d_modifier.gml index f3118dc22..5d58b5e27 100644 --- a/scripts/__node_3d_modifier/__node_3d_modifier.gml +++ b/scripts/__node_3d_modifier/__node_3d_modifier.gml @@ -1,12 +1,12 @@ function Node_3D_Modifier(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constructor { name = "3D Mesh Modifier"; - inputs[| 0] = nodeValue_D3Mesh("Mesh", self, noone) + inputs[0] = nodeValue_D3Mesh("Mesh", self, noone) .setVisible(true, true); - in_mesh = ds_list_size(inputs); + in_mesh = array_length(inputs); - outputs[| 0] = nodeValue_Output("Mesh", self, VALUE_TYPE.d3Mesh, noone); + outputs[0] = nodeValue_Output("Mesh", self, VALUE_TYPE.d3Mesh, noone); static modify_object = function(_object, _data, _matrix) { #region return _object; diff --git a/scripts/__node_3d_obj/__node_3d_obj.gml b/scripts/__node_3d_obj/__node_3d_obj.gml index 47c39b030..ffa934a36 100644 --- a/scripts/__node_3d_obj/__node_3d_obj.gml +++ b/scripts/__node_3d_obj/__node_3d_obj.gml @@ -1,59 +1,59 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "3D Object"; - inputs[| 0] = nodeValue_Text("Path", self, "") + inputs[0] = nodeValue_Text("Path", self, "") .setDisplay(VALUE_DISPLAY.path_load, { filter: "3d object|*.obj" }) .rejectArray(); - inputs[| 1] = nodeValue_Trigger("Generate", self, false ) + inputs[1] = nodeValue_Trigger("Generate", self, false ) .setDisplay(VALUE_DISPLAY.button, { name: "Generate", UI : true, onClick: function() { updateObj(); doUpdate(); } }); - inputs[| 2] = nodeValue_Dimension(self); + inputs[2] = nodeValue_Dimension(self); - inputs[| 3] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) + inputs[3] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) .setUnitRef( function() { return getInputData(2); }, VALUE_UNIT.reference); - inputs[| 4] = nodeValue_Vector("Render rotation", self, [ 0, 0, 0 ]); + inputs[4] = nodeValue_Vector("Render rotation", self, [ 0, 0, 0 ]); - inputs[| 5] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); + inputs[5] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); - inputs[| 6] = nodeValue_Rotation("Light direction", self, 0) + inputs[6] = nodeValue_Rotation("Light direction", self, 0) .rejectArray(); - inputs[| 7] = nodeValue_Float("Light height", self, 0.5) + inputs[7] = nodeValue_Float("Light height", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }) .rejectArray(); - inputs[| 8] = nodeValue_Float("Light intensity", self, 1) + inputs[8] = nodeValue_Float("Light intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); - inputs[| 9] = nodeValue_Color("Light color", self, c_white) + inputs[9] = nodeValue_Color("Light color", self, c_white) .rejectArray(); - inputs[| 10] = nodeValue_Color("Ambient color", self, c_grey) + inputs[10] = nodeValue_Color("Ambient color", self, c_grey) .rejectArray(); - inputs[| 11] = nodeValue_Vector("Object scale", self, [ 1, 1, 1 ]); + inputs[11] = nodeValue_Vector("Object scale", self, [ 1, 1, 1 ]); - inputs[| 12] = nodeValue_Bool("Flip UV", self, true, "Flip UV axis, can be use to fix some texture mapping error.") + inputs[12] = nodeValue_Bool("Flip UV", self, true, "Flip UV axis, can be use to fix some texture mapping error.") .rejectArray(); - inputs[| 13] = nodeValue_Vector("Object rotation", self, [ 0, 0, 180 ]); + inputs[13] = nodeValue_Vector("Object rotation", self, [ 0, 0, 180 ]); - inputs[| 14] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]); + inputs[14] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]); - inputs[| 15] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + inputs[15] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); - inputs[| 16] = nodeValue_Float("Field of view", self, 60) + inputs[16] = nodeValue_Float("Field of view", self, 60) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 0.1 ] }) .rejectArray(); - inputs[| 17] = nodeValue_Bool("Scale view with dimension", self, true) + inputs[17] = nodeValue_Bool("Scale view with dimension", self, true) input_display_list = [ ["Output", false], 2, 17, @@ -63,14 +63,14 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo ["Light", false], 6, 7, 8, 9, 10, ["Textures", true], 12, ]; - input_length = ds_list_size(inputs); + input_length = array_length(inputs); input_display_len = array_length(input_display_list); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("3D scene", self, VALUE_TYPE.d3object, function() { return submit_vertex(); }); + outputs[1] = nodeValue_Output("3D scene", self, VALUE_TYPE.d3object, function() { return submit_vertex(); }); - outputs[| 2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); + outputs[2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); output_display_list = [ 0, 2, 1 @@ -97,14 +97,14 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo } function setPath(path) { - inputs[| 0].setValue(path); + inputs[0].setValue(path); updateObj(); } function createMaterial(m_index) { - var index = ds_list_size(inputs); - inputs[| index] = nodeValue_Surface(materialNames[m_index] + " texture", self, tex_surface); - inputs[| index].setVisible(true); + var index = array_length(inputs); + inputs[index] = nodeValue_Surface(materialNames[m_index] + " texture", self, tex_surface); + inputs[index].setVisible(true); input_display_list[input_display_len + m_index] = index; @@ -117,13 +117,13 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo var sol = Node_create_Image_path(x - (w + 64), matY + m_index * (128 + 32), mat.diff_path); sol.name = mat.name + " texture"; - inputs[| index].setFrom(sol.outputs[| 0]); + inputs[index].setFrom(sol.outputs[0]); } else { var sol = nodeBuild("Node_Solid", x - (w + 64), matY + m_index * (128 + 32)); sol.name = mat.name + " texture"; - sol.inputs[| 1].setValue(mat.diff); + sol.inputs[1].setValue(mat.diff); - inputs[| index].setFrom(sol.outputs[| 0]); + inputs[index].setFrom(sol.outputs[0]); } } @@ -191,8 +191,8 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo if(do_reset_material) { array_resize(input_display_list, input_display_len); - while(ds_list_size(inputs) > input_length) - ds_list_delete(inputs, input_length); + while(array_length(inputs) > input_length) + array_delete(inputs, input_length, 1); for(var i = 0; i < array_length(materialNames); i++) createMaterial(i); @@ -218,11 +218,11 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo var _fov = getInputData(16); var _dimS = getInputData(17); - inputs[| 16].setVisible(_proj == 1); + inputs[16].setVisible(_proj == 1); for( var i = 0, n = array_length(output_display_list) - 1; i < n; i++ ) { var ind = output_display_list[i]; - var _outSurf = outputs[| ind].getValue(); + var _outSurf = outputs[ind].getValue(); var pass = "diff"; switch(ind) { @@ -246,7 +246,7 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo } _3d_post_setup(); - outputs[| ind].setValue(_outSurf); + outputs[ind].setValue(_outSurf); } } diff --git a/scripts/__node_3d_object/__node_3d_object.gml b/scripts/__node_3d_object/__node_3d_object.gml index 329e06aad..41fb9b5c3 100644 --- a/scripts/__node_3d_object/__node_3d_object.gml +++ b/scripts/__node_3d_object/__node_3d_object.gml @@ -8,20 +8,20 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr preview_channel = 0; apply_anchor = false; - inputs[| 0] = nodeValue_Vector("Position", self, [ 0, 0, 0 ], { linkable: false }); + inputs[0] = nodeValue_Vector("Position", self, [ 0, 0, 0 ], { linkable: false }); - inputs[| 1] = nodeValue_Quaternion("Rotation", self, [ 0, 0, 0, 1 ]); + inputs[1] = nodeValue_Quaternion("Rotation", self, [ 0, 0, 0, 1 ]); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 1, 1, 1 ]); + inputs[2] = nodeValue_Vector("Scale", self, [ 1, 1, 1 ]); - inputs[| 3] = nodeValue_Vector("Anchor", self, [ 0, 0, 0 ], { + inputs[3] = nodeValue_Vector("Anchor", self, [ 0, 0, 0 ], { linkable: false, side_button : button(function() { apply_anchor = !apply_anchor; triggerRender(); }) .setIcon(THEME.icon_3d_anchor, [ function() /*=>*/ {return apply_anchor} ], c_white) .setTooltip("Apply Position") }); - in_d3d = ds_list_size(inputs); + in_d3d = array_length(inputs); #macro __d3d_input_list_transform ["Transform", false], 0, 3, 1, 2 @@ -70,7 +70,7 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr static drawGizmoPosition = function(index, object, _vpos, active, params, _mx, _my, _snx, _sny, _panel) { #region #region ---- main ---- - var _pos = inputs[| index].getValue(,,, true); + var _pos = inputs[index].getValue(,,, true); var _qrot = object == noone? new BBMOD_Quaternion() : object.transform.rotation; var _qinv = new BBMOD_Quaternion().FromAxisAngle(new BBMOD_Vec3(1, 0, 0), 90); @@ -230,7 +230,7 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr for( var i = 0; i < 3; i++ ) val[i] += prj.getIndex(i) * _dist; - if(inputs[| index].setValue(value_snap(val, _snx))) + if(inputs[index].setValue(value_snap(val, _snx))) UNDO_HOLDING = true; } } else { @@ -251,7 +251,7 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr for( var i = 0; i < 3; i++ ) val[i] += _diff.getIndex(i); - if(inputs[| index].setValue(value_snap(val, _snx))) + if(inputs[index].setValue(value_snap(val, _snx))) UNDO_HOLDING = true; } } @@ -282,14 +282,14 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr static drawGizmoRotation = function(index, object, _vpos, active, params, _mx, _my, _snx, _sny, _panel) { #region #region ---- main ---- - var _rot = inputs[| index].getValue(); + var _rot = inputs[index].getValue(); var _qrot = object == noone? new BBMOD_Quaternion() : object.transform.rotation; var _qinv = new BBMOD_Quaternion().FromAxisAngle(new BBMOD_Vec3(1, 0, 0), 90); var _camera = params.camera; var _qview = new BBMOD_Quaternion().FromEuler(_camera.focus_angle_y, -_camera.focus_angle_x, 0); - var _ang = inputs[| index].display_data.angle_display; + var _ang = inputs[index].display_data.angle_display; var _global = _ang == QUARTERNION_DISPLAY.quarterion? tool_attribute.context : 1; var _hover = noone; @@ -371,7 +371,7 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr var _val = _currR.Mul(drag_val); var _Nrot = _ang == QUARTERNION_DISPLAY.quarterion? _val.ToArray() : _val.ToEuler(true); - if(inputs[| index].setValue(_Nrot)) + if(inputs[index].setValue(_Nrot)) UNDO_HOLDING = true; } @@ -394,7 +394,7 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr static drawGizmoScale = function(index, object, _vpos, active, params, _mx, _my, _snx, _sny, _panel) { #region tool_attribute.context = 0; #region ---- main ---- - var _sca = inputs[| index].getValue(,,, true); + var _sca = inputs[index].getValue(,,, true); var _qrot = object == noone? new BBMOD_Quaternion() : object.transform.rotation; var _qinv = new BBMOD_Quaternion().FromAxisAngle(new BBMOD_Vec3(1, 0, 0), 90); @@ -534,7 +534,7 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr drag_val[drag_axis] += _dist; - if(inputs[| index].setValue(value_snap(drag_val, _snx))) + if(inputs[index].setValue(value_snap(drag_val, _snx))) UNDO_HOLDING = true; } } else { @@ -555,7 +555,7 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr for( var i = 0; i < 3; i++ ) drag_val[i] += _diff.getIndex(i); - if(inputs[| index].setValue(value_snap(drag_val, _snx))) + if(inputs[index].setValue(value_snap(drag_val, _snx))) UNDO_HOLDING = true; } } @@ -584,7 +584,7 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr } #endregion static drawOverlay3D = function(active, params, _mx, _my, _snx, _sny, _panel) { - var _rot = inputs[| 1].display_data.angle_display; + var _rot = inputs[1].display_data.angle_display; tools = _rot == QUARTERNION_DISPLAY.quarterion? tool_quate : tool_euler; if(_rot == QUARTERNION_DISPLAY.euler && isUsingTool("Rotate")) PANEL_PREVIEW.tool_current = noone; @@ -593,7 +593,7 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr if(array_empty(object)) return; object = object[0]; - var _pos = inputs[| 0].getValue(,,, true); + var _pos = inputs[0].getValue(,,, true); var _vpos = new __vec3( _pos[0], _pos[1], _pos[2] ); if(isUsingTool("Transform")) drawGizmoPosition(0, object, _vpos, active, params, _mx, _my, _snx, _sny, _panel); diff --git a/scripts/__node_3d_plane/__node_3d_plane.gml b/scripts/__node_3d_plane/__node_3d_plane.gml index 14db058b3..fa8f37559 100644 --- a/scripts/__node_3d_plane/__node_3d_plane.gml +++ b/scripts/__node_3d_plane/__node_3d_plane.gml @@ -2,37 +2,37 @@ function __Node_3D_Plane(_x, _y, _group = noone) : Node_Processor(_x, _y, _group name = "3D Plane"; batch_output = false; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) + inputs[1] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[| 2] = nodeValue_Vector("Object rotation", self, [ 0, 0, 0 ]); + inputs[2] = nodeValue_Vector("Object rotation", self, [ 0, 0, 0 ]); - inputs[| 3] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); + inputs[3] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); - inputs[| 4] = nodeValue_Enum_Scroll("Output dimension", self, OUTPUT_SCALING.same_as_input, [ "Same as input", "Constant", "Relative to input" ]) + inputs[4] = nodeValue_Enum_Scroll("Output dimension", self, OUTPUT_SCALING.same_as_input, [ "Same as input", "Constant", "Relative to input" ]) .rejectArray(); - inputs[| 5] = nodeValue_Vector("Constant dimension", self, DEF_SURF); + inputs[5] = nodeValue_Vector("Constant dimension", self, DEF_SURF); - inputs[| 6] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]); + inputs[6] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]); - inputs[| 7] = nodeValue_Vector("Object scale", self, [ 1, 1, 1 ]); + inputs[7] = nodeValue_Vector("Object scale", self, [ 1, 1, 1 ]); - inputs[| 8] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + inputs[8] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); - inputs[| 9] = nodeValue_Float("Field of view", self, 60) + inputs[9] = nodeValue_Float("Field of view", self, 60) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); - inputs[| 10] = nodeValue_Vector("Texture scale", self, [ 1, 1 ]); + inputs[10] = nodeValue_Vector("Texture scale", self, [ 1, 1 ]); - inputs[| 11] = nodeValue_Vector("Texture shift", self, [ 0, 0 ]); + inputs[11] = nodeValue_Vector("Texture shift", self, [ 0, 0 ]); - inputs[| 12] = nodeValue_Int("Subdiviion", self, 1) + inputs[12] = nodeValue_Int("Subdiviion", self, 1) - inputs[| 13] = nodeValue_Enum_Button("Normal axis", self, 2, [ "X", "Y", "Z" ]); + inputs[13] = nodeValue_Enum_Button("Normal axis", self, 2, [ "X", "Y", "Z" ]); input_display_list = [0, ["Geometry", true], 13, 12, @@ -42,11 +42,11 @@ function __Node_3D_Plane(_x, _y, _group = noone) : Node_Processor(_x, _y, _group ["Texture", false], 10, 11, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("3D scene", self, VALUE_TYPE.d3object, function() { return submit_vertex(); }); + outputs[1] = nodeValue_Output("3D scene", self, VALUE_TYPE.d3object, function() { return submit_vertex(); }); - outputs[| 2] = nodeValue_Output("3D vertex", self, VALUE_TYPE.d3vertex, []); + outputs[2] = nodeValue_Output("3D vertex", self, VALUE_TYPE.d3vertex, []); output_display_list = [ 0, 1, 2 @@ -110,9 +110,9 @@ function __Node_3D_Plane(_x, _y, _group = noone) : Node_Processor(_x, _y, _group static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { PROCESSOR_OVERLAY_CHECK - if(inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) + if(inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; - var _out = outputs[| 0].getValue(); + var _out = outputs[0].getValue(); if(!is_surface(_out) || !surface_exists(_out)) return; _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny); @@ -144,17 +144,17 @@ function __Node_3D_Plane(_x, _y, _group = noone) : Node_Processor(_x, _y, _group switch(_out_type) { case OUTPUT_SCALING.same_as_input : - inputs[| 5].setVisible(false); + inputs[5].setVisible(false); _ww = surface_get_width_safe(_data[0]); _hh = surface_get_height_safe(_data[0]); break; case OUTPUT_SCALING.constant : - inputs[| 5].setVisible(true); + inputs[5].setVisible(true); _ww = _out[0]; _hh = _out[1]; break; case OUTPUT_SCALING.relative : - inputs[| 5].setVisible(true); + inputs[5].setVisible(true); _ww = surface_get_width_safe(_data[0]) * _out[0]; _hh = surface_get_height_safe(_data[0]) * _out[1]; break; @@ -185,7 +185,7 @@ function __Node_3D_Plane(_x, _y, _group = noone) : Node_Processor(_x, _y, _group generate_vb(); } - inputs[| 9].setVisible(_proj); + inputs[9].setVisible(_proj); surface_set_target(_outSurf); DRAW_CLEAR diff --git a/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml b/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml index c51a907ea..b212009ee 100644 --- a/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml +++ b/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml @@ -2,45 +2,45 @@ function __Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) name = "3D Cone"; batch_output = false; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) + inputs[1] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[| 2] = nodeValue_Vector("Render rotation", self, [ 0, 0, 0 ]); + inputs[2] = nodeValue_Vector("Render rotation", self, [ 0, 0, 0 ]); - inputs[| 3] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); + inputs[3] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); - inputs[| 4] = nodeValue_Vector("Object scale", self, [ 1, 1, 1 ]); + inputs[4] = nodeValue_Vector("Object scale", self, [ 1, 1, 1 ]); - inputs[| 5] = nodeValue_Rotation("Light direction", self, 0); + inputs[5] = nodeValue_Rotation("Light direction", self, 0); - inputs[| 6] = nodeValue_Float("Light height", self, 0.5) + inputs[6] = nodeValue_Float("Light height", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[| 7] = nodeValue_Float("Light intensity", self, 1) + inputs[7] = nodeValue_Float("Light intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 8] = nodeValue_Color("Light color", self, c_white); - inputs[| 9] = nodeValue_Color("Ambient color", self, c_grey); + inputs[8] = nodeValue_Color("Light color", self, c_white); + inputs[9] = nodeValue_Color("Ambient color", self, c_grey); - inputs[| 10] = nodeValue_Vector("Object rotation", self, [ 0, 0, 0 ]); + inputs[10] = nodeValue_Vector("Object rotation", self, [ 0, 0, 0 ]); - inputs[| 11] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]); + inputs[11] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]); - inputs[| 12] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + inputs[12] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); - inputs[| 13] = nodeValue_Float("Field of view", self, 60) + inputs[13] = nodeValue_Float("Field of view", self, 60) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); - inputs[| 14] = nodeValue_Int("Sides", self, 16); + inputs[14] = nodeValue_Int("Sides", self, 16); - inputs[| 15] = nodeValue_Surface("Textures base", self); + inputs[15] = nodeValue_Surface("Textures base", self); - inputs[| 16] = nodeValue_Surface("Textures side", self); + inputs[16] = nodeValue_Surface("Textures side", self); - inputs[| 17] = nodeValue_Bool("Scale view with dimension", self, true) + inputs[17] = nodeValue_Bool("Scale view with dimension", self, true) input_display_list = [ ["Output", false], 0, 17, @@ -51,13 +51,13 @@ function __Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ["Light", false], 5, 6, 7, 8, 9, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("3D scene", self, VALUE_TYPE.d3object, function() { return submit_vertex(); }); + outputs[1] = nodeValue_Output("3D scene", self, VALUE_TYPE.d3object, function() { return submit_vertex(); }); - outputs[| 2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); + outputs[2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); - outputs[| 3] = nodeValue_Output("3D vertex", self, VALUE_TYPE.d3vertex, []); + outputs[3] = nodeValue_Output("3D vertex", self, VALUE_TYPE.d3vertex, []); output_display_list = [ 0, 2, 1, 3 @@ -170,7 +170,7 @@ function __Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var _fov = _data[13]; var _dimS = _data[17]; - inputs[| 13].setVisible(_proj); + inputs[13].setVisible(_proj); var pass = "diff"; switch(_output_index) { diff --git a/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml b/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml index 17bd6c0e8..925beefeb 100644 --- a/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml +++ b/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml @@ -3,51 +3,51 @@ function __Node_3D_Cube(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) batch_output = false; dimension_index = 1; - inputs[| 0] = nodeValue_Surface("Main texture", self); + inputs[0] = nodeValue_Surface("Main texture", self); - inputs[| 1] = nodeValue_Dimension(self); + inputs[1] = nodeValue_Dimension(self); - inputs[| 2] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) + inputs[2] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[| 3] = nodeValue_Vector("Render rotation", self, [ 0, 0, 0 ]); + inputs[3] = nodeValue_Vector("Render rotation", self, [ 0, 0, 0 ]); - inputs[| 4] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); + inputs[4] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); - inputs[| 5] = nodeValue_Bool("Textures per face", self, false); + inputs[5] = nodeValue_Bool("Textures per face", self, false); - inputs[| 6] = nodeValue_Surface("Textures 0", self).setVisible(false); - inputs[| 7] = nodeValue_Surface("Textures 1", self).setVisible(false); - inputs[| 8] = nodeValue_Surface("Textures 2", self).setVisible(false); - inputs[| 9] = nodeValue_Surface("Textures 3", self).setVisible(false); - inputs[| 10] = nodeValue_Surface("Textures 4", self).setVisible(false); - inputs[| 11] = nodeValue_Surface("Textures 5", self).setVisible(false); + inputs[ 6] = nodeValue_Surface("Textures 0", self).setVisible(false); + inputs[ 7] = nodeValue_Surface("Textures 1", self).setVisible(false); + inputs[ 8] = nodeValue_Surface("Textures 2", self).setVisible(false); + inputs[ 9] = nodeValue_Surface("Textures 3", self).setVisible(false); + inputs[10] = nodeValue_Surface("Textures 4", self).setVisible(false); + inputs[11] = nodeValue_Surface("Textures 5", self).setVisible(false); - inputs[| 12] = nodeValue_Vector("Object scale", self, [ 1, 1, 1 ]); + inputs[12] = nodeValue_Vector("Object scale", self, [ 1, 1, 1 ]); - inputs[| 13] = nodeValue_Rotation("Light direction", self, 0); + inputs[13] = nodeValue_Rotation("Light direction", self, 0); - inputs[| 14] = nodeValue_Float("Light height", self, 0.5) + inputs[14] = nodeValue_Float("Light height", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[| 15] = nodeValue_Float("Light intensity", self, 1) + inputs[15] = nodeValue_Float("Light intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 16] = nodeValue_Color("Light color", self, c_white); + inputs[16] = nodeValue_Color("Light color", self, c_white); - inputs[| 17] = nodeValue_Color("Ambient color", self, c_grey); + inputs[17] = nodeValue_Color("Ambient color", self, c_grey); - inputs[| 18] = nodeValue_Vector("Object rotation", self, [ 0, 0, 0 ]); + inputs[18] = nodeValue_Vector("Object rotation", self, [ 0, 0, 0 ]); - inputs[| 19] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]); + inputs[19] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]); - inputs[| 20] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + inputs[20] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); - inputs[| 21] = nodeValue_Float("Field of view", self, 60) + inputs[21] = nodeValue_Float("Field of view", self, 60) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); - inputs[| 22] = nodeValue_Bool("Scale view with dimension", self, true) + inputs[22] = nodeValue_Bool("Scale view with dimension", self, true) input_display_list = [ ["Output", false], 1, 22, @@ -57,13 +57,13 @@ function __Node_3D_Cube(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ["Light", false], 13, 14, 15, 16, 17, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("3D scene", self, VALUE_TYPE.d3object, function(index) { return submit_vertex(index); }); + outputs[1] = nodeValue_Output("3D scene", self, VALUE_TYPE.d3object, function(index) { return submit_vertex(index); }); - outputs[| 2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); + outputs[2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); - outputs[| 3] = nodeValue_Output("3D vertex", self, VALUE_TYPE.d3vertex, []); + outputs[3] = nodeValue_Output("3D vertex", self, VALUE_TYPE.d3vertex, []); output_display_list = [ 0, 2, 1, 3 @@ -122,10 +122,10 @@ function __Node_3D_Cube(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var _fov = _data[21]; var _dimS = _data[22]; - inputs[| 21].setVisible(_proj); + inputs[21].setVisible(_proj); - for(var i = 6; i <= 11; i++) inputs[| i].setVisible(true, _usetex); - inputs[| 0].setVisible(true, !_usetex); + for(var i = 6; i <= 11; i++) inputs[i].setVisible(true, _usetex); + inputs[0].setVisible(true, !_usetex); var pass = "diff"; switch(_output_index) { diff --git a/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml b/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml index 4800975d8..501f185b9 100644 --- a/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml +++ b/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml @@ -3,50 +3,50 @@ function __Node_3D_Cylinder(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr batch_output = false; dimension_index = 2; - inputs[| 0] = nodeValue_Int("Sides", self, 16); + inputs[0] = nodeValue_Int("Sides", self, 16); - inputs[| 1] = nodeValue_Float("Thickness", self, 0.2); + inputs[1] = nodeValue_Float("Thickness", self, 0.2); - inputs[| 2] = nodeValue_Dimension(self); + inputs[2] = nodeValue_Dimension(self); - inputs[| 3] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) + inputs[3] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[| 4] = nodeValue_Vector("Render rotation", self, [ 0, 0, 0 ]); + inputs[4] = nodeValue_Vector("Render rotation", self, [ 0, 0, 0 ]); - inputs[| 5] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); + inputs[5] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); - inputs[| 6] = nodeValue_Surface("Textures top", self); - inputs[| 7] = nodeValue_Surface("Textures bottom", self); - inputs[| 8] = nodeValue_Surface("Textures side", self); + inputs[6] = nodeValue_Surface("Textures top", self); + inputs[7] = nodeValue_Surface("Textures bottom", self); + inputs[8] = nodeValue_Surface("Textures side", self); - inputs[| 9] = nodeValue_Vector("Object scale", self, [ 1, 1, 1 ]); + inputs[9] = nodeValue_Vector("Object scale", self, [ 1, 1, 1 ]); - inputs[| 10] = nodeValue_Rotation("Light direction", self, 0); + inputs[10] = nodeValue_Rotation("Light direction", self, 0); - inputs[| 11] = nodeValue_Float("Light height", self, 0.5) + inputs[11] = nodeValue_Float("Light height", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[| 12] = nodeValue_Float("Light intensity", self, 1) + inputs[12] = nodeValue_Float("Light intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 13] = nodeValue_Color("Light color", self, c_white); - inputs[| 14] = nodeValue_Color("Ambient color", self, c_grey); + inputs[13] = nodeValue_Color("Light color", self, c_white); + inputs[14] = nodeValue_Color("Ambient color", self, c_grey); - inputs[| 15] = nodeValue_Vector("Object rotation", self, [ 0, 0, 0 ]); + inputs[15] = nodeValue_Vector("Object rotation", self, [ 0, 0, 0 ]); - inputs[| 16] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]); + inputs[16] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]); - inputs[| 17] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + inputs[17] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); - inputs[| 18] = nodeValue_Float("Field of view", self, 60) + inputs[18] = nodeValue_Float("Field of view", self, 60) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); - inputs[| 19] = nodeValue_Float("Taper", self, 1) + inputs[19] = nodeValue_Float("Taper", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 20] = nodeValue_Bool("Scale view with dimension", self, true) + inputs[20] = nodeValue_Bool("Scale view with dimension", self, true) input_display_list = [ ["Output", false], 2, 20, @@ -57,13 +57,13 @@ function __Node_3D_Cylinder(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr ["Light", false], 10, 11, 12, 13, 14, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("3D scene", self, VALUE_TYPE.d3object, function() { return submit_vertex(); }); + outputs[1] = nodeValue_Output("3D scene", self, VALUE_TYPE.d3object, function() { return submit_vertex(); }); - outputs[| 2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); + outputs[2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); - outputs[| 3] = nodeValue_Output("3D vertex", self, VALUE_TYPE.d3vertex, []); + outputs[3] = nodeValue_Output("3D vertex", self, VALUE_TYPE.d3vertex, []); output_display_list = [ 0, 2, 1, 3 @@ -196,7 +196,7 @@ function __Node_3D_Cylinder(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr var _fov = _data[18]; var _dimS = _data[20]; - inputs[| 18].setVisible(_proj); + inputs[18].setVisible(_proj); var pass = "diff"; switch(_output_index) { diff --git a/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml b/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml index 1c62615dc..6d89b6006 100644 --- a/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml +++ b/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml @@ -3,44 +3,44 @@ function __Node_3D_Sphere(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou batch_output = false; dimension_index = 1; - inputs[| 0] = nodeValue_Vector("Subdivisions", self, [8, 4]) + inputs[0] = nodeValue_Vector("Subdivisions", self, [8, 4]) .setTooltip("Amount of polygon in X and Y axis."); - inputs[| 1] = nodeValue_Dimension(self); + inputs[1] = nodeValue_Dimension(self); - inputs[| 2] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) + inputs[2] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[| 3] = nodeValue_Vector("Render rotation", self, [ 0, 0, 0 ]); + inputs[3] = nodeValue_Vector("Render rotation", self, [ 0, 0, 0 ]); - inputs[| 4] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); + inputs[4] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); - inputs[| 5] = nodeValue_Surface("Textures", self); + inputs[5] = nodeValue_Surface("Textures", self); - inputs[| 6] = nodeValue_Vector("Object scale", self, [ 1, 1, 1 ]); + inputs[6] = nodeValue_Vector("Object scale", self, [ 1, 1, 1 ]); - inputs[| 7] = nodeValue_Rotation("Light direction", self, 0); + inputs[7] = nodeValue_Rotation("Light direction", self, 0); - inputs[| 8] = nodeValue_Float("Light height", self, 0.5) + inputs[8] = nodeValue_Float("Light height", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[| 9] = nodeValue_Float("Light intensity", self, 1) + inputs[9] = nodeValue_Float("Light intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 10] = nodeValue_Color("Light color", self, c_white); - inputs[| 11] = nodeValue_Color("Ambient color", self, c_grey); + inputs[10] = nodeValue_Color("Light color", self, c_white); + inputs[11] = nodeValue_Color("Ambient color", self, c_grey); - inputs[| 12] = nodeValue_Vector("Object rotation", self, [ 0, 0, 0 ]); + inputs[12] = nodeValue_Vector("Object rotation", self, [ 0, 0, 0 ]); - inputs[| 13] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]); + inputs[13] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]); - inputs[| 14] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + inputs[14] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); - inputs[| 15] = nodeValue_Float("Field of view", self, 60) + inputs[15] = nodeValue_Float("Field of view", self, 60) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); - inputs[| 16] = nodeValue_Bool("Scale view with dimension", self, true) + inputs[16] = nodeValue_Bool("Scale view with dimension", self, true) input_display_list = [ ["Output", false], 1, 16, @@ -51,13 +51,13 @@ function __Node_3D_Sphere(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou ["Light", false], 7, 8, 9, 10, 11, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("3D scene", self, VALUE_TYPE.d3object, function() { return submit_vertex(); }); + outputs[1] = nodeValue_Output("3D scene", self, VALUE_TYPE.d3object, function() { return submit_vertex(); }); - outputs[| 2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); + outputs[2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); - outputs[| 3] = nodeValue_Output("3D vertex", self, VALUE_TYPE.d3vertex, []); + outputs[3] = nodeValue_Output("3D vertex", self, VALUE_TYPE.d3vertex, []); output_display_list = [ 0, 2, 1, 3 ] @@ -182,7 +182,7 @@ function __Node_3D_Sphere(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou var _fov = _data[15]; var _dimS = _data[16]; - inputs[| 15].setVisible(_proj); + inputs[15].setVisible(_proj); var pass = "diff"; switch(_output_index) { diff --git a/scripts/__node_3d_render/__node_3d_render.gml b/scripts/__node_3d_render/__node_3d_render.gml index c9bdea687..450cc5244 100644 --- a/scripts/__node_3d_render/__node_3d_render.gml +++ b/scripts/__node_3d_render/__node_3d_render.gml @@ -1,41 +1,41 @@ //function Node_3D_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { // name = "3D Render"; -// inputs[| 2] = nodeValue_Dimension(self); +// inputs[2] = nodeValue_Dimension(self); -// inputs[| 3] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) +// inputs[3] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) // .setUnitRef( function() { return getInputData(2); }, VALUE_UNIT.reference); -// inputs[| 4] = nodeValue_Vector("Render rotation", self, [ 0, 0, 0 ]); +// inputs[4] = nodeValue_Vector("Render rotation", self, [ 0, 0, 0 ]); -// inputs[| 5] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); +// inputs[5] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); -// inputs[| 6] = nodeValue_Float("Light direction", self, 0) +// inputs[6] = nodeValue_Float("Light direction", self, 0) // .setDisplay(VALUE_DISPLAY.rotation) // .rejectArray(); -// inputs[| 7] = nodeValue_Float("Light height", self, 0.5) +// inputs[7] = nodeValue_Float("Light height", self, 0.5) // .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }) // .rejectArray(); -// inputs[| 8] = nodeValue_Float("Light intensity", self, 1) +// inputs[8] = nodeValue_Float("Light intensity", self, 1) // .setDisplay(VALUE_DISPLAY.slider) // .rejectArray(); -// inputs[| 9] = nodeValue_Color("Light color", self, c_white) +// inputs[9] = nodeValue_Color("Light color", self, c_white) // .rejectArray(); -// inputs[| 10] = nodeValue_Color("Ambient color", self, c_grey) +// inputs[10] = nodeValue_Color("Ambient color", self, c_grey) // .rejectArray(); -// inputs[| 15] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) +// inputs[15] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) // .rejectArray(); -// inputs[| 16] = nodeValue_Float("Field of view", self, 60) +// inputs[16] = nodeValue_Float("Field of view", self, 60) // .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }) // .rejectArray(); -// inputs[| 17] = nodeValue_Bool("Scale view with dimension", self, true) +// inputs[17] = nodeValue_Bool("Scale view with dimension", self, true) // input_display_list = [ // ["Output", false], 2, 17, @@ -45,14 +45,14 @@ // ["Light", false], 6, 7, 8, 9, 10, // ["Textures", true], 12, // ]; -// input_length = ds_list_size(inputs); +// input_length = array_length(inputs); // input_display_len = array_length(input_display_list); -// outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); +// outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); -// outputs[| 1] = nodeValue_Output("3D scene", self, VALUE_TYPE.d3object, function() { return submit_vertex(); }); +// outputs[1] = nodeValue_Output("3D scene", self, VALUE_TYPE.d3object, function() { return submit_vertex(); }); -// outputs[| 2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); +// outputs[2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); // output_display_list = [ // 0, 2, 1 @@ -75,14 +75,14 @@ // } // function setPath(path) { -// inputs[| 0].setValue(path); +// inputs[0].setValue(path); // updateObj(); // } // function createMaterial(m_index) { -// var index = ds_list_size(inputs); -// inputs[| index] = nodeValue_Surface(materialNames[m_index] + " texture", self, tex_surface); -// inputs[| index].setVisible(true); +// var index = array_length(inputs); +// inputs[index] = nodeValue_Surface(materialNames[m_index] + " texture", self, tex_surface); +// inputs[index].setVisible(true); // input_display_list[input_display_len + m_index] = index; @@ -95,13 +95,13 @@ // var sol = Node_create_Image_path(x - (w + 64), matY + m_index * (128 + 32), mat.diff_path); // sol.name = mat.name + " texture"; -// inputs[| index].setFrom(sol.outputs[| 0]); +// inputs[index].setFrom(sol.outputs[0]); // } else { // var sol = nodeBuild("Node_Solid", x - (w + 64), matY + m_index * (128 + 32)); // sol.name = mat.name + " texture"; -// sol.inputs[| 1].setValue(mat.diff); +// sol.inputs[1].setValue(mat.diff); -// inputs[| index].setFrom(sol.outputs[| 0]); +// inputs[index].setFrom(sol.outputs[0]); // } // } @@ -171,8 +171,8 @@ // if(do_reset_material) { // array_resize(input_display_list, input_display_len); -// while(ds_list_size(inputs) > input_length) -// ds_list_delete(inputs, input_length); +// while(array_length(inputs) > input_length) +// array_delete(inputs, input_length, 1); // for(var i = 0; i < array_length(materialNames); i++) // createMaterial(i); @@ -198,11 +198,11 @@ // var _fov = getInputData(16); // var _dimS = getInputData(17); -// inputs[| 16].setVisible(_proj == 1); +// inputs[16].setVisible(_proj == 1); // for( var i = 0, n = array_length(output_display_list) - 1; i < n; i++ ) { // var ind = output_display_list[i]; -// var _outSurf = outputs[| ind].getValue(); +// var _outSurf = outputs[ind].getValue(); // var pass = "diff"; // switch(ind) { @@ -226,7 +226,7 @@ // } // _3d_post_setup(); -// outputs[| ind].setValue(_outSurf); +// outputs[ind].setValue(_outSurf); // } // } diff --git a/scripts/__node_3d_repeat/__node_3d_repeat.gml b/scripts/__node_3d_repeat/__node_3d_repeat.gml index fb659e7cf..43a3f099a 100644 --- a/scripts/__node_3d_repeat/__node_3d_repeat.gml +++ b/scripts/__node_3d_repeat/__node_3d_repeat.gml @@ -1,58 +1,58 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "3D Repeat"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]); + inputs[1] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]); - inputs[| 2] = nodeValue_Vector("Object rotation", self, [ 0, 0, 0 ]); + inputs[2] = nodeValue_Vector("Object rotation", self, [ 0, 0, 0 ]); - inputs[| 3] = nodeValue_Vector("Object scale", self, [ 1, 1, 1 ]); + inputs[3] = nodeValue_Vector("Object scale", self, [ 1, 1, 1 ]); - inputs[| 4] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) + inputs[4] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) .setUnitRef( function() { return getInputData(0); }, VALUE_UNIT.reference); - inputs[| 5] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); + inputs[5] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); - inputs[| 6] = nodeValue_Rotation("Light direction", self, 0); + inputs[6] = nodeValue_Rotation("Light direction", self, 0); - inputs[| 7] = nodeValue_Float("Light height", self, 0.5) + inputs[7] = nodeValue_Float("Light height", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[| 8] = nodeValue_Float("Light intensity", self, 1) + inputs[8] = nodeValue_Float("Light intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 9] = nodeValue_Color("Light color", self, c_white); + inputs[9] = nodeValue_Color("Light color", self, c_white); - inputs[| 10] = nodeValue_Color("Ambient color", self, c_grey); + inputs[10] = nodeValue_Color("Ambient color", self, c_grey); - inputs[| 11] = nodeValue("3D object", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3object, noone) + inputs[11] = nodeValue("3D object", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3object, noone) .setVisible(true, true); - inputs[| 12] = nodeValue_Int("Repeat", self, 1, "Amount of copies to be generated."); + inputs[12] = nodeValue_Int("Repeat", self, 1, "Amount of copies to be generated."); - inputs[| 13] = nodeValue_Vector("Repeat position", self, [ 1, 0, 0 ]); + inputs[13] = nodeValue_Vector("Repeat position", self, [ 1, 0, 0 ]); - inputs[| 14] = nodeValue_Vector("Repeat rotation", self, [ 0, 0, 0 ]); + inputs[14] = nodeValue_Vector("Repeat rotation", self, [ 0, 0, 0 ]); - inputs[| 15] = nodeValue_Vector("Repeat scale", self, [ 1, 1, 1 ]); + inputs[15] = nodeValue_Vector("Repeat scale", self, [ 1, 1, 1 ]); - inputs[| 16] = nodeValue_Enum_Button("Repeat pattern", self, 0, [ "Linear", "Circular" ]) + inputs[16] = nodeValue_Enum_Button("Repeat pattern", self, 0, [ "Linear", "Circular" ]) .rejectArray(); - inputs[| 17] = nodeValue_Enum_Button("Axis", self, 0, [ "x", "y", "z" ]); + inputs[17] = nodeValue_Enum_Button("Axis", self, 0, [ "x", "y", "z" ]); - inputs[| 18] = nodeValue_Float("Radius", self, 1); + inputs[18] = nodeValue_Float("Radius", self, 1); - inputs[| 19] = nodeValue_Rotation_Range("Rotation", self, [ 0, 360 ]); + inputs[19] = nodeValue_Rotation_Range("Rotation", self, [ 0, 360 ]); - inputs[| 20] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + inputs[20] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); - inputs[| 21] = nodeValue_Float("Field of view", self, 60) + inputs[21] = nodeValue_Float("Field of view", self, 60) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); - inputs[| 22] = nodeValue_Bool("Scale view with dimension", self, true) + inputs[22] = nodeValue_Bool("Scale view with dimension", self, true) input_display_list = [ 11, ["Output", false], 0, 22, @@ -63,11 +63,11 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constru ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("3D objects", self, VALUE_TYPE.d3object, function() { return submit_vertex(); }); + outputs[1] = nodeValue_Output("3D objects", self, VALUE_TYPE.d3object, function() { return submit_vertex(); }); - outputs[| 2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); + outputs[2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); output_display_list = [ 0, 2, 1 @@ -140,12 +140,12 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constru var _proj = getInputData(20); var _patt = getInputData(16); - inputs[| 13].setVisible(_patt == 0); + inputs[13].setVisible(_patt == 0); - inputs[| 17].setVisible(_patt == 1); - inputs[| 18].setVisible(_patt == 1); - inputs[| 19].setVisible(_patt == 1); - inputs[| 21].setVisible(_proj); + inputs[17].setVisible(_patt == 1); + inputs[18].setVisible(_patt == 1); + inputs[19].setVisible(_patt == 1); + inputs[21].setVisible(_proj); } static update = function(frame = CURRENT_FRAME) { @@ -171,7 +171,7 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constru for( var i = 0, n = array_length(output_display_list) - 1; i < n; i++ ) { var ind = output_display_list[i]; - var _outSurf = outputs[| ind].getValue(); + var _outSurf = outputs[ind].getValue(); var pass = "diff"; switch(ind) { @@ -187,7 +187,7 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constru submit_vertex(); _3d_post_setup(); - outputs[| ind].setValue(_outSurf); + outputs[ind].setValue(_outSurf); } } } \ No newline at end of file diff --git a/scripts/__node_3d_transform/__node_3d_transform.gml b/scripts/__node_3d_transform/__node_3d_transform.gml index 31cdd471e..0b9f0c2b6 100644 --- a/scripts/__node_3d_transform/__node_3d_transform.gml +++ b/scripts/__node_3d_transform/__node_3d_transform.gml @@ -2,41 +2,41 @@ function __Node_3D_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _g name = "3D Transform"; batch_output = false; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]); + inputs[1] = nodeValue_Vector("Object position", self, [ 0, 0, 0 ]); - inputs[| 2] = nodeValue_Vector("Object rotation", self, [ 0, 0, 0 ]); + inputs[2] = nodeValue_Vector("Object rotation", self, [ 0, 0, 0 ]); - inputs[| 3] = nodeValue_Vector("Object scale", self, [ 1, 1, 1 ]); + inputs[3] = nodeValue_Vector("Object scale", self, [ 1, 1, 1 ]); - inputs[| 4] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) + inputs[4] = nodeValue_Vector("Render position", self, [ 0.5, 0.5 ]) .setUnitRef( function() { return getInputData(2); }, VALUE_UNIT.reference); - inputs[| 5] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); + inputs[5] = nodeValue_Vector("Render scale", self, [ 1, 1 ]); - inputs[| 6] = nodeValue_Rotation("Light direction", self, 0); + inputs[6] = nodeValue_Rotation("Light direction", self, 0); - inputs[| 7] = nodeValue_Float("Light height", self, 0.5) + inputs[7] = nodeValue_Float("Light height", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[| 8] = nodeValue_Float("Light intensity", self, 1) + inputs[8] = nodeValue_Float("Light intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 9] = nodeValue_Color("Light color", self, c_white); + inputs[9] = nodeValue_Color("Light color", self, c_white); - inputs[| 10] = nodeValue_Color("Ambient color", self, c_grey); + inputs[10] = nodeValue_Color("Ambient color", self, c_grey); - inputs[| 11] = nodeValue("3D object", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3object, noone) + inputs[11] = nodeValue("3D object", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3object, noone) .setVisible(true, true); - inputs[| 12] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + inputs[12] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); - inputs[| 13] = nodeValue_Float("Field of view", self, 60) + inputs[13] = nodeValue_Float("Field of view", self, 60) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); - inputs[| 14] = nodeValue_Bool("Scale view with dimension", self, true) + inputs[14] = nodeValue_Bool("Scale view with dimension", self, true) input_display_list = [ 11, ["Output", false], 0, 14, @@ -45,11 +45,11 @@ function __Node_3D_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _g ["Light", true], 6, 7, 8, 9, 10, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("3D scene", self, VALUE_TYPE.d3object, function() { return submit_vertex(); }); + outputs[1] = nodeValue_Output("3D scene", self, VALUE_TYPE.d3object, function() { return submit_vertex(); }); - outputs[| 2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); + outputs[2] = nodeValue_Output("Normal pass", self, VALUE_TYPE.surface, noone); output_display_list = [ 0, 2, 1 @@ -82,7 +82,7 @@ function __Node_3D_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _g static step = function() { var _proj = getInputData(12); - inputs[| 13].setVisible(_proj); + inputs[13].setVisible(_proj); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/__node_VFX_effector/__node_VFX_effector.gml b/scripts/__node_VFX_effector/__node_VFX_effector.gml index c11b73521..a4931c275 100644 --- a/scripts/__node_VFX_effector/__node_VFX_effector.gml +++ b/scripts/__node_VFX_effector/__node_VFX_effector.gml @@ -20,47 +20,47 @@ function Node_VFX_effector(_x, _y, _group = noone) : Node(_x, _y, _group) constr setDimension(96, 48); seed = 1; - inputs[| 0] = nodeValue_Particle("Particles", self, -1 ) + inputs[0] = nodeValue_Particle("Particles", self, -1 ) .setVisible(true, true); - inputs[| 1] = nodeValue_Area("Area", self, DEF_AREA) + inputs[1] = nodeValue_Area("Area", self, DEF_AREA) .rejectArray(); - inputs[| 2] = nodeValue("Falloff", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01 ) + inputs[2] = nodeValue("Falloff", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01 ) .rejectArray(); - inputs[| 3] = nodeValue_Float("Falloff distance", self, 4 ) + inputs[3] = nodeValue_Float("Falloff distance", self, 4 ) .rejectArray(); - inputs[| 4] = nodeValue_Vector("Effect Vector", self, [ -1, 0 ] ) + inputs[4] = nodeValue_Vector("Effect Vector", self, [ -1, 0 ] ) .rejectArray(); - inputs[| 5] = nodeValue_Float("Strength", self, 1 ) + inputs[5] = nodeValue_Float("Strength", self, 1 ) .rejectArray(); - inputs[| 6] = nodeValue_Rotation_Range("Rotate particle", self, [ 0, 0 ] ) + inputs[6] = nodeValue_Rotation_Range("Rotate particle", self, [ 0, 0 ] ) .rejectArray(); - inputs[| 7] = nodeValue_Vec2_Range("Scale particle", self, [ 0, 0, 0, 0 ] , { linked : true }) + inputs[7] = nodeValue_Vec2_Range("Scale particle", self, [ 0, 0, 0, 0 ] , { linked : true }) .rejectArray(); - inputs[| 8] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }) + inputs[8] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }) .rejectArray(); - effector_input_length = ds_list_size(inputs); + effector_input_length = array_length(inputs); input_display_list = [ 0, ["Area", false], 1, 2, 3, ["Effect", false], 8, 4, 5, 6, 7, ]; - outputs[| 0] = nodeValue_Output("Particles", self, VALUE_TYPE.particle, -1 ); + outputs[0] = nodeValue_Output("Particles", self, VALUE_TYPE.particle, -1 ); UPDATE_PART_FORWARD static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); var area = getInputData(1); var cx = _x + area[0] * _s; @@ -162,7 +162,7 @@ function Node_VFX_effector(_x, _y, _group = noone) : Node(_x, _y, _group) constr static update = function(frame = CURRENT_FRAME) { #region var val = getInputData(0); - outputs[| 0].setValue(val); + outputs[0].setValue(val); if(val == -1) return; if(!is_array(val) || array_length(val) == 0) return; @@ -172,7 +172,7 @@ function Node_VFX_effector(_x, _y, _group = noone) : Node(_x, _y, _group) constr affect(val[i][j]); } - var jun = outputs[| 0]; + var jun = outputs[0]; for(var j = 0; j < array_length(jun.value_to); j++) { if(jun.value_to[j].value_from == jun) jun.value_to[j].node.doUpdate(); diff --git a/scripts/__node_custom/__node_custom.gml b/scripts/__node_custom/__node_custom.gml index 2cab23820..6bf43a21a 100644 --- a/scripts/__node_custom/__node_custom.gml +++ b/scripts/__node_custom/__node_custom.gml @@ -44,12 +44,12 @@ function Node_Custom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co shader.fs = d3d11_shader_compile_ps($"{path}/{info.shader_fs}", "main", "ps_4_0"); if(!d3d11_shader_exists(shader.fs)) noti_warning(d3d11_get_error_string()); - ds_list_clear(inputs); - ds_list_clear(outputs); + inputs = []; + outputs = []; for( var i = 0, n = array_length(info.inputs); i < n; i++ ) { var _input = info.inputs[i]; - inputs[| i] = nodeValue(_input.name, self, JUNCTION_CONNECT.input, value_type_from_string(_input.type), _input.value) + inputs[i] = nodeValue(_input.name, self, JUNCTION_CONNECT.input, value_type_from_string(_input.type), _input.value) .setVisible(_input.show_in_inspector, _input.show_in_graph); input_index_map[? _input.name] = i; @@ -62,7 +62,7 @@ function Node_Custom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co for( var i = 0, n = array_length(info.outputs); i < n; i++ ) { var _output = info.outputs[i]; - outputs[| i] = nodeValue_Output(_output.name, self, value_type_from_string(_output.type), _output.value) + outputs[i] = nodeValue_Output(_output.name, self, value_type_from_string(_output.type), _output.value) .setVisible(_output.show_in_graph); output_index_map[? _output.name] = i; diff --git a/scripts/__node_module/__node_module.gml b/scripts/__node_module/__node_module.gml index a3e080a3e..d89de1a1d 100644 --- a/scripts/__node_module/__node_module.gml +++ b/scripts/__node_module/__node_module.gml @@ -1,23 +1,23 @@ function NodeModule(parent) constructor { self.parent = parent; - inputs = ds_list_create(); + inputs = []; load_map = -1; load_scale = false; - static isLeaf = function() { #region - for( var i = 0, n = ds_list_size(inputs); i < n; i++ ) { - var _inp = inputs[| i]; + static isLeaf = function() { + for( var i = 0, n = array_length(inputs); i < n; i++ ) { + var _inp = inputs[i]; if(_inp.value_from != noone) return false; } return true; - } #endregion + } - static drawConnections = function(params = {}, _inputs = []) { #region - for(var i = 0; i < ds_list_size(inputs); i++) { - var jun = inputs[| i]; + static drawConnections = function(params = {}, _inputs = []) { + for(var i = 0; i < array_length(inputs); i++) { + var jun = inputs[i]; if(jun.value_from == noone) continue; if(!jun.value_from.node.active) continue; @@ -25,50 +25,50 @@ function NodeModule(parent) constructor { if(i >= 0) array_push(_inputs, jun); } - } #endregion + } - static isRendered = function() { #region //Check if every input is ready (updated) - for(var j = 0; j < ds_list_size(inputs); j++) - if(!inputs[| j].isRendered()) return false; + static isRendered = function() { //Check if every input is ready (updated) + for(var j = 0; j < array_length(inputs); j++) + if(!inputs[j].isRendered()) return false; return true; - } #endregion + } - static resetCache = function() { #region - for( var i = 0; i < ds_list_size(inputs); i++ ) { - if(!is_instanceof(inputs[| i], NodeValue)) continue; - inputs[| i].resetCache(); + static resetCache = function() { + for( var i = 0; i < array_length(inputs); i++ ) { + if(!is_instanceof(inputs[i], NodeValue)) continue; + inputs[i].resetCache(); } - } #endregion + } - static serialize = function(scale = false, preset = false) { #region + static serialize = function(scale = false, preset = false) { var _map = {}; var _inputs = []; - for(var i = 0; i < ds_list_size(inputs); i++) - array_push(_inputs, inputs[| i].serialize(scale, preset)); + for(var i = 0; i < array_length(inputs); i++) + array_push(_inputs, inputs[i].serialize(scale, preset)); _map.inputs = _inputs; _map.outputs = []; return _map; - } #endregion + } - static deserialize = function(_map, scale = false, preset = false) { #region + static deserialize = function(_map, scale = false, preset = false) { load_map = _map; load_scale = scale; - } #endregion + } - static applyDeserialize = function(preset = false) { #region + static applyDeserialize = function(preset = false) { var _inputs = load_map.inputs; - var amo = min(ds_list_size(inputs), array_length(_inputs)); + var amo = min(array_length(inputs), array_length(_inputs)); for(var i = 0; i < amo; i++) - inputs[| i].applyDeserialize(_inputs[i], load_scale, preset); - } #endregion + inputs[i].applyDeserialize(_inputs[i], load_scale, preset); + } - static connect = function() { #region - for(var i = 0; i < ds_list_size(inputs); i++) - inputs[| i].connect(false); - } #endregion + static connect = function() { + for(var i = 0; i < array_length(inputs); i++) + inputs[i].connect(false); + } } \ No newline at end of file diff --git a/scripts/__node_process_template/__node_process_template.gml b/scripts/__node_process_template/__node_process_template.gml index 777ef61a7..563f38c21 100644 --- a/scripts/__node_process_template/__node_process_template.gml +++ b/scripts/__node_process_template/__node_process_template.gml @@ -1,9 +1,9 @@ function Node_Process_Template(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = ""; - inputs[| 0] = nodeValue_Surface("", self); + inputs[0] = nodeValue_Surface("", self); - outputs[| 0] = nodeValue_Output("", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("", self, VALUE_TYPE.surface, noone); input_display_list = [ 0 ]; diff --git a/scripts/__node_shader/__node_shader.gml b/scripts/__node_shader/__node_shader.gml index 819120e19..031182dc2 100644 --- a/scripts/__node_shader/__node_shader.gml +++ b/scripts/__node_shader/__node_shader.gml @@ -7,7 +7,7 @@ enum SHADER_UNIFORM { function addShaderProp(_type = undefined, _key = undefined) { INLINE - var _ind = ds_list_size(inputs) - 1; + var _ind = array_length(inputs) - 1; shader_data[_ind] = _type == undefined? 0 : { type: _type, key: _key }; } @@ -16,14 +16,14 @@ function Node_Shader(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co shader = noone; shader_data = []; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); static setShader = function(_data) { #region for( var i = 0, n = array_length(shader_data); i < n; i++ ) { var _dat = shader_data[i]; if(_dat == 0) continue; - var _inp = inputs[| i]; + var _inp = inputs[i]; switch(_dat.type) { case SHADER_UNIFORM.integer : shader_set_i(_dat.key, _data[i]); break; diff --git a/scripts/__node_shader_generator/__node_shader_generator.gml b/scripts/__node_shader_generator/__node_shader_generator.gml index bb27680ee..89ffb1160 100644 --- a/scripts/__node_shader_generator/__node_shader_generator.gml +++ b/scripts/__node_shader_generator/__node_shader_generator.gml @@ -1,7 +1,7 @@ function Node_Shader_Generator(_x, _y, _group = noone) : Node_Shader(_x, _y, _group) constructor { name = ""; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); addShaderProp(SHADER_UNIFORM.float, "u_resolution"); attribute_surface_depth(); diff --git a/scripts/__node_shader_processor/__node_shader_processor.gml b/scripts/__node_shader_processor/__node_shader_processor.gml index 5bb1987a2..ae8b7d8f3 100644 --- a/scripts/__node_shader_processor/__node_shader_processor.gml +++ b/scripts/__node_shader_processor/__node_shader_processor.gml @@ -1,7 +1,7 @@ function Node_Shader_Processor(_x, _y, _group = noone) : Node_Shader(_x, _y, _group) constructor { name = ""; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); addShaderProp(); attribute_surface_depth(); diff --git a/scripts/__node_template/__node_template.gml b/scripts/__node_template/__node_template.gml index 8567847c8..18a634eab 100644 --- a/scripts/__node_template/__node_template.gml +++ b/scripts/__node_template/__node_template.gml @@ -1,9 +1,9 @@ function Node_Template(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = ""; - inputs[| 0] = nodeValue_Surface("", self); + inputs[0] = nodeValue_Surface("", self); - outputs[| 0] = nodeValue_Output("", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("", self, VALUE_TYPE.surface, noone); input_display_list = [ 0 ]; diff --git a/scripts/__node_value_processor/__node_value_processor.gml b/scripts/__node_value_processor/__node_value_processor.gml index efad2660b..603f3ca0d 100644 --- a/scripts/__node_value_processor/__node_value_processor.gml +++ b/scripts/__node_value_processor/__node_value_processor.gml @@ -7,7 +7,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct static processData = function(_output, _data, _index) { return noone; } function preProcess(_outindex) { - var _out = outputs[| _outindex].getValue(); + var _out = outputs[_outindex].getValue(); if(process_amount == 0) //render single data return processData(_out, inputs_data, _outindex); @@ -17,12 +17,12 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct else if(array_length(_out) != process_amount) array_resize(_out, process_amount); - var _data = array_create(ds_list_size(inputs)); + var _data = array_create(array_length(inputs)); for(var l = 0; l < process_amount; l++) { - for(var i = 0; i < ds_list_size(inputs); i++) { //input prepare + for(var i = 0; i < array_length(inputs); i++) { //input prepare var _in = inputs_data[i]; - if(!inputs[| i].isArray(_in)) { + if(!inputs[i].isArray(_in)) { _data[i] = inputs_data[i]; continue; } @@ -47,23 +47,23 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct static update = function() { process_amount = 0; - inputs_data = array_create(ds_list_size(inputs)); + inputs_data = array_create(array_length(inputs)); - for(var i = 0; i < ds_list_size(inputs); i++) { //pre-collect current input data - inputs_data[i] = inputs[| i].getValue(); + for(var i = 0; i < array_length(inputs); i++) { //pre-collect current input data + inputs_data[i] = inputs[i].getValue(); if(!is_array(inputs_data[i])) continue; if(array_length(inputs_data[i]) == 0) continue; - if(!inputs[| i].isArray(inputs_data[i])) continue; + if(!inputs[i].isArray(inputs_data[i])) continue; - if(typeArray(inputs[| i].display_type)) { + if(typeArray(inputs[i].display_type)) { process_amount = max(process_amount, array_length(inputs_data[i][0])); } else process_amount = max(process_amount, array_length(inputs_data[i])); } - for(var i = 0; i < ds_list_size(outputs); i++) { - outputs[| i].setValue(preProcess(i)); + for(var i = 0; i < array_length(outputs); i++) { + outputs[i].setValue(preProcess(i)); } } } \ No newline at end of file diff --git a/scripts/_node_VFX_spawner/_node_VFX_spawner.gml b/scripts/_node_VFX_spawner/_node_VFX_spawner.gml index bcb06d514..634456df6 100644 --- a/scripts/_node_VFX_spawner/_node_VFX_spawner.gml +++ b/scripts/_node_VFX_spawner/_node_VFX_spawner.gml @@ -2,123 +2,123 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co name = "Spawner"; update_on_frame = true; - inputs[| 0] = nodeValue_Surface("Particle sprite", self); + inputs[0] = nodeValue_Surface("Particle sprite", self); - inputs[| 1] = nodeValue_Int("Spawn delay", self, 4, "Frames delay between each particle spawn." ); + inputs[1] = nodeValue_Int("Spawn delay", self, 4, "Frames delay between each particle spawn." ); - inputs[| 2] = nodeValue_Range("Spawn amount", self, [ 2, 2 ] , { linked : true }) + inputs[2] = nodeValue_Range("Spawn amount", self, [ 2, 2 ] , { linked : true }) .setTooltip("Amount of particle spawn in that frame."); - inputs[| 3] = nodeValue_Area("Spawn area", self, DEF_AREA ); + inputs[3] = nodeValue_Area("Spawn area", self, DEF_AREA ); - inputs[| 4] = nodeValue_Enum_Scroll("Spawn distribution", self, 0, [ "Area", "Border", "Map" ] ); + inputs[4] = nodeValue_Enum_Scroll("Spawn distribution", self, 0, [ "Area", "Border", "Map" ] ); - inputs[| 5] = nodeValue_Range("Lifespan", self, [ 20, 30 ] ); + inputs[5] = nodeValue_Range("Lifespan", self, [ 20, 30 ] ); - inputs[| 6] = nodeValue_Rotation_Random("Spawn direction", self, [ 0, 45, 135, 0, 0 ] ); + inputs[6] = nodeValue_Rotation_Random("Spawn direction", self, [ 0, 45, 135, 0, 0 ] ); - inputs[| 7] = nodeValue_Range("Acceleration", self, [ 0, 0 ] , { linked : true }); + inputs[7] = nodeValue_Range("Acceleration", self, [ 0, 0 ] , { linked : true }); - inputs[| 8] = nodeValue_Rotation_Random("Orientation", self, [ 0, 0, 0, 0, 0 ] ); + inputs[8] = nodeValue_Rotation_Random("Orientation", self, [ 0, 0, 0, 0, 0 ] ); - inputs[| 9] = nodeValue_Range("Rotational speed", self, [ 0, 0 ] , { linked : true }); + inputs[9] = nodeValue_Range("Rotational speed", self, [ 0, 0 ] , { linked : true }); - inputs[| 10] = nodeValue_Vec2_Range("Spawn scale", self, [ 1, 1, 1, 1 ] , { linked : true }); + inputs[10] = nodeValue_Vec2_Range("Spawn scale", self, [ 1, 1, 1, 1 ] , { linked : true }); - inputs[| 11] = nodeValue("Scale over time", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 ); + inputs[11] = nodeValue("Scale over time", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 ); - inputs[| 12] = nodeValue_Gradient("Color over lifetime", self, new gradientObject(cola(c_white))); + inputs[12] = nodeValue_Gradient("Color over lifetime", self, new gradientObject(cola(c_white))); - inputs[| 13] = nodeValue_Range("Alpha", self, [ 1, 1 ], { linked : true }); + inputs[13] = nodeValue_Range("Alpha", self, [ 1, 1 ], { linked : true }); - inputs[| 14] = nodeValue("Alpha over time", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + inputs[14] = nodeValue("Alpha over time", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); - inputs[| 15] = nodeValue_Bool("Rotate by direction", self, false, "Make the particle rotates to follow its movement."); + inputs[15] = nodeValue_Bool("Rotate by direction", self, false, "Make the particle rotates to follow its movement."); - inputs[| 16] = nodeValue_Enum_Button("Spawn type", self, 0, [ "Stream", "Burst", "Trigger" ]); + inputs[16] = nodeValue_Enum_Button("Spawn type", self, 0, [ "Stream", "Burst", "Trigger" ]); - inputs[| 17] = nodeValue_Range("Spawn size", self, [ 1, 1 ] , { linked : true }); + inputs[17] = nodeValue_Range("Spawn size", self, [ 1, 1 ] , { linked : true }); - inputs[| 18] = nodeValue_Range("Spawn velocity", self, [ 1, 2 ] ); + inputs[18] = nodeValue_Range("Spawn velocity", self, [ 1, 2 ] ); - inputs[| 19] = nodeValue_Range("Gravity", self, [ 0, 0 ] , { linked : true }); + inputs[19] = nodeValue_Range("Gravity", self, [ 0, 0 ] , { linked : true }); - inputs[| 20] = nodeValue_Vector("Direction wiggle", self, [ 0, 0 ] , { label: [ "Amplitude", "Period" ], linkable: false, per_line: true }); + inputs[20] = nodeValue_Vector("Direction wiggle", self, [ 0, 0 ] , { label: [ "Amplitude", "Period" ], linkable: false, per_line: true }); - inputs[| 21] = nodeValue_Bool("Loop", self, true ); + inputs[21] = nodeValue_Bool("Loop", self, true ); - inputs[| 22] = nodeValue_Enum_Scroll("Surface array", self, 0, [ "Random", "Order", "Animation", "Scale" ]) + inputs[22] = nodeValue_Enum_Scroll("Surface array", self, 0, [ "Random", "Order", "Animation", "Scale" ]) .setTooltip("Whether to select image from an array in order, at random, or treat array as animation.") .setVisible(false); - inputs[| 23] = nodeValue_Range("Animation speed", self, [ 1, 1 ] , { linked : true }) + inputs[23] = nodeValue_Range("Animation speed", self, [ 1, 1 ] , { linked : true }) .setVisible(false); - inputs[| 24] = nodeValue_Enum_Button("Scatter", self, 1, [ "Uniform", "Random" ]); + inputs[24] = nodeValue_Enum_Button("Scatter", self, 1, [ "Uniform", "Random" ]); - inputs[| 25] = nodeValue_Int("Boundary data", self, []) + inputs[25] = nodeValue_Int("Boundary data", self, []) .setArrayDepth(1) .setVisible(false, true); - inputs[| 26] = nodeValue_Enum_Button("On animation end", self, ANIM_END_ACTION.loop, [ "Loop", "Ping pong", "Destroy" ]) + inputs[26] = nodeValue_Enum_Button("On animation end", self, ANIM_END_ACTION.loop, [ "Loop", "Ping pong", "Destroy" ]) .setVisible(false); - inputs[| 27] = nodeValue_Bool("Spawn", self, true); + inputs[27] = nodeValue_Bool("Spawn", self, true); - inputs[| 28] = nodeValue_Gradient("Random blend", self, new gradientObject(cola(c_white))); + inputs[28] = nodeValue_Gradient("Random blend", self, new gradientObject(cola(c_white))); - inputs[| 29] = nodeValue_Bool("Directed from center", self, false, "Make particle move away from the spawn center."); + inputs[29] = nodeValue_Bool("Directed from center", self, false, "Make particle move away from the spawn center."); - inputs[| 30] = nodeValue_Surface("Distribution map", self) + inputs[30] = nodeValue_Surface("Distribution map", self) - inputs[| 31] = nodeValue_Surface("Atlas", self, []) + inputs[31] = nodeValue_Surface("Atlas", self, []) .setArrayDepth(1); - inputs[| 32] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 32].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[32] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[32].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 33] = nodeValue_Rotation("Gravity direction", self, -90); + inputs[33] = nodeValue_Rotation("Gravity direction", self, -90); - inputs[| 34] = nodeValue_Range("Turning", self, [ 0, 0 ] , { linked : true }); + inputs[34] = nodeValue_Range("Turning", self, [ 0, 0 ] , { linked : true }); - inputs[| 35] = nodeValue_Bool("Turn both directions", self, false, "Apply randomized 1, -1 multiplier to the turning speed." ); + inputs[35] = nodeValue_Bool("Turn both directions", self, false, "Apply randomized 1, -1 multiplier to the turning speed." ); - inputs[| 36] = nodeValue_Float("Turn scale with speed", self, false ); + inputs[36] = nodeValue_Float("Turn scale with speed", self, false ); - inputs[| 37] = nodeValue_Bool("Collide ground", self, false ); + inputs[37] = nodeValue_Bool("Collide ground", self, false ); - inputs[| 38] = nodeValue_Float("Ground offset", self, 0 ); + inputs[38] = nodeValue_Float("Ground offset", self, 0 ); - inputs[| 39] = nodeValue_Float("Bounce amount", self, 0.5 ) + inputs[39] = nodeValue_Float("Bounce amount", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 40] = nodeValue_Float("Bounce friction", self, 0.1, "Apply horizontal friction once particle stop bouncing." ) + inputs[40] = nodeValue_Float("Bounce friction", self, 0.1, "Apply horizontal friction once particle stop bouncing." ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 41] = nodeValue_Vector("Position wiggle", self, [ 0, 0 ] , { label: [ "Amplitude", "Period" ], linkable: false, per_line: true }); + inputs[41] = nodeValue_Vector("Position wiggle", self, [ 0, 0 ] , { label: [ "Amplitude", "Period" ], linkable: false, per_line: true }); - inputs[| 42] = nodeValue_Vector("Rotation wiggle", self, [ 0, 0 ] , { label: [ "Amplitude", "Period" ], linkable: false, per_line: true }); + inputs[42] = nodeValue_Vector("Rotation wiggle", self, [ 0, 0 ] , { label: [ "Amplitude", "Period" ], linkable: false, per_line: true }); - inputs[| 43] = nodeValue_Vector("Scale wiggle", self, [ 0, 0 ] , { label: [ "Amplitude", "Period" ], linkable: false, per_line: true }); + inputs[43] = nodeValue_Vector("Scale wiggle", self, [ 0, 0 ] , { label: [ "Amplitude", "Period" ], linkable: false, per_line: true }); - inputs[| 44] = nodeValue_Trigger("Spawn", self, false ) + inputs[44] = nodeValue_Trigger("Spawn", self, false ) .setDisplay(VALUE_DISPLAY.button, { name: "Trigger" }); - inputs[| 45] = nodeValue_Bool("Follow Path", self, false ); + inputs[45] = nodeValue_Bool("Follow Path", self, false ); - inputs[| 46] = nodeValue_PathNode("Path", self, noone ); + inputs[46] = nodeValue_PathNode("Path", self, noone ); - inputs[| 47] = nodeValue("Path Deviation", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 ); + inputs[47] = nodeValue("Path Deviation", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 ); - inputs[| 48] = nodeValue_Trigger("Reset Seed", self, false ) + inputs[48] = nodeValue_Trigger("Reset Seed", self, false ) .setDisplay(VALUE_DISPLAY.button, { name: "Trigger" }) - inputs[| 49] = nodeValue_Bool("Stretch Animation", self, false ); + inputs[49] = nodeValue_Bool("Stretch Animation", self, false ); - for (var i = 2, n = ds_list_size(inputs); i < n; i++) - inputs[| i].rejectArray(); + for (var i = 2, n = array_length(inputs); i < n; i++) + inputs[i].rejectArray(); - input_len = ds_list_size(inputs); + input_len = array_length(inputs); input_display_list = [ 32, 48, ["Sprite", false], 0, 22, 23, 49, 26, @@ -396,13 +396,11 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co } #endregion static runVFX = function(_time = CURRENT_FRAME, _render = true) { #region - var _spawn_delay = inputs[| 1].getValue(_time); - var _spawn_type = inputs[| 16].getValue(_time); - var _spawn_active = inputs[| 27].getValue(_time); - var _spawn_trig = inputs[| 44].getValue(_time); - - //print($"{_time} : {_spawn_trig} | {ds_list_to_array(inputs[| 44].animator.values)}"); - + var _spawn_delay = inputs[1].getValue(_time); + var _spawn_type = inputs[16].getValue(_time); + var _spawn_active = inputs[27].getValue(_time); + var _spawn_trig = inputs[44].getValue(_time); + getInputs(_time); getSurfaceCache(); @@ -440,35 +438,35 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co var _spwTyp = getInputData(16); var _usePth = getInputData(45); - inputs[| 6].setVisible(!_dirAng); + inputs[ 6].setVisible(!_dirAng); - inputs[| 24].setVisible(_dist < 2); + inputs[24].setVisible(_dist < 2); - inputs[| 30].setVisible(_dist == 2, _dist == 2); + inputs[30].setVisible(_dist == 2, _dist == 2); - inputs[| 35].setVisible(_turn[0] != 0 && _turn[1] != 0); - inputs[| 36].setVisible(_turn[0] != 0 && _turn[1] != 0); + inputs[35].setVisible(_turn[0] != 0 && _turn[1] != 0); + inputs[36].setVisible(_turn[0] != 0 && _turn[1] != 0); - inputs[| 22].setVisible(false); - inputs[| 23].setVisible(false); - inputs[| 26].setVisible(false); - inputs[| 49].setVisible(false); + inputs[22].setVisible(false); + inputs[23].setVisible(false); + inputs[26].setVisible(false); + inputs[49].setVisible(false); - inputs[| 46].setVisible(true, _usePth); + inputs[46].setVisible(true, _usePth); - inputs[| 1].setVisible(_spwTyp < 2); - if(_spwTyp == 0) inputs[| 1].name = "Spawn delay"; - else if(_spwTyp == 1) inputs[| 1].name = "Spawn frame"; + inputs[1].setVisible(_spwTyp < 2); + if(_spwTyp == 0) inputs[1].name = "Spawn delay"; + else if(_spwTyp == 1) inputs[1].name = "Spawn frame"; - inputs[| 44].setVisible(_spwTyp == 2); + inputs[44].setVisible(_spwTyp == 2); if(is_array(_inSurf)) { - inputs[| 22].setVisible(true); + inputs[22].setVisible(true); var _type = getInputData(22); if(_type == 2) { - inputs[| 23].setVisible(true); - inputs[| 26].setVisible(true); - inputs[| 49].setVisible(true); + inputs[23].setVisible(true); + inputs[26].setVisible(true); + inputs[49].setVisible(true); } } @@ -483,7 +481,7 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co var _flag = is_instanceof(_spr, SurfaceAtlas)? 0b0001 : 0b0011; - inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, _flag); + inputs[3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, _flag); if(onDrawOverlay != -1) onDrawOverlay(active, _x, _y, _s, _mx, _my); } #endregion diff --git a/scripts/_node_smoke/_node_smoke.gml b/scripts/_node_smoke/_node_smoke.gml index d276a3bcf..9b4ffeae1 100644 --- a/scripts/_node_smoke/_node_smoke.gml +++ b/scripts/_node_smoke/_node_smoke.gml @@ -7,7 +7,7 @@ function Node_Smoke(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { if(_update) update(frame); //print($"Update {frame}: {name}"); - var outJunc = outputs[| 0]; + var outJunc = outputs[0]; for( var i = 0; i < array_length(outJunc.value_to); i++ ) { var _to = outJunc.value_to[i]; if(_to.value_from != outJunc) continue; diff --git a/scripts/_node_strand_affector/_node_strand_affector.gml b/scripts/_node_strand_affector/_node_strand_affector.gml index eb0140405..6f1389436 100644 --- a/scripts/_node_strand_affector/_node_strand_affector.gml +++ b/scripts/_node_strand_affector/_node_strand_affector.gml @@ -32,7 +32,7 @@ #macro STRAND_EFFECTOR_POST \ } \ } \ - outputs[| 0].setValue(_str); + outputs[0].setValue(_str); function _Node_Strand_Affector(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Affector"; @@ -40,23 +40,23 @@ function _Node_Strand_Affector(_x, _y, _group = noone) : Node(_x, _y, _group) co icon = THEME.strandSim; setDimension(96, 48); - inputs[| 0] = nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone) + inputs[0] = nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Enum_Scroll("Shape", self, 0, [ "Point", "Band" ]); + inputs[1] = nodeValue_Enum_Scroll("Shape", self, 0, [ "Point", "Band" ]); - inputs[| 2] = nodeValue_Vector("Position", self, [ 0, 0 ]); + inputs[2] = nodeValue_Vector("Position", self, [ 0, 0 ]); - inputs[| 3] = nodeValue_Float("Range", self, 4); + inputs[3] = nodeValue_Float("Range", self, 4); - inputs[| 4] = nodeValue_Rotation("Direction", self, 0); + inputs[4] = nodeValue_Rotation("Direction", self, 0); - inputs[| 5] = nodeValue_Float("Falloff", self, 0.2) + inputs[5] = nodeValue_Float("Falloff", self, 0.2) .setDisplay(VALUE_DISPLAY.slider); - outputs[| 0] = nodeValue_Output("Strand", self, VALUE_TYPE.strands, noone); + outputs[0] = nodeValue_Output("Strand", self, VALUE_TYPE.strands, noone); - input_fix_len = ds_list_size(inputs); + input_fix_len = array_length(inputs); input_display_list = [ 0, ["Shape", false], 1, 2, 3, 4, 5, @@ -139,14 +139,14 @@ function _Node_Strand_Affector(_x, _y, _group = noone) : Node(_x, _y, _group) co draw_line_dashed(px0, py0, px1, py1); } - active &= inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); - active &= inputs[| 4].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); - active &= inputs[| 3].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); + active &= inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + active &= inputs[4].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); + active &= inputs[3].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); } static update = function(frame = CURRENT_FRAME) { var _typ = getInputData(1); - inputs[| 4].setVisible(_typ == 1); + inputs[4].setVisible(_typ == 1); STRAND_EFFECTOR_PRE // add effect (pnt, mulp) diff --git a/scripts/argumentRenderer/argumentRenderer.gml b/scripts/argumentRenderer/argumentRenderer.gml index 0a3bcd0c5..4845b31e9 100644 --- a/scripts/argumentRenderer/argumentRenderer.gml +++ b/scripts/argumentRenderer/argumentRenderer.gml @@ -9,20 +9,20 @@ function argumentRenderer(_typeArray = []) { var hh = ui(8); var _th = TEXTBOX_HEIGHT + ui(4); - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { - var _jType = inputs[| i + 1]; + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { + var _jType = inputs[i + 1]; var _h = 0; _jType.editWidget.setFocusHover(_focus, _hover); _jType.editWidget.draw(tx, ty, ui(128), _th, _jType.display_data.data[_jType.showValue()], _m, argument_renderer.rx, argument_renderer.ry); - var _jName = inputs[| i + 0]; + var _jName = inputs[i + 0]; _jName.editWidget.setFocusHover(_focus, _hover); _jName.editWidget.draw(tx + ui(128 + 8), ty, _w - ui(128 + 8), _th, _jName.showValue(), _m, _jName.display_type); _h += _th + ui(8); - var _jValue = inputs[| i + 2]; + var _jValue = inputs[i + 2]; if(argument_renderer.showValue && _jValue.editWidget != noone) { draw_set_text(f_p1, fa_left, fa_top, COLORS._main_text_sub); draw_text_add(tx + ui(8), ty + _th + ui(8 + 6), __txt("Value")); @@ -42,11 +42,11 @@ function argumentRenderer(_typeArray = []) { }); argument_renderer.register = function(parent = noone) { - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { - inputs[| i + 1].editWidget.register(parent); - inputs[| i + 0].editWidget.register(parent); - if(inputs[| i + 2].editWidget != noone) - inputs[| i + 2].editWidget.register(parent); + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { + inputs[i + 1].editWidget.register(parent); + inputs[i + 0].editWidget.register(parent); + if(inputs[i + 2].editWidget != noone) + inputs[i + 2].editWidget.register(parent); } } diff --git a/scripts/canvas_tool_node/canvas_tool_node.gml b/scripts/canvas_tool_node/canvas_tool_node.gml index 65fee7451..0f57a3c66 100644 --- a/scripts/canvas_tool_node/canvas_tool_node.gml +++ b/scripts/canvas_tool_node/canvas_tool_node.gml @@ -63,8 +63,8 @@ function canvas_tool_node(canvas, node) : canvas_tool() constructor { setColor = true; - for( var i = 0, n = ds_list_size(nodeObject.inputs); i < n; i++ ) { - var _in = nodeObject.inputs[| i]; + for( var i = 0, n = array_length(nodeObject.inputs); i < n; i++ ) { + var _in = nodeObject.inputs[i]; if(_in.type == VALUE_TYPE.surface || _in.name == "Dimension") inputJunction = _in; @@ -75,8 +75,8 @@ function canvas_tool_node(canvas, node) : canvas_tool() constructor { } - for( var i = 0, n = ds_list_size(nodeObject.outputs); i < n; i++ ) { - var _in = nodeObject.outputs[| i]; + for( var i = 0, n = array_length(nodeObject.outputs); i < n; i++ ) { + var _in = nodeObject.outputs[i]; if(_in.type == VALUE_TYPE.surface) { outputJunction = _in; break; diff --git a/scripts/canvas_tool_resize/canvas_tool_resize.gml b/scripts/canvas_tool_resize/canvas_tool_resize.gml index 6d21b2dea..8ecef45c6 100644 --- a/scripts/canvas_tool_resize/canvas_tool_resize.gml +++ b/scripts/canvas_tool_resize/canvas_tool_resize.gml @@ -114,7 +114,7 @@ function canvas_tool_resize() : canvas_tool() constructor { surface_free(_canvas_surface); } - node.inputs[| 0].setValue([_sw, _sh]); + node.inputs[0].setValue([_sw, _sh]); } } diff --git a/scripts/console_commands/console_commands.gml b/scripts/console_commands/console_commands.gml index e0bde27ce..04c9bc753 100644 --- a/scripts/console_commands/console_commands.gml +++ b/scripts/console_commands/console_commands.gml @@ -51,8 +51,8 @@ function cmd_submit(command) { #region var glb = PROJECT.globalNode; if(glb.inputExist(key)) { - for( var i = 0; i < ds_list_size(glb.inputs); i++ ) { - var _inp = glb.inputs[| i]; + for( var i = 0; i < array_length(glb.inputs); i++ ) { + var _inp = glb.inputs[i]; if(_inp.name != key) continue; if(_inp.type == VALUE_TYPE.text || _inp.type == VALUE_TYPE.path) { diff --git a/scripts/event_recorder/event_recorder.gml b/scripts/event_recorder/event_recorder.gml index 9e2439dee..3df2b531d 100644 --- a/scripts/event_recorder/event_recorder.gml +++ b/scripts/event_recorder/event_recorder.gml @@ -122,8 +122,8 @@ function Action(_type, _object, _data, _trigger = 0) constructor { var _vt = _dl.value_to; _nd.enable(); - for (var j = 0, m = ds_list_size(_nd.outputs); j < m; j++) { - var _out = _nd.outputs[| j]; + for (var j = 0, m = array_length(_nd.outputs); j < m; j++) { + var _out = _nd.outputs[j]; var _too = _vt[j]; for (var k = 0, p = array_length(_too); k < p; k++) @@ -135,7 +135,7 @@ function Action(_type, _object, _data, _trigger = 0) constructor { for (var i = 0, n = array_length(_connectTo); i < n; i++) for (var j = 0, m = array_length(_connectTo[i]); j < m; j++) - _connectTo[i][j].setFrom(obj.outputs[| i]); + _connectTo[i][j].setFrom(obj.outputs[i]); break; diff --git a/scripts/globals/globals.gml b/scripts/globals/globals.gml index b2b5bd07a..d7ed256c7 100644 --- a/scripts/globals/globals.gml +++ b/scripts/globals/globals.gml @@ -39,7 +39,7 @@ LATEST_VERSION = 11700; VERSION = 11790; SAVE_VERSION = 11700; - VERSION_STRING = "1.17.10.001"; + VERSION_STRING = "1.17.10.002"; BUILD_NUMBER = 11790; HOTKEYS = ds_map_create(); diff --git a/scripts/globalvar_drawer/globalvar_drawer.gml b/scripts/globalvar_drawer/globalvar_drawer.gml index f3a4a76fc..5f0da1b9e 100644 --- a/scripts/globalvar_drawer/globalvar_drawer.gml +++ b/scripts/globalvar_drawer/globalvar_drawer.gml @@ -17,7 +17,7 @@ function globalvar_viewer_draw(xx, yy, ww, _m, focus, hover, _scrollPane, rx, ry if(var_editing) { var del = noone; - if(ds_list_size(_node.inputs)) { + if(array_length(_node.inputs)) { yy += ui(8); hh += ui(8); } @@ -25,7 +25,7 @@ function globalvar_viewer_draw(xx, yy, ww, _m, focus, hover, _scrollPane, rx, ry var wd_x = xx; var wd_w = ww; - var _len = ds_list_size(_node.inputs); + var _len = array_length(_node.inputs); var _ins = var_drag_insert; var_drag_insert = _len; @@ -35,7 +35,7 @@ function globalvar_viewer_draw(xx, yy, ww, _m, focus, hover, _scrollPane, rx, ry var_drag_shift = lerp_float(var_drag_shift, (var_dragging != noone) * 48, 4); for( var j = 0; j < _len; j++ ) { - var _inpu = _node.inputs[| j]; + var _inpu = _node.inputs[j]; var _edit = _inpu.editor; var _wd_x = wd_x + (var_drag_disp == j) * var_drag_shift; @@ -96,11 +96,11 @@ function globalvar_viewer_draw(xx, yy, ww, _m, focus, hover, _scrollPane, rx, ry if(var_dragging != noone) { if(var_drag_insert != var_dragging) { - var _inp = _node.inputs[| var_dragging]; - ds_list_delete(_node.inputs, var_dragging); + var _inp = _node.inputs[var_dragging]; + array_delete(_node.inputs, var_dragging, 1); if(var_drag_insert > var_dragging) var_drag_insert--; - ds_list_insert(_node.inputs, var_drag_insert, _inp); + array_insert(_node.inputs, var_drag_insert, _inp); var_dragging = var_drag_insert; var_drag_disp = var_drag_insert; @@ -111,16 +111,16 @@ function globalvar_viewer_draw(xx, yy, ww, _m, focus, hover, _scrollPane, rx, ry } if(del != noone) - ds_list_delete(_node.inputs, del); + array_delete(_node.inputs, del, 1); } else { - for( var j = 0; j < ds_list_size(_node.inputs); j++ ) { - var widg = drawWidget(xx, yy, ww, _m, _node.inputs[| j], true, focus, hover, _scrollPane, rx, ry); + for( var j = 0; j < array_length(_node.inputs); j++ ) { + var widg = drawWidget(xx, yy, ww, _m, _node.inputs[j], true, focus, hover, _scrollPane, rx, ry); var widH = widg[0]; var mbRight = widg[1]; var widHov = widg[2]; if(hover && point_in_rectangle(_m[0], _m[1], xx, yy, xx + ww, yy + widH)) - _HOVERING_ELEMENT = _node.inputs[| j]; + _HOVERING_ELEMENT = _node.inputs[j]; yy += lb_h + widH + padd; hh += lb_h + widH + padd; diff --git a/scripts/hlsl_server/hlsl_server.gml b/scripts/hlsl_server/hlsl_server.gml index 1484c0e94..c6948d0d5 100644 --- a/scripts/hlsl_server/hlsl_server.gml +++ b/scripts/hlsl_server/hlsl_server.gml @@ -71,7 +71,7 @@ function hlsl_document_parser(prompt, node = noone) { var params = []; var lines = string_split(prompt, "\n"); - for( var i = node.input_fix_len, n = ds_list_size(node.inputs); i < n; i += node.data_length ) { + for( var i = node.input_fix_len, n = array_length(node.inputs); i < n; i += node.data_length ) { var _arg_name = node.getInputData(i + 0); var _arg_type = node.getInputData(i + 1); diff --git a/scripts/mask_function/mask_function.gml b/scripts/mask_function/mask_function.gml index 2a9579e3f..0e3a464ae 100644 --- a/scripts/mask_function/mask_function.gml +++ b/scripts/mask_function/mask_function.gml @@ -1,9 +1,9 @@ function __init_mask_modifier(_mask_index) { #region - var _ind = ds_list_size(inputs); + var _ind = array_length(inputs); - inputs[| _ind + 0] = nodeValue_Bool("Invert mask", self, false); + inputs[_ind + 0] = nodeValue_Bool("Invert mask", self, false); - inputs[| _ind + 1] = nodeValue_Float("Mask feather", self, 0) + inputs[_ind + 1] = nodeValue_Float("Mask feather", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 32, 0.1] }); __mask_index = _mask_index; @@ -14,8 +14,8 @@ function __init_mask_modifier(_mask_index) { #region function __step_mask_modifier() { #region var _msk = is_surface(getSingleValue(__mask_index)); - inputs[| __mask_mod_index + 0].setVisible(_msk); - inputs[| __mask_mod_index + 1].setVisible(_msk); + inputs[__mask_mod_index + 0].setVisible(_msk); + inputs[__mask_mod_index + 1].setVisible(_msk); } #endregion function __process_mask_modifier(data) { #region diff --git a/scripts/nodd_mk_delay_machine/nodd_mk_delay_machine.gml b/scripts/nodd_mk_delay_machine/nodd_mk_delay_machine.gml index 3d541b3e0..4f91ddd9d 100644 --- a/scripts/nodd_mk_delay_machine/nodd_mk_delay_machine.gml +++ b/scripts/nodd_mk_delay_machine/nodd_mk_delay_machine.gml @@ -4,22 +4,22 @@ function Node_MK_Delay_Machine(_x, _y, _group = noone) : Node(_x, _y, _group) co is_simulation = true; - inputs[| 0] = nodeValue_Surface("Surface", self); + inputs[0] = nodeValue_Surface("Surface", self); - inputs[| 1] = nodeValue_Int("Delay Amounts", self, 4); + inputs[1] = nodeValue_Int("Delay Amounts", self, 4); - inputs[| 2] = nodeValue_Int("Delay Frames", self, 1); + inputs[2] = nodeValue_Int("Delay Frames", self, 1); - inputs[| 3] = nodeValue_Palette("Blend over Delay", self, [ c_white ]); + inputs[3] = nodeValue_Palette("Blend over Delay", self, [ c_white ]); - inputs[| 4] = nodeValue("Alpha over Delay", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + inputs[4] = nodeValue("Alpha over Delay", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); - inputs[| 5] = nodeValue_Enum_Scroll("Palette Select", self, 0, [ "Loop", "Pingpong", "Random" ]); + inputs[5] = nodeValue_Enum_Scroll("Palette Select", self, 0, [ "Loop", "Pingpong", "Random" ]); - inputs[| 6] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 6].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[6] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[6].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - outputs[| 0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone); input_display_list = [ 0, ["Delay", false], 1, 2, @@ -34,7 +34,7 @@ function Node_MK_Delay_Machine(_x, _y, _group = noone) : Node(_x, _y, _group) co static step = function() { var _psel = getInputData(5); - inputs[| 6].setVisible(_psel == 2); + inputs[6].setVisible(_psel == 2); } static update = function() { @@ -53,7 +53,7 @@ function Node_MK_Delay_Machine(_x, _y, _group = noone) : Node(_x, _y, _group) co var _sw = surface_get_width_safe(_surf); var _sh = surface_get_height_safe(_surf); - var _outSurf = outputs[| 0].getValue(); + var _outSurf = outputs[0].getValue(); _outSurf = surface_verify(_outSurf, _sw, _sh); var cc, aa; @@ -79,6 +79,6 @@ function Node_MK_Delay_Machine(_x, _y, _group = noone) : Node(_x, _y, _group) co } surface_reset_target(); - outputs[| 0].setValue(_outSurf); + outputs[0].setValue(_outSurf); } } \ No newline at end of file diff --git a/scripts/node_2d_light/node_2d_light.gml b/scripts/node_2d_light/node_2d_light.gml index 020106f5e..8773d98f4 100644 --- a/scripts/node_2d_light/node_2d_light.gml +++ b/scripts/node_2d_light/node_2d_light.gml @@ -15,55 +15,55 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) uniform_band = shader_get_uniform(shader, "band"); uniform_attn = shader_get_uniform(shader, "atten"); - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Enum_Scroll("Light shape", self, 0, [ new scrollItem("Point", s_node_2d_light_shape, 0), + inputs[1] = nodeValue_Enum_Scroll("Light shape", self, 0, [ new scrollItem("Point", s_node_2d_light_shape, 0), new scrollItem("Line", s_node_2d_light_shape, 1), new scrollItem("Line asymmetric", s_node_2d_light_shape, 2), new scrollItem("Spot", s_node_2d_light_shape, 3), ]); - inputs[| 2] = nodeValue_Vector("Center", self, [ 16, 16 ]) + inputs[2] = nodeValue_Vector("Center", self, [ 16, 16 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 3] = nodeValue_Float("Range", self, 16); + inputs[3] = nodeValue_Float("Range", self, 16); - inputs[| 4] = nodeValue_Float("Intensity", self, 1) + inputs[4] = nodeValue_Float("Intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Color("Color", self, c_white); + inputs[5] = nodeValue_Color("Color", self, c_white); - inputs[| 6] = nodeValue_Vector("Start", self, [ 16, 16 ]); + inputs[6] = nodeValue_Vector("Start", self, [ 16, 16 ]); - inputs[| 7] = nodeValue_Vector("Finish", self, [ 32, 16 ]); + inputs[7] = nodeValue_Vector("Finish", self, [ 32, 16 ]); - inputs[| 8] = nodeValue_Int("Sweep", self, 15) + inputs[8] = nodeValue_Int("Sweep", self, 15) .setDisplay(VALUE_DISPLAY.slider, { range: [-80, 80, 0.1] }); - inputs[| 9] = nodeValue_Int("Sweep end", self, 0) + inputs[9] = nodeValue_Int("Sweep end", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-80, 80, 0.1] }); - inputs[| 10] = nodeValue_Int("Banding", self, 0) + inputs[10] = nodeValue_Int("Banding", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.1] }); - inputs[| 11] = nodeValue_Enum_Scroll("Attenuation", self, 0, + inputs[11] = nodeValue_Enum_Scroll("Attenuation", self, 0, [ new scrollItem("Quadratic", s_node_curve, 0), new scrollItem("Invert quadratic", s_node_curve, 1), new scrollItem("Linear", s_node_curve, 2), ]) .setTooltip("Control how light fade out over distance."); - inputs[| 12] = nodeValue_Int("Radial banding", self, 0) + inputs[12] = nodeValue_Int("Radial banding", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.1] }); - inputs[| 13] = nodeValue_Rotation("Radial start", self, 0); + inputs[13] = nodeValue_Rotation("Radial start", self, 0); - inputs[| 14] = nodeValue_Float("Radial band ratio", self, 0.5) + inputs[14] = nodeValue_Float("Radial band ratio", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 15] = nodeValue_Bool("Active", self, true); + inputs[15] = nodeValue_Bool("Active", self, true); active_index = 15; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Light only", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[1] = nodeValue_Output("Light only", self, VALUE_TYPE.surface, noone); input_display_list = [ 15, 0, ["Shape", false], 1, 2, 6, 7, 8, 9, @@ -85,14 +85,14 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; - var hv = inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= bool(hv); - var hv = inputs[| 3].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); _hov |= bool(hv); + var hv = inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= bool(hv); + var hv = inputs[3].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); _hov |= bool(hv); break; case LIGHT_SHAPE_2D.line : case LIGHT_SHAPE_2D.line_asym : case LIGHT_SHAPE_2D.spot : - var hv = inputs[| 6].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= bool(hv); - var hv = inputs[| 7].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= bool(hv); + var hv = inputs[6].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= bool(hv); + var hv = inputs[7].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= bool(hv); break; } @@ -104,41 +104,41 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) switch(_shape) { case LIGHT_SHAPE_2D.point : - inputs[| 2].setVisible(true); - inputs[| 3].setVisible(true); - inputs[| 6].setVisible(false); - inputs[| 7].setVisible(false); - inputs[| 8].setVisible(false); - inputs[| 9].setVisible(false); + inputs[2].setVisible(true); + inputs[3].setVisible(true); + inputs[6].setVisible(false); + inputs[7].setVisible(false); + inputs[8].setVisible(false); + inputs[9].setVisible(false); - inputs[| 12].setVisible(true); - inputs[| 13].setVisible(true); - inputs[| 14].setVisible(true); + inputs[12].setVisible(true); + inputs[13].setVisible(true); + inputs[14].setVisible(true); break; case LIGHT_SHAPE_2D.line : case LIGHT_SHAPE_2D.line_asym : - inputs[| 2].setVisible(false); - inputs[| 3].setVisible(true); - inputs[| 6].setVisible(true); - inputs[| 7].setVisible(true); - inputs[| 8].setVisible(true); - inputs[| 9].setVisible(_shape == LIGHT_SHAPE_2D.line_asym); + inputs[2].setVisible(false); + inputs[3].setVisible(true); + inputs[6].setVisible(true); + inputs[7].setVisible(true); + inputs[8].setVisible(true); + inputs[9].setVisible(_shape == LIGHT_SHAPE_2D.line_asym); - inputs[| 12].setVisible(false); - inputs[| 13].setVisible(false); - inputs[| 14].setVisible(false); + inputs[12].setVisible(false); + inputs[13].setVisible(false); + inputs[14].setVisible(false); break; case LIGHT_SHAPE_2D.spot : - inputs[| 2].setVisible(false); - inputs[| 3].setVisible(false); - inputs[| 6].setVisible(true); - inputs[| 7].setVisible(true); - inputs[| 8].setVisible(true); - inputs[| 9].setVisible(false); + inputs[2].setVisible(false); + inputs[3].setVisible(false); + inputs[6].setVisible(true); + inputs[7].setVisible(true); + inputs[8].setVisible(true); + inputs[9].setVisible(false); - inputs[| 12].setVisible(false); - inputs[| 13].setVisible(false); - inputs[| 14].setVisible(false); + inputs[12].setVisible(false); + inputs[13].setVisible(false); + inputs[14].setVisible(false); break; } diff --git a/scripts/node_3d_camera/node_3d_camera.gml b/scripts/node_3d_camera/node_3d_camera.gml index 4ce490d16..d34500f2e 100644 --- a/scripts/node_3d_camera/node_3d_camera.gml +++ b/scripts/node_3d_camera/node_3d_camera.gml @@ -18,66 +18,66 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) global.SKY_SPHERE = new __3dUVSphere(0.5, 16, 8, true); - inputs[| in_d3d + 0] = nodeValue_Int("FOV", self, 60 ) + inputs[in_d3d + 0] = nodeValue_Int("FOV", self, 60 ) .setDisplay(VALUE_DISPLAY.slider, { range: [ 10, 90, 0.1 ] }); - inputs[| in_d3d + 1] = nodeValue_Vector("Clipping Distance", self, [ 1, 10 ] ); + inputs[in_d3d + 1] = nodeValue_Vector("Clipping Distance", self, [ 1, 10 ] ); - inputs[| in_d3d + 2] = nodeValue_Dimension(self); + inputs[in_d3d + 2] = nodeValue_Dimension(self); - inputs[| in_d3d + 3] = nodeValue_Enum_Button("Projection", self, 1 , [ "Perspective", "Orthographic" ]); + inputs[in_d3d + 3] = nodeValue_Enum_Button("Projection", self, 1 , [ "Perspective", "Orthographic" ]); - inputs[| in_d3d + 4] = nodeValue_D3Scene("Scene", self, noone ) + inputs[in_d3d + 4] = nodeValue_D3Scene("Scene", self, noone ) .setVisible(true, true); - inputs[| in_d3d + 5] = nodeValue_Color("Ambient Light", self, c_dkgrey ); + inputs[in_d3d + 5] = nodeValue_Color("Ambient Light", self, c_dkgrey ); - inputs[| in_d3d + 6] = nodeValue_Bool("Show Background", self, false ); + inputs[in_d3d + 6] = nodeValue_Bool("Show Background", self, false ); - inputs[| in_d3d + 7] = nodeValue_Enum_Button("Backface Culling", self, 2 , [ "None", "CW", "CCW" ]); + inputs[in_d3d + 7] = nodeValue_Enum_Button("Backface Culling", self, 2 , [ "None", "CW", "CCW" ]); - inputs[| in_d3d + 8] = nodeValue_Float("Orthographic Scale", self, 0.5 ) + inputs[in_d3d + 8] = nodeValue_Float("Orthographic Scale", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0.01, 4, 0.01 ] }); - inputs[| in_d3d + 9] = nodeValue_Enum_Scroll("Postioning Mode", self, 2, [ "Position + Rotation", "Position + Lookat", "Lookat + Rotation" ] ); + inputs[in_d3d + 9] = nodeValue_Enum_Scroll("Postioning Mode", self, 2, [ "Position + Rotation", "Position + Lookat", "Lookat + Rotation" ] ); - inputs[| in_d3d + 10] = nodeValue_Vector("Lookat Position", self, [ 0, 0, 0 ] ); + inputs[in_d3d + 10] = nodeValue_Vector("Lookat Position", self, [ 0, 0, 0 ] ); - inputs[| in_d3d + 11] = nodeValue_Rotation("Roll", self, 0); + inputs[in_d3d + 11] = nodeValue_Rotation("Roll", self, 0); - inputs[| in_d3d + 12] = nodeValue_Rotation("Horizontal Angle", self, 45 ); + inputs[in_d3d + 12] = nodeValue_Rotation("Horizontal Angle", self, 45 ); - inputs[| in_d3d + 13] = nodeValue_Float("Vertical Angle", self, 30 ) + inputs[in_d3d + 13] = nodeValue_Float("Vertical Angle", self, 30 ) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 0.1] }); - inputs[| in_d3d + 14] = nodeValue_Float("Distance", self, 4 ); + inputs[in_d3d + 14] = nodeValue_Float("Distance", self, 4 ); - inputs[| in_d3d + 15] = nodeValue_Bool("Gamma Adjust", self, false ); + inputs[in_d3d + 15] = nodeValue_Bool("Gamma Adjust", self, false ); - inputs[| in_d3d + 16] = nodeValue_Surface("Environment Texture", self); + inputs[in_d3d + 16] = nodeValue_Surface("Environment Texture", self); - inputs[| in_d3d + 17] = nodeValue_Bool("Ambient Occlusion", self, false ); + inputs[in_d3d + 17] = nodeValue_Bool("Ambient Occlusion", self, false ); - inputs[| in_d3d + 18] = nodeValue_Float("AO Radius", self, 0.25 ); + inputs[in_d3d + 18] = nodeValue_Float("AO Radius", self, 0.25 ); - inputs[| in_d3d + 19] = nodeValue_Float("AO Bias", self, 0.05 ); + inputs[in_d3d + 19] = nodeValue_Float("AO Bias", self, 0.05 ); - inputs[| in_d3d + 20] = nodeValue_Float("AO Strength", self, 1. ) + inputs[in_d3d + 20] = nodeValue_Float("AO Strength", self, 1. ) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0.01, 4, 0.01 ] }); - inputs[| in_d3d + 21] = nodeValue_Int("Round Normal", self, 0 ) + inputs[in_d3d + 21] = nodeValue_Int("Round Normal", self, 0 ) .setWindows(); - inputs[| in_d3d + 22] = nodeValue_Enum_Button("Blend mode", self, 0 , [ "Normal", "Additive" ]); + inputs[in_d3d + 22] = nodeValue_Enum_Button("Blend mode", self, 0 , [ "Normal", "Additive" ]); - in_cam = ds_list_size(inputs); + in_cam = array_length(inputs); - outputs[| 0] = nodeValue_Output("Rendered", self, VALUE_TYPE.surface, noone ); + outputs[0] = nodeValue_Output("Rendered", self, VALUE_TYPE.surface, noone ); - outputs[| 1] = nodeValue_Output("Normal", self, VALUE_TYPE.surface, noone ) + outputs[1] = nodeValue_Output("Normal", self, VALUE_TYPE.surface, noone ) .setVisible(false); - outputs[| 2] = nodeValue_Output("Depth", self, VALUE_TYPE.surface, noone ) + outputs[2] = nodeValue_Output("Depth", self, VALUE_TYPE.surface, noone ) .setVisible(false); input_display_list = [ in_d3d + 4, @@ -104,7 +104,7 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) } static drawOverlay3D = function(active, params, _mx, _my, _snx, _sny, _panel) { - var _rot = inputs[| 1].display_data.angle_display; + var _rot = inputs[1].display_data.angle_display; tools = _rot == QUARTERNION_DISPLAY.quarterion? tool_quate : tool_euler; if(_rot == QUARTERNION_DISPLAY.euler && isUsingTool("Rotate")) PANEL_PREVIEW.tool_current = noone; @@ -113,13 +113,13 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) if(array_empty(object)) return; object = object[0]; - var _pos = inputs[| 0].getValue(,,, true); + var _pos = inputs[0].getValue(,,, true); var _vpos = new __vec3( _pos[0], _pos[1], _pos[2] ); if(isUsingTool("Transform")) drawGizmoPosition(0, object, _vpos, active, params, _mx, _my, _snx, _sny, _panel); else if(isUsingTool("Rotate")) drawGizmoRotation(1, object, _vpos, active, params, _mx, _my, _snx, _sny, _panel); else if(isUsingTool("Move Target")) { - var _lkpos = inputs[| in_d3d + 10].getValue(,,, true); + var _lkpos = inputs[in_d3d + 10].getValue(,,, true); var _lkvpos = new __vec3( _lkpos[0], _lkpos[1], _lkpos[2] ); drawGizmoPosition(in_d3d + 10, noone, _lkvpos, active, params, _mx, _my, _snx, _sny, _panel); @@ -131,7 +131,7 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) } #region draw result - var _outSurf = outputs[| 0].getValue(); + var _outSurf = outputs[0].getValue(); if(is_array(_outSurf)) _outSurf = array_safe_get_fast(_outSurf, 0); if(!is_surface(_outSurf)) return; @@ -162,20 +162,20 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) var _posm = getInputData(in_d3d + 9); var _ao = getInputData(in_d3d + 17); - inputs[| in_d3d + 0].setVisible(_proj == 0); - inputs[| in_d3d + 8].setVisible(_proj == 1); + inputs[in_d3d + 0].setVisible(_proj == 0); + inputs[in_d3d + 8].setVisible(_proj == 1); - inputs[| 0].setVisible(_posm == 0 || _posm == 1); - inputs[| 1].setVisible(_posm == 0); - inputs[| in_d3d + 10].setVisible(_posm == 1 || _posm == 2); - inputs[| in_d3d + 11].setVisible(_posm == 1); - inputs[| in_d3d + 12].setVisible(_posm == 2); - inputs[| in_d3d + 13].setVisible(_posm == 2); - inputs[| in_d3d + 14].setVisible(_posm == 2); + inputs[0].setVisible(_posm == 0 || _posm == 1); + inputs[1].setVisible(_posm == 0); + inputs[in_d3d + 10].setVisible(_posm == 1 || _posm == 2); + inputs[in_d3d + 11].setVisible(_posm == 1); + inputs[in_d3d + 12].setVisible(_posm == 2); + inputs[in_d3d + 13].setVisible(_posm == 2); + inputs[in_d3d + 14].setVisible(_posm == 2); - inputs[| in_d3d + 18].setVisible(_ao); - inputs[| in_d3d + 19].setVisible(_ao); - inputs[| in_d3d + 20].setVisible(_ao); + inputs[in_d3d + 18].setVisible(_ao); + inputs[in_d3d + 19].setVisible(_ao); + inputs[in_d3d + 20].setVisible(_ao); switch(_posm) { case 0 : @@ -304,9 +304,9 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) #endregion #region submit - var _render = outputs[| 0].getValue(); - var _normal = outputs[| 1].getValue(); - var _depth = outputs[| 2].getValue(); + var _render = outputs[0].getValue(); + var _normal = outputs[1].getValue(); + var _depth = outputs[2].getValue(); var _bgSurf = _dbg? scene.renderBackground(_dim[0], _dim[1]) : noone; _render = surface_verify(_render, _dim[0], _dim[1]); diff --git a/scripts/node_3d_camera_set/node_3d_camera_set.gml b/scripts/node_3d_camera_set/node_3d_camera_set.gml index 4ebe951e3..671c024ee 100644 --- a/scripts/node_3d_camera_set/node_3d_camera_set.gml +++ b/scripts/node_3d_camera_set/node_3d_camera_set.gml @@ -5,31 +5,31 @@ function Node_3D_Camera_Set(_x, _y, _group = noone) : Node_3D_Camera(_x, _y, _gr light_key = new __3dLightDirectional(); light_fill = new __3dLightDirectional(); - inputs[| in_cam + 0] = nodeValue_Rotation("L1 H angle", self, 30) + inputs[in_cam + 0] = nodeValue_Rotation("L1 H angle", self, 30) .setName("Horizontal angle"); - inputs[| in_cam + 1] = nodeValue_Float("L1 V angle", self, 45 ) + inputs[in_cam + 1] = nodeValue_Float("L1 V angle", self, 45 ) .setName("Vertical angle") .setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 0.1] }); - inputs[| in_cam + 2] = nodeValue_Color("L1 Color", self, c_white ) + inputs[in_cam + 2] = nodeValue_Color("L1 Color", self, c_white ) .setName("Color") - inputs[| in_cam + 3] = nodeValue_Float("L1 Intensity", self, 1 ) + inputs[in_cam + 3] = nodeValue_Float("L1 Intensity", self, 1 ) .setName("Intensity") .setDisplay(VALUE_DISPLAY.slider); - inputs[| in_cam + 4] = nodeValue_Rotation("L2 H angle", self, -45) + inputs[in_cam + 4] = nodeValue_Rotation("L2 H angle", self, -45) .setName("Horizontal angle"); - inputs[| in_cam + 5] = nodeValue_Float("L2 V angle", self, 45 ) + inputs[in_cam + 5] = nodeValue_Float("L2 V angle", self, 45 ) .setName("Vertical angle") .setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 0.1] }); - inputs[| in_cam + 6] = nodeValue_Color("L2 Color", self, c_white ) + inputs[in_cam + 6] = nodeValue_Color("L2 Color", self, c_white ) .setName("Color") - inputs[| in_cam + 7] = nodeValue_Float("L2 Intensity", self, 0.25 ) + inputs[in_cam + 7] = nodeValue_Float("L2 Intensity", self, 0.25 ) .setName("Intensity") .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_3d_depth/node_3d_depth.gml b/scripts/node_3d_depth/node_3d_depth.gml index 5bb6868dd..e29608d1f 100644 --- a/scripts/node_3d_depth/node_3d_depth.gml +++ b/scripts/node_3d_depth/node_3d_depth.gml @@ -1,13 +1,13 @@ function Node_3D_Depth(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "3D Depth"; - inputs[| 0] = nodeValue_Surface("Base Texture", self); + inputs[0] = nodeValue_Surface("Base Texture", self); - inputs[| 1] = nodeValue_Surface("Depth", self); + inputs[1] = nodeValue_Surface("Depth", self); - inputs[| 2] = nodeValue_Vector("Rotation", self, [0, 0, 0] ); + inputs[2] = nodeValue_Vector("Rotation", self, [0, 0, 0] ); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Texture", false], 0, 1, diff --git a/scripts/node_3d_instancer/node_3d_instancer.gml b/scripts/node_3d_instancer/node_3d_instancer.gml index 5fb76a9e7..d49883d23 100644 --- a/scripts/node_3d_instancer/node_3d_instancer.gml +++ b/scripts/node_3d_instancer/node_3d_instancer.gml @@ -1,9 +1,9 @@ function Node_3D_Instancer(_x, _y, _group = noone) : Node_3D_Modifier(_x, _y, _group) constructor { name = "3D Instancer"; - inputs[| in_mesh + 0] = nodeValue_Int("Amounts", self, 1); + inputs[in_mesh + 0] = nodeValue_Int("Amounts", self, 1); - inputs[| in_mesh + 1] = nodeValue_Vector("Positions", self, [ 0, 0, 0 ]) + inputs[in_mesh + 1] = nodeValue_Vector("Positions", self, [ 0, 0, 0 ]) .setArrayDepth(1); static processData = function(_output, _data, _output_index, _array_index = 0) { diff --git a/scripts/node_3d_light_directional/node_3d_light_directional.gml b/scripts/node_3d_light_directional/node_3d_light_directional.gml index 833045397..88b927eb4 100644 --- a/scripts/node_3d_light_directional/node_3d_light_directional.gml +++ b/scripts/node_3d_light_directional/node_3d_light_directional.gml @@ -3,13 +3,13 @@ function Node_3D_Light_Directional(_x, _y, _group = noone) : Node_3D_Light(_x, _ object_class = __3dLightDirectional; - inputs[| in_light + 0] = nodeValue_Bool("Cast Shadow", self, false); + inputs[in_light + 0] = nodeValue_Bool("Cast Shadow", self, false); - inputs[| in_light + 1] = nodeValue_Int("Shadow Map Size", self, 1024); + inputs[in_light + 1] = nodeValue_Int("Shadow Map Size", self, 1024); - inputs[| in_light + 2] = nodeValue_Int("Shadow Map Scale", self, 4); + inputs[in_light + 2] = nodeValue_Int("Shadow Map Scale", self, 4); - inputs[| in_light + 3] = nodeValue_Float("Shadow Bias", self, .001); + inputs[in_light + 3] = nodeValue_Float("Shadow Bias", self, .001); input_display_list = [ ["Transform", false], 0, diff --git a/scripts/node_3d_light_point/node_3d_light_point.gml b/scripts/node_3d_light_point/node_3d_light_point.gml index 56e50fa3e..d042d9080 100644 --- a/scripts/node_3d_light_point/node_3d_light_point.gml +++ b/scripts/node_3d_light_point/node_3d_light_point.gml @@ -3,15 +3,15 @@ function Node_3D_Light_Point(_x, _y, _group = noone) : Node_3D_Light(_x, _y, _gr object_class = __3dLightPoint; - inputs[| in_light + 0] = nodeValue_Float("Radius", self, 4) + inputs[in_light + 0] = nodeValue_Float("Radius", self, 4) - inputs[| in_light + 1] = nodeValue_Bool("Cast Shadow", self, false) + inputs[in_light + 1] = nodeValue_Bool("Cast Shadow", self, false) .setWindows(); - inputs[| in_light + 2] = nodeValue_Int("Shadow Map Size", self, 1024) + inputs[in_light + 2] = nodeValue_Int("Shadow Map Size", self, 1024) .setWindows(); - inputs[| in_light + 3] = nodeValue_Float("Shadow Bias", self, .001) + inputs[in_light + 3] = nodeValue_Float("Shadow Bias", self, .001) .setWindows(); input_display_list = [ diff --git a/scripts/node_3d_material/node_3d_material.gml b/scripts/node_3d_material/node_3d_material.gml index e6db024c1..f30417dbb 100644 --- a/scripts/node_3d_material/node_3d_material.gml +++ b/scripts/node_3d_material/node_3d_material.gml @@ -2,30 +2,30 @@ function Node_3D_Material(_x, _y, _group = noone) : Node_3D(_x, _y, _group) cons name = "3D Material"; solid_surf = noone; - inputs[| 0] = nodeValue_Surface("Texture", self) + inputs[0] = nodeValue_Surface("Texture", self) .setVisible(true, true); - inputs[| 1] = nodeValue_Float("Diffuse", self, 1 ) + inputs[1] = nodeValue_Float("Diffuse", self, 1 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 2] = nodeValue_Float("Specular", self, 0 ) + inputs[2] = nodeValue_Float("Specular", self, 0 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Float("Shininess", self, 1 ); + inputs[3] = nodeValue_Float("Shininess", self, 1 ); - inputs[| 4] = nodeValue_Bool("Metalic", self, false ); + inputs[4] = nodeValue_Bool("Metalic", self, false ); - inputs[| 5] = nodeValue_Surface("Normal Map", self); + inputs[5] = nodeValue_Surface("Normal Map", self); - inputs[| 6] = nodeValue_Float("Normal Strength", self, 1 ) + inputs[6] = nodeValue_Float("Normal Strength", self, 1 ) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); - inputs[| 7] = nodeValue_Float("Roughness", self, 1 ) + inputs[7] = nodeValue_Float("Roughness", self, 1 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 8] = nodeValue_Bool("Anti aliasing", self, false ); + inputs[8] = nodeValue_Bool("Anti aliasing", self, false ); - outputs[| 0] = nodeValue_Output("Material", self, VALUE_TYPE.d3Material, noone); + outputs[0] = nodeValue_Output("Material", self, VALUE_TYPE.d3Material, noone); input_display_list = [ 0, 8, ["Properties", false], 1, 2, 3, 4, 7, @@ -66,7 +66,7 @@ function Node_3D_Material(_x, _y, _group = noone) : Node_3D(_x, _y, _group) cons if(!previewable) return; var bbox = drawGetBbox(xx, yy, _s); - var _mat = outputs[| 0].getValue(); + var _mat = outputs[0].getValue(); if(_mat == noone) return; diff --git a/scripts/node_3d_mesh_cone/node_3d_mesh_cone.gml b/scripts/node_3d_mesh_cone/node_3d_mesh_cone.gml index 41578055f..2f99b9a50 100644 --- a/scripts/node_3d_mesh_cone/node_3d_mesh_cone.gml +++ b/scripts/node_3d_mesh_cone/node_3d_mesh_cone.gml @@ -3,16 +3,16 @@ function Node_3D_Mesh_Cone(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group object_class = __3dCone; - inputs[| in_mesh + 0] = nodeValue_Int("Side", self, 8 ) + inputs[in_mesh + 0] = nodeValue_Int("Side", self, 8 ) .setValidator(VV_min(3)); - inputs[| in_mesh + 1] = nodeValue_D3Material("Material Bottom", self, new __d3dMaterial()) + inputs[in_mesh + 1] = nodeValue_D3Material("Material Bottom", self, new __d3dMaterial()) .setVisible(true, true); - inputs[| in_mesh + 2] = nodeValue_D3Material("Material Side", self, new __d3dMaterial()) + inputs[in_mesh + 2] = nodeValue_D3Material("Material Side", self, new __d3dMaterial()) .setVisible(true, true); - inputs[| in_mesh + 3] = nodeValue_Bool("Smooth Side", self, false ); + inputs[in_mesh + 3] = nodeValue_Bool("Smooth Side", self, false ); input_display_list = [ __d3d_input_list_mesh, in_mesh + 0, in_mesh + 3, diff --git a/scripts/node_3d_mesh_cube/node_3d_mesh_cube.gml b/scripts/node_3d_mesh_cube/node_3d_mesh_cube.gml index fa1a02583..2fb3896a8 100644 --- a/scripts/node_3d_mesh_cube/node_3d_mesh_cube.gml +++ b/scripts/node_3d_mesh_cube/node_3d_mesh_cube.gml @@ -2,24 +2,24 @@ function Node_3D_Mesh_Cube(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group name = "3D Cube"; object_class = noone; - inputs[| in_mesh + 0] = nodeValue_Bool("Material per side", self, false ); + inputs[in_mesh + 0] = nodeValue_Bool("Material per side", self, false ); - inputs[| in_mesh + 1] = nodeValue_D3Material("Material", self, new __d3dMaterial()) + inputs[in_mesh + 1] = nodeValue_D3Material("Material", self, new __d3dMaterial()) .setVisible(true, true); - inputs[| in_mesh + 2] = nodeValue_D3Material("Material Bottom", self, new __d3dMaterial()) + inputs[in_mesh + 2] = nodeValue_D3Material("Material Bottom", self, new __d3dMaterial()) .setVisible(true, true); - inputs[| in_mesh + 3] = nodeValue_D3Material("Material Left", self, new __d3dMaterial()) + inputs[in_mesh + 3] = nodeValue_D3Material("Material Left", self, new __d3dMaterial()) .setVisible(true, true); - inputs[| in_mesh + 4] = nodeValue_D3Material("Material Right", self, new __d3dMaterial()) + inputs[in_mesh + 4] = nodeValue_D3Material("Material Right", self, new __d3dMaterial()) .setVisible(true, true); - inputs[| in_mesh + 5] = nodeValue_D3Material("Material Back", self, new __d3dMaterial()) + inputs[in_mesh + 5] = nodeValue_D3Material("Material Back", self, new __d3dMaterial()) .setVisible(true, true); - inputs[| in_mesh + 6] = nodeValue_D3Material("Material Front", self, new __d3dMaterial()) + inputs[in_mesh + 6] = nodeValue_D3Material("Material Front", self, new __d3dMaterial()) .setVisible(true, true); input_display_list = [ @@ -35,13 +35,13 @@ function Node_3D_Mesh_Cube(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group static step = function() { var _mat_side = getInputData(in_mesh + 0); - inputs[| in_mesh + 1].name = _mat_side? "Material Top" : "Material"; - inputs[| in_mesh + 1].setVisible(true, true); - inputs[| in_mesh + 2].setVisible(_mat_side, _mat_side); - inputs[| in_mesh + 3].setVisible(_mat_side, _mat_side); - inputs[| in_mesh + 4].setVisible(_mat_side, _mat_side); - inputs[| in_mesh + 5].setVisible(_mat_side, _mat_side); - inputs[| in_mesh + 6].setVisible(_mat_side, _mat_side); + inputs[in_mesh + 1].name = _mat_side? "Material Top" : "Material"; + inputs[in_mesh + 1].setVisible(true, true); + inputs[in_mesh + 2].setVisible(_mat_side, _mat_side); + inputs[in_mesh + 3].setVisible(_mat_side, _mat_side); + inputs[in_mesh + 4].setVisible(_mat_side, _mat_side); + inputs[in_mesh + 5].setVisible(_mat_side, _mat_side); + inputs[in_mesh + 6].setVisible(_mat_side, _mat_side); } static processData = function(_output, _data, _output_index, _array_index = 0) { diff --git a/scripts/node_3d_mesh_cylinder/node_3d_mesh_cylinder.gml b/scripts/node_3d_mesh_cylinder/node_3d_mesh_cylinder.gml index a345b99b7..e4cec2d56 100644 --- a/scripts/node_3d_mesh_cylinder/node_3d_mesh_cylinder.gml +++ b/scripts/node_3d_mesh_cylinder/node_3d_mesh_cylinder.gml @@ -3,21 +3,21 @@ function Node_3D_Mesh_Cylinder(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _g object_class = __3dCylinder; - inputs[| in_mesh + 0] = nodeValue_Int("Side", self, 8 ) + inputs[in_mesh + 0] = nodeValue_Int("Side", self, 8 ) .setValidator(VV_min(3)); - inputs[| in_mesh + 1] = nodeValue_D3Material("Material Top", self, new __d3dMaterial()) + inputs[in_mesh + 1] = nodeValue_D3Material("Material Top", self, new __d3dMaterial()) .setVisible(true, true); - inputs[| in_mesh + 2] = nodeValue_D3Material("Material Bottom", self, new __d3dMaterial()) + inputs[in_mesh + 2] = nodeValue_D3Material("Material Bottom", self, new __d3dMaterial()) .setVisible(true, true); - inputs[| in_mesh + 3] = nodeValue_D3Material("Material Side", self, new __d3dMaterial()) + inputs[in_mesh + 3] = nodeValue_D3Material("Material Side", self, new __d3dMaterial()) .setVisible(true, true); - inputs[| in_mesh + 4] = nodeValue_Bool("Smooth Side", self, false ); + inputs[in_mesh + 4] = nodeValue_Bool("Smooth Side", self, false ); - inputs[| in_mesh + 5] = nodeValue_Bool("End caps", self, true ); + inputs[in_mesh + 5] = nodeValue_Bool("End caps", self, true ); input_display_list = [ __d3d_input_list_mesh, in_mesh + 0, in_mesh + 4, in_mesh + 5, @@ -28,8 +28,8 @@ function Node_3D_Mesh_Cylinder(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _g static step = function() { #region var _caps = getInputData(in_mesh + 5); - inputs[| in_mesh + 1].setVisible(_caps, _caps); - inputs[| in_mesh + 2].setVisible(_caps, _caps); + inputs[in_mesh + 1].setVisible(_caps, _caps); + inputs[in_mesh + 2].setVisible(_caps, _caps); } #endregion static processData = function(_output, _data, _output_index, _array_index = 0) { #region diff --git a/scripts/node_3d_mesh_export/node_3d_mesh_export.gml b/scripts/node_3d_mesh_export/node_3d_mesh_export.gml index c9fb583ee..0794e0c3d 100644 --- a/scripts/node_3d_mesh_export/node_3d_mesh_export.gml +++ b/scripts/node_3d_mesh_export/node_3d_mesh_export.gml @@ -1,16 +1,16 @@ function Node_3D_Mesh_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Mesh Export"; - inputs[| 0] = nodeValue_D3Mesh("Mesh", self, noone) + inputs[0] = nodeValue_D3Mesh("Mesh", self, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Text("Paths", self, "") + inputs[1] = nodeValue_Text("Paths", self, "") .setDisplay(VALUE_DISPLAY.path_save, { filter: "Obj (.obj)|*.obj" }) .setVisible(true); - inputs[| 2] = nodeValue_Bool("Export Texture", self, true); + inputs[2] = nodeValue_Bool("Export Texture", self, true); - inputs[| 3] = nodeValue_Bool("Invert UV", self, false); + inputs[3] = nodeValue_Bool("Invert UV", self, false); input_display_list = [ 0, ["Export", false], 1, 2, 3, diff --git a/scripts/node_3d_mesh_extrude/node_3d_mesh_extrude.gml b/scripts/node_3d_mesh_extrude/node_3d_mesh_extrude.gml index 0e670a98c..b5029d237 100644 --- a/scripts/node_3d_mesh_extrude/node_3d_mesh_extrude.gml +++ b/scripts/node_3d_mesh_extrude/node_3d_mesh_extrude.gml @@ -3,25 +3,25 @@ function Node_3D_Mesh_Extrude(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _gr object_class = __3dSurfaceExtrude; - inputs[| in_mesh + 0] = nodeValue_D3Material("Front Surface", self, new __d3dMaterial()) + inputs[in_mesh + 0] = nodeValue_D3Material("Front Surface", self, new __d3dMaterial()) .setVisible(true, true); - inputs[| in_mesh + 1] = nodeValue_Surface("Front Height", self); + inputs[in_mesh + 1] = nodeValue_Surface("Front Height", self); - inputs[| in_mesh + 2] = nodeValue_Bool("Smooth", self, false) + inputs[in_mesh + 2] = nodeValue_Bool("Smooth", self, false) - inputs[| in_mesh + 3] = nodeValue_Bool("Always update", self, false); + inputs[in_mesh + 3] = nodeValue_Bool("Always update", self, false); - inputs[| in_mesh + 4] = nodeValue_Bool("Double Side", self, false); + inputs[in_mesh + 4] = nodeValue_Bool("Double Side", self, false); - inputs[| in_mesh + 5] = nodeValue_D3Material("Back Surface", self, new __d3dMaterial()) + inputs[in_mesh + 5] = nodeValue_D3Material("Back Surface", self, new __d3dMaterial()) .setVisible(true, true); - inputs[| in_mesh + 6] = nodeValue_Surface("Back Height", self); + inputs[in_mesh + 6] = nodeValue_Surface("Back Height", self); - inputs[| in_mesh + 7] = nodeValue_Slider_Range("Front Height Level", self, [ 0, 1 ]); + inputs[in_mesh + 7] = nodeValue_Slider_Range("Front Height Level", self, [ 0, 1 ]); - inputs[| in_mesh + 8] = nodeValue_Slider_Range("Back Height Level", self, [ 0, 1 ]); + inputs[in_mesh + 8] = nodeValue_Slider_Range("Back Height Level", self, [ 0, 1 ]); input_display_list = [ in_mesh + 3, __d3d_input_list_mesh, @@ -45,8 +45,8 @@ function Node_3D_Mesh_Extrude(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _gr static step = function() { var _double = getSingleValue(in_mesh + 4); - inputs[| in_mesh + 5].setVisible(true, _double); - inputs[| in_mesh + 6].setVisible(true, _double); + inputs[in_mesh + 5].setVisible(true, _double); + inputs[in_mesh + 6].setVisible(true, _double); } static processData = function(_output, _data, _output_index, _array_index = 0) { #region diff --git a/scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml b/scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml index 87d035a43..d20b0d208 100644 --- a/scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml +++ b/scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml @@ -25,17 +25,17 @@ function Node_3D_Mesh_Obj(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group) object = noone; object_class = __3dObject; - inputs[| in_mesh + 0] = nodeValue_Text("File Path", self, "" ) + inputs[in_mesh + 0] = nodeValue_Text("File Path", self, "" ) .setDisplay(VALUE_DISPLAY.path_load, { filter: "3d object|*.obj" }) .rejectArray(); - inputs[| in_mesh + 1] = nodeValue_Bool("Flip UV", self, true, "Flip UV axis, can be use to fix some texture mapping error.") + inputs[in_mesh + 1] = nodeValue_Bool("Flip UV", self, true, "Flip UV axis, can be use to fix some texture mapping error.") .rejectArray(); - inputs[| in_mesh + 2] = nodeValue_Float("Import Scale", self, 1) + inputs[in_mesh + 2] = nodeValue_Float("Import Scale", self, 1) .rejectArray(); - inputs[| in_mesh + 3] = nodeValue_Enum_Scroll("Axis", self, 0, [ "XYZ", "XZ-Y", "X-ZY" ]) + inputs[in_mesh + 3] = nodeValue_Enum_Scroll("Axis", self, 0, [ "XYZ", "XZ-Y", "X-ZY" ]) .rejectArray(); input_display_list = [ @@ -65,15 +65,15 @@ function Node_3D_Mesh_Obj(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group) static onInspector1Update = function() { current_path = ""; - outputs[| 0].setValue(noone); + outputs[0].setValue(noone); } - function setPath(path) { inputs[| in_mesh + 0].setValue(path); } + function setPath(path) { inputs[in_mesh + 0].setValue(path); } static createNewInput = function(index = -1) { #region - if(index == -1) index = ds_list_size(inputs); + if(index == -1) index = array_length(inputs); - inputs[| index] = nodeValue_D3Material("Material", self, new __d3dMaterial()) + inputs[index] = nodeValue_D3Material("Material", self, new __d3dMaterial()) .setVisible(true, true); } #endregion @@ -81,7 +81,7 @@ function Node_3D_Mesh_Obj(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group) var index = input_fix_len + m_index; input_display_list[input_display_len + m_index] = index; - if(index < ds_list_size(inputs)) return; + if(index < array_length(inputs)) return; createNewInput(index); @@ -89,19 +89,19 @@ function Node_3D_Mesh_Obj(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group) var matY = y - (array_length(materials) - 1) / 2 * (128 + 32); var mat = materials[m_index]; - inputs[| index].name = materialNames[m_index] + " Material"; + inputs[index].name = materialNames[m_index] + " Material"; if(file_exists_empty(mat.diff_path)) { var sol = Node_create_Image_path(x - (w + 128), matY + m_index * (128 + 32), mat.diff_path); sol.name = mat.name + " texture"; - inputs[| index].setFrom(sol.outputs[| 0]); + inputs[index].setFrom(sol.outputs[0]); } else { var sol = nodeBuild("Node_Solid", x - (w + 128), matY + m_index * (128 + 32)); sol.name = mat.name + " texture"; - sol.inputs[| 1].setValue(cola(mat.diff)); + sol.inputs[1].setValue(cola(mat.diff)); - inputs[| index].setFrom(sol.outputs[| 0]); + inputs[index].setFrom(sol.outputs[0]); } } #endregion @@ -109,8 +109,8 @@ function Node_3D_Mesh_Obj(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group) if(!file_exists_empty(_path)) return; current_path = _path; - var _scale = inputs[| in_mesh + 2].getValue(); - var _axis = inputs[| in_mesh + 3].getValue(); + var _scale = inputs[in_mesh + 2].getValue(); + var _axis = inputs[in_mesh + 3].getValue(); readObj_init(_scale, _axis); @@ -178,8 +178,8 @@ function Node_3D_Mesh_Obj(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group) array_resize(input_display_list, input_display_len); var _overflow = input_fix_len + array_length(materialNames); - while(ds_list_size(inputs) > _overflow) - ds_list_delete(inputs, _overflow); + while(array_length(inputs) > _overflow) + array_delete(inputs, _overflow, 1); for(var i = 0; i < array_length(materialNames); i++) createMaterial(i); diff --git a/scripts/node_3d_mesh_path_extrude/node_3d_mesh_path_extrude.gml b/scripts/node_3d_mesh_path_extrude/node_3d_mesh_path_extrude.gml index 130c5af60..719a02842 100644 --- a/scripts/node_3d_mesh_path_extrude/node_3d_mesh_path_extrude.gml +++ b/scripts/node_3d_mesh_path_extrude/node_3d_mesh_path_extrude.gml @@ -3,35 +3,35 @@ function Node_3D_Mesh_Path_Extrude(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y object_class = __3dPathExtrude; - inputs[| in_mesh + 0] = nodeValue_PathNode("Path", self, noone ) + inputs[in_mesh + 0] = nodeValue_PathNode("Path", self, noone ) .setVisible(true, true); - inputs[| in_mesh + 1] = nodeValue_Int("Side", self, 8 ) + inputs[in_mesh + 1] = nodeValue_Int("Side", self, 8 ) .setValidator(VV_min(2)); - inputs[| in_mesh + 2] = nodeValue_D3Material("Material Side", self, new __d3dMaterial()) + inputs[in_mesh + 2] = nodeValue_D3Material("Material Side", self, new __d3dMaterial()) .setVisible(true, true); - inputs[| in_mesh + 3] = nodeValue_D3Material("Material Cap", self, new __d3dMaterial()) + inputs[in_mesh + 3] = nodeValue_D3Material("Material Cap", self, new __d3dMaterial()) .setVisible(true, true); - inputs[| in_mesh + 4] = nodeValue_Bool("Smooth", self, false ); + inputs[in_mesh + 4] = nodeValue_Bool("Smooth", self, false ); - inputs[| in_mesh + 5] = nodeValue_Bool("End caps", self, true ); + inputs[in_mesh + 5] = nodeValue_Bool("End caps", self, true ); - inputs[| in_mesh + 6] = nodeValue_Int("Subdivision", self, 8 ) + inputs[in_mesh + 6] = nodeValue_Int("Subdivision", self, 8 ) .setValidator(VV_min(2)); - inputs[| in_mesh + 7] = nodeValue_Float("Radius", self, 0.25 ) + inputs[in_mesh + 7] = nodeValue_Float("Radius", self, 0.25 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| in_mesh + 8] = nodeValue("Radius Over Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 ); + inputs[in_mesh + 8] = nodeValue("Radius Over Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 ); - inputs[| in_mesh + 9] = nodeValue_Vector("Texture Scale", self, [ 1, 1 ] ); + inputs[in_mesh + 9] = nodeValue_Vector("Texture Scale", self, [ 1, 1 ] ); - inputs[| in_mesh + 10] = nodeValue_Bool("Loop", self, false ); + inputs[in_mesh + 10] = nodeValue_Bool("Loop", self, false ); - inputs[| in_mesh + 11] = nodeValue_Bool("Inverted", self, false ); + inputs[in_mesh + 11] = nodeValue_Bool("Inverted", self, false ); input_display_list = [ ["Path", false], in_mesh + 0, in_mesh + 10, @@ -43,7 +43,7 @@ function Node_3D_Mesh_Path_Extrude(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y static step = function() { var _caps = getInputData(in_mesh + 5); - inputs[| in_mesh + 3].setVisible(_caps, _caps); + inputs[in_mesh + 3].setVisible(_caps, _caps); } static processData = function(_output, _data, _output_index, _array_index = 0) { diff --git a/scripts/node_3d_mesh_plane/node_3d_mesh_plane.gml b/scripts/node_3d_mesh_plane/node_3d_mesh_plane.gml index d8b24b11e..5fc76e543 100644 --- a/scripts/node_3d_mesh_plane/node_3d_mesh_plane.gml +++ b/scripts/node_3d_mesh_plane/node_3d_mesh_plane.gml @@ -3,15 +3,15 @@ function Node_3D_Mesh_Plane(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _grou object_class = __3dPlane; - inputs[| in_mesh + 0] = nodeValue_D3Material("Material", self, new __d3dMaterial()) + inputs[in_mesh + 0] = nodeValue_D3Material("Material", self, new __d3dMaterial()) .setVisible(true, true); - inputs[| in_mesh + 1] = nodeValue_Enum_Button("Normal", self, 2 , [ "X", "Y", "Z" ]); + inputs[in_mesh + 1] = nodeValue_Enum_Button("Normal", self, 2 , [ "X", "Y", "Z" ]); - inputs[| in_mesh + 2] = nodeValue_Bool("Both side", self, false ) + inputs[in_mesh + 2] = nodeValue_Bool("Both side", self, false ) .rejectArray(); - inputs[| in_mesh + 3] = nodeValue_D3Material("Back Material", self, new __d3dMaterial()) + inputs[in_mesh + 3] = nodeValue_D3Material("Back Material", self, new __d3dMaterial()) input_display_list = [ __d3d_input_list_mesh, in_mesh + 1, @@ -20,9 +20,9 @@ function Node_3D_Mesh_Plane(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _grou ] static preGetInputs = function() { - var _both = inputs[| in_mesh + 2].getValue(); + var _both = inputs[in_mesh + 2].getValue(); - inputs[| in_mesh + 3].setVisible(_both, _both); + inputs[in_mesh + 3].setVisible(_both, _both); } static processData = function(_output, _data, _output_index, _array_index = 0) { #region diff --git a/scripts/node_3d_mesh_sphere_ico/node_3d_mesh_sphere_ico.gml b/scripts/node_3d_mesh_sphere_ico/node_3d_mesh_sphere_ico.gml index f146ea4fb..1078d63e8 100644 --- a/scripts/node_3d_mesh_sphere_ico/node_3d_mesh_sphere_ico.gml +++ b/scripts/node_3d_mesh_sphere_ico/node_3d_mesh_sphere_ico.gml @@ -3,13 +3,13 @@ function Node_3D_Mesh_Sphere_Ico(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, object_class = __3dICOSphere; - inputs[| in_mesh + 0] = nodeValue_Int("Subdivision", self, 1 ) + inputs[in_mesh + 0] = nodeValue_Int("Subdivision", self, 1 ) .setValidator(VV_min(0)); - inputs[| in_mesh + 1] = nodeValue_D3Material("Material", self, new __d3dMaterial()) + inputs[in_mesh + 1] = nodeValue_D3Material("Material", self, new __d3dMaterial()) .setVisible(true, true); - inputs[| in_mesh + 2] = nodeValue_Bool("Smooth Normal", self, false ); + inputs[in_mesh + 2] = nodeValue_Bool("Smooth Normal", self, false ); input_display_list = [ __d3d_input_list_mesh, in_mesh + 0, in_mesh + 2, diff --git a/scripts/node_3d_mesh_sphere_uv/node_3d_mesh_sphere_uv.gml b/scripts/node_3d_mesh_sphere_uv/node_3d_mesh_sphere_uv.gml index 90fd6574a..34e15c2e3 100644 --- a/scripts/node_3d_mesh_sphere_uv/node_3d_mesh_sphere_uv.gml +++ b/scripts/node_3d_mesh_sphere_uv/node_3d_mesh_sphere_uv.gml @@ -3,16 +3,16 @@ function Node_3D_Mesh_Sphere_UV(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _ object_class = __3dUVSphere; - inputs[| in_mesh + 0] = nodeValue_Int("Horizontal Slices", self, 8 ) + inputs[in_mesh + 0] = nodeValue_Int("Horizontal Slices", self, 8 ) .setValidator(VV_min(2)); - inputs[| in_mesh + 1] = nodeValue_Int("Vertical Slices", self, 16 ) + inputs[in_mesh + 1] = nodeValue_Int("Vertical Slices", self, 16 ) .setValidator(VV_min(3)); - inputs[| in_mesh + 2] = nodeValue_D3Material("Material", self, new __d3dMaterial()) + inputs[in_mesh + 2] = nodeValue_D3Material("Material", self, new __d3dMaterial()) .setVisible(true, true); - inputs[| in_mesh + 3] = nodeValue_Bool("Smooth Normal", self, false ); + inputs[in_mesh + 3] = nodeValue_Bool("Smooth Normal", self, false ); input_display_list = [ __d3d_input_list_mesh, in_mesh + 0, in_mesh + 1, in_mesh + 3, diff --git a/scripts/node_3d_mesh_stack_slice/node_3d_mesh_stack_slice.gml b/scripts/node_3d_mesh_stack_slice/node_3d_mesh_stack_slice.gml index 23461c60a..edd85e4c5 100644 --- a/scripts/node_3d_mesh_stack_slice/node_3d_mesh_stack_slice.gml +++ b/scripts/node_3d_mesh_stack_slice/node_3d_mesh_stack_slice.gml @@ -1,18 +1,18 @@ function Node_3D_Mesh_Stack_Slice(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Slice Stack"; - inputs[| 0] = nodeValue_D3Mesh("Mesh", self, noone) + inputs[0] = nodeValue_D3Mesh("Mesh", self, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Vector("Output Dimension", self, [ 16, 16 ]); + inputs[1] = nodeValue_Vector("Output Dimension", self, [ 16, 16 ]); - inputs[| 2] = nodeValue_Float("Scale", self, 1); + inputs[2] = nodeValue_Float("Scale", self, 1); - inputs[| 3] = nodeValue_Int("Slices", self, 4); + inputs[3] = nodeValue_Int("Slices", self, 4); - inputs[| 4] = nodeValue_Vector("BBOX Padding", self, [ 0, 0, 0 ]); + inputs[4] = nodeValue_Vector("BBOX Padding", self, [ 0, 0, 0 ]); - outputs[| 0] = nodeValue_Output("Outputs", self, VALUE_TYPE.surface, []) + outputs[0] = nodeValue_Output("Outputs", self, VALUE_TYPE.surface, []) .setArrayDepth(1); mesh_data = new Inspector_Label("", f_code); @@ -208,7 +208,7 @@ function Node_3D_Mesh_Stack_Slice(_x, _y, _group = noone) : Node(_x, _y, _group) if(_mesh == noone) return; if(!is_instanceof(_mesh, __3dObject)) return; - var _surfs = outputs[| 0].getValue(); + var _surfs = outputs[0].getValue(); _surfs = array_verify(_surfs, slicesAmo); for(var i = 0; i < slicesAmo; i++) { @@ -217,7 +217,7 @@ function Node_3D_Mesh_Stack_Slice(_x, _y, _group = noone) : Node(_x, _y, _group) } surfaces = _surfs; - outputs[| 0].setValue(_surfs); + outputs[0].setValue(_surfs); splicing = force || dimensions != params.dim || slicesAmo != params.slic; splice_progress = 0; diff --git a/scripts/node_3d_mesh_terrain/node_3d_mesh_terrain.gml b/scripts/node_3d_mesh_terrain/node_3d_mesh_terrain.gml index 017622f6f..a7a86d43e 100644 --- a/scripts/node_3d_mesh_terrain/node_3d_mesh_terrain.gml +++ b/scripts/node_3d_mesh_terrain/node_3d_mesh_terrain.gml @@ -3,21 +3,21 @@ function Node_3D_Mesh_Terrain(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _gr object_class = __3dTerrain; - inputs[| in_mesh + 0] = nodeValue_D3Material("Material", self, new __d3dMaterial()) + inputs[in_mesh + 0] = nodeValue_D3Material("Material", self, new __d3dMaterial()) .setVisible(true, true); - inputs[| in_mesh + 1] = nodeValue_Enum_Button("Input type", self, 0 , [ "Surface", "Array" ]); + inputs[in_mesh + 1] = nodeValue_Enum_Button("Input type", self, 0 , [ "Surface", "Array" ]); - inputs[| in_mesh + 2] = nodeValue_Surface("Height map", self); + inputs[in_mesh + 2] = nodeValue_Surface("Height map", self); - inputs[| in_mesh + 3] = nodeValue_Int("Subdivision", self, 4 ); + inputs[in_mesh + 3] = nodeValue_Int("Subdivision", self, 4 ); - inputs[| in_mesh + 4] = nodeValue_Float("Height array", self, [] ) + inputs[in_mesh + 4] = nodeValue_Float("Height array", self, [] ) .setArrayDepth(2); - inputs[| in_mesh + 5] = nodeValue_Bool("Smooth", self, false ); + inputs[in_mesh + 5] = nodeValue_Bool("Smooth", self, false ); - inputs[| in_mesh + 6] = nodeValue_Slider_Range("Front Height Level", self, [ 0, 1 ]); + inputs[in_mesh + 6] = nodeValue_Slider_Range("Front Height Level", self, [ 0, 1 ]); input_display_list = [ __d3d_input_list_transform, @@ -28,8 +28,8 @@ function Node_3D_Mesh_Terrain(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _gr static step = function() { #region var _inT = getInputData(in_mesh + 1); - inputs[| in_mesh + 2].setVisible(_inT == 0, _inT == 0); - inputs[| in_mesh + 4].setVisible(_inT == 1, _inT == 1); + inputs[in_mesh + 2].setVisible(_inT == 0, _inT == 0); + inputs[in_mesh + 4].setVisible(_inT == 1, _inT == 1); } #endregion static processData = function(_output, _data, _output_index, _array_index = 0) { #region diff --git a/scripts/node_3d_particle/node_3d_particle.gml b/scripts/node_3d_particle/node_3d_particle.gml index 099811cad..89a958e8f 100644 --- a/scripts/node_3d_particle/node_3d_particle.gml +++ b/scripts/node_3d_particle/node_3d_particle.gml @@ -2,7 +2,7 @@ function Node_3D_Particle(_x, _y, _group = noone) : Node_3D_Modifier(_x, _y, _gr name = "3D Particle"; update_on_frame = true; - inputs[| in_mesh + 0] = nodeValue_Int("Amounts", self, 1); + inputs[in_mesh + 0] = nodeValue_Int("Amounts", self, 1); part_pool_size = 128; parts = array_create(part_pool_size); diff --git a/scripts/node_3d_point_affector/node_3d_point_affector.gml b/scripts/node_3d_point_affector/node_3d_point_affector.gml index 01f523971..6346714e4 100644 --- a/scripts/node_3d_point_affector/node_3d_point_affector.gml +++ b/scripts/node_3d_point_affector/node_3d_point_affector.gml @@ -5,21 +5,21 @@ function Node_3D_Point_Affector(_x, _y, _group = noone) : Node_3D_Object(_x, _y, gizmo_plane = [ new __3dGizmoPlaneFalloff(,, 0.75) ]; gizmo_object = noone; - inputs[| in_d3d + 0] = nodeValue_Vector("Points", self, [ 0, 0, 0 ]) + inputs[in_d3d + 0] = nodeValue_Vector("Points", self, [ 0, 0, 0 ]) .setVisible(true, true); - inputs[| in_d3d + 1] = nodeValue_Vector("Initial value", self, [ 0, 0, 0 ]); + inputs[in_d3d + 1] = nodeValue_Vector("Initial value", self, [ 0, 0, 0 ]); - inputs[| in_d3d + 2] = nodeValue_Vector("Final value", self, [ 0, 0, 0 ]); + inputs[in_d3d + 2] = nodeValue_Vector("Final value", self, [ 0, 0, 0 ]); - inputs[| in_d3d + 3] = nodeValue_Float("Falloff distance", self, 0.5); + inputs[in_d3d + 3] = nodeValue_Float("Falloff distance", self, 0.5); - inputs[| in_d3d + 4] = nodeValue("Falloff curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + inputs[in_d3d + 4] = nodeValue("Falloff curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); - inputs[| in_d3d + 5] = nodeValue_Enum_Scroll("Shape", self, 0, [ new scrollItem("Sphere", s_node_3d_affector_shape, 0), + inputs[in_d3d + 5] = nodeValue_Enum_Scroll("Shape", self, 0, [ new scrollItem("Sphere", s_node_3d_affector_shape, 0), new scrollItem("Plane", s_node_3d_affector_shape, 1), ]); - outputs[| 0] = nodeValue_Output("Output", self, VALUE_TYPE.float, [ 0, 0, 0 ]) + outputs[0] = nodeValue_Output("Output", self, VALUE_TYPE.float, [ 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); input_display_list = [ diff --git a/scripts/node_3d_repeat/node_3d_repeat.gml b/scripts/node_3d_repeat/node_3d_repeat.gml index 063555b53..f77dd6d82 100644 --- a/scripts/node_3d_repeat/node_3d_repeat.gml +++ b/scripts/node_3d_repeat/node_3d_repeat.gml @@ -1,39 +1,39 @@ function Node_3D_Repeat(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constructor { name = "3D Repeat"; - inputs[| 0] = nodeValue_D3Mesh("Objects", self, noone) + inputs[0] = nodeValue_D3Mesh("Objects", self, noone) .setArrayDepth(1) .setVisible(true, true); - inputs[| 1] = nodeValue_Enum_Button("Object Mode", self, 0 , [ "Duplicate", "Array" ] ) + inputs[1] = nodeValue_Enum_Button("Object Mode", self, 0 , [ "Duplicate", "Array" ] ) .rejectArray(); - inputs[| 2] = nodeValue_Int("Amount", self, 1 ); + inputs[2] = nodeValue_Int("Amount", self, 1 ); - inputs[| 3] = nodeValue_Vector("Starting Position", self, [ 0, 0, 0 ] ); + inputs[3] = nodeValue_Vector("Starting Position", self, [ 0, 0, 0 ] ); - inputs[| 4] = nodeValue_Quaternion("Starting Rotation", self, [ 0, 0, 0, 1 ] ); + inputs[4] = nodeValue_Quaternion("Starting Rotation", self, [ 0, 0, 0, 1 ] ); - inputs[| 5] = nodeValue_Vector("Starting Scale", self, [ 1, 1, 1 ] ); + inputs[5] = nodeValue_Vector("Starting Scale", self, [ 1, 1, 1 ] ); - inputs[| 6] = nodeValue_Vector("Shift Position", self, [ 0, 0, 0 ] ); + inputs[6] = nodeValue_Vector("Shift Position", self, [ 0, 0, 0 ] ); - inputs[| 7] = nodeValue_Quaternion("Shift Rotation", self, [ 0, 0, 0, 1 ] ); + inputs[7] = nodeValue_Quaternion("Shift Rotation", self, [ 0, 0, 0, 1 ] ); - inputs[| 8] = nodeValue_Vector("Shift Scale", self, [ 0, 0, 0 ] ); + inputs[8] = nodeValue_Vector("Shift Scale", self, [ 0, 0, 0 ] ); - inputs[| 9] = nodeValue_Float("Positions", self, [] ) + inputs[9] = nodeValue_Float("Positions", self, [] ) .setArrayDepth(2); - inputs[| 10] = nodeValue_Float("Rotations", self, [] ) + inputs[10] = nodeValue_Float("Rotations", self, [] ) .setArrayDepth(2); - inputs[| 11] = nodeValue_Float("Scales", self, [] ) + inputs[11] = nodeValue_Float("Scales", self, [] ) .setArrayDepth(2); - inputs[| 12] = nodeValue_Bool("Use Instance", self, true ) + inputs[12] = nodeValue_Bool("Use Instance", self, true ) - outputs[| 0] = nodeValue_Output("Scene", self, VALUE_TYPE.d3Scene, noone); + outputs[0] = nodeValue_Output("Scene", self, VALUE_TYPE.d3Scene, noone); input_display_list = [ ["Objects", false], 0, 3, 4, 5, @@ -45,9 +45,9 @@ function Node_3D_Repeat(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr static step = function() { #region var _mode = getSingleValue(1); - inputs[| 0].setArrayDepth(_mode == 1); + inputs[0].setArrayDepth(_mode == 1); - inputs[| 2].setVisible(_mode == 0); + inputs[2].setVisible(_mode == 0); } #endregion static processData = function(_output, _data, _output_index, _array_index = 0) { diff --git a/scripts/node_3d_round_vertex/node_3d_round_vertex.gml b/scripts/node_3d_round_vertex/node_3d_round_vertex.gml index e2aca83cf..b89da0e0a 100644 --- a/scripts/node_3d_round_vertex/node_3d_round_vertex.gml +++ b/scripts/node_3d_round_vertex/node_3d_round_vertex.gml @@ -1,7 +1,7 @@ function Node_3D_Round_Vertex(_x, _y, _group = noone) : Node_3D_Modifier(_x, _y, _group) constructor { name = "Discretize vertex"; - inputs[| in_mesh + 0] = nodeValue_Float("Step", self, 0.1) + inputs[in_mesh + 0] = nodeValue_Float("Step", self, 0.1) static processData = function(_output, _data, _output_index, _array_index = 0) { var _obj = _data[0]; diff --git a/scripts/node_3d_scene/node_3d_scene.gml b/scripts/node_3d_scene/node_3d_scene.gml index 8a0d49d3c..c5d867df5 100644 --- a/scripts/node_3d_scene/node_3d_scene.gml +++ b/scripts/node_3d_scene/node_3d_scene.gml @@ -1,22 +1,22 @@ function Node_3D_Scene(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constructor { name = "3D Scene"; - outputs[| 0] = nodeValue_Output("Scene", self, VALUE_TYPE.d3Scene, noone); + outputs[0] = nodeValue_Output("Scene", self, VALUE_TYPE.d3Scene, noone); object_lists = []; static createNewInput = function() { - var index = ds_list_size(inputs); - inputs[| index] = nodeValue_D3Mesh("Object", self, noone) + var index = array_length(inputs); + inputs[index] = nodeValue_D3Mesh("Object", self, noone) .setVisible(true, true); - return inputs[| index]; + return inputs[index]; } setDynamicInput(1, true, VALUE_TYPE.d3Mesh); static processData = function(_output, _data, _output_index, _array_index = 0) { #region var _scene = new __3dGroup(); - for( var i = input_fix_len, n = ds_list_size(inputs); i < n; i += data_length ) { + for( var i = input_fix_len, n = array_length(inputs); i < n; i += data_length ) { var _obj = _data[i]; if(is_instanceof(_obj, __3dObject) || is_instanceof(_obj, __3dGroup)) _scene.addObject(_obj); diff --git a/scripts/node_3d_set_material/node_3d_set_material.gml b/scripts/node_3d_set_material/node_3d_set_material.gml index 68f95df61..d6e45effa 100644 --- a/scripts/node_3d_set_material/node_3d_set_material.gml +++ b/scripts/node_3d_set_material/node_3d_set_material.gml @@ -1,15 +1,15 @@ function Node_3D_Set_Material(_x, _y, _group = noone) : Node_3D_Modifier(_x, _y, _group) constructor { name = "Set Material"; - inputs[| in_mesh + 0] = nodeValue_D3Material("Materials", self, new __d3dMaterial()) + inputs[in_mesh + 0] = nodeValue_D3Material("Materials", self, new __d3dMaterial()) .setVisible(true, true) .setArrayDepth(1); - inputs[| in_mesh + 1] = nodeValue_Bool("Single material", self, true) + inputs[in_mesh + 1] = nodeValue_Bool("Single material", self, true) static preGetInputs = function() { #region - var _sing = inputs[| in_mesh + 1].getValue(); - inputs[| in_mesh + 0].setArrayDepth(_sing? 0 : 1); + var _sing = inputs[in_mesh + 1].getValue(); + inputs[in_mesh + 0].setArrayDepth(_sing? 0 : 1); } #endregion static processData = function(_output, _data, _output_index, _array_index = 0) { #region diff --git a/scripts/node_3d_transform/node_3d_transform.gml b/scripts/node_3d_transform/node_3d_transform.gml index 81a48df3e..9e7ecddc4 100644 --- a/scripts/node_3d_transform/node_3d_transform.gml +++ b/scripts/node_3d_transform/node_3d_transform.gml @@ -1,10 +1,10 @@ function Node_3D_Transform(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) constructor { name = "Transform"; - inputs[| in_d3d + 0] = nodeValue_D3Mesh("Mesh", self, noone) + inputs[in_d3d + 0] = nodeValue_D3Mesh("Mesh", self, noone) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Mesh", self, VALUE_TYPE.d3Mesh, noone); + outputs[0] = nodeValue_Output("Mesh", self, VALUE_TYPE.d3Mesh, noone); input_display_list = [ in_d3d + 0, ["Transform", false], 0, 1, 2, diff --git a/scripts/node_3d_transform_image/node_3d_transform_image.gml b/scripts/node_3d_transform_image/node_3d_transform_image.gml index 3b33fd6c6..5828c2bdd 100644 --- a/scripts/node_3d_transform_image/node_3d_transform_image.gml +++ b/scripts/node_3d_transform_image/node_3d_transform_image.gml @@ -19,7 +19,7 @@ function Node_3D_Transform_Image(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, projMat = matrix_build_projection_ortho(1, 1, 0.001, 10); - inputs[| in_mesh + 0] = nodeValue_Surface("Surface", self) + inputs[in_mesh + 0] = nodeValue_Surface("Surface", self) .setVisible(true, true); input_display_list = [ @@ -27,14 +27,14 @@ function Node_3D_Transform_Image(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, __d3d_input_list_transform, ] - outputs[| 0].setVisible(false); - outputs[| 1] = nodeValue_Output("Rendered", self, VALUE_TYPE.surface, noone); + outputs[0].setVisible(false); + outputs[1] = nodeValue_Output("Rendered", self, VALUE_TYPE.surface, noone); output_display_list = [ 1 ] static onDrawOverlay3D = function(active, params, _mx, _my, _snx, _sny, _panel) { #region draw result - var _outSurf = outputs[| 1].getValue(); + var _outSurf = outputs[1].getValue(); if(is_array(_outSurf)) _outSurf = array_safe_get_fast(_outSurf, preview_index); if(!is_surface(_outSurf)) return; @@ -103,7 +103,7 @@ function Node_3D_Transform_Image(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, static onDrawNode = function(xx, yy, _mx, _my, _s, _hover = false, _focus = false) { #region if(!previewable) return; - var _surf = outputs[| 1].getValue(); + var _surf = outputs[1].getValue(); if(is_array(_surf)) _surf = array_safe_get_fast(_surf, preview_index); if(!is_surface(_surf)) return; diff --git a/scripts/node_3d_transform_scene/node_3d_transform_scene.gml b/scripts/node_3d_transform_scene/node_3d_transform_scene.gml index 2423d33f0..87db32f92 100644 --- a/scripts/node_3d_transform_scene/node_3d_transform_scene.gml +++ b/scripts/node_3d_transform_scene/node_3d_transform_scene.gml @@ -1,25 +1,25 @@ function Node_3D_Transform_Scene(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constructor { name = "Transform Scene"; - inputs[| 0] = nodeValue_D3Scene("Scene", self, noone) + inputs[0] = nodeValue_D3Scene("Scene", self, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Float("Position", self, []) + inputs[1] = nodeValue_Float("Position", self, []) .setArrayDepth(2); - inputs[| 2] = nodeValue_Float("Rotation", self, []) + inputs[2] = nodeValue_Float("Rotation", self, []) .setArrayDepth(2); - inputs[| 3] = nodeValue_Float("Scale", self, []) + inputs[3] = nodeValue_Float("Scale", self, []) .setArrayDepth(2); - inputs[| 4] = nodeValue_Enum_Scroll("Positioning type", self, 0, [ "Additive", "Override" ]); + inputs[4] = nodeValue_Enum_Scroll("Positioning type", self, 0, [ "Additive", "Override" ]); - inputs[| 5] = nodeValue_Enum_Scroll("Rotating type", self, 0, [ "Additive", "Override" ]); + inputs[5] = nodeValue_Enum_Scroll("Rotating type", self, 0, [ "Additive", "Override" ]); - inputs[| 6] = nodeValue_Enum_Scroll("Scaling type", self, 0, [ "Additive", "Multiplicative", "Override" ]); + inputs[6] = nodeValue_Enum_Scroll("Scaling type", self, 0, [ "Additive", "Multiplicative", "Override" ]); - outputs[| 0] = nodeValue_Output("Scene", self, VALUE_TYPE.d3Scene, noone); + outputs[0] = nodeValue_Output("Scene", self, VALUE_TYPE.d3Scene, noone); input_display_list = [ 0, ["Transform", false], 1, 2, 3, @@ -80,7 +80,7 @@ function Node_3D_Transform_Scene(_x, _y, _group = noone) : Node_3D(_x, _y, _grou } #endregion static getPreviewObject = function() { #region - var _obj = outputs[| 0].getValue(); + var _obj = outputs[0].getValue(); if(is_array(_obj)) _obj = array_safe_get_fast(_obj, preview_index, noone); return _obj; diff --git a/scripts/node_3d_uv_remap/node_3d_uv_remap.gml b/scripts/node_3d_uv_remap/node_3d_uv_remap.gml index 0dd9901bf..760d12505 100644 --- a/scripts/node_3d_uv_remap/node_3d_uv_remap.gml +++ b/scripts/node_3d_uv_remap/node_3d_uv_remap.gml @@ -2,16 +2,16 @@ function Node_3D_UV_Remap(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _grou name = "UV Remap"; gizmo = new __3dGizmoPlane(); - inputs[| in_d3d + 0] = nodeValue_D3Mesh("Mesh", self, noone) + inputs[in_d3d + 0] = nodeValue_D3Mesh("Mesh", self, noone) .setVisible(true, true); - inputs[| in_d3d + 1] = nodeValue_Int("Target subobject", self, -1) + inputs[in_d3d + 1] = nodeValue_Int("Target subobject", self, -1) .setArrayDepth(1); - inputs[| in_d3d + 2] = nodeValue_Int("Bake UV", self, 0) + inputs[in_d3d + 2] = nodeValue_Int("Bake UV", self, 0) .setDisplay(VALUE_DISPLAY.button, { name: "Bake", onClick: function() { attributes.bakedUV = !attributes.bakedUV; triggerRender(); } }); - outputs[| 0] = nodeValue_Output("Mesh", self, VALUE_TYPE.d3Mesh, noone); + outputs[0] = nodeValue_Output("Mesh", self, VALUE_TYPE.d3Mesh, noone); input_display_list = [ ["Transform", false], 0, 1, 2, @@ -31,7 +31,7 @@ function Node_3D_UV_Remap(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _grou modify_object_index = 0; static step = function() { #region - inputs[| in_d3d + 2].editWidget.text = attributes.bakedUV? "Unbake" : "Bake"; + inputs[in_d3d + 2].editWidget.text = attributes.bakedUV? "Unbake" : "Bake"; } #endregion static modify_object = function(_object, _data, _matrix) { #region diff --git a/scripts/node_3dsurf/node_3dsurf.gml b/scripts/node_3dsurf/node_3dsurf.gml index 4280c3c49..03304452d 100644 --- a/scripts/node_3dsurf/node_3dsurf.gml +++ b/scripts/node_3dsurf/node_3dsurf.gml @@ -3,17 +3,17 @@ function Node_3DSurf(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co cached_object = []; object_class = dynaSurf_3d; - inputs[| 0] = nodeValue_D3Scene("Scene", self, noone) + inputs[0] = nodeValue_D3Scene("Scene", self, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Vector("Base Dimension", self, DEF_SURF); + inputs[1] = nodeValue_Vector("Base Dimension", self, DEF_SURF); - inputs[| 2] = nodeValue_Float("Vertical Angle", self, 45 ) + inputs[2] = nodeValue_Float("Vertical Angle", self, 45 ) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 0.1] }); - inputs[| 3] = nodeValue_Float("Distance", self, 4 ); + inputs[3] = nodeValue_Float("Distance", self, 4 ); - outputs[| 0] = nodeValue_Output("3DSurf", self, VALUE_TYPE.dynaSurface, noone); + outputs[0] = nodeValue_Output("3DSurf", self, VALUE_TYPE.dynaSurface, noone); input_display_list = [ 0, ["Camera", false], 1, 2, 3, diff --git a/scripts/node_9slice/node_9slice.gml b/scripts/node_9slice/node_9slice.gml index df1277f8c..26c7edac4 100644 --- a/scripts/node_9slice/node_9slice.gml +++ b/scripts/node_9slice/node_9slice.gml @@ -1,16 +1,16 @@ function Node_9Slice(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Nine Slice"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Dimension(self); + inputs[1] = nodeValue_Dimension(self); - inputs[| 2] = nodeValue_Padding("Splice", self, [ 0, 0, 0, 0 ]) + inputs[2] = nodeValue_Padding("Splice", self, [ 0, 0, 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 3] = nodeValue_Enum_Scroll("Filling modes", self, 0, [ "Scale", "Repeat" ]); + inputs[3] = nodeValue_Enum_Scroll("Filling modes", self, 0, [ "Scale", "Repeat" ]); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); attribute_interpolation(); @@ -27,7 +27,7 @@ function Node_9Slice(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co if(is_array(s)) s = s[0]; if(!is_surface(s)) return; - inputs[| 1].setValue( [ surface_get_width_safe(s), surface_get_height_safe(s) ] ); + inputs[1].setValue( [ surface_get_width_safe(s), surface_get_height_safe(s) ] ); } static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { @@ -63,7 +63,7 @@ function Node_9Slice(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co else vv = drag_sv - (_my - drag_my) / _s; _splice[drag_side] = vv; - if(inputs[| 2].setValue(_splice)) + if(inputs[2].setValue(_splice)) UNDO_HOLDING = true; if(mouse_release(mb_left)) { @@ -72,7 +72,7 @@ function Node_9Slice(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co } } - if(inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) + if(inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) return; if(distance_to_line_infinite(_mx, _my, sp_r, -hh, sp_r, hh) < 12) { diff --git a/scripts/node_FFT/node_FFT.gml b/scripts/node_FFT/node_FFT.gml index bf8bac2bf..e509834c5 100644 --- a/scripts/node_FFT/node_FFT.gml +++ b/scripts/node_FFT/node_FFT.gml @@ -2,13 +2,13 @@ function Node_FFT(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const name = "FFT"; setDimension(96, 72); - inputs[| 0] = nodeValue_Float("Data", self, []) + inputs[0] = nodeValue_Float("Data", self, []) .setArrayDepth(1) .setVisible(true, true); - inputs[| 1] = nodeValue_Enum_Scroll("Preprocess Function", self, 0, [ "None", "Hann" ]); + inputs[1] = nodeValue_Enum_Scroll("Preprocess Function", self, 0, [ "None", "Hann" ]); - outputs[| 0] = nodeValue_Output("Array", self, VALUE_TYPE.float, []) + outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.float, []) .setArrayDepth(1); static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_FLIP_add_rigidbody/node_FLIP_add_rigidbody.gml b/scripts/node_FLIP_add_rigidbody/node_FLIP_add_rigidbody.gml index 6b1edd52b..8201f49b2 100644 --- a/scripts/node_FLIP_add_rigidbody/node_FLIP_add_rigidbody.gml +++ b/scripts/node_FLIP_add_rigidbody/node_FLIP_add_rigidbody.gml @@ -6,17 +6,17 @@ function Node_FLIP_Add_Rigidbody(_x, _y, _group = noone) : Node(_x, _y, _group) manual_ungroupable = false; - inputs[| 0] = nodeValue_Fdomain("Domain", self, noone ) + inputs[0] = nodeValue_Fdomain("Domain", self, noone ) .setVisible(true, true); - inputs[| 1] = nodeValue("Objects", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, [] ) + inputs[1] = nodeValue("Objects", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, [] ) .setVisible(true, true); input_display_list = [ 0, ["Collider", false], 1, ] - outputs[| 0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone ); + outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone ); obstracle = new FLIP_Obstracle(); index = 0; @@ -30,7 +30,7 @@ function Node_FLIP_Add_Rigidbody(_x, _y, _group = noone) : Node(_x, _y, _group) var domain = getInputData(0); if(!instance_exists(domain)) return; - outputs[| 0].setValue(domain); + outputs[0].setValue(domain); var _objects = getInputData(1); if(array_empty(_objects)) return; diff --git a/scripts/node_FLIP_apply_force/node_FLIP_apply_force.gml b/scripts/node_FLIP_apply_force/node_FLIP_apply_force.gml index 682f4a93d..7b1d790da 100644 --- a/scripts/node_FLIP_apply_force/node_FLIP_apply_force.gml +++ b/scripts/node_FLIP_apply_force/node_FLIP_apply_force.gml @@ -22,27 +22,27 @@ function Node_FLIP_Apply_Force(_x, _y, _group = noone) : Node(_x, _y, _group) co manual_ungroupable = false; - inputs[| 0] = nodeValue_Fdomain("Domain", self, noone ) + inputs[0] = nodeValue_Fdomain("Domain", self, noone ) .setVisible(true, true); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ] ) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(); }); - inputs[| 2] = nodeValue_Float("Radius", self, 4 ) + inputs[2] = nodeValue_Float("Radius", self, 4 ) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); - inputs[| 3] = nodeValue_Enum_Scroll("Shape", self, 0 , [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Rectangle", s_node_shape_rectangle, 0), ]); + inputs[3] = nodeValue_Enum_Scroll("Shape", self, 0 , [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Rectangle", s_node_shape_rectangle, 0), ]); - inputs[| 4] = nodeValue_Vector("Size", self, [ 4, 4 ] ); + inputs[4] = nodeValue_Vector("Size", self, [ 4, 4 ] ); - inputs[| 5] = nodeValue_Surface("Texture", self) + inputs[5] = nodeValue_Surface("Texture", self) input_display_list = [ 0, ["Collider", false], 3, 2, 4, ["Obstracle", false], 1, 5, ] - outputs[| 0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone ); + outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone ); obstracle = new FLIP_Obstracle(); index = 0; @@ -81,22 +81,22 @@ function Node_FLIP_Apply_Force(_x, _y, _group = noone) : Node(_x, _y, _group) co if(_shp == 0) draw_circle(_px, _py, _r, true); else if(_shp == 1) draw_rectangle(_px - _w, _py - _h, _px + _w, _py + _h, true); - if(inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; } static step = function() { var _shp = getInputData(3); - inputs[| 2].setVisible(_shp == 0); - inputs[| 4].setVisible(_shp == 1); + inputs[2].setVisible(_shp == 0); + inputs[4].setVisible(_shp == 1); } static update = function(frame = CURRENT_FRAME) { var domain = getInputData(0); if(!instance_exists(domain)) return; - outputs[| 0].setValue(domain); + outputs[0].setValue(domain); var _posit = getInputData(1); var _rad = getInputData(2); diff --git a/scripts/node_FLIP_apply_velocity/node_FLIP_apply_velocity.gml b/scripts/node_FLIP_apply_velocity/node_FLIP_apply_velocity.gml index b28228502..2670bb32a 100644 --- a/scripts/node_FLIP_apply_velocity/node_FLIP_apply_velocity.gml +++ b/scripts/node_FLIP_apply_velocity/node_FLIP_apply_velocity.gml @@ -6,26 +6,26 @@ function Node_FLIP_Apply_Velocity(_x, _y, _group = noone) : Node(_x, _y, _group) manual_ungroupable = false; - inputs[| 0] = nodeValue_Fdomain("Domain", self, noone ) + inputs[0] = nodeValue_Fdomain("Domain", self, noone ) .setVisible(true, true); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ] ) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(); }); - inputs[| 2] = nodeValue_Float("Radius", self, 4 ) + inputs[2] = nodeValue_Float("Radius", self, 4 ) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); - inputs[| 3] = nodeValue_Vector("Velocity", self, [ 0, 0 ] ); + inputs[3] = nodeValue_Vector("Velocity", self, [ 0, 0 ] ); - inputs[| 4] = nodeValue_Enum_Scroll("Shape", self, 0 , [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Rectangle", s_node_shape_rectangle, 0) ]); + inputs[4] = nodeValue_Enum_Scroll("Shape", self, 0 , [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Rectangle", s_node_shape_rectangle, 0) ]); - inputs[| 5] = nodeValue_Vector("Size", self, [ 4, 4 ] ); + inputs[5] = nodeValue_Vector("Size", self, [ 4, 4 ] ); input_display_list = [ 0, ["Velocity", false], 4, 1, 2, 5, 3, ] - outputs[| 0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone ); + outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone ); static getDimension = function() { var domain = getInputData(0); @@ -60,23 +60,23 @@ function Node_FLIP_Apply_Velocity(_x, _y, _group = noone) : Node(_x, _y, _group) draw_line_width2(_px, _py, _vx, _vy, 6, 2); draw_set_alpha(1); - if(inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) { hover = false; active = false; } - //if(inputs[| 3].drawOverlay(hover, active, _px, _py, _s, _mx, _my, _snx, _sny)) { hover = false; active = false; } + if(inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) { hover = false; active = false; } + //if(inputs[3].drawOverlay(hover, active, _px, _py, _s, _mx, _my, _snx, _sny)) { hover = false; active = false; } } #endregion static step = function() { #region var _shp = getInputData(4); - inputs[| 2].setVisible(_shp == 0); - inputs[| 5].setVisible(_shp == 1); + inputs[2].setVisible(_shp == 0); + inputs[5].setVisible(_shp == 1); } #endregion static update = function(frame = CURRENT_FRAME) { #region var domain = getInputData(0); if(!instance_exists(domain)) return; - outputs[| 0].setValue(domain); + outputs[0].setValue(domain); var _posit = getInputData(1); var _rad = getInputData(2); diff --git a/scripts/node_FLIP_destroy/node_FLIP_destroy.gml b/scripts/node_FLIP_destroy/node_FLIP_destroy.gml index 77426c2a4..9dc1181c6 100644 --- a/scripts/node_FLIP_destroy/node_FLIP_destroy.gml +++ b/scripts/node_FLIP_destroy/node_FLIP_destroy.gml @@ -6,23 +6,23 @@ function Node_FLIP_Destroy(_x, _y, _group = noone) : Node(_x, _y, _group) constr manual_ungroupable = false; - inputs[| 0] = nodeValue_Fdomain("Domain", self, noone ) + inputs[0] = nodeValue_Fdomain("Domain", self, noone ) .setVisible(true, true); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ] ) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(); }); - inputs[| 2] = nodeValue_Enum_Scroll("Shape", self, 0 , [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Rectangle", s_node_shape_rectangle, 0), ]); + inputs[2] = nodeValue_Enum_Scroll("Shape", self, 0 , [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Rectangle", s_node_shape_rectangle, 0), ]); - inputs[| 3] = nodeValue_Float("Radius", self, 4 ) + inputs[3] = nodeValue_Float("Radius", self, 4 ) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); - inputs[| 4] = nodeValue_Vector("Size", self, [ 4, 4 ] ); + inputs[4] = nodeValue_Vector("Size", self, [ 4, 4 ] ); - inputs[| 5] = nodeValue_Float("Ratio", self, 1 ) + inputs[5] = nodeValue_Float("Ratio", self, 1 ) .setDisplay(VALUE_DISPLAY.slider); - outputs[| 0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone ); + outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone ); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _pos = getInputData(1); @@ -41,22 +41,22 @@ function Node_FLIP_Destroy(_x, _y, _group = noone) : Node(_x, _y, _group) constr if(_shp == 0) draw_circle(_px, _py, _r, true); else if(_shp == 1) draw_rectangle(_px - _w, _py - _h, _px + _w, _py + _h, true); - if(inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; } #endregion static step = function() { #region var _shp = getInputData(2); - inputs[| 3].setVisible(_shp == 0); - inputs[| 4].setVisible(_shp == 1); + inputs[3].setVisible(_shp == 0); + inputs[4].setVisible(_shp == 1); } #endregion static update = function() { #region var domain = getInputData(0); if(!instance_exists(domain)) return; - outputs[| 0].setValue(domain); + outputs[0].setValue(domain); var _pos = getInputData(1); var _shp = getInputData(2); diff --git a/scripts/node_FLIP_domain/node_FLIP_domain.gml b/scripts/node_FLIP_domain/node_FLIP_domain.gml index 092679bcf..45c41bd1a 100644 --- a/scripts/node_FLIP_domain/node_FLIP_domain.gml +++ b/scripts/node_FLIP_domain/node_FLIP_domain.gml @@ -7,38 +7,38 @@ function Node_FLIP_Domain(_x, _y, _group = noone) : Node(_x, _y, _group) constru manual_ungroupable = false; update_on_frame = true; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Int("Particle Size", self, 1); + inputs[1] = nodeValue_Int("Particle Size", self, 1); - inputs[| 2] = nodeValue_Int("Particle Density", self, 10); + inputs[2] = nodeValue_Int("Particle Density", self, 10); - inputs[| 3] = nodeValue_Float("FLIP Ratio", self, 0.8) + inputs[3] = nodeValue_Float("FLIP Ratio", self, 0.8) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 4] = nodeValue_Float("Resolve accelerator", self, 1.5); + inputs[4] = nodeValue_Float("Resolve accelerator", self, 1.5); - inputs[| 5] = nodeValue_Int("Iteration", self, 8); + inputs[5] = nodeValue_Int("Iteration", self, 8); - inputs[| 6] = nodeValue_Float("Damping", self, 0.8) + inputs[6] = nodeValue_Float("Damping", self, 0.8) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Float("Gravity", self, 5); + inputs[7] = nodeValue_Float("Gravity", self, 5); - inputs[| 8] = nodeValue_Float("Time Step", self, 0.05); + inputs[8] = nodeValue_Float("Time Step", self, 0.05); - inputs[| 9] = nodeValue_Toggle("Wall", self, 0b1111, { data: [ "T", "B", "L", "R" ] }); + inputs[9] = nodeValue_Toggle("Wall", self, 0b1111, { data: [ "T", "B", "L", "R" ] }); - inputs[| 10] = nodeValue_Float("Viscosity", self, 0.) + inputs[10] = nodeValue_Float("Viscosity", self, 0.) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); - inputs[| 11] = nodeValue_Float("Friction", self, 0.) + inputs[11] = nodeValue_Float("Friction", self, 0.) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 12] = nodeValue_Float("Wall Elasticity", self, 0.) + inputs[12] = nodeValue_Float("Wall Elasticity", self, 0.) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); - inputs[| 13] = nodeValue_Rotation("Gravity Direction", self, 0); + inputs[13] = nodeValue_Rotation("Gravity Direction", self, 0); input_display_list = [ ["Domain", false], 0, 1, 9, 12, @@ -46,7 +46,7 @@ function Node_FLIP_Domain(_x, _y, _group = noone) : Node(_x, _y, _group) constru ["Physics", false], 7, 13, 10, 11, ] - outputs[| 0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone); + outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone); #region attributes array_push(attributeEditors, "FLIP Solver"); @@ -99,7 +99,7 @@ function Node_FLIP_Domain(_x, _y, _group = noone) : Node(_x, _y, _group) constru static step = function() { var _col = getInputData(9); - inputs[| 12].setVisible(_col); + inputs[12].setVisible(_col); } static update = function(frame = CURRENT_FRAME) { @@ -158,7 +158,7 @@ function Node_FLIP_Domain(_x, _y, _group = noone) : Node(_x, _y, _group) constru domain.update(); - outputs[| 0].setValue(domain); + outputs[0].setValue(domain); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_FLIP_group_inline/node_FLIP_group_inline.gml b/scripts/node_FLIP_group_inline/node_FLIP_group_inline.gml index 39b885527..d7cf47c90 100644 --- a/scripts/node_FLIP_group_inline/node_FLIP_group_inline.gml +++ b/scripts/node_FLIP_group_inline/node_FLIP_group_inline.gml @@ -11,8 +11,8 @@ function Node_FLIP_Group_Inline(_x, _y, _group = noone) : Node_Collection_Inline var _spawn = nodeBuild("Node_FLIP_Spawner", x + 160, y); var _render = nodeBuild("Node_FLIP_Render", x + 320, y); - _spawn.inputs[| 0].setFrom(_domain.outputs[| 0]); - _render.inputs[| 0].setFrom(_spawn.outputs[| 0]); + _spawn.inputs[0].setFrom(_domain.outputs[0]); + _render.inputs[0].setFrom(_spawn.outputs[0]); addNode(_domain); addNode(_spawn); diff --git a/scripts/node_FLIP_render/node_FLIP_render.gml b/scripts/node_FLIP_render/node_FLIP_render.gml index 11915bca5..158e432f7 100644 --- a/scripts/node_FLIP_render/node_FLIP_render.gml +++ b/scripts/node_FLIP_render/node_FLIP_render.gml @@ -5,34 +5,34 @@ function Node_FLIP_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constru manual_ungroupable = false; - inputs[| 0] = nodeValue_Fdomain("Domain", self, noone) + inputs[0] = nodeValue_Fdomain("Domain", self, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Float("Merge threshold", self, 0.75) + inputs[1] = nodeValue_Float("Merge threshold", self, 0.75) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 2] = nodeValue_Range("Lifespan", self, [ 0, 0 ], { linked : true }); + inputs[2] = nodeValue_Range("Lifespan", self, [ 0, 0 ], { linked : true }); - inputs[| 3] = nodeValue_Float("Particle expansion", self, 20); + inputs[3] = nodeValue_Float("Particle expansion", self, 20); - inputs[| 4] = nodeValue_Bool("Draw obstracles", self, true); + inputs[4] = nodeValue_Bool("Draw obstracles", self, true); - inputs[| 5] = nodeValue_Surface("Fluid particle", self); + inputs[5] = nodeValue_Surface("Fluid particle", self); - inputs[| 6] = nodeValue_Enum_Scroll("Render type", self, 0, [ new scrollItem("Particle", s_node_flip_render, 0), + inputs[6] = nodeValue_Enum_Scroll("Render type", self, 0, [ new scrollItem("Particle", s_node_flip_render, 0), new scrollItem("Line", s_node_flip_render, 1), ] ); - inputs[| 7] = nodeValue_Bool("Threshold", self, true); + inputs[7] = nodeValue_Bool("Threshold", self, true); - inputs[| 8] = nodeValue_Bool("Additive", self, true); + inputs[8] = nodeValue_Bool("Additive", self, true); - inputs[| 9] = nodeValue_Slider_Range("Alpha", self, [ 1, 1 ]); + inputs[9] = nodeValue_Slider_Range("Alpha", self, [ 1, 1 ]); - inputs[| 10] = nodeValue_Int("Segments", self, 1); + inputs[10] = nodeValue_Int("Segments", self, 1); - inputs[| 11] = nodeValue_Gradient("Color Over Velocity", self, new gradientObject(cola(c_white))); + inputs[11] = nodeValue_Gradient("Color Over Velocity", self, new gradientObject(cola(c_white))); - inputs[| 12] = nodeValue_Range("Velocity Map", self, [ 0, 10 ]); + inputs[12] = nodeValue_Range("Velocity Map", self, [ 0, 10 ]); input_display_list = [ 0, 5, ["Rendering", false], 6, 10, 3, 4, 9, @@ -40,7 +40,7 @@ function Node_FLIP_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constru ["Post Processing", false], 8, 7, 1, ]; - outputs[| 0] = nodeValue_Output("Rendered", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Rendered", self, VALUE_TYPE.surface, noone); seed = irandom_range(100000, 999999); temp_surface = [ noone ]; @@ -83,10 +83,10 @@ function Node_FLIP_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constru var _typ = getInputData(6); var _thr = getInputData(7); - inputs[| 1].setVisible(_typ == 0 && _thr); - inputs[| 3].setVisible(_typ == 0); - inputs[| 5].setVisible(_typ == 0, _typ == 0); - inputs[| 10].setVisible(_typ == 1); + inputs[ 1].setVisible(_typ == 0 && _thr); + inputs[ 3].setVisible(_typ == 0); + inputs[ 5].setVisible(_typ == 0, _typ == 0); + inputs[10].setVisible(_typ == 1); } static update = function(frame = CURRENT_FRAME) { @@ -109,7 +109,7 @@ function Node_FLIP_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constru var _cvl = getInputData(11); var _vlr = getInputData(12); - var _outSurf = outputs[| 0].getValue(); + var _outSurf = outputs[0].getValue(); var _maxpart = domain.maxParticles; var _padd = domain.particleSize; var _ww = domain.width - _padd * 2; @@ -118,7 +118,7 @@ function Node_FLIP_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constru _outSurf = surface_verify(_outSurf, _ww, _hh); temp_surface[0] = surface_verify(temp_surface[0], _ww, _hh); - outputs[| 0].setValue(_outSurf); + outputs[0].setValue(_outSurf); var _x, _y, _px, _py, _r, _l, _a, _v, _sx, _sy; var _rad = domain.particleRadius * _exp; diff --git a/scripts/node_FLIP_repel/node_FLIP_repel.gml b/scripts/node_FLIP_repel/node_FLIP_repel.gml index fb7754871..e8488da83 100644 --- a/scripts/node_FLIP_repel/node_FLIP_repel.gml +++ b/scripts/node_FLIP_repel/node_FLIP_repel.gml @@ -6,22 +6,22 @@ function Node_FLIP_Repel(_x, _y, _group = noone) : Node(_x, _y, _group) construc manual_ungroupable = false; - inputs[| 0] = nodeValue_Fdomain("Domain", self, noone ) + inputs[0] = nodeValue_Fdomain("Domain", self, noone ) .setVisible(true, true); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ] ) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(); }); - inputs[| 2] = nodeValue_Float("Radius", self, 4 ); + inputs[2] = nodeValue_Float("Radius", self, 4 ); - inputs[| 3] = nodeValue_Float("Strength", self, 4 ) + inputs[3] = nodeValue_Float("Strength", self, 4 ) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 16, 0.1 ] }); input_display_list = [ 0, ["Repel", false], 1, 2, 3, ] - outputs[| 0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone ); + outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone ); static getDimension = function() { #region var domain = getInputData(0); @@ -42,7 +42,7 @@ function Node_FLIP_Repel(_x, _y, _group = noone) : Node(_x, _y, _group) construc draw_set_color(COLORS._main_accent); draw_circle_prec(_px, _py, _r, true, 32); - if(inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) { hover = false; active = false; } + if(inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) { hover = false; active = false; } } #endregion @@ -54,7 +54,7 @@ function Node_FLIP_Repel(_x, _y, _group = noone) : Node(_x, _y, _group) construc var domain = getInputData(0); if(!instance_exists(domain)) return; - outputs[| 0].setValue(domain); + outputs[0].setValue(domain); var _posit = getInputData(1); var _rad = getInputData(2); diff --git a/scripts/node_FLIP_spawner/node_FLIP_spawner.gml b/scripts/node_FLIP_spawner/node_FLIP_spawner.gml index 093fc0849..932179c56 100644 --- a/scripts/node_FLIP_spawner/node_FLIP_spawner.gml +++ b/scripts/node_FLIP_spawner/node_FLIP_spawner.gml @@ -6,45 +6,45 @@ function Node_FLIP_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group) constr manual_ungroupable = false; - inputs[| 0] = nodeValue_Fdomain("Domain", self, noone ) + inputs[0] = nodeValue_Fdomain("Domain", self, noone ) .setVisible(true, true); - inputs[| 1] = nodeValue_Enum_Scroll("Spawn Shape", self, 0 , [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Rectangle", s_node_shape_rectangle, 0), "Surface" ]); + inputs[1] = nodeValue_Enum_Scroll("Spawn Shape", self, 0 , [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Rectangle", s_node_shape_rectangle, 0), "Surface" ]); - inputs[| 2] = nodeValue_Vector("Spawn Position", self, [ 0.5, 0.25 ] ) + inputs[2] = nodeValue_Vector("Spawn Position", self, [ 0.5, 0.25 ] ) .setUnitRef(function(index) { return getDimension(); }, VALUE_UNIT.reference); - inputs[| 3] = nodeValue_Enum_Button("Spawn Type", self, 0 , [ "Stream", "Splash" ]); + inputs[3] = nodeValue_Enum_Button("Spawn Type", self, 0 , [ "Stream", "Splash" ]); - inputs[| 4] = nodeValue_Int("Spawn Frame", self, 0 ); + inputs[4] = nodeValue_Int("Spawn Frame", self, 0 ); - inputs[| 5] = nodeValue_Float("Spawn Amount", self, 8 ); + inputs[5] = nodeValue_Float("Spawn Amount", self, 8 ); - inputs[| 6] = nodeValue_Range("Spawn Velocity", self, [ 0, 0 ] ); + inputs[6] = nodeValue_Range("Spawn Velocity", self, [ 0, 0 ] ); - inputs[| 7] = nodeValue_Surface("Spawn Surface", self); + inputs[7] = nodeValue_Surface("Spawn Surface", self); - inputs[| 8] = nodeValue_Float("Spawn Radius", self, 2 ) + inputs[8] = nodeValue_Float("Spawn Radius", self, 2 ) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); - inputs[| 9] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 9].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[9] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[9].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 10] = nodeValue_Rotation_Random("Spawn Direction", self, [ 0, 45, 135, 0, 0 ] ); + inputs[10] = nodeValue_Rotation_Random("Spawn Direction", self, [ 0, 45, 135, 0, 0 ] ); - inputs[| 11] = nodeValue_Float("Inherit Velocity", self, 0 ) + inputs[11] = nodeValue_Float("Inherit Velocity", self, 0 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 12] = nodeValue_Int("Spawn Duration", self, 1 ); + inputs[12] = nodeValue_Int("Spawn Duration", self, 1 ); - inputs[| 13] = nodeValue_Vector("Spawn Szie", self, [ 2, 2 ] ); + inputs[13] = nodeValue_Vector("Spawn Szie", self, [ 2, 2 ] ); input_display_list = [ 0, 9, ["Spawner", false], 1, 7, 8, 13, 2, 3, 4, 12, 5, ["Physics", false], 10, 6, 11, ] - outputs[| 0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone ); + outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone ); spawn_amo = 0; prev_position = [ 0, 0 ]; @@ -79,7 +79,7 @@ function Node_FLIP_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group) constr draw_surface_ext(_surf, _px - _sw * _s / 2, _py - _sh * _s / 2, _s, _s, 0, c_white, 0.5); } - if(inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; } #endregion @@ -94,19 +94,19 @@ function Node_FLIP_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group) constr var _shp = getInputData(1); var _typ = getInputData(3); - inputs[| 4].setVisible(_typ == 1); - inputs[| 12].setVisible(_typ == 1); + inputs[ 4].setVisible(_typ == 1); + inputs[12].setVisible(_typ == 1); - inputs[| 7].setVisible(_shp == 2, _shp == 2); - inputs[| 8].setVisible(_shp == 0); - inputs[| 13].setVisible(_shp == 1); + inputs[ 7].setVisible(_shp == 2, _shp == 2); + inputs[ 8].setVisible(_shp == 0); + inputs[13].setVisible(_shp == 1); } #endregion static update = function(frame = CURRENT_FRAME) { #region var domain = getInputData(0); if(!instance_exists(domain)) return; - outputs[| 0].setValue(domain); + outputs[0].setValue(domain); var _shape = getInputData(1); var _posit = getInputData(2); diff --git a/scripts/node_FLIP_to_VFX/node_FLIP_to_VFX.gml b/scripts/node_FLIP_to_VFX/node_FLIP_to_VFX.gml index b3ee47e7b..904480999 100644 --- a/scripts/node_FLIP_to_VFX/node_FLIP_to_VFX.gml +++ b/scripts/node_FLIP_to_VFX/node_FLIP_to_VFX.gml @@ -6,10 +6,10 @@ function Node_FLIP_to_VFX(_x, _y, _group = noone) : Node(_x, _y, _group) constru manual_ungroupable = false; - inputs[| 0] = nodeValue_Fdomain("Domain", self, noone) + inputs[0] = nodeValue_Fdomain("Domain", self, noone) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Particles", self, VALUE_TYPE.particle, [] ); + outputs[0] = nodeValue_Output("Particles", self, VALUE_TYPE.particle, [] ); attributes.part_amount = 512; array_push(attributeEditors, ["Maximum particles", function() { return attributes.part_amount; }, @@ -25,7 +25,7 @@ function Node_FLIP_to_VFX(_x, _y, _group = noone) : Node(_x, _y, _group) constru var _x, _y, _p, _px, _py, _r, _l, _a, _v, _sx, _sy; var _mx = min(array_length(domain.particlePos) / 2 - 1, domain.numParticles); - var _pa = outputs[| 0].getValue(); + var _pa = outputs[0].getValue(); var _ind = 0; for( var i = 0; i < _mx; i++ ) { @@ -46,7 +46,7 @@ function Node_FLIP_to_VFX(_x, _y, _group = noone) : Node(_x, _y, _group) constru } array_resize(_pa, _ind); - outputs[| 0].setValue(_pa); + outputs[0].setValue(_pa); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_FLIP_update/node_FLIP_update.gml b/scripts/node_FLIP_update/node_FLIP_update.gml index 424d064a8..631e5c5ca 100644 --- a/scripts/node_FLIP_update/node_FLIP_update.gml +++ b/scripts/node_FLIP_update/node_FLIP_update.gml @@ -6,26 +6,26 @@ function Node_FLIP_Update(_x, _y, _group = noone) : Node(_x, _y, _group) constru manual_ungroupable = false; - inputs[| 0] = nodeValue_Fdomain("Domain", self, noone) + inputs[0] = nodeValue_Fdomain("Domain", self, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Bool("Update", self, true); + inputs[1] = nodeValue_Bool("Update", self, true); - inputs[| 2] = nodeValue_Bool("Override timestep", self, false); + inputs[2] = nodeValue_Bool("Override timestep", self, false); - inputs[| 3] = nodeValue_Float("Timestep", self, 0.01); + inputs[3] = nodeValue_Float("Timestep", self, 0.01); input_display_list = [ 0, 1, ["Timestep", false], 2, 3, ]; - outputs[| 0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone); + outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone); static update = function(frame = CURRENT_FRAME) { var domain = getInputData(0); var _active = getInputData(1); - outputs[| 0].setValue(domain); + outputs[0].setValue(domain); if(!instance_exists(domain)) return; if(domain.domain == noone) return; diff --git a/scripts/node_FLIP_vortex/node_FLIP_vortex.gml b/scripts/node_FLIP_vortex/node_FLIP_vortex.gml index 4fb88ff18..5846c4327 100644 --- a/scripts/node_FLIP_vortex/node_FLIP_vortex.gml +++ b/scripts/node_FLIP_vortex/node_FLIP_vortex.gml @@ -6,25 +6,25 @@ function Node_FLIP_Vortex(_x, _y, _group = noone) : Node(_x, _y, _group) constru manual_ungroupable = false; - inputs[| 0] = nodeValue_Fdomain("Domain", self, noone ) + inputs[0] = nodeValue_Fdomain("Domain", self, noone ) .setVisible(true, true); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ] ) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(); }); - inputs[| 2] = nodeValue_Float("Radius", self, 4 ); + inputs[2] = nodeValue_Float("Radius", self, 4 ); - inputs[| 3] = nodeValue_Float("Strength", self, 4 ) + inputs[3] = nodeValue_Float("Strength", self, 4 ) .setDisplay(VALUE_DISPLAY.slider, { range: [ -8, 8, 0.01 ] }); - inputs[| 4] = nodeValue_Float("Attraction", self, 0 ) + inputs[4] = nodeValue_Float("Attraction", self, 0 ) .setDisplay(VALUE_DISPLAY.slider, { range: [ -8, 8, 0.01 ] }); input_display_list = [ 0, ["Vertex", false], 1, 2, 3, 4, ] - outputs[| 0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone ); + outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone ); static getDimension = function() { #region var domain = getInputData(0); @@ -45,7 +45,7 @@ function Node_FLIP_Vortex(_x, _y, _group = noone) : Node(_x, _y, _group) constru draw_set_color(COLORS._main_accent); draw_circle_prec(_px, _py, _r, true, 32); - if(inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) { hover = false; active = false; } + if(inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) { hover = false; active = false; } } #endregion @@ -57,7 +57,7 @@ function Node_FLIP_Vortex(_x, _y, _group = noone) : Node(_x, _y, _group) constru var domain = getInputData(0); if(!instance_exists(domain)) return; - outputs[| 0].setValue(domain); + outputs[0].setValue(domain); var _posit = getInputData(1); var _rad = getInputData(2); diff --git a/scripts/node_FLIP_wall/node_FLIP_wall.gml b/scripts/node_FLIP_wall/node_FLIP_wall.gml index abf51c2ab..34e924f88 100644 --- a/scripts/node_FLIP_wall/node_FLIP_wall.gml +++ b/scripts/node_FLIP_wall/node_FLIP_wall.gml @@ -6,21 +6,21 @@ function Node_FLIP_Wall(_x, _y, _group = noone) : Node(_x, _y, _group) construct manual_ungroupable = false; - inputs[| 0] = nodeValue_Fdomain("Domain", self, noone ) + inputs[0] = nodeValue_Fdomain("Domain", self, noone ) .setVisible(true, true); - inputs[| 1] = nodeValue_Area("Area", self, DEF_AREA , { useShape : false }); + inputs[1] = nodeValue_Area("Area", self, DEF_AREA , { useShape : false }); input_display_list = [ 0, ["Collider", false], 1 ] - outputs[| 0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone ); + outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone ); obstracle = new FLIP_Obstracle(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - if(inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; } static update = function(frame = CURRENT_FRAME) { @@ -28,7 +28,7 @@ function Node_FLIP_Wall(_x, _y, _group = noone) : Node(_x, _y, _group) construct var _area = getInputData(1); if(!instance_exists(domain)) return; - outputs[| 0].setValue(domain); + outputs[0].setValue(domain); FLIP_setSolid_rectangle(domain.domain, _area[0], _area[1], _area[2], _area[3]); } diff --git a/scripts/node_FXAA/node_FXAA.gml b/scripts/node_FXAA/node_FXAA.gml index 84f6a64ca..7bc769676 100644 --- a/scripts/node_FXAA/node_FXAA.gml +++ b/scripts/node_FXAA/node_FXAA.gml @@ -1,14 +1,14 @@ function Node_FXAA(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "FXAA"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Bool("Active", self, true); + inputs[1] = nodeValue_Bool("Active", self, true); - inputs[| 2] = nodeValue_Float("Distance", self, 0.5) + inputs[2] = nodeValue_Float("Distance", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Float("Mix", self, 1) + inputs[3] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); active_index = 1; @@ -18,7 +18,7 @@ function Node_FXAA(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons ["Effect", false], 2, 3, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); diff --git a/scripts/node_PCX_array_get/node_PCX_array_get.gml b/scripts/node_PCX_array_get/node_PCX_array_get.gml index 43519d38f..5b10f1707 100644 --- a/scripts/node_PCX_array_get/node_PCX_array_get.gml +++ b/scripts/node_PCX_array_get/node_PCX_array_get.gml @@ -1,16 +1,16 @@ function Node_PCX_Array_Get(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor { name = "Array Get"; - inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - inputs[| 1] = nodeValue("Index", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[1] = nodeValue("Index", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - outputs[| 0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); + outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); static update = function() { var _arr = getInputData(0); var _ind = getInputData(1); - outputs[| 0].setValue(new __funcTree("@", _arr, _ind)); + outputs[0].setValue(new __funcTree("@", _arr, _ind)); } } \ No newline at end of file diff --git a/scripts/node_PCX_array_set/node_PCX_array_set.gml b/scripts/node_PCX_array_set/node_PCX_array_set.gml index 8f3f1bd3f..0e38fdddd 100644 --- a/scripts/node_PCX_array_set/node_PCX_array_set.gml +++ b/scripts/node_PCX_array_set/node_PCX_array_set.gml @@ -1,19 +1,19 @@ function Node_PCX_Array_Set(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor { name = "Array Set"; - inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - inputs[| 1] = nodeValue("Index", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[1] = nodeValue("Index", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - inputs[| 2] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[2] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - outputs[| 0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); + outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); static update = function() { var _arr = getInputData(0); var _ind = getInputData(1); var _val = getInputData(2); - outputs[| 0].setValue(new __funcTree("=", [ _arr, _ind ], _val)); + outputs[0].setValue(new __funcTree("=", [ _arr, _ind ], _val)); } } \ No newline at end of file diff --git a/scripts/node_PCX_condition/node_PCX_condition.gml b/scripts/node_PCX_condition/node_PCX_condition.gml index dbc7eb11f..f4632bbf3 100644 --- a/scripts/node_PCX_condition/node_PCX_condition.gml +++ b/scripts/node_PCX_condition/node_PCX_condition.gml @@ -1,13 +1,13 @@ function Node_PCX_Condition(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor { name = "Condition"; - inputs[| 0] = nodeValue("Condition", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[0] = nodeValue("Condition", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - inputs[| 1] = nodeValue("True", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[1] = nodeValue("True", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - inputs[| 2] = nodeValue("False", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[2] = nodeValue("False", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - outputs[| 0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); + outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); static update = function() { var _cond = getInputData(0); @@ -19,6 +19,6 @@ function Node_PCX_Condition(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) c _fn.if_true = _true; _fn.if_false = _fals; - outputs[| 0].setValue(_fn); + outputs[0].setValue(_fn); } } \ No newline at end of file diff --git a/scripts/node_PCX_equation/node_PCX_equation.gml b/scripts/node_PCX_equation/node_PCX_equation.gml index cf68fe462..d4509fea5 100644 --- a/scripts/node_PCX_equation/node_PCX_equation.gml +++ b/scripts/node_PCX_equation/node_PCX_equation.gml @@ -4,11 +4,11 @@ function Node_PCX_Equation(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) co setDimension(96, 48); ast = noone; - inputs[| 0] = nodeValue_Text("Equation", self, ""); + inputs[0] = nodeValue_Text("Equation", self, ""); - outputs[| 0] = nodeValue_Output("Result", self, VALUE_TYPE.PCXnode, noone ); + outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.PCXnode, noone ); - argument_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { #region + argument_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { argument_renderer.x = _x; argument_renderer.y = _y; argument_renderer.w = _w; @@ -18,17 +18,17 @@ function Node_PCX_Equation(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) co var hh = ui(8); var _th = TEXTBOX_HEIGHT; - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { var _h = 0; - var _jName = inputs[| i + 0]; + var _jName = inputs[i + 0]; _jName.editWidget.setFocusHover(_focus, _hover); _jName.editWidget.draw(tx, ty, ui(128), _th, _jName.showValue(), _m, _jName.display_type); draw_set_text(f_p1, fa_center, fa_top, COLORS._main_text_sub); draw_text_add(tx + ui(128 + 12), ty + ui(6), "="); - var _jValue = inputs[| i + 1]; + var _jValue = inputs[i + 1]; _jValue.editWidget.setFocusHover(_focus, _hover); _jValue.editWidget.draw(tx + ui(128 + 24), ty, _w - ui(128 + 24 + 16), _th, _jValue.showValue(), _m); @@ -39,7 +39,7 @@ function Node_PCX_Equation(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) co argument_renderer.h = hh; return hh; - }); #endregion + }); input_display_list = [ @@ -49,65 +49,65 @@ function Node_PCX_Equation(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) co ] static createNewInput = function() { - var index = ds_list_size(inputs); - inputs[| index + 0] = nodeValue_Text("Argument name", self, "" ) + var index = array_length(inputs); + inputs[index + 0] = nodeValue_Text("Argument name", self, "" ) .setDisplay(VALUE_DISPLAY.text_box); - inputs[| index + 1] = nodeValue("Argument value", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone ) + inputs[index + 1] = nodeValue("Argument value", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone ) .setVisible(true, true); - inputs[| index + 1].editWidget.interactable = false; + inputs[index + 1].editWidget.interactable = false; - return inputs[| index + 0]; + return inputs[index + 0]; } setDynamicInput(2, false); - argument_renderer.register = function(parent = noone) { #region - for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) - inputs[| i].editWidget.register(parent); - } #endregion + argument_renderer.register = function(parent = noone) { + for( var i = input_fix_len; i < array_length(inputs); i++ ) + inputs[i].editWidget.register(parent); + } - static refreshDynamicInput = function() { #region - var _in = ds_list_create(); + static refreshDynamicInput = function() { + var _in = []; for( var i = 0; i < input_fix_len; i++ ) - ds_list_add(_in, inputs[| i]); + array_push(_in, inputs[i]); array_resize(input_display_list, input_display_len); - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { var varName = getInputData(i); if(varName != "") { - ds_list_add(_in, inputs[| i + 0]); - ds_list_add(_in, inputs[| i + 1]); - inputs[| i + 1].editWidget.setInteract(true); - inputs[| i + 1].name = varName; + array_push(_in, inputs[i + 0]); + array_push(_in, inputs[i + 1]); + inputs[i + 1].editWidget.setInteract(true); + inputs[i + 1].name = varName; array_push(input_display_list, i + 1); } else { - delete inputs[| i + 0]; - delete inputs[| i + 1]; + delete inputs[i + 0]; + delete inputs[i + 1]; } } - for( var i = 0; i < ds_list_size(_in); i++ ) - _in[| i].index = i; + for( var i = 0; i < array_length(_in); i++ ) + _in[i].index = i; - ds_list_destroy(inputs); + inputs = _in; createNewInput(); - } #endregion + } - static onValueUpdate = function(index = 0) { #region + static onValueUpdate = function(index = 0) { if(LOADING || APPENDING) return; if(safe_mod(index - input_fix_len, data_length) == 0) //Variable name - inputs[| index + 1].name = getInputData(index); + inputs[index + 1].name = getInputData(index); refreshDynamicInput(); - } #endregion + } - static update = function() { #region + static update = function() { var eq = getInputData(0); var fn = evaluateFunctionTree(eq); @@ -121,17 +121,17 @@ function Node_PCX_Equation(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) co } _fnL.addFunction(fn); - outputs[| 0].setValue(fn); - } #endregion + outputs[0].setValue(fn); + } - static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text); var str = getInputData(0); var bbox = drawGetBbox(xx, yy, _s); var ss = string_scale(str, bbox.w, bbox.h); draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0); - } #endregion + } static doApplyDeserialize = function() { refreshDynamicInput(); } } \ No newline at end of file diff --git a/scripts/node_PCX_fn_math/node_PCX_fn_math.gml b/scripts/node_PCX_fn_math/node_PCX_fn_math.gml index b6c744596..0de791f12 100644 --- a/scripts/node_PCX_fn_math/node_PCX_fn_math.gml +++ b/scripts/node_PCX_fn_math/node_PCX_fn_math.gml @@ -1,19 +1,19 @@ function Node_PCX_fn_Math(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor { name = "Math"; - inputs[| 0] = nodeValue_Enum_Scroll("Operator", self, 0, [ "Add", "Subtract", "Multiply", "Divide", "Power", "Modulo", "Absolute", -1, + inputs[0] = nodeValue_Enum_Scroll("Operator", self, 0, [ "Add", "Subtract", "Multiply", "Divide", "Power", "Modulo", "Absolute", -1, "Round", "Floor", "Ceil", -1, "Sin", "Cos", "Tan", "Arcsin", "Arccos", "Arctan", -1, "Min", "Max", "Clamp", -1, "Lerp" ]); - inputs[| 1] = nodeValue("x", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[1] = nodeValue("x", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - inputs[| 2] = nodeValue("y", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[2] = nodeValue("y", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - inputs[| 3] = nodeValue("z", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[3] = nodeValue("z", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - outputs[| 0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); + outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); static update = function() { static syms = [ "+", "-", "*", "/", "$", "%", "abs", -1, "round", "floor", "ceil", @@ -36,17 +36,17 @@ function Node_PCX_fn_Math(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) con case "arcsin" : case "arccos" : case "arctan" : - inputs[| 2].setVisible(false, false); + inputs[2].setVisible(false, false); break; - default: inputs[| 2].setVisible(true, true); + default: inputs[2].setVisible(true, true); } switch(_sym) { case "clamp" : case "lerp" : - inputs[| 3].setVisible(true, true); + inputs[3].setVisible(true, true); break; - default: inputs[| 3].setVisible(false, false); + default: inputs[3].setVisible(false, false); } switch(_sym) { @@ -64,10 +64,10 @@ function Node_PCX_fn_Math(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) con case "max" : case "clamp" : case "lerp" : - outputs[| 0].setValue(new __funcTree(_sym, [ _x, _y, _z ])); + outputs[0].setValue(new __funcTree(_sym, [ _x, _y, _z ])); break; default: - outputs[| 0].setValue(new __funcTree(_sym, _x, _y)); + outputs[0].setValue(new __funcTree(_sym, _x, _y)); } diff --git a/scripts/node_PCX_fn_random/node_PCX_fn_random.gml b/scripts/node_PCX_fn_random/node_PCX_fn_random.gml index 1ae16470f..0f24cba8c 100644 --- a/scripts/node_PCX_fn_random/node_PCX_fn_random.gml +++ b/scripts/node_PCX_fn_random/node_PCX_fn_random.gml @@ -1,13 +1,13 @@ function Node_PCX_fn_Random(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor { name = "Random"; - inputs[| 0] = nodeValue("Min", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[0] = nodeValue("Min", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - inputs[| 1] = nodeValue("Max", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[1] = nodeValue("Max", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - inputs[| 2] = nodeValue_Bool("Integer", self, false); + inputs[2] = nodeValue_Bool("Integer", self, false); - outputs[| 0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); + outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); input_display_list = [ 2, 0, 1 ]; @@ -16,6 +16,6 @@ function Node_PCX_fn_Random(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) c var _max = getInputData(1); var _int = getInputData(2); - outputs[| 0].setValue(new __funcTree(_int? "irandom" : "random", [ _min, _max ])); + outputs[0].setValue(new __funcTree(_int? "irandom" : "random", [ _min, _max ])); } } \ No newline at end of file diff --git a/scripts/node_PCX_fn_surface_height/node_PCX_fn_surface_height.gml b/scripts/node_PCX_fn_surface_height/node_PCX_fn_surface_height.gml index 57c045792..0c24aa7a7 100644 --- a/scripts/node_PCX_fn_surface_height/node_PCX_fn_surface_height.gml +++ b/scripts/node_PCX_fn_surface_height/node_PCX_fn_surface_height.gml @@ -1,12 +1,12 @@ function Node_PCX_fn_Surface_Height(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor { name = "Surface Height"; - inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - outputs[| 0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); + outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); static update = function() { var _surf = getInputData(0); - outputs[| 0].setValue(new __funcTree("surface_get_height", [ _surf ])); + outputs[0].setValue(new __funcTree("surface_get_height", [ _surf ])); } } \ No newline at end of file diff --git a/scripts/node_PCX_fn_surface_width/node_PCX_fn_surface_width.gml b/scripts/node_PCX_fn_surface_width/node_PCX_fn_surface_width.gml index 9f3d22142..95f61b6ff 100644 --- a/scripts/node_PCX_fn_surface_width/node_PCX_fn_surface_width.gml +++ b/scripts/node_PCX_fn_surface_width/node_PCX_fn_surface_width.gml @@ -1,12 +1,12 @@ function Node_PCX_fn_Surface_Width(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor { name = "Surface Width"; - inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - outputs[| 0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); + outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); static update = function() { var _surf = getInputData(0); - outputs[| 0].setValue(new __funcTree("surface_get_width", [ _surf ])); + outputs[0].setValue(new __funcTree("surface_get_width", [ _surf ])); } } \ No newline at end of file diff --git a/scripts/node_PCX_fn_var/node_PCX_fn_var.gml b/scripts/node_PCX_fn_var/node_PCX_fn_var.gml index 520f7db3c..86c892f8f 100644 --- a/scripts/node_PCX_fn_var/node_PCX_fn_var.gml +++ b/scripts/node_PCX_fn_var/node_PCX_fn_var.gml @@ -2,14 +2,14 @@ function Node_PCX_fn_var(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) cons name = "Fn Variable"; w = 64; - inputs[| 0] = nodeValue("Default Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0); + inputs[0] = nodeValue("Default Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0); - outputs[| 0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); + outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); static update = function() { var _def = getInputData(0); - outputs[| 0].setValue(new __funcTree("≔", display_name, _def)); + outputs[0].setValue(new __funcTree("≔", display_name, _def)); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_PCX_var/node_PCX_var.gml b/scripts/node_PCX_var/node_PCX_var.gml index 430479f16..7a5aefe30 100644 --- a/scripts/node_PCX_var/node_PCX_var.gml +++ b/scripts/node_PCX_var/node_PCX_var.gml @@ -1,16 +1,16 @@ function Node_PCX_var(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor { name = "Variable"; - inputs[| 0] = nodeValue_Text("Name", self, ""); + inputs[0] = nodeValue_Text("Name", self, ""); - inputs[| 1] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1); + inputs[1] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1); - outputs[| 0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); + outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); static update = function() { var _name = getInputData(0); var _val = getInputData(1); - outputs[| 0].setValue(new __funcTree("=", _name, _val)); + outputs[0].setValue(new __funcTree("=", _name, _val)); } } \ No newline at end of file diff --git a/scripts/node_VCT/node_VCT.gml b/scripts/node_VCT/node_VCT.gml index 826c5b36e..f3314874d 100644 --- a/scripts/node_VCT/node_VCT.gml +++ b/scripts/node_VCT/node_VCT.gml @@ -4,34 +4,34 @@ function Node_VCT(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const color = COLORS.node_blend_vct; vct = new VCT(self); - inputs[| 0] = nodeValue_Int("Editor", self, 0) + inputs[0] = nodeValue_Int("Editor", self, 0) .setDisplay(VALUE_DISPLAY.button, { name: "Editor", onClick: function() { vct.createDialog(); } }); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 0, ["Automations", false], ]; static createNewInput = function(key = "") { - var index = ds_list_size(inputs); + var index = array_length(inputs); var _s = floor((index - input_fix_len) / data_length); var name = string_title(string_replace_all(key, "_", " ")); var _var = vct[$ key]; - inputs[| index] = nodeValue(name, self, JUNCTION_CONNECT.input, _var.type, 0) + inputs[index] = nodeValue(name, self, JUNCTION_CONNECT.input, _var.type, 0) .setDisplay(_var.disp, _var.disp_data); - inputs[| index].display_data.key = key; + inputs[index].display_data.key = key; array_append(input_display_list, [ index ]); } static processData = function(_outSurf, _data, _output_index, _array_index) { for( var i = 1; i < array_length(_data); i++ ) - vct[$ inputs[| i].display_data.key].setDirect(_data[i]); + vct[$ inputs[i].display_data.key].setDirect(_data[i]); var params = { frame: CURRENT_FRAME diff --git a/scripts/node_VFX_attract/node_VFX_attract.gml b/scripts/node_VFX_attract/node_VFX_attract.gml index 29458cd25..fd778003c 100644 --- a/scripts/node_VFX_attract/node_VFX_attract.gml +++ b/scripts/node_VFX_attract/node_VFX_attract.gml @@ -2,9 +2,9 @@ function Node_VFX_Attract(_x, _y, _group = noone) : Node_VFX_effector(_x, _y, _g name = "Attract"; node_draw_icon = s_node_vfx_attract; - inputs[| 4].setVisible(false, false); + inputs[4].setVisible(false, false); - inputs[| effector_input_length + 0] = nodeValue_Bool("Destroy when reach middle", self, false ); + inputs[effector_input_length + 0] = nodeValue_Bool("Destroy when reach middle", self, false ); array_push(input_display_list, effector_input_length + 0); diff --git a/scripts/node_VFX_destroy/node_VFX_destroy.gml b/scripts/node_VFX_destroy/node_VFX_destroy.gml index 8fee71ab1..2a1168e21 100644 --- a/scripts/node_VFX_destroy/node_VFX_destroy.gml +++ b/scripts/node_VFX_destroy/node_VFX_destroy.gml @@ -2,9 +2,9 @@ function Node_VFX_Destroy(_x, _y, _group = noone) : Node_VFX_effector(_x, _y, _g name = "Destroy"; node_draw_icon = s_node_vfx_destroy; - inputs[| 4].setVisible(false, false); - inputs[| 6].setVisible(false, false); - inputs[| 7].setVisible(false, false); + inputs[4].setVisible(false, false); + inputs[6].setVisible(false, false); + inputs[7].setVisible(false, false); function onAffect(part, str) { var _sten = getInputData(5); diff --git a/scripts/node_VFX_group/node_VFX_group.gml b/scripts/node_VFX_group/node_VFX_group.gml index c7d47983d..c5fc40d3f 100644 --- a/scripts/node_VFX_group/node_VFX_group.gml +++ b/scripts/node_VFX_group/node_VFX_group.gml @@ -15,16 +15,16 @@ function Node_VFX_Group(_x, _y, _group = noone) : Node_Collection(_x, _y, _group preview_node = noone; allCached = false; - inputs[| 0] = nodeValue_Bool("Loop", self, true ) + inputs[0] = nodeValue_Bool("Loop", self, true ) .rejectArray(); - custom_input_index = ds_list_size(inputs); + custom_input_index = array_length(inputs); if(NODE_NEW_MANUAL) { #region var input = nodeBuild("Node_VFX_Spawner", -256, -32, self); var output = nodeBuild("Node_VFX_Renderer_Output", 256 + 32 * 5, -32, self); - output.inputs[| output.input_fix_len + 1].setFrom(input.outputs[| 0]); + output.inputs[output.input_fix_len + 1].setFrom(input.outputs[0]); preview_node = output; } #endregion diff --git a/scripts/node_VFX_group_inline/node_VFX_group_inline.gml b/scripts/node_VFX_group_inline/node_VFX_group_inline.gml index ffb00bf51..42e2a827b 100644 --- a/scripts/node_VFX_group_inline/node_VFX_group_inline.gml +++ b/scripts/node_VFX_group_inline/node_VFX_group_inline.gml @@ -6,7 +6,7 @@ function Node_VFX_Group_Inline(_x, _y, _group = noone) : Node_Collection_Inline( is_root = false; topoList = []; - inputs[| 0] = nodeValue_Bool("Loop", self, true ) + inputs[0] = nodeValue_Bool("Loop", self, true ) .rejectArray(); is_simulation = true; @@ -19,7 +19,7 @@ function Node_VFX_Group_Inline(_x, _y, _group = noone) : Node_Collection_Inline( var input = nodeBuild("Node_VFX_Spawner", x, y); var output = nodeBuild("Node_VFX_Renderer", x + 256, y); - output.dummy_input.setFrom(input.outputs[| 0]); + output.dummy_input.setFrom(input.outputs[0]); addNode(input); addNode(output); diff --git a/scripts/node_VFX_oscillate/node_VFX_oscillate.gml b/scripts/node_VFX_oscillate/node_VFX_oscillate.gml index e92781a91..5b568248a 100644 --- a/scripts/node_VFX_oscillate/node_VFX_oscillate.gml +++ b/scripts/node_VFX_oscillate/node_VFX_oscillate.gml @@ -2,15 +2,15 @@ function Node_VFX_Oscillate(_x, _y, _group = noone) : Node_VFX_effector(_x, _y, name = "Oscillate"; node_draw_icon = s_node_vfx_osc; - inputs[| 4].setVisible(false, false); - inputs[| 6].setVisible(false, false); - inputs[| 7].setVisible(false, false); + inputs[4].setVisible(false, false); + inputs[6].setVisible(false, false); + inputs[7].setVisible(false, false); - inputs[| effector_input_length + 0] = nodeValue_Float("Amplitude", self, 2 ); + inputs[effector_input_length + 0] = nodeValue_Float("Amplitude", self, 2 ); - inputs[| effector_input_length + 1] = nodeValue_Float("Frequency", self, 0.2 ); + inputs[effector_input_length + 1] = nodeValue_Float("Frequency", self, 0.2 ); - inputs[| effector_input_length + 2] = nodeValue_Bool("Multiply by speed", self, false ); + inputs[effector_input_length + 2] = nodeValue_Bool("Multiply by speed", self, false ); array_push(input_display_list, effector_input_length + 0, effector_input_length + 1, effector_input_length + 2); diff --git a/scripts/node_VFX_override/node_VFX_override.gml b/scripts/node_VFX_override/node_VFX_override.gml index 2f9d5a4fb..2da2b9c01 100644 --- a/scripts/node_VFX_override/node_VFX_override.gml +++ b/scripts/node_VFX_override/node_VFX_override.gml @@ -7,23 +7,23 @@ function Node_VFX_Override(_x, _y, _group = noone) : Node(_x, _y, _group) constr manual_ungroupable = false; setDimension(96, 48); - inputs[| 0] = nodeValue_Particle("Particles", self, -1 ) + inputs[0] = nodeValue_Particle("Particles", self, -1 ) .setVisible(true, true); - inputs[| 1] = nodeValue_Float("Positions", self, noone ); + inputs[1] = nodeValue_Float("Positions", self, noone ); - inputs[| 2] = nodeValue_Float("Rotations", self, noone ); + inputs[2] = nodeValue_Float("Rotations", self, noone ); - inputs[| 3] = nodeValue_Float("Scales", self, noone ); + inputs[3] = nodeValue_Float("Scales", self, noone ); - inputs[| 4] = nodeValue_Color("Blend", self, noone ); + inputs[4] = nodeValue_Color("Blend", self, noone ); - inputs[| 5] = nodeValue_Float("Alpha", self, noone ); + inputs[5] = nodeValue_Float("Alpha", self, noone ); - inputs[| 6] = nodeValue_Surface("Surface", self) + inputs[6] = nodeValue_Surface("Surface", self) .setVisible(true, false); - outputs[| 0] = nodeValue_Output("Particles", self, VALUE_TYPE.particle, -1 ); + outputs[0] = nodeValue_Output("Particles", self, VALUE_TYPE.particle, -1 ); static update = function(frame = CURRENT_FRAME) { var parts = getInputData(0); @@ -38,12 +38,12 @@ function Node_VFX_Override(_x, _y, _group = noone) : Node(_x, _y, _group) constr var nParts = array_create(array_length(parts)); - var _a_pos = inputs[| 1].value_from != noone; - var _a_rot = inputs[| 2].value_from != noone; - var _a_sca = inputs[| 3].value_from != noone; - var _a_col = inputs[| 4].value_from != noone; - var _a_alp = inputs[| 5].value_from != noone; - var _a_srf = inputs[| 6].value_from != noone; + var _a_pos = inputs[1].value_from != noone; + var _a_rot = inputs[2].value_from != noone; + var _a_sca = inputs[3].value_from != noone; + var _a_col = inputs[4].value_from != noone; + var _a_alp = inputs[5].value_from != noone; + var _a_srf = inputs[6].value_from != noone; if(array_get_depth(_pos) < 2) _pos = [ _pos ]; if(array_get_depth(_sca) < 2) _sca = [ _sca ]; @@ -80,7 +80,7 @@ function Node_VFX_Override(_x, _y, _group = noone) : Node(_x, _y, _group) constr nParts[i] = nPart; } - outputs[| 0].setValue(nParts); + outputs[0].setValue(nParts); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_VFX_renderer/node_VFX_renderer.gml b/scripts/node_VFX_renderer/node_VFX_renderer.gml index 0d8c32d0d..2b971aa1b 100644 --- a/scripts/node_VFX_renderer/node_VFX_renderer.gml +++ b/scripts/node_VFX_renderer/node_VFX_renderer.gml @@ -6,15 +6,15 @@ function Node_VFX_Renderer(_x, _y, _group = noone) : Node(_x, _y, _group) constr manual_ungroupable = false; - inputs[| 0] = nodeValue_Vector("Output dimension", self, DEF_SURF ); + inputs[0] = nodeValue_Vector("Output dimension", self, DEF_SURF ); - inputs[| 1] = nodeValue_Bool("Round position", self, true, "Round position to the closest integer value to avoid jittering.") + inputs[1] = nodeValue_Bool("Round position", self, true, "Round position to the closest integer value to avoid jittering.") .rejectArray(); - inputs[| 2] = nodeValue_Enum_Button("Render Type", self, PARTICLE_RENDER_TYPE.surface , [ "Surface", "Line" ]) + inputs[2] = nodeValue_Enum_Button("Render Type", self, PARTICLE_RENDER_TYPE.surface , [ "Surface", "Line" ]) .rejectArray(); - inputs[| 3] = nodeValue_Int("Line life", self, 4 ) + inputs[3] = nodeValue_Int("Line life", self, 4 ) .rejectArray(); input_display_list = [ @@ -26,23 +26,23 @@ function Node_VFX_Renderer(_x, _y, _group = noone) : Node(_x, _y, _group) constr attribute_interpolation(); static createNewInput = function() { - var index = ds_list_size(inputs); + var index = array_length(inputs); - inputs[| index + 0] = nodeValue_Enum_Scroll("Blend mode", self, 0 , [ "Normal", "Alpha", "Additive" ]) + inputs[index + 0] = nodeValue_Enum_Scroll("Blend mode", self, 0 , [ "Normal", "Alpha", "Additive" ]) .rejectArray(); - inputs[| index + 1] = nodeValue_Particle("Particles", self, noone ) + inputs[index + 1] = nodeValue_Particle("Particles", self, noone ) .setVisible(true, true); array_push(input_display_list, ["Particle", false], index + 0, index + 1); - return inputs[| index + 1]; + return inputs[index + 1]; } setDynamicInput(2, true, VALUE_TYPE.particle); dyna_input_check_shift = 1; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); insp2UpdateTooltip = "Clear cache"; insp2UpdateIcon = [ THEME.cache, 0, COLORS._main_icon ]; @@ -52,7 +52,7 @@ function Node_VFX_Renderer(_x, _y, _group = noone) : Node(_x, _y, _group) constr static step = function() { #region var _typ = getInputData(2); - inputs[| 3].setVisible(_typ == PARTICLE_RENDER_TYPE.line); + inputs[3].setVisible(_typ == PARTICLE_RENDER_TYPE.line); if(previewing && is_instanceof(group, Node_VFX_Group)) group.preview_node = self; @@ -64,14 +64,14 @@ function Node_VFX_Renderer(_x, _y, _group = noone) : Node(_x, _y, _group) constr return; } - var _dim = inputs[| 0].getValue(_time); - var _exact = inputs[| 1].getValue(_time); - var _type = inputs[| 2].getValue(_time); - var _llife = inputs[| 3].getValue(_time); + var _dim = inputs[0].getValue(_time); + var _exact = inputs[1].getValue(_time); + var _type = inputs[2].getValue(_time); + var _llife = inputs[3].getValue(_time); - var _outSurf = outputs[| 0].getValue(); + var _outSurf = outputs[0].getValue(); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); - outputs[| 0].setValue(_outSurf); + outputs[0].setValue(_outSurf); var surf_w = surface_get_width_safe(_outSurf); var surf_h = surface_get_height_safe(_outSurf); @@ -80,9 +80,9 @@ function Node_VFX_Renderer(_x, _y, _group = noone) : Node(_x, _y, _group) constr if(_type == PARTICLE_RENDER_TYPE.surface) shader_set_interpolation(_outSurf); - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { - var blend = inputs[| i + 0].getValue(_time); - var parts = inputs[| i + 1].getValue(_time); + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { + var blend = inputs[i + 0].getValue(_time); + var parts = inputs[i + 1].getValue(_time); switch(blend) { case PARTICLE_BLEND_MODE.normal: BLEND_NORMAL; break; diff --git a/scripts/node_VFX_renderer_output/node_VFX_renderer_output.gml b/scripts/node_VFX_renderer_output/node_VFX_renderer_output.gml index c3102be2c..36e1762e9 100644 --- a/scripts/node_VFX_renderer_output/node_VFX_renderer_output.gml +++ b/scripts/node_VFX_renderer_output/node_VFX_renderer_output.gml @@ -7,15 +7,15 @@ function Node_VFX_Renderer_Output(_x, _y, _group = noone) : Node_Group_Output(_x manual_ungroupable = false; previewable = true; - inputs[| 0] = nodeValue_Vector("Output dimension", self, DEF_SURF); + inputs[0] = nodeValue_Vector("Output dimension", self, DEF_SURF); - inputs[| 1] = nodeValue_Bool("Round position", self, true, "Round position to the closest integer value to avoid jittering.") + inputs[1] = nodeValue_Bool("Round position", self, true, "Round position to the closest integer value to avoid jittering.") .rejectArray(); - inputs[| 2] = nodeValue_Enum_Button("Render Type", self, PARTICLE_RENDER_TYPE.surface , [ "Surface", "Line" ]) + inputs[2] = nodeValue_Enum_Button("Render Type", self, PARTICLE_RENDER_TYPE.surface , [ "Surface", "Line" ]) .rejectArray(); - inputs[| 3] = nodeValue_Int("Line life", self, 4 ) + inputs[3] = nodeValue_Int("Line life", self, 4 ) .rejectArray(); input_display_list = [ @@ -32,17 +32,17 @@ function Node_VFX_Renderer_Output(_x, _y, _group = noone) : Node_Group_Output(_x static onInspector2Update = function() { clearCache(); } static createNewInput = function() { - var index = ds_list_size(inputs); + var index = array_length(inputs); - inputs[| index + 0] = nodeValue_Enum_Scroll("Blend mode", self, 0 , [ "Normal", "Alpha", "Additive" ]) + inputs[index + 0] = nodeValue_Enum_Scroll("Blend mode", self, 0 , [ "Normal", "Alpha", "Additive" ]) .rejectArray(); - inputs[| index + 1] = nodeValue_Particle("Particles", self, noone ) + inputs[index + 1] = nodeValue_Particle("Particles", self, noone ) .setVisible(true, true); array_push(input_display_list, ["Particle", false], index + 0, index + 1); - return inputs[| index + 1]; + return inputs[index + 1]; } setDynamicInput(2, true, VALUE_TYPE.particle); @@ -53,14 +53,14 @@ function Node_VFX_Renderer_Output(_x, _y, _group = noone) : Node_Group_Output(_x if(!is_struct(group)) return; if(!is_undefined(outParent)) - ds_list_remove(group.outputs, outParent); + array_remove(group.outputs, outParent); outParent = nodeValue("Rendered", group, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone) .uncache() .setVisible(true, true); outParent.from = self; - ds_list_add(group.outputs, outParent); + array_push(group.outputs, outParent); group.refreshNodeDisplay(); group.sortIO(); } if(!LOADING && !APPENDING) createOutput(); #endregion @@ -71,7 +71,7 @@ function Node_VFX_Renderer_Output(_x, _y, _group = noone) : Node_Group_Output(_x var _dim = getInputData(0); var _typ = getInputData(2); - inputs[| 3].setVisible(_typ == PARTICLE_RENDER_TYPE.line); + inputs[3].setVisible(_typ == PARTICLE_RENDER_TYPE.line); var _outSurf = outParent.getValue(); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); @@ -88,10 +88,10 @@ function Node_VFX_Renderer_Output(_x, _y, _group = noone) : Node_Group_Output(_x return; } - var _dim = inputs[| 0].getValue(_time); - var _exact = inputs[| 1].getValue(_time); - var _type = inputs[| 2].getValue(_time); - var _llife = inputs[| 3].getValue(_time); + var _dim = inputs[0].getValue(_time); + var _exact = inputs[1].getValue(_time); + var _type = inputs[2].getValue(_time); + var _llife = inputs[3].getValue(_time); var _outSurf = outParent.getValue(); @@ -105,9 +105,9 @@ function Node_VFX_Renderer_Output(_x, _y, _group = noone) : Node_Group_Output(_x if(_type == PARTICLE_RENDER_TYPE.surface) shader_set_interpolation(_outSurf); - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { - var blend = inputs[| i + 0].getValue(_time); - var parts = inputs[| i + 1].getValue(_time); + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { + var blend = inputs[i + 0].getValue(_time); + var parts = inputs[i + 1].getValue(_time); switch(blend) { case PARTICLE_BLEND_MODE.normal: BLEND_NORMAL; break; diff --git a/scripts/node_VFX_repel/node_VFX_repel.gml b/scripts/node_VFX_repel/node_VFX_repel.gml index 167395a99..a58c508fd 100644 --- a/scripts/node_VFX_repel/node_VFX_repel.gml +++ b/scripts/node_VFX_repel/node_VFX_repel.gml @@ -2,7 +2,7 @@ function Node_VFX_Repel(_x, _y, _group = noone) : Node_VFX_effector(_x, _y, _gro name = "Repel"; node_draw_icon = s_node_vfx_repel; - inputs[| 4].setVisible(false, false); + inputs[4].setVisible(false, false); function onAffect(part, str) { var _area = getInputData(1); diff --git a/scripts/node_VFX_spawner/node_VFX_spawner.gml b/scripts/node_VFX_spawner/node_VFX_spawner.gml index 3a4c388a0..796b81dd2 100644 --- a/scripts/node_VFX_spawner/node_VFX_spawner.gml +++ b/scripts/node_VFX_spawner/node_VFX_spawner.gml @@ -10,17 +10,17 @@ function Node_VFX_Spawner(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y array_push(attributeEditors, ["Output all particles", function() { return attributes.Output_pool; }, new checkBox(function() { attributes.Output_pool = !attributes.Output_pool; }) ]); - inputs[| 21].setVisible(false, false); + inputs[21].setVisible(false, false); - inputs[| input_len + 0] = nodeValue("Spawn trigger", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, false) + inputs[input_len + 0] = nodeValue("Spawn trigger", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, false) .setVisible(true, true); - inputs[| input_len + 1] = nodeValue_Int("Step interval", self, 1, "How often the 'on step' event is triggered.\nWith 1 being trigger every frame, 2 means triggered once every 2 frames."); + inputs[input_len + 1] = nodeValue_Int("Step interval", self, 1, "How often the 'on step' event is triggered.\nWith 1 being trigger every frame, 2 means triggered once every 2 frames."); - outputs[| 0] = nodeValue_Output("Particles", self, VALUE_TYPE.particle, [] ); - outputs[| 1] = nodeValue_Output("On create", self, VALUE_TYPE.node, noone ); - outputs[| 2] = nodeValue_Output("On step", self, VALUE_TYPE.node, noone ); - outputs[| 3] = nodeValue_Output("On destroy", self, VALUE_TYPE.node, noone ); + outputs[0] = nodeValue_Output("Particles", self, VALUE_TYPE.particle, [] ); + outputs[1] = nodeValue_Output("On create", self, VALUE_TYPE.node, noone ); + outputs[2] = nodeValue_Output("On step", self, VALUE_TYPE.node, noone ); + outputs[3] = nodeValue_Output("On destroy", self, VALUE_TYPE.node, noone ); array_insert(input_display_list, 0, ["Trigger", true], input_len + 0, input_len + 1); @@ -30,7 +30,7 @@ function Node_VFX_Spawner(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y if(IS_PLAYING) runVFX(frame); if(attributes.Output_pool) { - outputs[| 0].setValue(parts); + outputs[0].setValue(parts); return; } else { var _parts = []; @@ -38,16 +38,16 @@ function Node_VFX_Spawner(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y if(!parts[i].active) continue; array_push(_parts, parts[i]); } - outputs[| 0].setValue(_parts); + outputs[0].setValue(_parts); } } static onSpawn = function(_time, part) { - part.step_int = inputs[| input_len + 1].getValue(_time); + part.step_int = inputs[input_len + 1].getValue(_time); } static onPartCreate = function(part) { - var vt = outputs[| 1]; + var vt = outputs[1]; if(array_empty(vt.value_to)) return; var pv = part.getPivot(); @@ -60,7 +60,7 @@ function Node_VFX_Spawner(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y } static onPartStep = function(part) { - var vt = outputs[| 2]; + var vt = outputs[2]; if(array_empty(vt.value_to)) return; var pv = part.getPivot(); @@ -73,7 +73,7 @@ function Node_VFX_Spawner(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y } static onPartDestroy = function(part) { - var vt = outputs[| 3]; + var vt = outputs[3]; if(array_empty(vt.value_to)) return; var pv = part.getPivot(); diff --git a/scripts/node_VFX_trail/node_VFX_trail.gml b/scripts/node_VFX_trail/node_VFX_trail.gml index 25e62670c..1cecc4450 100644 --- a/scripts/node_VFX_trail/node_VFX_trail.gml +++ b/scripts/node_VFX_trail/node_VFX_trail.gml @@ -10,14 +10,14 @@ function Node_VFX_Trail(_x, _y, _group = noone) : Node(_x, _y, _group) construct lineLength = []; lineData = []; - inputs[| 0] = nodeValue_Particle("Particles", self, -1 ) + inputs[0] = nodeValue_Particle("Particles", self, -1 ) .setVisible(true, true); - inputs[| 1] = nodeValue_Int("Life", self, 4 ); + inputs[1] = nodeValue_Int("Life", self, 4 ); - inputs[| 2] = nodeValue_Bool("Color", self, false ); + inputs[2] = nodeValue_Bool("Color", self, false ); - outputs[| 0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); + outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region draw_set_color(COLORS._main_accent); @@ -146,7 +146,7 @@ function Node_VFX_Trail(_x, _y, _group = noone) : Node(_x, _y, _group) construct array_resize(lineLength, _len); array_resize(lineData, _len); - outputs[| 0].setValue(self); + outputs[0].setValue(self); } #endregion static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region diff --git a/scripts/node_VFX_triangulate/node_VFX_triangulate.gml b/scripts/node_VFX_triangulate/node_VFX_triangulate.gml index 5c3c65a3c..defd76e6d 100644 --- a/scripts/node_VFX_triangulate/node_VFX_triangulate.gml +++ b/scripts/node_VFX_triangulate/node_VFX_triangulate.gml @@ -14,20 +14,20 @@ function Node_VFX_Triangulate(_x, _y, _group = noone) : Node(_x, _y, _group) con manual_ungroupable = false; - inputs[| 0] = nodeValue_Vector("Output dimension", self, DEF_SURF ); + inputs[0] = nodeValue_Vector("Output dimension", self, DEF_SURF ); - inputs[| 1] = nodeValue_Particle("Particles", self, -1 ) + inputs[1] = nodeValue_Particle("Particles", self, -1 ) .setVisible(true, true); - inputs[| 2] = nodeValue_Float("Thickness", self, 1 ); + inputs[2] = nodeValue_Float("Thickness", self, 1 ); - inputs[| 3] = nodeValue_Color("Color", self, c_white ); + inputs[3] = nodeValue_Color("Color", self, c_white ); - inputs[| 4] = nodeValue_Bool("Inherit Thickness", self, false ); + inputs[4] = nodeValue_Bool("Inherit Thickness", self, false ); - inputs[| 5] = nodeValue_Bool("Inherit Color", self, false ); + inputs[5] = nodeValue_Bool("Inherit Color", self, false ); - outputs[| 0] = nodeValue_Output("Triangles", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Triangles", self, VALUE_TYPE.surface, noone); input_display_list = [ 0, [ "Particles", false], 1, @@ -43,8 +43,8 @@ function Node_VFX_Triangulate(_x, _y, _group = noone) : Node(_x, _y, _group) con var _ith = getInputData(4); var _icl = getInputData(5); - inputs[| 2].setVisible(!_ith); - inputs[| 3].setVisible(!_icl); + inputs[2].setVisible(!_ith); + inputs[3].setVisible(!_icl); } #endregion static update = function() { #region @@ -56,9 +56,9 @@ function Node_VFX_Triangulate(_x, _y, _group = noone) : Node(_x, _y, _group) con var _ith = getInputData(4); var _icl = getInputData(5); - var _surf = outputs[| 0].getValue(); + var _surf = outputs[0].getValue(); _surf = surface_verify(_surf, _dim[0], _dim[1]); - outputs[| 0].setValue(_surf); + outputs[0].setValue(_surf); var _vrx = array_create(array_length(_par)); var _ind = 0; diff --git a/scripts/node_VFX_turbulence/node_VFX_turbulence.gml b/scripts/node_VFX_turbulence/node_VFX_turbulence.gml index e993687ce..134686992 100644 --- a/scripts/node_VFX_turbulence/node_VFX_turbulence.gml +++ b/scripts/node_VFX_turbulence/node_VFX_turbulence.gml @@ -2,11 +2,11 @@ function Node_VFX_Turbulence(_x, _y, _group = noone) : Node_VFX_effector(_x, _y, name = "Turbulence"; node_draw_icon = s_node_vfx_turb; - inputs[| 4].setVisible(false, false); + inputs[4].setVisible(false, false); - inputs[| effector_input_length + 0] = nodeValue_Float("Turbulence scale", self, 1 ); + inputs[effector_input_length + 0] = nodeValue_Float("Turbulence scale", self, 1 ); - inputs[| effector_input_length + 1] = nodeValue_Bool("Constant seed", self, false ); + inputs[effector_input_length + 1] = nodeValue_Bool("Constant seed", self, false ); array_push(input_display_list, effector_input_length + 0, effector_input_length + 1); diff --git a/scripts/node_VFX_variable/node_VFX_variable.gml b/scripts/node_VFX_variable/node_VFX_variable.gml index 421eb410f..253232020 100644 --- a/scripts/node_VFX_variable/node_VFX_variable.gml +++ b/scripts/node_VFX_variable/node_VFX_variable.gml @@ -8,48 +8,48 @@ function Node_VFX_Variable(_x, _y, _group = noone) : Node(_x, _y, _group) constr manual_ungroupable = false; - inputs[| 0] = nodeValue_Particle("Particles", self, -1 ) + inputs[0] = nodeValue_Particle("Particles", self, -1 ) .setVisible(true, true); input_display_list = [ 0 ]; - outputs[| 0] = nodeValue_Output("Positions", self, VALUE_TYPE.float, [] ) + outputs[0] = nodeValue_Output("Positions", self, VALUE_TYPE.float, [] ) .setDisplay(VALUE_DISPLAY.none) .setVisible(false); - outputs[| 1] = nodeValue_Output("Scales", self, VALUE_TYPE.float, [] ) + outputs[1] = nodeValue_Output("Scales", self, VALUE_TYPE.float, [] ) .setDisplay(VALUE_DISPLAY.none) .setVisible(false); - outputs[| 2] = nodeValue_Output("Rotations", self, VALUE_TYPE.float, 0 ) + outputs[2] = nodeValue_Output("Rotations", self, VALUE_TYPE.float, 0 ) .setDisplay(VALUE_DISPLAY.none) .setVisible(false); - outputs[| 3] = nodeValue_Output("Blending", self, VALUE_TYPE.color, 0 ) + outputs[3] = nodeValue_Output("Blending", self, VALUE_TYPE.color, 0 ) .setDisplay(VALUE_DISPLAY.none) .setVisible(false); - outputs[| 4] = nodeValue_Output("Alpha", self, VALUE_TYPE.float, 0 ) + outputs[4] = nodeValue_Output("Alpha", self, VALUE_TYPE.float, 0 ) .setDisplay(VALUE_DISPLAY.none) .setVisible(false); - outputs[| 5] = nodeValue_Output("Life", self, VALUE_TYPE.float, 0 ) + outputs[5] = nodeValue_Output("Life", self, VALUE_TYPE.float, 0 ) .setDisplay(VALUE_DISPLAY.none) .setVisible(false); - outputs[| 6] = nodeValue_Output("Max life", self, VALUE_TYPE.float, 0 ) + outputs[6] = nodeValue_Output("Max life", self, VALUE_TYPE.float, 0 ) .setDisplay(VALUE_DISPLAY.none) .setVisible(false); - outputs[| 7] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone ) + outputs[7] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone ) .setDisplay(VALUE_DISPLAY.none) .setVisible(false); - outputs[| 8] = nodeValue_Output("Velocity", self, VALUE_TYPE.float, [] ) + outputs[8] = nodeValue_Output("Velocity", self, VALUE_TYPE.float, [] ) .setDisplay(VALUE_DISPLAY.none) .setVisible(false); - outputs[| 9] = nodeValue_Output("Seed", self, VALUE_TYPE.float, 0 ) + outputs[9] = nodeValue_Output("Seed", self, VALUE_TYPE.float, 0 ) .setDisplay(VALUE_DISPLAY.none) .setVisible(false); @@ -59,26 +59,26 @@ function Node_VFX_Variable(_x, _y, _group = noone) : Node(_x, _y, _group) constr var _val = []; - for( var i = 0; i < ds_list_size(outputs); i++ ) + for( var i = 0; i < array_length(outputs); i++ ) _val[i] = array_create(array_length(parts)); for( var i = 0, n = array_length(parts); i < n; i++ ) { var part = parts[i]; - if(outputs[| 0].visible) _val[0][i] = [part.x, part.y]; - if(outputs[| 1].visible) _val[1][i] = [part.scx, part.scy]; - if(outputs[| 2].visible) _val[2][i] = part.rot; - if(outputs[| 3].visible) _val[3][i] = part.blend; - if(outputs[| 4].visible) _val[4][i] = part.alp; - if(outputs[| 5].visible) _val[5][i] = part.life; - if(outputs[| 6].visible) _val[6][i] = part.life_total; - if(outputs[| 7].visible) _val[7][i] = part.surf; - if(outputs[| 8].visible) _val[8][i] = [part.speedx, part.speedy]; - if(outputs[| 9].visible) _val[9][i] = part.seed; + if(outputs[0].visible) _val[0][i] = [part.x, part.y]; + if(outputs[1].visible) _val[1][i] = [part.scx, part.scy]; + if(outputs[2].visible) _val[2][i] = part.rot; + if(outputs[3].visible) _val[3][i] = part.blend; + if(outputs[4].visible) _val[4][i] = part.alp; + if(outputs[5].visible) _val[5][i] = part.life; + if(outputs[6].visible) _val[6][i] = part.life_total; + if(outputs[7].visible) _val[7][i] = part.surf; + if(outputs[8].visible) _val[8][i] = [part.speedx, part.speedy]; + if(outputs[9].visible) _val[9][i] = part.seed; } - for( var i = 0; i < ds_list_size(outputs); i++ ) - if(outputs[| i].visible) outputs[| i].setValue(_val[i]); + for( var i = 0; i < array_length(outputs); i++ ) + if(outputs[i].visible) outputs[i].setValue(_val[i]); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_VFX_vortex/node_VFX_vortex.gml b/scripts/node_VFX_vortex/node_VFX_vortex.gml index f47d91a77..e28c89321 100644 --- a/scripts/node_VFX_vortex/node_VFX_vortex.gml +++ b/scripts/node_VFX_vortex/node_VFX_vortex.gml @@ -2,13 +2,13 @@ function Node_VFX_Vortex(_x, _y, _group = noone) : Node_VFX_effector(_x, _y, _gr name = "Vortex"; node_draw_icon = s_node_vfx_vortex; - inputs[| 4].setVisible(false, false); + inputs[4].setVisible(false, false); - inputs[| effector_input_length + 0] = nodeValue_Float("Attraction force", self, 2 ); + inputs[effector_input_length + 0] = nodeValue_Float("Attraction force", self, 2 ); - inputs[| effector_input_length + 1] = nodeValue_Bool("Clockwise", self, true ); + inputs[effector_input_length + 1] = nodeValue_Bool("Clockwise", self, true ); - inputs[| effector_input_length + 2] = nodeValue_Bool("Destroy when reach middle", self, false ); + inputs[effector_input_length + 2] = nodeValue_Bool("Destroy when reach middle", self, false ); array_push(input_display_list, effector_input_length + 0, effector_input_length + 1, effector_input_length + 2); diff --git a/scripts/node_action_object/node_action_object.gml b/scripts/node_action_object/node_action_object.gml index d82f842d7..476cd1cbd 100644 --- a/scripts/node_action_object/node_action_object.gml +++ b/scripts/node_action_object/node_action_object.gml @@ -38,7 +38,7 @@ if(is_array(_setVals)) { for(var j = 0, m = array_length(_setVals); j < m; j++ ) { var _setVal = _setVals[j]; - var _input = is_string(_setVal.index)? _node.inputMap[? _setVal.index] : _node.inputs[| _setVal.index]; + var _input = is_string(_setVal.index)? _node.inputMap[? _setVal.index] : _node.inputs[_setVal.index]; if(_input == undefined) continue; if(!value_type_direct_settable(_input.type)) continue; @@ -50,7 +50,7 @@ var _keys = struct_get_names(_setVals); for (var j = 0, m = array_length(_keys); j < m; j++) { var _key = _keys[j]; - var _input = _node.inputs[| _key]; + var _input = _node.inputs[_key]; if(_input == undefined) continue; if(!value_type_direct_settable(_input.type)) continue; @@ -70,8 +70,8 @@ var _toN = _n[$ _c.to]; if(_frN == undefined || _toN == undefined) continue; - var _frO = is_string(_c.fromIndex)? _frN.outputMap[? _c.fromIndex] : _frN.outputs[| _c.fromIndex]; - var _toI = is_string(_c.toIndex)? _toN.inputMap[? _c.toIndex] : _toN.inputs[| _c.toIndex]; + var _frO = is_string(_c.fromIndex)? _frN.outputMap[? _c.fromIndex] : _frN.outputs[_c.fromIndex]; + var _toI = is_string(_c.toIndex)? _toN.inputMap[? _c.toIndex] : _toN.inputs[_c.toIndex]; if(_frO == undefined || _toI == undefined) continue; _toI.setFrom(_frO); diff --git a/scripts/node_active_canvas/node_active_canvas.gml b/scripts/node_active_canvas/node_active_canvas.gml index 50e140c9b..acd48e1ab 100644 --- a/scripts/node_active_canvas/node_active_canvas.gml +++ b/scripts/node_active_canvas/node_active_canvas.gml @@ -1,26 +1,26 @@ function Node_Active_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Active Canvas"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Surface("Texture", self); + inputs[1] = nodeValue_Surface("Texture", self); - inputs[| 2] = nodeValue_Vector("Position", self, [ 0, 0 ] ); + inputs[2] = nodeValue_Vector("Position", self, [ 0, 0 ] ); - inputs[| 3] = nodeValue_Rotation("Rotation", self, 0); + inputs[3] = nodeValue_Rotation("Rotation", self, 0); - inputs[| 4] = nodeValue_Vector("Scale", self, [ 1, 1 ] ); + inputs[4] = nodeValue_Vector("Scale", self, [ 1, 1 ] ); - inputs[| 5] = nodeValue_Color("Color", self, c_white ); + inputs[5] = nodeValue_Color("Color", self, c_white ); - inputs[| 6] = nodeValue_Float("Alpha", self, 1 ) + inputs[6] = nodeValue_Float("Alpha", self, 1 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Bool("Active", self, true ); + inputs[7] = nodeValue_Bool("Active", self, true ); - inputs[| 8] = nodeValue_Range("Distance", self, [ 1, 1 ] , { linked : true }); + inputs[8] = nodeValue_Range("Distance", self, [ 1, 1 ] , { linked : true }); - outputs[| 0] = nodeValue_Output("Output", self, VALUE_TYPE.surface, noone ); + outputs[0] = nodeValue_Output("Output", self, VALUE_TYPE.surface, noone ); input_display_list = [ 0, [ "Brush transform", false ], 7, 2, 3, 4, @@ -33,7 +33,7 @@ function Node_Active_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) const temp_surface = [ surface_create(1, 1) ]; static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } #endregion static step = function() { #region @@ -50,7 +50,7 @@ function Node_Active_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) const } #endregion static update = function() { #region - var _surf = outputs[| 0].getValue(); + var _surf = outputs[0].getValue(); var _dim = getInputData(0); var _bsurf = getInputData(1); @@ -69,7 +69,7 @@ function Node_Active_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) const _bdst[0] = max(0.01, _bdst[0]); _bdst[1] = max(0.01, _bdst[1]); - outputs[| 0].setValue(_surf); + outputs[0].setValue(_surf); if(!_bact) return; surface_set_target(temp_surface[0]); diff --git a/scripts/node_alpha_cutoff/node_alpha_cutoff.gml b/scripts/node_alpha_cutoff/node_alpha_cutoff.gml index 95e27ac10..5e14f06e8 100644 --- a/scripts/node_alpha_cutoff/node_alpha_cutoff.gml +++ b/scripts/node_alpha_cutoff/node_alpha_cutoff.gml @@ -1,17 +1,17 @@ function Node_Alpha_Cutoff(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Alpha Cutoff"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Minimum", self, 0.2, "Any pixel with less alpha (more transparent) than this will be removed.") + inputs[1] = nodeValue_Float("Minimum", self, 0.2, "Any pixel with less alpha (more transparent) than this will be removed.") .setDisplay(VALUE_DISPLAY.slider); - inputs[| 2] = nodeValue_Surface("Mask", self); + inputs[2] = nodeValue_Surface("Mask", self); - inputs[| 3] = nodeValue_Float("Mix", self, 1) + inputs[3] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 4] = nodeValue_Bool("Active", self, true); + inputs[4] = nodeValue_Bool("Active", self, true); active_index = 4; __init_mask_modifier(2); // inputs 5, 6, @@ -21,7 +21,7 @@ function Node_Alpha_Cutoff(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro ["Cutoff", false], 1, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); diff --git a/scripts/node_alpha_grey/node_alpha_grey.gml b/scripts/node_alpha_grey/node_alpha_grey.gml index bb7399a82..ced4d412a 100644 --- a/scripts/node_alpha_grey/node_alpha_grey.gml +++ b/scripts/node_alpha_grey/node_alpha_grey.gml @@ -1,12 +1,12 @@ function Node_Alpha_Grey(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Alpha to Grey"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Bool("Active", self, true); + inputs[1] = nodeValue_Bool("Active", self, true); active_index = 1; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 1, ["Surfaces", false], 0, diff --git a/scripts/node_alpha_hash/node_alpha_hash.gml b/scripts/node_alpha_hash/node_alpha_hash.gml index 7ba31b9df..80f17f3af 100644 --- a/scripts/node_alpha_hash/node_alpha_hash.gml +++ b/scripts/node_alpha_hash/node_alpha_hash.gml @@ -14,9 +14,9 @@ function Node_Alpha_Hash(_x, _y, _group = noone) : Node_Processor(_x, _y, _group 15, 47, 7, 39, 13, 45, 5, 37, 63, 31, 55, 23, 61, 29, 53, 21]; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); diff --git a/scripts/node_anim_curve/node_anim_curve.gml b/scripts/node_anim_curve/node_anim_curve.gml index dc4f7205a..7cedf23d3 100644 --- a/scripts/node_anim_curve/node_anim_curve.gml +++ b/scripts/node_anim_curve/node_anim_curve.gml @@ -4,23 +4,23 @@ function Node_Anim_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group setDimension(96, 48); - inputs[| 0] = nodeValue("Curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); - inputs[| 1] = nodeValue_Float("Progress", self, 0) + inputs[0] = nodeValue("Curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + inputs[1] = nodeValue_Float("Progress", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 2] = nodeValue_Float("Minimum", self, 0); - inputs[| 3] = nodeValue_Float("Maximum", self, 1); + inputs[2] = nodeValue_Float("Minimum", self, 0); + inputs[3] = nodeValue_Float("Maximum", self, 1); - inputs[| 4] = nodeValue_Bool("Animated", self, false); + inputs[4] = nodeValue_Bool("Animated", self, false); - outputs[| 0] = nodeValue_Output("Curve", self, VALUE_TYPE.float, []); + outputs[0] = nodeValue_Output("Curve", self, VALUE_TYPE.float, []); input_display_list = [ 0, 4, 1, 2, 3 ]; static step = function() { var _anim = getSingleValue(4); - inputs[| 1].setVisible(!_anim); + inputs[1].setVisible(!_anim); } static processData = function(_output, _data, _output_index, _array_index = 0) { @@ -30,7 +30,7 @@ function Node_Anim_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group var _max = _data[3]; var val = eval_curve_x(curve, time) * (_max - _min) + _min; - inputs[| 0].editWidget.progress_draw = time; + inputs[0].editWidget.progress_draw = time; return val; } diff --git a/scripts/node_animation_control/node_animation_control.gml b/scripts/node_animation_control/node_animation_control.gml index 403e8f1fd..013196352 100644 --- a/scripts/node_animation_control/node_animation_control.gml +++ b/scripts/node_animation_control/node_animation_control.gml @@ -2,19 +2,19 @@ function Node_Animation_Control(_x, _y, _group = noone) : Node(_x, _y, _group) c name = "Animation Control"; setDimension(96, 96); - inputs[| 0] = nodeValue_Trigger("Toggle Play / Pause", self, false ); + inputs[0] = nodeValue_Trigger("Toggle Play / Pause", self, false ); - inputs[| 1] = nodeValue_Trigger("Pause", self, false ); + inputs[1] = nodeValue_Trigger("Pause", self, false ); - inputs[| 2] = nodeValue_Trigger("Resume", self, false ); + inputs[2] = nodeValue_Trigger("Resume", self, false ); - inputs[| 3] = nodeValue_Trigger("Play From Beginning", self, false ); + inputs[3] = nodeValue_Trigger("Play From Beginning", self, false ); - inputs[| 4] = nodeValue_Trigger("Play once", self, false ); + inputs[4] = nodeValue_Trigger("Play once", self, false ); - inputs[| 5] = nodeValue_Trigger("Skip Frames", self, false ); + inputs[5] = nodeValue_Trigger("Skip Frames", self, false ); - inputs[| 6] = nodeValue_Int("Skip Frames Count", self, 1); + inputs[6] = nodeValue_Int("Skip Frames Count", self, 1); static step = function() { if(getInputData(0)) diff --git a/scripts/node_application_in/node_application_in.gml b/scripts/node_application_in/node_application_in.gml index 814f9246e..1e9549f77 100644 --- a/scripts/node_application_in/node_application_in.gml +++ b/scripts/node_application_in/node_application_in.gml @@ -2,7 +2,7 @@ function Node_Application_In(_x, _y, _group = noone) : Node(_x, _y, _group) cons name = "GUI In"; update_on_frame = true; - inputs[| 0] = nodeValue_Surface("GUI", self); + inputs[0] = nodeValue_Surface("GUI", self); APP_SURF_OVERRIDE = true; @@ -11,7 +11,7 @@ function Node_Application_In(_x, _y, _group = noone) : Node(_x, _y, _group) cons } #endregion static update = function() { #region - var s = inputs[| 0].getValue(); + var s = inputs[0].getValue(); if(!is_surface(s)) return; diff --git a/scripts/node_application_out/node_application_out.gml b/scripts/node_application_out/node_application_out.gml index ee4fa350e..ee2cc0c4d 100644 --- a/scripts/node_application_out/node_application_out.gml +++ b/scripts/node_application_out/node_application_out.gml @@ -8,7 +8,7 @@ function Node_Application_Out(_x, _y, _group = noone) : Node(_x, _y, _group) con name = "GUI Out"; update_on_frame = true; - outputs[| 0] = nodeValue_Output("GUI", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("GUI", self, VALUE_TYPE.surface, noone); APP_SURF_OVERRIDE = true; @@ -17,6 +17,6 @@ function Node_Application_Out(_x, _y, _group = noone) : Node(_x, _y, _group) con } #endregion static update = function() { #region - outputs[| 0].setValue(PRE_APP_SURF); + outputs[0].setValue(PRE_APP_SURF); } #endregion } \ No newline at end of file diff --git a/scripts/node_area/node_area.gml b/scripts/node_area/node_area.gml index b9fa38d98..b8f2cd382 100644 --- a/scripts/node_area/node_area.gml +++ b/scripts/node_area/node_area.gml @@ -3,20 +3,20 @@ function Node_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons color = COLORS.node_blend_number; setDimension(96, 48); - inputs[| 0] = nodeValue_Vector("Position", self, [ 0, 0 ] ) + inputs[0] = nodeValue_Vector("Position", self, [ 0, 0 ] ) .setVisible(true, true); - inputs[| 1] = nodeValue_Vector("Span", self, [ 16, 16 ] ) + inputs[1] = nodeValue_Vector("Span", self, [ 16, 16 ] ) .setVisible(true, true); - inputs[| 2] = nodeValue_Enum_Scroll("Shape", self, AREA_SHAPE.rectangle, [ + inputs[2] = nodeValue_Enum_Scroll("Shape", self, AREA_SHAPE.rectangle, [ new scrollItem("Rectangle", s_node_shape_rectangle, 0), new scrollItem("Elipse", s_node_shape_circle, 0) ]); - inputs[| 3] = nodeValue_Enum_Scroll("Type", self, 0, [ "Center Span", "Two Point" ]); + inputs[3] = nodeValue_Enum_Scroll("Type", self, 0, [ "Center Span", "Two Point" ]); - outputs[| 0] = nodeValue_Output("Area", self, VALUE_TYPE.float, [ 0, 0, 0, 0, AREA_SHAPE.rectangle ]) + outputs[0] = nodeValue_Output("Area", self, VALUE_TYPE.float, [ 0, 0, 0, 0, AREA_SHAPE.rectangle ]) .setDisplay(VALUE_DISPLAY.vector); input_display_list = [ 3, @@ -47,8 +47,8 @@ function Node_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons case AREA_SHAPE.elipse : draw_ellipse(px - ex, py - ey, px + ex, py + ey, true); break; } - hv = inputs[| 0].drawOverlay(_hov, active, _x, _y, _s, _mx, _my, _snx, _sny); _hhh |= hv; _hov &= !hv; - hv = inputs[| 1].drawOverlay(_hov, active, px, py, _s, _mx, _my, _snx, _sny); _hhh |= hv; _hov &= !hv; + hv = inputs[0].drawOverlay(_hov, active, _x, _y, _s, _mx, _my, _snx, _sny); _hhh |= hv; _hov &= !hv; + hv = inputs[1].drawOverlay(_hov, active, px, py, _s, _mx, _my, _snx, _sny); _hhh |= hv; _hov &= !hv; } else if(_type == 1) { var _v0 = current_data[0]; @@ -65,8 +65,8 @@ function Node_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons case AREA_SHAPE.elipse : draw_ellipse(px, py, ex, ey, true); break; } - hv = inputs[| 0].drawOverlay(_hov, active, _x, _y, _s, _mx, _my, _snx, _sny); _hhh |= hv; _hov &= !hv; - hv = inputs[| 1].drawOverlay(_hov, active, _x, _y, _s, _mx, _my, _snx, _sny); _hhh |= hv; _hov &= !hv; + hv = inputs[0].drawOverlay(_hov, active, _x, _y, _s, _mx, _my, _snx, _sny); _hhh |= hv; _hov &= !hv; + hv = inputs[1].drawOverlay(_hov, active, _x, _y, _s, _mx, _my, _snx, _sny); _hhh |= hv; _hov &= !hv; } return _hhh; @@ -79,14 +79,14 @@ function Node_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons var _type = _data[3]; if(_type == 0) { - inputs[| 0].setName("Position"); - inputs[| 1].setName("Span"); + inputs[0].setName("Position"); + inputs[1].setName("Span"); return [ _v0[0], _v0[1], _v1[0], _v1[1], _shap ]; } else if(_type == 1) { - inputs[| 0].setName("Point 1"); - inputs[| 1].setName("Point 2"); + inputs[0].setName("Point 1"); + inputs[1].setName("Point 2"); var xc = ( _v0[0] + _v1[0] ) / 2; var yc = ( _v0[1] + _v1[1] ) / 2; diff --git a/scripts/node_argument/node_argument.gml b/scripts/node_argument/node_argument.gml index a53154e7f..2ae7e5318 100644 --- a/scripts/node_argument/node_argument.gml +++ b/scripts/node_argument/node_argument.gml @@ -4,25 +4,25 @@ function Node_Argument(_x, _y, _group = noone) : Node(_x, _y, _group) constructo draw_padding = 8; - inputs[| 0] = nodeValue_Text("Tag", self, ""); + inputs[0] = nodeValue_Text("Tag", self, ""); - inputs[| 1] = nodeValue_Enum_Scroll("Type", self, 0, [ "String", "Number" ]); + inputs[1] = nodeValue_Enum_Scroll("Type", self, 0, [ "String", "Number" ]); - inputs[| 2] = nodeValue_Text("Default value", self, ""); + inputs[2] = nodeValue_Text("Default value", self, ""); - outputs[| 0] = nodeValue_Output("Value", self, VALUE_TYPE.text, ""); + outputs[0] = nodeValue_Output("Value", self, VALUE_TYPE.text, ""); static step = function() { #region var typ = getInputData(1); switch(typ) { case 0 : - inputs[| 2].setType(VALUE_TYPE.text); - outputs[| 0].setType(VALUE_TYPE.text); + inputs[2].setType(VALUE_TYPE.text); + outputs[0].setType(VALUE_TYPE.text); break; case 1 : - inputs[| 2].setType(VALUE_TYPE.float); - outputs[| 0].setType(VALUE_TYPE.float); + inputs[2].setType(VALUE_TYPE.float); + outputs[0].setType(VALUE_TYPE.float); break; } } #endregion @@ -34,8 +34,8 @@ function Node_Argument(_x, _y, _group = noone) : Node(_x, _y, _group) constructo var val = struct_try_get(PROGRAM_ARGUMENTS, tag, def); switch(typ) { - case 0 : outputs[| 0].setValue(val); break; - case 1 : outputs[| 0].setValue(toNumber(val)); break; + case 0 : outputs[0].setValue(val); break; + case 1 : outputs[0].setValue(toNumber(val)); break; } } #endregion diff --git a/scripts/node_armature/node_armature.gml b/scripts/node_armature/node_armature.gml index 582640e20..17fb7a6f9 100644 --- a/scripts/node_armature/node_armature.gml +++ b/scripts/node_armature/node_armature.gml @@ -2,7 +2,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo name = "Armature Create"; setDimension(96, 72); - //inputs[| 0] = nodeValue_Int("Axis", self, 0); + //inputs[0] = nodeValue_Int("Axis", self, 0); bone_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { #region var _b = attributes.bones; @@ -138,7 +138,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo return bone; } #endregion - outputs[| 0] = nodeValue_Output("Armature", self, VALUE_TYPE.armature, noone); + outputs[0] = nodeValue_Output("Armature", self, VALUE_TYPE.armature, noone); #region ++++ attributes ++++ attributes.bones = new __Bone(,,,,, self); @@ -562,7 +562,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo static step = function() {} static update = function(frame = CURRENT_FRAME) { #region - outputs[| 0].setValue(attributes.bones); + outputs[0].setValue(attributes.bones); } #endregion static getPreviewBoundingBox = function() { #region diff --git a/scripts/node_armature_bind/node_armature_bind.gml b/scripts/node_armature_bind/node_armature_bind.gml index 1517ee72f..a4fb23807 100644 --- a/scripts/node_armature_bind/node_armature_bind.gml +++ b/scripts/node_armature_bind/node_armature_bind.gml @@ -12,27 +12,27 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr name = "Armature Bind"; batch_output = false; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Armature("Armature", self, noone) + inputs[1] = nodeValue_Armature("Armature", self, noone) .setVisible(true, true) .rejectArray(); - inputs[| 2] = nodeValue_Struct("Bind data", self, noone) + inputs[2] = nodeValue_Struct("Bind data", self, noone) .setVisible(true, true) .setArrayDepth(1); - inputs[| 3] = nodeValue_Vector("Bone transform", self, [ 0, 0 ]); + inputs[3] = nodeValue_Vector("Bone transform", self, [ 0, 0 ]); - inputs[| 4] = nodeValue_Float("Bone scale", self, 1) + inputs[4] = nodeValue_Float("Bone scale", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0.1, 2, 0.01 ] }); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Atlas data", self, VALUE_TYPE.surface, []) + outputs[1] = nodeValue_Output("Atlas data", self, VALUE_TYPE.surface, []) .rejectArrayProcess(); - outputs[| 2] = nodeValue_Output("Bind data", self, VALUE_TYPE.struct, []) + outputs[2] = nodeValue_Output("Bind data", self, VALUE_TYPE.struct, []) .setArrayDepth(1); attribute_surface_depth(); @@ -68,14 +68,14 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr ds_map_clear(surfMap); var index = -1; - var amo = min(ds_list_size(inputs) - data_length, array_length(current_data)); + var amo = min(array_length(inputs) - data_length, array_length(current_data)); var _bind = getSingleValue(2); var use_data = _bind != noone; for(var i = input_fix_len; i < amo; i += data_length) { index++; var _surf = current_data[i]; - var _id = inputs[| i].display_data.bone_id; + var _id = inputs[i].display_data.bone_id; if(_id == "") continue; if(ds_map_exists(surfMap, _id)) @@ -151,7 +151,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr TOOLTIP = [ _surf, VALUE_TYPE.surface ]; if(mouse_press(mb_left, _focus)) { layer_dragging = _sid; - inputs[| input_fix_len + _sid * data_length].display_data.bone_id = ""; + inputs[input_fix_len + _sid * data_length].display_data.bone_id = ""; } draw_set_color(COLORS._main_accent); @@ -182,7 +182,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr if(layer_dragging != noone && hovering && mouse_release(mb_left)) { var _lind = input_fix_len + layer_dragging * data_length; - inputs[| _lind].display_data.bone_id = hovering.ID; + inputs[_lind].display_data.bone_id = hovering.ID; layer_dragging = noone; triggerRender(); @@ -192,8 +192,8 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr draw_sprite_stretched_ext(THEME.ui_panel, 1, _x, _ty, _w, bh - ui(32), COLORS._main_accent, 1); #endregion - var amo = floor((ds_list_size(inputs) - input_fix_len) / data_length); - if(array_length(current_data) != ds_list_size(inputs)) return 0; + var amo = floor((array_length(inputs) - input_fix_len) / data_length); + if(array_length(current_data) != array_length(inputs)) return 0; if(use_data) { layer_renderer.h = bh + ui(8); @@ -299,7 +299,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr draw_set_text(f_p1, fa_left, fa_center, hover? COLORS._main_text : COLORS._main_text); draw_set_alpha(aa); - draw_text(_sx1 + 12, _cy + lh / 2, inputs[| _inp].name); + draw_text(_sx1 + 12, _cy + lh / 2, inputs[_inp].name); draw_set_alpha(1); if(_hover && point_in_rectangle(_m[0], _m[1], _x, _cy, _x + _w, _cy + lh)) { @@ -313,7 +313,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr } } - var binded = inputs[| _inp].display_data.bone_id != ""; + var binded = inputs[_inp].display_data.bone_id != ""; if(layer_dragging == noone || layer_dragging == index) { var _bx = _x + 24; @@ -350,12 +350,12 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr array_insert(_sel, hoverIndex, sel); for( var i = 0; i < data_length; i++ ) { - ext[i] = inputs[| index]; - ds_list_delete(inputs, index); + ext[i] = inputs[index]; + array_delete(inputs, index, 1); } for( var i = 0; i < data_length; i++ ) { - ds_list_insert(inputs, targt + i, ext[i]); + array_insert(inputs, targt + i, ext[i]); } doUpdate(); @@ -379,7 +379,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr function deleteLayer(index) { var idx = input_fix_len + index * data_length; for( var i = 0; i < data_length; i++ ) { - ds_list_delete(inputs, idx); + array_delete(inputs, idx, 1); array_remove(input_display_list, idx + i); } @@ -392,21 +392,21 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr } static createNewInput = function() { - var index = ds_list_size(inputs); + var index = array_length(inputs); var _s = floor((index - input_fix_len) / data_length); - inputs[| index + 0] = nodeValue_Surface("Surface", self); - inputs[| index + 0].surface_index = index; - inputs[| index + 0].hover_effect = 0; - inputs[| index + 0].display_data.bone_id = ""; + inputs[index + 0] = nodeValue_Surface("Surface", self); + inputs[index + 0].surface_index = index; + inputs[index + 0].hover_effect = 0; + inputs[index + 0].display_data.bone_id = ""; - inputs[| index + 1] = nodeValue_Float("Transform", self, [ 0, 0, 0, 1, 1 ] ) + inputs[index + 1] = nodeValue_Float("Transform", self, [ 0, 0, 0, 1, 1 ] ) .setDisplay(VALUE_DISPLAY.transform); - inputs[| index + 2] = nodeValue_Bool("Inherit Rotation", self, true ); - inputs[| index + 3] = nodeValue_Bool("Apply Bone Rotation", self, false ); + inputs[index + 2] = nodeValue_Bool("Inherit Rotation", self, true ); + inputs[index + 3] = nodeValue_Bool("Apply Bone Rotation", self, false ); - inputs[| index + 4] = nodeValue_Bool("Inherit Scale", self, false ); - inputs[| index + 5] = nodeValue_Bool("Apply Bone Scale", self, false ); + inputs[index + 4] = nodeValue_Bool("Inherit Scale", self, false ); + inputs[index + 5] = nodeValue_Bool("Apply Bone Scale", self, false ); for( var i = 0; i < data_length; i++ ) array_push(input_display_list, index + i); @@ -416,7 +416,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr while(_s >= array_length(attributes.layer_selectable)) array_push(attributes.layer_selectable, true); - return inputs[| index + 0]; + return inputs[index + 0]; } setDynamicInput(6); temp_surface = [ surface_create(1, 1), surface_create(1, 1), surface_create(1, 1) ]; @@ -479,8 +479,8 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr if(bone == noone) return; bone.draw(attributes, false, _x + _dpos[0] * _s, _y + _dpos[1] * _s, _s * _dsca, _mx, _my, anchor_selecting); - inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); - //inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + //inputs[4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); var mx = (_mx - _x) / _s; var my = (_my - _y) / _s; @@ -509,7 +509,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr _tran = array_clone(_tran); - var _bone = inputs[| surf_dragging].display_data.bone_id; + var _bone = inputs[surf_dragging].display_data.bone_id; _bone = boneMap[? _bone]; if(drag_type == NODE_COMPOSE_DRAG.move) { @@ -557,7 +557,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr _tran[TRANSFORM.sca_y] = sca_y; } - if(inputs[| surf_dragging + 1].setValue(_tran)) + if(inputs[surf_dragging + 1].setValue(_tran)) UNDO_HOLDING = true; if(mouse_release(mb_left)) { @@ -571,15 +571,15 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr var _vis = attributes.layer_visible; var _sel = attributes.layer_selectable; - var amo = (ds_list_size(inputs) - input_fix_len) / data_length; - var anchors = array_create(ds_list_size(inputs)); + var amo = (array_length(inputs) - input_fix_len) / data_length; + var anchors = array_create(array_length(inputs)); for(var i = 0; i < amo; i++) { #region var index = input_fix_len + i * data_length; var _surf = array_safe_get_fast(current_data, index); if(!_surf || is_array(_surf)) continue; - var _bone = inputs[| index].display_data.bone_id; + var _bone = inputs[index].display_data.bone_id; if(!ds_map_exists(boneMap, _bone)) { //print($"Bone not found {_bone}"); continue; @@ -644,7 +644,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr var _surf = array_safe_get_fast(current_data, index); if(!_surf || is_array(_surf)) continue; - var _bone = inputs[| index].display_data.bone_id; + var _bone = inputs[index].display_data.bone_id; if(!ds_map_exists(boneMap, _bone)) continue; @@ -741,11 +741,11 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr static step = function() { #region var _dim_type = getSingleValue(1); - inputs[| 2].setVisible(_dim_type == COMPOSE_OUTPUT_SCALING.constant); + inputs[2].setVisible(_dim_type == COMPOSE_OUTPUT_SCALING.constant); - for( var i = input_fix_len, n = ds_list_size(inputs); i < n; i += data_length ) { - inputs[| i + 3].setVisible(current_data[i + 2]); - inputs[| i + 5].setVisible(current_data[i + 4]); + for( var i = input_fix_len, n = array_length(inputs); i < n; i += data_length ) { + inputs[i + 3].setVisible(current_data[i + 2]); + inputs[i + 5].setVisible(current_data[i + 4]); } } #endregion @@ -780,7 +780,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr var use_data = _bind != noone; var res_index = 0; var bg = 0; - var imageAmo = use_data? array_length(_bind) : (ds_list_size(inputs) - input_fix_len) / data_length; + var imageAmo = use_data? array_length(_bind) : (array_length(inputs) - input_fix_len) / data_length; var _vis = attributes.layer_visible; var _bg = 0, _s; @@ -802,7 +802,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr if(!is_surface(_s)) continue; - var _b = use_data? _bind[i].bone : inputs[| datInd].display_data.bone_id; + var _b = use_data? _bind[i].bone : inputs[datInd].display_data.bone_id; if(!ds_map_exists(boneMap, _b)) continue; @@ -863,7 +863,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr var _tran = getInputData(surfIndex + 1); var _arot = getInputData(surfIndex + 2); - var _b = use_data? _bind[i].bone : inputs[| surfIndex].display_data.bone_id; + var _b = use_data? _bind[i].bone : inputs[surfIndex].display_data.bone_id; if(!ds_map_exists(boneMap, _b)) return; _b = boneMap[? _b]; @@ -875,7 +875,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr var _rot = _arot? -_b.angle : 0; var _tr = [ _cx - _anc.x, _cy - _anc.y, _rot, 1, 1 ]; - inputs[| surfIndex + 1].setValue(_tr); + inputs[surfIndex + 1].setValue(_tr); } #endregion static attributeSerialize = function() { #region diff --git a/scripts/node_armature_path/node_armature_path.gml b/scripts/node_armature_path/node_armature_path.gml index 698e0617f..ec1bfdd70 100644 --- a/scripts/node_armature_path/node_armature_path.gml +++ b/scripts/node_armature_path/node_armature_path.gml @@ -2,11 +2,11 @@ function Node_Armature_Path(_x, _y, _group = noone) : Node(_x, _y, _group) const name = "Armature Path"; setDimension(96, 72); - inputs[| 0] = nodeValue_Armature("Armature", self, noone) + inputs[0] = nodeValue_Armature("Armature", self, noone) .setVisible(true, true) .rejectArray(); - outputs[| 0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); + outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); lines = []; @@ -107,7 +107,7 @@ function Node_Armature_Path(_x, _y, _group = noone) : Node(_x, _y, _group) const ds_stack_destroy(_bst); - outputs[| 0].setValue(self); + outputs[0].setValue(self); } #endregion static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region diff --git a/scripts/node_armature_pose/node_armature_pose.gml b/scripts/node_armature_pose/node_armature_pose.gml index 4a2e694a1..9191a4d15 100644 --- a/scripts/node_armature_pose/node_armature_pose.gml +++ b/scripts/node_armature_pose/node_armature_pose.gml @@ -2,14 +2,14 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const name = "Armature Pose"; setDimension(96, 72); - inputs[| 0] = nodeValue_Armature("Armature", self, noone) + inputs[0] = nodeValue_Armature("Armature", self, noone) .setVisible(true, true); input_display_list = [ 0, ["Bones", false] ] - outputs[| 0] = nodeValue_Output("Armature", self, VALUE_TYPE.armature, noone); + outputs[0] = nodeValue_Output("Armature", self, VALUE_TYPE.armature, noone); boneMap = ds_map_create(); @@ -25,17 +25,17 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const new scrollBox(["Octahedral", "Stick"], function(ind) { attributes.display_bone = ind; })]); static createNewInput = function(bone = noone) { - var index = ds_list_size(inputs); + var index = array_length(inputs); - inputs[| index] = nodeValue(bone != noone? bone.name : "bone", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 1 ] ) + inputs[index] = nodeValue(bone != noone? bone.name : "bone", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 1 ] ) .setDisplay(VALUE_DISPLAY.transform); - inputs[| index].display_data.bone_id = bone != noone? bone.ID : noone; + inputs[index].display_data.bone_id = bone != noone? bone.ID : noone; - if(bone != noone) boneMap[? bone.ID] = inputs[| index]; + if(bone != noone) boneMap[? bone.ID] = inputs[index]; array_push(input_display_list, index); - return inputs[| index]; + return inputs[index]; } setDynamicInput(1, false); static setBone = function() { @@ -59,8 +59,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const ds_stack_destroy(_bst); //print($"Bone counts: {array_length(_bones)}"); - var _inputs = ds_list_create(); - _inputs[| 0] = inputs[| 0]; + var _inputs = [ inputs[0] ]; var _input_display_list = [ input_display_list[0], @@ -69,7 +68,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const for( var i = 0, n = array_length(_bones); i < n; i++ ) { var bone = _bones[i]; - var _idx = ds_list_size(_inputs); + var _idx = array_length(_inputs); array_push(_input_display_list, _idx); //print($" > Adding bone ID: {bone.ID}"); @@ -77,14 +76,13 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const var _inp = boneMap[? bone.ID]; _inp.index = _idx; - ds_list_add(_inputs, _inp); + array_push(_inputs, _inp); } else { var _inp = createNewInput(bone); - ds_list_add(_inputs, _inp); + array_push(_inputs, _inp); } } - ds_list_destroy(inputs); inputs = _inputs; input_display_list = _input_display_list; @@ -104,7 +102,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const posing_my = 0; static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _b = outputs[| 0].getValue(); + var _b = outputs[0].getValue(); if(_b == noone) return; anchor_selecting = _b.draw(attributes, active * 0b111, _x, _y, _s, _mx, _my, anchor_selecting, posing_bone); @@ -224,7 +222,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const return; } - var _boneCount = ds_list_size(inputs) - input_fix_len; + var _boneCount = array_length(inputs) - input_fix_len; if(_boneCount != _b.childCount()) setBone(); } @@ -261,7 +259,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const ds_stack_destroy(_bst); _bone_pose.setPose(); - outputs[| 0].setValue(_bone_pose); + outputs[0].setValue(_bone_pose); } static getPreviewBoundingBox = function() { @@ -270,7 +268,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const var maxx = -9999999; var maxy = -9999999; - var _b = outputs[| 0].getValue(); + var _b = outputs[0].getValue(); if(_b == noone) return BBOX().fromPoints(0, 0, 1, 1); var _bst = ds_stack_create(); @@ -300,8 +298,8 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const } static doApplyDeserialize = function() { - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { - var inp = inputs[| i]; + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { + var inp = inputs[i]; var idx = struct_try_get(inp.display_data, "bone_id"); boneMap[? idx] = inp; diff --git a/scripts/node_armature_sample/node_armature_sample.gml b/scripts/node_armature_sample/node_armature_sample.gml index ad4945172..b80e98ca3 100644 --- a/scripts/node_armature_sample/node_armature_sample.gml +++ b/scripts/node_armature_sample/node_armature_sample.gml @@ -2,16 +2,16 @@ function Node_Armature_Sample(_x, _y, _group = noone) : Node(_x, _y, _group) con name = "Armature Sample"; setDimension(96, 72); - inputs[| 0] = nodeValue_Armature("Armature", self, noone) + inputs[0] = nodeValue_Armature("Armature", self, noone) .setVisible(true, true) .rejectArray(); - inputs[| 1] = nodeValue_Text("Bone name", self, ""); + inputs[1] = nodeValue_Text("Bone name", self, ""); - inputs[| 2] = nodeValue_Float("Sample point", self, 0) + inputs[2] = nodeValue_Float("Sample point", self, 0) .setDisplay(VALUE_DISPLAY.slider); - outputs[| 0] = nodeValue_Output("Position", self, VALUE_TYPE.integer, [ 0, 0 ]) + outputs[0] = nodeValue_Output("Position", self, VALUE_TYPE.integer, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); #region ++++ attributes ++++ @@ -47,12 +47,12 @@ function Node_Armature_Sample(_x, _y, _group = noone) : Node(_x, _y, _group) con var _b = _bone.findBoneByName(_name); if(_b == noone) { - outputs[| 0].setValue([0, 0]); + outputs[0].setValue([0, 0]); return; } var _p = _b.getPoint(_prog); - outputs[| 0].setValue([_p.x, _p.y]); + outputs[0].setValue([_p.x, _p.y]); } #endregion static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region diff --git a/scripts/node_array/node_array.gml b/scripts/node_array/node_array.gml index 4013ae21a..7e363b135 100644 --- a/scripts/node_array/node_array.gml +++ b/scripts/node_array/node_array.gml @@ -3,10 +3,10 @@ function Node_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { attributes.spread_value = false; - inputs[| 0] = nodeValue_Enum_Scroll("Type", self, 0, { data: [ "Any", "Surface", "Number", "Color", "Text" ], update_hover: false }) + inputs[0] = nodeValue_Enum_Scroll("Type", self, 0, { data: [ "Any", "Surface", "Number", "Color", "Text" ], update_hover: false }) .rejectArray(); - inputs[| 1] = nodeValue_Bool("Spread array", self, false, "Unpack array and push the contents into the output one by one." ) + inputs[1] = nodeValue_Bool("Spread array", self, false, "Unpack array and push the contents into the output one by one." ) .rejectArray(); array_adjust_tool = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { @@ -15,7 +15,7 @@ function Node_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var bw = _w / 2 - ui(4); var bh = ui(36); if(buttonTextIconInstant(true, THEME.button_hide, _x, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.add, __txt("Add"), COLORS._main_value_positive) == 2) { - attributes.size = max(attributes.size, (ds_list_size(inputs) - input_fix_len) / data_length ) + 1; + attributes.size = max(attributes.size, (array_length(inputs) - input_fix_len) / data_length ) + 1; onInputResize(); } @@ -30,17 +30,17 @@ function Node_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { input_display_list = [ 0, 1, ["Contents", false], array_adjust_tool, ]; - outputs[| 0] = nodeValue_Output("Array", self, VALUE_TYPE.any, []); + outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, []); static createNewInput = function() { - var index = ds_list_size(inputs); + var index = array_length(inputs); var _typ = getType(); - inputs[| index] = nodeValue("Input", self, JUNCTION_CONNECT.input, _typ, -1 ) + inputs[index] = nodeValue("Input", self, JUNCTION_CONNECT.input, _typ, -1 ) .setVisible(true, true); array_push(input_display_list, index); - return inputs[| index]; + return inputs[index]; } setDynamicInput(1); @@ -58,27 +58,27 @@ function Node_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { } static refreshDynamicInput = function() { - var _l = ds_list_create(); + var _l = []; var amo = attributes.size; - for( var i = 0; i < ds_list_size(inputs); i++ ) { - var _inp = inputs[| i]; + for( var i = 0; i < array_length(inputs); i++ ) { + var _inp = inputs[i]; if(i < input_fix_len + amo || _inp.hasJunctionFrom()) - ds_list_add(_l, _inp); + array_push(_l, _inp); } var _add = amo - getInputAmount(); - repeat(_add) ds_list_add(_l, createNewInput()); + repeat(_add) array_push(_l, createNewInput()); input_display_list = array_clone(input_display_list_raw); - for( var i = input_fix_len; i < ds_list_size(_l); i++ ) { - _l[| i].index = i; + for( var i = input_fix_len; i < array_length(_l); i++ ) { + _l[i].index = i; array_push(input_display_list, i); } - ds_list_destroy(inputs); + inputs = _l; getJunctionList(); @@ -90,24 +90,24 @@ function Node_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var _typ = getType(); if(getInputAmount() <= 0) return; - if(_typ == VALUE_TYPE.any && inputs[| input_fix_len].value_from) - outputs[| 0].setType(inputs[| input_fix_len].value_from.type); + if(_typ == VALUE_TYPE.any && inputs[input_fix_len].value_from) + outputs[0].setType(inputs[input_fix_len].value_from.type); else - outputs[| 0].setType(_typ); + outputs[0].setType(_typ); - for( var i = ds_list_size(inputs) - 1; i >= input_fix_len; i-- ) { - if(resetVal) inputs[| i].resetValue(); + for( var i = array_length(inputs) - 1; i >= input_fix_len; i-- ) { + if(resetVal) inputs[i].resetValue(); - if(inputs[| i].value_from == noone) { - inputs[| i].setType(_typ); - inputs[| i].resetDisplay(); + if(inputs[i].value_from == noone) { + inputs[i].setType(_typ); + inputs[i].resetDisplay(); - } else if (value_bit(inputs[| i].value_from.type) & value_bit(_typ) != 0) { - inputs[| i].setType(inputs[| i].value_from.type); - inputs[| i].resetDisplay(); + } else if (value_bit(inputs[i].value_from.type) & value_bit(_typ) != 0) { + inputs[i].setType(inputs[i].value_from.type); + inputs[i].resetDisplay(); } else { - inputs[| i].removeFrom(); + inputs[i].removeFrom(); } } @@ -130,10 +130,10 @@ function Node_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var _typ = getType(); if(_typ != VALUE_TYPE.any) return; - if(index >= ds_list_size(inputs)) return; + if(index >= array_length(inputs)) return; - inputs[| index].setType(inputs[| index].value_from? inputs[| index].value_from.type : _typ); - inputs[| index].resetDisplay(); + inputs[index].setType(inputs[index].value_from? inputs[index].value_from.type : _typ); + inputs[index].resetDisplay(); } static update = function(frame = CURRENT_FRAME) { @@ -142,17 +142,17 @@ function Node_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var ind = 0; var spd = getInputData(1); - for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) { + for( var i = input_fix_len; i < array_length(inputs); i++ ) { var val = getInputData(i); if(is_array(val) && spd) array_append(res, val); else array_push(res, val); - if(_typ == VALUE_TYPE.any && inputs[| i].value_from) - outputs[| 0].setType(inputs[| i].value_from.type); + if(_typ == VALUE_TYPE.any && inputs[i].value_from) + outputs[0].setType(inputs[i].value_from.type); } - outputs[| 0].setValue(res); + outputs[0].setValue(res); } static postConnect = function() { updateType(false); } diff --git a/scripts/node_array_add/node_array_add.gml b/scripts/node_array_add/node_array_add.gml index 0f6052955..92ed429de 100644 --- a/scripts/node_array_add/node_array_add.gml +++ b/scripts/node_array_add/node_array_add.gml @@ -2,25 +2,25 @@ function Node_Array_Add(_x, _y, _group = noone) : Node(_x, _y, _group) construct name = "Array Add"; setDimension(96, 32 + 24); - inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setVisible(true, true); - inputs[| 1] = nodeValue_Bool("Spread array", self, false ) + inputs[1] = nodeValue_Bool("Spread array", self, false ) .rejectArray(); - outputs[| 0] = nodeValue_Output("Output", self, VALUE_TYPE.integer, 0); + outputs[0] = nodeValue_Output("Output", self, VALUE_TYPE.integer, 0); input_display_list = [ 1, 0 ]; static createNewInput = function() { - var index = ds_list_size(inputs); + var index = array_length(inputs); - inputs[| index] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 ) + inputs[index] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 ) .setVisible(true, true); array_push(input_display_list, index); - return inputs[| index]; + return inputs[index]; } setDynamicInput(1); @@ -28,29 +28,29 @@ function Node_Array_Add(_x, _y, _group = noone) : Node(_x, _y, _group) construct static update = function(frame = CURRENT_FRAME) { var _arr = getInputData(0); - if(inputs[| 0].value_from == noone) { - inputs[| 0].setType(VALUE_TYPE.any); - outputs[| 0].setType(VALUE_TYPE.any); + if(inputs[0].value_from == noone) { + inputs[0].setType(VALUE_TYPE.any); + outputs[0].setType(VALUE_TYPE.any); return; } if(!is_array(_arr)) return; - var _type = inputs[| 0].value_from.type; + var _type = inputs[0].value_from.type; var spd = getInputData(1); - inputs[| 0].setType(_type); - outputs[| 0].setType(_type); + inputs[0].setType(_type); + outputs[0].setType(_type); var _out = array_clone(_arr); - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { var _val = getInputData(i); - inputs[| i].setType(_type); + inputs[i].setType(_type); if(is_array(_val) && spd) array_append(_out, _val); else array_push(_out, _val); } - outputs[| 0].setValue(_out); + outputs[0].setValue(_out); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_array_composite/node_array_composite.gml b/scripts/node_array_composite/node_array_composite.gml index a0c2b3a84..ed94e1107 100644 --- a/scripts/node_array_composite/node_array_composite.gml +++ b/scripts/node_array_composite/node_array_composite.gml @@ -2,15 +2,15 @@ function Node_Array_Composite(_x, _y, _group = noone) : Node(_x, _y, _group) con name = "Array Composite"; setDimension(96, 32 + 24); - inputs[| 0] = nodeValue_Float("Array", self, []) + inputs[0] = nodeValue_Float("Array", self, []) .setArrayDepth(1) .setVisible(true, true); - inputs[| 1] = nodeValue_Float("Compose", self, []) + inputs[1] = nodeValue_Float("Compose", self, []) .setArrayDepth(1) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Array", self, VALUE_TYPE.float, 0) + outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.float, 0) .setArrayDepth(1); static composite = function(arr, com) { @@ -43,7 +43,7 @@ function Node_Array_Composite(_x, _y, _group = noone) : Node(_x, _y, _group) con } else res = composite(_arr, _ker); - outputs[| 0].setValue(res); + outputs[0].setValue(res); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_array_convolute/node_array_convolute.gml b/scripts/node_array_convolute/node_array_convolute.gml index 1506ae3b8..85a9467db 100644 --- a/scripts/node_array_convolute/node_array_convolute.gml +++ b/scripts/node_array_convolute/node_array_convolute.gml @@ -2,15 +2,15 @@ function Node_Array_Convolute(_x, _y, _group = noone) : Node(_x, _y, _group) con name = "Array Convolute"; setDimension(96, 32 + 24); - inputs[| 0] = nodeValue_Float("Array", self, 0) + inputs[0] = nodeValue_Float("Array", self, 0) .setArrayDepth(1) .setVisible(true, true); - inputs[| 1] = nodeValue_Float("Kernel", self, []) + inputs[1] = nodeValue_Float("Kernel", self, []) .setArrayDepth(1) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Array", self, VALUE_TYPE.float, 0) + outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.float, 0) .setArrayDepth(1); static convolute = function(arr, ker) { @@ -50,7 +50,7 @@ function Node_Array_Convolute(_x, _y, _group = noone) : Node(_x, _y, _group) con } else res = convolute(_arr, _ker); - outputs[| 0].setValue(res); + outputs[0].setValue(res); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_array_copy/node_array_copy.gml b/scripts/node_array_copy/node_array_copy.gml index 559acd79d..18686025f 100644 --- a/scripts/node_array_copy/node_array_copy.gml +++ b/scripts/node_array_copy/node_array_copy.gml @@ -2,23 +2,23 @@ function Node_Array_Copy(_x, _y, _group = noone) : Node(_x, _y, _group) construc name = "Array Copy"; setDimension(96, 32 + 24); - inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setArrayDepth(1) .setVisible(true, true); - inputs[| 1] = nodeValue_Int("Starting Index", self, 0); + inputs[1] = nodeValue_Int("Starting Index", self, 0); - inputs[| 2] = nodeValue_Int("Size", self, 1); + inputs[2] = nodeValue_Int("Size", self, 1); - outputs[| 0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0) + outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0) .setArrayDepth(1); static step = function() { var _typ = VALUE_TYPE.any; - if(inputs[| 0].value_from != noone) _typ = inputs[| 0].value_from.type; + if(inputs[0].value_from != noone) _typ = inputs[0].value_from.type; - inputs[| 0].setType(_typ); - outputs[| 0].setType(_typ); + inputs[0].setType(_typ); + outputs[0].setType(_typ); } static update = function(frame = CURRENT_FRAME) { @@ -32,7 +32,7 @@ function Node_Array_Copy(_x, _y, _group = noone) : Node(_x, _y, _group) construc for( var i = 0; i < _siz; i++ ) res[i] = array_safe_get_fast(_arr, _ind + i); - outputs[| 0].setValue(res); + outputs[0].setValue(res); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_array_csv_parse/node_array_csv_parse.gml b/scripts/node_array_csv_parse/node_array_csv_parse.gml index b100539e3..1937fc9ad 100644 --- a/scripts/node_array_csv_parse/node_array_csv_parse.gml +++ b/scripts/node_array_csv_parse/node_array_csv_parse.gml @@ -2,12 +2,12 @@ function Node_Array_CSV_Parse(_x, _y, _group = noone) : Node(_x, _y, _group) con name = "CSV Parse"; setDimension(96, 32 + 24); - inputs[| 0] = nodeValue_Text("CSV string", self, 0) + inputs[0] = nodeValue_Text("CSV string", self, 0) .setVisible(true, true); - inputs[| 1] = nodeValue_Int("Skip line", self, 0); + inputs[1] = nodeValue_Int("Skip line", self, 0); - outputs[| 0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0) + outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0) .setArrayDepth(1); static update = function(frame = CURRENT_FRAME) { @@ -20,7 +20,7 @@ function Node_Array_CSV_Parse(_x, _y, _group = noone) : Node(_x, _y, _group) con for( var i = _skp; i < array_length(_lines); i++ ) array_push(_arr, string_splice(_lines[i], ",")); - outputs[| 0].setValue(_arr); + outputs[0].setValue(_arr); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_array_find/node_array_find.gml b/scripts/node_array_find/node_array_find.gml index 94013bc92..68cbc8464 100644 --- a/scripts/node_array_find/node_array_find.gml +++ b/scripts/node_array_find/node_array_find.gml @@ -2,37 +2,37 @@ function Node_Array_Find(_x, _y, _group = noone) : Node(_x, _y, _group) construc name = "Array Find"; setDimension(96, 32 + 24); - inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setVisible(true, true); - inputs[| 1] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + inputs[1] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setVisible(true, true) .rejectArray(); - outputs[| 0] = nodeValue_Output("Index", self, VALUE_TYPE.integer, 0); + outputs[0] = nodeValue_Output("Index", self, VALUE_TYPE.integer, 0); static update = function(frame = CURRENT_FRAME) { var _arr = getInputData(0); - inputs[| 0].setType(VALUE_TYPE.any); - inputs[| 1].setType(VALUE_TYPE.any); + inputs[0].setType(VALUE_TYPE.any); + inputs[1].setType(VALUE_TYPE.any); if(!is_array(_arr)) return; var value = getInputData(1); - if(inputs[| 0].value_from != noone) { - var type = inputs[| 0].value_from.type; - inputs[| 0].setType(type); - inputs[| 1].setType(type); + if(inputs[0].value_from != noone) { + var type = inputs[0].value_from.type; + inputs[0].setType(type); + inputs[1].setType(type); } - outputs[| 0].setValue(array_find(_arr, value)); + outputs[0].setValue(array_find(_arr, value)); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); - var idx = outputs[| 0].getValue(); + var idx = outputs[0].getValue(); var str = string(idx); diff --git a/scripts/node_array_get/node_array_get.gml b/scripts/node_array_get/node_array_get.gml index 17af02222..345fb5903 100644 --- a/scripts/node_array_get/node_array_get.gml +++ b/scripts/node_array_get/node_array_get.gml @@ -2,24 +2,24 @@ function Node_Array_Get(_x, _y, _group = noone) : Node(_x, _y, _group) construct name = "Array Get"; setDimension(96, 32 + 24); - inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setVisible(true, true); - inputs[| 1] = nodeValue_Int("Index", self, 0) + inputs[1] = nodeValue_Int("Index", self, 0) .setVisible(true, true); - inputs[| 2] = nodeValue_Enum_Scroll("Overflow", self, 0, [ "Clamp", "Loop", "Ping Pong" ]) + inputs[2] = nodeValue_Enum_Scroll("Overflow", self, 0, [ "Clamp", "Loop", "Ping Pong" ]) .rejectArray(); - outputs[| 0] = nodeValue_Output("Value", self, VALUE_TYPE.any, 0); + outputs[0] = nodeValue_Output("Value", self, VALUE_TYPE.any, 0); static step = function() { - inputs[| 0].setType(VALUE_TYPE.any); - outputs[| 0].setType(VALUE_TYPE.any); + inputs[0].setType(VALUE_TYPE.any); + outputs[0].setType(VALUE_TYPE.any); - if(inputs[| 0].value_from != noone) { - inputs[| 0].setType(inputs[| 0].value_from.type); - outputs[| 0].setType(inputs[| 0].type); + if(inputs[0].value_from != noone) { + inputs[0].setType(inputs[0].value_from.type); + outputs[0].setType(inputs[0].type); } } @@ -64,7 +64,7 @@ function Node_Array_Get(_x, _y, _group = noone) : Node(_x, _y, _group) construct } else res = getArray(_arr, index, _ovf); - outputs[| 0].setValue(res); + outputs[0].setValue(res); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_array_insert/node_array_insert.gml b/scripts/node_array_insert/node_array_insert.gml index d77cac19b..d21839168 100644 --- a/scripts/node_array_insert/node_array_insert.gml +++ b/scripts/node_array_insert/node_array_insert.gml @@ -2,25 +2,25 @@ function Node_Array_Insert(_x, _y, _group = noone) : Node(_x, _y, _group) constr name = "Array Insert"; setDimension(96, 32 + 24); - inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setVisible(true, true); - inputs[| 1] = nodeValue_Int("Index", self, 0); + inputs[1] = nodeValue_Int("Index", self, 0); - inputs[| 2] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + inputs[2] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setVisible(true, true); - inputs[| 3] = nodeValue_Bool("Spread array", self, false ) + inputs[3] = nodeValue_Bool("Spread array", self, false ) .rejectArray(); - outputs[| 0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0); + outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0); static update = function(frame = CURRENT_FRAME) { var _arr = getInputData(0); - inputs[| 0].setType(VALUE_TYPE.any); - inputs[| 2].setType(VALUE_TYPE.any); - outputs[| 0].setType(VALUE_TYPE.any); + inputs[0].setType(VALUE_TYPE.any); + inputs[2].setType(VALUE_TYPE.any); + outputs[0].setType(VALUE_TYPE.any); if(!is_array(_arr)) return; @@ -29,11 +29,11 @@ function Node_Array_Insert(_x, _y, _group = noone) : Node(_x, _y, _group) constr var spred = getInputData(3); var _len = array_length(_arr); - if(inputs[| 0].value_from != noone) { - var type = inputs[| 0].value_from.type; - inputs[| 0].setType(type); - inputs[| 2].setType(type); - outputs[| 0].setType(type); + if(inputs[0].value_from != noone) { + var type = inputs[0].value_from.type; + inputs[0].setType(type); + inputs[2].setType(type); + outputs[0].setType(type); } var arr = array_clone(_arr); @@ -54,7 +54,7 @@ function Node_Array_Insert(_x, _y, _group = noone) : Node(_x, _y, _group) constr } } - outputs[| 0].setValue(arr); + outputs[0].setValue(arr); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_array_length/node_array_length.gml b/scripts/node_array_length/node_array_length.gml index 72345e874..5a11cddca 100644 --- a/scripts/node_array_length/node_array_length.gml +++ b/scripts/node_array_length/node_array_length.gml @@ -2,29 +2,29 @@ function Node_Array_Length(_x, _y, _group = noone) : Node(_x, _y, _group) constr name = "Array Length"; setDimension(96, 32 + 24); - inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Size", self, VALUE_TYPE.integer, 0); + outputs[0] = nodeValue_Output("Size", self, VALUE_TYPE.integer, 0); static step = function() { #region - inputs[| 0].setType(inputs[| 0].value_from == noone? VALUE_TYPE.any : inputs[| 0].value_from.type); + inputs[0].setType(inputs[0].value_from == noone? VALUE_TYPE.any : inputs[0].value_from.type); } #endregion static update = function(frame = CURRENT_FRAME) { #region var _arr = getInputData(0); if(!is_array(_arr) || array_length(_arr) == 0) { - outputs[| 0].setValue(0); + outputs[0].setValue(0); return 0; } - outputs[| 0].setValue(array_length(_arr)); + outputs[0].setValue(array_length(_arr)); } #endregion static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); - var str = string(outputs[| 0].getValue()); + var str = string(outputs[0].getValue()); var bbox = drawGetBbox(xx, yy, _s); var ss = string_scale(str, bbox.w, bbox.h); diff --git a/scripts/node_array_pin/node_array_pin.gml b/scripts/node_array_pin/node_array_pin.gml index 52ad06e25..790926f95 100644 --- a/scripts/node_array_pin/node_array_pin.gml +++ b/scripts/node_array_pin/node_array_pin.gml @@ -12,32 +12,32 @@ function Node_Array_Pin(_x, _y, _group = noone) : Node(_x, _y, _group) construct bg_spr_add = 0; - outputs[| 0] = nodeValue_Output("Array", self, VALUE_TYPE.any, []); + outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, []); static createNewInput = function() { - var index = ds_list_size(inputs); + var index = array_length(inputs); - inputs[| index] = nodeValue("Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 ) + inputs[index] = nodeValue("Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 ) .setVisible(true, true); - return inputs[| index]; + return inputs[index]; } setDynamicInput(1); static update = function(frame = CURRENT_FRAME) { var res = []; var ind = 0; - for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) { - if(!inputs[| i].value_from) continue; + for( var i = input_fix_len; i < array_length(inputs); i++ ) { + if(!inputs[i].value_from) continue; var val = getInputData(i); array_push(res, val); - inputs[| i].setType(inputs[| i].value_from.type); - outputs[| 0].setType(inputs[| i].value_from.type); + inputs[ i].setType(inputs[i].value_from.type); + outputs[0].setType(inputs[i].value_from.type); } - outputs[| 0].setValue(res); + outputs[0].setValue(res); } static pointIn = function(_x, _y, _mx, _my, _s) { @@ -51,16 +51,16 @@ function Node_Array_Pin(_x, _y, _group = noone) : Node(_x, _y, _group) construct var xx = x * _s + _x; var yy = y * _s + _y; - for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) { - inputs[| i].x = xx; - inputs[| i].y = yy; + for( var i = input_fix_len; i < array_length(inputs); i++ ) { + inputs[i].x = xx; + inputs[i].y = yy; } dummy_input.x = xx; dummy_input.y = yy; - outputs[| 0].x = xx; - outputs[| 0].y = yy; + outputs[0].x = xx; + outputs[0].y = yy; } static drawBadge = function(_x, _y, _s) {} @@ -68,7 +68,7 @@ function Node_Array_Pin(_x, _y, _group = noone) : Node(_x, _y, _group) construct static drawJunctions = function(_x, _y, _mx, _my, _s) { var _dval = PANEL_GRAPH.value_dragging; - var hover = _dval == noone || _dval.connect_type == JUNCTION_CONNECT.input? outputs[| 0] : dummy_input; + var hover = _dval == noone || _dval.connect_type == JUNCTION_CONNECT.input? outputs[0] : dummy_input; var xx = x * _s + _x; var yy = y * _s + _y; isHovering = point_in_circle(_mx, _my, xx, yy, _s * 24); diff --git a/scripts/node_array_range/node_array_range.gml b/scripts/node_array_range/node_array_range.gml index fc29e6802..beee92e6e 100644 --- a/scripts/node_array_range/node_array_range.gml +++ b/scripts/node_array_range/node_array_range.gml @@ -2,16 +2,16 @@ function Node_Array_Range(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou name = "Array Range"; setDimension(96, 48); - inputs[| 0] = nodeValue_Float("Start", self, 0) + inputs[0] = nodeValue_Float("Start", self, 0) .rejectArray(); - inputs[| 1] = nodeValue_Float("End", self, 10) + inputs[1] = nodeValue_Float("End", self, 10) .rejectArray(); - inputs[| 2] = nodeValue_Float("Step", self, 1) + inputs[2] = nodeValue_Float("Step", self, 1) .rejectArray(); - outputs[| 0] = nodeValue_Output("Array", self, VALUE_TYPE.float, []); + outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.float, []); static processData = function(_outSurf, _data, _output_index, _array_index) { var st = _data[0]; @@ -36,7 +36,7 @@ function Node_Array_Range(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou var str = getSingleValue(0); var edd = getSingleValue(1); var stp = getSingleValue(2); - var arr = outputs[| 0].getValue(); + var arr = outputs[0].getValue(); var str = ""; switch(array_length(arr)) { diff --git a/scripts/node_array_rearrange/node_array_rearrange.gml b/scripts/node_array_rearrange/node_array_rearrange.gml index 6c618a0c4..e6cec9dd3 100644 --- a/scripts/node_array_rearrange/node_array_rearrange.gml +++ b/scripts/node_array_rearrange/node_array_rearrange.gml @@ -4,14 +4,14 @@ function Node_Array_Rearrange(_x, _y, _group = noone) : Node(_x, _y, _group) con draw_pad_w = 10; setDimension(96, 48); - inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setArrayDepth(1) .setVisible(true, true); - inputs[| 1] = nodeValue_Int("Orders", self, []) + inputs[1] = nodeValue_Int("Orders", self, []) .setArrayDepth(1); - outputs[| 0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0) + outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0) .setArrayDepth(1); type = VALUE_TYPE.any; @@ -20,13 +20,13 @@ function Node_Array_Rearrange(_x, _y, _group = noone) : Node(_x, _y, _group) con order_y = 0; rearranger = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { #region - var _arr = inputs[| 0].getValue(); - var _ord = inputs[| 1].getValue(); + var _arr = inputs[0].getValue(); + var _ord = inputs[1].getValue(); var amo = array_length(_arr); var _fx = _x; var _fy = _y + ui(8); - var _fh = inputs[| 0].type == VALUE_TYPE.surface? ui(48) : ui(32); + var _fh = inputs[0].type == VALUE_TYPE.surface? ui(48) : ui(32); var _fsh = _fh - ui(8); var _h = amo * (_fh + ui(4)); @@ -51,7 +51,7 @@ function Node_Array_Rearrange(_x, _y, _group = noone) : Node(_x, _y, _group) con var _ffcx = _fx + _w / 2; - switch(inputs[| 0].type) { + switch(inputs[0].type) { case VALUE_TYPE.surface : var _sw = surface_get_width_safe(_val); var _sh = surface_get_height_safe(_val); @@ -87,7 +87,7 @@ function Node_Array_Rearrange(_x, _y, _group = noone) : Node(_x, _y, _group) con array_remove(_ord, ordering); array_insert(_ord, _hov, ordering); - inputs[| 1].setValue(_ord); + inputs[1].setValue(_ord); if(mouse_release(mb_left)) { ordering = noone; @@ -104,19 +104,19 @@ function Node_Array_Rearrange(_x, _y, _group = noone) : Node(_x, _y, _group) con static onValueFromUpdate = function(index = 0) { #region if(LOADING || APPENDING) return; - var _arr = inputs[| 0].getValue(); + var _arr = inputs[0].getValue(); var _val = array_create(array_length(_arr)); for( var i = 0, n = array_length(_arr); i < n; i++ ) _val[i] = i; - inputs[| 1].setValue(_val); + inputs[1].setValue(_val); } #endregion static step = function() { #region var _typ = VALUE_TYPE.any; - if(inputs[| 0].value_from != noone) _typ = inputs[| 0].value_from.type; + if(inputs[0].value_from != noone) _typ = inputs[0].value_from.type; - inputs[| 0].setType(_typ); - outputs[| 0].setType(_typ); + inputs[0].setType(_typ); + outputs[0].setType(_typ); if(type != _typ) { if(_typ == VALUE_TYPE.surface) @@ -141,12 +141,12 @@ function Node_Array_Rearrange(_x, _y, _group = noone) : Node(_x, _y, _group) con res[i] = array_safe_get_fast(_arr, _ind); } - outputs[| 0].setValue(res); + outputs[0].setValue(res); } #endregion static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); - var str = outputs[| 0].getValue(); + var str = outputs[0].getValue(); var bbox = drawGetBbox(xx, yy, _s); draw_text_bbox(bbox, str); } #endregion diff --git a/scripts/node_array_remove/node_array_remove.gml b/scripts/node_array_remove/node_array_remove.gml index 00001e9d9..be919caea 100644 --- a/scripts/node_array_remove/node_array_remove.gml +++ b/scripts/node_array_remove/node_array_remove.gml @@ -2,37 +2,37 @@ function Node_Array_Remove(_x, _y, _group = noone) : Node(_x, _y, _group) constr name = "Array Remove"; setDimension(96, 32 + 24); - inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setVisible(true, true); - inputs[| 1] = nodeValue_Enum_Button("Type", self, 0, [ "Index", "Value" ]) + inputs[1] = nodeValue_Enum_Button("Type", self, 0, [ "Index", "Value" ]) .rejectArray(); - inputs[| 2] = nodeValue_Int("Index", self, 0); + inputs[2] = nodeValue_Int("Index", self, 0); - inputs[| 3] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + inputs[3] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setVisible(true, true); - inputs[| 4] = nodeValue_Bool("Spread array", self, false ) + inputs[4] = nodeValue_Bool("Spread array", self, false ) .rejectArray(); - outputs[| 0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0); + outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0); static step = function() { var type = getInputData(1); - inputs[| 2].setVisible(type == 0, type == 0); - inputs[| 3].setVisible(type == 1, type == 1); + inputs[2].setVisible(type == 0, type == 0); + inputs[3].setVisible(type == 1, type == 1); - inputs[| 0].setType(VALUE_TYPE.any); - inputs[| 3].setType(VALUE_TYPE.any); - outputs[| 0].setType(VALUE_TYPE.any); + inputs[0].setType(VALUE_TYPE.any); + inputs[3].setType(VALUE_TYPE.any); + outputs[0].setType(VALUE_TYPE.any); - if(inputs[| 0].value_from != noone) { - var type = inputs[| 0].value_from.type; - inputs[| 0].setType(type); - inputs[| 3].setType(type); - outputs[| 0].setType(type); + if(inputs[0].value_from != noone) { + var type = inputs[0].value_from.type; + inputs[0].setType(type); + inputs[3].setType(type); + outputs[0].setType(type); } } @@ -63,7 +63,7 @@ function Node_Array_Remove(_x, _y, _group = noone) : Node(_x, _y, _group) constr array_remove(_arr, value[i]); } - outputs[| 0].setValue(_arr); + outputs[0].setValue(_arr); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_array_reverse/node_array_reverse.gml b/scripts/node_array_reverse/node_array_reverse.gml index 0c3b1bd40..fcf560e3b 100644 --- a/scripts/node_array_reverse/node_array_reverse.gml +++ b/scripts/node_array_reverse/node_array_reverse.gml @@ -2,27 +2,27 @@ function Node_Array_Reverse(_x, _y, _group = noone) : Node(_x, _y, _group) const name = "Array Reverse"; setDimension(96, 32 + 24); - inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0); + outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0); static update = function(frame = CURRENT_FRAME) { var _arr = getInputData(0); - inputs[| 0].setType(VALUE_TYPE.any); - outputs[| 0].setType(VALUE_TYPE.any); + inputs[0].setType(VALUE_TYPE.any); + outputs[0].setType(VALUE_TYPE.any); if(!is_array(_arr)) return; - if(inputs[| 0].value_from != noone) { - var type = inputs[| 0].value_from.type; - inputs[| 0].setType(type); - outputs[| 0].setType(type); + if(inputs[0].value_from != noone) { + var type = inputs[0].value_from.type; + inputs[0].setType(type); + outputs[0].setType(type); } _arr = array_reverse(_arr); - outputs[| 0].setValue(_arr); + outputs[0].setValue(_arr); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_array_sample/node_array_sample.gml b/scripts/node_array_sample/node_array_sample.gml index 91f9e80d5..f02c7ed06 100644 --- a/scripts/node_array_sample/node_array_sample.gml +++ b/scripts/node_array_sample/node_array_sample.gml @@ -2,14 +2,14 @@ function Node_Array_Sample(_x, _y, _group = noone) : Node(_x, _y, _group) constr name = "Array Sample"; setDimension(96, 32 + 24); - inputs[| 0] = nodeValue_Float("Array", self, []) + inputs[0] = nodeValue_Float("Array", self, []) .setArrayDepth(1) .setVisible(true, true); - inputs[| 1] = nodeValue_Float("Step", self, 1) + inputs[1] = nodeValue_Float("Step", self, 1) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Array", self, VALUE_TYPE.float, 0) + outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.float, 0) .setArrayDepth(1); static sample = function(arr, stp) { @@ -40,7 +40,7 @@ function Node_Array_Sample(_x, _y, _group = noone) : Node(_x, _y, _group) constr } else res = sample(_arr, _stp); - outputs[| 0].setValue(res); + outputs[0].setValue(res); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_array_set/node_array_set.gml b/scripts/node_array_set/node_array_set.gml index 313ee2c66..0905e2442 100644 --- a/scripts/node_array_set/node_array_set.gml +++ b/scripts/node_array_set/node_array_set.gml @@ -2,22 +2,22 @@ function Node_Array_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construct name = "Array Set"; setDimension(96, 32 + 24); - inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setVisible(true, true); - inputs[| 1] = nodeValue_Int("Index", self, 0); + inputs[1] = nodeValue_Int("Index", self, 0); - inputs[| 2] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + inputs[2] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0); + outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0); static update = function(frame = CURRENT_FRAME) { var _arr = getInputData(0); - inputs[| 0].setType(VALUE_TYPE.any); - inputs[| 2].setType(VALUE_TYPE.any); - outputs[| 0].setType(VALUE_TYPE.any); + inputs[0].setType(VALUE_TYPE.any); + inputs[2].setType(VALUE_TYPE.any); + outputs[0].setType(VALUE_TYPE.any); if(!is_array(_arr)) return; @@ -25,11 +25,11 @@ function Node_Array_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construct var value = getInputData(2); var _len = array_length(_arr); - if(inputs[| 0].value_from != noone) { - var type = inputs[| 0].value_from.type; - inputs[| 0].setType(type); - inputs[| 2].setType(type); - outputs[| 0].setType(type); + if(inputs[0].value_from != noone) { + var type = inputs[0].value_from.type; + inputs[0].setType(type); + inputs[2].setType(type); + outputs[0].setType(type); } var arr = array_clone(_arr); @@ -44,7 +44,7 @@ function Node_Array_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construct array_safe_set(arr, index, value); } - outputs[| 0].setValue(arr); + outputs[0].setValue(arr); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_array_shift/node_array_shift.gml b/scripts/node_array_shift/node_array_shift.gml index c0f6721e7..b044c80b9 100644 --- a/scripts/node_array_shift/node_array_shift.gml +++ b/scripts/node_array_shift/node_array_shift.gml @@ -2,27 +2,27 @@ function Node_Array_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou name = "Array Shift"; setDimension(96, 32 + 24); - inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setArrayDepth(99) .setVisible(true, true); - inputs[| 1] = nodeValue_Int("Shift", self, 0) + inputs[1] = nodeValue_Int("Shift", self, 0) - outputs[| 0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0); + outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0); static processData = function(_outSurf, _data, _output_index, _array_index) { var _arr = _data[0]; var _shf = _data[1]; - inputs[| 0].setType(VALUE_TYPE.any); - outputs[| 0].setType(VALUE_TYPE.any); + inputs[ 0].setType(VALUE_TYPE.any); + outputs[0].setType(VALUE_TYPE.any); if(!is_array(_arr)) return []; - if(inputs[| 0].value_from != noone) { - var type = inputs[| 0].value_from.type; - inputs[| 0].setType(type); - outputs[| 0].setType(type); + if(inputs[0].value_from != noone) { + var type = inputs[0].value_from.type; + inputs[ 0].setType(type); + outputs[0].setType(type); } var arr = []; diff --git a/scripts/node_array_shuffle/node_array_shuffle.gml b/scripts/node_array_shuffle/node_array_shuffle.gml index 4b04a8342..d6ff3bda8 100644 --- a/scripts/node_array_shuffle/node_array_shuffle.gml +++ b/scripts/node_array_shuffle/node_array_shuffle.gml @@ -3,33 +3,33 @@ function Node_Array_Shuffle(_x, _y, _group = noone) : Node(_x, _y, _group) const setDimension(96, 48); - inputs[| 0] = nodeValue("Array in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, []) + inputs[0] = nodeValue("Array in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, []) .setVisible(true, true); - inputs[| 1] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }) + inputs[1] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }) .rejectArray(); - outputs[| 0] = nodeValue_Output("Shuffled array", self, VALUE_TYPE.any, []); + outputs[0] = nodeValue_Output("Shuffled array", self, VALUE_TYPE.any, []); static update = function(frame = CURRENT_FRAME) { var arr = getInputData(0); var sed = getInputData(1); - inputs[| 0].setType(VALUE_TYPE.any); - outputs[| 0].setType(VALUE_TYPE.any); + inputs[0].setType(VALUE_TYPE.any); + outputs[0].setType(VALUE_TYPE.any); if(!is_array(arr)) return; arr = array_clone(arr); - if(inputs[| 0].value_from != noone) { - inputs[| 0].setType(inputs[| 0].value_from.type); - outputs[| 0].setType(inputs[| 0].value_from.type); + if(inputs[0].value_from != noone) { + inputs[0].setType(inputs[0].value_from.type); + outputs[0].setType(inputs[0].value_from.type); } random_set_seed(sed); arr = array_shuffle(arr); - outputs[| 0].setValue(arr); + outputs[0].setValue(arr); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_array_sort/node_array_sort.gml b/scripts/node_array_sort/node_array_sort.gml index 92ee40a37..b1975a9d2 100644 --- a/scripts/node_array_sort/node_array_sort.gml +++ b/scripts/node_array_sort/node_array_sort.gml @@ -3,15 +3,15 @@ function Node_Array_Sort(_x, _y, _group = noone) : Node(_x, _y, _group) construc setDimension(96, 48); - inputs[| 0] = nodeValue("Array in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, []) + inputs[0] = nodeValue("Array in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, []) .setVisible(true, true); - inputs[| 1] = nodeValue_Enum_Button("Order", self, 0, [ "Ascending", "Descending" ]) + inputs[1] = nodeValue_Enum_Button("Order", self, 0, [ "Ascending", "Descending" ]) .rejectArray(); - outputs[| 0] = nodeValue_Output("Sorted array", self, VALUE_TYPE.any, []); + outputs[0] = nodeValue_Output("Sorted array", self, VALUE_TYPE.any, []); - outputs[| 1] = nodeValue_Output("Sorted index", self, VALUE_TYPE.integer, []) + outputs[1] = nodeValue_Output("Sorted index", self, VALUE_TYPE.integer, []) .setVisible(false); static sortAcs = function(v1, v2) { return v2.val - v1.val; } @@ -21,31 +21,31 @@ function Node_Array_Sort(_x, _y, _group = noone) : Node(_x, _y, _group) construc var arr = getInputData(0); var asc = getInputData(1); - inputs[| 0].setType(VALUE_TYPE.any); - outputs[| 0].setType(VALUE_TYPE.any); + inputs[0].setType(VALUE_TYPE.any); + outputs[0].setType(VALUE_TYPE.any); if(!is_array(arr)) return; var len = array_length(arr); - if(inputs[| 0].value_from != noone) { - inputs[| 0].setType(inputs[| 0].value_from.type); - outputs[| 0].setType(inputs[| 0].value_from.type); + if(inputs[0].value_from != noone) { + inputs[0].setType(inputs[0].value_from.type); + outputs[0].setType(inputs[0].value_from.type); } var _arr = array_map(arr, function(v, i) { return { index: i, val: v }; }); array_sort(_arr, asc? sortAcs : sortDes); - var resV = array_verify(outputs[| 0].getValue(), len); - var resO = array_verify(outputs[| 1].getValue(), len); + var resV = array_verify(outputs[0].getValue(), len); + var resO = array_verify(outputs[1].getValue(), len); for( var i = 0; i < len; i++ ) { resO[i] = _arr[i].index; resV[i] = _arr[i].val; } - outputs[| 0].setValue(resV); - outputs[| 1].setValue(resO); + outputs[0].setValue(resV); + outputs[1].setValue(resO); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_array_split/node_array_split.gml b/scripts/node_array_split/node_array_split.gml index da0337949..784678431 100644 --- a/scripts/node_array_split/node_array_split.gml +++ b/scripts/node_array_split/node_array_split.gml @@ -4,21 +4,21 @@ function Node_Array_Split(_x, _y, _group = noone) : Node(_x, _y, _group) constru draw_padding = 4; - inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, []) + inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, []) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("val 0", self, VALUE_TYPE.any, 0); + outputs[0] = nodeValue_Output("val 0", self, VALUE_TYPE.any, 0); attributes.output_amount = 1; static update = function() { var _inp = getInputData(0); - var type = inputs[| 0].value_from == noone? VALUE_TYPE.any : inputs[| 0].value_from.type; - inputs[| 0].setType(type); - inputs[| 0].resetDisplay(); + var type = inputs[0].value_from == noone? VALUE_TYPE.any : inputs[0].value_from.type; + inputs[0].setType(type); + inputs[0].resetDisplay(); if(!is_array(_inp)) { - ds_list_clear(outputs); + attributes.output_amount = 0; return; } @@ -26,18 +26,18 @@ function Node_Array_Split(_x, _y, _group = noone) : Node(_x, _y, _group) constru var amo = array_length(_inp); for (var i = 0; i < amo; i++) { - if(i >= ds_list_size(outputs)) - outputs[| i] = nodeValue_Output($"val {i}", self, type, 0) + if(i >= array_length(outputs)) + outputs[i] = nodeValue_Output($"val {i}", self, type, 0) - outputs[| i].setValue(_inp[i]); + outputs[i].setValue(_inp[i]); } - while(ds_list_size(outputs) > amo) - ds_list_delete(outputs, ds_list_size(outputs) - 1); + while(array_length(outputs) > amo) + array_delete(outputs, array_length(outputs) - 1, 1); for (var i = 0, n = amo; i < n; i++) { - outputs[| i].setType(type); - outputs[| i].resetDisplay(); + outputs[i].setType(type); + outputs[i].resetDisplay(); } attributes.output_amount = amo; @@ -49,9 +49,9 @@ function Node_Array_Split(_x, _y, _group = noone) : Node(_x, _y, _group) constru var _outAmo = attributes.output_amount; var _ind = 0; - ds_list_clear(outputs); + repeat(_outAmo) { - ds_list_add(outputs, nodeValue_Output($"val {_ind}", self, VALUE_TYPE.any, 0)); + array_push(outputs, nodeValue_Output($"val {_ind}", self, VALUE_TYPE.any, 0)); _ind++; } } diff --git a/scripts/node_array_zip/node_array_zip.gml b/scripts/node_array_zip/node_array_zip.gml index 4b3daee10..592604bc7 100644 --- a/scripts/node_array_zip/node_array_zip.gml +++ b/scripts/node_array_zip/node_array_zip.gml @@ -2,31 +2,31 @@ function Node_Array_Zip(_x, _y, _group = noone) : Node(_x, _y, _group) construct name = "Array Zip"; setDimension(96, 32 + 24); - inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Output", self, VALUE_TYPE.integer, 0); + outputs[0] = nodeValue_Output("Output", self, VALUE_TYPE.integer, 0); static createNewInput = function() { - var index = ds_list_size(inputs); + var index = array_length(inputs); - inputs[| index] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 ) + inputs[index] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 ) .setVisible(true, true); - return inputs[| index]; + return inputs[index]; } setDynamicInput(1); static step = function() { #region - if(inputs[| 0].value_from == noone) { - inputs[| 0].setType(VALUE_TYPE.any); - outputs[| 0].setType(VALUE_TYPE.any); + if(inputs[0].value_from == noone) { + inputs[0].setType(VALUE_TYPE.any); + outputs[0].setType(VALUE_TYPE.any); } else { - inputs[| 0].setType(inputs[| 0].value_from.type); - outputs[| 0].setType(inputs[| 0].value_from.type); + inputs[0].setType(inputs[0].value_from.type); + outputs[0].setType(inputs[0].value_from.type); } - for( var i = 0; i < ds_list_size(inputs); i += data_length ) - inputs[| i].setType(inputs[| i].value_from == noone? VALUE_TYPE.any : inputs[| i].value_from.type); + for( var i = 0; i < array_length(inputs); i += data_length ) + inputs[i].setType(inputs[i].value_from == noone? VALUE_TYPE.any : inputs[i].value_from.type); } #endregion static update = function(frame = CURRENT_FRAME) { #region @@ -35,7 +35,7 @@ function Node_Array_Zip(_x, _y, _group = noone) : Node(_x, _y, _group) construct if(!is_array(_arr)) return; var len = 1; var val = []; - for( var i = 0; i < ds_list_size(inputs); i += data_length ) { + for( var i = 0; i < array_length(inputs); i += data_length ) { val[i] = getInputData(i); if(!is_array(val[i])) { @@ -48,11 +48,11 @@ function Node_Array_Zip(_x, _y, _group = noone) : Node(_x, _y, _group) construct var _out = array_create(len); for( var i = 0; i < len; i++ ) { - for( var j = 0; j < ds_list_size(inputs); j += data_length ) + for( var j = 0; j < array_length(inputs); j += data_length ) _out[i][j] = array_safe_get_fast(val[j], i, 0); } - outputs[| 0].setValue(_out); + outputs[0].setValue(_out); } #endregion static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region diff --git a/scripts/node_ase_file_read/node_ase_file_read.gml b/scripts/node_ase_file_read/node_ase_file_read.gml index a1d3744b9..3338f8c23 100644 --- a/scripts/node_ase_file_read/node_ase_file_read.gml +++ b/scripts/node_ase_file_read/node_ase_file_read.gml @@ -7,7 +7,7 @@ function Node_create_ASE_File_Read(_x, _y, _group = noone) { } var node = new Node_ASE_File_Read(_x, _y, _group).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); if(NODE_NEW_MANUAL) node.doUpdate(); return node; @@ -17,7 +17,7 @@ function Node_create_ASE_File_Read_path(_x, _y, path) { if(!file_exists_empty(path)) return noone; var node = new Node_ASE_File_Read(_x, _y, PANEL_GRAPH.getCurrentContext()).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); node.doUpdate(); return node; @@ -29,23 +29,23 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const w = 128; - inputs[| 0] = nodeValue_Text("Path", self, "") + inputs[0] = nodeValue_Text("Path", self, "") .setDisplay(VALUE_DISPLAY.path_load, { filter: "Aseprite file|*.ase;*.aseprite" }); - inputs[| 1] = nodeValue_Trigger("Generate layers", self, false ) + inputs[1] = nodeValue_Trigger("Generate layers", self, false ) .setDisplay(VALUE_DISPLAY.button, { name: "Generate", UI : true, onClick: function() { refreshLayers(); } }); - inputs[| 2] = nodeValue_Text("Current tag", self, ""); + inputs[2] = nodeValue_Text("Current tag", self, ""); - inputs[| 3] = nodeValue_Bool("Use cel dimension", self, false); + inputs[3] = nodeValue_Bool("Use cel dimension", self, false); - outputs[| 0] = nodeValue_Output("Output", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Output", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Content", self, VALUE_TYPE.object, self); + outputs[1] = nodeValue_Output("Content", self, VALUE_TYPE.object, self); - outputs[| 2] = nodeValue_Output("Path", self, VALUE_TYPE.path, ""); + outputs[2] = nodeValue_Output("Path", self, VALUE_TYPE.path, ""); - outputs[| 3] = nodeValue_Output("Palette", self, VALUE_TYPE.color, []) + outputs[3] = nodeValue_Output("Palette", self, VALUE_TYPE.color, []) .setDisplay(VALUE_DISPLAY.palette); hold_visibility = true; @@ -140,7 +140,7 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const if(mouse_press(mb_left, _focus)) { var _currTag = getInputData(2); var _tagName = tag[$ "Name"]; - inputs[| 2].setValue(_currTag == _tagName? "" : _tagName); + inputs[2].setValue(_currTag == _tagName? "" : _tagName); } } @@ -186,7 +186,7 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const first_update = false; on_drop_file = function(path) { - inputs[| 0].setValue(path); + inputs[0].setValue(path); doUpdate(); return true; } @@ -207,8 +207,8 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const var _name = _layer.name; var _node = noone; - for( var j = 0; j < array_length(outputs[| 1].value_to); j++ ) { - var _targNode = outputs[| 1].value_to[j].node; + for( var j = 0; j < array_length(outputs[1].value_to); j++ ) { + var _targNode = outputs[1].value_to[j].node; if(!_targNode.active) continue; if(_targNode.display_name == _name) { @@ -221,8 +221,8 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const _node = nodeBuild("Node_ASE_layer", nx, ny + i * _nh); lvs[i] = _node; - lvs[i].inputs[| 0].setFrom(outputs[| 1]); - lvs[i].inputs[| 1].setValue(use_cel); + lvs[i].inputs[0].setFrom(outputs[1]); + lvs[i].inputs[1].setValue(use_cel); lvs[i].setDisplayName(_name); } } @@ -271,7 +271,7 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const for( var k = 0; k < array_length(plt); k++ ) array_push(p_arr, make_color_rgb(plt[k][0], plt[k][1], plt[k][2])); - outputs[| 3].setValue(p_arr); + outputs[3].setValue(p_arr); break; case 0x2004: //layer @@ -333,7 +333,7 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const var path = path_get(getInputData(0)); var current_tag = getInputData(2); - outputs[| 2].setValue(path); + outputs[2].setValue(path); if(path_current != path) updatePaths(path); if(content == noone) return; @@ -347,8 +347,8 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const } _tag_delay = 0; - for( var i = 0; i < ds_list_size(inputs[| 2].animator.values); i++ ) { - var kf = inputs[| 2].animator.values[| i]; + for( var i = 0; i < array_length(inputs[2].animator.values); i++ ) { + var kf = inputs[2].animator.values[| i]; if(kf.time > CURRENT_FRAME) break; _tag_delay = kf.time; } @@ -357,9 +357,9 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const var ww = content[$ "Width"]; var hh = content[$ "Height"]; - var surf = outputs[| 0].getValue(); + var surf = outputs[0].getValue(); surf = surface_verify(surf, ww, hh); - outputs[| 0].setValue(surf); + outputs[0].setValue(surf); for (var i = 0, n = array_length(temp_surface); i < n; i++) { temp_surface[i] = surface_verify(temp_surface[i], ww, hh); @@ -413,6 +413,6 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const if(is_array(path)) path = array_safe_get(path, 0); if(!file_exists_empty(path)) return; - inputs[| 0].setValue(path); + inputs[0].setValue(path); } } \ No newline at end of file diff --git a/scripts/node_ase_layer/node_ase_layer.gml b/scripts/node_ase_layer/node_ase_layer.gml index bd2a1d039..a430e186f 100644 --- a/scripts/node_ase_layer/node_ase_layer.gml +++ b/scripts/node_ase_layer/node_ase_layer.gml @@ -1,14 +1,14 @@ function Node_ASE_layer(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "ASE Layer"; - inputs[| 0] = nodeValue("ASE data", self, JUNCTION_CONNECT.input, VALUE_TYPE.object, noone) + inputs[0] = nodeValue("ASE data", self, JUNCTION_CONNECT.input, VALUE_TYPE.object, noone) .setVisible(false, true) .rejectArray(); - inputs[| 1] = nodeValue_Bool("Crop Output", self, false) + inputs[1] = nodeValue_Bool("Crop Output", self, false) .rejectArray(); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); layer_object = noone; _name = ""; @@ -40,10 +40,10 @@ function Node_ASE_layer(_x, _y, _group = noone) : Node(_x, _y, _group) construct var cw = cel? cel.data[$ "Width"] : 1; var ch = cel? cel.data[$ "Height"] : 1; - var surf = outputs[| 0].getValue(); + var surf = outputs[0].getValue(); if(celDim) surf = surface_verify(surf, cw, ch); else surf = surface_verify(surf, ww, hh); - outputs[| 0].setValue(surf); + outputs[0].setValue(surf); if(cel == 0) { surface_clear(surf); return; } diff --git a/scripts/node_atlas/node_atlas.gml b/scripts/node_atlas/node_atlas.gml index add622487..3d2b16104 100644 --- a/scripts/node_atlas/node_atlas.gml +++ b/scripts/node_atlas/node_atlas.gml @@ -1,14 +1,14 @@ function Node_Atlas(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Pixel Expand"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Bool("Active", self, true); + inputs[1] = nodeValue_Bool("Active", self, true); active_index = 1; - inputs[| 2] = nodeValue_Enum_Scroll("Method", self, 0, [ "Radial", "Scan" ]); + inputs[2] = nodeValue_Enum_Scroll("Method", self, 0, [ "Radial", "Scan" ]); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 1, 0, 2 ]; diff --git a/scripts/node_atlas_draw/node_atlas_draw.gml b/scripts/node_atlas_draw/node_atlas_draw.gml index 024d1f753..3a0960ef7 100644 --- a/scripts/node_atlas_draw/node_atlas_draw.gml +++ b/scripts/node_atlas_draw/node_atlas_draw.gml @@ -2,12 +2,12 @@ function Node_Atlas_Draw(_x, _y, _group = noone) : Node(_x, _y, _group) construc name = "Draw Atlas"; previewable = true; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Surface("Atlas", self) + inputs[1] = nodeValue_Surface("Atlas", self) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone); attribute_interpolation(true); @@ -21,9 +21,9 @@ function Node_Atlas_Draw(_x, _y, _group = noone) : Node(_x, _y, _group) construc if(!is_array(atl)) atl = [ atl ]; - var outSurf = outputs[| 0].getValue(); + var outSurf = outputs[0].getValue(); outSurf = surface_verify(outSurf, dim[0], dim[1]); - outputs[| 0].setValue(outSurf); + outputs[0].setValue(outSurf); surface_set_shader(outSurf,,, BLEND.alpha); for( var i = 0, n = array_length(atl); i < n; i++ ) { diff --git a/scripts/node_atlas_get/node_atlas_get.gml b/scripts/node_atlas_get/node_atlas_get.gml index d2f696d84..9c0c5c571 100644 --- a/scripts/node_atlas_get/node_atlas_get.gml +++ b/scripts/node_atlas_get/node_atlas_get.gml @@ -2,27 +2,27 @@ function Node_Atlas_Get(_x, _y, _group = noone) : Node(_x, _y, _group) construct name = "Atlas Get"; previewable = true; - inputs[| 0] = nodeValue_Surface("Atlas", self) + inputs[0] = nodeValue_Surface("Atlas", self) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, []) + outputs[0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, []) .setArrayDepth(1); - outputs[| 1] = nodeValue_Output("Position", self, VALUE_TYPE.float, []) + outputs[1] = nodeValue_Output("Position", self, VALUE_TYPE.float, []) .setDisplay(VALUE_DISPLAY.vector) .setArrayDepth(1); - outputs[| 2] = nodeValue_Output("Rotation", self, VALUE_TYPE.float, []) + outputs[2] = nodeValue_Output("Rotation", self, VALUE_TYPE.float, []) .setArrayDepth(1); - outputs[| 3] = nodeValue_Output("Scale", self, VALUE_TYPE.float, []) + outputs[3] = nodeValue_Output("Scale", self, VALUE_TYPE.float, []) .setDisplay(VALUE_DISPLAY.vector) .setArrayDepth(1); - outputs[| 4] = nodeValue_Output("Blend", self, VALUE_TYPE.color, []) + outputs[4] = nodeValue_Output("Blend", self, VALUE_TYPE.color, []) .setArrayDepth(1); - outputs[| 5] = nodeValue_Output("Alpha", self, VALUE_TYPE.float, []) + outputs[5] = nodeValue_Output("Alpha", self, VALUE_TYPE.float, []) .setArrayDepth(1); static update = function(frame = CURRENT_FRAME) { @@ -53,11 +53,11 @@ function Node_Atlas_Get(_x, _y, _group = noone) : Node(_x, _y, _group) construct alph[i] = _at.alpha; } - outputs[| 0].setValue(surf); - outputs[| 1].setValue(posi); - outputs[| 2].setValue(rota); - outputs[| 3].setValue(scal); - outputs[| 4].setValue(blns); - outputs[| 5].setValue(alph); + outputs[0].setValue(surf); + outputs[1].setValue(posi); + outputs[2].setValue(rota); + outputs[3].setValue(scal); + outputs[4].setValue(blns); + outputs[5].setValue(alph); } } \ No newline at end of file diff --git a/scripts/node_atlas_set/node_atlas_set.gml b/scripts/node_atlas_set/node_atlas_set.gml index 3422237fb..62194cf38 100644 --- a/scripts/node_atlas_set/node_atlas_set.gml +++ b/scripts/node_atlas_set/node_atlas_set.gml @@ -2,24 +2,24 @@ function Node_Atlas_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construct name = "Atlas Set"; previewable = true; - inputs[| 0] = nodeValue_Surface("Atlas", self) + inputs[0] = nodeValue_Surface("Atlas", self) .setVisible(true, true); - inputs[| 1] = nodeValue_Surface("Surface", self); + inputs[1] = nodeValue_Surface("Surface", self); - inputs[| 2] = nodeValue_Vector("Position", self, [ 0, 0 ]); + inputs[2] = nodeValue_Vector("Position", self, [ 0, 0 ]); - inputs[| 3] = nodeValue_Rotation("Rotation", self, 0); + inputs[3] = nodeValue_Rotation("Rotation", self, 0); - inputs[| 4] = nodeValue_Vector("Scale", self, [ 0, 0 ]); + inputs[4] = nodeValue_Vector("Scale", self, [ 0, 0 ]); - inputs[| 5] = nodeValue_Color("Blend", self, c_white); + inputs[5] = nodeValue_Color("Blend", self, c_white); - inputs[| 6] = nodeValue_Float("Alpha", self, 1); + inputs[6] = nodeValue_Float("Alpha", self, 1); - inputs[| 7] = nodeValue_Bool("Recalculate Position", self, true); + inputs[7] = nodeValue_Bool("Recalculate Position", self, true); - outputs[| 0] = nodeValue_Output("Atlas", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Atlas", self, VALUE_TYPE.surface, noone); input_display_list = [ 0, 1, 2, 3, 7, 4, 5, 6, @@ -42,7 +42,7 @@ function Node_Atlas_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construct for( var i = 0; i < 7; i++ ) { val[i] = getInputData(i); len[i] = is_array(val[i])? array_length(val[i]) : 0; - use[i] = inputs[| i].value_from != noone; + use[i] = inputs[i].value_from != noone; } var n = array_length(atl); @@ -115,6 +115,6 @@ function Node_Atlas_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construct } array_resize(natl, _ind); - outputs[| 0].setValue(natl); + outputs[0].setValue(natl); } } \ No newline at end of file diff --git a/scripts/node_atlas_to_struct/node_atlas_to_struct.gml b/scripts/node_atlas_to_struct/node_atlas_to_struct.gml index f73ed0190..685cc91a0 100644 --- a/scripts/node_atlas_to_struct/node_atlas_to_struct.gml +++ b/scripts/node_atlas_to_struct/node_atlas_to_struct.gml @@ -2,10 +2,10 @@ function Node_Atlas_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constr name = "Atlas to Struct"; setDimension(96, 48); - inputs[| 0] = nodeValue_Surface("Atlas", self) + inputs[0] = nodeValue_Surface("Atlas", self) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Struct", self, VALUE_TYPE.struct, []) + outputs[0] = nodeValue_Output("Struct", self, VALUE_TYPE.struct, []) .setArrayDepth(1); static update = function(frame = CURRENT_FRAME) { @@ -35,6 +35,6 @@ function Node_Atlas_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constr } } - outputs[| 0].setValue(str); + outputs[0].setValue(str); } } \ No newline at end of file diff --git a/scripts/node_attributes/node_attributes.gml b/scripts/node_attributes/node_attributes.gml index b4ceee841..290998ea4 100644 --- a/scripts/node_attributes/node_attributes.gml +++ b/scripts/node_attributes/node_attributes.gml @@ -50,7 +50,7 @@ } function attribute_surface_depth(label = true) { - var depth_array = inputs[| 0].type == VALUE_TYPE.surface? global.SURFACE_FORMAT_NAME_PROCESS : global.SURFACE_FORMAT_NAME; + var depth_array = inputs[0].type == VALUE_TYPE.surface? global.SURFACE_FORMAT_NAME_PROCESS : global.SURFACE_FORMAT_NAME; attributes.color_depth = array_find(depth_array, "8 bit RGBA"); if(label) array_push(attributeEditors, "Surface"); diff --git a/scripts/node_audio_loudness/node_audio_loudness.gml b/scripts/node_audio_loudness/node_audio_loudness.gml index 1bf6ff18b..071f00590 100644 --- a/scripts/node_audio_loudness/node_audio_loudness.gml +++ b/scripts/node_audio_loudness/node_audio_loudness.gml @@ -2,11 +2,11 @@ function Node_Audio_Loudness(_x, _y, _group = noone) : Node_Processor(_x, _y, _g name = "Audio Loudness"; setDimension(96, 72); - inputs[| 0] = nodeValue_Float("Audio Data", self, []) + inputs[0] = nodeValue_Float("Audio Data", self, []) .setArrayDepth(1) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Loudness", self, VALUE_TYPE.float, 0); + outputs[0] = nodeValue_Output("Loudness", self, VALUE_TYPE.float, 0); static processData = function(_outSurf, _data, _output_index, _array_index) { var _dat = _data[0]; diff --git a/scripts/node_audio_window/node_audio_window.gml b/scripts/node_audio_window/node_audio_window.gml index 6f4dfefd7..b5b2b9c80 100644 --- a/scripts/node_audio_window/node_audio_window.gml +++ b/scripts/node_audio_window/node_audio_window.gml @@ -1,28 +1,28 @@ function Node_Audio_Window(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Audio Window"; - inputs[| 0] = nodeValue_AudioBit("Audio data", self, noone) + inputs[0] = nodeValue_AudioBit("Audio data", self, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Int("Width", self, 4096, "Amount of bits to extract."); + inputs[1] = nodeValue_Int("Width", self, 4096, "Amount of bits to extract."); - inputs[| 2] = nodeValue_Float("Location", self, 0) + inputs[2] = nodeValue_Float("Location", self, 0) .setDisplay(VALUE_DISPLAY._default, { unit: 0, side_button: button(function() { - inputs[| 2].display_data.unit = (inputs[| 2].display_data.unit + 1) % 3; - inputs[| 2].display_data.side_button.tooltip.index = inputs[| 2].display_data.unit; + inputs[2].display_data.unit = (inputs[2].display_data.unit + 1) % 3; + inputs[2].display_data.side_button.tooltip.index = inputs[2].display_data.unit; update(); }).setTooltip( new tooltipSelector("Unit", [ "Bit", "Second", "Progress" ]) ) - .setIcon( THEME.unit_audio, [ function() { return inputs[| 2].display_data.unit; } ], COLORS._main_icon ) + .setIcon( THEME.unit_audio, [ function() { return inputs[2].display_data.unit; } ], COLORS._main_icon ) } ); - inputs[| 3] = nodeValue_Enum_Button("Cursor location", self, 1, [ "Start", "Middle", "End" ]); + inputs[3] = nodeValue_Enum_Button("Cursor location", self, 1, [ "Start", "Middle", "End" ]); - inputs[| 4] = nodeValue_Int("Step", self, 16); + inputs[4] = nodeValue_Int("Step", self, 16); - inputs[| 5] = nodeValue_Bool("Match timeline", self, true, "Set window cursor to match animation timeline."); + inputs[5] = nodeValue_Bool("Match timeline", self, true, "Set window cursor to match animation timeline."); - outputs[| 0] = nodeValue_Output("Bit Array", self, VALUE_TYPE.float, []) + outputs[0] = nodeValue_Output("Bit Array", self, VALUE_TYPE.float, []) .setArrayDepth(1); input_display_list = [ 0, @@ -36,7 +36,7 @@ function Node_Audio_Window(_x, _y, _group = noone) : Node(_x, _y, _group) constr static step = function() { var _anim = getInputData(5); - inputs[| 2].setVisible(!_anim); + inputs[2].setVisible(!_anim); update_on_frame = _anim; } @@ -50,7 +50,7 @@ function Node_Audio_Window(_x, _y, _group = noone) : Node(_x, _y, _group) constr var _stp = getInputData(4); _stp = max(1, _stp); var _anim = getInputData(5); - var _unit = inputs[| 2].display_data.unit; + var _unit = inputs[2].display_data.unit; var off = 0, st = 0, ed = 1, len = 1; var _ch = _aud.getChannel(); @@ -92,7 +92,7 @@ function Node_Audio_Window(_x, _y, _group = noone) : Node(_x, _y, _group) constr res[i][_ind++] = _dat[j]; } - outputs[| 0].setValue(res); + outputs[0].setValue(res); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region diff --git a/scripts/node_average/node_average.gml b/scripts/node_average/node_average.gml index df059a061..3f415f5dc 100644 --- a/scripts/node_average/node_average.gml +++ b/scripts/node_average/node_average.gml @@ -1,17 +1,17 @@ function Node_Average(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Average"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Surface("Mask", self); + inputs[1] = nodeValue_Surface("Mask", self); - inputs[| 2] = nodeValue_Float("Mix", self, 1) + inputs[2] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Bool("Active", self, true); + inputs[3] = nodeValue_Bool("Active", self, true); active_index = 3; - inputs[| 4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(1); // inputs 5, 6, @@ -19,9 +19,9 @@ function Node_Average(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c ["Surfaces", false], 0, 1, 2, 5, 6, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Color", self, VALUE_TYPE.color, c_black); + outputs[1] = nodeValue_Output("Color", self, VALUE_TYPE.color, c_black); attribute_surface_depth(); diff --git a/scripts/node_base_convert/node_base_convert.gml b/scripts/node_base_convert/node_base_convert.gml index 37d1ce8ad..b8f34c8f1 100644 --- a/scripts/node_base_convert/node_base_convert.gml +++ b/scripts/node_base_convert/node_base_convert.gml @@ -4,14 +4,14 @@ function Node_Base_Convert(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro setDimension(96, 48); - inputs[| 0] = nodeValue_Text("Value", self, "") + inputs[0] = nodeValue_Text("Value", self, "") .setVisible(true, true); - inputs[| 1] = nodeValue_Int("Base from", self, 10); + inputs[1] = nodeValue_Int("Base from", self, 10); - inputs[| 2] = nodeValue_Int("Base to", self, 10); + inputs[2] = nodeValue_Int("Base to", self, 10); - outputs[| 0] = nodeValue_Output("Result", self, VALUE_TYPE.text, ""); + outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.text, ""); static processData = function(_output, _data, _output_index, _array_index = 0) { var val = _data[0]; diff --git a/scripts/node_bend/node_bend.gml b/scripts/node_bend/node_bend.gml index 2dd7b140a..bc7813396 100644 --- a/scripts/node_bend/node_bend.gml +++ b/scripts/node_bend/node_bend.gml @@ -1,24 +1,24 @@ function Node_Bend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Bend"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Bool("Active", self, true); + inputs[1] = nodeValue_Bool("Active", self, true); active_index = 1; - inputs[| 2] = nodeValue_Enum_Scroll("Type", self, 0, [ new scrollItem("Arc", s_node_bend_type, 0), + inputs[2] = nodeValue_Enum_Scroll("Type", self, 0, [ new scrollItem("Arc", s_node_bend_type, 0), new scrollItem("Wave", s_node_bend_type, 1) ]); - inputs[| 3] = nodeValue_Enum_Button("Axis", self, 0, [ "x", "y" ]); + inputs[3] = nodeValue_Enum_Button("Axis", self, 0, [ "x", "y" ]); - inputs[| 4] = nodeValue_Float("Amount", self, 0.25) + inputs[4] = nodeValue_Float("Amount", self, 0.25) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[| 5] = nodeValue_Float("Scale", self, 1); + inputs[5] = nodeValue_Float("Scale", self, 1); - inputs[| 6] = nodeValue_Float("Shift", self, 0.); + inputs[6] = nodeValue_Float("Shift", self, 0.); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 1, ["Surfaces", false], 0, @@ -33,8 +33,8 @@ function Node_Bend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons static step = function() { var _typ = getInputData(2); - inputs[| 5].setVisible(_typ == 1); - inputs[| 6].setVisible(_typ == 1); + inputs[5].setVisible(_typ == 1); + inputs[6].setVisible(_typ == 1); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_bevel/node_bevel.gml b/scripts/node_bevel/node_bevel.gml index b0ad6b827..9985e3a0f 100644 --- a/scripts/node_bevel/node_bevel.gml +++ b/scripts/node_bevel/node_bevel.gml @@ -1,39 +1,39 @@ function Node_Bevel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Bevel"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Int("Height", self, 4) + inputs[1] = nodeValue_Int("Height", self, 4) .setMappable(11); - inputs[| 2] = nodeValue_Vector("Shift", self, [ 0, 0 ]); + inputs[2] = nodeValue_Vector("Shift", self, [ 0, 0 ]); - inputs[| 3] = nodeValue_Vector("Scale", self, [ 1, 1 ] ); + inputs[3] = nodeValue_Vector("Scale", self, [ 1, 1 ] ); - inputs[| 4] = nodeValue_Enum_Scroll("Slope", self, 0, [ new scrollItem("Linear", s_node_curve, 2), + inputs[4] = nodeValue_Enum_Scroll("Slope", self, 0, [ new scrollItem("Linear", s_node_curve, 2), new scrollItem("Smooth", s_node_curve, 4), new scrollItem("Circular", s_node_curve, 5), ]); - inputs[| 5] = nodeValue_Surface("Mask", self); + inputs[5] = nodeValue_Surface("Mask", self); - inputs[| 6] = nodeValue_Float("Mix", self, 1) + inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Bool("Active", self, true); + inputs[7] = nodeValue_Bool("Active", self, true); active_index = 7; - inputs[| 8] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + inputs[8] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); __init_mask_modifier(5); // inputs 9, 10 ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValueMap("Height map", self); + inputs[11] = nodeValueMap("Height map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 7, ["Surfaces", true], 0, 5, 6, 9, 10, @@ -54,7 +54,7 @@ function Node_Bevel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con var _ph = surface_get_height_safe(_surf) * _s / 2; var _hov = false; - var hv = inputs[| 2].drawOverlay(hover, active, _x + _pw, _y + _ph, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[2].drawOverlay(hover, active, _x + _pw, _y + _ph, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } #endregion @@ -62,7 +62,7 @@ function Node_Bevel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con static step = function() { #region __step_mask_modifier(); - inputs[| 1].mappableStep(); + inputs[1].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -75,7 +75,7 @@ function Node_Bevel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con surface_set_shader(_outSurf, max(_dim[0], _dim[1]) < 256? sh_bevel : sh_bevel_highp); shader_set_f("dimension", _dim); - shader_set_f_map("height", _hei, _data[11], inputs[| 1]); + shader_set_f_map("height", _hei, _data[11], inputs[1]); shader_set_2("shift", _shf); shader_set_2("scale", _sca); shader_set_i("slope", _slp); diff --git a/scripts/node_blend/node_blend.gml b/scripts/node_blend/node_blend.gml index 1fc16366e..a96a99b4e 100644 --- a/scripts/node_blend/node_blend.gml +++ b/scripts/node_blend/node_blend.gml @@ -10,7 +10,7 @@ var query = struct_try_get(_param, "query", ""); var ind = array_find(global.node_blend_keys, query); - if(ind >= 0) node.inputs[| 2].setValue(ind); + if(ind >= 0) node.inputs[2].setValue(ind); return node; } @@ -34,42 +34,42 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con name = "Blend"; manage_atlas = false; - inputs[| 0] = nodeValue_Surface("Background", self); - inputs[| 1] = nodeValue_Surface("Foreground", self); + inputs[0] = nodeValue_Surface("Background", self); + inputs[1] = nodeValue_Surface("Foreground", self); - inputs[| 2] = nodeValue_Enum_Scroll("Blend mode", self, 0, BLEND_TYPES ); + inputs[2] = nodeValue_Enum_Scroll("Blend mode", self, 0, BLEND_TYPES ); - inputs[| 3] = nodeValue_Float("Opacity", self, 1) + inputs[3] = nodeValue_Float("Opacity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 4] = nodeValue_Surface("Mask", self); + inputs[4] = nodeValue_Surface("Mask", self); - inputs[| 5] = nodeValue_Enum_Scroll("Fill mode", self, 0, [ "None", "Stretch", "Tile" ]); + inputs[5] = nodeValue_Enum_Scroll("Fill mode", self, 0, [ "None", "Stretch", "Tile" ]); - inputs[| 6] = nodeValue_Enum_Scroll("Output dimension", self, 0, [ "Background", "Forground", "Mask", "Maximum", "Constant" ]) + inputs[6] = nodeValue_Enum_Scroll("Output dimension", self, 0, [ "Background", "Forground", "Mask", "Maximum", "Constant" ]) .rejectArray(); - inputs[| 7] = nodeValue_Vector("Constant dimension", self, DEF_SURF); + inputs[7] = nodeValue_Vector("Constant dimension", self, DEF_SURF); - inputs[| 8] = nodeValue_Bool("Active", self, true); + inputs[8] = nodeValue_Bool("Active", self, true); active_index = 8; - inputs[| 9] = nodeValue_Bool("Preserve alpha", self, false); + inputs[9] = nodeValue_Bool("Preserve alpha", self, false); - inputs[| 10] = nodeValue_Enum_Button("Horizontal Align", self, 0, + inputs[10] = nodeValue_Enum_Button("Horizontal Align", self, 0, [ THEME.inspector_surface_halign, THEME.inspector_surface_halign, THEME.inspector_surface_halign]); - inputs[| 11] = nodeValue_Enum_Button("Vertical Align", self, 0, + inputs[11] = nodeValue_Enum_Button("Vertical Align", self, 0, [ THEME.inspector_surface_valign, THEME.inspector_surface_valign, THEME.inspector_surface_valign]); - inputs[| 12] = nodeValue_Bool("Invert mask", self, false); + inputs[12] = nodeValue_Bool("Invert mask", self, false); - inputs[| 13] = nodeValue_Float("Mask feather", self, 1) + inputs[13] = nodeValue_Float("Mask feather", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); - inputs[| 14] = nodeValue_Vector("Position", self, [ 0.5, 0.5 ]); + inputs[14] = nodeValue_Vector("Position", self, [ 0.5, 0.5 ]); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 8, ["Surfaces", true], 0, 1, 4, 12, 13, 6, 7, @@ -89,7 +89,7 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con drag_my = 0; static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _surf = outputs[| 0].getValue(); + var _surf = outputs[0].getValue(); if(is_array(_surf)) _surf = array_safe_get_fast(_surf, preview_index); if(is_struct(_surf)) return; if(!surface_exists(_surf)) return; @@ -118,7 +118,7 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con px /= sw; py /= sh; - if(inputs[| 14].setValue([ px, py ])) + if(inputs[14].setValue([ px, py ])) UNDO_HOLDING = true; if(mouse_release(mb_left)) { @@ -150,11 +150,11 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con var _atlas = is_instanceof(_fore, SurfaceAtlas); - inputs[| 5].setVisible(!_atlas); - inputs[| 6].editWidget.data_list = _atlas? [ "Background", "Forground" ] : [ "Background", "Forground", "Mask", "Maximum", "Constant" ]; - inputs[| 7].setVisible(_outp == 4); + inputs[5].setVisible(!_atlas); + inputs[6].editWidget.data_list = _atlas? [ "Background", "Forground" ] : [ "Background", "Forground", "Mask", "Maximum", "Constant" ]; + inputs[7].setVisible(_outp == 4); - inputs[| 14].setVisible(_fill == 0 && !_atlas); + inputs[14].setVisible(_fill == 0 && !_atlas); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_blend_edge/node_blend_edge.gml b/scripts/node_blend_edge/node_blend_edge.gml index da756abb2..b8270713d 100644 --- a/scripts/node_blend_edge/node_blend_edge.gml +++ b/scripts/node_blend_edge/node_blend_edge.gml @@ -1,30 +1,30 @@ function Node_Blend_Edge(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Blend Edge"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Width", self, 0.1) + inputs[1] = nodeValue_Float("Width", self, 0.1) .setDisplay(VALUE_DISPLAY.slider) .setMappable(5); - inputs[| 2] = nodeValue_Enum_Button("Types",self, 0, [ "Both", "Horizontal", "Vertical" ]); + inputs[2] = nodeValue_Enum_Button("Types",self, 0, [ "Both", "Horizontal", "Vertical" ]); - inputs[| 3] = nodeValue_Bool("Active", self, true); + inputs[3] = nodeValue_Bool("Active", self, true); active_index = 3; - inputs[| 4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); ///////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 5] = nodeValue_Surface("Width map", self) + inputs[5] = nodeValue_Surface("Width map", self) .setVisible(false, false); ///////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 6] = nodeValue_Float("Blending", self, 1) + inputs[6] = nodeValue_Float("Blending", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Float("Smoothness", self, 0) + inputs[7] = nodeValue_Float("Smoothness", self, 0) .setDisplay(VALUE_DISPLAY.slider); input_display_list = [ 3, 4, @@ -32,14 +32,14 @@ function Node_Blend_Edge(_x, _y, _group = noone) : Node_Processor(_x, _y, _group ["Blend", false], 2, 1, 5, 6, 7, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); temp_surface = array_create(1); attribute_surface_depth(); static step = function() { #region - inputs[| 1].mappableStep(); + inputs[1].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -54,7 +54,7 @@ function Node_Blend_Edge(_x, _y, _group = noone) : Node_Processor(_x, _y, _group if(_edg == 0) { surface_set_shader(temp_surface[0], sh_blend_edge); shader_set_f("dimension", _sw, _sh); - shader_set_f_map("width", _data[1], _data[5], inputs[| 1]); + shader_set_f_map("width", _data[1], _data[5], inputs[1]); shader_set_i("edge" , 0); shader_set_f("blend" , clamp(_data[6], 0.001, 0.999)); shader_set_f("smooth" , _data[7]); @@ -71,7 +71,7 @@ function Node_Blend_Edge(_x, _y, _group = noone) : Node_Processor(_x, _y, _group } else { surface_set_shader(_outSurf, sh_blend_edge); shader_set_f("dimension", _sw, _sh); - shader_set_f_map("width", _data[1], _data[5], inputs[| 1]); + shader_set_f_map("width", _data[1], _data[5], inputs[1]); shader_set_i("edge" , _edg - 1); shader_set_f("blend" , clamp(_data[6], 0.001, 0.999)); diff --git a/scripts/node_blobify/node_blobify.gml b/scripts/node_blobify/node_blobify.gml index c5bb6d5ae..9a09dcd5d 100644 --- a/scripts/node_blobify/node_blobify.gml +++ b/scripts/node_blobify/node_blobify.gml @@ -1,14 +1,14 @@ function Node_Blobify(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Blobify"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Bool("Active", self, true); + inputs[1] = nodeValue_Bool("Active", self, true); - inputs[| 2] = nodeValue_Int("Radius", self, 3) + inputs[2] = nodeValue_Int("Radius", self, 3) .setValidator(VV_min(0)); - inputs[| 3] = nodeValue_Float("Threshold", self, 0.5) + inputs[3] = nodeValue_Float("Threshold", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); active_index = 1; @@ -18,7 +18,7 @@ function Node_Blobify(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c ["Blobify", false], 2, 3, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); diff --git a/scripts/node_bloom/node_bloom.gml b/scripts/node_bloom/node_bloom.gml index 36ecc4f87..81882725b 100644 --- a/scripts/node_bloom/node_bloom.gml +++ b/scripts/node_bloom/node_bloom.gml @@ -1,38 +1,38 @@ function Node_Bloom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Bloom"; - inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Size", self, 3, "Bloom blur radius.") + inputs[0] = nodeValue_Surface("Surface in", self); + inputs[1] = nodeValue_Float("Size", self, 3, "Bloom blur radius.") .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] }); - inputs[| 2] = nodeValue_Float("Tolerance", self, 0.5, "How bright a pixel should be to start blooming.") + inputs[2] = nodeValue_Float("Tolerance", self, 0.5, "How bright a pixel should be to start blooming.") .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Float("Strength", self, .25, "Blend intensity.") + inputs[3] = nodeValue_Float("Strength", self, .25, "Blend intensity.") .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] }); - inputs[| 4] = nodeValue_Surface("Bloom mask", self); + inputs[4] = nodeValue_Surface("Bloom mask", self); - inputs[| 5] = nodeValue_Surface("Mask", self); + inputs[5] = nodeValue_Surface("Mask", self); - inputs[| 6] = nodeValue_Float("Mix", self, 1) + inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Bool("Active", self, true); + inputs[7] = nodeValue_Bool("Active", self, true); active_index = 7; - inputs[| 8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(5); // inputs 9, 10 - inputs[| 11] = nodeValue_Float("Aspect Ratio", self, 1) + inputs[11] = nodeValue_Float("Aspect Ratio", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 12] = nodeValue_Rotation("Direction", self, 0); + inputs[12] = nodeValue_Rotation("Direction", self, 0); - inputs[| 13] = nodeValue_Enum_Scroll("Types", self, 0, [ "Gaussian", "Zoom" ]); + inputs[13] = nodeValue_Enum_Scroll("Types", self, 0, [ "Gaussian", "Zoom" ]); - inputs[| 14] = nodeValue_Vector("Zoom Origin", self, [ 0.5, 0.5 ]) + inputs[14] = nodeValue_Vector("Zoom Origin", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); input_display_list = [ 7, 8, @@ -41,7 +41,7 @@ function Node_Bloom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con ["Blur", false], 13, 11, 12, 14, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); temp_surface = [ 0 ]; @@ -52,7 +52,7 @@ function Node_Bloom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con var _typ = getSingleValue(13); var _hov = false; - if(_typ == 1) { var hv = inputs[| 14].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; } + if(_typ == 1) { var hv = inputs[14].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; } return _hov; } #endregion @@ -61,9 +61,9 @@ function Node_Bloom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con __step_mask_modifier(); var _typ = getSingleValue(13); - inputs[| 11].setVisible(_typ == 0); - inputs[| 12].setVisible(_typ == 0); - inputs[| 14].setVisible(_typ == 1); + inputs[11].setVisible(_typ == 0); + inputs[12].setVisible(_typ == 0); + inputs[14].setVisible(_typ == 1); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_blur/node_blur.gml b/scripts/node_blur/node_blur.gml index d42ccbb54..c7002b166 100644 --- a/scripts/node_blur/node_blur.gml +++ b/scripts/node_blur/node_blur.gml @@ -1,37 +1,37 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Blur"; - inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Int("Size", self, 3) + inputs[0] = nodeValue_Surface("Surface in", self); + inputs[1] = nodeValue_Int("Size", self, 3) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 32, 0.1 ] }); - inputs[| 2] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + inputs[2] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 3] = nodeValue_Bool("Override color", self, false, "Replace all color while keeping the alpha. Used to\nfix grey outline when bluring transparent pixel."); + inputs[3] = nodeValue_Bool("Override color", self, false, "Replace all color while keeping the alpha. Used to\nfix grey outline when bluring transparent pixel."); - inputs[| 4] = nodeValue_Color("Color", self, c_black); + inputs[4] = nodeValue_Color("Color", self, c_black); - inputs[| 5] = nodeValue_Surface("Mask", self); + inputs[5] = nodeValue_Surface("Mask", self); - inputs[| 6] = nodeValue_Float("Mix", self, 1) + inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Bool("Active", self, true); + inputs[7] = nodeValue_Bool("Active", self, true); active_index = 7; - inputs[| 8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(5); // inputs 9, 10 - inputs[| 11] = nodeValue_Bool("Gamma Correction", self, false); + inputs[11] = nodeValue_Bool("Gamma Correction", self, false); - inputs[| 12] = nodeValue_Float("Aspect Ratio", self, 1) + inputs[12] = nodeValue_Float("Aspect Ratio", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 13] = nodeValue_Rotation("Direction", self, 0); + inputs[13] = nodeValue_Rotation("Direction", self, 0); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 7, 8, ["Surfaces", true], 0, 5, 6, 9, 10, @@ -61,7 +61,7 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons var _aspc = _data[12]; var _dirr = _data[13]; - inputs[| 4].setVisible(_isovr); + inputs[4].setVisible(_isovr); if(!is_surface(_surf)) return _outSurf; var format = surface_get_format(_surf); diff --git a/scripts/node_blur_bokeh/node_blur_bokeh.gml b/scripts/node_blur_bokeh/node_blur_bokeh.gml index 2cd86e78b..a6e0217a7 100644 --- a/scripts/node_blur_bokeh/node_blur_bokeh.gml +++ b/scripts/node_blur_bokeh/node_blur_bokeh.gml @@ -1,27 +1,27 @@ function Node_Blur_Bokeh(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Lens Blur"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Strength", self, 0.2) + inputs[1] = nodeValue_Float("Strength", self, 0.2) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.01] }) .setMappable(8); - inputs[| 2] = nodeValue_Surface("Mask", self); + inputs[2] = nodeValue_Surface("Mask", self); - inputs[| 3] = nodeValue_Float("Mix", self, 1) + inputs[3] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 4] = nodeValue_Bool("Active", self, true); + inputs[4] = nodeValue_Bool("Active", self, true); active_index = 4; - inputs[| 5] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[5] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(2); // inputs 6, 7 ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 8] = nodeValueMap("Strength map", self); + inputs[8] = nodeValueMap("Strength map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -30,21 +30,21 @@ function Node_Blur_Bokeh(_x, _y, _group = noone) : Node_Processor(_x, _y, _group ["Blur", false], 1, 8, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static step = function() { #region __step_mask_modifier(); - inputs[| 1].mappableStep(); + inputs[1].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region surface_set_shader(_outSurf, sh_blur_bokeh); shader_set_f("dimension", surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0])); - shader_set_f_map("strength", _data[1], _data[8], inputs[| 1]); + shader_set_f_map("strength", _data[1], _data[8], inputs[1]); draw_surface_safe(_data[0]); surface_reset_shader(); diff --git a/scripts/node_blur_contrast/node_blur_contrast.gml b/scripts/node_blur_contrast/node_blur_contrast.gml index 130c20ce8..ba6752367 100644 --- a/scripts/node_blur_contrast/node_blur_contrast.gml +++ b/scripts/node_blur_contrast/node_blur_contrast.gml @@ -1,34 +1,34 @@ function Node_Blur_Contrast(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Contrast Blur"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Size", self, 3) + inputs[1] = nodeValue_Float("Size", self, 3) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] }); - inputs[| 2] = nodeValue_Float("Threshold", self, 0.2, "Brightness different to be blur together.") + inputs[2] = nodeValue_Float("Threshold", self, 0.2, "Brightness different to be blur together.") .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Surface("Mask", self); + inputs[3] = nodeValue_Surface("Mask", self); - inputs[| 4] = nodeValue_Float("Mix", self, 1) + inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Bool("Active", self, true); + inputs[5] = nodeValue_Bool("Active", self, true); active_index = 5; - inputs[| 6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(3); // inputs 7, 8 - inputs[| 9] = nodeValue_Bool("Gamma Correction", self, false); + inputs[9] = nodeValue_Bool("Gamma Correction", self, false); input_display_list = [ 5, 6, ["Surfaces", true], 0, 3, 4, 7, 8, ["Blur", false], 1, 2, 9, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); temp_surface = [ surface_create(1, 1) ]; diff --git a/scripts/node_blur_directional/node_blur_directional.gml b/scripts/node_blur_directional/node_blur_directional.gml index 5a8a9ae56..5df2fa616 100644 --- a/scripts/node_blur_directional/node_blur_directional.gml +++ b/scripts/node_blur_directional/node_blur_directional.gml @@ -1,51 +1,51 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Directional Blur"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Strength", self, 0.2) + inputs[1] = nodeValue_Float("Strength", self, 0.2) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) .setMappable(9); - inputs[| 2] = nodeValue_Rotation("Direction", self, 0) + inputs[2] = nodeValue_Rotation("Direction", self, 0) .setMappable(10); - inputs[| 3] = nodeValue_Surface("Mask", self); + inputs[3] = nodeValue_Surface("Mask", self); - inputs[| 4] = nodeValue_Float("Mix", self, 1) + inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Bool("Active", self, true); + inputs[5] = nodeValue_Bool("Active", self, true); active_index = 5; - inputs[| 6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(3); // inputs 7, 8 ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 9] = nodeValueMap("Strength map", self); + inputs[ 9] = nodeValueMap("Strength map", self); - inputs[| 10] = nodeValueMap("Direction map", self); + inputs[10] = nodeValueMap("Direction map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValue_Bool("Single direction", self, false); + inputs[11] = nodeValue_Bool("Single direction", self, false); - inputs[| 12] = nodeValue_Bool("Gamma Correction", self, false); + inputs[12] = nodeValue_Bool("Gamma Correction", self, false); input_display_list = [ 5, 6, ["Surfaces", true], 0, 3, 4, 7, 8, ["Blur", false], 1, 9, 2, 10, 11, 12, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); attribute_oversample(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var _surf = outputs[| 0].getValue(); + var _surf = outputs[0].getValue(); if(is_array(_surf)) { if(array_length(_surf) == 0) return; _surf = _surf[preview_index]; @@ -55,7 +55,7 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y, var hh = surface_get_height_safe(_surf); var _hov = false; - var hv = inputs[| 2].drawOverlay(hover, active, _x + ww / 2 * _s, _y + hh / 2 * _s, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[2].drawOverlay(hover, active, _x + ww / 2 * _s, _y + hh / 2 * _s, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } #endregion @@ -63,16 +63,16 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y, static step = function() { #region __step_mask_modifier(); - inputs[| 1].mappableStep(); - inputs[| 2].mappableStep(); + inputs[ 1].mappableStep(); + inputs[ 2].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region surface_set_shader(_outSurf, sh_blur_directional); shader_set_f("size", max(surface_get_width_safe(_data[0]), surface_get_height_safe( _data[0]))); - shader_set_f_map("strength", _data[ 1], _data[ 9], inputs[| 1]); - shader_set_f_map("direction", _data[ 2], _data[10], inputs[| 2]); + shader_set_f_map("strength", _data[ 1], _data[ 9], inputs[ 1]); + shader_set_f_map("direction", _data[ 2], _data[10], inputs[ 2]); shader_set_i("scale", _data[11]); shader_set_i("gamma", _data[12]); shader_set_i("sampleMode", struct_try_get(attributes, "oversample")); diff --git a/scripts/node_blur_path/node_blur_path.gml b/scripts/node_blur_path/node_blur_path.gml index 4b320462a..db1b945fb 100644 --- a/scripts/node_blur_path/node_blur_path.gml +++ b/scripts/node_blur_path/node_blur_path.gml @@ -1,31 +1,31 @@ function Node_Blur_Path(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Path Blur"; - inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_PathNode("Blur Path", self, noone) + inputs[0] = nodeValue_Surface("Surface in", self); + inputs[1] = nodeValue_PathNode("Blur Path", self, noone) .setVisible(true, true); - inputs[| 2] = nodeValue_Int("Resolution", self, 32); + inputs[2] = nodeValue_Int("Resolution", self, 32); - inputs[| 3] = nodeValue_Surface("Mask", self); + inputs[3] = nodeValue_Surface("Mask", self); - inputs[| 4] = nodeValue_Float("Mix", self, 1) + inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Bool("Active", self, true); + inputs[5] = nodeValue_Bool("Active", self, true); active_index = 5; - inputs[| 6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(3); // inputs 7, 8 - inputs[| 9] = nodeValue_Float("Intensity", self, 1); + inputs[9] = nodeValue_Float("Intensity", self, 1); - inputs[| 10] = nodeValue("Intensity Along Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + inputs[10] = nodeValue("Intensity Along Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); - inputs[| 11] = nodeValue_Slider_Range("Range", self, [ 0, 1 ]); + inputs[11] = nodeValue_Slider_Range("Range", self, [ 0, 1 ]); - inputs[| 12] = nodeValue_Float("Path Origin", self, 0) + inputs[12] = nodeValue_Float("Path Origin", self, 0) .setDisplay(VALUE_DISPLAY.slider); input_display_list = [ 5, 6, @@ -34,7 +34,7 @@ function Node_Blur_Path(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ["Blur", false], 2, 9, 10, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); attribute_oversample(); diff --git a/scripts/node_blur_radial/node_blur_radial.gml b/scripts/node_blur_radial/node_blur_radial.gml index 74e9a03d5..779451f5b 100644 --- a/scripts/node_blur_radial/node_blur_radial.gml +++ b/scripts/node_blur_radial/node_blur_radial.gml @@ -1,38 +1,38 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Radial Blur"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Rotation("Strength", self, 45) + inputs[1] = nodeValue_Rotation("Strength", self, 45) .setMappable(10); - inputs[| 2] = nodeValue_Vector("Center", self, [ 0.5, 0.5 ]) + inputs[2] = nodeValue_Vector("Center", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[| 3] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + inputs[3] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 4] = nodeValue_Surface("Mask", self); + inputs[4] = nodeValue_Surface("Mask", self); - inputs[| 5] = nodeValue_Float("Mix", self, 1) + inputs[5] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 6] = nodeValue_Bool("Active", self, true); + inputs[6] = nodeValue_Bool("Active", self, true); active_index = 6; - inputs[| 7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(4); // inputs 8, 9, ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 10] = nodeValueMap("Strength map", self); + inputs[10] = nodeValueMap("Strength map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValue_Bool("Gamma Correction", self, false); + inputs[11] = nodeValue_Bool("Gamma Correction", self, false); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 6, 7, ["Surfaces", true], 0, 4, 5, 8, 9, @@ -49,8 +49,8 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou var py = _y + pos[1] * _s; var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); _hov |= hv; - var hv = inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } #endregion @@ -58,7 +58,7 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou static step = function() { #region __step_mask_modifier(); - inputs[| 1].mappableStep(); + inputs[1].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -71,7 +71,7 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou surface_set_shader(_outSurf, sh_blur_radial); shader_set_interpolation(_data[0]); shader_set_f("dimension", surface_get_width_safe(_outSurf), surface_get_height_safe(_outSurf)); - shader_set_f_map("strength", _data[1], _data[10], inputs[| 1]); + shader_set_f_map("strength", _data[1], _data[10], inputs[1]); shader_set_2("center", _cen); shader_set_f("gamma", _data[11]); diff --git a/scripts/node_blur_shape/node_blur_shape.gml b/scripts/node_blur_shape/node_blur_shape.gml index 8a07b7d75..82d1451ab 100644 --- a/scripts/node_blur_shape/node_blur_shape.gml +++ b/scripts/node_blur_shape/node_blur_shape.gml @@ -1,33 +1,33 @@ function Node_Blur_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Shape Blur"; - inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Surface("Blur Shape", self); + inputs[0] = nodeValue_Surface("Surface in", self); + inputs[1] = nodeValue_Surface("Blur Shape", self); - inputs[| 2] = nodeValue_Surface("Blur mask", self); + inputs[2] = nodeValue_Surface("Blur mask", self); - inputs[| 3] = nodeValue_Surface("Mask", self); + inputs[3] = nodeValue_Surface("Mask", self); - inputs[| 4] = nodeValue_Float("Mix", self, 1) + inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Bool("Active", self, true); + inputs[5] = nodeValue_Bool("Active", self, true); active_index = 5; - inputs[| 6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); - inputs[| 7] = nodeValue_Enum_Button("Mode", self, 0, [ "Blur", "Max" ]); + inputs[7] = nodeValue_Enum_Button("Mode", self, 0, [ "Blur", "Max" ]); __init_mask_modifier(3); // inputs 8, 9, - inputs[| 10] = nodeValue_Bool("Gamma Correction", self, false); + inputs[10] = nodeValue_Bool("Gamma Correction", self, false); input_display_list = [ 5, 6, ["Surfaces", true], 0, 3, 4, 8, 9, ["Blur", false], 7, 1, 2, 10, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); attribute_oversample(); diff --git a/scripts/node_blur_simple/node_blur_simple.gml b/scripts/node_blur_simple/node_blur_simple.gml index 02bae444d..f4d98c159 100644 --- a/scripts/node_blur_simple/node_blur_simple.gml +++ b/scripts/node_blur_simple/node_blur_simple.gml @@ -1,41 +1,41 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Non-Uniform Blur"; - inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Size", self, 3) + inputs[0] = nodeValue_Surface("Surface in", self); + inputs[1] = nodeValue_Float("Size", self, 3) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] }); - inputs[| 2] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + inputs[2] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 3] = nodeValue_Surface("Blur mask", self); + inputs[3] = nodeValue_Surface("Blur mask", self); - inputs[| 4] = nodeValue_Bool("Override color", self, false, "Replace all color while keeping the alpha. Used to\nfix grey outline when bluring transparent pixel."); + inputs[4] = nodeValue_Bool("Override color", self, false, "Replace all color while keeping the alpha. Used to\nfix grey outline when bluring transparent pixel."); - inputs[| 5] = nodeValue_Color("Color", self, c_black); + inputs[5] = nodeValue_Color("Color", self, c_black); - inputs[| 6] = nodeValue_Surface("Mask", self); + inputs[6] = nodeValue_Surface("Mask", self); - inputs[| 7] = nodeValue_Float("Mix", self, 1) + inputs[7] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 8] = nodeValue_Bool("Active", self, true); + inputs[8] = nodeValue_Bool("Active", self, true); active_index = 8; - inputs[| 9] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[9] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(6); // inputs 10, 11, - inputs[| 12] = nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ])) + inputs[12] = nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ])) .setMappable(13); - inputs[| 13] = nodeValueMap("Gradient map", self); + inputs[13] = nodeValueMap("Gradient map", self); - inputs[| 14] = nodeValueGradientRange("Gradient map range", self, inputs[| 1]); + inputs[14] = nodeValueGradientRange("Gradient map range", self, inputs[1]); - inputs[| 15] = nodeValue_Bool("Use Gradient", self, false); + inputs[15] = nodeValue_Bool("Use Gradient", self, false); - inputs[| 16] = nodeValue_Bool("Gamma Correction", self, false); + inputs[16] = nodeValue_Bool("Gamma Correction", self, false); input_display_list = [ 8, 9, ["Surfaces", true], 0, 6, 7, 10, 11, @@ -43,7 +43,7 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou ["Effects", false, 15], 12, 13, 14, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); attribute_oversample(); @@ -51,7 +51,7 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou static step = function() { #region __step_mask_modifier(); - inputs[| 12].mappableStep(); + inputs[12].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region @@ -66,11 +66,11 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou var _useGrd = _data[15]; var _gam = _data[16]; - inputs[| 5].setVisible(_isovr); + inputs[5].setVisible(_isovr); surface_set_shader(_outSurf, sh_blur_simple); shader_set_i("useGradient", _useGrd); - shader_set_gradient(_data[12], _data[13], _data[14], inputs[| 12]); + shader_set_gradient(_data[12], _data[13], _data[14], inputs[12]); shader_set_f("dimension", surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0])); shader_set_f("size", _size); diff --git a/scripts/node_blur_slope/node_blur_slope.gml b/scripts/node_blur_slope/node_blur_slope.gml index 3b0407049..66434da5f 100644 --- a/scripts/node_blur_slope/node_blur_slope.gml +++ b/scripts/node_blur_slope/node_blur_slope.gml @@ -1,43 +1,43 @@ function Node_Blur_Slope(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Slope Blur"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Strength", self, 4) + inputs[1] = nodeValue_Float("Strength", self, 4) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 32, 0.1 ] }) .setMappable(9); - inputs[| 2] = nodeValue_Surface("Slope Map", self); + inputs[2] = nodeValue_Surface("Slope Map", self); - inputs[| 3] = nodeValue_Surface("Mask", self); + inputs[3] = nodeValue_Surface("Mask", self); - inputs[| 4] = nodeValue_Float("Mix", self, 1) + inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Bool("Active", self, true); + inputs[5] = nodeValue_Bool("Active", self, true); active_index = 5; - inputs[| 6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(3); // inputs 7, 8 ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 9] = nodeValueMap("Strength map", self); + inputs[ 9] = nodeValueMap("Strength map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 10] = nodeValue_Float("Step", self, 0.1) + inputs[10] = nodeValue_Float("Step", self, 0.1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 1, 0.01] }); - inputs[| 11] = nodeValue_Bool("Gamma Correction", self, false); + inputs[11] = nodeValue_Bool("Gamma Correction", self, false); input_display_list = [ 5, 6, ["Surfaces", true], 0, 3, 4, 7, 8, ["Blur", false], 2, 1, 9, 10, 11, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); attribute_oversample(); @@ -46,14 +46,14 @@ function Node_Blur_Slope(_x, _y, _group = noone) : Node_Processor(_x, _y, _group static step = function() { #region __step_mask_modifier(); - inputs[| 1].mappableStep(); + inputs[1].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region surface_set_shader(_outSurf, sh_blur_slope); shader_set_interpolation(_data[0]); shader_set_f("dimension", surface_get_dimension(_data[0])); - shader_set_f_map("strength", _data[1], _data[ 9], inputs[| 1]); + shader_set_f_map("strength", _data[1], _data[ 9], inputs[1]); shader_set_f("stepSize", _data[10]); shader_set_surface("slopeMap", _data[2]); shader_set_f("slopeMapDim", surface_get_dimension(_data[2])); diff --git a/scripts/node_blur_zoom/node_blur_zoom.gml b/scripts/node_blur_zoom/node_blur_zoom.gml index ea5e30947..c2075a8d0 100644 --- a/scripts/node_blur_zoom/node_blur_zoom.gml +++ b/scripts/node_blur_zoom/node_blur_zoom.gml @@ -1,42 +1,42 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Zoom Blur"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Strength", self, 0.2) + inputs[1] = nodeValue_Float("Strength", self, 0.2) .setMappable(12); - inputs[| 2] = nodeValue_Vector("Center", self, [ 0.5, 0.5 ]) + inputs[2] = nodeValue_Vector("Center", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 3] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + inputs[3] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 4] = nodeValue_Enum_Scroll("Zoom mode", self, 1, [ "Start", "Middle", "End" ]); + inputs[4] = nodeValue_Enum_Scroll("Zoom mode", self, 1, [ "Start", "Middle", "End" ]); - inputs[| 5] = nodeValue_Surface("Blur mask", self); + inputs[5] = nodeValue_Surface("Blur mask", self); - inputs[| 6] = nodeValue_Surface("Mask", self); + inputs[6] = nodeValue_Surface("Mask", self); - inputs[| 7] = nodeValue_Float("Mix", self, 1) + inputs[7] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 8] = nodeValue_Bool("Active", self, true); + inputs[8] = nodeValue_Bool("Active", self, true); active_index = 8; - inputs[| 9] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[9] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(6); // inputs 10, 11 ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 12] = nodeValueMap("Strength map", self); + inputs[12] = nodeValueMap("Strength map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 13] = nodeValue_Bool("Gamma Correction", self, false); + inputs[13] = nodeValue_Bool("Gamma Correction", self, false); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 8, 9, ["Surfaces", true], 0, 6, 7, 10, 11, @@ -52,8 +52,8 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var py = _y + pos[1] * _s; var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny, 0, 64); _hov |= hv; - var hv = inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny, 0, 64); _hov |= hv; + var hv = inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } #endregion @@ -61,7 +61,7 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static step = function() { #region __step_mask_modifier(); - inputs[| 1].mappableStep(); + inputs[1].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region @@ -73,7 +73,7 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) surface_set_shader(_outSurf, sh_blur_zoom); shader_set_2("center", _cen); - shader_set_f_map("strength", _data[1], _data[12], inputs[| 1]); + shader_set_f_map("strength", _data[1], _data[12], inputs[1]); shader_set_i("blurMode", _data[4]); shader_set_i("sampleMode", _sam); shader_set_i("gamma", _data[13]); diff --git a/scripts/node_boolean/node_boolean.gml b/scripts/node_boolean/node_boolean.gml index 90e9beeb4..06cf3d542 100644 --- a/scripts/node_boolean/node_boolean.gml +++ b/scripts/node_boolean/node_boolean.gml @@ -6,16 +6,16 @@ function Node_Boolean(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c hover_state = 0; hover_state_to = 0; - wd_checkBox = new checkBox( function() { inputs[| 0].setValue(!getInputData(0)); } ); + wd_checkBox = new checkBox( function() { inputs[0].setValue(!getInputData(0)); } ); - inputs[| 0] = nodeValue_Bool("Value", self, false) + inputs[0] = nodeValue_Bool("Value", self, false) .setVisible(true, true); - inputs[| 1] = nodeValue_Bool("Hide Background", self, false); + inputs[1] = nodeValue_Bool("Hide Background", self, false); - inputs[| 2] = nodeValue_Enum_Button("Name location", self, 1, [ "Top", "Bottom" ]); + inputs[2] = nodeValue_Enum_Button("Name location", self, 1, [ "Top", "Bottom" ]); - outputs[| 0] = nodeValue_Output("Boolean", self, VALUE_TYPE.boolean, false); + outputs[0] = nodeValue_Output("Boolean", self, VALUE_TYPE.boolean, false); input_display_list = [ 0, ["Display", false], 1, 2, diff --git a/scripts/node_box_pattern/node_box_pattern.gml b/scripts/node_box_pattern/node_box_pattern.gml index 1d06a1248..4724a21d6 100644 --- a/scripts/node_box_pattern/node_box_pattern.gml +++ b/scripts/node_box_pattern/node_box_pattern.gml @@ -1,43 +1,43 @@ function Node_Box_Pattern(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Box Pattern"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Float("Scale", self, 2) + inputs[1] = nodeValue_Float("Scale", self, 2) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }) .setMappable(6); - inputs[| 2] = nodeValue_Rotation("Angle", self, 0) + inputs[2] = nodeValue_Rotation("Angle", self, 0) .setMappable(7); - inputs[| 3] = nodeValue_Vector("Position", self, [0, 0] ) + inputs[3] = nodeValue_Vector("Position", self, [0, 0] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 4] = nodeValue_Color("Color 1", self, c_white); + inputs[4] = nodeValue_Color("Color 1", self, c_white); - inputs[| 5] = nodeValue_Color("Color 2", self, c_black); + inputs[5] = nodeValue_Color("Color 2", self, c_black); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 6] = nodeValueMap("Amount map", self); + inputs[6] = nodeValueMap("Amount map", self); - inputs[| 7] = nodeValueMap("Angle map", self); + inputs[7] = nodeValueMap("Angle map", self); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 8] = nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ]); + inputs[8] = nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ]); - inputs[| 9] = nodeValue_Float("Width", self, 0.25) + inputs[9] = nodeValue_Float("Width", self, 0.25) .setDisplay(VALUE_DISPLAY.slider) .setMappable(10); - inputs[| 10] = nodeValueMap("Width map", self); + inputs[10] = nodeValueMap("Width map", self); - inputs[| 11] = nodeValue_Enum_Button("Pattern", self, 0, [ "Cross", "Xor" ]); + inputs[11] = nodeValue_Enum_Button("Pattern", self, 0, [ "Cross", "Xor" ]); - inputs[| 12] = nodeValue_Int("Iteration", self, 4) + inputs[12] = nodeValue_Int("Iteration", self, 4) - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Output", true], 0, @@ -53,19 +53,19 @@ function Node_Box_Pattern(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou var py = _y + pos[1] * _s; var _hov = false; - var hv = inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; - var hv = inputs[| 2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } static step = function() { #region var _pat = getSingleValue(11); - inputs[| 9].setVisible(_pat == 0); - inputs[| 12].setVisible(_pat == 1); + inputs[ 9].setVisible(_pat == 0); + inputs[12].setVisible(_pat == 1); - inputs[| 1].mappableStep(); - inputs[| 2].mappableStep(); + inputs[1].mappableStep(); + inputs[2].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -77,9 +77,9 @@ function Node_Box_Pattern(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou surface_set_shader(_outSurf, sh_box_pattern); shader_set_f("dimension", surface_get_width_safe(_outSurf), surface_get_height_safe(_outSurf)); shader_set_f("position", _pos[0] / _dim[0], _pos[1] / _dim[1]); - shader_set_f_map("amount", _data[1], _data[ 6], inputs[| 1]); - shader_set_f_map("angle", _data[2], _data[ 7], inputs[| 2]); - shader_set_f_map("width", _data[9], _data[10], inputs[| 9]); + shader_set_f_map("amount", _data[1], _data[ 6], inputs[1]); + shader_set_f_map("angle", _data[2], _data[ 7], inputs[2]); + shader_set_f_map("width", _data[9], _data[10], inputs[9]); shader_set_color("col1", _data[4]); shader_set_color("col2", _data[5]); shader_set_i("blend", _data[8]); diff --git a/scripts/node_brush_linear/node_brush_linear.gml b/scripts/node_brush_linear/node_brush_linear.gml index 056568662..784a4a234 100644 --- a/scripts/node_brush_linear/node_brush_linear.gml +++ b/scripts/node_brush_linear/node_brush_linear.gml @@ -1,35 +1,35 @@ function Node_Brush_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Brush"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Bool("Active", self, true); + inputs[1] = nodeValue_Bool("Active", self, true); active_index = 1; - inputs[| 2] = nodeValue_Int("Iteration", self, 10) + inputs[2] = nodeValue_Int("Iteration", self, 10) .setValidator(VV_min(1)); - inputs[| 3] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }) + inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }) - inputs[| 4] = nodeValue_Float("Length", self, 10); + inputs[4] = nodeValue_Float("Length", self, 10); - inputs[| 5] = nodeValue_Float("Attenuation", self, 0.99) + inputs[5] = nodeValue_Float("Attenuation", self, 0.99) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 6] = nodeValue_Float("Circulation", self, 0.8) + inputs[6] = nodeValue_Float("Circulation", self, 0.8) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Surface("Mask", self); + inputs[7] = nodeValue_Surface("Mask", self); - inputs[| 8] = nodeValue_Float("Mix", self, 1) + inputs[8] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 9] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[9] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(7); // inputs 10, 11 - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 1, ["Surface", false], 0, 7, 8, 9, 10, 11, diff --git a/scripts/node_bw/node_bw.gml b/scripts/node_bw/node_bw.gml index a6a94b615..f498a9808 100644 --- a/scripts/node_bw/node_bw.gml +++ b/scripts/node_bw/node_bw.gml @@ -1,33 +1,33 @@ function Node_BW(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "BW"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Brightness", self, 0) + inputs[1] = nodeValue_Float("Brightness", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01] }) .setMappable(9); - inputs[| 2] = nodeValue_Float("Contrast", self, 1) + inputs[2] = nodeValue_Float("Contrast", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 4, 0.01] }) .setMappable(10); - inputs[| 3] = nodeValue_Surface("Mask", self); + inputs[3] = nodeValue_Surface("Mask", self); - inputs[| 4] = nodeValue_Float("Mix", self, 1) + inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Bool("Active", self, true); + inputs[5] = nodeValue_Bool("Active", self, true); active_index = 5; - inputs[| 6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(3); // inputs 7, 8 //////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 9] = nodeValueMap("Brightness map", self); + inputs[9] = nodeValueMap("Brightness map", self); - inputs[| 10] = nodeValueMap("Contrast map", self); + inputs[10] = nodeValueMap("Contrast map", self); //////////////////////////////////////////////////////////////////////////////////////////////// @@ -36,22 +36,22 @@ function Node_BW(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr ["BW", false], 1, 9, 2, 10, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static step = function() { #region __step_mask_modifier(); - inputs[| 1].mappableStep(); - inputs[| 2].mappableStep(); + inputs[1].mappableStep(); + inputs[2].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region surface_set_shader(_outSurf, sh_bw); - shader_set_f_map("brightness", _data[1], _data[ 9], inputs[| 1]); - shader_set_f_map("contrast", _data[2], _data[10], inputs[| 2]); + shader_set_f_map("brightness", _data[1], _data[ 9], inputs[1]); + shader_set_f_map("contrast", _data[2], _data[10], inputs[2]); draw_surface_safe(_data[0]); surface_reset_shader(); diff --git a/scripts/node_byte_file_read/node_byte_file_read.gml b/scripts/node_byte_file_read/node_byte_file_read.gml index d4dddca85..0982a5fee 100644 --- a/scripts/node_byte_file_read/node_byte_file_read.gml +++ b/scripts/node_byte_file_read/node_byte_file_read.gml @@ -4,19 +4,19 @@ function Node_Byte_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons w = 128; - inputs[| 0] = nodeValue_Text("Path", self, "") + inputs[0] = nodeValue_Text("Path", self, "") .setDisplay(VALUE_DISPLAY.path_load, { filter: "any file|*" }) .rejectArray(); - outputs[| 0] = nodeValue_Output("Content", self, VALUE_TYPE.buffer, noone); - outputs[| 1] = nodeValue_Output("Path", self, VALUE_TYPE.path, "") + outputs[0] = nodeValue_Output("Content", self, VALUE_TYPE.buffer, noone); + outputs[1] = nodeValue_Output("Path", self, VALUE_TYPE.path, "") .setVisible(true, true); content = noone; on_drop_file = function(path) { path = path_get(path); - inputs[| 0].setValue(path); + inputs[0].setValue(path); if(updatePaths(path)) { doUpdate(); @@ -47,7 +47,7 @@ function Node_Byte_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons path_current = path; edit_time = max(edit_time, file_get_modify_s(path_current)); - outputs[| 1].setValue(path_current); + outputs[1].setValue(path_current); content = buffer_load(path_current); return true; @@ -70,7 +70,7 @@ function Node_Byte_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons if(path_current != path) updatePaths(path); - outputs[| 0].setValue(content); + outputs[0].setValue(content); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { @@ -85,6 +85,6 @@ function Node_Byte_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons if(is_array(path)) path = array_safe_get(path, 0); if(!file_exists_empty(path)) return; - inputs[| 0].setValue(path); + inputs[0].setValue(path); } } \ No newline at end of file diff --git a/scripts/node_byte_file_write/node_byte_file_write.gml b/scripts/node_byte_file_write/node_byte_file_write.gml index adc297b11..801de1be5 100644 --- a/scripts/node_byte_file_write/node_byte_file_write.gml +++ b/scripts/node_byte_file_write/node_byte_file_write.gml @@ -4,11 +4,11 @@ function Node_Byte_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) con w = 128; - inputs[| 0] = nodeValue_Text("Path", self, "") + inputs[0] = nodeValue_Text("Path", self, "") .setDisplay(VALUE_DISPLAY.path_save, { filter: "any file|*" }) .rejectArray(); - inputs[| 1] = nodeValue_Buffer("Content", self, noone) + inputs[1] = nodeValue_Buffer("Content", self, noone) .setVisible(true, true); static writeFile = function() { diff --git a/scripts/node_cache/node_cache.gml b/scripts/node_cache/node_cache.gml index d4c4ff9f8..31171b1e7 100644 --- a/scripts/node_cache/node_cache.gml +++ b/scripts/node_cache/node_cache.gml @@ -2,9 +2,9 @@ function Node_Cache(_x, _y, _group = noone) : __Node_Cache(_x, _y, _group) const name = "Cache"; use_cache = CACHE_USE.auto; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - outputs[| 0] = nodeValue_Output("Cache surface", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Cache surface", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Surfaces", true], 0, @@ -38,8 +38,8 @@ function Node_Cache(_x, _y, _group = noone) : __Node_Cache(_x, _y, _group) const static update = function() { #region if(recoverCache() || cache_loading) return; - if(!inputs[| 0].value_from) return; - if(!inputs[| 0].value_from.node.renderActive) { + if(!inputs[0].value_from) return; + if(!inputs[0].value_from.node.renderActive) { enableNodeGroup(); return; } diff --git a/scripts/node_cache_array/node_cache_array.gml b/scripts/node_cache_array/node_cache_array.gml index 2ea1a4fcc..8387adc07 100644 --- a/scripts/node_cache_array/node_cache_array.gml +++ b/scripts/node_cache_array/node_cache_array.gml @@ -2,15 +2,15 @@ function Node_Cache_Array(_x, _y, _group = noone) : __Node_Cache(_x, _y, _group) name = "Cache Array"; use_cache = CACHE_USE.manual; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Int("Start frame", self, -1, "Frame index to start caching, set to -1 to start at the first frame."); + inputs[1] = nodeValue_Int("Start frame", self, -1, "Frame index to start caching, set to -1 to start at the first frame."); - inputs[| 2] = nodeValue_Int("Stop frame", self, -1, "Frame index to stop caching (inclusive), set to -1 to stop at the last frame."); + inputs[2] = nodeValue_Int("Stop frame", self, -1, "Frame index to stop caching (inclusive), set to -1 to stop at the last frame."); - inputs[| 3] = nodeValue_Int("Step", self, 1, "Cache every N frames, set to 1 to cache every frame."); + inputs[3] = nodeValue_Int("Step", self, 1, "Cache every N frames, set to 1 to cache every frame."); - outputs[| 0] = nodeValue_Output("Cache array", self, VALUE_TYPE.surface, []); + outputs[0] = nodeValue_Output("Cache array", self, VALUE_TYPE.surface, []); input_display_list = [ ["Surfaces", true], 0, @@ -47,8 +47,8 @@ function Node_Cache_Array(_x, _y, _group = noone) : __Node_Cache(_x, _y, _group) static update = function() { #region if(cache_loading) return; - if(!inputs[| 0].value_from) return; - if(!inputs[| 0].value_from.node.renderActive) { + if(!inputs[0].value_from) return; + if(!inputs[0].value_from.node.renderActive) { if(!cacheExist(CURRENT_FRAME)) enableNodeGroup(); return; @@ -74,7 +74,7 @@ function Node_Cache_Array(_x, _y, _group = noone) : __Node_Cache(_x, _y, _group) for( var i = str; i <= lst; i += stp ) if(cacheExist(i)) array_push(ss, cached_output[i]); - outputs[| 0].setValue(ss); + outputs[0].setValue(ss); disableNodeGroup(); } #endregion diff --git a/scripts/node_cache_base/node_cache_base.gml b/scripts/node_cache_base/node_cache_base.gml index baa408f48..bd7098ed2 100644 --- a/scripts/node_cache_base/node_cache_base.gml +++ b/scripts/node_cache_base/node_cache_base.gml @@ -72,8 +72,8 @@ function __Node_Cache(_x, _y, _group = noone) : Node(_x, _y, _group) constructor static getCacheGroup = function(node) { #region if(node != self) addNode(node); - for( var i = 0, n = ds_list_size(node.inputs); i < n; i++ ) { - var _from = node.inputs[| i].value_from; + for( var i = 0, n = array_length(node.inputs); i < n; i++ ) { + var _from = node.inputs[i].value_from; if(_from == noone) continue; if(_from.node == self) continue; diff --git a/scripts/node_camera/node_camera.gml b/scripts/node_camera/node_camera.gml index 7500d9880..f89f76a4f 100644 --- a/scripts/node_camera/node_camera.gml +++ b/scripts/node_camera/node_camera.gml @@ -3,20 +3,20 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co preview_alpha = 0.5; onSurfaceSize = function() { return surface_get_dimension(getInputData(0)); }; - inputs[| 0] = nodeValue_Area("Focus area", self, DEF_AREA, { onSurfaceSize, useShape : false }); + inputs[0] = nodeValue_Area("Focus area", self, DEF_AREA, { onSurfaceSize, useShape : false }); - inputs[| 1] = nodeValue_Float("Zoom", self, 1) + inputs[1] = nodeValue_Float("Zoom", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0.01, 4, 0.01 ] }); - inputs[| 2] = nodeValue_Bool("Depth of Field", self, false); + inputs[2] = nodeValue_Bool("Depth of Field", self, false); - inputs[| 3] = nodeValue_Float("Focal distance", self, 0); + inputs[3] = nodeValue_Float("Focal distance", self, 0); - inputs[| 4] = nodeValue_Float("Defocus", self, 1); + inputs[4] = nodeValue_Float("Defocus", self, 1); - inputs[| 5] = nodeValue_Float("Focal range", self, 0); + inputs[5] = nodeValue_Float("Focal range", self, 0); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Camera", false], 0, 1, @@ -29,30 +29,30 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co temp_surface = [ noone, noone ]; static createNewInput = function() { - var index = ds_list_size(inputs); + var index = array_length(inputs); var _s = floor((index - input_fix_len) / data_length); if(_s) array_push(input_display_list, new Inspector_Spacer(20, true)); - inputs[| index + 0] = nodeValue_Surface($"Element {_s}", self, noone); + inputs[index + 0] = nodeValue_Surface($"Element {_s}", self, noone); - inputs[| index + 1] = nodeValue_Enum_Button($"Positioning {_s}", self, false, [ "Space", "Camera" ]); + inputs[index + 1] = nodeValue_Enum_Button($"Positioning {_s}", self, false, [ "Space", "Camera" ]); - inputs[| index + 2] = nodeValue_Vector($"Position {_s}", self, [ 0, 0 ] ) + inputs[index + 2] = nodeValue_Vector($"Position {_s}", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| index + 3] = nodeValue_Enum_Scroll($"Oversample {_s}", self, 0, [ new scrollItem("Empty ", s_node_camera_repeat, 0), + inputs[index + 3] = nodeValue_Enum_Scroll($"Oversample {_s}", self, 0, [ new scrollItem("Empty ", s_node_camera_repeat, 0), new scrollItem("Repeat ", s_node_camera_repeat, 1), new scrollItem("Repeat X", s_node_camera_repeat, 2), new scrollItem("Repeat Y", s_node_camera_repeat, 3), ]); - inputs[| index + 4] = nodeValue_Vector($"Parallax {_s}", self, [ 0, 0 ]); + inputs[index + 4] = nodeValue_Vector($"Parallax {_s}", self, [ 0, 0 ]); - inputs[| index + 5] = nodeValue($"Depth {_s}", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); + inputs[index + 5] = nodeValue($"Depth {_s}", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); for( var i = 0; i < data_length; i++ ) array_push(input_display_list, index + i); - return inputs[| index + 0]; + return inputs[index + 0]; } setDynamicInput(6, true, VALUE_TYPE.surface); static getPreviewValues = function() { return getInputData(input_fix_len); } @@ -60,7 +60,7 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, _params) { PROCESSOR_OVERLAY_CHECK - var _out = outputs[| 0].getValue(); + var _out = outputs[0].getValue(); if(is_array(_out)) _out = _out[preview_index]; var _area = current_data[0]; @@ -71,7 +71,7 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co if(PANEL_PREVIEW.getNodePreview() == self) draw_surface_ext_safe(_out, _cam_x, _cam_y, _s * _zoom, _s * _zoom); - inputs[| 0].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[0].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); draw_set_color(COLORS._main_accent); var x0 = _cam_x; diff --git a/scripts/node_canvas/node_canvas.gml b/scripts/node_canvas/node_canvas.gml index 0b20373b6..771763dc4 100644 --- a/scripts/node_canvas/node_canvas.gml +++ b/scripts/node_canvas/node_canvas.gml @@ -3,49 +3,49 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor color = COLORS.node_blend_canvas; setAlwaysTimeline(new timelineItemNode_Canvas(self)); - inputs[| 0] = nodeValue_Dimension(self); + inputs[ 0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Color("Color", self, c_white ); - inputs[| 2] = nodeValue_Int("Brush size", self, 1 ) + inputs[ 1] = nodeValue_Color("Color", self, c_white ); + inputs[ 2] = nodeValue_Int("Brush size", self, 1 ) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] }); - inputs[| 3] = nodeValue_Float("Fill threshold", self, 0.) + inputs[ 3] = nodeValue_Float("Fill threshold", self, 0.) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 4] = nodeValue_Enum_Scroll("Fill type", self, 0, ["4 connect", "8 connect", "Entire canvas"]); + inputs[ 4] = nodeValue_Enum_Scroll("Fill type", self, 0, ["4 connect", "8 connect", "Entire canvas"]); - inputs[| 5] = nodeValue_Bool("Draw preview overlay", self, true); + inputs[ 5] = nodeValue_Bool("Draw preview overlay", self, true); - inputs[| 6] = nodeValue_Surface("Brush", self) + inputs[ 6] = nodeValue_Surface("Brush", self) .setVisible(true, false); - inputs[| 7] = nodeValue_Int("Surface amount", self, 1); + inputs[ 7] = nodeValue_Int("Surface amount", self, 1); - inputs[| 8] = nodeValue_Surface("Background", self); + inputs[ 8] = nodeValue_Surface("Background", self); - inputs[| 9] = nodeValue_Float("Background alpha", self, 1.) + inputs[ 9] = nodeValue_Float("Background alpha", self, 1.) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 10] = nodeValue_Bool("Render background", self, true); + inputs[10] = nodeValue_Bool("Render background", self, true); - inputs[| 11] = nodeValue_Float("Alpha", self, 1 ) + inputs[11] = nodeValue_Float("Alpha", self, 1 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 12] = nodeValue_Bool("Frames animation", self, true ); + inputs[12] = nodeValue_Bool("Frames animation", self, true ); - inputs[| 13] = nodeValue_Float("Animation speed", self, 1 ); + inputs[13] = nodeValue_Float("Animation speed", self, 1 ); - inputs[| 14] = nodeValue_Bool("Use background dimension", self, true ); + inputs[14] = nodeValue_Bool("Use background dimension", self, true ); - inputs[| 15] = nodeValue_Range("Brush distance", self, [ 1, 1 ] , { linked : true }); + inputs[15] = nodeValue_Range("Brush distance", self, [ 1, 1 ] , { linked : true }); - inputs[| 16] = nodeValue_Bool("Rotate brush by direction", self, false ); + inputs[16] = nodeValue_Bool("Rotate brush by direction", self, false ); - inputs[| 17] = nodeValue_Rotation_Random("Random direction", self, [ 0, 0, 0, 0, 0 ] ); + inputs[17] = nodeValue_Rotation_Random("Random direction", self, [ 0, 0, 0, 0, 0 ] ); - inputs[| 18] = nodeValue_Enum_Scroll("Animation Type", self, 0, [ "Loop", "Hold", "Clear" ]); + inputs[18] = nodeValue_Enum_Scroll("Animation Type", self, 0, [ "Loop", "Hold", "Clear" ]); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); frame_renderer_x = 0; frame_renderer_x_to = 0; @@ -1002,8 +1002,8 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var brush = getInputData(6); var anim = getInputData(12); - inputs[| 15].setVisible(is_surface(brush)); - inputs[| 16].setVisible(is_surface(brush)); + inputs[15].setVisible(is_surface(brush)); + inputs[16].setVisible(is_surface(brush)); update_on_frame = fram > 1 && anim; @@ -1055,7 +1055,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor draw_surface_safe(_canvas_surface); surface_reset_shader(); - outputs[| 0].setValue(output_surface[0]); + outputs[0].setValue(output_surface[0]); } else { for( var i = 0; i < _frames; i++ ) { var _canvas_surface = getCanvasSurface(i); @@ -1080,10 +1080,10 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor case 2 : _fr_index = _fr_index < _frames? _fr_index : noone; break; } - outputs[| 0].setValue(_fr_index == noone? temp_surface[1] : output_surface[_fr_index]); + outputs[0].setValue(_fr_index == noone? temp_surface[1] : output_surface[_fr_index]); } else - outputs[| 0].setValue(output_surface); + outputs[0].setValue(output_surface); } if(live_edit) { @@ -1167,7 +1167,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor sprite_delete(_spr); attributes.dimension = [_sw, _sh]; - inputs[| 0].setValue([_sw, _sh]); + inputs[0].setValue([_sw, _sh]); setCanvasSurface(_s); surface_store_buffer(); diff --git a/scripts/node_canvas_group/node_canvas_group.gml b/scripts/node_canvas_group/node_canvas_group.gml index ece861e6f..e2f7cedd8 100644 --- a/scripts/node_canvas_group/node_canvas_group.gml +++ b/scripts/node_canvas_group/node_canvas_group.gml @@ -8,9 +8,9 @@ function Node_Canvas_Group(_x, _y, _group) : Node_Collection(_x, _y, _group) con modifiable = false; - inputs[| 0] = nodeValue_Dimension(self); + inputs[ 0] = nodeValue_Dimension(self); - custom_input_index = ds_list_size(inputs); + custom_input_index = array_length(inputs); attributes.show_slope_check = true; array_push(attributeEditors, "Display"); @@ -122,7 +122,7 @@ function Node_Canvas_Group(_x, _y, _group) : Node_Collection(_x, _y, _group) con for(var i = 0; i < _amo; i++) { var index = composite.input_fix_len + i * composite.data_length; - var _can = composite.inputs[| index].value_from; + var _can = composite.inputs[index].value_from; if(_can == noone) continue; var _nod = _can.node; @@ -130,12 +130,12 @@ function Node_Canvas_Group(_x, _y, _group) : Node_Collection(_x, _y, _group) con var _modStack = [ _nod ]; while(!is_instanceof(_nod, Node_Canvas)) { - if(_nod.inputs[| 0].type != VALUE_TYPE.surface) + if(_nod.inputs[0].type != VALUE_TYPE.surface) break; - if(_nod.inputs[| 0].value_from == noone) + if(_nod.inputs[0].value_from == noone) break; - _nod = _nod.inputs[| 0].value_from.node; + _nod = _nod.inputs[0].value_from.node; array_push(_modStack, _nod); } @@ -188,9 +188,9 @@ function Node_Canvas_Group(_x, _y, _group) : Node_Collection(_x, _y, _group) con _b += 32; var _canvas = nodeBuild("Node_Canvas", _l, _b); _canvas.setDisplayName($"Layer {array_length(canvases)}"); - _canvas.inputs[| 12].setValue(true); + _canvas.inputs[12].setValue(true); - composite.dummy_input.setFrom(_canvas.outputs[| 0]); + composite.dummy_input.setFrom(_canvas.outputs[0]); add(_canvas); return _canvas; @@ -200,7 +200,7 @@ function Node_Canvas_Group(_x, _y, _group) : Node_Collection(_x, _y, _group) con if(composite == noone) return; var idx = composite.input_fix_len + index * composite.data_length; - var inp = composite.inputs[| idx]; + var inp = composite.inputs[idx]; var nod = inp.value_from? inp.value_from.node : noone; if(!nod) return; @@ -217,7 +217,7 @@ function Node_Canvas_Group(_x, _y, _group) : Node_Collection(_x, _y, _group) con for(var i = 0; i < imageAmo; i++) { var _ind = composite.input_fix_len + i * composite.data_length; - var _inp = composite.inputs[| _ind]; + var _inp = composite.inputs[_ind]; var _junc = _inp.value_from? _inp.value_from.node : noone; if(_junc == noone) continue; @@ -233,17 +233,17 @@ function Node_Canvas_Group(_x, _y, _group) : Node_Collection(_x, _y, _group) con if(NODE_NEW_MANUAL) { var _canvas = nodeBuild("Node_Canvas", x - 160, y); - _canvas.inputs[| 12].setValue(true); + _canvas.inputs[12].setValue(true); _canvas.setDisplayName($"Background"); var _compose = nodeBuild("Node_Composite", x, y); - _compose.dummy_input.setFrom(_canvas.outputs[| 0]); + _compose.dummy_input.setFrom(_canvas.outputs[0]); add(_canvas); add(_compose); var _output = nodeBuild("Node_Group_Output", x + 160, y, self); - _output.inputs[| 0].setFrom(_compose.outputs[| 0]); + _output.inputs[0].setFrom(_compose.outputs[0]); } static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { @@ -269,7 +269,7 @@ function Node_Canvas_Group(_x, _y, _group) : Node_Collection(_x, _y, _group) con if(_ind == noone) _ind = composite.input_fix_len; - var _inp = composite.inputs[| _ind]; + var _inp = composite.inputs[_ind]; var _can = _inp? _inp.value_from : noone; if(_can && struct_has(layers, _can.node.node_id)) canvas_sel = layers[$ _can.node.node_id].canvas; @@ -296,7 +296,7 @@ function Node_Canvas_Group(_x, _y, _group) : Node_Collection(_x, _y, _group) con var _dim = getInputData(0); for (var i = 0, n = array_length(canvases); i < n; i++) - canvases[i].inputs[| 0].setValue(_dim); + canvases[i].inputs[0].setValue(_dim); } static dropPath = function(path) { diff --git a/scripts/node_caustic/node_caustic.gml b/scripts/node_caustic/node_caustic.gml index ee83a98ca..89d37f7ca 100644 --- a/scripts/node_caustic/node_caustic.gml +++ b/scripts/node_caustic/node_caustic.gml @@ -2,21 +2,21 @@ function Node_Caustic(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, _g name = "Caustic"; shader = sh_water_caustic; - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 4, 4 ]); + inputs[2] = nodeValue_Vector("Scale", self, [ 4, 4 ]); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[| 3] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); addShaderProp(SHADER_UNIFORM.float, "seed"); - inputs[| 4] = nodeValue_Float("Progress", self, 0) + inputs[4] = nodeValue_Float("Progress", self, 0) addShaderProp(SHADER_UNIFORM.float, "progress"); - inputs[| 5] = nodeValue_Float("Detail", self, 1.24) + inputs[5] = nodeValue_Float("Detail", self, 1.24) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); addShaderProp(SHADER_UNIFORM.float, "detail"); diff --git a/scripts/node_cellular/node_cellular.gml b/scripts/node_cellular/node_cellular.gml index 57bd85c10..10626f0ea 100644 --- a/scripts/node_cellular/node_cellular.gml +++ b/scripts/node_cellular/node_cellular.gml @@ -1,43 +1,43 @@ function Node_Cellular(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Cellular Noise"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Vector("Position", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2]) + inputs[1] = nodeValue_Vector("Position", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 2] = nodeValue_Float("Scale", self, 4) + inputs[2] = nodeValue_Float("Scale", self, 4) .setMappable(11); - inputs[| 3] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 4] = nodeValue_Enum_Scroll("Type", self, 0, [ "Point", "Edge", "Cell", "Crystal" ]); + inputs[4] = nodeValue_Enum_Scroll("Type", self, 0, [ "Point", "Edge", "Cell", "Crystal" ]); - inputs[| 5] = nodeValue_Float("Contrast", self, 1) + inputs[5] = nodeValue_Float("Contrast", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 4, 0.01] }); - inputs[| 6] = nodeValue_Enum_Button("Pattern", self, 0, [ "Tiled", "Uniform", "Radial" ]); + inputs[6] = nodeValue_Enum_Button("Pattern", self, 0, [ "Tiled", "Uniform", "Radial" ]); - inputs[| 7] = nodeValue_Float("Middle", self, 0.5) + inputs[7] = nodeValue_Float("Middle", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [0., 1., 0.01] }); - inputs[| 8] = nodeValue_Float("Radial scale", self, 2) + inputs[8] = nodeValue_Float("Radial scale", self, 2) .setDisplay(VALUE_DISPLAY.slider, { range: [1., 10., 0.01] }); - inputs[| 9] = nodeValue_Float("Radial shatter", self, 0) + inputs[9] = nodeValue_Float("Radial shatter", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-10., 10., 0.01] }) .setVisible(false); - inputs[| 10] = nodeValue_Bool("Colored", self, false) + inputs[10] = nodeValue_Bool("Colored", self, false) ////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValueMap("Scale map", self); + inputs[11] = nodeValueMap("Scale map", self); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 12] = nodeValue_Rotation("Rotation", self, 0); + inputs[12] = nodeValue_Rotation("Rotation", self, 0); input_display_list = [ ["Output", false], 0, @@ -46,19 +46,19 @@ function Node_Cellular(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ["Rendering", false], 5, 7, 10, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } static step = function() { #region - inputs[| 2].mappableStep(); + inputs[2].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -70,9 +70,9 @@ function Node_Cellular(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var _pat = _data[6]; var _mid = _data[7]; - inputs[| 8].setVisible(_pat == 2); - inputs[| 9].setVisible(_pat == 2); - inputs[| 10].setVisible(_type == 2); + inputs[ 8].setVisible(_pat == 2); + inputs[ 9].setVisible(_pat == 2); + inputs[10].setVisible(_type == 2); var _rad = _data[ 8]; var _sht = _data[ 9]; @@ -92,7 +92,7 @@ function Node_Cellular(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) shader_set_f("dimension", _dim); shader_set_f("seed", _tim); shader_set_2("position", _pos); - shader_set_f_map("scale", _data[2], _data[11], inputs[| 2]); + shader_set_f_map("scale", _data[2], _data[11], inputs[2]); shader_set_f("contrast", _con); shader_set_f("middle", _mid); shader_set_f("radiusScale", _rad); diff --git a/scripts/node_checker/node_checker.gml b/scripts/node_checker/node_checker.gml index 489e2d531..4ba35400d 100644 --- a/scripts/node_checker/node_checker.gml +++ b/scripts/node_checker/node_checker.gml @@ -1,33 +1,33 @@ function Node_Checker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Checker"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Float("Amount", self, 2) + inputs[1] = nodeValue_Float("Amount", self, 2) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }) .setMappable(6); - inputs[| 2] = nodeValue_Rotation("Angle", self, 0) + inputs[2] = nodeValue_Rotation("Angle", self, 0) .setMappable(7); - inputs[| 3] = nodeValue_Vector("Position", self, [0, 0] ) + inputs[3] = nodeValue_Vector("Position", self, [0, 0] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 4] = nodeValue_Color("Color 1", self, c_white); + inputs[4] = nodeValue_Color("Color 1", self, c_white); - inputs[| 5] = nodeValue_Color("Color 2", self, c_black); + inputs[5] = nodeValue_Color("Color 2", self, c_black); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 6] = nodeValueMap("Amount map", self); + inputs[6] = nodeValueMap("Amount map", self); - inputs[| 7] = nodeValueMap("Angle map", self); + inputs[7] = nodeValueMap("Angle map", self); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 8] = nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ]); + inputs[8] = nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ]); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Output", true], 0, @@ -43,15 +43,15 @@ function Node_Checker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c var py = _y + pos[1] * _s; var _hov = false; - var hv = inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; - var hv = inputs[| 2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } static step = function() { #region - inputs[| 1].mappableStep(); - inputs[| 2].mappableStep(); + inputs[1].mappableStep(); + inputs[2].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -63,8 +63,8 @@ function Node_Checker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c surface_set_shader(_outSurf, sh_checkerboard); shader_set_f("dimension", surface_get_width_safe(_outSurf), surface_get_height_safe(_outSurf)); shader_set_f("position", _pos[0] / _dim[0], _pos[1] / _dim[1]); - shader_set_f_map("amount", _data[1], _data[6], inputs[| 1]); - shader_set_f_map("angle", _data[2], _data[7], inputs[| 2]); + shader_set_f_map("amount", _data[1], _data[6], inputs[1]); + shader_set_f_map("angle", _data[2], _data[7], inputs[2]); shader_set_color("col1", _data[4]); shader_set_color("col2", _data[5]); shader_set_i("blend", _data[8]); diff --git a/scripts/node_chromatic_aberration/node_chromatic_aberration.gml b/scripts/node_chromatic_aberration/node_chromatic_aberration.gml index fb54c3f00..c4d4d033b 100644 --- a/scripts/node_chromatic_aberration/node_chromatic_aberration.gml +++ b/scripts/node_chromatic_aberration/node_chromatic_aberration.gml @@ -1,25 +1,25 @@ function Node_Chromatic_Aberration(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Chromatic Aberration"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Vector("Center", self, [ 0.5, 0.5 ]) + inputs[1] = nodeValue_Vector("Center", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[| 2] = nodeValue_Float("Strength", self, 1) + inputs[2] = nodeValue_Float("Strength", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [-16, 16, 0.01] }) .setMappable(4); - inputs[| 3] = nodeValue_Bool("Active", self, true); + inputs[3] = nodeValue_Bool("Active", self, true); active_index = 3; ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 4] = nodeValueMap("Strength map", self); + inputs[4] = nodeValueMap("Strength map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 3, ["Surface", false], 0, @@ -35,13 +35,13 @@ function Node_Chromatic_Aberration(_x, _y, _group = noone) : Node_Processor(_x, var py = _y + pos[1] * _s; var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } #endregion static step = function() { #region - inputs[| 2].mappableStep(); + inputs[2].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region @@ -50,7 +50,7 @@ function Node_Chromatic_Aberration(_x, _y, _group = noone) : Node_Processor(_x, shader_set_interpolation(_data[0]); shader_set_f("dimension", surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0])); shader_set_2("center", _data[1]); - shader_set_f_map("strength", _data[2], _data[4], inputs[| 2]); + shader_set_f_map("strength", _data[2], _data[4], inputs[2]); draw_surface_safe(_data[0]); surface_reset_shader(); diff --git a/scripts/node_collection/node_collection.gml b/scripts/node_collection/node_collection.gml index 8c7fe6c54..fcf1444fc 100644 --- a/scripts/node_collection/node_collection.gml +++ b/scripts/node_collection/node_collection.gml @@ -82,14 +82,14 @@ function groupNodes(nodeArray, _group = noone, record = true, check_connect = tr var _n = new Node_Group_Input(_x, _y, _group); var _ti = array_find(GROUP_IO_TYPE_MAP, _frm.type); - if(_ti >= 0) _n.inputs[| 2].setValue(_ti); + if(_ti >= 0) _n.inputs[2].setValue(_ti); _n.onValueUpdate(0); _n.inParent.setFrom(_frm); for( var j = 0; j < m; j++ ) { var _to = _tos[j]; - _to.setFrom(_n.outputs[| 0]); + _to.setFrom(_n.outputs[0]); } } @@ -105,7 +105,7 @@ function groupNodes(nodeArray, _group = noone, record = true, check_connect = tr m = array_length(_tos); var _n = new Node_Group_Output(_x, _y, _group); - _n.inputs[| 0].setFrom(_frm); + _n.inputs[0].setFrom(_frm); for( var j = 0; j < m; j++ ) { var _to = _tos[j]; @@ -214,7 +214,7 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc var _tind = array_find(GROUP_IO_TYPE_MAP, _type); input.attributes.inherit_type = false; - if(_tind != -1) input.inputs[| 2].setValue(_tind); + if(_tind != -1) input.inputs[2].setValue(_tind); input.inParent.setFrom(juncFrom); @@ -335,8 +335,8 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc static getOutputNodes = function() { var _nodes = []; - for( var i = custom_output_index; i < ds_list_size(outputs); i++ ) { - var _junc = outputs[| i]; + for( var i = custom_output_index; i < array_length(outputs); i++ ) { + var _junc = outputs[i]; for( var j = 0; j < array_length(_junc.value_to); j++ ) { var _to = _junc.value_to[j]; @@ -353,7 +353,7 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc } static sortIO = function() { - var _ilen = ds_list_size(inputs); + var _ilen = array_length(inputs); var _iarr = attributes.input_display_list; for( var i = custom_input_index; i < _ilen; i++ ) @@ -368,7 +368,7 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc /////////////////////////////////////////////////////////////////// - var _olen = ds_list_size(outputs); + var _olen = array_length(outputs); var _oarr = attributes.output_display_list; for( var i = custom_output_index; i < _olen; i++ ) @@ -403,8 +403,8 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc var _nodes = []; if(isRenderActive()) { var allReady = true; - for(var i = custom_input_index; i < ds_list_size(inputs); i++) { - var _in = inputs[| i].from; + for(var i = custom_input_index; i < array_length(inputs); i++) { + var _in = inputs[i].from; if(!_in.isRenderActive()) continue; if(!_in.isRenderable()) { @@ -426,8 +426,8 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc LOG_BLOCK_START(); var nextNodes = []; - for( var i = 0; i < ds_list_size(outputs); i++ ) { - var _ot = outputs[| i]; + for( var i = 0; i < array_length(outputs); i++ ) { + var _ot = outputs[i]; if(!_ot.forward) continue; if(_ot.type == VALUE_TYPE.node) continue; @@ -459,8 +459,8 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc } if(result) - for( var i = custom_output_index, n = ds_list_size(outputs); i < n; i++ ) { - var _o = outputs[| i]; + for( var i = custom_output_index, n = array_length(outputs); i < n; i++ ) { + var _o = outputs[i]; if(_o.from.rendered) continue; LOG_IF(global.FLAG.render == 1, $"Set fail because {_o.from.internalName} is not rendered."); @@ -479,8 +479,8 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc if(update_on_frame) return true; if(!rendered) return true; - for( var i = custom_input_index, n = ds_list_size(inputs); i < n; i++ ) - if(inputs[| i].isActiveDynamic(frame) || !inputs[| i].from.rendered) return true; + for( var i = custom_input_index, n = array_length(inputs); i < n; i++ ) + if(inputs[i].isActiveDynamic(frame) || !inputs[i].from.rendered) return true; return false; } @@ -501,8 +501,8 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { if(!draw_input_overlay) return; - for(var i = custom_input_index; i < ds_list_size(inputs); i++) { - var _in = inputs[| i]; + for(var i = custom_input_index; i < array_length(inputs); i++) { + var _in = inputs[i]; var _show = _in.from.getInputData(6); if(!_show) continue; @@ -571,18 +571,18 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc for( var i = 0, n = array_length(nodes); i < n; i++ ) { if(!nodes[i].active) continue; if(is_instanceof(nodes[i], Node_Group_Thumbnail)) - return nodes[i].inputs[| 0].getValue(); + return nodes[i].inputs[0].getValue(); } - var _oj = outputs[| preview_channel]; + var _oj = outputs[preview_channel]; if(is_undefined(_oj)) return noone; - var _fr = _oj.from.inputs[| 0]; + var _fr = _oj.from.inputs[0]; return _fr.value_from == noone? noone : _fr.value_from.node.getGraphPreviewSurface(); } function getPreviewingNode() { - var _oj = outputs[| preview_channel]; + var _oj = outputs[preview_channel]; if(is_undefined(_oj)) return self; switch(_oj.type) { @@ -592,7 +592,7 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc case VALUE_TYPE.d3Scene : case VALUE_TYPE.d3object : case VALUE_TYPE.sdf : - var _fr = _oj.from.inputs[| 0]; + var _fr = _oj.from.inputs[0]; return _fr.value_from == noone? self : _fr.value_from.node; } @@ -616,15 +616,15 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc var _attr = variable_clone(attributes); _attr.custom_input_list = []; - for( var i = custom_input_index, n = ds_list_size(inputs); i < n; i++ ) { - if(struct_has(inputs[| i], "from")) - array_push(_attr.custom_input_list, inputs[| i].from.node_id); + for( var i = custom_input_index, n = array_length(inputs); i < n; i++ ) { + if(struct_has(inputs[i], "from")) + array_push(_attr.custom_input_list, inputs[i].from.node_id); } _attr.custom_output_list = []; - for( var i = custom_output_index, n = ds_list_size(outputs); i < n; i++ ) { - if(struct_has(outputs[| i], "from")) - array_push(_attr.custom_output_list , outputs[| i].from.node_id); + for( var i = custom_output_index, n = array_length(outputs); i < n; i++ ) { + if(struct_has(outputs[i], "from")) + array_push(_attr.custom_output_list , outputs[i].from.node_id); } return _attr; @@ -636,25 +636,25 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc if(LOADING_VERSION < 11690) { var pr = ds_priority_create(); - for( var i = ds_list_size(inputs) - 1; i >= custom_input_index; i-- ) { - if(!struct_has(inputs[| i].attributes, "input_priority")) continue; + for( var i = array_length(inputs) - 1; i >= custom_input_index; i-- ) { + if(!struct_has(inputs[i].attributes, "input_priority")) continue; - var _pri = inputs[| i].attributes.input_priority; - ds_priority_add(pr, inputs[| i], _pri); - ds_list_delete(inputs, i); + var _pri = inputs[i].attributes.input_priority; + ds_priority_add(pr, inputs[i], _pri); + array_delete(inputs, i, 1); } - repeat(ds_priority_size(pr)) ds_list_add(inputs, ds_priority_delete_min(pr)); + repeat(ds_priority_size(pr)) array_push(inputs, ds_priority_delete_min(pr)); - for( var i = ds_list_size(outputs) - 1; i >= custom_output_index; i-- ) { - if(!struct_has(outputs[| i].attributes, "output_priority")) continue; + for( var i = array_length(outputs) - 1; i >= custom_output_index; i-- ) { + if(!struct_has(outputs[i].attributes, "output_priority")) continue; - var _pri = outputs[| i].attributes.output_priority; - ds_priority_add(pr, outputs[| i], _pri); - ds_list_delete(outputs, i); + var _pri = outputs[i].attributes.output_priority; + ds_priority_add(pr, outputs[i], _pri); + array_delete(outputs, i, 1); } - repeat(ds_priority_size(pr)) ds_list_add(outputs, ds_priority_delete_min(pr)); + repeat(ds_priority_size(pr)) array_push(outputs, ds_priority_delete_min(pr)); ds_priority_destroy(pr); return; @@ -669,13 +669,13 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc for( var i = 0, n = array_length(_ilist); i < n; i++ ) _ilist[i] = ds_map_try_get(APPEND_MAP, _ilist[i], _ilist[i]); - for( var i = ds_list_size(inputs) - 1; i >= custom_input_index; i-- ) { - if(!struct_has(inputs[| i], "from")) continue; + for( var i = array_length(inputs) - 1; i >= custom_input_index; i-- ) { + if(!struct_has(inputs[i], "from")) continue; - var _frNode = inputs[| i].from.node_id; + var _frNode = inputs[i].from.node_id; if(array_exists(_ilist, _frNode)) { - _inarr[$ _frNode] = inputs[| i]; - ds_list_delete(inputs, i); + _inarr[$ _frNode] = inputs[i]; + array_delete(inputs, i, 1); } } @@ -683,8 +683,8 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc if(!struct_has(_inarr, _ilist[i])) continue; var _inJunc = _inarr[$ _ilist[i]]; - _inJunc.index = ds_list_size(inputs); - ds_list_add(inputs, _inJunc); + _inJunc.index = array_length(inputs); + array_push(inputs, _inJunc); } } @@ -697,13 +697,13 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc for( var i = 0, n = array_length(_ilist); i < n; i++ ) _ilist[i] = ds_map_try_get(APPEND_MAP, _ilist[i], _ilist[i]); - for( var i = ds_list_size(outputs) - 1; i >= custom_output_index; i-- ) { - if(!struct_has(outputs[| i], "from")) continue; + for( var i = array_length(outputs) - 1; i >= custom_output_index; i-- ) { + if(!struct_has(outputs[i], "from")) continue; - var _frNode = outputs[| i].from.node_id; + var _frNode = outputs[i].from.node_id; if(array_exists(_ilist, _frNode)) { - _inarr[$ _frNode] = outputs[| i]; - ds_list_delete(outputs, i); + _inarr[$ _frNode] = outputs[i]; + array_delete(outputs, i, 1); } } @@ -711,8 +711,8 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc if(!struct_has(_inarr, _ilist[i])) continue; var _outJunc = _inarr[$ _ilist[i]]; - _outJunc.index = ds_list_size(outputs); - ds_list_add(outputs, _outJunc); + _outJunc.index = array_length(outputs); + array_push(outputs, _outJunc); } } diff --git a/scripts/node_collection_inline/node_collection_inline.gml b/scripts/node_collection_inline/node_collection_inline.gml index 32bfb252a..d81756ec6 100644 --- a/scripts/node_collection_inline/node_collection_inline.gml +++ b/scripts/node_collection_inline/node_collection_inline.gml @@ -21,11 +21,9 @@ function Node_Collection_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) c is_root = true; - static topoSortable = function() { #region - return false; - } #endregion + static topoSortable = function() { return false; } - static removeNode = function(node) { #region + static removeNode = function(node) { array_remove(attributes.members, node.node_id); array_remove(nodes, node); @@ -33,11 +31,11 @@ function Node_Collection_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) c if(node.inline_context == self) node.inline_context = noone; onRemoveNode(node); - } #endregion + } static onRemoveNode = function(node) {} - static addNode = function(node) { #region + static addNode = function(node) { if(node.inline_context != noone && node.inline_context != self) node.inline_context.removeNode(node); node.inline_context = self; @@ -46,7 +44,7 @@ function Node_Collection_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) c array_push_unique(nodes, node); onAddNode(node); - } #endregion + } static addPoint = function(_x, _y) { add_point = true; @@ -58,7 +56,7 @@ function Node_Collection_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) c static ccw = function(a, b, c) { return (b[0] - a[0]) * (c[1] - a[1]) - (c[0] - a[0]) * (b[1] - a[1]); } - static getNodeBorder = function(_ind, _vertex, _node) { #region + static getNodeBorder = function(_ind, _vertex, _node) { var _rad = 6; var _stp = 30; @@ -73,9 +71,9 @@ function Node_Collection_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) c for( var i = 270; i <= 360; i += _stp ) _vertex[_ind++] = [ _nx1 + lengthdir_x(_rad, i), _ny1 + lengthdir_y(_rad, i) ]; return _ind; - } #endregion + } - static refreshMember = function() { #region + static refreshMember = function() { nodes = []; for( var i = 0, n = array_length(attributes.members); i < n; i++ ) { @@ -86,9 +84,9 @@ function Node_Collection_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) c addNode(PROJECT.nodeMap[? attributes.members[i]]); } - } #endregion + } - static refreshGroupBG = function() { #region + static refreshGroupBG = function() { var _hash = ""; var _ind = 0; @@ -124,61 +122,59 @@ function Node_Collection_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) c if(add_point) array_push(_vtrx, [ point_x, point_y ]); - #region create convex shape - __temp_minP = _vtrx[0]; - __temp_minI = 0; - - for( var i = 0, n = array_length(_vtrx); i < n; i++ ) { - var _v = _vtrx[i]; - var _vx = _v[0]; - var _vy = _v[1]; - - if(_vy > __temp_minP[1] || (_vy == __temp_minP[1] && _vx < __temp_minP[0])) { - __temp_minP = _v; - __temp_minI = i; - } - } - - _vtrx = array_map( _vtrx, function(a, i) { return [ a[0], a[1], i == __temp_minI? -999 : point_direction(__temp_minP[0], __temp_minP[1], a[0], a[1]) + 360 ] }); - array_sort(_vtrx, function(a0, a1) { return a0[2] == a1[2]? sign(a0[0] - a1[0]) : sign(a0[2] - a1[2]); }); + __temp_minP = _vtrx[0]; + __temp_minI = 0; - var _linS = 0; - for( var i = 1, n = array_length(_vtrx); i < n; i++ ) { - if(_vtrx[i][1] != _vtrx[0][1]) break; - _linS = i; - } + for( var i = 0, n = array_length(_vtrx); i < n; i++ ) { + var _v = _vtrx[i]; + var _vx = _v[0]; + var _vy = _v[1]; - array_delete(_vtrx, 1, _linS - 1); + if(_vy > __temp_minP[1] || (_vy == __temp_minP[1] && _vx < __temp_minP[0])) { + __temp_minP = _v; + __temp_minI = i; + } + } - group_vertex = [ _vtrx[0], _vtrx[1] ]; - - for( var i = 2, n = array_length(_vtrx); i < n; i++ ) { - var _v = _vtrx[i]; - - while( array_length(group_vertex) >= 2 && ccw( group_vertex[array_length(group_vertex) - 2], group_vertex[array_length(group_vertex) - 1], _v ) >= 0 ) - array_pop(group_vertex); - array_push(group_vertex, _v); - } - - for( var i = array_length(group_vertex) - 1; i >= 0; i-- ) { - var n = array_length(group_vertex); - if(n < 4) break; - - var v0 = group_vertex[(i - 1 + n) % n]; - var v1 = group_vertex[i]; - var v2 = group_vertex[(i + 1) % n]; - - var a0 = point_direction(v1[0], v1[1], v0[0], v0[1]); - var a1 = point_direction(v1[0], v1[1], v2[0], v2[1]); - var d = angle_difference(a0, a1); - - if(min(abs(d), abs(d - 180)) <= 2) - array_delete(group_vertex, i, 1); - } - #endregion - } #endregion + _vtrx = array_map( _vtrx, function(a, i) { return [ a[0], a[1], i == __temp_minI? -999 : point_direction(__temp_minP[0], __temp_minP[1], a[0], a[1]) + 360 ] }); + array_sort(_vtrx, function(a0, a1) { return a0[2] == a1[2]? sign(a0[0] - a1[0]) : sign(a0[2] - a1[2]); }); - static groupCheck = function(_x, _y, _s, _mx, _my) { #region + var _linS = 0; + for( var i = 1, n = array_length(_vtrx); i < n; i++ ) { + if(_vtrx[i][1] != _vtrx[0][1]) break; + _linS = i; + } + + array_delete(_vtrx, 1, _linS - 1); + + group_vertex = [ _vtrx[0], _vtrx[1] ]; + + for( var i = 2, n = array_length(_vtrx); i < n; i++ ) { + var _v = _vtrx[i]; + + while( array_length(group_vertex) >= 2 && ccw( group_vertex[array_length(group_vertex) - 2], group_vertex[array_length(group_vertex) - 1], _v ) >= 0 ) + array_pop(group_vertex); + array_push(group_vertex, _v); + } + + for( var i = array_length(group_vertex) - 1; i >= 0; i-- ) { + var n = array_length(group_vertex); + if(n < 4) break; + + var v0 = group_vertex[(i - 1 + n) % n]; + var v1 = group_vertex[i]; + var v2 = group_vertex[(i + 1) % n]; + + var a0 = point_direction(v1[0], v1[1], v0[0], v0[1]); + var a1 = point_direction(v1[0], v1[1], v2[0], v2[1]); + var d = angle_difference(a0, a1); + + if(min(abs(d), abs(d - 180)) <= 2) + array_delete(group_vertex, i, 1); + } + } + + static groupCheck = function(_x, _y, _s, _mx, _my) { if(array_length(group_vertex) < 3) return; if(!modifiable) return; @@ -220,11 +216,11 @@ function Node_Collection_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) c group_dragging = false; } - } #endregion + } static pointIn = function(_x, _y, _mx, _my, _s) { return false; } - static resetRender = function(_clearCache = false) { #region + static resetRender = function(_clearCache = false) { LOG_LINE_IF(global.FLAG.render == 1, $"Reset Render for {INAME}"); setRenderStatus(false); @@ -232,9 +228,9 @@ function Node_Collection_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) c for( var i = 0; i < array_length(nodes); i++ ) nodes[i].resetRender(_clearCache); - } #endregion + } - static drawNodeBG = function(_x, _y, _mx, _my, _s) { #region + static drawNodeBG = function(_x, _y, _mx, _my, _s) { refreshGroupBG(); if(array_length(group_vertex) < 3) return false; @@ -293,13 +289,13 @@ function Node_Collection_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) c add_point = false; return _hov; - } #endregion + } static drawNode = function(_x, _y, _mx, _my, _s, display_parameter = noone) {} static drawBadge = function(_x, _y, _s) {} - static postDeserialize = function() { #region + static postDeserialize = function() { refreshMember(); - } #endregion + } } \ No newline at end of file diff --git a/scripts/node_color/node_color.gml b/scripts/node_color/node_color.gml index 8b9974b97..88a27a297 100644 --- a/scripts/node_color/node_color.gml +++ b/scripts/node_color/node_color.gml @@ -2,9 +2,9 @@ function Node_Color(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con name = "Color"; setDimension(96, 48); - inputs[| 0] = nodeValue_Color("Color", self, c_white); + inputs[0] = nodeValue_Color("Color", self, c_white); - outputs[| 0] = nodeValue_Output("Color", self, VALUE_TYPE.color, c_white); + outputs[0] = nodeValue_Output("Color", self, VALUE_TYPE.color, c_white); static processData = function(_output, _data, _output_index, _array_index = 0) { return _data[0]; diff --git a/scripts/node_color_adjust/node_color_adjust.gml b/scripts/node_color_adjust/node_color_adjust.gml index 479cd04f3..2ccd161b5 100644 --- a/scripts/node_color_adjust/node_color_adjust.gml +++ b/scripts/node_color_adjust/node_color_adjust.gml @@ -2,92 +2,92 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro name = "Color Adjust"; batch_output = false; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Brightness", self, 0) + inputs[1] = nodeValue_Float("Brightness", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }) .setMappable(18); - inputs[| 2] = nodeValue_Float("Contrast", self, 0.5) + inputs[2] = nodeValue_Float("Contrast", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) .setMappable(19); - inputs[| 3] = nodeValue_Float("Hue", self, 0) + inputs[3] = nodeValue_Float("Hue", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }) .setMappable(20); - inputs[| 4] = nodeValue_Float("Saturation", self, 0) + inputs[4] = nodeValue_Float("Saturation", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }) .setMappable(21); - inputs[| 5] = nodeValue_Float("Value", self, 0) + inputs[5] = nodeValue_Float("Value", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }) .setMappable(22); - inputs[| 6] = nodeValue_Color("Blend", self, cola(c_white)); + inputs[6] = nodeValue_Color("Blend", self, cola(c_white)); - inputs[| 7] = nodeValue_Float("Blend amount", self, 0) + inputs[7] = nodeValue_Float("Blend amount", self, 0) .setDisplay(VALUE_DISPLAY.slider) .setMappable(23); - inputs[| 8] = nodeValue_Surface("Mask", self); + inputs[8] = nodeValue_Surface("Mask", self); - inputs[| 9] = nodeValue_Float("Alpha", self, 1) + inputs[9] = nodeValue_Float("Alpha", self, 1) .setDisplay(VALUE_DISPLAY.slider) .setMappable(24); - inputs[| 10] = nodeValue_Float("Exposure", self, 1) + inputs[10] = nodeValue_Float("Exposure", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }) .setMappable(25); - inputs[| 11] = nodeValue_Bool("Active", self, true); + inputs[11] = nodeValue_Bool("Active", self, true); active_index = 11; - inputs[| 12] = nodeValue_Enum_Button("Input Type", self, 0, [ "Surface", "Color" ]); + inputs[12] = nodeValue_Enum_Button("Input Type", self, 0, [ "Surface", "Color" ]); - inputs[| 13] = nodeValue_Palette("Color", self, array_clone(DEF_PALETTE)) + inputs[13] = nodeValue_Palette("Color", self, array_clone(DEF_PALETTE)) .setVisible(true, true); - inputs[| 14] = nodeValue_Enum_Scroll("Blend mode", self, 0, BLEND_TYPES); + inputs[14] = nodeValue_Enum_Scroll("Blend mode", self, 0, BLEND_TYPES); - inputs[| 15] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[15] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); - inputs[| 16] = nodeValue_Bool("Invert mask", self, false); + inputs[16] = nodeValue_Bool("Invert mask", self, false); - inputs[| 17] = nodeValue_Float("Mask feather", self, 1) + inputs[17] = nodeValue_Float("Mask feather", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); //////////////////////////////////////////////////////////////////////////////////////// - inputs[| 18] = nodeValue_Surface("Brightness map", self) + inputs[18] = nodeValue_Surface("Brightness map", self) .setVisible(false, false); - inputs[| 19] = nodeValue_Surface("Contrast map", self) + inputs[19] = nodeValue_Surface("Contrast map", self) .setVisible(false, false); - inputs[| 20] = nodeValue_Surface("Hue map", self) + inputs[20] = nodeValue_Surface("Hue map", self) .setVisible(false, false); - inputs[| 21] = nodeValue_Surface("Saturation map", self) + inputs[21] = nodeValue_Surface("Saturation map", self) .setVisible(false, false); - inputs[| 22] = nodeValue_Surface("Value map", self) + inputs[22] = nodeValue_Surface("Value map", self) .setVisible(false, false); - inputs[| 23] = nodeValue_Surface("Blend map", self) + inputs[23] = nodeValue_Surface("Blend map", self) .setVisible(false, false); - inputs[| 24] = nodeValue_Surface("Alpha map", self) + inputs[24] = nodeValue_Surface("Alpha map", self) .setVisible(false, false); - inputs[| 25] = nodeValue_Surface("Exposure map", self) + inputs[25] = nodeValue_Surface("Exposure map", self) .setVisible(false, false); //////////////////////////////////////////////////////////////////////////////////////// - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Color out", self, VALUE_TYPE.color, []) + outputs[1] = nodeValue_Output("Color out", self, VALUE_TYPE.color, []) .setDisplay(VALUE_DISPLAY.palette); input_display_list = [11, 12, 15, 9, 24, @@ -104,27 +104,27 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro static step = function() { #region var type = getInputData(12); - inputs[| 0].setVisible(type == 0, type == 0); - inputs[| 8].setVisible(type == 0, type == 0); - inputs[| 9].setVisible(type == 0); - inputs[| 13].setVisible(type == 1, type == 1); - inputs[| 14].setVisible(type == 0); + inputs[ 0].setVisible(type == 0, type == 0); + inputs[ 8].setVisible(type == 0, type == 0); + inputs[ 9].setVisible(type == 0); + inputs[13].setVisible(type == 1, type == 1); + inputs[14].setVisible(type == 0); - outputs[| 0].setVisible(type == 0, type == 0); - outputs[| 1].setVisible(type == 1, type == 1); + outputs[0].setVisible(type == 0, type == 0); + outputs[1].setVisible(type == 1, type == 1); var _msk = is_surface(getSingleValue(8)); - inputs[| 16].setVisible(_msk); - inputs[| 17].setVisible(_msk); + inputs[16].setVisible(_msk); + inputs[17].setVisible(_msk); - inputs[| 1].mappableStep(); - inputs[| 2].mappableStep(); - inputs[| 3].mappableStep(); - inputs[| 4].mappableStep(); - inputs[| 5].mappableStep(); - inputs[| 7].mappableStep(); - inputs[| 9].mappableStep(); - inputs[| 10].mappableStep(); + inputs[ 1].mappableStep(); + inputs[ 2].mappableStep(); + inputs[ 3].mappableStep(); + inputs[ 4].mappableStep(); + inputs[ 5].mappableStep(); + inputs[ 7].mappableStep(); + inputs[ 9].mappableStep(); + inputs[10].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region @@ -232,18 +232,18 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro shader_set_surface("param0", temp_surface[0]); shader_set_surface("param1", temp_surface[1]); - shader_set_f_map_s("brightness", _bri, _data[18], inputs[| 1]); - shader_set_f_map_s("exposure", _exp, _data[25], inputs[| 10]); - shader_set_f_map_s("contrast", _con, _data[19], inputs[| 2]); - shader_set_f_map_s("hue", _hue, _data[20], inputs[| 3]); - shader_set_f_map_s("sat", _sat, _data[21], inputs[| 4]); - shader_set_f_map_s("val", _val, _data[22], inputs[| 5]); + shader_set_f_map_s("brightness", _bri, _data[18], inputs[ 1]); + shader_set_f_map_s("exposure", _exp, _data[25], inputs[10]); + shader_set_f_map_s("contrast", _con, _data[19], inputs[ 2]); + shader_set_f_map_s("hue", _hue, _data[20], inputs[ 3]); + shader_set_f_map_s("sat", _sat, _data[21], inputs[ 4]); + shader_set_f_map_s("val", _val, _data[22], inputs[ 5]); shader_set_color("blend", _bl); - shader_set_f_map_s("blendAmount", _bla * _color_get_alpha(_bl), _data[23], inputs[| 7]); + shader_set_f_map_s("blendAmount", _bla * _color_get_alpha(_bl), _data[23], inputs[7]); shader_set_i("blendMode", _blm); - shader_set_f_map_s("alpha", _alp, _data[24], inputs[| 9]); + shader_set_f_map_s("alpha", _alp, _data[24], inputs[9]); shader_set_i("use_mask", is_surface(_m)); shader_set_surface("mask", _m); @@ -266,7 +266,7 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro var bbox = drawGetBbox(xx, yy, _s); if(bbox.h < 1) return; - var pal = outputs[| 1].getValue(); + var pal = outputs[1].getValue(); if(array_empty(pal)) return; if(!is_array(pal[0])) pal = [ pal ]; diff --git a/scripts/node_color_data/node_color_data.gml b/scripts/node_color_data/node_color_data.gml index 332380ce4..373a8cbd6 100644 --- a/scripts/node_color_data/node_color_data.gml +++ b/scripts/node_color_data/node_color_data.gml @@ -3,21 +3,21 @@ function Node_Color_Data(_x, _y, _group = noone) : Node_Processor(_x, _y, _group batch_output = false; setDimension(96, 48); - inputs[| 0] = nodeValue_Color("Color", self, c_white) + inputs[0] = nodeValue_Color("Color", self, c_white) .setVisible(true, true); - inputs[| 1] = nodeValue_Bool("Normalize", self, true); + inputs[1] = nodeValue_Bool("Normalize", self, true); - outputs[| 0] = nodeValue_Output("Red", self, VALUE_TYPE.float, 0); - outputs[| 1] = nodeValue_Output("Green", self, VALUE_TYPE.float, 0); - outputs[| 2] = nodeValue_Output("Blue", self, VALUE_TYPE.float, 0); + outputs[0] = nodeValue_Output("Red", self, VALUE_TYPE.float, 0); + outputs[1] = nodeValue_Output("Green", self, VALUE_TYPE.float, 0); + outputs[2] = nodeValue_Output("Blue", self, VALUE_TYPE.float, 0); - outputs[| 3] = nodeValue_Output("Hue", self, VALUE_TYPE.float, 0).setVisible(false); - outputs[| 4] = nodeValue_Output("Saturation", self, VALUE_TYPE.float, 0).setVisible(false); - outputs[| 5] = nodeValue_Output("Value", self, VALUE_TYPE.float, 0).setVisible(false); + outputs[3] = nodeValue_Output("Hue", self, VALUE_TYPE.float, 0).setVisible(false); + outputs[4] = nodeValue_Output("Saturation", self, VALUE_TYPE.float, 0).setVisible(false); + outputs[5] = nodeValue_Output("Value", self, VALUE_TYPE.float, 0).setVisible(false); - outputs[| 6] = nodeValue_Output("Brightness", self, VALUE_TYPE.float, 0).setVisible(false); - outputs[| 7] = nodeValue_Output("Alpha", self, VALUE_TYPE.float, 0).setVisible(false); + outputs[6] = nodeValue_Output("Brightness", self, VALUE_TYPE.float, 0).setVisible(false); + outputs[7] = nodeValue_Output("Alpha", self, VALUE_TYPE.float, 0).setVisible(false); static processData = function(_output, _data, _output_index, _array_index = 0) { var _c = _data[0]; diff --git a/scripts/node_color_hsv/node_color_hsv.gml b/scripts/node_color_hsv/node_color_hsv.gml index 1cc061b2f..496ab3207 100644 --- a/scripts/node_color_hsv/node_color_hsv.gml +++ b/scripts/node_color_hsv/node_color_hsv.gml @@ -2,24 +2,24 @@ function Node_Color_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) name = "HSV Color"; setDimension(96, 48); - inputs[| 0] = nodeValue_Float("Hue", self, 1) + inputs[0] = nodeValue_Float("Hue", self, 1) .setDisplay(VALUE_DISPLAY.slider) .setVisible(true, true); - inputs[| 1] = nodeValue_Float("Saturation", self, 1) + inputs[1] = nodeValue_Float("Saturation", self, 1) .setDisplay(VALUE_DISPLAY.slider) .setVisible(true, true); - inputs[| 2] = nodeValue_Float("Value", self, 1) + inputs[2] = nodeValue_Float("Value", self, 1) .setDisplay(VALUE_DISPLAY.slider) .setVisible(true, true); - inputs[| 3] = nodeValue_Bool("Normalized", self, 1); + inputs[3] = nodeValue_Bool("Normalized", self, 1); - inputs[| 4] = nodeValue_Float("Alpha", self, 1) + inputs[4] = nodeValue_Float("Alpha", self, 1) .setDisplay(VALUE_DISPLAY.slider); - outputs[| 0] = nodeValue_Output("Color", self, VALUE_TYPE.color, c_white); + outputs[0] = nodeValue_Output("Color", self, VALUE_TYPE.color, c_white); input_display_list = [ 3, 0, 1, 2, 4 ]; @@ -39,29 +39,29 @@ function Node_Color_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var _nor = getInputData(3); if(_nor) { - inputs[| 0].setType(VALUE_TYPE.float); - inputs[| 0].setDisplay(VALUE_DISPLAY.slider); + inputs[0].setType(VALUE_TYPE.float); + inputs[0].setDisplay(VALUE_DISPLAY.slider); - inputs[| 1].setType(VALUE_TYPE.float); - inputs[| 1].setDisplay(VALUE_DISPLAY.slider); + inputs[1].setType(VALUE_TYPE.float); + inputs[1].setDisplay(VALUE_DISPLAY.slider); - inputs[| 2].setType(VALUE_TYPE.float); - inputs[| 2].setDisplay(VALUE_DISPLAY.slider); + inputs[2].setType(VALUE_TYPE.float); + inputs[2].setDisplay(VALUE_DISPLAY.slider); - inputs[| 4].setType(VALUE_TYPE.float); - inputs[| 4].setDisplay(VALUE_DISPLAY.slider); + inputs[4].setType(VALUE_TYPE.float); + inputs[4].setDisplay(VALUE_DISPLAY.slider); } else { - inputs[| 0].setType(VALUE_TYPE.integer); - inputs[| 0].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); + inputs[0].setType(VALUE_TYPE.integer); + inputs[0].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); - inputs[| 1].setType(VALUE_TYPE.integer); - inputs[| 1].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); + inputs[1].setType(VALUE_TYPE.integer); + inputs[1].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); - inputs[| 2].setType(VALUE_TYPE.integer); - inputs[| 2].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); + inputs[2].setType(VALUE_TYPE.integer); + inputs[2].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); - inputs[| 4].setType(VALUE_TYPE.integer); - inputs[| 4].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); + inputs[4].setType(VALUE_TYPE.integer); + inputs[4].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); } } } #endregion @@ -70,7 +70,7 @@ function Node_Color_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var bbox = drawGetBbox(xx, yy, _s); if(bbox.h < 1) return; - var col = outputs[| 0].getValue(); + var col = outputs[0].getValue(); if(is_array(col)) { drawPalette(col, bbox.x0, bbox.y0, bbox.w, bbox.h); diff --git a/scripts/node_color_mix/node_color_mix.gml b/scripts/node_color_mix/node_color_mix.gml index 5a2fa26be..2895b231b 100644 --- a/scripts/node_color_mix/node_color_mix.gml +++ b/scripts/node_color_mix/node_color_mix.gml @@ -2,16 +2,16 @@ function Node_Color_Mix(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) name = "Mix Color"; setDimension(96, 48);; - inputs[| 0] = nodeValue_Color("Color from", self, c_white); + inputs[0] = nodeValue_Color("Color from", self, c_white); - inputs[| 1] = nodeValue_Color("Color to", self, c_white); + inputs[1] = nodeValue_Color("Color to", self, c_white); - inputs[| 2] = nodeValue_Float("Mix", self, 0.5) + inputs[2] = nodeValue_Float("Mix", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Enum_Button("Color space", self, 0, [ "RGB", "HSV", "OKLAB" ]); + inputs[3] = nodeValue_Enum_Button("Color space", self, 0, [ "RGB", "HSV", "OKLAB" ]); - outputs[| 0] = nodeValue_Output("Color", self, VALUE_TYPE.color, c_white); + outputs[0] = nodeValue_Output("Color", self, VALUE_TYPE.color, c_white); input_display_list = [ 3, 0, 1, 2 ]; @@ -31,7 +31,7 @@ function Node_Color_Mix(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var bbox = drawGetBbox(xx, yy, _s); if(bbox.h < 1) return; - var col = outputs[| 0].getValue(); + var col = outputs[0].getValue(); if(is_array(col)) { drawPalette(col, bbox.x0, bbox.y0, bbox.w, bbox.h); diff --git a/scripts/node_color_remove/node_color_remove.gml b/scripts/node_color_remove/node_color_remove.gml index b1e25146b..38333cbaa 100644 --- a/scripts/node_color_remove/node_color_remove.gml +++ b/scripts/node_color_remove/node_color_remove.gml @@ -1,31 +1,31 @@ function Node_Color_Remove(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Remove Color"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Palette("Colors", self, array_clone(DEF_PALETTE)); + inputs[1] = nodeValue_Palette("Colors", self, array_clone(DEF_PALETTE)); - inputs[| 2] = nodeValue_Float("Threshold", self, 0.1) + inputs[2] = nodeValue_Float("Threshold", self, 0.1) .setDisplay(VALUE_DISPLAY.slider) .setMappable(10); - inputs[| 3] = nodeValue_Surface("Mask", self); + inputs[3] = nodeValue_Surface("Mask", self); - inputs[| 4] = nodeValue_Float("Mix", self, 1) + inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Bool("Active", self, true); + inputs[5] = nodeValue_Bool("Active", self, true); active_index = 5; - inputs[| 6] = nodeValue_Bool("Invert", self, false, "Keep the selected colors and remove the rest."); + inputs[6] = nodeValue_Bool("Invert", self, false, "Keep the selected colors and remove the rest."); - inputs[| 7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(3); // inputs 8, 9, ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 10] = nodeValueMap("Threshold map", self); + inputs[10] = nodeValueMap("Threshold map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -34,14 +34,14 @@ function Node_Color_Remove(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro ["Remove", false], 1, 2, 10, 6, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static step = function() { #region __step_mask_modifier(); - inputs[| 2].mappableStep(); + inputs[2].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region @@ -54,7 +54,7 @@ function Node_Color_Remove(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro surface_set_shader(_outSurf, sh_color_remove); shader_set_f("colorFrom", _colors); shader_set_i("colorFrom_amo", array_length(frm)); - shader_set_f_map("treshold", _data[2], _data[10], inputs[| 2]); + shader_set_f_map("treshold", _data[2], _data[10], inputs[2]); shader_set_i("invert", _data[6]); draw_surface_safe(_data[0]); diff --git a/scripts/node_color_replace/node_color_replace.gml b/scripts/node_color_replace/node_color_replace.gml index d63850825..2579936c0 100644 --- a/scripts/node_color_replace/node_color_replace.gml +++ b/scripts/node_color_replace/node_color_replace.gml @@ -1,35 +1,35 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Replace Palette"; - inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Palette("Palette from", self, array_clone(DEF_PALETTE), "Color to be replaced."); + inputs[0] = nodeValue_Surface("Surface in", self); + inputs[1] = nodeValue_Palette("Palette from", self, array_clone(DEF_PALETTE), "Color to be replaced."); - inputs[| 2] = nodeValue_Palette("Palette to", self, array_clone(DEF_PALETTE), "Palette to be replaced to."); + inputs[2] = nodeValue_Palette("Palette to", self, array_clone(DEF_PALETTE), "Palette to be replaced to."); - inputs[| 3] = nodeValue_Float("Threshold", self, 0.1) + inputs[3] = nodeValue_Float("Threshold", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 4] = nodeValue_Bool("Set others to black", self, false, "Set pixel that doesn't match any color in 'palette from' to black."); + inputs[4] = nodeValue_Bool("Set others to black", self, false, "Set pixel that doesn't match any color in 'palette from' to black."); - inputs[| 5] = nodeValue_Bool("Multiply alpha", self, true); + inputs[5] = nodeValue_Bool("Multiply alpha", self, true); - inputs[| 6] = nodeValue_Bool("Hard replace", self, true, "Completely override pixel with new color instead of blending between it."); + inputs[6] = nodeValue_Bool("Hard replace", self, true, "Completely override pixel with new color instead of blending between it."); - inputs[| 7] = nodeValue_Surface("Mask", self); + inputs[7] = nodeValue_Surface("Mask", self); - inputs[| 8] = nodeValue_Float("Mix", self, 1) + inputs[8] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 9] = nodeValue_Bool("Active", self, true); + inputs[9] = nodeValue_Bool("Active", self, true); active_index = 9; - inputs[| 10] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[10] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(7); // inputs 11, 12 - inputs[| 13] = nodeValue_Enum_Scroll("Mode", self, 0, [ "Closet", "Random" ]); + inputs[13] = nodeValue_Enum_Scroll("Mode", self, 0, [ "Closet", "Random" ]); - inputs[| 14] = nodeValueSeed(self, VALUE_TYPE.float); + inputs[14] = nodeValueSeed(self, VALUE_TYPE.float); input_display_list = [ 9, 10, 14, ["Surfaces", true], 0, 7, 8, 11, 12, @@ -38,7 +38,7 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr ["Render", false], 4, 6 ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); diff --git a/scripts/node_color_rgb/node_color_rgb.gml b/scripts/node_color_rgb/node_color_rgb.gml index f8026df8e..300c967ca 100644 --- a/scripts/node_color_rgb/node_color_rgb.gml +++ b/scripts/node_color_rgb/node_color_rgb.gml @@ -3,24 +3,24 @@ function Node_Color_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) setDimension(96, 48); - inputs[| 0] = nodeValue_Float("Red", self, 1) + inputs[0] = nodeValue_Float("Red", self, 1) .setDisplay(VALUE_DISPLAY.slider) .setVisible(true, true); - inputs[| 1] = nodeValue_Float("Green", self, 1) + inputs[1] = nodeValue_Float("Green", self, 1) .setDisplay(VALUE_DISPLAY.slider) .setVisible(true, true); - inputs[| 2] = nodeValue_Float("Blue", self, 1) + inputs[2] = nodeValue_Float("Blue", self, 1) .setDisplay(VALUE_DISPLAY.slider) .setVisible(true, true); - inputs[| 3] = nodeValue_Bool("Normalized", self, 1); + inputs[3] = nodeValue_Bool("Normalized", self, 1); - inputs[| 4] = nodeValue_Float("Alpha", self, 1) + inputs[4] = nodeValue_Float("Alpha", self, 1) .setDisplay(VALUE_DISPLAY.slider); - outputs[| 0] = nodeValue_Output("Color", self, VALUE_TYPE.color, c_white); + outputs[0] = nodeValue_Output("Color", self, VALUE_TYPE.color, c_white); input_display_list = [ 3, 0, 1, 2, 4 ]; @@ -29,29 +29,29 @@ function Node_Color_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var _nor = getInputData(3); if(_nor) { - inputs[| 0].setType(VALUE_TYPE.float); - inputs[| 0].setDisplay(VALUE_DISPLAY.slider); + inputs[0].setType(VALUE_TYPE.float); + inputs[0].setDisplay(VALUE_DISPLAY.slider); - inputs[| 1].setType(VALUE_TYPE.float); - inputs[| 1].setDisplay(VALUE_DISPLAY.slider); + inputs[1].setType(VALUE_TYPE.float); + inputs[1].setDisplay(VALUE_DISPLAY.slider); - inputs[| 2].setType(VALUE_TYPE.float); - inputs[| 2].setDisplay(VALUE_DISPLAY.slider); + inputs[2].setType(VALUE_TYPE.float); + inputs[2].setDisplay(VALUE_DISPLAY.slider); - inputs[| 4].setType(VALUE_TYPE.float); - inputs[| 4].setDisplay(VALUE_DISPLAY.slider); + inputs[4].setType(VALUE_TYPE.float); + inputs[4].setDisplay(VALUE_DISPLAY.slider); } else { - inputs[| 0].setType(VALUE_TYPE.integer); - inputs[| 0].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); + inputs[0].setType(VALUE_TYPE.integer); + inputs[0].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); - inputs[| 1].setType(VALUE_TYPE.integer); - inputs[| 1].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); + inputs[1].setType(VALUE_TYPE.integer); + inputs[1].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); - inputs[| 2].setType(VALUE_TYPE.integer); - inputs[| 2].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); + inputs[2].setType(VALUE_TYPE.integer); + inputs[2].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); - inputs[| 4].setType(VALUE_TYPE.integer); - inputs[| 4].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); + inputs[4].setType(VALUE_TYPE.integer); + inputs[4].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); } } } #endregion @@ -74,7 +74,7 @@ function Node_Color_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var bbox = drawGetBbox(xx, yy, _s); if(bbox.h < 1) return; - var col = outputs[| 0].getValue(); + var col = outputs[0].getValue(); if(is_array(col)) { drawPalette(col, bbox.x0, bbox.y0, bbox.w, bbox.h); diff --git a/scripts/node_colorize/node_colorize.gml b/scripts/node_colorize/node_colorize.gml index a6d6b9a3f..9641ae396 100644 --- a/scripts/node_colorize/node_colorize.gml +++ b/scripts/node_colorize/node_colorize.gml @@ -1,36 +1,36 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Colorize"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ])) + inputs[1] = nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ])) .setMappable(11); - inputs[| 2] = nodeValue_Float("Gradient shift", self, 0) + inputs[2] = nodeValue_Float("Gradient shift", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, .01 ] }) .setMappable(10); - inputs[| 3] = nodeValue_Surface("Mask", self); + inputs[3] = nodeValue_Surface("Mask", self); - inputs[| 4] = nodeValue_Float("Mix", self, 1) + inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Bool("Active", self, true); + inputs[5] = nodeValue_Bool("Active", self, true); active_index = 5; - inputs[| 6] = nodeValue_Bool("Multiply alpha", self, true); + inputs[6] = nodeValue_Bool("Multiply alpha", self, true); - inputs[| 7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(3); // inputs 8, 9, ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 10] = nodeValueMap("Gradient shift map", self); + inputs[10] = nodeValueMap("Gradient shift map", self); - inputs[| 11] = nodeValueMap("Gradient map", self); + inputs[11] = nodeValueMap("Gradient map", self); - inputs[| 12] = nodeValueGradientRange("Gradient map range", self, inputs[| 1]); + inputs[12] = nodeValueGradientRange("Gradient map range", self, inputs[1]); ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -39,13 +39,13 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ["Colorize", false], 1, 11, 2, 10, 6, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 12].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, surface_get_dimension(getSingleValue(0))); _hov |= hv; + var hv = inputs[12].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, surface_get_dimension(getSingleValue(0))); _hov |= hv; return _hov; } @@ -53,15 +53,15 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static step = function() { __step_mask_modifier(); - inputs[| 1].mappableStep(); - inputs[| 2].mappableStep(); + inputs[1].mappableStep(); + inputs[2].mappableStep(); } static processData = function(_outSurf, _data, _output_index, _array_index) { surface_set_shader(_outSurf, sh_colorize); - shader_set_gradient(_data[1], _data[11], _data[12], inputs[| 1]); + shader_set_gradient(_data[1], _data[11], _data[12], inputs[1]); - shader_set_f_map("gradient_shift", _data[2], _data[10], inputs[| 2]); + shader_set_f_map("gradient_shift", _data[2], _data[10], inputs[2]); shader_set_i("multiply_alpha", _data[6]); draw_surface_safe(_data[0]); diff --git a/scripts/node_colors_replace/node_colors_replace.gml b/scripts/node_colors_replace/node_colors_replace.gml index 00b312527..3acf7111a 100644 --- a/scripts/node_colors_replace/node_colors_replace.gml +++ b/scripts/node_colors_replace/node_colors_replace.gml @@ -1,21 +1,21 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Replace Colors"; - inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Palette("Palette from", self, []); + inputs[0] = nodeValue_Surface("Surface in", self); + inputs[1] = nodeValue_Palette("Palette from", self, []); - inputs[| 2] = nodeValue_Palette("Palette to", self, []) + inputs[2] = nodeValue_Palette("Palette to", self, []) .setVisible(false, false); - inputs[| 3] = nodeValue_Float("Threshold", self, 0.1) + inputs[3] = nodeValue_Float("Threshold", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 4] = nodeValue_Surface("Mask", self); + inputs[4] = nodeValue_Surface("Mask", self); - inputs[| 5] = nodeValue_Float("Mix", self, 1) + inputs[5] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 6] = nodeValue_Bool("Active", self, true); + inputs[6] = nodeValue_Bool("Active", self, true); active_index = 6; __init_mask_modifier(4); // inputs 7, 8, @@ -31,7 +31,7 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g for (var i = palette_select[0]; i <= palette_select[1]; i++) _to[i] = colr; - inputs[| 2].setValue(_to); // Not necessary due to array reference + inputs[2].setValue(_to); // Not necessary due to array reference } sort_menu = [ @@ -56,7 +56,7 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g refreshPalette(); bx += bs + ui(4); - var jun = inputs[| 2]; + var jun = inputs[2]; var index = jun.value_from == noone? jun.is_anim : 2; if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover,, THEME.animate_clock, index, index == 2? COLORS._main_accent : COLORS._main_icon) == 2) jun.setAnim(!jun.is_anim); @@ -185,7 +185,7 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g //["Comparison", false], 3, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); @@ -223,15 +223,15 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g ds_map_destroy(_map); - inputs[| 1].setValue(palFrom); - inputs[| 2].setValue(palTo); + inputs[1].setValue(palFrom); + inputs[2].setValue(palTo); } static refreshPalette = function() { var _surf = getInputData(0); - inputs[| 1].setValue([]); - inputs[| 2].setValue([]); + inputs[1].setValue([]); + inputs[2].setValue([]); if(!is_array(_surf)) _surf = [ _surf ]; @@ -265,8 +265,8 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g var palette = ds_map_keys_to_array(_pall); ds_map_destroy(_pall); - inputs[| 1].setValue(palette); - inputs[| 2].setValue(palette); + inputs[1].setValue(palette); + inputs[2].setValue(palette); } static onValueFromUpdate = function(index) { diff --git a/scripts/node_combine_hsv/node_combine_hsv.gml b/scripts/node_combine_hsv/node_combine_hsv.gml index f36424f5b..73f65c46c 100644 --- a/scripts/node_combine_hsv/node_combine_hsv.gml +++ b/scripts/node_combine_hsv/node_combine_hsv.gml @@ -1,17 +1,17 @@ function Node_Combine_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "HSV Combine"; - inputs[| 0] = nodeValue_Surface("Hue", self); - inputs[| 1] = nodeValue_Surface("Saturation", self); - inputs[| 2] = nodeValue_Surface("Value", self); - inputs[| 3] = nodeValue_Surface("Alpha", self); + inputs[0] = nodeValue_Surface("Hue", self); + inputs[1] = nodeValue_Surface("Saturation", self); + inputs[2] = nodeValue_Surface("Value", self); + inputs[3] = nodeValue_Surface("Alpha", self); - inputs[| 4] = nodeValue_Bool("Array Input", self, false); + inputs[4] = nodeValue_Bool("Array Input", self, false); - inputs[| 5] = nodeValue_Surface("HSV Array", self, []) + inputs[5] = nodeValue_Surface("HSV Array", self, []) .setArrayDepth(1); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Surfaces", true], 4, 0, 1, 2, 3, 5, @@ -22,12 +22,12 @@ function Node_Combine_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou static step = function() { #region var _arr = getInputData(4); - inputs[| 0].setVisible(!_arr, !_arr); - inputs[| 1].setVisible(!_arr, !_arr); - inputs[| 2].setVisible(!_arr, !_arr); - inputs[| 3].setVisible(!_arr, !_arr); + inputs[0].setVisible(!_arr, !_arr); + inputs[1].setVisible(!_arr, !_arr); + inputs[2].setVisible(!_arr, !_arr); + inputs[3].setVisible(!_arr, !_arr); - inputs[| 5].setVisible(_arr, _arr); + inputs[5].setVisible(_arr, _arr); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region diff --git a/scripts/node_combine_rgb/node_combine_rgb.gml b/scripts/node_combine_rgb/node_combine_rgb.gml index 4cf5e34d3..8803c1af8 100644 --- a/scripts/node_combine_rgb/node_combine_rgb.gml +++ b/scripts/node_combine_rgb/node_combine_rgb.gml @@ -2,29 +2,29 @@ function Node_Combine_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou name = "RGB Combine"; dimension_index = -1; - inputs[| 0] = nodeValue_Surface("Red", self); - inputs[| 1] = nodeValue_Surface("Green", self); - inputs[| 2] = nodeValue_Surface("Blue", self); - inputs[| 3] = nodeValue_Surface("Alpha", self); + inputs[0] = nodeValue_Surface("Red", self); + inputs[1] = nodeValue_Surface("Green", self); + inputs[2] = nodeValue_Surface("Blue", self); + inputs[3] = nodeValue_Surface("Alpha", self); - inputs[| 4] = nodeValue_Enum_Scroll("Sampling type", self, 0, ["Channel value", "Greyscale"]); + inputs[4] = nodeValue_Enum_Scroll("Sampling type", self, 0, ["Channel value", "Greyscale"]); - inputs[| 5] = nodeValue_Float("Base value", self, 0, "Set value to the unconnected color channels.") + inputs[5] = nodeValue_Float("Base value", self, 0, "Set value to the unconnected color channels.") .setDisplay(VALUE_DISPLAY.slider) .setMappable(6); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 6] = nodeValueMap("Base value", self); + inputs[6] = nodeValueMap("Base value", self); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 7] = nodeValue_Bool("Array Input", self, false); + inputs[7] = nodeValue_Bool("Array Input", self, false); - inputs[| 8] = nodeValue_Surface("RGBA Array", self, []) + inputs[8] = nodeValue_Surface("RGBA Array", self, []) .setArrayDepth(1); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Sampling", false], 4, 5, 6, @@ -34,16 +34,16 @@ function Node_Combine_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_surface_depth(); static step = function() { #region - inputs[| 5].mappableStep(); + inputs[5].mappableStep(); var _arr = getInputData(7); - inputs[| 0].setVisible(!_arr, !_arr); - inputs[| 1].setVisible(!_arr, !_arr); - inputs[| 2].setVisible(!_arr, !_arr); - inputs[| 3].setVisible(!_arr, !_arr); + inputs[0].setVisible(!_arr, !_arr); + inputs[1].setVisible(!_arr, !_arr); + inputs[2].setVisible(!_arr, !_arr); + inputs[3].setVisible(!_arr, !_arr); - inputs[| 8].setVisible(_arr, _arr); + inputs[8].setVisible(_arr, _arr); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region @@ -75,7 +75,7 @@ function Node_Combine_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou shader_set_i("useA", is_surface(_a)); shader_set_i("mode", !_data[4]); - shader_set_f_map("base", _data[5], _data[6], inputs[| 5]); + shader_set_f_map("base", _data[5], _data[6], inputs[5]); draw_sprite_stretched(s_fx_pixel, 0, 0, 0, _ww, _hh); diff --git a/scripts/node_compare/node_compare.gml b/scripts/node_compare/node_compare.gml index f4d15e8bd..977da6063 100644 --- a/scripts/node_compare/node_compare.gml +++ b/scripts/node_compare/node_compare.gml @@ -21,7 +21,7 @@ enum COMPARE_OPERATOR { default : ind = array_find(global.node_compare_keys, query); } - if(ind >= 0) node.inputs[| 0].setValue(ind); + if(ind >= 0) node.inputs[0].setValue(ind); return node; } @@ -33,20 +33,20 @@ function Node_Compare(_x, _y, _group = noone) : Node(_x, _y, _group) constructor setDimension(96, 48); - inputs[| 0] = nodeValue_Enum_Scroll("Type", self, 0, [ new scrollItem("Equal", s_node_condition_type, 0), + inputs[0] = nodeValue_Enum_Scroll("Type", self, 0, [ new scrollItem("Equal", s_node_condition_type, 0), new scrollItem("Not equal", s_node_condition_type, 1), new scrollItem("Greater ", s_node_condition_type, 4), new scrollItem("Greater or equal", s_node_condition_type, 5), new scrollItem("Lesser", s_node_condition_type, 2), new scrollItem("Lesser or equal", s_node_condition_type, 3), ]); - inputs[| 1] = nodeValue_Float("a", self, 0) + inputs[1] = nodeValue_Float("a", self, 0) .setVisible(true, true); - inputs[| 2] = nodeValue_Float("b", self, 0) + inputs[2] = nodeValue_Float("b", self, 0) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Result", self, VALUE_TYPE.boolean, false); + outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.boolean, false); static _compare = function(mode, a, b) { switch(mode) { @@ -95,7 +95,7 @@ function Node_Compare(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var b = getInputData(2); var val = evalArray(mode, a, b); - outputs[| 0].setValue(val); + outputs[0].setValue(val); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_composite/node_composite.gml b/scripts/node_composite/node_composite.gml index 024694186..68e980ef1 100644 --- a/scripts/node_composite/node_composite.gml +++ b/scripts/node_composite/node_composite.gml @@ -13,11 +13,11 @@ enum COMPOSE_OUTPUT_SCALING { function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Composite"; - inputs[| 0] = nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ]); + inputs[0] = nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ]); - inputs[| 1] = nodeValue_Enum_Scroll("Output dimension", self, COMPOSE_OUTPUT_SCALING.first, [ "First surface", "Largest surface", "Constant" ]); + inputs[1] = nodeValue_Enum_Scroll("Output dimension", self, COMPOSE_OUTPUT_SCALING.first, [ "First surface", "Largest surface", "Constant" ]); - inputs[| 2] = nodeValue_Dimension(self) + inputs[2] = nodeValue_Dimension(self) .setVisible(false); attribute_surface_depth(); @@ -42,7 +42,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) if(renaming == noone) return; if(is_real(renaming)) - inputs[| renaming].setName(_name); + inputs[renaming].setName(_name); else if(is_struct(renaming) && is_instanceof(renaming, Node)) renaming.setDisplayName(_name) @@ -80,7 +80,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var index = input_fix_len + ind * data_length; var _surf = current_data[index + 0]; var _pos = current_data[index + 1]; - var _inp = inputs[| index]; + var _inp = inputs[index]; var _junc = _inp.value_from? _inp.value_from.node : noone; var _bx = _x + _w - ui(24); @@ -104,8 +104,8 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, _px, _py, _pw, _ph, COLORS.node_composite_bg_blend, 1); - var jn_bld = inputs[| index + 4]; - var jn_alp = inputs[| index + 5]; + var jn_bld = inputs[index + 4]; + var jn_alp = inputs[index + 5]; var wd_bld = jn_bld.editWidget; var wd_alp = jn_alp.editWidget; @@ -257,7 +257,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) draw_sprite_ui_uniform(THEME.visible_12, _acti, _bx, _by - ui(2), 1, c_white); if(mouse_press(mb_left, _focus)) - _modi.inputs[| _modi.active_index].setValue(!_acti); + _modi.inputs[_modi.active_index].setValue(!_acti); } else draw_sprite_ui_uniform(THEME.visible_12, _acti, _bx, _by - ui(2), 1, COLORS._main_icon); @@ -341,12 +341,12 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) array_insert(_sel, hoverIndex, sel); for( var i = 0; i < data_length; i++ ) { - ext[i] = inputs[| index]; - ds_list_delete(inputs, index); + ext[i] = inputs[index]; + array_delete(inputs, index, 1); } for( var i = 0; i < data_length; i++ ) - ds_list_insert(inputs, targt + i, ext[i]); + array_insert(inputs, targt + i, ext[i]); doUpdate(); } @@ -378,7 +378,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var idx = input_fix_len + index * data_length; if(canvas_group) { - var _inp = inputs[| idx]; + var _inp = inputs[idx]; var _nodes = []; while(_inp != noone) { @@ -386,9 +386,9 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) array_push_unique(_nodes, _n); _inp = noone; - for(var i = 0; i < ds_list_size(_n.inputs); i++) { - if(_n.inputs[| i].value_from != noone) - _inp = _n.inputs[| i]; + for(var i = 0; i < array_length(_n.inputs); i++) { + if(_n.inputs[i].value_from != noone) + _inp = _n.inputs[i]; } } @@ -398,38 +398,38 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } for( var i = 0; i < data_length; i++ ) - ds_list_delete(inputs, idx); + array_delete(inputs, idx, 1); input_display_list = array_clone(input_display_list_raw, 1); - for(var i = input_fix_len, n = ds_list_size(inputs); i < n; i++) + for(var i = input_fix_len, n = array_length(inputs); i < n; i++) array_push(input_display_list, i); doUpdate(); } static createNewInput = function() { - var index = ds_list_size(inputs); + var index = array_length(inputs); var _s = floor((index - input_fix_len) / data_length); - inputs[| index + 0] = nodeValue_Surface($"Surface {_s}", self, noone); - inputs[| index + 0].hover_effect = 0; + inputs[index + 0] = nodeValue_Surface($"Surface {_s}", self, noone); + inputs[index + 0].hover_effect = 0; - inputs[| index + 1] = nodeValue_Vector($"Position {_s}", self, [ 0, 0 ] ) + inputs[index + 1] = nodeValue_Vector($"Position {_s}", self, [ 0, 0 ] ) .setUnitRef(function(index) { return [ overlay_w, overlay_h ]; }); - inputs[| index + 2] = nodeValue_Rotation($"Rotation {_s}", self, 0); + inputs[index + 2] = nodeValue_Rotation($"Rotation {_s}", self, 0); - inputs[| index + 3] = nodeValue_Vector($"Scale {_s}", self, [ 1, 1 ] ); + inputs[index + 3] = nodeValue_Vector($"Scale {_s}", self, [ 1, 1 ] ); - inputs[| index + 4] = nodeValue_Enum_Scroll($"Blend {_s}", self, 0, BLEND_TYPES ); + inputs[index + 4] = nodeValue_Enum_Scroll($"Blend {_s}", self, 0, BLEND_TYPES ); - inputs[| index + 5] = nodeValue_Float($"Opacity {_s}", self, 1) + inputs[index + 5] = nodeValue_Float($"Opacity {_s}", self, 1) .setDisplay(VALUE_DISPLAY.slider); for( var i = 0; i < data_length; i++ ) { array_push(input_display_list, index + i); - inputs[| index + i].surface_index = index; + inputs[index + i].surface_index = index; } while(_s >= array_length(attributes.layer_visible)) @@ -438,16 +438,16 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) while(_s >= array_length(attributes.layer_selectable)) array_push(attributes.layer_selectable, true); - return inputs[| index + 0]; + return inputs[index + 0]; } setDynamicInput(6, true, VALUE_TYPE.surface); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Atlas data", self, VALUE_TYPE.atlas, []); + outputs[1] = nodeValue_Output("Atlas data", self, VALUE_TYPE.atlas, []); - outputs[| 2] = nodeValue_Output_Dimension(self, VALUE_TYPE.integer, [1, 1]) + outputs[2] = nodeValue_Output("Dimension", self, VALUE_TYPE.integer, [1, 1]) .setVisible(false) .setDisplay(VALUE_DISPLAY.vector); @@ -543,7 +543,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } } - if(inputs[| input_dragging].setValue([ pos_x, pos_y ])) + if(inputs[input_dragging].setValue([ pos_x, pos_y ])) UNDO_HOLDING = true; } else if(drag_type == NODE_COMPOSE_DRAG.rotate) { @@ -556,7 +556,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) else sa = dragging_sx - da; - if(inputs[| input_dragging].setValue(sa)) + if(inputs[input_dragging].setValue(sa)) UNDO_HOLDING = true; } else if(drag_type == NODE_COMPOSE_DRAG.scale) { @@ -574,7 +574,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) sca_y = min(sca_x, sca_y); } - if(inputs[| input_dragging].setValue([ sca_x, sca_y ])) + if(inputs[input_dragging].setValue([ sca_x, sca_y ])) UNDO_HOLDING = true; } @@ -591,7 +591,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var _sel = attributes.layer_selectable; var amo = getInputAmount(); - var anchors = array_create(ds_list_size(inputs)); + var anchors = array_create(array_length(inputs)); for(var i = 0; i < amo; i++) { var vis = _vis[i]; @@ -744,7 +744,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static step = function() { var _dim_type = getSingleValue(1); - inputs[| 2].setVisible(_dim_type == COMPOSE_OUTPUT_SCALING.constant); + inputs[2].setVisible(_dim_type == COMPOSE_OUTPUT_SCALING.constant); if(canvas_draw != noone && surface_selecting == noone && getInputAmount()) surface_selecting = input_fix_len; diff --git a/scripts/node_condition/node_condition.gml b/scripts/node_condition/node_condition.gml index e79f72e88..03fe51c6c 100644 --- a/scripts/node_condition/node_condition.gml +++ b/scripts/node_condition/node_condition.gml @@ -3,10 +3,10 @@ function Node_Condition(_x, _y, _group = noone) : Node(_x, _y, _group) construct setDimension(96, 48); - inputs[| 0] = nodeValue_Float("Check value", self, 0 ) + inputs[0] = nodeValue_Float("Check value", self, 0 ) .setVisible(true, true); - inputs[| 1] = nodeValue_Enum_Scroll("Condition", self, 0 , [ new scrollItem("Equal", s_node_condition_type, 0), + inputs[1] = nodeValue_Enum_Scroll("Condition", self, 0 , [ new scrollItem("Equal", s_node_condition_type, 0), new scrollItem("Not equal", s_node_condition_type, 1), new scrollItem("Less ", s_node_condition_type, 2), new scrollItem("Less or equal ", s_node_condition_type, 3), @@ -14,46 +14,46 @@ function Node_Condition(_x, _y, _group = noone) : Node(_x, _y, _group) construct new scrollItem("Greater or equal", s_node_condition_type, 5), ]) .rejectArray(); - inputs[| 2] = nodeValue_Float("Compare to", self, 0 ) + inputs[2] = nodeValue_Float("Compare to", self, 0 ) .rejectArray(); - inputs[| 3] = nodeValue("True", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 ) + inputs[3] = nodeValue("True", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 ) .setVisible(true, true); - inputs[| 4] = nodeValue("False", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 ) + inputs[4] = nodeValue("False", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 ) .setVisible(true, true); - inputs[| 5] = nodeValue_Enum_Scroll("Eval mode", self, 0 , ["Boolean", "Number compare", "Text compare" ]) + inputs[5] = nodeValue_Enum_Scroll("Eval mode", self, 0 , ["Boolean", "Number compare", "Text compare" ]) .rejectArray(); - inputs[| 6] = nodeValue_Bool("Boolean", self, false ) + inputs[6] = nodeValue_Bool("Boolean", self, false ) .setVisible(true, true) .rejectArray(); - inputs[| 7] = nodeValue_Text("Text 1", self, "" ); + inputs[7] = nodeValue_Text("Text 1", self, "" ); - inputs[| 8] = nodeValue_Text("Text 2", self, "" ); + inputs[8] = nodeValue_Text("Text 2", self, "" ); input_display_list = [ 5, ["Condition", false], 0, 1, 2, 6, 7, 8, ["Result", true], 3, 4 ] - outputs[| 0] = nodeValue_Output("Result", self, VALUE_TYPE.any, []); - outputs[| 1] = nodeValue_Output("Bool", self, VALUE_TYPE.boolean, false); + outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.any, []); + outputs[1] = nodeValue_Output("Bool", self, VALUE_TYPE.boolean, false); static step = function() { #region var _mode = getInputData(5); - inputs[| 0].setVisible(_mode == 1, _mode == 1); - inputs[| 1].setVisible(_mode == 1); - inputs[| 2].setVisible(_mode == 1, _mode == 1); - inputs[| 6].setVisible(_mode == 0, _mode == 0); - inputs[| 7].setVisible(_mode == 2, _mode == 2); - inputs[| 8].setVisible(_mode == 2, _mode == 2); + inputs[0].setVisible(_mode == 1, _mode == 1); + inputs[1].setVisible(_mode == 1); + inputs[2].setVisible(_mode == 1, _mode == 1); + inputs[6].setVisible(_mode == 0, _mode == 0); + inputs[7].setVisible(_mode == 2, _mode == 2); + inputs[8].setVisible(_mode == 2, _mode == 2); - inputs[| 3].setType(inputs[| 3].value_from == noone? VALUE_TYPE.any : inputs[| 3].value_from.type); - inputs[| 4].setType(inputs[| 4].value_from == noone? VALUE_TYPE.any : inputs[| 4].value_from.type); + inputs[3].setType(inputs[3].value_from == noone? VALUE_TYPE.any : inputs[3].value_from.type); + inputs[4].setType(inputs[4].value_from == noone? VALUE_TYPE.any : inputs[4].value_from.type); } #endregion static update = function(frame = CURRENT_FRAME) { #region @@ -87,22 +87,22 @@ function Node_Condition(_x, _y, _group = noone) : Node(_x, _y, _group) construct } if(res) { - outputs[| 0].setValue(_true); - outputs[| 0].setType(inputs[| 3].type); - outputs[| 0].display_type = inputs[| 3].display_type; + outputs[0].setValue(_true); + outputs[0].setType(inputs[3].type); + outputs[0].display_type = inputs[3].display_type; } else { - outputs[| 0].setValue(_fals); - outputs[| 0].setType(inputs[| 4].type); - outputs[| 0].display_type = inputs[| 4].display_type; + outputs[0].setValue(_fals); + outputs[0].setType(inputs[4].type); + outputs[0].display_type = inputs[4].display_type; } - outputs[| 1].setValue(res); + outputs[1].setValue(res); } #endregion static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region - var val = outputs[| 1].getValue(); - var frm = val? inputs[| 3] : inputs[| 4]; - var to = outputs[| 0]; + var val = outputs[1].getValue(); + var frm = val? inputs[3] : inputs[4]; + var to = outputs[0]; var c0 = value_color(frm.type); draw_set_color(c0); diff --git a/scripts/node_convolution/node_convolution.gml b/scripts/node_convolution/node_convolution.gml index 804d4e388..27bb39e8e 100644 --- a/scripts/node_convolution/node_convolution.gml +++ b/scripts/node_convolution/node_convolution.gml @@ -1,27 +1,27 @@ function Node_Convolution(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Convolution"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Kernel", self, array_create(9)) + inputs[1] = nodeValue_Float("Kernel", self, array_create(9)) .setDisplay(VALUE_DISPLAY.matrix, { size: 3 }); - inputs[| 2] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + inputs[2] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 3] = nodeValue_Surface("Mask", self); + inputs[3] = nodeValue_Surface("Mask", self); - inputs[| 4] = nodeValue_Float("Mix", self, 1) + inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Bool("Active", self, true); + inputs[5] = nodeValue_Bool("Active", self, true); active_index = 5; - inputs[| 6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(3); // inputs 7, 8, - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 5, 6, ["Surfaces", true], 0, 3, 4, 7, 8, diff --git a/scripts/node_corner/node_corner.gml b/scripts/node_corner/node_corner.gml index 7ca09368e..f4f164697 100644 --- a/scripts/node_corner/node_corner.gml +++ b/scripts/node_corner/node_corner.gml @@ -1,20 +1,20 @@ function Node_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Round corner"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Radius", self, 2) + inputs[1] = nodeValue_Float("Radius", self, 2) .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 0.1] }); - inputs[| 2] = nodeValue_Surface("Mask", self); + inputs[2] = nodeValue_Surface("Mask", self); - inputs[| 3] = nodeValue_Float("Mix", self, 1) + inputs[3] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 4] = nodeValue_Bool("Active", self, true); + inputs[4] = nodeValue_Bool("Active", self, true); active_index = 4; - inputs[| 5] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[5] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(2); // inputs 6, 7 @@ -23,7 +23,7 @@ function Node_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co ["Corner", false], 1, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); diff --git a/scripts/node_counter/node_counter.gml b/scripts/node_counter/node_counter.gml index 82f9752c8..21fbe7078 100644 --- a/scripts/node_counter/node_counter.gml +++ b/scripts/node_counter/node_counter.gml @@ -4,17 +4,17 @@ function Node_Counter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c setDimension(96, 48); - inputs[| 0] = nodeValue_Float("Start", self, 1); + inputs[0] = nodeValue_Float("Start", self, 1); - inputs[| 1] = nodeValue_Float("Speed", self, 1); + inputs[1] = nodeValue_Float("Speed", self, 1); - inputs[| 2] = nodeValue_Int("Mode", self, 0, @"Counting mode + inputs[2] = nodeValue_Int("Mode", self, 0, @"Counting mode - Frame count: Count value up/down per frame. - Animation progress: Count from 0 (first frame) to 1 (last frame). ") .setDisplay(VALUE_DISPLAY.enum_scroll, ["Frame count", "Animation progress"]) .rejectArray(); - outputs[| 0] = nodeValue_Output("Value", self, VALUE_TYPE.float, 0); + outputs[0] = nodeValue_Output("Value", self, VALUE_TYPE.float, 0); input_display_list = [ 2, 0, 1 @@ -22,7 +22,7 @@ function Node_Counter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c static step = function() { var mode = getInputData(2); - inputs[| 0].setVisible(mode == 0); + inputs[0].setVisible(mode == 0); } static processData = function(_output, _data, _output_index, _array_index = 0) { @@ -40,7 +40,7 @@ function Node_Counter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); - var str = outputs[| 0].getValue(); + var str = outputs[0].getValue(); draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); var ss = string_scale(str, bbox.w, bbox.h); diff --git a/scripts/node_crop/node_crop.gml b/scripts/node_crop/node_crop.gml index e9db2099d..4949f3a5b 100644 --- a/scripts/node_crop/node_crop.gml +++ b/scripts/node_crop/node_crop.gml @@ -2,26 +2,26 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons name = "Crop"; preview_alpha = 0.5; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Padding("Crop", self, [ 0, 0, 0, 0 ]) + inputs[1] = nodeValue_Padding("Crop", self, [ 0, 0, 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 2] = nodeValue_Bool("Active", self, true); + inputs[2] = nodeValue_Bool("Active", self, true); active_index = 2; - inputs[| 3] = nodeValue_Enum_Scroll("Aspect Ratio", self, 0, [ "None", "Manual", "1:1", "3:2", "4:3", "16:9" ]); + inputs[3] = nodeValue_Enum_Scroll("Aspect Ratio", self, 0, [ "None", "Manual", "1:1", "3:2", "4:3", "16:9" ]); - inputs[| 4] = nodeValue_Vector("Ratio", self, [ 1, 1 ]); + inputs[4] = nodeValue_Vector("Ratio", self, [ 1, 1 ]); - inputs[| 5] = nodeValue_Vector("Center", self, [ .5, .5 ]) + inputs[5] = nodeValue_Vector("Center", self, [ .5, .5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[| 6] = nodeValue_Float("Width", self, 8 ); + inputs[6] = nodeValue_Float("Width", self, 8 ); - inputs[| 7] = nodeValue_Enum_Scroll("Fit Mode", self, 0, [ "Manual", "Width", "Height", "Minimum" ]); + inputs[7] = nodeValue_Enum_Scroll("Fit Mode", self, 0, [ "Manual", "Width", "Height", "Minimum" ]); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 2, ["Surface", true], 0, @@ -41,8 +41,8 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons var _ratio = getRatio(_asp, _rat); - inputs[| 5].setValue([ _dim[0] / 2, _cen[1] ]); - inputs[| 6].setValue(_dim[0]); + inputs[5].setValue([ _dim[0] / 2, _cen[1] ]); + inputs[6].setValue(_dim[0]); }); tool_fith = new NodeTool("Fit Height", THEME.crop_fit_height) @@ -54,8 +54,8 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons var _ratio = getRatio(_asp, _rat); - inputs[| 5].setValue([ _cen[0], _dim[1] / 2 ]); - inputs[| 6].setValue(_dim[1] * _ratio); + inputs[5].setValue([ _cen[0], _dim[1] / 2 ]); + inputs[6].setValue(_dim[1] * _ratio); }); tools = [ tool_drag ]; @@ -82,10 +82,10 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons var _asp = getInputData(3); var _fit = getInputData(7); - inputs[| 1].setVisible(_asp == 0); - inputs[| 4].setVisible(_asp == 1); - inputs[| 5].setVisible(_asp > 0 && _fit == 0); - inputs[| 6].setVisible(_asp > 0 && _fit == 0); + inputs[1].setVisible(_asp == 0); + inputs[4].setVisible(_asp == 1); + inputs[5].setVisible(_asp > 0 && _fit == 0); + inputs[6].setVisible(_asp > 0 && _fit == 0); } static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, params) { @@ -126,7 +126,7 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons _my0 = value_snap(round((_my0 - _y) / _s), _sny); _my1 = value_snap(round((_my1 - _y) / _s), _sny); - if(inputs[| 1].setValue([dim[0] - _mx1, _my0, _mx0, dim[1] - _my1])) + if(inputs[1].setValue([dim[0] - _mx1, _my0, _mx0, dim[1] - _my1])) UNDO_HOLDING = true; draw_set_color(COLORS._main_accent); @@ -212,7 +212,7 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons _splice[3] = value_snap(drag_sv[3] - (_my - drag_my) / _s, _sny); } - if(inputs[| 1].setValue(_splice)) + if(inputs[1].setValue(_splice)) UNDO_HOLDING = true; if(mouse_release(mb_left, active)) { @@ -305,8 +305,8 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons var _px = _x + _cent[0] * _s; var _py = _y + _cent[1] * _s; - var a = inputs[| 5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; - var a = inputs[| 6].drawOverlay(hover, active, _px, _py, _s / 2, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[6].drawOverlay(hover, active, _px, _py, _s / 2, _mx, _my, _snx, _sny); active &= !a; } else { var _idim = surface_get_dimension(_inSurf); @@ -333,13 +333,13 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons if(index != 3) return; var _dim = getDimension(0); - var _asp = inputs[| 3].getValue(); - var _rat = inputs[| 4].getValue(); + var _asp = inputs[3].getValue(); + var _rat = inputs[4].getValue(); var _ratio = getRatio(_asp, _rat); - inputs[| 5].setValue([ _dim[0] / 2, _dim[1] / 2 ]); - inputs[| 6].setValue(min(_dim[0], _dim[1] * _ratio)); + inputs[5].setValue([ _dim[0] / 2, _dim[1] / 2 ]); + inputs[6].setValue(min(_dim[0], _dim[1] * _ratio)); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_crop_content/node_crop_content.gml b/scripts/node_crop_content/node_crop_content.gml index e139e2c18..dd812daa5 100644 --- a/scripts/node_crop_content/node_crop_content.gml +++ b/scripts/node_crop_content/node_crop_content.gml @@ -1,16 +1,16 @@ function Node_Crop_Content(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Crop Content"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Bool("Active", self, true); + inputs[1] = nodeValue_Bool("Active", self, true); - inputs[| 2] = nodeValue_Enum_Scroll("Array Sizing", self, 1, [ "Largest, same size", "Independent" ]) + inputs[2] = nodeValue_Enum_Scroll("Array Sizing", self, 1, [ "Largest, same size", "Independent" ]) .setTooltip("Cropping mode for dealing with image array."); - inputs[| 3] = nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ], "Add padding back after crop."); + inputs[3] = nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ], "Add padding back after crop."); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 1, ["Surfaces", false], 0, 2, @@ -32,12 +32,12 @@ function Node_Crop_Content(_x, _y, _group = noone) : Node(_x, _y, _group) constr var _array = getInputData(2); var _padd = getInputData(3); - var _outSurf = outputs[| 0].getValue(); + var _outSurf = outputs[0].getValue(); surface_array_free(_outSurf); if(!_active) { _outSurf = surface_array_clone(_inSurf); - outputs[| 0].setValue(_outSurf); + outputs[0].setValue(_outSurf); return; } @@ -126,6 +126,6 @@ function Node_Crop_Content(_x, _y, _group = noone) : Node(_x, _y, _group) constr } if(!_arr) res = res[0]; - outputs[| 0].setValue(res); + outputs[0].setValue(res); } } \ No newline at end of file diff --git a/scripts/node_cross_section/node_cross_section.gml b/scripts/node_cross_section/node_cross_section.gml index 6eb3b188e..07a991b29 100644 --- a/scripts/node_cross_section/node_cross_section.gml +++ b/scripts/node_cross_section/node_cross_section.gml @@ -1,18 +1,18 @@ function Node_Cross_Section(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Draw Cross Section"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ]); + inputs[1] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ]); - inputs[| 2] = nodeValue_Float("Position", self, 0 ) + inputs[2] = nodeValue_Float("Position", self, 0 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Bool("Anti Aliasing", self, false ); + inputs[3] = nodeValue_Bool("Anti Aliasing", self, false ); - inputs[| 4] = nodeValue_Enum_Button("Mode", self, 0 , [ "BW", "Colored" ]); + inputs[4] = nodeValue_Enum_Button("Mode", self, 0 , [ "BW", "Colored" ]); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone ); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone ); input_display_list = [ ["Surfaces", false], 0, diff --git a/scripts/node_csv_file_read/node_csv_file_read.gml b/scripts/node_csv_file_read/node_csv_file_read.gml index 53d8c1f26..a8badd49e 100644 --- a/scripts/node_csv_file_read/node_csv_file_read.gml +++ b/scripts/node_csv_file_read/node_csv_file_read.gml @@ -7,7 +7,7 @@ function Node_create_CSV_File_Read(_x, _y, _group = noone) { } var node = new Node_CSV_File_Read(_x, _y, _group).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); node.doUpdate(); return node; @@ -17,7 +17,7 @@ function Node_create_CSV_File_Read_path(_x, _y, path) { if(!file_exists_empty(path)) return noone; var node = new Node_CSV_File_Read(_x, _y, PANEL_GRAPH.getCurrentContext()).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); node.doUpdate(); return node; @@ -29,16 +29,16 @@ function Node_CSV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const w = 128; - inputs[| 0] = nodeValue_Text("Path", self, "") + inputs[0] = nodeValue_Text("Path", self, "") .setDisplay(VALUE_DISPLAY.path_load, { filter: "CSV file|*.csv" }) .rejectArray(); - inputs[| 1] = nodeValue_Bool("Convert to number", self, false) + inputs[1] = nodeValue_Bool("Convert to number", self, false) .rejectArray(); - outputs[| 0] = nodeValue_Output("Content", self, VALUE_TYPE.text, ""); + outputs[0] = nodeValue_Output("Content", self, VALUE_TYPE.text, ""); - outputs[| 1] = nodeValue_Output("Path", self, VALUE_TYPE.path, "") + outputs[1] = nodeValue_Output("Path", self, VALUE_TYPE.path, "") .setVisible(true, true); content = ""; @@ -69,12 +69,12 @@ function Node_CSV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const if(ext != ".csv") return false; - outputs[| 1].setValue(path); + outputs[1].setValue(path); content = file_text_read_all_lines(path); var convert = getInputData(1); - outputs[| 0].setType(convert? VALUE_TYPE.float : VALUE_TYPE.text); + outputs[0].setType(convert? VALUE_TYPE.float : VALUE_TYPE.text); if(convert) { for( var i = 0, n = array_length(content); i < n; i++ ) { var c = content[i]; @@ -120,7 +120,7 @@ function Node_CSV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const var path = path_get(getInputData(0)); if(path_current != path) updatePaths(path); - outputs[| 0].setValue(content); + outputs[0].setValue(content); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { @@ -136,6 +136,6 @@ function Node_CSV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const if(is_array(path)) path = array_safe_get(path, 0); if(!file_exists_empty(path)) return; - inputs[| 0].setValue(path); + inputs[0].setValue(path); } } \ No newline at end of file diff --git a/scripts/node_csv_file_write/node_csv_file_write.gml b/scripts/node_csv_file_write/node_csv_file_write.gml index 079805b97..1fd8ba0d5 100644 --- a/scripts/node_csv_file_write/node_csv_file_write.gml +++ b/scripts/node_csv_file_write/node_csv_file_write.gml @@ -2,7 +2,7 @@ function Node_create_CSV_File_Write(_x, _y, _group = noone) { var path = ""; var node = new Node_CSV_File_Write(_x, _y, _group).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); node.doUpdate(); return node; @@ -14,11 +14,11 @@ function Node_CSV_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) cons w = 128; - inputs[| 0] = nodeValue_Text("Path", self, "") + inputs[0] = nodeValue_Text("Path", self, "") .setDisplay(VALUE_DISPLAY.path_save, { filter: "csv file|*.csv" }) .rejectArray(); - inputs[| 1] = nodeValue("Content", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, "") + inputs[1] = nodeValue("Content", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, "") .setVisible(true, true); static writeFile = function() { #region diff --git a/scripts/node_curve/node_curve.gml b/scripts/node_curve/node_curve.gml index 87d6dc39d..91d560dd8 100644 --- a/scripts/node_curve/node_curve.gml +++ b/scripts/node_curve/node_curve.gml @@ -1,31 +1,31 @@ function Node_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Curve"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Brightness", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + inputs[1] = nodeValue("Brightness", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); - inputs[| 2] = nodeValue("Red", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + inputs[2] = nodeValue("Red", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); - inputs[| 3] = nodeValue("Green", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + inputs[3] = nodeValue("Green", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); - inputs[| 4] = nodeValue("Blue", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + inputs[4] = nodeValue("Blue", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); - inputs[| 5] = nodeValue_Surface("Mask", self); + inputs[5] = nodeValue_Surface("Mask", self); - inputs[| 6] = nodeValue_Float("Mix", self, 1) + inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Bool("Active", self, true); + inputs[7] = nodeValue_Bool("Active", self, true); active_index = 7; - inputs[| 8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(5); // inputs 9, 10 - inputs[| 11] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + inputs[11] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 7, 8, ["Surfaces", true], 0, 5, 6, 9, 10, diff --git a/scripts/node_curve_hsv/node_curve_hsv.gml b/scripts/node_curve_hsv/node_curve_hsv.gml index 352f82071..2240a775f 100644 --- a/scripts/node_curve_hsv/node_curve_hsv.gml +++ b/scripts/node_curve_hsv/node_curve_hsv.gml @@ -1,27 +1,27 @@ function Node_Curve_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "HSV Curve"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Hue", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + inputs[1] = nodeValue("Hue", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); - inputs[| 2] = nodeValue("Saturation", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + inputs[2] = nodeValue("Saturation", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); - inputs[| 3] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + inputs[3] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); - inputs[| 4] = nodeValue_Surface("Mask", self); + inputs[4] = nodeValue_Surface("Mask", self); - inputs[| 5] = nodeValue_Float("Mix", self, 1) + inputs[5] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 6] = nodeValue_Bool("Active", self, true); + inputs[6] = nodeValue_Bool("Active", self, true); active_index = 6; - inputs[| 7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(4); // inputs 8, 9, - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 6, 7, ["Surfaces", true], 0, 4, 5, 8, 9, diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index b9365230b..d8a9dfa94 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -1,24 +1,27 @@ -global.loop_nodes = [ "Node_Iterate", "Node_Iterate_Each" ]; - -#macro INAME internalName == ""? name : internalName -#macro SHOW_PARAM (show_parameter && previewable) - -enum CACHE_USE { - none, - manual, - auto -} - -enum DYNA_INPUT_COND { - connection = 1 << 0, - zero = 1 << 1, -} - -enum NODE_3D { - none, - polygon, - sdf, -} +#region global + global.loop_nodes = [ "Node_Iterate", "Node_Iterate_Each" ]; + + #macro INAME internalName == ""? name : internalName + #macro SHOW_PARAM (show_parameter && previewable) + #macro NODE_SET_INPUT_SIZE input_list_size = array_length(inputs); output_list_size = array_length(outputs); + + enum CACHE_USE { + none, + manual, + auto + } + + enum DYNA_INPUT_COND { + connection = 1 << 0, + zero = 1 << 1, + } + + enum NODE_3D { + none, + polygon, + sdf, + } +#endregion function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { @@ -137,12 +140,15 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { #endregion #region ---- junctions ---- - inputs = ds_list_create(); - outputs = ds_list_create(); + inputs = []; + outputs = []; inputMap = ds_map_create(); outputMap = ds_map_create(); input_value_map = {}; + input_list_size = 0; + output_list_size = 0; + use_display_list = true; input_display_list = -1; output_display_list = -1; @@ -194,10 +200,11 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { input_button_length = 0; run_in(1, function() { - input_buttons = []; + input_buttons = []; + NODE_SET_INPUT_SIZE - for( var i = 0; i < ds_list_size(inputs); i++ ) { - var _in = inputs[| i]; + for( var i = 0; i < input_list_size; i++ ) { + var _in = inputs[i]; if(!is_instanceof(_in, NodeValue)) continue; if(_in.type != VALUE_TYPE.trigger) continue; @@ -336,24 +343,26 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { var type_self = instanceof(self); if(!struct_has(global.NODE_GUIDE, type_self)) return; + NODE_SET_INPUT_SIZE + var _n = global.NODE_GUIDE[$ type_self]; var _ins = _n.inputs; var _ots = _n.outputs; - var amo = min(ds_list_size(inputs), array_length(_ins)); + var amo = min(input_list_size, array_length(_ins)); for( var i = 0; i < amo; i++ ) { - inputs[| i].name = _ins[i].name; - inputs[| i].tooltip = _ins[i].tooltip; + inputs[i].name = _ins[i].name; + inputs[i].tooltip = _ins[i].tooltip; } - var amo = min(ds_list_size(outputs), array_length(_ots)); + var amo = min(output_list_size, array_length(_ots)); for( var i = 0; i < amo; i++ ) { - outputs[| i].name = _ots[i].name; - outputs[| i].tooltip = _ots[i].tooltip; + outputs[i].name = _ots[i].name; + outputs[i].tooltip = _ots[i].tooltip; } - } run_in(1, initTooltip); + } run_in(1, function() /*=>*/ {return initTooltip}); - static setDisplayName = function(_name) { #region + static setDisplayName = function(_name) { renamed = true; display_name = _name; internalName = string_replace_all(display_name, " ", "_"); @@ -363,7 +372,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { onSetDisplayName(); return self; - } #endregion + } static getFullName = function() { return renamed? $"[{name}] " + display_name : name; } static getDisplayName = function() { return renamed? display_name : name; } @@ -382,7 +391,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { input_display_list_raw = array_clone(input_display_list, 1); input_display_len = input_display_list == -1? 0 : array_length(input_display_list); - input_fix_len = ds_list_size(inputs); + input_fix_len = array_length(inputs); data_length = _data_length; dynamic_input_cond = _dynamic_input_cond; @@ -397,17 +406,18 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { } static refreshDynamicInput = function() { - var _in = ds_list_create(); + NODE_SET_INPUT_SIZE + var _in = []; for( var i = 0; i < input_fix_len; i++ ) - ds_list_add(_in, inputs[| i]); + array_push(_in, inputs[i]); input_display_list = array_clone(input_display_list_raw, 1); var sep = false; - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < input_list_size; i += data_length ) { var _active = false; - var _inp = inputs[| i + dyna_input_check_shift]; + var _inp = inputs[i + dyna_input_check_shift]; if(dynamic_input_cond & DYNA_INPUT_COND.connection) _active |= _inp.hasJunctionFrom(); @@ -425,27 +435,26 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { var _ind = i + j; if(input_display_list != -1) - array_push(input_display_list, ds_list_size(_in)); - ds_list_add(_in, inputs[| _ind]); + array_push(input_display_list, array_length(_in)); + array_push(_in, inputs[_ind]); } } else { for( var j = 0; j < data_length; j++ ) - delete inputs[| i + j]; + delete inputs[i + j]; } } - var _ina = ds_list_size(_in); + var _ina = array_length(_in); for( var i = 0; i < _ina; i++ ) _in[| i].index = i; if(dummy_input) dummy_input.index = _ina; - ds_list_destroy(inputs); inputs = _in; } - static getInputAmount = function() { return (ds_list_size(inputs) - input_fix_len) / data_length; } + static getInputAmount = function() { return (input_list_size - input_fix_len) / data_length; } function onInputResize() { refreshDynamicInput(); triggerRender(); } @@ -453,13 +462,13 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { var _targ = noone; var _dy = 9999; - for( var i = 0; i < ds_list_size(outputs); i++ ) { - if(!outputs[| i].isVisible()) continue; - if(junc != noone && !junc.isConnectable(outputs[| i], true)) continue; + for( var i = 0; i < output_list_size; i++ ) { + if(!outputs[i].isVisible()) continue; + if(junc != noone && !junc.isConnectable(outputs[i], true)) continue; - var _ddy = abs(outputs[| i].y - _y); + var _ddy = abs(outputs[i].y - _y); if(_ddy < _dy) { - _targ = outputs[| i]; + _targ = outputs[i]; _dy = _ddy; } } @@ -467,11 +476,13 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { } static getInput = function(_y = 0, junc = noone, shift = input_fix_len) { + NODE_SET_INPUT_SIZE + var _targ = noone; var _dy = 9999; - for( var i = shift; i < ds_list_size(inputs); i++ ) { - var _inp = inputs[| i]; + for( var i = shift; i < input_list_size; i++ ) { + var _inp = inputs[i]; if(!_inp.isVisible()) continue; if(_inp.value_from != noone) continue; @@ -520,6 +531,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { /////============= STEP ============= static stepBegin = function() { + NODE_SET_INPUT_SIZE + if(use_cache) cacheArrayCheck(); doStepBegin(); @@ -592,21 +605,23 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { return jun_list_arr; } - static getOutputJunctionAmount = function() { return output_display_list == -1? ds_list_size(outputs) : array_length(output_display_list); } + static getOutputJunctionAmount = function() { return output_display_list == -1? output_list_size : array_length(output_display_list); } static getOutputJunctionIndex = function(index) { return output_display_list == -1? index : output_display_list[index]; } static updateIO = function() { - for( var i = 0, n = ds_list_size(inputs); i < n; i++ ) - inputs[| i].visible_in_list = false; + NODE_SET_INPUT_SIZE - inputs_amount = (input_display_list == -1 || !use_display_list)? ds_list_size(inputs) : array_length(input_display_list); + for( var i = 0, n = input_list_size; i < n; i++ ) + inputs[i].visible_in_list = false; + + inputs_amount = (input_display_list == -1 || !use_display_list)? input_list_size : array_length(input_display_list); inputs_index = []; for( var i = 0; i < inputs_amount; i++ ) { var _input = getInputJunctionIndex(i); if(_input == noone) continue; - var _inp = inputs[| _input]; + var _inp = inputs[_input]; if(!is_struct(_inp) || !is_instanceof(_inp, NodeValue)) continue; array_push(inputs_index, _input); @@ -614,18 +629,20 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { } inputs_amount = array_length(inputs_index); - outputs_amount = output_display_list == -1? ds_list_size(outputs) : array_length(output_display_list); + outputs_amount = output_display_list == -1? output_list_size : array_length(output_display_list); outputs_index = array_create_ext(outputs_amount, function(index) { return getOutputJunctionIndex(index); }); } run_in(1, function() /*=>*/ { updateIO() }); static setHeight = function() { + NODE_SET_INPUT_SIZE + w = SHOW_PARAM? attributes.node_param_width : min_w; if(!auto_height) return; var _ss = getGraphPreviewSurface(); var _ps = is_surface(_ss); - var _ou = preview_channel >= 0 && preview_channel < ds_list_size(outputs) && outputs[| preview_channel].type == VALUE_TYPE.surface; + var _ou = preview_channel >= 0 && preview_channel < output_list_size && outputs[preview_channel].type == VALUE_TYPE.surface; // print($"{previewable} && {preview_draw} && ([{_ss}] {_ps} || {_ou})"); var _prev_surf = previewable && preview_draw && (_ps || _ou); @@ -648,8 +665,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { } var _p = previewable; - for( var i = 0; i < ds_list_size(inputs); i++ ) { - var _inp = inputs[| i]; + for( var i = 0; i < input_list_size; i++ ) { + var _inp = inputs[i]; if(is_instanceof(_inp, NodeValue) && _inp.isVisible()) { if(_p) _hi += junction_draw_hei_y; _p = true; @@ -659,8 +676,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { if(auto_input && dummy_input) _hi += junction_draw_hei_y; var _p = previewable; - for( var i = 0; i < ds_list_size(outputs); i++ ) { - if(!outputs[| i].isVisible()) continue; + for( var i = 0; i < output_list_size; i++ ) { + if(!outputs[i].isVisible()) continue; if(_p) _ho += junction_draw_hei_y; _p = true; } @@ -670,15 +687,17 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { } - static getJunctionList = function() { #region ////getJunctionList - var amo = input_display_list == -1? ds_list_size(inputs) : array_length(input_display_list); + static getJunctionList = function() { ////getJunctionList + NODE_SET_INPUT_SIZE + + var amo = input_display_list == -1? input_list_size : array_length(input_display_list); inputDisplayList = []; for(var i = 0; i < amo; i++) { var ind = getInputJunctionIndex(i); if(ind == noone) continue; - var jun = ds_list_get(inputs, ind, noone); + var jun = array_safe_get(inputs, ind, noone); if(jun == noone || is_undefined(jun)) continue; if(!jun.isVisible()) continue; @@ -686,33 +705,38 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { } if(auto_input && dummy_input) array_push(inputDisplayList, dummy_input); - }#endregion + } static onValidate = function() { + NODE_SET_INPUT_SIZE + value_validation[VALIDATION.pass] = 0; value_validation[VALIDATION.warning] = 0; value_validation[VALIDATION.error] = 0; - for( var i = 0; i < ds_list_size(inputs); i++ ) { - var jun = inputs[| i]; + for( var i = 0; i < input_list_size; i++ ) { + var jun = inputs[i]; if(jun.value_validation) value_validation[jun.value_validation]++; } } static getJunctionTos = function() { - var _vto = array_create(ds_list_size(outputs)); - for (var j = 0, m = ds_list_size(outputs); j < m; j++) - _vto[j] = array_clone(outputs[| j].value_to); + var _vto = array_create(output_list_size); + for (var j = 0; j < output_list_size; j++) + _vto[j] = array_clone(outputs[j].value_to); + return _vto; } static checkConnectGroup = function(_io) { + NODE_SET_INPUT_SIZE + var _y = y; var _n = noone; - for(var i = 0; i < ds_list_size(inputs); i++) { - var _in = inputs[| i]; + for(var i = 0; i < input_list_size; i++) { + var _in = inputs[i]; if(_in.value_from == noone) continue; if(_in.value_from.node.group == group) continue; @@ -725,8 +749,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { _io.inputs[$ _ind ] = [ _in ]; } - for(var i = 0; i < ds_list_size(outputs); i++) { - var _ou = outputs[| i]; + for(var i = 0; i < output_list_size; i++) { + var _ou = outputs[i]; for(var j = 0; j < array_length(_ou.value_to); j++) { var _to = _ou.value_to[j]; @@ -753,10 +777,11 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { static resetDefault = function() { var folder = instanceof(self); + NODE_SET_INPUT_SIZE if(!ds_map_exists(global.PRESETS_MAP, folder)) { - for( var i = 0, n = ds_list_size(inputs); i < n; i++ ) - inputs[| i].resetValue(); + for( var i = 0, n = input_list_size; i < n; i++ ) + inputs[i].resetValue(); return; } @@ -770,8 +795,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { return; } - for( var i = 0, n = ds_list_size(inputs); i < n; i++ ) - inputs[| i].resetValue(); + for( var i = 0, n = input_list_size; i < n; i++ ) + inputs[i].resetValue(); } if(!APPENDING && !LOADING) run_in(1, function() /*=>*/ { if(set_default) resetDefault() }); @@ -785,27 +810,26 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { static getInputData = function(index, def = 0) { return array_safe_get_fast(inputs_data, index, def); } // static setInputData = function(index, value) { - // var _inp = inputs[| index]; + // var _inp = inputs[index]; // inputs_data[index] = value; // if(is_struct(_inp)) input_value_map[$ _inp.internalName] = value; // } static getInputs = function(frame = CURRENT_FRAME) { - var i = -1; - var n = ds_list_size(inputs); - inputs_data = array_verify(inputs_data, n); + NODE_SET_INPUT_SIZE - repeat(n) { - var _inp = inputs[| ++i]; + inputs_data = array_verify(inputs_data, input_list_size); + __frame = frame; + + array_foreach(inputs, function(_inp, i) /*=>*/ { + if(!is_instanceof(_inp, NodeValue)) return; + if(!_inp.isDynamic()) return; - if(!is_instanceof(_inp, NodeValue)) continue; - if(!_inp.isDynamic()) continue; - - var val = _inp.getValue(frame); + var val = _inp.getValue(__frame); inputs_data[i] = val; // setInputData(i, val); input_value_map[$ _inp.internalName] = val; - } + }); } /////============ UPDATE ============ @@ -818,6 +842,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { static postUpdate = function(frame = CURRENT_FRAME) {} static doUpdate = function(frame = CURRENT_FRAME) { + NODE_SET_INPUT_SIZE + if(PROJECT.safeMode) return; if(NODE_EXTRACT) return; @@ -848,19 +874,18 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { } } - for( var i = 0, n = ds_list_size(inputs); i < n; i++ ) - inputs[| i].updateColor(getInputData(i)); - - for( var i = 0, n = ds_list_size(outputs); i < n; i++ ) - outputs[| i].updateColor(outputs[| i].getValue()); + if(!IS_PLAYING) { + array_foreach(inputs, function(in, i) /*=>*/ { in.updateColor(getInputData(i)); }); + array_foreach(outputs, function(in, i) /*=>*/ { in.updateColor(in.getValue()); }); + } postUpdate(frame); cached_manual = false; if(!use_cache && PROJECT.onion_skin.enabled) { - for( var i = 0; i < ds_list_size(outputs); i++ ) { - if(outputs[| i].type != VALUE_TYPE.surface) continue; - cacheCurrentFrame(outputs[| i].getValue()); + for( var i = 0; i < output_list_size; i++ ) { + if(outputs[i].type != VALUE_TYPE.surface) continue; + cacheCurrentFrame(outputs[i].getValue()); break; } } @@ -905,8 +930,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { if(!rendered) return true; force_requeue = false; - for(var i = 0; i < ds_list_size(inputs); i++) - if(inputs[| i].isActiveDynamic(frame)) return true; + for(var i = 0; i < input_list_size; i++) + if(inputs[i].isActiveDynamic(frame)) return true; return false; } @@ -935,8 +960,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { static forwardPassiveDynamic = function() { rendered = false; - for( var i = 0, n = ds_list_size(outputs); i < n; i++ ) { - var _outp = outputs[| i]; + for( var i = 0, n = output_list_size; i < n; i++ ) { + var _outp = outputs[i]; for(var j = 0; j < array_length(_outp.value_to); j++) { var _to = _outp.value_to[j]; @@ -957,8 +982,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { static isLeaf = function() { INLINE - for( var i = 0, n = ds_list_size(inputs); i < n; i++ ) { - var _inp = inputs[| i]; + for( var i = 0, n = input_list_size; i < n; i++ ) { + var _inp = inputs[i]; if(!_inp.value_from == noone) return false; } @@ -970,10 +995,9 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { if(list == noone) return isLeaf(); - for( var i = 0, n = ds_list_size(inputs); i < n; i++ ) { - var _inp = inputs[| i].value_from; + for( var i = 0, n = input_list_size; i < n; i++ ) { + var _inp = inputs[i].value_from; - // print($"Checking isLeafList {inputs[| i]} < {_inp} | list {ds_list_to_array(list)}"); if(_inp != noone && array_exists(list, _inp.node)) return false; } @@ -984,11 +1008,10 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { static isRenderActive = function() { return renderActive || (PREFERENCES.render_all_export && IS_RENDERING); } static isRenderable = function(log = false) { //Check if every input is ready (updated) - if(!active) return false; - if(!isRenderActive()) return false; + if(!active || !isRenderActive()) return false; - for(var j = 0; j < ds_list_size(inputs); j++) - if(!inputs[| j].isRendered()) return false; + for(var j = 0; j < input_list_size; j++) + if(!inputs[j].isRendered()) return false; return true; } @@ -1008,8 +1031,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { if(attributes.show_update_trigger && updatedInTrigger.value_from) array_push(prev, updatedInTrigger.value_from.node); - for( var i = 0, n = ds_list_size(inputs); i < n; i++ ) { - var _in = inputs[| i]; + for( var i = 0, n = input_list_size; i < n; i++ ) { + var _in = inputs[i]; if(_in.value_from != noone) { if(in_VFX && !_in.value_from.node.in_VFX) { @@ -1038,8 +1061,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { LOG_BLOCK_START(); LOG_IF(global.FLAG.render == 1, $"→→→→→ Call get next node from: {INAME}"); - for(var i = 0; i < ds_list_size(outputs); i++) { - var _ot = outputs[| i]; + for(var i = 0; i < output_list_size; i++) { + var _ot = outputs[i]; if(!_ot.forward) continue; for( var j = 0, n = array_length(_ot.value_to_loop); j < n; j++ ) { @@ -1072,8 +1095,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { static getNextNodesRaw = function() { var nodes = []; - for(var i = 0; i < ds_list_size(outputs); i++) { - var _ot = outputs[| i]; + for(var i = 0; i < output_list_size; i++) { + var _ot = outputs[i]; if(!_ot.forward) continue; if(_ot.type == VALUE_TYPE.node) continue; @@ -1128,6 +1151,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { } run_in(1, function() { refreshNodeDisplay(); }); static preDraw = function(_x, _y, _s) { + NODE_SET_INPUT_SIZE + var xx = x * _s + _x; var yy = y * _s + _y; var jun; @@ -1152,18 +1177,18 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { updatedOutTrigger.x = xx + w * _s; updatedOutTrigger.y = yy + 10; - if(in_cache_len != array_length(inputDisplayList) || out_cache_len != ds_list_size(outputs)) { + if(in_cache_len != array_length(inputDisplayList) || out_cache_len != output_list_size) { refreshNodeDisplay(); in_cache_len = array_length(inputDisplayList); - out_cache_len = ds_list_size(outputs); + out_cache_len = output_list_size; } var _iny = yy + (junction_draw_pad_y + junction_draw_hei_y * 0.5 * SHOW_PARAM) * _s; var rx = x, ry = y + junction_draw_pad_y + junction_draw_hei_y * 0.5 * SHOW_PARAM; - for( var i = 0, n = ds_list_size(inputs); i < n; i++ ) { - jun = inputs[| i]; + for( var i = 0, n = input_list_size; i < n; i++ ) { + jun = inputs[i]; jun.x = xx; jun.y = _iny; @@ -1189,7 +1214,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { for(var i = 0; i < outputs_amount; i++) { var idx = outputs_index[i]; - jun = outputs[| idx]; + jun = outputs[idx]; jun.x = xx; jun.y = _outy; @@ -1388,8 +1413,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { hover = jun; } - for(var i = 0; i < ds_list_size(outputs); i++) { - var jun = outputs[| i]; + for(var i = 0; i < output_list_size; i++) { + var jun = outputs[i]; if(!jun.isVisible()) continue; if(jun.drawJunction(_s, _mx, _my)) @@ -1425,8 +1450,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { hover = jun; } - for(var i = 0; i < ds_list_size(outputs); i++) { - var jun = outputs[| i]; + for(var i = 0; i < output_list_size; i++) { + var jun = outputs[i]; if(!jun.isVisible()) continue; if(jun.drawJunction_fast(_s, _mx, _my)) @@ -1455,7 +1480,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { if(draw_graph_culled) return; if(!active) return; - var amo = input_display_list == -1? ds_list_size(inputs) : array_length(input_display_list); + var amo = input_display_list == -1? input_list_size : array_length(input_display_list); var jun; var xx = x * _s + _x; @@ -1493,11 +1518,11 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { } if(show_output_name) { - for(var i = 0; i < ds_list_size(outputs); i++) - if(outputs[| i].isVisible()) outputs[| i].drawNameBG(_s); + for(var i = 0; i < output_list_size; i++) + if(outputs[i].isVisible()) outputs[i].drawNameBG(_s); - for(var i = 0; i < ds_list_size(outputs); i++) - if(outputs[| i].isVisible()) outputs[| i].drawName(_s, _mx, _my); + for(var i = 0; i < output_list_size; i++) + if(outputs[i].isVisible()) outputs[i].drawName(_s, _mx, _my); } if(hasInspector1Update() && PANEL_GRAPH.pHOVER && point_in_circle(_mx, _my, inspectInput1.x, inspectInput1.y, 10)) { @@ -1521,8 +1546,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { var high = params.highlight; // 0 var bg = params.bg; // 0 - for(var i = 0; i < ds_list_size(outputs); i++) { - var jun = outputs[| i]; + for(var i = 0; i < output_list_size; i++) { + var jun = outputs[i]; var connected = false; for( var j = 0; j < array_length(jun.value_to); j++ ) { @@ -1545,7 +1570,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { } - __draw_inputs = array_verify(__draw_inputs, ds_list_size(inputs)); + __draw_inputs = array_verify(__draw_inputs, input_list_size); var _len = 0; var _jun, _hov; @@ -1560,8 +1585,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { } var drawLineIndex = 1; - for(var i = 0, n = ds_list_size(inputs); i < n; i++) { - _jun = inputs[| i]; + for(var i = 0, n = input_list_size; i < n; i++) { + _jun = inputs[i]; _jun.draw_blend_color = bg; _jun.draw_blend = high? PREFERENCES.connection_line_highlight_fade : -1; @@ -1589,7 +1614,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { } static getGraphPreviewSurface = function() { - var _node = outputs[| preview_channel]; + var _node = array_safe_get(outputs, preview_channel); if(!is_instanceof(_node, NodeValue)) return noone; switch(_node.type) { @@ -1852,9 +1877,9 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { if(!PREFERENCES.connection_line_highlight_all && _depth == 1) return; - for( var i = 0, n = ds_list_size(inputs); i < n; i++ ) { - if(inputs[| i].value_from == noone) continue; - inputs[| i].value_from.node.drawBranch(_depth + 1); + for( var i = 0, n = input_list_size; i < n; i++ ) { + if(inputs[i].value_from == noone) continue; + inputs[i].value_from.node.drawBranch(_depth + 1); } } @@ -1872,13 +1897,13 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { /////============ PREVIEW ============ static getPreviewValues = function() { - if(preview_channel >= ds_list_size(outputs)) return noone; + if(preview_channel >= output_list_size) return noone; - var _type = outputs[| preview_channel].type; + var _type = outputs[preview_channel].type; if(_type != VALUE_TYPE.surface && _type != VALUE_TYPE.dynaSurface) return noone; - var val = outputs[| preview_channel].getValue(); + var val = outputs[preview_channel].getValue(); if(is_struct(val) && is_instanceof(val, dynaSurf)) val = array_safe_get_fast(val.surfaces, 0, noone); @@ -1906,8 +1931,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { static getAnimationCacheExist = function(frame) { return cacheExist(frame); } static clearInputCache = function() { - for( var i = 0; i < ds_list_size(inputs); i++ ) - inputs[| i].cache_value[0] = false; + for( var i = 0; i < input_list_size; i++ ) + inputs[i].cache_value[0] = false; } static cacheArrayCheck = function() { @@ -1951,7 +1976,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { if(!cacheExist(frame)) return false; var _s = cached_output[CURRENT_FRAME]; - outputs[| 0].setValue(_s); + outputs[0].setValue(_s); return true; } @@ -1993,8 +2018,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { if(group != _group) return; setRenderStatus(true); - for( var i = 0, n = ds_list_size(inputs); i < n; i++ ) { - var _input = inputs[| i]; + for( var i = 0, n = input_list_size; i < n; i++ ) { + var _input = inputs[i]; if(_input.value_from == noone) continue; _input.value_from.node.cachedPropagate(_group); @@ -2002,9 +2027,9 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { } static clearInputCache = function() { - for( var i = 0; i < ds_list_size(inputs); i++ ) { - if(!is_instanceof(inputs[| i], NodeValue)) continue; - inputs[| i].resetCache(); + for( var i = 0; i < input_list_size; i++ ) { + if(!is_instanceof(inputs[i], NodeValue)) continue; + inputs[i].resetCache(); } } @@ -2084,13 +2109,13 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { } var _inputs = []; - for(var i = 0; i < ds_list_size(inputs); i++) - array_push(_inputs, inputs[| i].serialize(scale, preset)); + for(var i = 0; i < array_length(inputs); i++) + array_push(_inputs, inputs[i].serialize(scale, preset)); _map.inputs = _inputs; var _outputs = []; - for(var i = 0; i < ds_list_size(outputs); i++) - array_push(_outputs, outputs[| i].serialize(scale, preset)); + for(var i = 0; i < array_length(outputs); i++) + array_push(_outputs, outputs[i].serialize(scale, preset)); _map.outputs = _outputs; var _trigger = []; @@ -2233,25 +2258,25 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { preApplyDeserialize(); var _inputs = load_map.inputs; - var amo = min(ds_list_size(inputs), array_length(_inputs)); + var amo = min(array_length(inputs), array_length(_inputs)); //print($"Applying deserialzie for {name}"); for(var i = 0; i < amo; i++) { - if(inputs[| i] == noone || _inputs[i] == noone) continue; + if(inputs[i] == noone || _inputs[i] == noone) continue; - //print($" Apply {i} : {inputs[| i].name}"); - inputs[| i].applyDeserialize(_inputs[i], load_scale, preset); + //print($" Apply {i} : {inputs[i].name}"); + inputs[i].applyDeserialize(_inputs[i], load_scale, preset); } if(struct_has(load_map, "outputs")) { var _outputs = load_map.outputs; - var amo = min(ds_list_size(outputs), array_length(_outputs)); + var amo = min(array_length(outputs), array_length(_outputs)); for(var i = 0; i < amo; i++) { - if(outputs[| i] == noone) continue; + if(outputs[i] == noone) continue; - outputs[| i].applyDeserialize(_outputs[i], load_scale, preset); + outputs[i].applyDeserialize(_outputs[i], load_scale, preset); } } @@ -2298,8 +2323,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { static connect = function(log = false) { var connected = true; - for(var i = 0; i < ds_list_size(inputs); i++) - connected &= inputs[| i].connect(log); + for(var i = 0; i < array_length(inputs); i++) + connected &= inputs[i].connect(log); inspectInput1.connect(log); inspectInput2.connect(log); @@ -2319,16 +2344,11 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { /////=========== CLEAN UP =========== static cleanUp = function() { - if(ds_exists(inputs, ds_type_list)) - for( var i = 0; i < ds_list_size(inputs); i++ ) - inputs[| i].cleanUp(); + for( var i = 0; i < array_length(inputs); i++ ) + inputs[i].cleanUp(); - if(ds_exists(outputs, ds_type_list)) - for( var i = 0; i < ds_list_size(outputs); i++ ) - outputs[| i].cleanUp(); - - ds_list_destroy(inputs); - ds_list_destroy(outputs); + for( var i = 0; i < array_length(outputs); i++ ) + outputs[i].cleanUp(); ds_map_destroy(inputMap); ds_map_destroy(outputMap); @@ -2379,15 +2399,15 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { PANEL_PREVIEW.removeNodePreview(self); var val_from_map = {}; - for( var i = 0; i < ds_list_size(inputs); i++ ) { - var _i = inputs[| i]; + for( var i = 0; i < array_length(inputs); i++ ) { + var _i = inputs[i]; if(_i.value_from == noone) continue; val_from_map[$ _i.type] = _i.value_from; } - for(var i = 0; i < ds_list_size(outputs); i++) { - var jun = outputs[| i]; + for(var i = 0; i < array_length(outputs); i++) { + var jun = outputs[i]; for(var j = array_length(jun.value_to) - 1; j >= 0; j--) { var _vt = jun.value_to[j]; @@ -2404,8 +2424,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { jun.value_to = []; } - for( var i = 0; i < ds_list_size( inputs); i++ ) inputs[| i].destroy(); - for( var i = 0; i < ds_list_size(outputs); i++ ) outputs[| i].destroy(); + for( var i = 0; i < array_length( inputs); i++ ) inputs[i].destroy(); + for( var i = 0; i < array_length(outputs); i++ ) outputs[i].destroy(); onDestroy(); if(group) group.refreshNodes(); @@ -2429,8 +2449,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { } static droppable = function(dragObj) { - for( var i = 0; i < ds_list_size(inputs); i++ ) { - if(dragObj.type == inputs[| i].drop_key) + for( var i = 0; i < array_length(inputs); i++ ) { + if(dragObj.type == inputs[i].drop_key) return true; } return false; @@ -2443,9 +2463,9 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { return; } - for( var i = 0; i < ds_list_size(inputs); i++ ) { - if(dragObj.type == inputs[| i].drop_key) { - inputs[| i].setValue(dragObj.data); + for( var i = 0; i < array_length(inputs); i++ ) { + if(dragObj.type == inputs[i].drop_key) { + inputs[i].setValue(dragObj.data); return; } } @@ -2489,8 +2509,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { } static isTerminal = function() { - for( var i = 0; i < ds_list_size(outputs); i++ ) { - var _to = outputs[| i].getJunctionTo(); + for( var i = 0; i < array_length(outputs); i++ ) { + var _to = outputs[i].getJunctionTo(); if(array_length(_to)) return false; } @@ -2502,7 +2522,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { static attrDepth = function() { if(struct_has(attributes, "color_depth")) { var form = attributes.color_depth; - if(inputs[| 0].type == VALUE_TYPE.surface) + if(inputs[0].type == VALUE_TYPE.surface) form--; if(form >= 0) return array_safe_get_fast(global.SURFACE_FORMAT, form, surface_rgba8unorm); diff --git a/scripts/node_de_corner/node_de_corner.gml b/scripts/node_de_corner/node_de_corner.gml index f92134273..bb43db231 100644 --- a/scripts/node_de_corner/node_de_corner.gml +++ b/scripts/node_de_corner/node_de_corner.gml @@ -1,28 +1,28 @@ function Node_De_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "De-Corner"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Bool("Active", self, true); + inputs[1] = nodeValue_Bool("Active", self, true); active_index = 1; - inputs[| 2] = nodeValue_Float("Tolerance", self, 0) + inputs[2] = nodeValue_Float("Tolerance", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Int("Iteration", self, 2) + inputs[3] = nodeValue_Int("Iteration", self, 2) - inputs[| 4] = nodeValue_Enum_Button("Type", self, 0, [ "Double", "Diagonal" ]); + inputs[4] = nodeValue_Enum_Button("Type", self, 0, [ "Double", "Diagonal" ]); - inputs[| 5] = nodeValue_Surface("Mask", self); + inputs[5] = nodeValue_Surface("Mask", self); - inputs[| 6] = nodeValue_Float("Mix", self, 1) + inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); __init_mask_modifier(5); // inputs 7, 8, - inputs[| 9] = nodeValue_Toggle("Include", self, 0b11, { data: [ "Inner", "Side" ] }); + inputs[9] = nodeValue_Toggle("Include", self, 0b11, { data: [ "Inner", "Side" ] }); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 1, ["Surfaces", true], 0, 5, 6, 7, 8, diff --git a/scripts/node_de_stray/node_de_stray.gml b/scripts/node_de_stray/node_de_stray.gml index 5c623c54b..5ea554ff7 100644 --- a/scripts/node_de_stray/node_de_stray.gml +++ b/scripts/node_de_stray/node_de_stray.gml @@ -1,28 +1,28 @@ function Node_De_Stray(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "De-Stray"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Tolerance", self, 0) + inputs[1] = nodeValue_Float("Tolerance", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 2] = nodeValue_Bool("Active", self, true); + inputs[2] = nodeValue_Bool("Active", self, true); active_index = 2; - inputs[| 3] = nodeValue_Int("Iteration", self, 2) + inputs[3] = nodeValue_Int("Iteration", self, 2) - inputs[| 4] = nodeValue_Enum_Button("Strictness", self, 0, [ "Low", "High", "Stray-only" ]); + inputs[4] = nodeValue_Enum_Button("Strictness", self, 0, [ "Low", "High", "Stray-only" ]); - inputs[| 5] = nodeValue_Surface("Mask", self); + inputs[5] = nodeValue_Surface("Mask", self); - inputs[| 6] = nodeValue_Float("Mix", self, 1) + inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); __init_mask_modifier(5); // inputs 7, 8, - inputs[| 9] = nodeValue_Bool("Fill Empty", self, false); + inputs[9] = nodeValue_Bool("Fill Empty", self, false); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 2, ["Surfaces", true], 0, 5, 6, 7, 8, diff --git a/scripts/node_delay/node_delay.gml b/scripts/node_delay/node_delay.gml index ff615eff8..5f75a84df 100644 --- a/scripts/node_delay/node_delay.gml +++ b/scripts/node_delay/node_delay.gml @@ -3,11 +3,11 @@ function Node_Delay(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con is_simulation = true; - inputs[| 0] = nodeValue_Surface("Surface", self); + inputs[0] = nodeValue_Surface("Surface", self); - inputs[| 1] = nodeValue_Int("Frames", self, 1); + inputs[1] = nodeValue_Int("Frames", self, 1); - outputs[| 0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone); input_display_list = [ 0, ["Delay", false], 1, diff --git a/scripts/node_diffuse/node_diffuse.gml b/scripts/node_diffuse/node_diffuse.gml index f3183248f..937de883b 100644 --- a/scripts/node_diffuse/node_diffuse.gml +++ b/scripts/node_diffuse/node_diffuse.gml @@ -1,35 +1,35 @@ function Node_Diffuse(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Diffuse"; - inputs[| 0] = nodeValue_Surface("Density field", self); + inputs[0] = nodeValue_Surface("Density field", self); - inputs[| 1] = nodeValue_Float("Dissipation", self, 0.05) + inputs[1] = nodeValue_Float("Dissipation", self, 0.05) .setDisplay(VALUE_DISPLAY.slider, { range: [ -0.2, 0.2, 0.001] }); - inputs[| 2] = nodeValue_Float("Scale", self, 1); + inputs[2] = nodeValue_Float("Scale", self, 1); - inputs[| 3] = nodeValue_Float("Randomness", self, 1); + inputs[3] = nodeValue_Float("Randomness", self, 1); - inputs[| 4] = nodeValue_Float("Flow rate", self, 0.5) + inputs[4] = nodeValue_Float("Flow rate", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 1, 0.01] }); - inputs[| 5] = nodeValue_Slider_Range("Threshold", self, [ 0.5, 0.7 ]); + inputs[5] = nodeValue_Slider_Range("Threshold", self, [ 0.5, 0.7 ]); - inputs[| 6] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 6].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[6] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[6].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 7] = nodeValue_Surface("External", self); + inputs[7] = nodeValue_Surface("External", self); - inputs[| 8] = nodeValue_Float("External Strength", self, 0.1) + inputs[8] = nodeValue_Float("External Strength", self, 0.1) .setDisplay(VALUE_DISPLAY.slider, { range: [ -0.25, 0.25, 0.01] }); - inputs[| 9] = nodeValue_Int("Detail", self, 1) + inputs[9] = nodeValue_Int("Detail", self, 1) - inputs[| 10] = nodeValue_Enum_Scroll("External Type", self, 0, [ "Point", "Vector" ]); + inputs[10] = nodeValue_Enum_Scroll("External Type", self, 0, [ "Point", "Vector" ]); - inputs[| 11] = nodeValue_Rotation("External Direction", self, 0); + inputs[11] = nodeValue_Rotation("External Direction", self, 0); - outputs[| 0] = nodeValue_Output("Result", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.surface, noone); input_display_list = [ 0, 6, ["Diffuse", false], 1, @@ -43,7 +43,7 @@ function Node_Diffuse(_x, _y, _group = noone) : Node(_x, _y, _group) constructor static step = function() { var _ftyp = getInputData(10); - inputs[| 11].setVisible(_ftyp == 1); + inputs[11].setVisible(_ftyp == 1); } static update = function() { @@ -64,7 +64,7 @@ function Node_Diffuse(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var _sw = surface_get_width_safe(_surf); var _sh = surface_get_height_safe(_surf); - var _outSurf = outputs[| 0].getValue(); + var _outSurf = outputs[0].getValue(); _outSurf = surface_verify(_outSurf, _sw, _sh); for( var i = 0, n = array_length(temp_surface); i < n; i++ ) @@ -97,6 +97,6 @@ function Node_Diffuse(_x, _y, _group = noone) : Node(_x, _y, _group) constructor draw_surface_safe(temp_surface[1]); surface_reset_shader(); - outputs[| 0].setValue(_outSurf); + outputs[0].setValue(_outSurf); } } \ No newline at end of file diff --git a/scripts/node_dilate/node_dilate.gml b/scripts/node_dilate/node_dilate.gml index 915b53131..eebeb87c5 100644 --- a/scripts/node_dilate/node_dilate.gml +++ b/scripts/node_dilate/node_dilate.gml @@ -1,44 +1,44 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Dilate"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Vector("Center", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Center", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 2] = nodeValue_Float("Strength", self, 1) + inputs[2] = nodeValue_Float("Strength", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [-3, 3, 0.01] }) .setMappable(11); - inputs[| 3] = nodeValue_Float("Radius", self, 16) + inputs[3] = nodeValue_Float("Radius", self, 16) .setMappable(12); - inputs[| 4] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + inputs[4] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 5] = nodeValue_Surface("Mask", self); + inputs[5] = nodeValue_Surface("Mask", self); - inputs[| 6] = nodeValue_Float("Mix", self, 1) + inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Bool("Active", self, true); + inputs[7] = nodeValue_Bool("Active", self, true); active_index = 7; - inputs[| 8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(5); // inputs 9, 10 ////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValue_Surface("Strength map", self) + inputs[11] = nodeValue_Surface("Strength map", self) .setVisible(false, false); - inputs[| 12] = nodeValue_Surface("Radius map", self) + inputs[12] = nodeValue_Surface("Radius map", self) .setVisible(false, false); ////////////////////////////////////////////////////////////////////////////////////////////////////////// - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 7, 8, ["Surfaces", true], 0, 5, 6, 9, 10, @@ -57,8 +57,8 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co var py = _y + pos[1] * _s; var _hov = false; - var a = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= a; - var a = inputs[| 3].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); _hov |= a; + var a = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= a; + var a = inputs[3].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); _hov |= a; return _hov; } @@ -66,8 +66,8 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co static step = function() { __step_mask_modifier(); - inputs[| 2].mappableStep(); - inputs[| 3].mappableStep(); + inputs[2].mappableStep(); + inputs[3].mappableStep(); } static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -77,8 +77,8 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co shader_set_interpolation(_data[0]); shader_set_f("dimension", [ surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0]) ]); shader_set_2("center", _data[1]); - shader_set_f_map("strength", _data[2], _data[11], inputs[| 2]); - shader_set_f_map("radius", _data[3], _data[12], inputs[| 3]); + shader_set_f_map("strength", _data[2], _data[11], inputs[2]); + shader_set_f_map("radius", _data[3], _data[12], inputs[3]); shader_set_i("sampleMode", sam); draw_surface_safe(_data[0]); diff --git a/scripts/node_directory_search/node_directory_search.gml b/scripts/node_directory_search/node_directory_search.gml index 15ffd0e97..34e44e096 100644 --- a/scripts/node_directory_search/node_directory_search.gml +++ b/scripts/node_directory_search/node_directory_search.gml @@ -7,7 +7,7 @@ function Node_create_Directory_Search(_x, _y, _group = noone) { } var node = new Node_Directory_Search(_x, _y, _group).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); if(NODE_NEW_MANUAL) node.doUpdate(); return node; @@ -17,7 +17,7 @@ function Node_create_Directory_path(_x, _y, path) { if(!directory_exists(path)) return noone; var node = new Node_Directory_Search(_x, _y, PANEL_GRAPH.getCurrentContext()).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); node.doUpdate(); return node; } @@ -26,19 +26,19 @@ function Node_Directory_Search(_x, _y, _group = noone) : Node(_x, _y, _group) co name = "Directory Search"; color = COLORS.node_blend_input; - inputs[| 0] = nodeValue_Text("Path", self, "") + inputs[0] = nodeValue_Text("Path", self, "") .setDisplay(VALUE_DISPLAY.path_load, { filter: "dir" }); - inputs[| 1] = nodeValue_Text("Extensions", self, ".png"); + inputs[1] = nodeValue_Text("Extensions", self, ".png"); - inputs[| 2] = nodeValue_Enum_Scroll("Type", self, 0, [ "Surface", "Text" ]); + inputs[2] = nodeValue_Enum_Scroll("Type", self, 0, [ "Surface", "Text" ]); - inputs[| 3] = nodeValue_Bool("Recursive", self, false) + inputs[3] = nodeValue_Bool("Recursive", self, false) - outputs[| 0] = nodeValue_Output("Outputs", self, VALUE_TYPE.surface, []) + outputs[0] = nodeValue_Output("Outputs", self, VALUE_TYPE.surface, []) .setVisible(true, true); - outputs[| 1] = nodeValue_Output("Paths", self, VALUE_TYPE.path, [""]) + outputs[1] = nodeValue_Output("Paths", self, VALUE_TYPE.path, [""]) .setVisible(true, true); attribute_surface_depth(); @@ -152,7 +152,7 @@ function Node_Directory_Search(_x, _y, _group = noone) : Node(_x, _y, _group) co updatePaths(); var type = getInputData(2); - var _outsurf = outputs[| 0].getValue(); + var _outsurf = outputs[0].getValue(); if(!is_array(_outsurf)) _outsurf = [ _outsurf ]; var _paths = struct_get_names(paths); @@ -182,15 +182,15 @@ function Node_Directory_Search(_x, _y, _group = noone) : Node(_x, _y, _group) co array_resize(_imgPaths, _ind); array_resize(_outsurf, _ind); - outputs[| 0].setType(type == 0? VALUE_TYPE.surface : VALUE_TYPE.text); - outputs[| 0].setValue(_outsurf); - outputs[| 1].setValue(_imgPaths); + outputs[0].setType(type == 0? VALUE_TYPE.surface : VALUE_TYPE.text); + outputs[0].setValue(_outsurf); + outputs[1].setValue(_imgPaths); } static dropPath = function(path) { if(is_array(path)) path = array_safe_get(path, 0); if(!directory_exists(path)) return; - inputs[| 0].setValue(path); + inputs[0].setValue(path); } } \ No newline at end of file diff --git a/scripts/node_displace/node_displace.gml b/scripts/node_displace/node_displace.gml index 9271d657a..a1c045057 100644 --- a/scripts/node_displace/node_displace.gml +++ b/scripts/node_displace/node_displace.gml @@ -1,57 +1,57 @@ function Node_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Displace"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Surface("Displace map", self); + inputs[1] = nodeValue_Surface("Displace map", self); - inputs[| 2] = nodeValue_Vector("Position", self, [ 1, 0 ] ) + inputs[2] = nodeValue_Vector("Position", self, [ 1, 0 ] ) .setTooltip("Vector to displace pixel by.") .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 3] = nodeValue_Float("Strength", self, 1) + inputs[3] = nodeValue_Float("Strength", self, 1) .setMappable(15); - inputs[| 4] = nodeValue_Float("Mid value", self, 0., "Brightness value to be use as a basis for 'no displacement'.") + inputs[4] = nodeValue_Float("Mid value", self, 0., "Brightness value to be use as a basis for 'no displacement'.") .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Enum_Button("Mode", self, 0, [ "Linear", "Vector", "Angle", "Gradient" ]) + inputs[5] = nodeValue_Enum_Button("Mode", self, 0, [ "Linear", "Vector", "Angle", "Gradient" ]) .setTooltip(@"Use color data for extra information. - Linear: Displace along a single line (defined by the position value). - Vector: Use red as X displacement, green as Y displacement. - Angle: Use red as angle, green as distance. - Gradient: Displace down the brightness value defined by the Displace map."); - inputs[| 6] = nodeValue_Bool("Iterate", self, false, @"If not set, then strength value is multiplied directly to the displacement. + inputs[6] = nodeValue_Bool("Iterate", self, false, @"If not set, then strength value is multiplied directly to the displacement. If set, then strength value control how many times the effect applies on itself."); - inputs[| 7] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + inputs[7] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 8] = nodeValue_Surface("Mask", self); + inputs[8] = nodeValue_Surface("Mask", self); - inputs[| 9] = nodeValue_Float("Mix", self, 1) + inputs[9] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 10] = nodeValue_Bool("Active", self, true); + inputs[10] = nodeValue_Bool("Active", self, true); active_index = 10; - inputs[| 11] = nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Overwrite", "Min", "Max" ]); + inputs[11] = nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Overwrite", "Min", "Max" ]); - inputs[| 12] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[12] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(8); // inputs 13, 14 //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 15] = nodeValue_Surface("Strength map", self) + inputs[15] = nodeValue_Surface("Strength map", self) .setVisible(false, false); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 16] = nodeValue_Bool("Separate axis", self, false); + inputs[16] = nodeValue_Bool("Separate axis", self, false); - inputs[| 17] = nodeValue_Surface("Displace map 2", self); + inputs[17] = nodeValue_Surface("Displace map 2", self); input_display_list = [ 10, 12, ["Surfaces", true], 0, 8, 9, 13, 14, @@ -60,7 +60,7 @@ If set, then strength value control how many times the effect applies on itself. ["Algorithm", true], 6, 11, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); attribute_oversample(); @@ -68,27 +68,27 @@ If set, then strength value control how many times the effect applies on itself. static step = function() { #region __step_mask_modifier(); - inputs[| 3].mappableStep(); + inputs[3].mappableStep(); var _mode = getInputData(5); var _sep = getInputData(16); var _dsp2 = (_mode == 1 || _mode == 2) && _sep; - inputs[| 2].setVisible(_mode == 0); - inputs[| 16].setVisible(_mode == 1 || _mode == 2); - inputs[| 17].setVisible(_dsp2, _dsp2); + inputs[ 2].setVisible(_mode == 0); + inputs[16].setVisible(_mode == 1 || _mode == 2); + inputs[17].setVisible(_dsp2, _dsp2); if(_mode == 1 && _sep) { - inputs[| 1].setName("Displace X"); - inputs[| 17].setName("Displace Y"); + inputs[ 1].setName("Displace X"); + inputs[17].setName("Displace Y"); } else if(_mode == 2 && _sep) { - inputs[| 1].setName("Displace angle"); - inputs[| 17].setName("Displace amount"); + inputs[ 1].setName("Displace angle"); + inputs[17].setName("Displace amount"); } else { - inputs[| 1].setName("Displace map"); + inputs[ 1].setName("Displace map"); } } #endregion @@ -106,7 +106,7 @@ If set, then strength value control how many times the effect applies on itself. shader_set_f("dimension", [ww, hh]); shader_set_f("map_dimension", [mw, mh]); shader_set_f("displace", _data[ 2]); - shader_set_f_map("strength", _data[ 3], _data[15], inputs[| 3]); + shader_set_f_map("strength", _data[ 3], _data[15], inputs[3]); shader_set_f("middle", _data[ 4]); shader_set_i("mode", _data[ 5]); shader_set_i("iterate", _data[ 6]); diff --git a/scripts/node_display_image/node_display_image.gml b/scripts/node_display_image/node_display_image.gml index deb976f7b..2e9af6bef 100644 --- a/scripts/node_display_image/node_display_image.gml +++ b/scripts/node_display_image/node_display_image.gml @@ -7,7 +7,7 @@ function Node_create_Display_Image(_x, _y, _group = noone) { } var node = new Node_Display_Image(_x, _y, _group).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); node.doUpdate(); return node; } @@ -16,7 +16,7 @@ function Node_create_Display_Image_path(_x, _y, path) { if(!file_exists_empty(path)) return noone; var node = new Node_Display_Image(_x, _y, PANEL_GRAPH.getCurrentContext()).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); node.doUpdate(); return node; @@ -26,18 +26,18 @@ function Node_Display_Image(_x, _y, _group = noone) : Node(_x, _y, _group) const name = "Display Image"; auto_height = false; - inputs[| 0] = nodeValue_Text("Path", self, "") + inputs[0] = nodeValue_Text("Path", self, "") .setVisible(false) .setDisplay(VALUE_DISPLAY.path_load, { filter: "image|*.png;*.jpg" }) .rejectArray(); - inputs[| 1] = nodeValue_Vector("Position", self, [ x, y ]) + inputs[1] = nodeValue_Vector("Position", self, [ x, y ]) .rejectArray(); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 1, 1 ]) + inputs[2] = nodeValue_Vector("Scale", self, [ 1, 1 ]) .rejectArray(); - inputs[| 3] = nodeValue_Bool("Smooth transform", self, true) + inputs[3] = nodeValue_Bool("Smooth transform", self, true) .rejectArray(); input_display_list = [ 0, @@ -64,7 +64,7 @@ function Node_Display_Image(_x, _y, _group = noone) : Node(_x, _y, _group) const x = _x; y = _y; - if(inputs[| 1].setValue([ _x, _y ])) + if(inputs[1].setValue([ _x, _y ])) UNDO_HOLDING = true; } #endregion diff --git a/scripts/node_display_text/node_display_text.gml b/scripts/node_display_text/node_display_text.gml index a08c4faf8..f3f467736 100644 --- a/scripts/node_display_text/node_display_text.gml +++ b/scripts/node_display_text/node_display_text.gml @@ -15,27 +15,27 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr draw_scale = 1; init_size = true; - ta_editor = new textArea(TEXTBOX_INPUT.text, function(val) { inputs[| 1].setValue(val); }) + ta_editor = new textArea(TEXTBOX_INPUT.text, function(val) { inputs[1].setValue(val); }) - inputs[| 0] = nodeValue_Color("Color", self, c_white ) + inputs[0] = nodeValue_Color("Color", self, c_white ) .rejectArray(); - inputs[| 1] = nodeValue_Text("Text", self, "Text"); + inputs[1] = nodeValue_Text("Text", self, "Text"); - inputs[| 2] = nodeValue_Enum_Scroll("Style", self, 2, [ "Header", "Sub header", "Normal" ]) + inputs[2] = nodeValue_Enum_Scroll("Style", self, 2, [ "Header", "Sub header", "Normal" ]) .rejectArray(); - inputs[| 3] = nodeValue_Float("Alpha", self, 0.75) + inputs[3] = nodeValue_Float("Alpha", self, 0.75) .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); - inputs[| 4] = nodeValue_Float("Line width", self, -1) + inputs[4] = nodeValue_Float("Line width", self, -1) .rejectArray(); - inputs[| 5] = nodeValue_Vector("Position", self, [ x, y ]) + inputs[5] = nodeValue_Vector("Position", self, [ x, y ]) .rejectArray(); - inputs[| 6] = nodeValue_Float("Line height", self, 0) + inputs[6] = nodeValue_Float("Line height", self, 0) .rejectArray(); input_display_list = [1, @@ -68,7 +68,7 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr x = _x; y = _y; - if(inputs[| 5].setValue([ _x, _y ])) + if(inputs[5].setValue([ _x, _y ])) UNDO_HOLDING = true; } @@ -410,18 +410,18 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr var yy = y * _s + _y; var jun; - if(in_cache_len != array_length(inputDisplayList) || out_cache_len != ds_list_size(outputs)) { + if(in_cache_len != array_length(inputDisplayList) || out_cache_len != array_length(outputs)) { refreshNodeDisplay(); in_cache_len = array_length(inputDisplayList); - out_cache_len = ds_list_size(outputs); + out_cache_len = array_length(outputs); } var _iny = yy + (junction_draw_hei_y * 0.5) * _s; - for( var i = 0, n = ds_list_size(inputs); i < n; i++ ) { - inputs[| i].x = xx; - inputs[| i].y = _iny; + for( var i = 0, n = array_length(inputs); i < n; i++ ) { + inputs[i].x = xx; + inputs[i].y = _iny; } for(var i = 0; i < in_cache_len; i++) { @@ -493,7 +493,7 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr } draw_set_alpha(1); - if(inputs[| 1].value_from == noone && PANEL_GRAPH.node_hovering == self && PANEL_GRAPH.getFocusingNode() == self) { + if(inputs[1].value_from == noone && PANEL_GRAPH.node_hovering == self && PANEL_GRAPH.getFocusingNode() == self) { if(point_in_rectangle(mx, my, xx, yy, xx + ww + 8, yy + hh + 8) && DOUBLE_CLICK) { ta_editor._current_text = txt; ta_editor.activate(); diff --git a/scripts/node_dither/node_dither.gml b/scripts/node_dither/node_dither.gml index e172f1cfb..7401e17df 100644 --- a/scripts/node_dither/node_dither.gml +++ b/scripts/node_dither/node_dither.gml @@ -16,43 +16,43 @@ function Node_Dither(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co name = "Dither"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE)); + inputs[1] = nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE)); - inputs[| 2] = nodeValue_Enum_Scroll("Pattern", self, 0, [ "2 x 2 Bayer", "4 x 4 Bayer", "8 x 8 Bayer", "White Noise", "Custom" ]); + inputs[2] = nodeValue_Enum_Scroll("Pattern", self, 0, [ "2 x 2 Bayer", "4 x 4 Bayer", "8 x 8 Bayer", "White Noise", "Custom" ]); - inputs[| 3] = nodeValue_Surface("Dither map", self) + inputs[3] = nodeValue_Surface("Dither map", self) .setVisible(false); - inputs[| 4] = nodeValue_Float("Contrast", self, 1) + inputs[4] = nodeValue_Float("Contrast", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 5, 0.1] }); - inputs[| 5] = nodeValue_Surface("Contrast map", self); + inputs[5] = nodeValue_Surface("Contrast map", self); - inputs[| 6] = nodeValue_Enum_Button("Mode", self, 0, [ "Color", "Alpha" ]); + inputs[6] = nodeValue_Enum_Button("Mode", self, 0, [ "Color", "Alpha" ]); - inputs[| 7] = nodeValue_Surface("Mask", self); + inputs[7] = nodeValue_Surface("Mask", self); - inputs[| 8] = nodeValue_Float("Mix", self, 1) + inputs[8] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 9] = nodeValue_Bool("Active", self, true); + inputs[9] = nodeValue_Bool("Active", self, true); active_index = 9; - inputs[| 10] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[10] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(7); // inputs 11, 12, - inputs[| 13] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 13].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[13] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[13].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 14] = nodeValue_Bool("Use palette", self, true); + inputs[14] = nodeValue_Bool("Use palette", self, true); - inputs[| 15] = nodeValue_Int("Steps", self, 4) + inputs[15] = nodeValue_Int("Steps", self, 4) .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 0.1] }); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 9, 10, 13, ["Surfaces", true], 0, 7, 8, 11, 12, @@ -70,12 +70,12 @@ function Node_Dither(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co var _mode = getInputData(6); var _use_pal = getInputData(14); - inputs[| 3].setVisible(_type == 4, _type == 4); - inputs[| 1].setVisible(_mode == 0 && _use_pal); - inputs[| 4].setVisible(_mode == 0); - inputs[| 5].setVisible(_mode == 0); + inputs[3].setVisible(_type == 4, _type == 4); + inputs[1].setVisible(_mode == 0 && _use_pal); + inputs[4].setVisible(_mode == 0); + inputs[5].setVisible(_mode == 0); - inputs[| 15].setVisible(!_use_pal); + inputs[15].setVisible(!_use_pal); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_dll/node_dll.gml b/scripts/node_dll/node_dll.gml index 1f91ec226..233fd92a1 100644 --- a/scripts/node_dll/node_dll.gml +++ b/scripts/node_dll/node_dll.gml @@ -2,15 +2,15 @@ function Node_DLL(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "DLL"; setDimension(96, 32 + 24 * 1); - inputs[| 0] = nodeValue_Text("DLL File", self, "") + inputs[0] = nodeValue_Text("DLL File", self, "") .setDisplay(VALUE_DISPLAY.path_load, { filter: "Dynamic-link library (.dll)|*.dll" }) .setVisible(true, false); - inputs[| 1] = nodeValue_Text("Function name", self, ""); + inputs[1] = nodeValue_Text("Function name", self, ""); - inputs[| 2] = nodeValue_Enum_Button("Return type", self, 0, [ "Number", "Buffer" ]); + inputs[2] = nodeValue_Enum_Button("Return type", self, 0, [ "Number", "Buffer" ]); - outputs[| 0] = nodeValue_Output("Return Value", self, VALUE_TYPE.float, 0); + outputs[0] = nodeValue_Output("Return Value", self, VALUE_TYPE.float, 0); ext_cache = ""; ext_function = -1; @@ -43,39 +43,39 @@ function Node_DLL(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { ] static createNewInput = function() { - var index = ds_list_size(inputs); + var index = array_length(inputs); - inputs[| index + 0] = nodeValue_Enum_Button("Parameter type", self, 0, [ "Number", "Buffer" ]); + inputs[index + 0] = nodeValue_Enum_Button("Parameter type", self, 0, [ "Number", "Buffer" ]); - inputs[| index + 1] = nodeValue_Float("Parameter value", self, 0 ) + inputs[index + 1] = nodeValue_Float("Parameter value", self, 0 ) .setVisible(true, true); array_push(input_display_list, index + 0, index + 1); - return [ inputs[| index + 0], inputs[| index + 1] ]; + return [ inputs[index + 0], inputs[index + 1] ]; } setDynamicInput(2, false); static refreshDynamicInput = function() { - var _l = ds_list_create(); + var _l = []; var amo = attributes.size; var _ind = input_fix_len + amo * data_length; - for( var i = 0; i < min(_ind, ds_list_size(inputs)); i++ ) - ds_list_add(_l, inputs[| i]); + for( var i = 0; i < min(_ind, array_length(inputs)); i++ ) + array_push(_l, inputs[i]); var _add = amo - getInputAmount(); - repeat(_add) ds_list_append_array(_l, createNewInput()); + repeat(_add) array_append(_l, createNewInput()); input_display_list = array_clone(input_display_list_raw); - for( var i = input_fix_len; i < ds_list_size(_l); i++ ) { - _l[| i].index = i; + for( var i = input_fix_len; i < array_length(_l); i++ ) { + _l[i].index = i; array_push(input_display_list, i); } - ds_list_destroy(inputs); + inputs = _l; getJunctionList(); @@ -97,7 +97,7 @@ function Node_DLL(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var _ind = input_fix_len + i * data_length; var _typ = getInputData(_ind + 0); - inputs[| _ind + 1].setType(val_types[_typ]); + inputs[_ind + 1].setType(val_types[_typ]); ts[i] = _typ? ty_string : ty_real; var _val = getInputData(_ind + 1); @@ -163,11 +163,11 @@ function Node_DLL(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { } } - outputs[| 0].setType(val_types[_fnS.type]); + outputs[0].setType(val_types[_fnS.type]); if(_fnS.type) _res = buffer_from_string(_res); - outputs[| 0].setValue(_res); + outputs[0].setValue(_res); } diff --git a/scripts/node_dust/node_dust.gml b/scripts/node_dust/node_dust.gml index 091bbb957..26701dbc5 100644 --- a/scripts/node_dust/node_dust.gml +++ b/scripts/node_dust/node_dust.gml @@ -79,9 +79,9 @@ function __Dust(x, y, size = 8) constructor { function Node_Dust(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Dust"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Output", false], 0, @@ -95,9 +95,9 @@ function Node_Dust(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static update = function() { var _dim = getInputData(0); - var _outSurf = outputs[| 0].getValue(); + var _outSurf = outputs[0].getValue(); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1]); - outputs[| 0].setValue(_outSurf); + outputs[0].setValue(_outSurf); if(IS_FIRST_FRAME) { dusts = [ new __Dust( 0, _dim[1] / 2 ) ]; diff --git a/scripts/node_dynasurf/node_dynasurf.gml b/scripts/node_dynasurf/node_dynasurf.gml index ae50190ef..63e05546e 100644 --- a/scripts/node_dynasurf/node_dynasurf.gml +++ b/scripts/node_dynasurf/node_dynasurf.gml @@ -5,44 +5,44 @@ function Node_DynaSurf(_x, _y, _group = noone) : Node_Collection(_x, _y, _group) reset_all_child = true; draw_input_overlay = false; - outputs[| 0] = nodeValue_Output("dynaSurf", self, VALUE_TYPE.dynaSurface, noone); + outputs[0] = nodeValue_Output("dynaSurf", self, VALUE_TYPE.dynaSurface, noone); - custom_input_index = ds_list_size(inputs); - custom_output_index = ds_list_size(outputs); + custom_input_index = array_length(inputs); + custom_output_index = array_length(outputs); if(NODE_NEW_MANUAL) { #region var _input = nodeBuild("Node_DynaSurf_In", -256, -32, self); var _output = nodeBuild("Node_DynaSurf_Out", 256, -32, self); - _output.inputs[| 0].setFrom(_input.outputs[| 0]); + _output.inputs[0].setFrom(_input.outputs[0]); var _yy = -32 + 24; - var _nx = nodeBuild("Node_PCX_fn_var", 128, _yy, self).setDisplayName("x"); _output.inputs[| 1].setFrom(_nx .outputs[| 0]); _yy += 24; - var _ny = nodeBuild("Node_PCX_fn_var", 128, _yy, self).setDisplayName("y"); _output.inputs[| 2].setFrom(_ny .outputs[| 0]); _yy += 24; - var _nsx = nodeBuild("Node_PCX_fn_var", 128, _yy, self).setDisplayName("sx"); _output.inputs[| 3].setFrom(_nsx .outputs[| 0]); _yy += 24; - var _nsy = nodeBuild("Node_PCX_fn_var", 128, _yy, self).setDisplayName("sy"); _output.inputs[| 4].setFrom(_nsy .outputs[| 0]); _yy += 24; - var _nang = nodeBuild("Node_PCX_fn_var", 128, _yy, self).setDisplayName("angle"); _output.inputs[| 5].setFrom(_nang.outputs[| 0]); _yy += 24; - var _nclr = nodeBuild("Node_PCX_fn_var", 128, _yy, self).setDisplayName("color"); _output.inputs[| 6].setFrom(_nclr.outputs[| 0]); _yy += 24; - var _nalp = nodeBuild("Node_PCX_fn_var", 128, _yy, self).setDisplayName("alpha"); _output.inputs[| 7].setFrom(_nalp.outputs[| 0]); _yy += 24; + var _nx = nodeBuild("Node_PCX_fn_var", 128, _yy, self).setDisplayName("x"); _output.inputs[1].setFrom(_nx .outputs[0]); _yy += 24; + var _ny = nodeBuild("Node_PCX_fn_var", 128, _yy, self).setDisplayName("y"); _output.inputs[2].setFrom(_ny .outputs[0]); _yy += 24; + var _nsx = nodeBuild("Node_PCX_fn_var", 128, _yy, self).setDisplayName("sx"); _output.inputs[3].setFrom(_nsx .outputs[0]); _yy += 24; + var _nsy = nodeBuild("Node_PCX_fn_var", 128, _yy, self).setDisplayName("sy"); _output.inputs[4].setFrom(_nsy .outputs[0]); _yy += 24; + var _nang = nodeBuild("Node_PCX_fn_var", 128, _yy, self).setDisplayName("angle"); _output.inputs[5].setFrom(_nang.outputs[0]); _yy += 24; + var _nclr = nodeBuild("Node_PCX_fn_var", 128, _yy, self).setDisplayName("color"); _output.inputs[6].setFrom(_nclr.outputs[0]); _yy += 24; + var _nalp = nodeBuild("Node_PCX_fn_var", 128, _yy, self).setDisplayName("alpha"); _output.inputs[7].setFrom(_nalp.outputs[0]); _yy += 24; - _nsx.inputs[| 0].setValue(1); - _nsy.inputs[| 0].setValue(1); - _nclr.inputs[| 0].setValue(c_white); - _nalp.inputs[| 0].setValue(1); + _nsx.inputs[0].setValue(1); + _nsy.inputs[0].setValue(1); + _nclr.inputs[0].setValue(c_white); + _nalp.inputs[0].setValue(1); _yy += 64; var _outW = nodeBuild("Node_DynaSurf_Out_Width", 256, _yy, self) var _surW = nodeBuild("Node_PCX_fn_Surface_Width", 128, _yy, self) - _surW.inputs[| 0].setFrom(_input.outputs[| 0]); - _outW.inputs[| 0].setFrom(_surW.outputs[| 0]); + _surW.inputs[0].setFrom(_input.outputs[0]); + _outW.inputs[0].setFrom(_surW.outputs[0]); _yy += 64; var _outH = nodeBuild("Node_DynaSurf_Out_Height", 256, _yy, self) var _surH = nodeBuild("Node_PCX_fn_Surface_Height", 128, _yy, self) - _surH.inputs[| 0].setFrom(_input.outputs[| 0]); - _outH.inputs[| 0].setFrom(_surH.outputs[| 0]); + _surH.inputs[0].setFrom(_input.outputs[0]); + _outH.inputs[0].setFrom(_surH.outputs[0]); RENDER_ALL } #endregion @@ -77,14 +77,14 @@ function Node_DynaSurf(_x, _y, _group = noone) : Node_Collection(_x, _y, _group) var _n = nodes[i]; if(is_instanceof(_n, Node_DynaSurf_Out)) - _dyna.drawFn = _n.outputs[| 0].getValue(); + _dyna.drawFn = _n.outputs[0].getValue(); if(is_instanceof(_n, Node_DynaSurf_Out_Width)) - _dyna.widthFn = _n.outputs[| 0].getValue(); + _dyna.widthFn = _n.outputs[0].getValue(); if(is_instanceof(_n, Node_DynaSurf_Out_Height)) - _dyna.heightFn = _n.outputs[| 0].getValue(); + _dyna.heightFn = _n.outputs[0].getValue(); } - outputs[| 0].setValue(_dyna); + outputs[0].setValue(_dyna); } #endregion static update = function() {} @@ -93,7 +93,7 @@ function Node_DynaSurf(_x, _y, _group = noone) : Node_Collection(_x, _y, _group) function dynaSurf_output_getNextNode() { #region if(!is_instanceof(group, Node_DynaSurf)) return []; - var junc = group.outputs[| 0]; + var junc = group.outputs[0]; var nodes = []; for(var j = 0; j < array_length(junc.value_to); j++) { var _to = junc.value_to[j]; diff --git a/scripts/node_dynasurf_in/node_dynasurf_in.gml b/scripts/node_dynasurf_in/node_dynasurf_in.gml index 4bfeeb1cf..80f825397 100644 --- a/scripts/node_dynasurf_in/node_dynasurf_in.gml +++ b/scripts/node_dynasurf_in/node_dynasurf_in.gml @@ -8,20 +8,20 @@ function Node_DynaSurf_In(_x, _y, _group = noone) : Node(_x, _y, _group) constru inParent = undefined; - outputs[| 0] = nodeValue_Output("Value", self, VALUE_TYPE.PCXnode, noone); + outputs[0] = nodeValue_Output("Value", self, VALUE_TYPE.PCXnode, noone); static createInput = function() { #region if(group == noone || !is_struct(group)) return noone; if(!is_undefined(inParent)) - ds_list_remove(group.inputs, inParent); + array_remove(group.inputs, inParent); inParent = nodeValue_Surface("Value", group) .uncache() .setVisible(true, true); inParent.from = self; - ds_list_add(group.inputs, inParent); + array_push(group.inputs, inParent); group.refreshNodeDisplay(); group.sortIO(); @@ -43,7 +43,7 @@ function Node_DynaSurf_In(_x, _y, _group = noone) : Node(_x, _y, _group) constru if(is_undefined(inParent)) return; var _val = inParent.getValue(); - outputs[| 0].setValue(new __funcTree("", _val)); + outputs[0].setValue(new __funcTree("", _val)); } #endregion static postDeserialize = function() { #region diff --git a/scripts/node_dynasurf_out/node_dynasurf_out.gml b/scripts/node_dynasurf_out/node_dynasurf_out.gml index 0b492bc93..4b804b807 100644 --- a/scripts/node_dynasurf_out/node_dynasurf_out.gml +++ b/scripts/node_dynasurf_out/node_dynasurf_out.gml @@ -5,23 +5,23 @@ function Node_DynaSurf_Out(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) co manual_deletable = false; destroy_when_upgroup = true; - inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - inputs[| 1] = nodeValue("x", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[1] = nodeValue("x", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - inputs[| 2] = nodeValue("y", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[2] = nodeValue("y", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - inputs[| 3] = nodeValue("sx", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[3] = nodeValue("sx", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - inputs[| 4] = nodeValue("sy", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[4] = nodeValue("sy", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - inputs[| 5] = nodeValue("angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[5] = nodeValue("angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - inputs[| 6] = nodeValue("color", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[6] = nodeValue("color", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - inputs[| 7] = nodeValue("alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[7] = nodeValue("alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - outputs[| 0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone) + outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone) .setVisible(false); input_display_list = [ 0, @@ -46,7 +46,7 @@ function Node_DynaSurf_Out(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) co var _clr = getInputData(6); var _alp = getInputData(7); - outputs[| 0].setValue(new __funcTree("draw", [ _surf, _x, _y, _sx, _sy, _ang, _clr, _alp ])); + outputs[0].setValue(new __funcTree("draw", [ _surf, _x, _y, _sx, _sy, _ang, _clr, _alp ])); if(group) group.setDynamicSurface(); } diff --git a/scripts/node_dynasurf_out_height/node_dynasurf_out_height.gml b/scripts/node_dynasurf_out_height/node_dynasurf_out_height.gml index ce0b2fa3a..8734cd5fd 100644 --- a/scripts/node_dynasurf_out_height/node_dynasurf_out_height.gml +++ b/scripts/node_dynasurf_out_height/node_dynasurf_out_height.gml @@ -5,9 +5,9 @@ function Node_DynaSurf_Out_Height(_x, _y, _group = noone) : Node_PCX(_x, _y, _gr manual_deletable = false; destroy_when_upgroup = true; - inputs[| 0] = nodeValue("Height", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[0] = nodeValue("Height", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - outputs[| 0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone) + outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone) .setVisible(false); input_display_list = [ 0 ]; @@ -21,7 +21,7 @@ function Node_DynaSurf_Out_Height(_x, _y, _group = noone) : Node_PCX(_x, _y, _gr static update = function() { var _h = getInputData(0); - outputs[| 0].setValue(_h); + outputs[0].setValue(_h); if(group) group.setDynamicSurface(); } diff --git a/scripts/node_dynasurf_out_width/node_dynasurf_out_width.gml b/scripts/node_dynasurf_out_width/node_dynasurf_out_width.gml index b5ce92058..c34635ec7 100644 --- a/scripts/node_dynasurf_out_width/node_dynasurf_out_width.gml +++ b/scripts/node_dynasurf_out_width/node_dynasurf_out_width.gml @@ -5,9 +5,9 @@ function Node_DynaSurf_Out_Width(_x, _y, _group = noone) : Node_PCX(_x, _y, _gro manual_deletable = false; destroy_when_upgroup = true; - inputs[| 0] = nodeValue("Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + inputs[0] = nodeValue("Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); - outputs[| 0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone) + outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone) .setVisible(false); input_display_list = [ 0 ]; @@ -21,7 +21,7 @@ function Node_DynaSurf_Out_Width(_x, _y, _group = noone) : Node_PCX(_x, _y, _gro static update = function() { var _w = getInputData(0); - outputs[| 0].setValue(_w); + outputs[0].setValue(_w); if(group) group.setDynamicSurface(); } diff --git a/scripts/node_edge_detect/node_edge_detect.gml b/scripts/node_edge_detect/node_edge_detect.gml index bd17e0e8f..c5b917d41 100644 --- a/scripts/node_edge_detect/node_edge_detect.gml +++ b/scripts/node_edge_detect/node_edge_detect.gml @@ -6,26 +6,26 @@ function Node_Edge_Detect(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou uniform_filter = shader_get_uniform(shader, "filter"); uniform_sam = shader_get_uniform(shader, "sampleMode"); - inputs[| 0] = nodeValue_Surface("Surface in self); + inputs[0] = nodeValue_Surface("Surface in self"); - inputs[| 1] = nodeValue_Enum_Scroll("Algorithm", self, 0, ["Sobel", "Prewitt", "Laplacian", "Neighbor max diff"] ); + inputs[1] = nodeValue_Enum_Scroll("Algorithm", self, 0, ["Sobel", "Prewitt", "Laplacian", "Neighbor max diff"] ); - inputs[| 2] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + inputs[2] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 3] = nodeValue_Surface("Mask", self); + inputs[3] = nodeValue_Surface("Mask", self); - inputs[| 4] = nodeValue_Float("Mix", self, 1) + inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Bool("Active", self, true); + inputs[5] = nodeValue_Bool("Active", self, true); active_index = 5; - inputs[| 6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(3); // inputs 7, 8 - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 5, 6, ["Surfaces", true], 0, 3, 4, 7, 8, diff --git a/scripts/node_edge_shade/node_edge_shade.gml b/scripts/node_edge_shade/node_edge_shade.gml index 141e32a50..02d7e6a1f 100644 --- a/scripts/node_edge_shade/node_edge_shade.gml +++ b/scripts/node_edge_shade/node_edge_shade.gml @@ -1,23 +1,23 @@ function Node_Edge_Shade(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Edge Shade"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Bool("Active", self, true); + inputs[1] = nodeValue_Bool("Active", self, true); active_index = 1; - inputs[| 2] = nodeValue_Gradient("Colors", self, new gradientObject( [ cola(c_black), cola(c_white) ] )) + inputs[2] = nodeValue_Gradient("Colors", self, new gradientObject( [ cola(c_black), cola(c_white) ] )) .setMappable(3); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 3] = nodeValueMap("Gradient map", self); + inputs[3] = nodeValueMap("Gradient map", self); - inputs[| 4] = nodeValueGradientRange("Gradient map range", self, inputs[| 2]); + inputs[4] = nodeValueGradientRange("Gradient map range", self, inputs[2]); ////////////////////////////////////////////////////////////////////////////////// - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 1, ["Surfaces", false], 0, @@ -29,7 +29,7 @@ function Node_Edge_Shade(_x, _y, _group = noone) : Node_Processor(_x, _y, _group attribute_surface_depth(); static step = function() { #region - inputs[| 2].mappableStep(); + inputs[2].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region @@ -54,7 +54,7 @@ function Node_Edge_Shade(_x, _y, _group = noone) : Node_Processor(_x, _y, _group surface_set_shader(_outSurf, sh_edge_shade_apply); shader_set_f("dimension", _dim); - shader_set_gradient(_data[2], _data[3], _data[4], inputs[| 2]); + shader_set_gradient(_data[2], _data[3], _data[4], inputs[2]); draw_surface_safe(temp_surface[1]); surface_reset_shader(); diff --git a/scripts/node_equation/node_equation.gml b/scripts/node_equation/node_equation.gml index 0a3c5669d..3f0ad92a9 100644 --- a/scripts/node_equation/node_equation.gml +++ b/scripts/node_equation/node_equation.gml @@ -3,7 +3,7 @@ function Node_create_Equation(_x, _y, _group = noone, _param = {}) { var node = new Node_Equation(_x, _y, _group).skipDefault(); if(query == "") return node; - node.inputs[| 0].setValue(query); + node.inputs[0].setValue(query); var ind = 1; var amo = string_length(query); var str = ""; @@ -24,7 +24,7 @@ function Node_create_Equation(_x, _y, _group = noone, _param = {}) { array_push_unique(vars, str); for( var i = 0, n = array_length(vars); i < n; i++ ) - node.inputs[| 1 + i * 2].setValue(vars[i]); + node.inputs[1 + i * 2].setValue(vars[i]); return node; } @@ -39,11 +39,11 @@ function Node_Equation(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attributes.size = 0; - inputs[| 0] = nodeValue_Text("Equation", self, ""); + inputs[0] = nodeValue_Text("Equation", self, ""); - outputs[| 0] = nodeValue_Output("Result", self, VALUE_TYPE.float, 0); + outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.float, 0); - argument_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { #region + argument_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { argument_renderer.x = _x; argument_renderer.y = _y; argument_renderer.w = _w; @@ -68,17 +68,17 @@ function Node_Equation(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var hh = bh + ui(16); var _th = TEXTBOX_HEIGHT; - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { var _h = 0; - var _jName = inputs[| i + 0]; + var _jName = inputs[i + 0]; _jName.editWidget.setFocusHover(_focus, _hover); _jName.editWidget.draw(tx, ty, ui(128), _th, _jName.showValue(), _m, _jName.display_type); draw_set_text(f_p1, fa_center, fa_top, COLORS._main_text_sub); draw_text_add(tx + ui(128 + 12), ty + ui(6), "="); - var _jValue = inputs[| i + 1]; + var _jValue = inputs[i + 1]; _jValue.editWidget.setFocusHover(_focus, _hover); _jValue.editWidget.draw(tx + ui(128 + 24), ty, _w - ui(128 + 24 + 16), _th, _jValue.showValue(), _m); @@ -89,12 +89,12 @@ function Node_Equation(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) argument_renderer.h = hh; return hh; - }); #endregion + }); - argument_renderer.register = function(parent = noone) { #region - for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) - inputs[| i].editWidget.register(parent); - } #endregion + argument_renderer.register = function(parent = noone) { + for( var i = input_fix_len; i < array_length(inputs); i++ ) + inputs[i].editWidget.register(parent); + } input_display_list = [ ["Function", false], 0, @@ -103,56 +103,59 @@ function Node_Equation(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ] static createNewInput = function() { - var index = ds_list_size(inputs); - inputs[| index + 0] = nodeValue_Text("Argument name", self, "" ) + var index = array_length(inputs); + inputs[index + 0] = nodeValue_Text("Argument name", self, "" ) .setDisplay(VALUE_DISPLAY.text_box); - inputs[| index + 1] = nodeValue_Float("Argument value", self, 0 ) + inputs[index + 1] = nodeValue_Float("Argument value", self, 0 ) .setVisible(true, true); - return inputs[| index + 0]; + return inputs[index + 0]; } setDynamicInput(2, false); - static refreshDynamicInput = function() { #region - var _l = ds_list_create(); + static refreshDynamicInput = function() { + var _l = []; var amo = attributes.size; for(var i = 0; i < input_fix_len; i++ ) - ds_list_add(_l, inputs[| i]); + array_push(_l, inputs[i]); for(var i = 0; i < amo; i++ ) { var _i = input_fix_len + i * data_length; - if(_i >= ds_list_size(_l)) + if(_i >= array_length(_l)) createNewInput(); for(var j = 0; j < data_length; j++) - ds_list_add(_l, inputs[| _i + j]); + array_push(_l, inputs[_i + j]); } input_display_list = array_clone(input_display_list_raw); - for( var i = input_fix_len; i < ds_list_size(_l); i++ ) { - _l[| i].index = i; + for( var i = input_fix_len; i < array_length(_l); i++ ) { + _l[i].index = i; array_push(input_display_list, i); } - ds_list_destroy(inputs); + for( var i = input_fix_len; i < array_length(_l) - 1; i += 2 ) + inputs[i + 1].setName(inputs[i].getValue()); + + inputs = _l; getJunctionList(); setHeight(); - } #endregion + } - static onValueUpdate = function(index = 0) { #region + static onValueUpdate = function(index = 0) { if(LOADING || APPENDING) return; if(safe_mod(index - input_fix_len, data_length) == 0) //Variable name - inputs[| index + 1].name = getInputData(index); - } #endregion + inputs[index + 1].setName(inputs[index].getValue()); + } - static processData = function(_output, _data, _output_index, _array_index = 0) { #region + static processData = function(_output, _data, _output_index, _array_index = 0) { var eq = _data[0]; var params = {}; @@ -172,16 +175,16 @@ function Node_Equation(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) if(_tree == noone) return noone; return _tree.tree.eval(params); - } #endregion + } - static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); var str = getInputData(0); var bbox = drawGetBbox(xx, yy, _s); var ss = string_scale(str, bbox.w, bbox.h); draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0); - } #endregion + } static doApplyDeserialize = function() { refreshDynamicInput(); } } \ No newline at end of file diff --git a/scripts/node_erode/node_erode.gml b/scripts/node_erode/node_erode.gml index 0e3a22670..e50824e26 100644 --- a/scripts/node_erode/node_erode.gml +++ b/scripts/node_erode/node_erode.gml @@ -1,31 +1,31 @@ function Node_Erode(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Erode"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Int("Width", self, 1) + inputs[1] = nodeValue_Int("Width", self, 1) .setValidator(VV_min(0)) .setMappable(10); - inputs[| 2] = nodeValue_Bool("Preserve border",self, false); + inputs[2] = nodeValue_Bool("Preserve border",self, false); - inputs[| 3] = nodeValue_Bool("Use alpha", self, true); + inputs[3] = nodeValue_Bool("Use alpha", self, true); - inputs[| 4] = nodeValue_Surface("Mask", self); + inputs[4] = nodeValue_Surface("Mask", self); - inputs[| 5] = nodeValue_Float("Mix", self, 1) + inputs[5] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 6] = nodeValue_Bool("Active", self, true); + inputs[6] = nodeValue_Bool("Active", self, true); active_index = 6; - inputs[| 7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(4); // inputs 8, 9, ///////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 10] = nodeValue_Surface("Width map", self) + inputs[10] = nodeValue_Surface("Width map", self) .setVisible(false, false); ///////////////////////////////////////////////////////////////////////////////////////////////////// @@ -35,21 +35,21 @@ function Node_Erode(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con ["Erode", false], 1, 10, 2, 3, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static step = function() { #region __step_mask_modifier(); - inputs[| 1].mappableStep(); + inputs[1].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { surface_set_shader(_outSurf, sh_erode); shader_set_f("dimension", surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0])); - shader_set_f_map("size" , _data[1], _data[10], inputs[| 1]); + shader_set_f_map("size" , _data[1], _data[10], inputs[1]); shader_set_i("border" , _data[2]); shader_set_i("alpha" , _data[3]); draw_surface_safe(_data[0]); diff --git a/scripts/node_export/node_export.gml b/scripts/node_export/node_export.gml index 86706a0ff..d2064ebff 100644 --- a/scripts/node_export/node_export.gml +++ b/scripts/node_export/node_export.gml @@ -12,7 +12,7 @@ MPEG-4 (.mp4)|*.mp4", } var node = new Node_Export(_x, _y, _group).skipDefault(); - node.inputs[| 1].setValue(path); + node.inputs[1].setValue(path); if(NODE_NEW_MANUAL) node.extensionCheck(); return node; @@ -46,24 +46,24 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor _format_still = { filter: "Portable Network Graphics (.png)|*.png|Joint Photographic Experts Group (.jpg)|*.jpg" }; _format_anim = { filter: "Graphics Interchange Format (.gif)|*.gif|Animated WebP (.webp)|*.webp" }; - inputs[| 0] = nodeValue_Surface("Surface", self); + inputs[0] = nodeValue_Surface("Surface", self); - inputs[| 1] = nodeValue_Text("Paths", self, "") + inputs[1] = nodeValue_Text("Paths", self, "") .setDisplay(VALUE_DISPLAY.path_save, _format_still) .setVisible(true); - inputs[| 2] = nodeValue_Text("Template", self, "%d%n") + inputs[2] = nodeValue_Text("Template", self, "%d%n") .rejectArray(); - inputs[| 2].editWidget.format = TEXT_AREA_FORMAT.path_template; - inputs[| 2].editWidget.auto_update = true; + inputs[2].editWidget.format = TEXT_AREA_FORMAT.path_template; + inputs[2].editWidget.auto_update = true; format_single = ["Single image", "Image sequence", "Animation"]; format_array = ["Multiple images", "Image sequences", "Animations"]; - inputs[| 3] = nodeValue_Enum_Scroll("Type", self, 0, { data: format_single, update_hover: false }) + inputs[3] = nodeValue_Enum_Scroll("Type", self, 0, { data: format_single, update_hover: false }) .rejectArray(); - inputs[| 4] = nodeValue_Int("Template guides", self, 0) + inputs[4] = nodeValue_Int("Template guides", self, 0) .setDisplay(VALUE_DISPLAY.label, @"%d Directory %1d Goes up 1 level @@ -71,47 +71,47 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor %f Frame %i Array index" ); - inputs[| 5] = nodeValue_Bool("Loop", self, true) + inputs[5] = nodeValue_Bool("Loop", self, true) .setVisible(false) .rejectArray(); - inputs[| 6] = nodeValue_Bool("Frame optimization", self, false) + inputs[6] = nodeValue_Bool("Frame optimization", self, false) .setVisible(false) .rejectArray(); - inputs[| 7] = nodeValue_Float("Color merge", self, 0.02) + inputs[7] = nodeValue_Float("Color merge", self, 0.02) .setDisplay(VALUE_DISPLAY.slider) .setVisible(false) .rejectArray(); - inputs[| 8] = nodeValue_Int("Framerate", self, 30) + inputs[8] = nodeValue_Int("Framerate", self, 30) .rejectArray(); format_image = [ ".png", ".jpg", ".webp" ]; format_animation = [ ".gif", ".apng", ".webp", ".mp4" ]; - inputs[| 9] = nodeValue_Enum_Scroll("Format", self, 0, { data: format_image, update_hover: false }) + inputs[9] = nodeValue_Enum_Scroll("Format", self, 0, { data: format_image, update_hover: false }) .rejectArray(); - inputs[| 10] = nodeValue_Float("Quality", self, 23) + inputs[10] = nodeValue_Float("Quality", self, 23) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 100, 0.1 ] }) .rejectArray(); - inputs[| 11] = nodeValue_Int("Sequence begin", self, 0); + inputs[11] = nodeValue_Int("Sequence begin", self, 0); - inputs[| 12] = nodeValue_Slider_Range("Frame range", self, [0, -1], { range: [0, TOTAL_FRAMES, 0.1] }); + inputs[12] = nodeValue_Slider_Range("Frame range", self, [0, -1], { range: [0, TOTAL_FRAMES, 0.1] }); png_format = [ "INDEX4", "INDEX8", "Default (PNG32)" ]; - inputs[| 13] = nodeValue_Enum_Scroll("Subformat", self, 2, { data: png_format, update_hover: false }); + inputs[13] = nodeValue_Enum_Scroll("Subformat", self, 2, { data: png_format, update_hover: false }); - inputs[| 14] = nodeValue_Int("Frame step", self, 1); + inputs[14] = nodeValue_Int("Frame step", self, 1); - inputs[| 15] = nodeValue_Bool("Custom Range", self, false) + inputs[15] = nodeValue_Bool("Custom Range", self, false) .rejectArray(); - inputs[| 16] = nodeValue_Bool("Export on Save", self, false) + inputs[16] = nodeValue_Bool("Export on Save", self, false) - outputs[| 0] = nodeValue_Output("Preview", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Preview", self, VALUE_TYPE.surface, noone); template_guide = [ ["%d", "Directory"], @@ -131,7 +131,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var _ext = getInputData(9); var path = pathString(rawpath); var pathA = pathString(rawpath,, true); - path = string_replace(path, ".png", array_safe_get_fast(inputs[| 9].display_data.data, _ext, "")); + path = string_replace(path, ".png", array_safe_get_fast(inputs[ 9].display_data.data, _ext, "")); draw_set_text(f_p1, fa_left, fa_top, COLORS._main_text); var _th = ui(12) + string_height_ext(path, -1, _tw - ui(16), true); @@ -236,32 +236,32 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var form = getInputData(3); if(_index == 3) { - if(NOT_LOAD) inputs[| 9].setValue(0); + if(NOT_LOAD) inputs[9].setValue(0); switch(form) { case 0 : case 1 : - inputs[| 1].display_data = _format_still; + inputs[1].display_data = _format_still; break; case 2 : - inputs[| 1].display_data = _format_anim; + inputs[1].display_data = _format_anim; break; } } if(NOT_LOAD && _index == 3 && form == 1) - inputs[| 2].setValue("%d%n%3f%i"); + inputs[2].setValue("%d%n%3f%i"); if(NOT_LOAD && _index == 1) { var _path = getInputData(1); var _ext = filename_ext(_path); switch(_ext) { - case ".png" : inputs[| 9].setValue(0); break; - case ".jpg" : inputs[| 9].setValue(1); break; + case ".png" : inputs[9].setValue(0); break; + case ".jpg" : inputs[9].setValue(1); break; - case ".gif" : inputs[| 9].setValue(0); break; - case ".webp" : inputs[| 9].setValue(1); break; + case ".gif" : inputs[9].setValue(0); break; + case ".webp" : inputs[9].setValue(1); break; } } } #endregion @@ -272,21 +272,21 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor switch(_ext) { case ".png" : - inputs[| 3].setValue(0); - inputs[| 9].setValue(0); + inputs[3].setValue(0); + inputs[9].setValue(0); break; case ".jpg" : - inputs[| 3].setValue(0); - inputs[| 9].setValue(1); + inputs[3].setValue(0); + inputs[9].setValue(1); break; case ".gif" : - inputs[| 3].setValue(2); - inputs[| 9].setValue(0); + inputs[3].setValue(2); + inputs[9].setValue(0); break; case ".webp" : - inputs[| 3].setValue(2); - inputs[| 9].setValue(1); + inputs[3].setValue(2); + inputs[9].setValue(1); break; } } #endregion @@ -475,7 +475,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } var _e = getInputData(9); - var _ext = array_safe_get_fast(inputs[| 9].display_data.data, _e, ".png"); + var _ext = array_safe_get_fast(inputs[9].display_data.data, _e, ".png"); if(_array) array_push(s, ["ext", _ext]); else s += _ext; @@ -744,14 +744,14 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var expo = getInputData(16); if(is_array(surf)) { - inputs[| 3].display_data.data = format_array; - inputs[| 3].editWidget.data_list = format_array; + inputs[3].display_data.data = format_array; + inputs[3].editWidget.data_list = format_array; } else { - inputs[| 3].display_data.data = format_single; - inputs[| 3].editWidget.data_list = format_single; + inputs[3].display_data.data = format_single; + inputs[3].editWidget.data_list = format_single; } - outputs[| 0].setValue(surf); + outputs[0].setValue(surf); var anim = getInputData(3); // single, sequence, animation var extn = getInputData(9); @@ -760,59 +760,59 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor if(expo && anim == NODE_EXPORT_FORMAT.single && IS_SAVING) doInspectorAction(); - inputs[| 11].setVisible(anim == 1); - inputs[| 16].setVisible(anim == 0); + inputs[11].setVisible(anim == 1); + inputs[16].setVisible(anim == 0); - inputs[| 12].editWidget.minn = FIRST_FRAME + 1; - inputs[| 12].editWidget.maxx = LAST_FRAME + 1; - if(!user) inputs[| 12].setValueDirect([ FIRST_FRAME + 1, LAST_FRAME + 1], noone, false, 0, false); + inputs[12].editWidget.minn = FIRST_FRAME + 1; + inputs[12].editWidget.maxx = LAST_FRAME + 1; + if(!user) inputs[12].setValueDirect([ FIRST_FRAME + 1, LAST_FRAME + 1], noone, false, 0, false); - inputs[| 14].setVisible(anim > 0); + inputs[14].setVisible(anim > 0); if(anim == NODE_EXPORT_FORMAT.animation) { var _fmt = array_safe_get_fast(format_animation, extn); - inputs[| 5].setVisible(_fmt == ".gif"); - inputs[| 6].setVisible(_fmt == ".gif"); - inputs[| 7].setVisible(_fmt == ".gif"); - inputs[| 8].setVisible(true); + inputs[ 5].setVisible(_fmt == ".gif"); + inputs[ 6].setVisible(_fmt == ".gif"); + inputs[ 7].setVisible(_fmt == ".gif"); + inputs[ 8].setVisible(true); - inputs[| 9].display_data.data = format_animation; - inputs[| 9].editWidget.data_list = format_animation; + inputs[ 9].display_data.data = format_animation; + inputs[ 9].editWidget.data_list = format_animation; - inputs[| 13].setVisible(false); + inputs[13].setVisible(false); if(_fmt == ".mp4") { - inputs[| 10].setName("CRF value"); - inputs[| 10].tooltip = "Quality of the output, with 0 being the highest (and largest file size), and 51 being the lowest."; + inputs[10].setName("CRF value"); + inputs[10].tooltip = "Quality of the output, with 0 being the highest (and largest file size), and 51 being the lowest."; - inputs[| 10].setVisible(true); - inputs[| 10].editWidget.minn = 0; - inputs[| 10].editWidget.maxx = 51; + inputs[10].setVisible(true); + inputs[10].editWidget.minn = 0; + inputs[10].editWidget.maxx = 51; } else - inputs[| 10].setVisible(false); + inputs[10].setVisible(false); } else { var _fmt = array_safe_get_fast(format_image, extn); - inputs[| 5].setVisible(false); - inputs[| 6].setVisible(false); - inputs[| 7].setVisible(false); - inputs[| 8].setVisible(false); + inputs[ 5].setVisible(false); + inputs[ 6].setVisible(false); + inputs[ 7].setVisible(false); + inputs[ 8].setVisible(false); - inputs[| 9].display_data.data = format_image; - inputs[| 9].editWidget.data_list = format_image; + inputs[ 9].display_data.data = format_image; + inputs[ 9].editWidget.data_list = format_image; - inputs[| 13].setVisible(_fmt == ".png"); + inputs[13].setVisible(_fmt == ".png"); if(_fmt == ".jpg" || _fmt == ".webp") { - inputs[| 10].setName("Quality"); - inputs[| 10].tooltip = "Quality of the output."; + inputs[10].setName("Quality"); + inputs[10].tooltip = "Quality of the output."; - inputs[| 10].setVisible(true); - inputs[| 10].editWidget.minn = 0; - inputs[| 10].editWidget.maxx = 100; + inputs[10].setVisible(true); + inputs[10].editWidget.minn = 0; + inputs[10].editWidget.maxx = 100; } else - inputs[| 10].setVisible(false); + inputs[10].setVisible(false); } if(render_process_id != 0) { diff --git a/scripts/node_feedback/node_feedback.gml b/scripts/node_feedback/node_feedback.gml index 72735783f..8bbef2af3 100644 --- a/scripts/node_feedback/node_feedback.gml +++ b/scripts/node_feedback/node_feedback.gml @@ -10,15 +10,15 @@ function Node_Feedback(_x, _y, _group = noone) : Node_Collection(_x, _y, _group) var input = nodeBuild("Node_Feedback_Input", -256, -32, self); var output = nodeBuild("Node_Feedback_Output", 256, -32, self); - input.inputs[| 2].setValue(4); - output.inputs[| 0].setFrom(input.outputs[| 0]); - output.inputs[| 1].setFrom(input.outputs[| 1]); + input.inputs[2].setValue(4); + output.inputs[0].setFrom(input.outputs[0]); + output.inputs[1].setFrom(input.outputs[1]); } #endregion static getNextNodes = function() { #region var allReady = true; - for(var i = custom_input_index; i < ds_list_size(inputs); i++) { - var _in = inputs[| i].from; + for(var i = custom_input_index; i < array_length(inputs); i++) { + var _in = inputs[i].from; if(!_in.isRenderActive()) continue; allReady &= _in.isRenderable() diff --git a/scripts/node_feedback_inline/node_feedback_inline.gml b/scripts/node_feedback_inline/node_feedback_inline.gml index c936a8791..455666e24 100644 --- a/scripts/node_feedback_inline/node_feedback_inline.gml +++ b/scripts/node_feedback_inline/node_feedback_inline.gml @@ -35,8 +35,8 @@ function Node_Feedback_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) con var node_in = PROJECT.nodeMap[? attributes.junc_in[0]]; var node_out = PROJECT.nodeMap[? attributes.junc_out[0]]; - junc_in = node_in? node_in.inputs[| attributes.junc_in[1]] : noone; - junc_out = node_out? node_out.outputs[| attributes.junc_out[1]] : noone; + junc_in = node_in? node_in.inputs[attributes.junc_in[1]] : noone; + junc_out = node_out? node_out.outputs[attributes.junc_out[1]] : noone; if(junc_in) junc_in.value_from_loop = self; if(junc_out) array_push(junc_out.value_to_loop, self); diff --git a/scripts/node_feedback_input/node_feedback_input.gml b/scripts/node_feedback_input/node_feedback_input.gml index 55e786c9e..53d4a85d0 100644 --- a/scripts/node_feedback_input/node_feedback_input.gml +++ b/scripts/node_feedback_input/node_feedback_input.gml @@ -4,12 +4,12 @@ function Node_Feedback_Input(_x, _y, _group = noone) : Node_Group_Input(_x, _y, is_group_io = true; setDimension(96, 32 + 24 * 2); - outputs[| 0].getValueDefault = method(outputs[| 0], outputs[| 0].getValueRecursive); //Get value from outside loop - outputs[| 0].getValueRecursive = function(arr, _time) { + outputs[0].getValueDefault = method(outputs[0], outputs[0].getValueRecursive); //Get value from outside loop + outputs[0].getValueRecursive = function(arr, _time) { var _node_output = noone; - for( var i = 0; i < array_length(outputs[| 1].value_to); i++ ) { - var vt = outputs[| 1].value_to[i]; - if(vt.value_from == outputs[| 1]) + for( var i = 0; i < array_length(outputs[1].value_to); i++ ) { + var vt = outputs[1].value_to[i]; + if(vt.value_from == outputs[1]) _node_output = vt; } @@ -19,8 +19,8 @@ function Node_Feedback_Input(_x, _y, _group = noone) : Node_Group_Input(_x, _y, return; } - outputs[| 0].getValueDefault(arr); + outputs[0].getValueDefault(arr); } - outputs[| 1] = nodeValue_Output("Feedback loop", self, VALUE_TYPE.node, 0).nonForward(); + outputs[1] = nodeValue_Output("Feedback loop", self, VALUE_TYPE.node, 0).nonForward(); } \ No newline at end of file diff --git a/scripts/node_feedback_output/node_feedback_output.gml b/scripts/node_feedback_output/node_feedback_output.gml index 8101d818d..d5fccd9e6 100644 --- a/scripts/node_feedback_output/node_feedback_output.gml +++ b/scripts/node_feedback_output/node_feedback_output.gml @@ -4,21 +4,21 @@ function Node_Feedback_Output(_x, _y, _group = noone) : Node_Group_Output(_x, _y is_group_io = true; setDimension(96, 32 + 24 * 2); - inputs[| 1] = nodeValue("Feedback loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, -1) + inputs[1] = nodeValue("Feedback loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, -1) .setVisible(true, true); cache_value = -1; static update = function(frame = CURRENT_FRAME) { - if(inputs[| 0].value_from == noone) return; + if(inputs[0].value_from == noone) return; if(IS_LAST_FRAME) { cache_value = noone; return; } var _val_get = getInputData(0); - var _arr = inputs[| 0].value_from.isArray(); - var is_surf = inputs[| 0].type == VALUE_TYPE.surface; + var _arr = inputs[0].value_from.isArray(); + var is_surf = inputs[0].type == VALUE_TYPE.surface; if(is_array(cache_value)) { for( var i = 0, n = array_length(cache_value); i < n; i++ ) { diff --git a/scripts/node_find_pixel/node_find_pixel.gml b/scripts/node_find_pixel/node_find_pixel.gml index 3ec3379f9..05d16a3e0 100644 --- a/scripts/node_find_pixel/node_find_pixel.gml +++ b/scripts/node_find_pixel/node_find_pixel.gml @@ -2,23 +2,23 @@ function Node_Find_Pixel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group name = "Find pixel"; setDimension(96, 48); - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Color("Search color", self, c_black); + inputs[1] = nodeValue_Color("Search color", self, c_black); - inputs[| 2] = nodeValue_Float("Tolerance", self, 0) + inputs[2] = nodeValue_Float("Tolerance", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Bool("Find all", self, false); + inputs[3] = nodeValue_Bool("Find all", self, false); - inputs[| 4] = nodeValue_Bool("Include alpha", self, false); + inputs[4] = nodeValue_Bool("Include alpha", self, false); - inputs[| 5] = nodeValue_Float("Alpha tolerance", self, 0.2) + inputs[5] = nodeValue_Float("Alpha tolerance", self, 0.2) .setDisplay(VALUE_DISPLAY.slider); - // inputs[| 6] = nodeValue_Enum_Button("Axis", self, 1, [ "X", "Y" ]); + // inputs[6] = nodeValue_Enum_Button("Axis", self, 1, [ "X", "Y" ]); - outputs[| 0] = nodeValue_Output("Position", self, VALUE_TYPE.integer, [ 0, 0 ]) + outputs[0] = nodeValue_Output("Position", self, VALUE_TYPE.integer, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); input_display_list = [ 0, @@ -33,7 +33,7 @@ function Node_Find_Pixel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group static step = function() { #region // var _all = getInputData(3); - // inputs[| 6].setVisible(_all); + // inputs[6].setVisible(_all); } #endregion static processData = function(_output, _data, _output_index, _array_index = 0) { #region diff --git a/scripts/node_flip/node_flip.gml b/scripts/node_flip/node_flip.gml index 7fcc1389a..67d139247 100644 --- a/scripts/node_flip/node_flip.gml +++ b/scripts/node_flip/node_flip.gml @@ -1,11 +1,11 @@ function Node_Flip(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Flip"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Enum_Button("Axis", self, 0, [ "x", "y" ]); + inputs[1] = nodeValue_Enum_Button("Axis", self, 0, [ "x", "y" ]); - inputs[| 2] = nodeValue_Bool("Active", self, true); + inputs[2] = nodeValue_Bool("Active", self, true); active_index = 2; input_display_list = [ 2, @@ -13,7 +13,7 @@ function Node_Flip(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons ["Flip", false], 1, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); diff --git a/scripts/node_flood_fill/node_flood_fill.gml b/scripts/node_flood_fill/node_flood_fill.gml index d494fb3f6..26e489e1a 100644 --- a/scripts/node_flood_fill/node_flood_fill.gml +++ b/scripts/node_flood_fill/node_flood_fill.gml @@ -1,30 +1,30 @@ function Node_Flood_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Flood Fill"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Surface("Mask", self); + inputs[1] = nodeValue_Surface("Mask", self); - inputs[| 2] = nodeValue_Float("Mix", self, 1) + inputs[2] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Bool("Active", self, true); + inputs[3] = nodeValue_Bool("Active", self, true); active_index = 3; - inputs[| 4] = nodeValue_Vector("Position", self, [ 1, 1 ]); + inputs[4] = nodeValue_Vector("Position", self, [ 1, 1 ]); - inputs[| 5] = nodeValue_Color("Colors", self, cola(c_black) ); + inputs[5] = nodeValue_Color("Colors", self, cola(c_black) ); - inputs[| 6] = nodeValue_Float("Threshold", self, 0.1) + inputs[6] = nodeValue_Float("Threshold", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Bool("Diagonal", self, false); + inputs[7] = nodeValue_Bool("Diagonal", self, false); __init_mask_modifier(1); // inputs 8, 9 - inputs[| 10] = nodeValue_Enum_Scroll("Blend", self, 0, [ "Override", "Multiply" ]); + inputs[10] = nodeValue_Enum_Scroll("Blend", self, 0, [ "Override", "Multiply" ]); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 3, ["Surfaces", false], 0, 1, 2, 8, 9, @@ -45,7 +45,7 @@ function Node_Flood_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } diff --git a/scripts/node_flow_noise/node_flow_noise.gml b/scripts/node_flow_noise/node_flow_noise.gml index 9b8f1a77d..e491ab703 100644 --- a/scripts/node_flow_noise/node_flow_noise.gml +++ b/scripts/node_flow_noise/node_flow_noise.gml @@ -2,20 +2,20 @@ function Node_Flow_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, name = "Flow Noise"; shader = sh_noise_flow; - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 2, 2 ]); + inputs[2] = nodeValue_Vector("Scale", self, [ 2, 2 ]); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[| 3] = nodeValue_Float("Progress", self, 0) + inputs[3] = nodeValue_Float("Progress", self, 0) addShaderProp(SHADER_UNIFORM.float, "progress"); - inputs[| 4] = nodeValue_Slider_Range("Detail", self, [ 1, 8 ], { range: [ 1, 16, 0.1 ] }); + inputs[4] = nodeValue_Slider_Range("Detail", self, [ 1, 8 ], { range: [ 1, 16, 0.1 ] }); addShaderProp(SHADER_UNIFORM.float, "detail"); - inputs[| 5] = nodeValue_Rotation("Rotation", self, 0); + inputs[5] = nodeValue_Rotation("Rotation", self, 0); addShaderProp(SHADER_UNIFORM.float, "rotation"); input_display_list = [ @@ -25,7 +25,7 @@ function Node_Flow_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } diff --git a/scripts/node_fn/node_fn.gml b/scripts/node_fn/node_fn.gml index cab2b90ae..d697612f2 100644 --- a/scripts/node_fn/node_fn.gml +++ b/scripts/node_fn/node_fn.gml @@ -4,11 +4,11 @@ function Node_Fn(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr update_on_frame = true; setDimension(96, 96); - inputs[| 0] = nodeValue_Enum_Scroll("Display", self, 1 , [ "Number", "Graph" ]); + inputs[0] = nodeValue_Enum_Scroll("Display", self, 1 , [ "Number", "Graph" ]); - outputs[| 0] = nodeValue_Output("Output", self, VALUE_TYPE.float, 0); + outputs[0] = nodeValue_Output("Output", self, VALUE_TYPE.float, 0); - inl = ds_list_size(inputs); + inl = array_length(inputs); input_display_list = [ ["Display", true], 0, diff --git a/scripts/node_fn_constant/node_fn_constant.gml b/scripts/node_fn_constant/node_fn_constant.gml index 27334269b..3ebfb6b0d 100644 --- a/scripts/node_fn_constant/node_fn_constant.gml +++ b/scripts/node_fn_constant/node_fn_constant.gml @@ -1,7 +1,7 @@ function Node_Fn_Constant(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) constructor { name = "Constant"; - inputs[| inl + 0] = nodeValue_Float("Value", self, 0 ); + inputs[inl + 0] = nodeValue_Float("Value", self, 0 ); array_append(input_display_list, [ ["Value", false], inl + 0 diff --git a/scripts/node_fn_ease/node_fn_ease.gml b/scripts/node_fn_ease/node_fn_ease.gml index 92c1f383e..bd87ba4ea 100644 --- a/scripts/node_fn_ease/node_fn_ease.gml +++ b/scripts/node_fn_ease/node_fn_ease.gml @@ -1,11 +1,11 @@ function Node_Fn_Ease(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) constructor { name = "Ease"; - inputs[| inl + 0] = nodeValue_Slider_Range("Range", self, [ 0, 1 ] ); + inputs[inl + 0] = nodeValue_Slider_Range("Range", self, [ 0, 1 ] ); - inputs[| inl + 1] = nodeValue_Slider_Range("Amount", self, [ 0.1, 0.9 ] ); + inputs[inl + 1] = nodeValue_Slider_Range("Amount", self, [ 0.1, 0.9 ] ); - inputs[| inl + 2] = nodeValue_Enum_Scroll("Smooth", self, 0 , [ "Cubic poly", "Quadratic rat", "Cubic rat", "Cosine" ] ); + inputs[inl + 2] = nodeValue_Enum_Scroll("Smooth", self, 0 , [ "Cubic poly", "Quadratic rat", "Cubic rat", "Cosine" ] ); array_append(input_display_list, [ ["Value", false], inl + 0, inl + 1, inl + 2, diff --git a/scripts/node_fn_math/node_fn_math.gml b/scripts/node_fn_math/node_fn_math.gml index 2c20224d0..be85e7edb 100644 --- a/scripts/node_fn_math/node_fn_math.gml +++ b/scripts/node_fn_math/node_fn_math.gml @@ -2,12 +2,12 @@ function Node_Fn_Math(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) construc name = "Math"; time_based = false; - inputs[| inl + 0] = nodeValue_Enum_Scroll("Operation", self, 2 , [ "Add", "Minus", "Multiply" ] ); + inputs[inl + 0] = nodeValue_Enum_Scroll("Operation", self, 2 , [ "Add", "Minus", "Multiply" ] ); - inputs[| inl + 1] = nodeValue_Float("Value 1", self, 0 ) + inputs[inl + 1] = nodeValue_Float("Value 1", self, 0 ) .setVisible(true, true); - inputs[| inl + 2] = nodeValue_Float("Value 2", self, 0 ) + inputs[inl + 2] = nodeValue_Float("Value 2", self, 0 ) .setVisible(true, true); array_append(input_display_list, [ @@ -30,11 +30,11 @@ function Node_Fn_Math(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) construc var _v0 = getSingleValue(inl + 1); var _v1 = getSingleValue(inl + 2); - var _f0 = inputs[| inl + 1].value_from; + var _f0 = inputs[inl + 1].value_from; if(_f0 != noone && is_instanceof(_f0.node, Node_Fn)) _v0 = _f0.node.getDisplayX(i); - var _f1 = inputs[| inl + 2].value_from; + var _f1 = inputs[inl + 2].value_from; if(_f1 != noone && is_instanceof(_f1.node, Node_Fn)) _v1 = _f1.node.getDisplayX(i); diff --git a/scripts/node_fn_smoothstep/node_fn_smoothstep.gml b/scripts/node_fn_smoothstep/node_fn_smoothstep.gml index d35d2fda2..bc9f74ac3 100644 --- a/scripts/node_fn_smoothstep/node_fn_smoothstep.gml +++ b/scripts/node_fn_smoothstep/node_fn_smoothstep.gml @@ -2,10 +2,10 @@ function Node_Fn_SmoothStep(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) co name = "SmoothStep"; time_based = false; - inputs[| inl + 0] = nodeValue_Float("Value", self, 0 ) + inputs[inl + 0] = nodeValue_Float("Value", self, 0 ) .setVisible(true, true); - inputs[| inl + 1] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Cubic poly", "Quadratic rat", "Cubic rat", "Cosine" ] ); + inputs[inl + 1] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Cubic poly", "Quadratic rat", "Cubic rat", "Cosine" ] ); array_append(input_display_list, [ ["Value", false], inl + 1, inl + 0, @@ -26,7 +26,7 @@ function Node_Fn_SmoothStep(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) co } static refreshDisplayX = function(i) { - var _fr = inputs[| inl + 0].value_from; + var _fr = inputs[inl + 0].value_from; if(_fr != noone && is_instanceof(_fr.node, Node_Fn)) return _fr.node.getDisplayX(i); return i / graph_res; diff --git a/scripts/node_fn_wave_table/node_fn_wave_table.gml b/scripts/node_fn_wave_table/node_fn_wave_table.gml index e4318a9f1..f33075515 100644 --- a/scripts/node_fn_wave_table/node_fn_wave_table.gml +++ b/scripts/node_fn_wave_table/node_fn_wave_table.gml @@ -1,12 +1,12 @@ function Node_Fn_WaveTable(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) constructor { name = "WaveTable"; - inputs[| inl + 0] = nodeValue_Float("Pattern", self, 0 ) + inputs[inl + 0] = nodeValue_Float("Pattern", self, 0 ) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 3, 0.01] }); - inputs[| inl + 1] = nodeValue_Vector("Range", self, [ 0, 1 ]); + inputs[inl + 1] = nodeValue_Vector("Range", self, [ 0, 1 ]); - inputs[| inl + 2] = nodeValue_Float("Frequency", self, 2 ) + inputs[inl + 2] = nodeValue_Float("Frequency", self, 2 ) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 8, 0.01] }); array_append(input_display_list, [ diff --git a/scripts/node_fn_wiggler/node_fn_wiggler.gml b/scripts/node_fn_wiggler/node_fn_wiggler.gml index c6c3357fe..a673bef78 100644 --- a/scripts/node_fn_wiggler/node_fn_wiggler.gml +++ b/scripts/node_fn_wiggler/node_fn_wiggler.gml @@ -1,15 +1,15 @@ function Node_Wiggler(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) constructor { name = "Wiggler"; - inputs[| inl + 0] = nodeValue_Vector("Range", self, [ 0, 1 ]); + inputs[inl + 0] = nodeValue_Vector("Range", self, [ 0, 1 ]); - inputs[| inl + 1] = nodeValue_Int("Frequency", self, 4 ) + inputs[inl + 1] = nodeValue_Int("Frequency", self, 4 ) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] }); - inputs[| inl + 2] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| inl + 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[inl + 2] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[inl + 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| inl + 3] = nodeValue_Toggle("Clip", self, 0b11 , { data : [ "Start", "End" ] }); + inputs[inl + 3] = nodeValue_Toggle("Clip", self, 0b11 , { data : [ "Start", "End" ] }); array_append(input_display_list, [ ["Wiggle", false], inl + 2, inl + 0, inl + 1, inl + 3, diff --git a/scripts/node_fold_noise/node_fold_noise.gml b/scripts/node_fold_noise/node_fold_noise.gml index c26223475..821c88dec 100644 --- a/scripts/node_fold_noise/node_fold_noise.gml +++ b/scripts/node_fold_noise/node_fold_noise.gml @@ -2,28 +2,28 @@ function Node_Fold_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, name = "Fold Noise"; shader = sh_noise_fold; - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 2, 2 ]); + inputs[2] = nodeValue_Vector("Scale", self, [ 2, 2 ]); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[| 3] = nodeValue_Int("Iteration", self, 2) + inputs[3] = nodeValue_Int("Iteration", self, 2) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 6, 0.1] }); addShaderProp(SHADER_UNIFORM.integer, "iteration"); - inputs[| 4] = nodeValue_Float("Stretch", self, 2); + inputs[4] = nodeValue_Float("Stretch", self, 2); addShaderProp(SHADER_UNIFORM.float, "stretch"); - inputs[| 5] = nodeValue_Float("Amplitude", self, 1.3) + inputs[5] = nodeValue_Float("Amplitude", self, 1.3) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] }); addShaderProp(SHADER_UNIFORM.float, "amplitude"); - inputs[| 6] = nodeValue_Enum_Button("Mode", self, 0, [ "Greyscale", "Map" ]); + inputs[6] = nodeValue_Enum_Button("Mode", self, 0, [ "Greyscale", "Map" ]); addShaderProp(SHADER_UNIFORM.integer, "mode"); - inputs[| 7] = nodeValue_Rotation("Rotation", self, 0); + inputs[7] = nodeValue_Rotation("Rotation", self, 0); addShaderProp(SHADER_UNIFORM.float, "rotation"); input_display_list = [ @@ -34,7 +34,7 @@ function Node_Fold_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } diff --git a/scripts/node_frame/node_frame.gml b/scripts/node_frame/node_frame.gml index 3223a0f90..117580be8 100644 --- a/scripts/node_frame/node_frame.gml +++ b/scripts/node_frame/node_frame.gml @@ -34,21 +34,21 @@ function Node_Frame(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { draw_y1 = 0; - inputs[| 0] = nodeValue_Vector("Size", self, [ 240, 160 ] ) + inputs[0] = nodeValue_Vector("Size", self, [ 240, 160 ] ) .rejectArray(); - inputs[| 1] = nodeValue_Color("Color", self, cola(c_white) ) + inputs[1] = nodeValue_Color("Color", self, cola(c_white) ) .rejectArray(); - inputs[| 2] = nodeValue_Float("Alpha", self, 0.75 ) + inputs[2] = nodeValue_Float("Alpha", self, 0.75 ) .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); - inputs[| 3] = nodeValue_Float("Label size", self, global.__FRAME_LABEL_SCALE ) + inputs[3] = nodeValue_Float("Label size", self, global.__FRAME_LABEL_SCALE ) .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); - inputs[| 4] = nodeValue_Float("Blend label", self, 0 ) + inputs[4] = nodeValue_Float("Blend label", self, 0 ) .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); @@ -152,7 +152,7 @@ function Node_Frame(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { if(mouse_release(mb_left)) { size_dragging = false; - inputs[| 0].setValue([ w, h ]); + inputs[0].setValue([ w, h ]); } } diff --git a/scripts/node_functions/node_functions.gml b/scripts/node_functions/node_functions.gml index c0f35ee64..9ba8dc265 100644 --- a/scripts/node_functions/node_functions.gml +++ b/scripts/node_functions/node_functions.gml @@ -40,12 +40,12 @@ _pos[0] = value_snap(dragging_sx + _dx, _snx); _pos[1] = value_snap(dragging_sy + _dy, _sny); - if(inputs[| _posInd].setValue(_pos)) + if(inputs[_posInd].setValue(_pos)) UNDO_HOLDING = true; - if(inputs[| _posInd].unit.mode == VALUE_UNIT.reference) { + if(inputs[_posInd].unit.mode == VALUE_UNIT.reference) { var p = [ _pos[0], _pos[1] ]; - _pos = inputs[| _posInd].unit.apply(p); + _pos = inputs[_posInd].unit.apply(p); } } else if(drag_type == 1) { var aa = point_direction(rot_anc_x, rot_anc_y, _mx, _my); @@ -56,7 +56,7 @@ else _rot = dragging_sx - da; - if(inputs[| _rotInd].setValue(_rot)) + if(inputs[_rotInd].setValue(_rot)) UNDO_HOLDING = true; } else if(drag_type == 2) { var _p = point_rotate(_mx - dragging_mx, _my - dragging_my, 0, 0, -_rot); @@ -68,12 +68,12 @@ _sca[1] = min(_sca[0], _sca[1]); } - if(inputs[| _scaInd].setValue(_sca)) + if(inputs[_scaInd].setValue(_sca)) UNDO_HOLDING = true; - if(_scaUnit && inputs[| _scaInd].unit.mode == VALUE_UNIT.reference) { + if(_scaUnit && inputs[_scaInd].unit.mode == VALUE_UNIT.reference) { var s = [ _sca[0], _sca[1] ]; - _sca = inputs[| _scaInd].unit.apply(s); + _sca = inputs[_scaInd].unit.apply(s); } } diff --git a/scripts/node_gabor_noise/node_gabor_noise.gml b/scripts/node_gabor_noise/node_gabor_noise.gml index 8436ecc69..9112492c0 100644 --- a/scripts/node_gabor_noise/node_gabor_noise.gml +++ b/scripts/node_gabor_noise/node_gabor_noise.gml @@ -2,48 +2,48 @@ function Node_Gabor_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y name = "Gabor Noise"; shader = sh_noise_gabor; - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 4, 4 ]) + inputs[2] = nodeValue_Vector("Scale", self, [ 4, 4 ]) .setMappable(8); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[| 3] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); addShaderProp(SHADER_UNIFORM.float, "seed"); - inputs[| 4] = nodeValue_Float("Density", self, 2) + inputs[4] = nodeValue_Float("Density", self, 2) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }) .setMappable(9); addShaderProp(SHADER_UNIFORM.float, "alignment"); - inputs[| 5] = nodeValue_Float("Sharpness", self, 4) + inputs[5] = nodeValue_Float("Sharpness", self, 4) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 5, 0.01 ] }) .setMappable(10); addShaderProp(SHADER_UNIFORM.float, "sharpness"); - inputs[| 6] = nodeValue_Vector("Augment", self, [ 11, 31 ]); + inputs[6] = nodeValue_Vector("Augment", self, [ 11, 31 ]); addShaderProp(SHADER_UNIFORM.float, "augment"); - inputs[| 7] = nodeValue_Rotation("Phase", self, 0) + inputs[7] = nodeValue_Rotation("Phase", self, 0) .setMappable(11); addShaderProp(SHADER_UNIFORM.float, "rotation"); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 8] = nodeValueMap("Scale map", self); addShaderProp(); + inputs[ 8] = nodeValueMap("Scale map", self); addShaderProp(); - inputs[| 9] = nodeValueMap("Density map", self); addShaderProp(); + inputs[ 9] = nodeValueMap("Density map", self); addShaderProp(); - inputs[| 10] = nodeValueMap("Sharpness map", self); addShaderProp(); + inputs[10] = nodeValueMap("Sharpness map", self); addShaderProp(); - inputs[| 11] = nodeValueMap("Phase map", self); addShaderProp(); + inputs[11] = nodeValueMap("Phase map", self); addShaderProp(); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 12] = nodeValue_Rotation("Rotation", self, 0); + inputs[12] = nodeValue_Rotation("Rotation", self, 0); addShaderProp(SHADER_UNIFORM.float, "trRotation"); input_display_list = [ @@ -52,15 +52,15 @@ function Node_Gabor_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y ]; static step = function() { - inputs[| 2].mappableStep(); - inputs[| 4].mappableStep(); - inputs[| 5].mappableStep(); - inputs[| 7].mappableStep(); + inputs[2].mappableStep(); + inputs[4].mappableStep(); + inputs[5].mappableStep(); + inputs[7].mappableStep(); } static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } diff --git a/scripts/node_gamma_map/node_gamma_map.gml b/scripts/node_gamma_map/node_gamma_map.gml index 67af9bd3a..d2865d377 100644 --- a/scripts/node_gamma_map/node_gamma_map.gml +++ b/scripts/node_gamma_map/node_gamma_map.gml @@ -1,16 +1,16 @@ function Node_Gamma_Map(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Gamma Map"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Bool("Invert", self, false); + inputs[1] = nodeValue_Bool("Invert", self, false); - inputs[| 2] = nodeValue_Bool("Active", self, true); + inputs[2] = nodeValue_Bool("Active", self, true); active_index = 2; input_display_list = [ 2, 0, 1, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); diff --git a/scripts/node_global/node_global.gml b/scripts/node_global/node_global.gml index ec17accdf..9444fa58b 100644 --- a/scripts/node_global/node_global.gml +++ b/scripts/node_global/node_global.gml @@ -198,7 +198,7 @@ function Node_Global(_x = 0, _y = 0) : __Node_Base(_x, _y) constructor { static createValue = function() { #region var _in = nodeValue_Float("NewValue", self, 0); _in.editor = new variable_editor(_in); - ds_list_add(inputs, _in); + array_push(inputs, _in); return _in; } #endregion @@ -225,8 +225,8 @@ function Node_Global(_x = 0, _y = 0) : __Node_Base(_x, _y) constructor { } #endregion static step = function() { #region - for( var i = 0; i < ds_list_size(inputs); i++ ) { - var _inp = inputs[| i]; + for( var i = 0; i < array_length(inputs); i++ ) { + var _inp = inputs[i]; value[? _inp.name] = _inp; var val = true; @@ -239,14 +239,14 @@ function Node_Global(_x = 0, _y = 0) : __Node_Base(_x, _y) constructor { var _map = {}; var _inputs = []; - for(var i = 0; i < ds_list_size(inputs); i++) { - var _ser = inputs[| i].serialize(); + for(var i = 0; i < array_length(inputs); i++) { + var _ser = inputs[i].serialize(); - _ser.global_type = inputs[| i].editor.type_index; - _ser.global_disp = inputs[| i].editor.disp_index; - _ser.global_name = inputs[| i].editor.value_name; - _ser.global_s_range = inputs[| i].editor.slider_range; - _ser.global_s_step = inputs[| i].editor.slider_step; + _ser.global_type = inputs[i].editor.type_index; + _ser.global_disp = inputs[i].editor.disp_index; + _ser.global_name = inputs[i].editor.value_name; + _ser.global_s_range = inputs[i].editor.slider_range; + _ser.global_s_step = inputs[i].editor.slider_step; array_push(_inputs, _ser); } diff --git a/scripts/node_glow/node_glow.gml b/scripts/node_glow/node_glow.gml index 68f33f0e5..2236889a0 100644 --- a/scripts/node_glow/node_glow.gml +++ b/scripts/node_glow/node_glow.gml @@ -1,34 +1,34 @@ function Node_Glow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Glow"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Border", self, 0) + inputs[1] = nodeValue_Float("Border", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 4, 0.1] }); - inputs[| 2] = nodeValue_Float("Size", self, 3) + inputs[2] = nodeValue_Float("Size", self, 3) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); - inputs[| 3] = nodeValue_Float("Strength", self, 1) + inputs[3] = nodeValue_Float("Strength", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ]}); - inputs[| 4] = nodeValue_Color("Color", self, c_white); + inputs[4] = nodeValue_Color("Color", self, c_white); - inputs[| 5] = nodeValue_Surface("Mask", self); + inputs[5] = nodeValue_Surface("Mask", self); - inputs[| 6] = nodeValue_Float("Mix", self, 1) + inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Bool("Active", self, true); + inputs[7] = nodeValue_Bool("Active", self, true); active_index = 7; __init_mask_modifier(5); // inputs 8, 9, - inputs[| 10] = nodeValue_Enum_Button("Mode", self, 0, [ "Greyscale", "Alpha" ]); + inputs[10] = nodeValue_Enum_Button("Mode", self, 0, [ "Greyscale", "Alpha" ]); - inputs[| 11] = nodeValue_Bool("Draw original", self, true); + inputs[11] = nodeValue_Bool("Draw original", self, true); - inputs[| 12] = nodeValue_Enum_Button("Side", self, 0, [ "Outer", "Inner" ]); + inputs[12] = nodeValue_Enum_Button("Side", self, 0, [ "Outer", "Inner" ]); input_display_list = [ 7, ["Surfaces", true], 0, 5, 6, 8, 9, @@ -36,7 +36,7 @@ function Node_Glow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons ["Render", false], 4, 11, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); diff --git a/scripts/node_gradient/node_gradient.gml b/scripts/node_gradient/node_gradient.gml index ddf090d2c..b00a95298 100644 --- a/scripts/node_gradient/node_gradient.gml +++ b/scripts/node_gradient/node_gradient.gml @@ -1,59 +1,59 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Draw Gradient"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ])) + inputs[1] = nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ])) .setMappable(15); - inputs[| 2] = nodeValue_Enum_Scroll("Type", self, 0, [ new scrollItem("Linear", s_node_gradient_type, 0), + inputs[2] = nodeValue_Enum_Scroll("Type", self, 0, [ new scrollItem("Linear", s_node_gradient_type, 0), new scrollItem("Circular", s_node_gradient_type, 1), new scrollItem("Radial", s_node_gradient_type, 2) ]); - inputs[| 3] = nodeValue_Rotation("Angle", self, 0) + inputs[3] = nodeValue_Rotation("Angle", self, 0) .setMappable(10); - inputs[| 4] = nodeValue_Float("Radius", self, .5) + inputs[4] = nodeValue_Float("Radius", self, .5) .setMappable(11); - inputs[| 5] = nodeValue_Float("Shift", self, 0) + inputs[5] = nodeValue_Float("Shift", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-2, 2, 0.01] }) .setMappable(12); - inputs[| 6] = nodeValue_Vector("Center", self, [ 0.5, 0.5 ]) + inputs[6] = nodeValue_Vector("Center", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[| 7] = nodeValue_Enum_Button("Loop", self, 0, [ "None", "Loop", "Pingpong" ]); + inputs[7] = nodeValue_Enum_Button("Loop", self, 0, [ "None", "Loop", "Pingpong" ]); - inputs[| 8] = nodeValue_Surface("Mask", self); + inputs[8] = nodeValue_Surface("Mask", self); - inputs[| 9] = nodeValue_Float("Scale", self, 1) + inputs[9] = nodeValue_Float("Scale", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 2, 0.01] }) .setMappable(13); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 10] = nodeValueMap("Angle map", self); + inputs[10] = nodeValueMap("Angle map", self); - inputs[| 11] = nodeValueMap("Radius map", self); + inputs[11] = nodeValueMap("Radius map", self); - inputs[| 12] = nodeValueMap("Shift map", self); + inputs[12] = nodeValueMap("Shift map", self); - inputs[| 13] = nodeValueMap("Scale map", self); + inputs[13] = nodeValueMap("Scale map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 14] = nodeValue_Bool("Uniform ratio", self, true); + inputs[14] = nodeValue_Bool("Uniform ratio", self, true); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 15] = nodeValueMap("Gradient map", self); + inputs[15] = nodeValueMap("Gradient map", self); - inputs[| 16] = nodeValueGradientRange("Gradient map range", self, inputs[| 1]); + inputs[16] = nodeValueGradientRange("Gradient map range", self, inputs[1]); ////////////////////////////////////////////////////////////////////////////////////////////////// - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Output", true], 0, 8, @@ -66,8 +66,8 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { PROCESSOR_OVERLAY_CHECK var _hov = false; - var a = inputs[| 6].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; _hov |= a; - var a = inputs[| 16].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[0]); active &= !a; _hov |= a; + var a = inputs[6].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; _hov |= a; + var a = inputs[16].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[0]); active &= !a; _hov |= a; return _hov; } @@ -75,15 +75,15 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static step = function() { var _typ = getInputData(2); - inputs[| 3].setVisible(_typ != 1); - inputs[| 4].setVisible(_typ == 1); - inputs[| 14].setVisible(_typ); + inputs[ 3].setVisible(_typ != 1); + inputs[ 4].setVisible(_typ == 1); + inputs[14].setVisible(_typ); - inputs[| 1].mappableStep(); - inputs[| 3].mappableStep(); - inputs[| 4].mappableStep(); - inputs[| 5].mappableStep(); - inputs[| 9].mappableStep(); + inputs[1].mappableStep(); + inputs[3].mappableStep(); + inputs[4].mappableStep(); + inputs[5].mappableStep(); + inputs[9].mappableStep(); } static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -97,7 +97,7 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); surface_set_shader(_outSurf, sh_gradient); - shader_set_gradient(_data[1], _data[15], _data[16], inputs[| 1]); + shader_set_gradient(_data[1], _data[15], _data[16], inputs[1]); shader_set_f("dimension", _dim); @@ -106,10 +106,10 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) shader_set_i("type", _typ); shader_set_i("uniAsp", _uni); - shader_set_f_map("angle", _data[3], _data[10], inputs[| 3]); - shader_set_f_map("radius", _data[4], _data[11], inputs[| 4]); - shader_set_f_map("shift", _data[5], _data[12], inputs[| 5]); - shader_set_f_map("scale", _data[9], _data[13], inputs[| 9]); + shader_set_f_map("angle", _data[3], _data[10], inputs[3]); + shader_set_f_map("radius", _data[4], _data[11], inputs[4]); + shader_set_f_map("shift", _data[5], _data[12], inputs[5]); + shader_set_f_map("scale", _data[9], _data[13], inputs[9]); if(is_surface(_msk)) draw_surface_stretched_ext(_msk, 0, 0, _dim[0], _dim[1], c_white, 1); else draw_sprite_stretched_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], c_white, 1); diff --git a/scripts/node_gradient_extract/node_gradient_extract.gml b/scripts/node_gradient_extract/node_gradient_extract.gml index d7746e064..e9b4c9931 100644 --- a/scripts/node_gradient_extract/node_gradient_extract.gml +++ b/scripts/node_gradient_extract/node_gradient_extract.gml @@ -3,16 +3,16 @@ function Node_Gradient_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, batch_output = false; setDimension(96); - inputs[| 0] = nodeValue_Gradient("Gradient", self, new gradientObject(cola(c_white))) + inputs[0] = nodeValue_Gradient("Gradient", self, new gradientObject(cola(c_white))) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Colors", self, VALUE_TYPE.color, [] ) + outputs[0] = nodeValue_Output("Colors", self, VALUE_TYPE.color, [] ) .setDisplay(VALUE_DISPLAY.palette); - outputs[| 1] = nodeValue_Output("Positions", self, VALUE_TYPE.float, [] ); - outputs[| 1].array_depth = 1; + outputs[1] = nodeValue_Output("Positions", self, VALUE_TYPE.float, [] ); + outputs[1].array_depth = 1; - outputs[| 2] = nodeValue_Output("Type", self, VALUE_TYPE.integer, 0 ); + outputs[2] = nodeValue_Output("Type", self, VALUE_TYPE.integer, 0 ); static processData = function(_outSurf, _data, _output_index, _array_index) { var gra = _data[0]; diff --git a/scripts/node_gradient_out/node_gradient_out.gml b/scripts/node_gradient_out/node_gradient_out.gml index 8c83ae115..14c7a9b72 100644 --- a/scripts/node_gradient_out/node_gradient_out.gml +++ b/scripts/node_gradient_out/node_gradient_out.gml @@ -3,15 +3,15 @@ function Node_Gradient_Out(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro batch_output = false; setDimension(96); - inputs[| 0] = nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ])); + inputs[0] = nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ])); - inputs[| 1] = nodeValue_Float("Sample", self, 0, "Position to sample a color from the gradient.") + inputs[1] = nodeValue_Float("Sample", self, 0, "Position to sample a color from the gradient.") .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); - outputs[| 0] = nodeValue_Output("Gradient", self, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ); + outputs[0] = nodeValue_Output("Gradient", self, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ); - outputs[| 1] = nodeValue_Output("Color", self, VALUE_TYPE.color, c_white); + outputs[1] = nodeValue_Output("Color", self, VALUE_TYPE.color, c_white); _pal = -1; @@ -30,7 +30,7 @@ function Node_Gradient_Out(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro var bbox = drawGetBbox(xx, yy, _s); if(bbox.h < 1) return; - var grad = outputs[| 0].getValue(); + var grad = outputs[0].getValue(); if(!is_array(grad)) grad = [ grad ]; var _h = array_length(grad) * 32; diff --git a/scripts/node_gradient_palette/node_gradient_palette.gml b/scripts/node_gradient_palette/node_gradient_palette.gml index 9fd640c10..a55569b64 100644 --- a/scripts/node_gradient_palette/node_gradient_palette.gml +++ b/scripts/node_gradient_palette/node_gradient_palette.gml @@ -2,24 +2,24 @@ function Node_Gradient_Palette(_x, _y, _group = noone) : Node_Processor(_x, _y, name = "Palette to Gradient"; setDimension(96); - inputs[| 0] = nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE)) + inputs[0] = nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE)) .setVisible(true, true); - inputs[| 1] = nodeValue_Bool("Custom positions", self, false); + inputs[1] = nodeValue_Bool("Custom positions", self, false); - inputs[| 2] = nodeValue_Float("Positions", self, [], "Array of number indicating color position (0 - 1).") + inputs[2] = nodeValue_Float("Positions", self, [], "Array of number indicating color position (0 - 1).") .setVisible(true, true); - inputs[| 2].array_depth = 1; + inputs[2].array_depth = 1; - inputs[| 3] = nodeValue_Enum_Button("Interpolation", self, 1, [ "None", "RGB", "HSV", "OKLAB", "sRGB" ]); + inputs[3] = nodeValue_Enum_Button("Interpolation", self, 1, [ "None", "RGB", "HSV", "OKLAB", "sRGB" ]); - outputs[| 0] = nodeValue_Output("Gradient", self, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) + outputs[0] = nodeValue_Output("Gradient", self, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) _pal = -1; static step = function() { #region var usePos = array_safe_get_fast(current_data, 1); - inputs[| 2].setVisible(usePos, usePos); + inputs[2].setVisible(usePos, usePos); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region @@ -56,7 +56,7 @@ function Node_Gradient_Palette(_x, _y, _group = noone) : Node_Processor(_x, _y, var bbox = drawGetBbox(xx, yy, _s); if(bbox.h < 1) return; - var grad = outputs[| 0].getValue(); + var grad = outputs[0].getValue(); if(!is_array(grad)) grad = [ grad ]; var _h = array_length(grad) * 32; diff --git a/scripts/node_gradient_points/node_gradient_points.gml b/scripts/node_gradient_points/node_gradient_points.gml index 2975a3797..841ee9ca5 100644 --- a/scripts/node_gradient_points/node_gradient_points.gml +++ b/scripts/node_gradient_points/node_gradient_points.gml @@ -1,43 +1,43 @@ function Node_Gradient_Points(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Draw 4 Points Gradient"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Vector("Center 1", self, [ 0, 0 ] ) + inputs[1] = nodeValue_Vector("Center 1", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 2] = nodeValue_Color("Color 1", self, c_white ); + inputs[2] = nodeValue_Color("Color 1", self, c_white ); - inputs[| 3] = nodeValue_Vector("Center 2", self, [ DEF_SURF_W, 0 ] ) + inputs[3] = nodeValue_Vector("Center 2", self, [ DEF_SURF_W, 0 ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 4] = nodeValue_Color("Color 2", self, c_white ); + inputs[4] = nodeValue_Color("Color 2", self, c_white ); - inputs[| 5] = nodeValue_Vector("Center 3", self, [ 0, DEF_SURF_H ] ) + inputs[5] = nodeValue_Vector("Center 3", self, [ 0, DEF_SURF_H ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 6] = nodeValue_Color("Color 3", self, c_white ); + inputs[6] = nodeValue_Color("Color 3", self, c_white ); - inputs[| 7] = nodeValue_Vector("Center 4", self, DEF_SURF , { useGlobal : false }) + inputs[7] = nodeValue_Vector("Center 4", self, DEF_SURF , { useGlobal : false }) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 8] = nodeValue_Color("Color 4", self, c_white ); + inputs[8] = nodeValue_Color("Color 4", self, c_white ); - inputs[| 9] = nodeValue_Bool("Use palette", self, false ); + inputs[9] = nodeValue_Bool("Use palette", self, false ); - inputs[| 10] = nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE)); + inputs[10] = nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE)); - inputs[| 11] = nodeValue_Float("Falloff 1", self, 6 ) + inputs[11] = nodeValue_Float("Falloff 1", self, 6 ) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 0.1 ] }); - inputs[| 12] = nodeValue_Float("Falloff 2", self, 6 ) + inputs[12] = nodeValue_Float("Falloff 2", self, 6 ) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 0.1 ] }); - inputs[| 13] = nodeValue_Float("Falloff 3", self, 6 ) + inputs[13] = nodeValue_Float("Falloff 3", self, 6 ) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 0.1 ] }); - inputs[| 14] = nodeValue_Float("Falloff 4", self, 6 ) + inputs[14] = nodeValue_Float("Falloff 4", self, 6 ) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 0.1 ] }); - inputs[| 15] = nodeValue_Bool("Normalize weight", self, false ) + inputs[15] = nodeValue_Bool("Normalize weight", self, false ) - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Output", true], 0, @@ -50,10 +50,10 @@ function Node_Gradient_Points(_x, _y, _group = noone) : Node_Processor(_x, _y, _ static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) active &= !hv; _hov |= hv; - var hv = inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) active &= !hv; _hov |= hv; - var hv = inputs[| 5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) active &= !hv; _hov |= hv; - var hv = inputs[| 7].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) active &= !hv; _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) active &= !hv; _hov |= hv; + var hv = inputs[3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) active &= !hv; _hov |= hv; + var hv = inputs[5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) active &= !hv; _hov |= hv; + var hv = inputs[7].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) active &= !hv; _hov |= hv; return _hov; } @@ -61,12 +61,12 @@ function Node_Gradient_Points(_x, _y, _group = noone) : Node_Processor(_x, _y, _ static step = function() { var _usePal = getInputData(9); - inputs[| 10].setVisible(_usePal, _usePal); + inputs[10].setVisible(_usePal, _usePal); - inputs[| 2].setVisible(!_usePal, !_usePal); - inputs[| 4].setVisible(!_usePal, !_usePal); - inputs[| 6].setVisible(!_usePal, !_usePal); - inputs[| 8].setVisible(!_usePal, !_usePal); + inputs[ 2].setVisible(!_usePal, !_usePal); + inputs[ 4].setVisible(!_usePal, !_usePal); + inputs[ 6].setVisible(!_usePal, !_usePal); + inputs[ 8].setVisible(!_usePal, !_usePal); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_gradient_replace_color/node_gradient_replace_color.gml b/scripts/node_gradient_replace_color/node_gradient_replace_color.gml index 51a9367b4..34bc22743 100644 --- a/scripts/node_gradient_replace_color/node_gradient_replace_color.gml +++ b/scripts/node_gradient_replace_color/node_gradient_replace_color.gml @@ -2,17 +2,17 @@ function Node_Gradient_Replace_Color(_x, _y, _group = noone) : Node_Processor(_x name = "Gradient Replace"; setDimension(96, 48);; - inputs[| 0] = nodeValue_Gradient("Gradient", self, new gradientObject(cola(c_white))) + inputs[0] = nodeValue_Gradient("Gradient", self, new gradientObject(cola(c_white))) .setVisible(true, true); - inputs[| 1] = nodeValue_Palette("Color from", self, array_clone(DEF_PALETTE)); + inputs[1] = nodeValue_Palette("Color from", self, array_clone(DEF_PALETTE)); - inputs[| 2] = nodeValue_Palette("Color to", self, array_clone(DEF_PALETTE)); + inputs[2] = nodeValue_Palette("Color to", self, array_clone(DEF_PALETTE)); - inputs[| 3] = nodeValue_Float("Threshold", self, 0.1) + inputs[3] = nodeValue_Float("Threshold", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); - outputs[| 0] = nodeValue_Output("Gradient", self, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ); + outputs[0] = nodeValue_Output("Gradient", self, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ); static processData = function(_outSurf, _data, _output_index, _array_index) { #region var gra = _data[0]; @@ -49,7 +49,7 @@ function Node_Gradient_Replace_Color(_x, _y, _group = noone) : Node_Processor(_x var bbox = drawGetBbox(xx, yy, _s); if(bbox.h < 1) return; - var grad = outputs[| 0].getValue(); + var grad = outputs[0].getValue(); if(!is_array(grad)) grad = [ grad ]; var _h = array_length(grad) * 32; diff --git a/scripts/node_gradient_shift/node_gradient_shift.gml b/scripts/node_gradient_shift/node_gradient_shift.gml index b764863e6..8df81d7db 100644 --- a/scripts/node_gradient_shift/node_gradient_shift.gml +++ b/scripts/node_gradient_shift/node_gradient_shift.gml @@ -2,18 +2,18 @@ function Node_Gradient_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _g name = "Gradient Shift"; setDimension(96); - inputs[| 0] = nodeValue_Gradient("Gradient", self, new gradientObject(cola(c_white))) + inputs[0] = nodeValue_Gradient("Gradient", self, new gradientObject(cola(c_white))) .setVisible(true, true); - inputs[| 1] = nodeValue_Float("Shift", self, 0) + inputs[1] = nodeValue_Float("Shift", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[| 2] = nodeValue_Bool("Wrap", self, false) + inputs[2] = nodeValue_Bool("Wrap", self, false) - inputs[| 3] = nodeValue_Float("Scale", self, 1) + inputs[3] = nodeValue_Float("Scale", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 2, 0.01] }); - outputs[| 0] = nodeValue_Output("Gradient", self, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ); + outputs[0] = nodeValue_Output("Gradient", self, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ); _pal = -1; @@ -48,7 +48,7 @@ function Node_Gradient_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _g var bbox = drawGetBbox(xx, yy, _s); if(bbox.h < 1) return; - var grad = outputs[| 0].getValue(); + var grad = outputs[0].getValue(); if(!is_array(grad)) grad = [ grad ]; var _h = array_length(grad) * 32; diff --git a/scripts/node_grain/node_grain.gml b/scripts/node_grain/node_grain.gml index 5fb55c1e3..8e4a09114 100644 --- a/scripts/node_grain/node_grain.gml +++ b/scripts/node_grain/node_grain.gml @@ -1,76 +1,76 @@ function Node_Grain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Grain"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Surface("Mask", self); + inputs[1] = nodeValue_Surface("Mask", self); - inputs[| 2] = nodeValue_Float("Mix", self, 1) + inputs[2] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Bool("Active", self, true); + inputs[3] = nodeValue_Bool("Active", self, true); active_index = 3; - inputs[| 4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(1); // inputs 5, 6 - inputs[| 7] = nodeValue_Float("Brightness", self, 0) + inputs[7] = nodeValue_Float("Brightness", self, 0) .setDisplay(VALUE_DISPLAY.slider) .setMappable(8); - inputs[| 8] = nodeValueMap("Brightness map", self); + inputs[8] = nodeValueMap("Brightness map", self); - inputs[| 9] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 9].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[9] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[9].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 10] = nodeValue_Float("Red", self, 0) + inputs[10] = nodeValue_Float("Red", self, 0) .setDisplay(VALUE_DISPLAY.slider) .setMappable(11); - inputs[| 11] = nodeValueMap("Red map", self); + inputs[11] = nodeValueMap("Red map", self); - inputs[| 12] = nodeValue_Float("Green", self, 0) + inputs[12] = nodeValue_Float("Green", self, 0) .setDisplay(VALUE_DISPLAY.slider) .setMappable(13); - inputs[| 13] = nodeValueMap("Green map", self); + inputs[13] = nodeValueMap("Green map", self); - inputs[| 14] = nodeValue_Float("Blue", self, 0) + inputs[14] = nodeValue_Float("Blue", self, 0) .setDisplay(VALUE_DISPLAY.slider) .setMappable(15); - inputs[| 15] = nodeValueMap("Blue map", self); + inputs[15] = nodeValueMap("Blue map", self); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 16] = nodeValue_Float("Hue", self, 0) + inputs[16] = nodeValue_Float("Hue", self, 0) .setDisplay(VALUE_DISPLAY.slider) .setMappable(17); - inputs[| 17] = nodeValueMap("Hue map", self); + inputs[17] = nodeValueMap("Hue map", self); - inputs[| 18] = nodeValue_Float("Saturation", self, 0) + inputs[18] = nodeValue_Float("Saturation", self, 0) .setDisplay(VALUE_DISPLAY.slider) .setMappable(19); - inputs[| 19] = nodeValueMap("Saturation map", self); + inputs[19] = nodeValueMap("Saturation map", self); - inputs[| 20] = nodeValue_Float("Value", self, 0) + inputs[20] = nodeValue_Float("Value", self, 0) .setDisplay(VALUE_DISPLAY.slider) .setMappable(21); - inputs[| 21] = nodeValueMap("Value map", self); + inputs[21] = nodeValueMap("Value map", self); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 22] = nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Additive", "Multiply", "Screen", "Overlay" ]) + inputs[22] = nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Additive", "Multiply", "Screen", "Overlay" ]) - inputs[| 23] = nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Additive", "Multiply", "Screen" ]) + inputs[23] = nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Additive", "Multiply", "Screen" ]) - inputs[| 24] = nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Additive", "Multiply", "Screen" ]) + inputs[24] = nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Additive", "Multiply", "Screen" ]) input_display_list = [ 3, 4, 9, ["Surfaces", true], 0, 1, 2, 5, 6, @@ -79,28 +79,28 @@ function Node_Grain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con ["HSV", false], 24, /**/ 16, 17, 18, 19, 20, 21, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static step = function() { __step_mask_modifier(); - inputs[| 7].mappableStep(); + inputs[7].mappableStep(); } static processData = function(_outSurf, _data, _output_index, _array_index) { surface_set_shader(_outSurf, sh_grain); shader_set_f("seed", _data[9]); - shader_set_f_map("brightness", _data[ 7], _data[ 8], inputs[| 7]); - shader_set_f_map("red", _data[10], _data[11], inputs[| 10]); - shader_set_f_map("green", _data[12], _data[13], inputs[| 12]); - shader_set_f_map("blue", _data[14], _data[15], inputs[| 14]); + shader_set_f_map("brightness", _data[ 7], _data[ 8], inputs[ 7]); + shader_set_f_map("red", _data[10], _data[11], inputs[10]); + shader_set_f_map("green", _data[12], _data[13], inputs[12]); + shader_set_f_map("blue", _data[14], _data[15], inputs[14]); - shader_set_f_map("hue", _data[16], _data[17], inputs[| 16]); - shader_set_f_map("sat", _data[18], _data[19], inputs[| 18]); - shader_set_f_map("val", _data[20], _data[21], inputs[| 20]); + shader_set_f_map("hue", _data[16], _data[17], inputs[16]); + shader_set_f_map("sat", _data[18], _data[19], inputs[18]); + shader_set_f_map("val", _data[20], _data[21], inputs[20]); shader_set_i("bmBright", _data[22]); shader_set_i("bmRGB", _data[23]); diff --git a/scripts/node_graph_preview/node_graph_preview.gml b/scripts/node_graph_preview/node_graph_preview.gml index 1ec54f799..467ce797b 100644 --- a/scripts/node_graph_preview/node_graph_preview.gml +++ b/scripts/node_graph_preview/node_graph_preview.gml @@ -2,19 +2,19 @@ function Node_Graph_Preview(_x, _y, _group = noone) : Node(_x, _y, _group) const name = "Graph Preview"; preview_draw = true; - inputs[| 0] = nodeValue_Surface("Surface", self) + inputs[0] = nodeValue_Surface("Surface", self) .rejectArray(); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .rejectArray(); - inputs[| 2] = nodeValue_Float("Scale", self, 1) + inputs[2] = nodeValue_Float("Scale", self, 1) .rejectArray(); - inputs[| 3] = nodeValue_Bool("Sticky", self, true) + inputs[3] = nodeValue_Bool("Sticky", self, true) .rejectArray(); - inputs[| 4] = nodeValue_Float("Alpha", self, 0.5) + inputs[4] = nodeValue_Float("Alpha", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); @@ -65,7 +65,7 @@ function Node_Graph_Preview(_x, _y, _group = noone) : Node(_x, _y, _group) const var _x0 = stick? drag_sx + (_mx - drag_mx) : drag_sx + (_mx - drag_mx) / _s; var _y0 = stick? drag_sy + (_my - drag_my) : drag_sy + (_my - drag_my) / _s; - inputs[| 1].setValue([ _x0, _y0 ]); + inputs[1].setValue([ _x0, _y0 ]); if(mouse_release(mb_left)) dragging = noone; @@ -76,7 +76,7 @@ function Node_Graph_Preview(_x, _y, _group = noone) : Node(_x, _y, _group) const var _sh = surface_get_height_safe(surf); var _ss = min((_mx - drag_sx) / _sw, (_my - drag_sy) / _sh); - inputs[| 2].setValue(stick? _ss : _ss / _s); + inputs[2].setValue(stick? _ss : _ss / _s); if(mouse_release(mb_left)) dragging = noone; diff --git a/scripts/node_grey_alpha/node_grey_alpha.gml b/scripts/node_grey_alpha/node_grey_alpha.gml index 5b4f87261..f7ac269e5 100644 --- a/scripts/node_grey_alpha/node_grey_alpha.gml +++ b/scripts/node_grey_alpha/node_grey_alpha.gml @@ -1,16 +1,16 @@ function Node_Grey_Alpha(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Grey to Alpha"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Bool("Replace color", self, true, "Replace output with solid color."); + inputs[1] = nodeValue_Bool("Replace color", self, true, "Replace output with solid color."); - inputs[| 2] = nodeValue_Color("Color", self, c_white); + inputs[2] = nodeValue_Color("Color", self, c_white); - inputs[| 3] = nodeValue_Bool("Active", self, true); + inputs[3] = nodeValue_Bool("Active", self, true); active_index = 3; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 3, 0, ["Replace Color", false, 1], 2, @@ -20,7 +20,7 @@ function Node_Grey_Alpha(_x, _y, _group = noone) : Node_Processor(_x, _y, _group static step = function() { #region var _replace = getInputData(1); - inputs[| 2].setVisible(_replace); + inputs[2].setVisible(_replace); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region diff --git a/scripts/node_greyscale/node_greyscale.gml b/scripts/node_greyscale/node_greyscale.gml index 6b8efa975..5dd10186c 100644 --- a/scripts/node_greyscale/node_greyscale.gml +++ b/scripts/node_greyscale/node_greyscale.gml @@ -1,32 +1,32 @@ function Node_Greyscale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Greyscale"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Brightness", self, 0) + inputs[1] = nodeValue_Float("Brightness", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01] }) .setMappable(9); - inputs[| 2] = nodeValue_Float("Contrast", self, 1) + inputs[2] = nodeValue_Float("Contrast", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 4, 0.01] }) .setMappable(10); - inputs[| 3] = nodeValue_Surface("Mask", self); + inputs[3] = nodeValue_Surface("Mask", self); - inputs[| 4] = nodeValue_Float("Mix", self, 1) + inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Bool("Active", self, true); + inputs[5] = nodeValue_Bool("Active", self, true); active_index = 5; - inputs[| 6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(3); // inputs 7, 8 - inputs[| 9] = nodeValue_Surface("Brightness map", self) + inputs[9] = nodeValue_Surface("Brightness map", self) .setVisible(false, false); - inputs[| 10] = nodeValue_Surface("Contrast map", self) + inputs[10] = nodeValue_Surface("Contrast map", self) .setVisible(false, false); input_display_list = [ 5, 6, @@ -34,22 +34,22 @@ function Node_Greyscale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ["Greyscale", false], 1, 9, 2, 10, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static step = function() { #region __step_mask_modifier(); - inputs[| 1].mappableStep(); - inputs[| 2].mappableStep(); + inputs[1].mappableStep(); + inputs[2].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region surface_set_shader(_outSurf, sh_greyscale); - shader_set_f_map("brightness", _data[1], _data[ 9], inputs[| 1]); - shader_set_f_map("contrast", _data[2], _data[10], inputs[| 2]); + shader_set_f_map("brightness", _data[1], _data[ 9], inputs[1]); + shader_set_f_map("contrast", _data[2], _data[10], inputs[2]); draw_surface_safe(_data[0]); surface_reset_shader(); diff --git a/scripts/node_grid/node_grid.gml b/scripts/node_grid/node_grid.gml index c2e5d8793..e3a08c393 100644 --- a/scripts/node_grid/node_grid.gml +++ b/scripts/node_grid/node_grid.gml @@ -1,74 +1,74 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Grid"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 2] = nodeValue_Vector("Grid Size", self, [ 8, 8 ]) + inputs[2] = nodeValue_Vector("Grid Size", self, [ 8, 8 ]) .setMappable(13); - inputs[| 3] = nodeValue_Float("Gap", self, 0.2) + inputs[3] = nodeValue_Float("Gap", self, 0.2) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) .setMappable(14); - inputs[| 4] = nodeValue_Rotation("Angle", self, 0) + inputs[4] = nodeValue_Rotation("Angle", self, 0) .setMappable(15); - inputs[| 5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) + inputs[5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) .setMappable(20); - inputs[| 6] = nodeValue_Color("Gap color", self, c_black); + inputs[6] = nodeValue_Color("Gap color", self, c_black); - inputs[| 7] = nodeValue_Surface("Texture", self); + inputs[7] = nodeValue_Surface("Texture", self); - inputs[| 8] = nodeValue_Float("Shift", self, 0) + inputs[8] = nodeValue_Float("Shift", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-0.5, 0.5, 0.01] }) .setMappable(16); - inputs[| 9] = nodeValue_Enum_Button("Shift axis", self, 0, ["X", "Y"]); + inputs[9] = nodeValue_Enum_Button("Shift axis", self, 0, ["X", "Y"]); - inputs[| 10] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Colored tile (Accurate)", "Height map", "Texture grid", "Texture sample"]); + inputs[10] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Colored tile (Accurate)", "Height map", "Texture grid", "Texture sample"]); - inputs[| 11] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 11].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[11] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[11].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 12] = nodeValue_Bool("Anti aliasing", self, false); + inputs[12] = nodeValue_Bool("Anti aliasing", self, false); - inputs[| 13] = nodeValueMap("Scale map", self); + inputs[13] = nodeValueMap("Scale map", self); - inputs[| 14] = nodeValueMap("Gap map", self); + inputs[14] = nodeValueMap("Gap map", self); - inputs[| 15] = nodeValueMap("Angle map", self); + inputs[15] = nodeValueMap("Angle map", self); - inputs[| 16] = nodeValueMap("Shift map", self); + inputs[16] = nodeValueMap("Shift map", self); - inputs[| 17] = nodeValue_Bool("Truchet", self, false); + inputs[17] = nodeValue_Bool("Truchet", self, false); - inputs[| 18] = nodeValue_Int("Truchet seed", self, seed_random()); + inputs[18] = nodeValue_Int("Truchet seed", self, seed_random()); - inputs[| 19] = nodeValue_Float("Flip horizontal", self, 0.5) + inputs[19] = nodeValue_Float("Flip horizontal", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 20] = nodeValueMap("Gradient map", self); + inputs[20] = nodeValueMap("Gradient map", self); - inputs[| 21] = nodeValueGradientRange("Gradient map range", self, inputs[| 5]); + inputs[21] = nodeValueGradientRange("Gradient map range", self, inputs[5]); - inputs[| 22] = nodeValue_Float("Flip vertical", self, 0.5) + inputs[22] = nodeValue_Float("Flip vertical", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 23] = nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ]); + inputs[23] = nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ]); - inputs[| 24] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); + inputs[24] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); - inputs[| 25] = nodeValue_Bool("Use Texture Dimension", self, true); + inputs[25] = nodeValue_Bool("Use Texture Dimension", self, true); - inputs[| 26] = nodeValue_Float("Gap Width", self, 1); + inputs[26] = nodeValue_Float("Gap Width", self, 1); - inputs[| 27] = nodeValue_Bool("Diagonal", self, false); + inputs[27] = nodeValue_Bool("Diagonal", self, false); - inputs[| 28] = nodeValue_Bool("Uniform height", self, true); + inputs[28] = nodeValue_Bool("Uniform height", self, true); input_display_list = [ ["Output", false], 0, @@ -77,7 +77,7 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons ["Truchet", true, 17], 18, 19, 22, 23, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); @@ -85,20 +85,20 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons var hov = false; var pos = getSingleValue(1); - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; hov |= bool(hv); - var hv = inputs[| 2].drawOverlay(hover, active, _x + pos[0] * _s, _y + pos[1] * _s, _s, _mx, _my, _snx, _sny, 1); active &= !hv; hov |= bool(hv); - var hv = inputs[| 4].drawOverlay(hover, active, _x + pos[0] * _s, _y + pos[1] * _s, _s, _mx, _my, _snx, _sny); active &= !hv; hov |= bool(hv); - var hv = inputs[| 21].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !hv; hov |= bool(hv); + var hv = inputs[ 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; hov |= bool(hv); + var hv = inputs[ 2].drawOverlay(hover, active, _x + pos[0] * _s, _y + pos[1] * _s, _s, _mx, _my, _snx, _sny, 1); active &= !hv; hov |= bool(hv); + var hv = inputs[ 4].drawOverlay(hover, active, _x + pos[0] * _s, _y + pos[1] * _s, _s, _mx, _my, _snx, _sny); active &= !hv; hov |= bool(hv); + var hv = inputs[21].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !hv; hov |= bool(hv); return hov; } static step = function() { #region - inputs[| 2].mappableStep(); - inputs[| 3].mappableStep(); - inputs[| 4].mappableStep(); - inputs[| 5].mappableStep(); - inputs[| 8].mappableStep(); + inputs[2].mappableStep(); + inputs[3].mappableStep(); + inputs[4].mappableStep(); + inputs[5].mappableStep(); + inputs[8].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -110,18 +110,18 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons var _col_gap = _data[6]; var _tex_mode = _mode == 3 || _mode == 4; - inputs[| 5].setVisible(_mode == 0 || _mode == 1); - inputs[| 3].setVisible(_mode == 0 || _mode == 3 || _mode == 4); - inputs[| 24].setVisible(_mode == 2); - inputs[| 26].setVisible(_mode == 1); + inputs[ 5].setVisible(_mode == 0 || _mode == 1); + inputs[ 3].setVisible(_mode == 0 || _mode == 3 || _mode == 4); + inputs[24].setVisible(_mode == 2); + inputs[26].setVisible(_mode == 1); - inputs[| 4].setVisible(_mode != 1); - inputs[| 8].setVisible(_mode != 1); - inputs[| 9].setVisible(_mode != 1); - inputs[| 27].setVisible(_mode == 1); + inputs[ 4].setVisible(_mode != 1); + inputs[ 8].setVisible(_mode != 1); + inputs[ 9].setVisible(_mode != 1); + inputs[27].setVisible(_mode == 1); - inputs[| 7].setVisible(_tex_mode, _tex_mode); - inputs[| 25].setVisible(_tex_mode, _tex_mode); + inputs[ 7].setVisible(_tex_mode, _tex_mode); + inputs[25].setVisible(_tex_mode, _tex_mode); var _tex_dim = is_surface(_sam) && _tex_mode && _data[25]; if(_tex_dim) _dim = surface_get_dimension(_sam); @@ -132,10 +132,10 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons shader_set_f("position", _pos[0] / _dim[0], _pos[1] / _dim[1]); shader_set_f("dimension", _dim[0], _dim[1]); - shader_set_f_map("scale", _data[ 2], _data[13], inputs[| 2]); - shader_set_f_map("width", _data[ 3], _data[14], inputs[| 3]); - shader_set_f_map("angle", _data[ 4], _data[15], inputs[| 4]); - shader_set_f_map("shift", _data[ 8], _data[16], inputs[| 8]); + shader_set_f_map("scale", _data[ 2], _data[13], inputs[2]); + shader_set_f_map("width", _data[ 3], _data[14], inputs[3]); + shader_set_f_map("angle", _data[ 4], _data[15], inputs[4]); + shader_set_f_map("shift", _data[ 8], _data[16], inputs[8]); shader_set_i("mode", _mode); shader_set_f("seed", _data[11]); @@ -153,7 +153,7 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons shader_set_color("gapCol", _col_gap); - shader_set_gradient(_data[5], _data[20], _data[21], inputs[| 5]); + shader_set_gradient(_data[5], _data[20], _data[21], inputs[5]); if(is_surface(_sam)) draw_surface_stretched_safe(_sam, 0, 0, _dim[0], _dim[1]); else draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1); diff --git a/scripts/node_grid_hex/node_grid_hex.gml b/scripts/node_grid_hex/node_grid_hex.gml index b53221b8e..7d847e081 100644 --- a/scripts/node_grid_hex/node_grid_hex.gml +++ b/scripts/node_grid_hex/node_grid_hex.gml @@ -1,65 +1,65 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Hexagonal Grid"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 2, 2 ]) + inputs[2] = nodeValue_Vector("Scale", self, [ 2, 2 ]) .setMappable(11); - inputs[| 3] = nodeValue_Rotation("Angle", self, 0) + inputs[3] = nodeValue_Rotation("Angle", self, 0) .setMappable(12); - inputs[| 4] = nodeValue_Float("Gap", self, 0.1) + inputs[4] = nodeValue_Float("Gap", self, 0.1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) .setMappable(13); - inputs[| 5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) + inputs[5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) .setMappable(17); - inputs[| 6] = nodeValue_Color("Gap color", self, c_black); + inputs[6] = nodeValue_Color("Gap color", self, c_black); - inputs[| 7] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid", "Texture sample"]); + inputs[7] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid", "Texture sample"]); - inputs[| 8] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[8] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 9] = nodeValue_Surface("Texture", self); + inputs[9] = nodeValue_Surface("Texture", self); - inputs[| 10] = nodeValue_Bool("Anti aliasing", self, false); + inputs[10] = nodeValue_Bool("Anti aliasing", self, false); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValueMap("Scale map", self); + inputs[11] = nodeValueMap("Scale map", self); - inputs[| 12] = nodeValueMap("Angle map", self); + inputs[12] = nodeValueMap("Angle map", self); - inputs[| 13] = nodeValueMap("Gap map", self); + inputs[13] = nodeValueMap("Gap map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 14] = nodeValue_Bool("Truchet", self, false); + inputs[14] = nodeValue_Bool("Truchet", self, false); - inputs[| 15] = nodeValue_Int("Truchet seed", self, seed_random()); + inputs[15] = nodeValue_Int("Truchet seed", self, seed_random()); - inputs[| 16] = nodeValue_Float("Truchet threshold", self, 0.5) + inputs[16] = nodeValue_Float("Truchet threshold", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 17] = nodeValueMap("Gradient map", self); + inputs[17] = nodeValueMap("Gradient map", self); - inputs[| 18] = nodeValueGradientRange("Gradient map range", self, inputs[| 5]); + inputs[18] = nodeValueGradientRange("Gradient map range", self, inputs[5]); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 19] = nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ]); + inputs[19] = nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ]); - inputs[| 20] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); + inputs[20] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); - inputs[| 21] = nodeValue_Bool("Use Texture Dimension", self, true); + inputs[21] = nodeValue_Bool("Use Texture Dimension", self, true); input_display_list = [ ["Output", false], 0, @@ -68,23 +68,23 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ["Truchet", true, 14], 15, 16, 19, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var a = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; _hov |= a; - var a = inputs[| 18].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; _hov |= a; + var a = inputs[ 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; _hov |= a; + var a = inputs[18].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; _hov |= a; return _hov; } static step = function() { - inputs[| 2].mappableStep(); - inputs[| 3].mappableStep(); - inputs[| 4].mappableStep(); - inputs[| 5].mappableStep(); + inputs[2].mappableStep(); + inputs[3].mappableStep(); + inputs[4].mappableStep(); + inputs[5].mappableStep(); } static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -96,12 +96,12 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var _col_gap = _data[6]; var _tex_mode = _mode == 2 || _mode == 3; - inputs[| 5].setVisible(_mode == 0); - inputs[| 6].setVisible(_mode != 1); - inputs[| 20].setVisible(_mode == 1); + inputs[ 5].setVisible(_mode == 0); + inputs[ 6].setVisible(_mode != 1); + inputs[20].setVisible(_mode == 1); - inputs[| 9].setVisible(_tex_mode, _tex_mode); - inputs[| 21].setVisible(_tex_mode, _tex_mode); + inputs[ 9].setVisible(_tex_mode, _tex_mode); + inputs[21].setVisible(_tex_mode, _tex_mode); var _tex_dim = is_surface(_sam) && _tex_mode && _data[21]; if(_tex_dim) _dim = surface_get_dimension(_sam); @@ -112,9 +112,9 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) shader_set_f("dimension", _dim[0], _dim[1]); shader_set_f("position", _pos[0] / _dim[0], _pos[1] / _dim[1]); - shader_set_f_map("scale", _data[ 2], _data[11], inputs[| 2]); - shader_set_f_map("angle", _data[ 3], _data[12], inputs[| 3]); - shader_set_f_map("thick", _data[ 4], _data[13], inputs[| 4]); + shader_set_f_map("scale", _data[ 2], _data[11], inputs[2]); + shader_set_f_map("angle", _data[ 3], _data[12], inputs[3]); + shader_set_f_map("thick", _data[ 4], _data[13], inputs[4]); shader_set_f("seed", _data[ 8]); shader_set_i("mode", _mode); @@ -127,7 +127,7 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) shader_set_2("truchetAngle", _data[19]); shader_set_2("level", _data[20]); - shader_set_gradient(_data[5], _data[17], _data[18], inputs[| 5]); + shader_set_gradient(_data[5], _data[17], _data[18], inputs[5]); if(is_surface(_sam)) draw_surface_stretched_safe(_sam, 0, 0, _dim[0], _dim[1]); else draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1); diff --git a/scripts/node_grid_noise/node_grid_noise.gml b/scripts/node_grid_noise/node_grid_noise.gml index 36c89d122..bc8dd89d9 100644 --- a/scripts/node_grid_noise/node_grid_noise.gml +++ b/scripts/node_grid_noise/node_grid_noise.gml @@ -1,30 +1,30 @@ function Node_Grid_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Grid Noise"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 8, 8 ]); + inputs[2] = nodeValue_Vector("Scale", self, [ 8, 8 ]); - inputs[| 3] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 4] = nodeValue_Float("Shift", self, 0) + inputs[4] = nodeValue_Float("Shift", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-0.5, 0.5, 0.01] }); - inputs[| 5] = nodeValue_Surface("Texture sample", self); + inputs[5] = nodeValue_Surface("Texture sample", self); - inputs[| 6] = nodeValue_Enum_Button("Shift axis", self, 0, ["x", "y"]); + inputs[6] = nodeValue_Enum_Button("Shift axis", self, 0, ["x", "y"]); - inputs[| 7] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); + inputs[7] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); - inputs[| 8] = nodeValue_Slider_Range("Color R range", self, [ 0, 1 ]); + inputs[8] = nodeValue_Slider_Range("Color R range", self, [ 0, 1 ]); - inputs[| 9] = nodeValue_Slider_Range("Color G range", self, [ 0, 1 ]); + inputs[9] = nodeValue_Slider_Range("Color G range", self, [ 0, 1 ]); - inputs[| 10] = nodeValue_Slider_Range("Color B range", self, [ 0, 1 ]); + inputs[10] = nodeValue_Slider_Range("Color B range", self, [ 0, 1 ]); input_display_list = [ ["Output", false], 0, @@ -32,13 +32,13 @@ function Node_Grid_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group ["Render", false], 5, 7, 8, 9, 10, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } diff --git a/scripts/node_grid_pentagonal/node_grid_pentagonal.gml b/scripts/node_grid_pentagonal/node_grid_pentagonal.gml index b2f439594..ecd8fb3ab 100644 --- a/scripts/node_grid_pentagonal/node_grid_pentagonal.gml +++ b/scripts/node_grid_pentagonal/node_grid_pentagonal.gml @@ -1,52 +1,52 @@ function Node_Grid_Pentagonal(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Pentagonal Grid"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 4, 4 ]) + inputs[2] = nodeValue_Vector("Scale", self, [ 4, 4 ]) .setMappable(11); - inputs[| 3] = nodeValue_Float("Gap", self, 0.1) + inputs[3] = nodeValue_Float("Gap", self, 0.1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) .setMappable(12); - inputs[| 4] = nodeValue_Rotation("Angle", self, 0) + inputs[4] = nodeValue_Rotation("Angle", self, 0) .setMappable(13); - inputs[| 5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) + inputs[5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) .setMappable(14); - inputs[| 6] = nodeValue_Color("Gap color", self, c_black); + inputs[6] = nodeValue_Color("Gap color", self, c_black); - inputs[| 7] = nodeValue_Surface("Texture", self); + inputs[7] = nodeValue_Surface("Texture", self); - inputs[| 8] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]); + inputs[8] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]); - inputs[| 9] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 9].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[9] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[9].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 10] = nodeValue_Bool("Anti aliasing", self, false); + inputs[10] = nodeValue_Bool("Anti aliasing", self, false); ///////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValueMap("Scale map", self); + inputs[11] = nodeValueMap("Scale map", self); - inputs[| 12] = nodeValueMap("Gap map", self); + inputs[12] = nodeValueMap("Gap map", self); - inputs[| 13] = nodeValueMap("Angle map", self); + inputs[13] = nodeValueMap("Angle map", self); - inputs[| 14] = nodeValueMap("Gradient map", self); + inputs[14] = nodeValueMap("Gradient map", self); - inputs[| 15] = nodeValueGradientRange("Gradient map range", self, inputs[| 5]); + inputs[15] = nodeValueGradientRange("Gradient map range", self, inputs[5]); ///////////////////////////////////////////////////////////////////// - inputs[| 16] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); + inputs[16] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); - inputs[| 17] = nodeValue_Bool("Use Texture Dimension", self, true); + inputs[17] = nodeValue_Bool("Use Texture Dimension", self, true); input_display_list = [ ["Output", false], 0, @@ -54,23 +54,23 @@ function Node_Grid_Pentagonal(_x, _y, _group = noone) : Node_Processor(_x, _y, _ ["Render", false], 8, 9, 5, 14, 6, 7, 17, 10, 16, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; - var hv = inputs[| 15].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !hv; _hov |= hv; + var hv = inputs[ 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; + var hv = inputs[15].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !hv; _hov |= hv; return _hov; } static step = function() { #region - inputs[| 2].mappableStep(); - inputs[| 3].mappableStep(); - inputs[| 4].mappableStep(); - inputs[| 5].mappableStep(); + inputs[2].mappableStep(); + inputs[3].mappableStep(); + inputs[4].mappableStep(); + inputs[5].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -82,12 +82,12 @@ function Node_Grid_Pentagonal(_x, _y, _group = noone) : Node_Processor(_x, _y, _ var _col_gap = _data[6]; var _tex_mode = _mode == 2 || _mode == 3; - inputs[| 5].setVisible(_mode == 0); - inputs[| 6].setVisible(_mode != 1); - inputs[| 16].setVisible(_mode == 1); + inputs[ 5].setVisible(_mode == 0); + inputs[ 6].setVisible(_mode != 1); + inputs[16].setVisible(_mode == 1); - inputs[| 7].setVisible(_tex_mode, _tex_mode); - inputs[| 17].setVisible(_tex_mode, _tex_mode); + inputs[ 7].setVisible(_tex_mode, _tex_mode); + inputs[17].setVisible(_tex_mode, _tex_mode); var _tex_dim = is_surface(_sam) && _tex_mode && _data[17]; if(_tex_dim) _dim = surface_get_dimension(_sam); @@ -97,9 +97,9 @@ function Node_Grid_Pentagonal(_x, _y, _group = noone) : Node_Processor(_x, _y, _ shader_set_f("position", _pos[0] / _dim[0], _pos[1] / _dim[1]); shader_set_f("dimension", _dim[0], _dim[1]); - shader_set_f_map("scale", _data[ 2], _data[11], inputs[| 2]); - shader_set_f_map("width", _data[ 3], _data[12], inputs[| 3]); - shader_set_f_map("angle", _data[ 4], _data[13], inputs[| 4]); + shader_set_f_map("scale", _data[ 2], _data[11], inputs[2]); + shader_set_f_map("width", _data[ 3], _data[12], inputs[3]); + shader_set_f_map("angle", _data[ 4], _data[13], inputs[4]); shader_set_i("mode", _mode); shader_set_f("seed", _data[ 9]); @@ -108,7 +108,7 @@ function Node_Grid_Pentagonal(_x, _y, _group = noone) : Node_Processor(_x, _y, _ shader_set_color("gapCol", _col_gap); - shader_set_gradient(_data[5], _data[14], _data[15], inputs[| 5]); + shader_set_gradient(_data[5], _data[14], _data[15], inputs[5]); if(is_surface(_sam)) draw_surface_stretched_safe(_sam, 0, 0, _dim[0], _dim[1]); else draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1); diff --git a/scripts/node_grid_tri/node_grid_tri.gml b/scripts/node_grid_tri/node_grid_tri.gml index f024d0ee1..cbd60a707 100644 --- a/scripts/node_grid_tri/node_grid_tri.gml +++ b/scripts/node_grid_tri/node_grid_tri.gml @@ -1,65 +1,65 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Triangle Grid"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 2, 2 ]) + inputs[2] = nodeValue_Vector("Scale", self, [ 2, 2 ]) .setMappable(11); - inputs[| 3] = nodeValue_Float("Gap", self, 0.1) + inputs[3] = nodeValue_Float("Gap", self, 0.1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) .setMappable(12); - inputs[| 4] = nodeValue_Rotation("Angle", self, 0) + inputs[4] = nodeValue_Rotation("Angle", self, 0) .setMappable(13); - inputs[| 5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) + inputs[5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) .setMappable(17); - inputs[| 6] = nodeValue_Color("Gap color", self, c_black); + inputs[6] = nodeValue_Color("Gap color", self, c_black); - inputs[| 7] = nodeValue_Surface("Texture", self); + inputs[7] = nodeValue_Surface("Texture", self); - inputs[| 8] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid", "Texture sample"]); + inputs[8] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid", "Texture sample"]); - inputs[| 9] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 9].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[9] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[9].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 10] = nodeValue_Bool("Anti aliasing", self, false); + inputs[10] = nodeValue_Bool("Anti aliasing", self, false); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValueMap("Scale map", self); + inputs[11] = nodeValueMap("Scale map", self); - inputs[| 12] = nodeValueMap("Gap map", self); + inputs[12] = nodeValueMap("Gap map", self); - inputs[| 13] = nodeValueMap("Angle map", self); + inputs[13] = nodeValueMap("Angle map", self); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 14] = nodeValue_Bool("Truchet", self, false); + inputs[14] = nodeValue_Bool("Truchet", self, false); - inputs[| 15] = nodeValue_Int("Truchet seed", self, seed_random()); + inputs[15] = nodeValue_Int("Truchet seed", self, seed_random()); - inputs[| 16] = nodeValue_Float("Truchet threshold", self, 0.5) + inputs[16] = nodeValue_Float("Truchet threshold", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 17] = nodeValueMap("Gradient map", self); + inputs[17] = nodeValueMap("Gradient map", self); - inputs[| 18] = nodeValueGradientRange("Gradient map range", self, inputs[| 5]); + inputs[18] = nodeValueGradientRange("Gradient map range", self, inputs[5]); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 19] = nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ]); + inputs[19] = nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ]); - inputs[| 20] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); + inputs[20] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); - inputs[| 21] = nodeValue_Bool("Use Texture Dimension", self, true); + inputs[21] = nodeValue_Bool("Use Texture Dimension", self, true); input_display_list = [ ["Output", false], 0, @@ -68,23 +68,23 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ["Truchet", true, 14], 15, 16, 19, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; - var hv = inputs[| 18].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !hv; _hov |= hv; + var hv = inputs[ 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; + var hv = inputs[18].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !hv; _hov |= hv; return _hov; } static step = function() { - inputs[| 2].mappableStep(); - inputs[| 3].mappableStep(); - inputs[| 4].mappableStep(); - inputs[| 5].mappableStep(); + inputs[2].mappableStep(); + inputs[3].mappableStep(); + inputs[4].mappableStep(); + inputs[5].mappableStep(); } static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -98,12 +98,12 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var _col_gap = _data[6]; var _tex_mode = _mode == 2 || _mode == 3; - inputs[| 5].setVisible(_mode == 0); - inputs[| 6].setVisible(_mode != 1); - inputs[| 20].setVisible(_mode == 1); + inputs[ 5].setVisible(_mode == 0); + inputs[ 6].setVisible(_mode != 1); + inputs[20].setVisible(_mode == 1); - inputs[| 7].setVisible(_tex_mode, _tex_mode); - inputs[| 21].setVisible(_tex_mode, _tex_mode); + inputs[ 7].setVisible(_tex_mode, _tex_mode); + inputs[21].setVisible(_tex_mode, _tex_mode); var _tex_dim = is_surface(_sam) && _tex_mode && _data[21]; if(_tex_dim) _dim = surface_get_dimension(_sam); @@ -114,9 +114,9 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) shader_set_f("position", _pos[0] / _dim[0], _pos[1] / _dim[1]); shader_set_f("dimension", _dim[0], _dim[1]); - shader_set_f_map("scale", _data[2], _data[11], inputs[| 2]); - shader_set_f_map("width", _data[3], _data[12], inputs[| 3]); - shader_set_f_map("angle", _data[4], _data[13], inputs[| 4]); + shader_set_f_map("scale", _data[2], _data[11], inputs[2]); + shader_set_f_map("width", _data[3], _data[12], inputs[3]); + shader_set_f_map("angle", _data[4], _data[13], inputs[4]); shader_set_f("seed", _sed); shader_set_i("mode", _mode); @@ -129,7 +129,7 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) shader_set_2("truchetAngle", _data[19]); shader_set_2("level", _data[20]); - shader_set_gradient(_data[5], _data[17], _data[18], inputs[| 5]); + shader_set_gradient(_data[5], _data[17], _data[18], inputs[5]); if(is_surface(_sam)) draw_surface_stretched_safe(_sam, 0, 0, _dim[0], _dim[1]); else draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1); diff --git a/scripts/node_group_input/node_group_input.gml b/scripts/node_group_input/node_group_input.gml index 78bcfce92..016a180ab 100644 --- a/scripts/node_group_input/node_group_input.gml +++ b/scripts/node_group_input/node_group_input.gml @@ -78,65 +78,68 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru skipDefault(); setDimension(96, 32 + 24); - inputs[| 0] = nodeValue_Enum_Scroll("Display type", self, 0, { data: GROUP_IO_DISPLAY[11], update_hover: false }); + inputs[0] = nodeValue_Enum_Scroll("Display type", self, 0, { data: GROUP_IO_DISPLAY[11], update_hover: false }); - inputs[| 1] = nodeValue_Range("Range", self, [ 0, 1 ]) + inputs[1] = nodeValue_Range("Range", self, [ 0, 1 ]) .setVisible(false); - inputs[| 2] = nodeValue_Enum_Scroll("Input type", self, 11, { data: GROUP_IO_TYPE_NAME, update_hover: false }); + inputs[2] = nodeValue_Enum_Scroll("Input type", self, 11, { data: GROUP_IO_TYPE_NAME, update_hover: false }); - inputs[| 3] = nodeValue_Text("Enum label", self, "") + inputs[3] = nodeValue_Text("Enum label", self, "") .setVisible(false); - inputs[| 4] = nodeValue_Enum_Button("Vector size", self, 0, [ "2", "3", "4" ]) + inputs[4] = nodeValue_Enum_Button("Vector size", self, 0, [ "2", "3", "4" ]) .setVisible(false); - inputs[| 5] = nodeValue_Int("Order", self, 0); + inputs[5] = nodeValue_Int("Order", self, 0); - inputs[| 6] = nodeValue_Bool("Display preview gizmo", self, true); + inputs[6] = nodeValue_Bool("Display preview gizmo", self, true); - inputs[| 7] = nodeValue_Float("Step", self, 0.01) + inputs[7] = nodeValue_Float("Step", self, 0.01) .setVisible(false); - inputs[| 8] = nodeValue_Text("Button Label", self, "Trigger") + inputs[8] = nodeValue_Text("Button Label", self, "Trigger") .setVisible(false); - inputs[| 9] = nodeValue_Enum_Scroll("Visible Condition", self, 0, [ "Show", "Hide", /* 2 */ new scrollItem("Equal", s_node_condition_type, 0), + inputs[9] = nodeValue_Enum_Scroll("Visible Condition", self, 0, [ "Show", "Hide", /* 2 */ new scrollItem("Equal", s_node_condition_type, 0), /* 3 */ new scrollItem("Not equal", s_node_condition_type, 1), /* 4 */ new scrollItem("Greater ", s_node_condition_type, 4), /* 5 */ new scrollItem("Greater or equal", s_node_condition_type, 5), /* 6 */ new scrollItem("Lesser", s_node_condition_type, 2), /* 7 */ new scrollItem("Lesser or equal", s_node_condition_type, 3), ]); - inputs[| 10] = nodeValue_Float("Visible Check", self, 0); + inputs[10] = nodeValue_Float("Visible Check", self, 0); - inputs[| 11] = nodeValue_Float("Visible Check To", self, 0); + inputs[11] = nodeValue_Float("Visible Check To", self, 0); - inputs[| 10].setFrom_condition = function(_valueFrom) { + inputs[10].setFrom_condition = function(_valueFrom) { if(is_instanceof(_valueFrom.node, Node_Group_Input)) return true; noti_warning("Group IO visibility must be connected directly to another group input.",, self); return false; } - for( var i = 0, n = ds_list_size(inputs); i < n; i++ ) - inputs[| i].uncache().rejectArray(); + for( var i = 0, n = array_length(inputs); i < n; i++ ) + inputs[i].uncache().rejectArray(); input_display_list = [ ["Display", false], 6, 9, 10, 11, ["Data", false], 2, 0, 4, 1, 7, 3, 8, ]; - outputs[| 0] = nodeValue_Output("Value", self, VALUE_TYPE.any, 0) + outputs[0] = nodeValue_Output("Value", self, VALUE_TYPE.any, 0) .uncache(); attributes.inherit_name = true; attributes.inherit_type = true; doTrigger = 0; + dtype = -1; + range = 0; + onSetDisplayName = function() { attributes.inherit_name = false; } - outputs[| 0].onSetTo = function(juncTo) { + outputs[0].onSetTo = function(juncTo) { if(attributes.inherit_name && !LOADING && !APPENDING) setDisplayName(juncTo.name); @@ -146,10 +149,10 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru var ind = array_find(GROUP_IO_TYPE_MAP, juncTo.type); if(ind == -1) return; - if(ind == inputs[| 2].getValue()) return; + if(ind == inputs[2].getValue()) return; - outputs[| 0].setType(juncTo.type); - inputs[| 2].setValue(ind); + outputs[0].setType(juncTo.type); + inputs[2].setValue(ind); } static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { @@ -161,18 +164,18 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru if(!active) return false; if(!isRenderActive()) return false; - for(var j = 0; j < 9; j++) if(!inputs[| j].isRendered()) return false; + for(var j = 0; j < 9; j++) if(!inputs[j].isRendered()) return false; return true; } static visibleCheck = function() { - var _vty = inputs[| 9].getValue(); + var _vty = inputs[ 9].getValue(); - inputs[| 10].setVisible(_vty >= 2, _vty >= 2); - inputs[| 11].setVisible(_vty >= 2); + inputs[10].setVisible(_vty >= 2, _vty >= 2); + inputs[11].setVisible(_vty >= 2); - var _val = inputs[| 10].getValue(); - var _vto = inputs[| 11].getValue(); + var _val = inputs[10].getValue(); + var _vto = inputs[11].getValue(); var _vis = true; switch(_vty) { @@ -211,8 +214,8 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru var _step = getInputData(7); if(index == 2) { - if(outputs[| 0].type != _val_type) { - var _o = outputs[| 0]; + if(outputs[0].type != _val_type) { + var _o = outputs[0]; for(var j = 0; j < array_length(_o.value_to); j++) { var _to = _o.value_to[j]; if(_to.value_from == _o) @@ -220,14 +223,14 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru } } - inputs[| 0].setValue(0); + inputs[0].setValue(0); attributes.inherit_type = false; } _dtype = array_safe_get_fast(array_safe_get_fast(GROUP_IO_DISPLAY, _val_type), _dtype); inParent.setType(_val_type); - outputs[| 0].setType(_val_type); + outputs[0].setType(_val_type); var _val = inParent.getValue(); switch(_dtype) { @@ -334,7 +337,7 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru case "Gradient": inParent.setType(VALUE_TYPE.gradient); - outputs[| 0].setType(inParent.type); + outputs[0].setType(inParent.type); inParent.animator = new valueAnimator(new gradientObject(cola(c_white)), inParent); @@ -371,15 +374,14 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru if(group == noone || !is_struct(group)) return noone; if(!is_undefined(inParent)) - ds_list_remove(group.inputs, inParent); + array_remove(group.inputs, inParent); inParent = nodeValue("Value", group, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1) .uncache() .setVisible(true, true); inParent.from = self; - ds_list_add(group.inputs, inParent); - outputs[| 0].setFrom(inParent, false, false); + array_push(group.inputs, inParent); if(!LOADING && !APPENDING) { group.refreshNodeDisplay(); @@ -390,12 +392,8 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru return inParent; } - if(!LOADING && !APPENDING) createInput(); - dtype = -1; - range = 0; - static step = function() { if(is_undefined(inParent)) return; @@ -403,8 +401,8 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru var _dsList = array_safe_get_fast(GROUP_IO_DISPLAY, _type); if(_dsList == 0) _dsList = [ "Default" ]; - inputs[| 0].display_data.data = _dsList; - inputs[| 0].editWidget.data_list = _dsList; + inputs[0].display_data.data = _dsList; + inputs[0].editWidget.data_list = _dsList; if(inParent.name != display_name) { inParent.name = display_name; @@ -413,10 +411,11 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru if(inParent.type == VALUE_TYPE.trigger) { if(doTrigger == 1) { - outputs[| 0].setValue(true); + outputs[0].setValue(true); doTrigger = -1; + } else if(doTrigger == -1) { - outputs[| 0].setValue(false); + outputs[0].setValue(false); doTrigger = 0; } } @@ -428,31 +427,31 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru var _datype = array_safe_get_fast(GROUP_IO_TYPE_MAP, _data, VALUE_TYPE.any); - inputs[| 1].setVisible(false); - inputs[| 3].setVisible(false); - inputs[| 4].setVisible(false); - inputs[| 7].setVisible(false); - inputs[| 8].setVisible(_datype == VALUE_TYPE.trigger); + inputs[1].setVisible(false); + inputs[3].setVisible(false); + inputs[4].setVisible(false); + inputs[7].setVisible(false); + inputs[8].setVisible(_datype == VALUE_TYPE.trigger); switch(_dstype) { case "Slider" : case "Slider range" : - inputs[| 7].setVisible(true); - inputs[| 1].setVisible(true); + inputs[7].setVisible(true); + inputs[1].setVisible(true); break; case "Range" : - inputs[| 1].setVisible(true); + inputs[1].setVisible(true); break; case "Enum button" : case "Menu scroll" : - inputs[| 3].setVisible(true); + inputs[3].setVisible(true); break; case "Vector" : case "Vector range" : - inputs[| 4].setVisible(true); + inputs[4].setVisible(true); break; } } @@ -460,9 +459,11 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru static update = function(frame = CURRENT_FRAME) { if(is_undefined(inParent)) return; visibleCheck(); + + outputs[0].setValue(inParent.getValue()); } - static getGraphPreviewSurface = function() { return inputs[| 0].getValue(); } + static getGraphPreviewSurface = function() { return inputs[0].getValue(); } static postDeserialize = function() { createInput(false); } @@ -480,7 +481,7 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru static onDestroy = function() { if(is_undefined(inParent)) return; - ds_list_remove(group.inputs, inParent); + array_remove(group.inputs, inParent); group.sortIO(); group.refreshNodes(); } @@ -488,9 +489,9 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru static onUngroup = function() { var fr = inParent.value_from; - for( var i = 0; i < array_length(outputs[| 0].value_to); i++ ) { - var to = outputs[| 0].value_to[i]; - if(to.value_from != outputs[| 0]) continue; + for( var i = 0; i < array_length(outputs[0].value_to); i++ ) { + var to = outputs[0].value_to[i]; + if(to.value_from != outputs[0]) continue; to.setFrom(fr); } diff --git a/scripts/node_group_output/node_group_output.gml b/scripts/node_group_output/node_group_output.gml index d14d87df7..f27cd9723 100644 --- a/scripts/node_group_output/node_group_output.gml +++ b/scripts/node_group_output/node_group_output.gml @@ -7,10 +7,10 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr skipDefault(); setDimension(96, 32 + 24); - inputs[| 0] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1) + inputs[0] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1) .uncache() .setVisible(true, true); - inputs[| 0].onSetFrom = function(juncFrom) /*=>*/ { if(attributes.inherit_name && !LOADING && !APPENDING) setDisplayName(juncFrom.name); } + inputs[0].onSetFrom = function(juncFrom) /*=>*/ { if(attributes.inherit_name && !LOADING && !APPENDING) setDisplayName(juncFrom.name); } attributes.inherit_name = true; outParent = undefined; @@ -52,14 +52,14 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr if(group == noone) return; if(!is_struct(group)) return; - if(!is_undefined(outParent)) ds_list_remove(group.outputs, outParent); + if(!is_undefined(outParent)) array_remove(group.outputs, outParent); outParent = nodeValue("Value", group, JUNCTION_CONNECT.output, VALUE_TYPE.any, -1) .uncache() .setVisible(true, true); outParent.from = self; - ds_list_add(group.outputs, outParent); + array_push(group.outputs, outParent); if(!LOADING && !APPENDING) { group.refreshNodeDisplay(); @@ -67,8 +67,6 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr group.setHeight(); } - outParent.setFrom(inputs[| 0]); - } if(!LOADING && !APPENDING) createOutput(); static step = function() { @@ -76,7 +74,7 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr outParent.name = display_name; - var _in0 = inputs[| 0]; + var _in0 = inputs[0]; var _pty = _in0.type; var _typ = _in0.value_from == noone? VALUE_TYPE.any : _in0.value_from.type; var _dis = _in0.value_from == noone? VALUE_DISPLAY._default : _in0.value_from.display_type; @@ -90,14 +88,18 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr if(group && _pty != _typ) group.setHeight(); } - static getGraphPreviewSurface = function() { return inputs[| 0].getValue(); } + static update = function() { + outParent.setValue(inputs[0].getValue()); + } + + static getGraphPreviewSurface = function() { return inputs[0].getValue(); } static postDeserialize = function() { if(group == noone) return; createOutput(false); } static doApplyDeserialize = function() {} static onDestroy = function() { if(is_undefined(outParent)) return; - ds_list_remove(group.outputs, outParent); + array_remove(group.outputs, outParent); group.sortIO(); group.refreshNodes(); @@ -109,7 +111,7 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr } static onUngroup = function() { - var fr = inputs[| 0].value_from; + var fr = inputs[0].value_from; for( var i = 0; i < array_length(outParent.value_to); i++ ) { var to = outParent.value_to[i]; diff --git a/scripts/node_group_thumbnail/node_group_thumbnail.gml b/scripts/node_group_thumbnail/node_group_thumbnail.gml index 0ac81f1b1..a3860ca60 100644 --- a/scripts/node_group_thumbnail/node_group_thumbnail.gml +++ b/scripts/node_group_thumbnail/node_group_thumbnail.gml @@ -3,10 +3,10 @@ function Node_Group_Thumbnail(_x, _y, _group = noone) : Node(_x, _y, _group) con destroy_when_upgroup = true; color = COLORS.node_blend_collection; - inputs[| 0] = nodeValue_Surface("Input", self) + inputs[0] = nodeValue_Surface("Input", self) .setVisible(true, true); - outputs[| 0] = nodeValue_Surface("Output", self) + outputs[0] = nodeValue_Surface("Output", self) .setVisible(false, false); static getGraphPreviewSurface = function() { #region diff --git a/scripts/node_guide/node_guide.gml b/scripts/node_guide/node_guide.gml index 4be2db615..8cfd6daad 100644 --- a/scripts/node_guide/node_guide.gml +++ b/scripts/node_guide/node_guide.gml @@ -35,31 +35,31 @@ function __generate_node_data() { #region var _lin = [], _lot = []; var _din = [], _dot = []; - for( var i = 0; i < ds_list_size(_b.inputs); i++ ) { - _din[i] = variable_clone(_b.inputs[| i], 1); + for( var i = 0; i < array_length(_b.inputs); i++ ) { + _din[i] = variable_clone(_b.inputs[i], 1); _jin[i] = { - type: _b.inputs[| i].type, - visible: _b.inputs[| i].visible? 1 : 0, + type: _b.inputs[i].type, + visible: _b.inputs[i].visible? 1 : 0, }; _lin[i] = { - name: _b.inputs[| i]._initName, - tooltip: _b.inputs[| i].tooltip, + name: _b.inputs[i]._initName, + tooltip: _b.inputs[i].tooltip, }; } - for( var i = 0; i < ds_list_size(_b.outputs); i++ ) { - _dot[i] = variable_clone(_b.outputs[| i], 1); + for( var i = 0; i < array_length(_b.outputs); i++ ) { + _dot[i] = variable_clone(_b.outputs[i], 1); _jot[i] = { - type: _b.outputs[| i].type, - visible: _b.outputs[| i].visible? 1 : 0, + type: _b.outputs[i].type, + visible: _b.outputs[i].visible? 1 : 0, }; _lot[i] = { - name: _b.outputs[| i]._initName, - tooltip: _b.outputs[| i].tooltip, + name: _b.outputs[i]._initName, + tooltip: _b.outputs[i].tooltip, }; } diff --git a/scripts/node_herringbone_tile/node_herringbone_tile.gml b/scripts/node_herringbone_tile/node_herringbone_tile.gml index 4b09e2599..7e13ae92e 100644 --- a/scripts/node_herringbone_tile/node_herringbone_tile.gml +++ b/scripts/node_herringbone_tile/node_herringbone_tile.gml @@ -1,65 +1,65 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Herringbone Tile"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 4, 4 ]) + inputs[2] = nodeValue_Vector("Scale", self, [ 4, 4 ]) .setMappable(11); - inputs[| 3] = nodeValue_Rotation("Angle", self, 0) + inputs[3] = nodeValue_Rotation("Angle", self, 0) .setMappable(12); - inputs[| 4] = nodeValue_Float("Gap", self, 0.25) + inputs[4] = nodeValue_Float("Gap", self, 0.25) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) .setMappable(13); - inputs[| 5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) + inputs[5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) .setMappable(18); - inputs[| 6] = nodeValue_Color("Gap color", self, c_black); + inputs[6] = nodeValue_Color("Gap color", self, c_black); - inputs[| 7] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]); + inputs[7] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]); - inputs[| 8] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[8] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 9] = nodeValue_Surface("Texture", self); + inputs[9] = nodeValue_Surface("Texture", self); - inputs[| 10] = nodeValue_Bool("Anti aliasing", self, false); + inputs[10] = nodeValue_Bool("Anti aliasing", self, false); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValueMap("Scale map", self); + inputs[11] = nodeValueMap("Scale map", self); - inputs[| 12] = nodeValueMap("Angle map", self); + inputs[12] = nodeValueMap("Angle map", self); - inputs[| 13] = nodeValueMap("Gap map", self); + inputs[13] = nodeValueMap("Gap map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 14] = nodeValue_Bool("Truchet", self, false); + inputs[14] = nodeValue_Bool("Truchet", self, false); - inputs[| 15] = nodeValue_Int("Truchet seed", self, seed_random()); + inputs[15] = nodeValue_Int("Truchet seed", self, seed_random()); - inputs[| 16] = nodeValue_Float("Truchet threshold", self, 0.5) + inputs[16] = nodeValue_Float("Truchet threshold", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) - inputs[| 17] = nodeValue_Float("Tile length", self, 2); + inputs[17] = nodeValue_Float("Tile length", self, 2); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 18] = nodeValueMap("Gradient map", self); + inputs[18] = nodeValueMap("Gradient map", self); - inputs[| 19] = nodeValueGradientRange("Gradient map range", self, inputs[| 5]); + inputs[19] = nodeValueGradientRange("Gradient map range", self, inputs[5]); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 20] = nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ]); + inputs[20] = nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ]); - inputs[| 21] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); + inputs[21] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); input_display_list = [ ["Output", false], 0, @@ -68,23 +68,23 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, ["Truchet", true, 14], 15, 16, 20, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; - var hv = inputs[| 19].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !hv; _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; + var hv = inputs[19].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !hv; _hov |= hv; return _hov; } static step = function() { #region - inputs[| 2].mappableStep(); - inputs[| 3].mappableStep(); - inputs[| 4].mappableStep(); - inputs[| 5].mappableStep(); + inputs[2].mappableStep(); + inputs[3].mappableStep(); + inputs[4].mappableStep(); + inputs[5].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -95,10 +95,10 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, var _col_gap = _data[6]; - inputs[| 5].setVisible(_mode == 0); - inputs[| 6].setVisible(_mode != 1); - inputs[| 21].setVisible(_mode == 1); - inputs[| 9].setVisible(_mode == 2 || _mode == 3); + inputs[ 5].setVisible(_mode == 0); + inputs[ 6].setVisible(_mode != 1); + inputs[21].setVisible(_mode == 1); + inputs[ 9].setVisible(_mode == 2 || _mode == 3); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); @@ -106,9 +106,9 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, shader_set_f("dimension", _dim[0], _dim[1]); shader_set_f("position", _pos[0] / _dim[0], _pos[1] / _dim[1]); - shader_set_f_map("scale", _data[ 2], _data[11], inputs[| 2]); - shader_set_f_map("angle", _data[ 3], _data[12], inputs[| 3]); - shader_set_f_map("thick", _data[ 4], _data[13], inputs[| 4]); + shader_set_f_map("scale", _data[ 2], _data[11], inputs[2]); + shader_set_f_map("angle", _data[ 3], _data[12], inputs[3]); + shader_set_f_map("thick", _data[ 4], _data[13], inputs[4]); shader_set_f("seed", _data[ 8]); shader_set_i("mode", _mode); @@ -122,7 +122,7 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, shader_set_2("truchetAngle", _data[20]); shader_set_2("level", _data[21]); - shader_set_gradient(_data[5], _data[18], _data[19], inputs[| 5]); + shader_set_gradient(_data[5], _data[18], _data[19], inputs[5]); if(is_surface(_sam)) draw_surface_stretched_safe(_sam, 0, 0, _dim[0], _dim[1]); else draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1); diff --git a/scripts/node_hlsl/node_hlsl.gml b/scripts/node_hlsl/node_hlsl.gml index 69c6b7b12..4f197db31 100644 --- a/scripts/node_hlsl/node_hlsl.gml +++ b/scripts/node_hlsl/node_hlsl.gml @@ -20,30 +20,30 @@ function Node_HLSL(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons name = "HLSL"; shader = { vs: -1, fs: -1 }; - inputs[| 0] = nodeValue_Text("Vertex", self, @"") + inputs[0] = nodeValue_Text("Vertex", self, @"") .setDisplay(VALUE_DISPLAY.codeHLSL) .rejectArray(); - inputs[| 1] = nodeValue_Text("Fragment", self, + inputs[1] = nodeValue_Text("Fragment", self, @"float4 surfaceColor = gm_BaseTextureObject.Sample(gm_BaseTexture, input.uv); output.color = surfaceColor;") .setDisplay(VALUE_DISPLAY.codeHLSL) .rejectArray(); - inputs[| 2] = nodeValue_Surface("Base Texture", self); + inputs[2] = nodeValue_Surface("Base Texture", self); - outputs[| 0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone ); + outputs[0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone ); static createNewInput = function() { - var index = ds_list_size(inputs); - inputs[| index + 0] = nodeValue_Text("Argument name", self, "" ); + var index = array_length(inputs); + inputs[index + 0] = nodeValue_Text("Argument name", self, "" ); - inputs[| index + 1] = nodeValue_Enum_Scroll("Argument type", self, 0 , { data: [ "Float", "Int", "Vec2", "Vec3", "Vec4", "Mat3", "Mat4", "Sampler2D", "Color" ], update_hover: false }); - inputs[| index + 1].editWidget.interactable = false; + inputs[index + 1] = nodeValue_Enum_Scroll("Argument type", self, 0 , { data: [ "Float", "Int", "Vec2", "Vec3", "Vec4", "Mat3", "Mat4", "Sampler2D", "Color" ], update_hover: false }); + inputs[index + 1].editWidget.interactable = false; - inputs[| index + 2] = nodeValue_Float("Argument value", self, 0 ) + inputs[index + 2] = nodeValue_Float("Argument value", self, 0 ) .setVisible(true, true); - inputs[| index + 2].editWidget.interactable = false; + inputs[index + 2].editWidget.interactable = false; } argumentRenderer(); @@ -102,29 +102,29 @@ void main(in VertexShaderOutput _input, out PixelShaderOutput output) { setDynamicInput(3, false); static refreshDynamicInput = function() { - var _in = ds_list_create(); + var _in = []; for( var i = 0; i < input_fix_len; i++ ) - ds_list_add(_in, inputs[| i]); + array_push(_in, inputs[i]); array_resize(input_display_list, input_display_len); - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { if(getInputData(i) == "") { - delete inputs[| i + 0]; - delete inputs[| i + 1]; - delete inputs[| i + 2]; + delete inputs[i + 0]; + delete inputs[i + 1]; + delete inputs[i + 2]; continue; } var inp_name = getInputData(i + 0); - var inp_type = inputs[| i + 1]; - var inp_valu = inputs[| i + 2]; + var inp_type = inputs[i + 1]; + var inp_valu = inputs[i + 2]; var cur_valu = getInputData(i + 2); - ds_list_add(_in, inputs[| i + 0]); - ds_list_add(_in, inp_type); - ds_list_add(_in, inp_valu); + array_push(_in, inputs[i + 0]); + array_push(_in, inp_type); + array_push(_in, inp_valu); inp_type.editWidget.interactable = true; if(inp_valu.editWidget != noone) @@ -209,12 +209,10 @@ void main(in VertexShaderOutput _input, out PixelShaderOutput output) { array_push(input_display_list, i + 2); } - for( var i = 0; i < ds_list_size(_in); i++ ) - _in[| i].index = i; + for( var i = 0; i < array_length(_in); i++ ) + _in[ i].index = i; - ds_list_destroy(inputs); inputs = _in; - createNewInput(); //print("=========================="); @@ -244,7 +242,7 @@ void main(in VertexShaderOutput _input, out PixelShaderOutput output) { var fs_sample = ""; var sampler_slot = 1; - for( var i = input_fix_len, n = ds_list_size(inputs); i < n; i += data_length ) { + for( var i = input_fix_len, n = array_length(inputs); i < n; i += data_length ) { var _arg_name = getInputData(i + 0); if(_arg_name == "") continue; diff --git a/scripts/node_honey_noise/node_honey_noise.gml b/scripts/node_honey_noise/node_honey_noise.gml index 3b924009f..98ad0f7cd 100644 --- a/scripts/node_honey_noise/node_honey_noise.gml +++ b/scripts/node_honey_noise/node_honey_noise.gml @@ -2,24 +2,24 @@ function Node_Honeycomb_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x name = "Honeycomb Noise"; shader = sh_noise_honey; - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 2, 2 ]); + inputs[2] = nodeValue_Vector("Scale", self, [ 2, 2 ]); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[| 3] = nodeValue_Rotation("Rotation", self, 0); + inputs[3] = nodeValue_Rotation("Rotation", self, 0); addShaderProp(SHADER_UNIFORM.float, "rotation"); - inputs[| 4] = nodeValue_Enum_Button("Mode", self, 0, [ "Hexagon", "Star" ]); + inputs[4] = nodeValue_Enum_Button("Mode", self, 0, [ "Hexagon", "Star" ]); addShaderProp(SHADER_UNIFORM.integer, "mode"); - inputs[| 5] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }) + inputs[5] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }) addShaderProp(SHADER_UNIFORM.float, "seed"); - inputs[| 6] = nodeValue_Int("Iteration", self, 1); + inputs[6] = nodeValue_Int("Iteration", self, 1); addShaderProp(SHADER_UNIFORM.integer, "iteration"); input_display_list = [ 5, @@ -29,7 +29,7 @@ function Node_Honeycomb_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } diff --git a/scripts/node_hsv_channel/node_hsv_channel.gml b/scripts/node_hsv_channel/node_hsv_channel.gml index 261cbcb78..1e8e36e4a 100644 --- a/scripts/node_hsv_channel/node_hsv_channel.gml +++ b/scripts/node_hsv_channel/node_hsv_channel.gml @@ -2,26 +2,26 @@ function Node_HSV_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou name = "HSV Extract"; batch_output = false; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Bool("Output Array", self, false); + inputs[1] = nodeValue_Bool("Output Array", self, false); - outputs[| 0] = nodeValue_Output("Hue", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Saturation", self, VALUE_TYPE.surface, noone); - outputs[| 2] = nodeValue_Output("Value", self, VALUE_TYPE.surface, noone); - outputs[| 3] = nodeValue_Output("Alpha", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Hue", self, VALUE_TYPE.surface, noone); + outputs[1] = nodeValue_Output("Saturation", self, VALUE_TYPE.surface, noone); + outputs[2] = nodeValue_Output("Value", self, VALUE_TYPE.surface, noone); + outputs[3] = nodeValue_Output("Alpha", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static step = function() { #region var _arr = getInputData(1); - outputs[| 0].name = _arr? "HSV" : "Hue"; - outputs[| 0].setArrayDepth(_arr); + outputs[0].name = _arr? "HSV" : "Hue"; + outputs[0].setArrayDepth(_arr); - outputs[| 1].setVisible(!_arr, !_arr); - outputs[| 2].setVisible(!_arr, !_arr); - outputs[| 3].setVisible(!_arr, !_arr); + outputs[1].setVisible(!_arr, !_arr); + outputs[2].setVisible(!_arr, !_arr); + outputs[3].setVisible(!_arr, !_arr); } #endregion static setShader = function(index) { diff --git a/scripts/node_http_request/node_http_request.gml b/scripts/node_http_request/node_http_request.gml index e5e686a4e..d2a07493a 100644 --- a/scripts/node_http_request/node_http_request.gml +++ b/scripts/node_http_request/node_http_request.gml @@ -2,13 +2,13 @@ function Node_HTTP_request(_x, _y, _group = noone) : Node(_x, _y, _group) constr name = "HTTP"; setDimension(96, 72); - inputs[| 0] = nodeValue_Text("Address", self, ""); + inputs[0] = nodeValue_Text("Address", self, ""); - inputs[| 1] = nodeValue_Enum_Scroll("Type", self, 0, [ "Get", "Post" ]); + inputs[1] = nodeValue_Enum_Scroll("Type", self, 0, [ "Get", "Post" ]); - inputs[| 2] = nodeValue_Text("Content", self, "") + inputs[2] = nodeValue_Text("Content", self, "") - outputs[| 0] = nodeValue_Output("Result", self, VALUE_TYPE.text, ""); + outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.text, ""); address_domain = ""; @@ -17,7 +17,7 @@ function Node_HTTP_request(_x, _y, _group = noone) : Node(_x, _y, _group) constr var _type = getInputData(1); var _post = getInputData(2); - inputs[| 2].setVisible(_type == 1, _type == 1); + inputs[2].setVisible(_type == 1, _type == 1); if(_addr == "") return; @@ -30,7 +30,7 @@ function Node_HTTP_request(_x, _y, _group = noone) : Node(_x, _y, _group) constr case 0 : asyncCall(http_get(_addr), function(param, data) /*=>*/ { var res = data[? "result"]; - outputs[| 0].setValue(res); + outputs[0].setValue(res); triggerRender(false); }); break; @@ -38,7 +38,7 @@ function Node_HTTP_request(_x, _y, _group = noone) : Node(_x, _y, _group) constr case 1 : asyncCall(http_post_string(_addr, _post), function(param, data) /*=>*/ { var res = data[? "result"]; - outputs[| 0].setValue(res); + outputs[0].setValue(res); triggerRender(false); }); break; diff --git a/scripts/node_image/node_image.gml b/scripts/node_image/node_image.gml index 756c96408..a1291f2c3 100644 --- a/scripts/node_image/node_image.gml +++ b/scripts/node_image/node_image.gml @@ -7,7 +7,7 @@ function Node_create_Image(_x, _y, _group = noone) { } var node = new Node_Image(_x, _y, _group).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); if(NODE_NEW_MANUAL) node.doUpdate(); return node; @@ -17,7 +17,7 @@ function Node_create_Image_path(_x, _y, path) { if(!file_exists_empty(path)) return noone; var node = new Node_Image(_x, _y, PANEL_GRAPH.getCurrentContext()).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); node.doUpdate(); return node; } @@ -26,13 +26,13 @@ function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Image"; color = COLORS.node_blend_input; - inputs[| 0] = nodeValue_Text("Path", self, "") + inputs[0] = nodeValue_Text("Path", self, "") .setDisplay(VALUE_DISPLAY.path_load, { filter: "image|*.png;*.jpg" }); - inputs[| 1] = nodeValue_Padding("Padding", self, [0, 0, 0, 0]); + inputs[1] = nodeValue_Padding("Padding", self, [0, 0, 0, 0]); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Path", self, VALUE_TYPE.path, "") + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[1] = nodeValue_Output("Path", self, VALUE_TYPE.path, "") .setVisible(true, true); attribute_surface_depth(); @@ -46,7 +46,7 @@ function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { new checkBox(function() { attributes.file_checker = !attributes.file_checker; }) ]); on_drop_file = function(path) { #region - inputs[| 0].setValue(path); + inputs[0].setValue(path); if(updatePaths(path)) { doUpdate(); @@ -116,12 +116,12 @@ function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var path = path_get(getInputData(0)); var pad = getInputData(1); - outputs[| 1].setValue(path); + outputs[1].setValue(path); updatePaths(path); if(!sprite_exists(spr)) return; - var _outsurf = outputs[| 0].getValue(); + var _outsurf = outputs[0].getValue(); var ww = sprite_get_width(spr) + pad[0] + pad[2]; var hh = sprite_get_height(spr) + pad[1] + pad[3]; @@ -132,7 +132,7 @@ function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { draw_sprite(spr, 0, pad[2], pad[1]); surface_reset_shader(); - outputs[| 0].setValue(_outsurf); + outputs[0].setValue(_outsurf); #region splice if(!attributes.check_splice) return; @@ -151,10 +151,10 @@ function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var hh = sprite_get_height(spr); var _splice = nodeBuild("Node_Image_Sheet", x + w + 64, y); - _splice.inputs[| 0].setFrom(outputs[| 0], false); - _splice.inputs[| 1].setValue([ ww, hh ]); - _splice.inputs[| 2].setValue(amo); - _splice.inputs[| 3].setValue([ amo, 1 ]); + _splice.inputs[0].setFrom(outputs[0], false); + _splice.inputs[1].setValue([ ww, hh ]); + _splice.inputs[2].setValue(amo); + _splice.inputs[3].setValue([ amo, 1 ]); #endregion } #endregion @@ -163,6 +163,6 @@ function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { if(is_array(path)) path = array_safe_get(path, 0); if(!file_exists_empty(path)) return; - inputs[| 0].setValue(path); + inputs[0].setValue(path); } } \ No newline at end of file diff --git a/scripts/node_image_animated/node_image_animated.gml b/scripts/node_image_animated/node_image_animated.gml index 5b0fa8f83..bf254e746 100644 --- a/scripts/node_image_animated/node_image_animated.gml +++ b/scripts/node_image_animated/node_image_animated.gml @@ -8,7 +8,7 @@ function Node_create_Image_Animated(_x, _y, _group = noone) { var node = new Node_Image_Animated(_x, _y, _group).skipDefault(); var paths = string_splice(path, "\n"); - node.inputs[| 0].setValue(paths); + node.inputs[0].setValue(paths); if(NODE_NEW_MANUAL) node.doUpdate(); return node; @@ -17,7 +17,7 @@ function Node_create_Image_Animated(_x, _y, _group = noone) { function Node_create_Image_Animated_path(_x, _y, _path) { var node = new Node_Image_Animated(_x, _y, PANEL_GRAPH.getCurrentContext()).skipDefault(); - node.inputs[| 0].setValue(_path); + node.inputs[0].setValue(_path); node.doUpdate(); return node; @@ -38,35 +38,35 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons update_on_frame = true; - inputs[| 0] = nodeValue_Text("Path", self, []) + inputs[0] = nodeValue_Text("Path", self, []) .setDisplay(VALUE_DISPLAY.path_array, { filter: ["image|*.png;*.jpg", ""] }); - inputs[| 1] = nodeValue_Padding("Padding", self, [0, 0, 0, 0]) + inputs[1] = nodeValue_Padding("Padding", self, [0, 0, 0, 0]) .rejectArray(); - inputs[| 2] = nodeValue_Bool("Stretch frame", self, false, "Stretch animation speed to match project length.") + inputs[2] = nodeValue_Bool("Stretch frame", self, false, "Stretch animation speed to match project length.") .rejectArray(); - inputs[| 3] = nodeValue_Float("Animation speed", self, 1) + inputs[3] = nodeValue_Float("Animation speed", self, 1) .rejectArray(); - inputs[| 4] = nodeValue_Enum_Scroll("Loop modes", self, 0, ["Loop", "Ping pong", "Hold last frame", "Hide"]) + inputs[4] = nodeValue_Enum_Scroll("Loop modes", self, 0, ["Loop", "Ping pong", "Hold last frame", "Hide"]) .rejectArray(); - inputs[| 5] = nodeValue_Trigger("Set animation length to match", self, false ) + inputs[5] = nodeValue_Trigger("Set animation length to match", self, false ) .setDisplay(VALUE_DISPLAY.button, { name: "Match length", UI : true, onClick: function() { if(array_length(spr) == 0) return; TOTAL_FRAMES = array_length(spr); } }); - inputs[| 6] = nodeValue_Bool("Custom frame order", self, false); + inputs[6] = nodeValue_Bool("Custom frame order", self, false); - inputs[| 7] = nodeValue_Int("Frame", self, 0); + inputs[7] = nodeValue_Int("Frame", self, 0); - inputs[| 8] = nodeValue_Enum_Scroll("Canvas size", self, 2, [ "First", "Minimum", "Maximum" ]) + inputs[8] = nodeValue_Enum_Scroll("Canvas size", self, 2, [ "First", "Minimum", "Maximum" ]) .rejectArray(); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Image", false], 0, 1, 8, @@ -94,7 +94,7 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons var paths = paths_to_array_ext(path); - inputs[| 0].setValue(paths); + inputs[0].setValue(paths); if(updatePaths(paths)) { doUpdate(); return true; @@ -157,9 +157,9 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons var str = getInputData(2); var _cus = getInputData(6); - inputs[| 2].setVisible(!_cus); - inputs[| 3].setVisible(!_cus && !str); - inputs[| 4].setVisible(!_cus && !str); + inputs[2].setVisible(!_cus); + inputs[3].setVisible(!_cus && !str); + inputs[4].setVisible(!_cus && !str); if(attributes.file_checker) for( var i = 0, n = array_length(path_current); i < n; i++ ) { @@ -215,9 +215,9 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons ww += _pad[0] + _pad[2]; hh += _pad[1] + _pad[3]; - var surfs = outputs[| 0].getValue(); + var surfs = outputs[0].getValue(); surfs = surface_verify(surfs, ww, hh, attrDepth()); - outputs[| 0].setValue(surfs); + outputs[0].setValue(surfs); switch(_end) { case ANIMATION_END.loop : @@ -290,6 +290,6 @@ function timelineItemNode_Image_Animated(node) : timelineItemNode(node) construc static dropPath = function(path) { if(!is_array(path)) path = [ path ]; - inputs[| 0].setValue(path); + inputs[0].setValue(path); } } \ No newline at end of file diff --git a/scripts/node_image_gif/node_image_gif.gml b/scripts/node_image_gif/node_image_gif.gml index 4fb5ff383..05a472fcf 100644 --- a/scripts/node_image_gif/node_image_gif.gml +++ b/scripts/node_image_gif/node_image_gif.gml @@ -7,7 +7,7 @@ function Node_create_Image_gif(_x, _y, _group = noone) { } var node = new Node_Image_gif(_x, _y, _group).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); if(NODE_NEW_MANUAL) node.doUpdate(); return node; @@ -17,7 +17,7 @@ function Node_create_Image_gif_path(_x, _y, path) { if(!file_exists_empty(path)) return noone; var node = new Node_Image_gif(_x, _y, PANEL_GRAPH.getCurrentContext()).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); node.doUpdate(); return node; @@ -29,10 +29,10 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct update_on_frame = true; setAlwaysTimeline(new timelineItemNode_Image_gif(self)); - inputs[| 0] = nodeValue_Text("Path", self, "") + inputs[0] = nodeValue_Text("Path", self, "") .setDisplay(VALUE_DISPLAY.path_load, { filter: "Animated gif|*.gif" }); - inputs[| 1] = nodeValue_Trigger("Set animation length to gif", self, false ) + inputs[1] = nodeValue_Trigger("Set animation length to gif", self, false ) .setDisplay(VALUE_DISPLAY.button, { name: "Match length", UI : true, onClick: function() { if(!spr) return; if(!sprite_exists(spr)) return; @@ -40,21 +40,21 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct PROJECT.animator.framerate = 12; } }); - inputs[| 2] = nodeValue_Bool("Output as array", self, false); + inputs[2] = nodeValue_Bool("Output as array", self, false); - inputs[| 3] = nodeValue_Enum_Scroll("Loop modes", self, 0, ["Loop", "Ping pong", "Hold last frame", "Hide"]) + inputs[3] = nodeValue_Enum_Scroll("Loop modes", self, 0, ["Loop", "Ping pong", "Hold last frame", "Hide"]) .rejectArray(); - inputs[| 4] = nodeValue_Int("Start frame", self, 0); + inputs[4] = nodeValue_Int("Start frame", self, 0); - inputs[| 5] = nodeValue_Bool("Custom frame order", self, false); + inputs[5] = nodeValue_Bool("Custom frame order", self, false); - inputs[| 6] = nodeValue_Int("Frame", self, 0); + inputs[6] = nodeValue_Int("Frame", self, 0); - inputs[| 7] = nodeValue_Float("Animation speed", self, 1); + inputs[7] = nodeValue_Float("Animation speed", self, 1); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Path", self, VALUE_TYPE.path, "") + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[1] = nodeValue_Output("Path", self, VALUE_TYPE.path, "") .setVisible(true, true); input_display_list = [ @@ -78,7 +78,7 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct new checkBox(function() { attributes.file_checker = !attributes.file_checker; }) ]); on_drop_file = function(path) { #region - inputs[| 0].setValue(path); + inputs[0].setValue(path); if(updatePaths(path)) { doUpdate(); @@ -105,7 +105,7 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct return false; setDisplayName(_name); - outputs[| 1].setValue(path); + outputs[1].setValue(path); if(spr) sprite_delete(spr); sprite_add_gif(path, function(_spr) { @@ -127,10 +127,10 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct var _lop = getInputData(3); var _cus = getInputData(5); - inputs[| 3].setVisible(!_arr); - inputs[| 4].setVisible(!_cus); - inputs[| 6].setVisible( _cus); - inputs[| 7].setVisible(!_cus); + inputs[3].setVisible(!_arr); + inputs[4].setVisible(!_cus); + inputs[6].setVisible( _cus); + inputs[7].setVisible(!_cus); if(loading == 2 && spr_builder != noone && spr_builder.building()) { surfaces = []; @@ -164,13 +164,13 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct var ww = sprite_get_width(spr); var hh = sprite_get_height(spr); - var _outsurf = outputs[| 0].getValue(); + var _outsurf = outputs[0].getValue(); var array = getInputData(2); if(array) { var amo = sprite_get_number(spr); if(array_length(surfaces) == amo && is_surface(surfaces[0])) { - outputs[| 0].setValue(surfaces); + outputs[0].setValue(surfaces); return; } @@ -185,7 +185,7 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct surface_reset_shader(); } - outputs[| 0].setValue(surfaces); + outputs[0].setValue(surfaces); return; } @@ -217,7 +217,7 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct } _outsurf = surface_verify(_outsurf, ww, hh, attrDepth()); - outputs[| 0].setValue(_outsurf); + outputs[0].setValue(_outsurf); surface_set_shader(_outsurf); if(_drw) draw_sprite(spr, _frm, 0, 0); @@ -236,7 +236,7 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct if(is_array(path)) path = array_safe_get(path, 0); if(!file_exists_empty(path)) return; - inputs[| 0].setValue(path); + inputs[0].setValue(path); } } diff --git a/scripts/node_image_grid/node_image_grid.gml b/scripts/node_image_grid/node_image_grid.gml index 20644ddeb..03f2ace25 100644 --- a/scripts/node_image_grid/node_image_grid.gml +++ b/scripts/node_image_grid/node_image_grid.gml @@ -1,32 +1,32 @@ function Node_Image_Grid(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Image Grid"; - inputs[| 0] = nodeValue_Enum_Scroll("Main Axis", self, 0, [ new scrollItem("Horizontal", s_node_alignment, 0), + inputs[0] = nodeValue_Enum_Scroll("Main Axis", self, 0, [ new scrollItem("Horizontal", s_node_alignment, 0), new scrollItem("Vertical", s_node_alignment, 1) ]) .rejectArray(); - inputs[| 1] = nodeValue_Int("Column", self, 4) + inputs[1] = nodeValue_Int("Column", self, 4) .setValidator(VV_min(1)) .rejectArray(); - inputs[| 2] = nodeValue_Vector("Spacing", self, [ 0, 0 ]) + inputs[2] = nodeValue_Vector("Spacing", self, [ 0, 0 ]) .rejectArray(); - inputs[| 3] = nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ]) + inputs[3] = nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ]) .rejectArray(); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Atlas data", self, VALUE_TYPE.surface, []); + outputs[1] = nodeValue_Output("Atlas data", self, VALUE_TYPE.surface, []); temp_surface = [ noone, noone ]; static createNewInput = function() { - var index = ds_list_size(inputs); - inputs[| index] = nodeValue_Surface("Input", self) + var index = array_length(inputs); + inputs[index] = nodeValue_Surface("Input", self) .setVisible(true, true); - return inputs[| index]; + return inputs[index]; } setDynamicInput(1, true, VALUE_TYPE.surface); attribute_surface_depth(); @@ -41,7 +41,7 @@ function Node_Image_Grid(_x, _y, _group = noone) : Node(_x, _y, _group) construc var hh = 0; var surfs = []; - for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) { + for( var i = input_fix_len; i < array_length(inputs); i++ ) { var _surf = getInputData(i); if(!is_array(_surf)) _surf = [ _surf ]; @@ -87,7 +87,7 @@ function Node_Image_Grid(_x, _y, _group = noone) : Node(_x, _y, _group) construc ww += _padd[PADDING.left] + _padd[PADDING.right]; hh += _padd[PADDING.top] + _padd[PADDING.bottom]; - var _outSurf = outputs[| 0].getValue(); + var _outSurf = outputs[0].getValue(); _outSurf = surface_verify(_outSurf, ww, hh, attrDepth()); temp_surface[0] = surface_verify(temp_surface[0], ww, hh, attrDepth()); @@ -140,8 +140,8 @@ function Node_Image_Grid(_x, _y, _group = noone) : Node(_x, _y, _group) construc draw_surface_safe(temp_surface[ppind]); surface_reset_shader(); - outputs[| 0].setValue(_outSurf); - outputs[| 1].setValue(atlas); + outputs[0].setValue(_outSurf); + outputs[1].setValue(atlas); } #endregion } diff --git a/scripts/node_image_sequence/node_image_sequence.gml b/scripts/node_image_sequence/node_image_sequence.gml index b383f457a..b4d18fd8d 100644 --- a/scripts/node_image_sequence/node_image_sequence.gml +++ b/scripts/node_image_sequence/node_image_sequence.gml @@ -9,7 +9,7 @@ function Node_create_Image_Sequence(_x, _y, _group = noone) { var node = new Node_Image_Sequence(_x, _y, _group).skipDefault(); var paths = string_splice(path, "\n"); - node.inputs[| 0].setValue(paths); + node.inputs[0].setValue(paths); if(NODE_NEW_MANUAL) node.doUpdate(); return node; @@ -17,7 +17,7 @@ function Node_create_Image_Sequence(_x, _y, _group = noone) { function Node_create_Image_Sequence_path(_x, _y, _path) { var node = new Node_Image_Sequence(_x, _y, PANEL_GRAPH.getCurrentContext()).skipDefault(); - node.inputs[| 0].setValue(_path); + node.inputs[0].setValue(_path); node.doUpdate(); return node; @@ -39,24 +39,24 @@ function Node_Image_Sequence(_x, _y, _group = noone) : Node(_x, _y, _group) cons spr = []; color = COLORS.node_blend_input; - inputs[| 0] = nodeValue_Text("Paths", self, []) + inputs[0] = nodeValue_Text("Paths", self, []) .setDisplay(VALUE_DISPLAY.path_array, { filter: ["image|*.png;*.jpg", ""] }); - inputs[| 1] = nodeValue_Padding("Padding", self, [0, 0, 0, 0]) + inputs[1] = nodeValue_Padding("Padding", self, [0, 0, 0, 0]) .rejectArray(); - inputs[| 2] = nodeValue_Enum_Scroll("Canvas size", self, 0, [ "Individual", "Minimum", "Maximum" ]) + inputs[2] = nodeValue_Enum_Scroll("Canvas size", self, 0, [ "Individual", "Minimum", "Maximum" ]) .rejectArray(); - inputs[| 3] = nodeValue_Enum_Scroll("Sizing method", self, 0, [ "Padding / Crop", "Scale" ]) + inputs[3] = nodeValue_Enum_Scroll("Sizing method", self, 0, [ "Padding / Crop", "Scale" ]) .rejectArray(); input_display_list = [ ["Array settings", false], 0, 1, 2, 3 ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, []); - outputs[| 1] = nodeValue_Output("Paths", self, VALUE_TYPE.path, [] ). + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, []); + outputs[1] = nodeValue_Output("Paths", self, VALUE_TYPE.path, [] ). setVisible(true, true); attribute_surface_depth(); @@ -79,7 +79,7 @@ function Node_Image_Sequence(_x, _y, _group = noone) : Node(_x, _y, _group) cons var paths = paths_to_array_ext(path); - inputs[| 0].setValue(path); + inputs[0].setValue(path); if(updatePaths()) { doUpdate(); return true; @@ -133,7 +133,7 @@ function Node_Image_Sequence(_x, _y, _group = noone) : Node(_x, _y, _group) cons } } - outputs[| 1].setValue(paths); + outputs[1].setValue(paths); return true; } @@ -152,21 +152,21 @@ function Node_Image_Sequence(_x, _y, _group = noone) : Node(_x, _y, _group) cons } static update = function(frame = CURRENT_FRAME) { - var path = inputs[| 0].getValue(); + var path = inputs[0].getValue(); if(!array_equals(path_current, path)) updatePaths(); var pad = getInputData(1); var can = getInputData(2); - inputs[| 3].setVisible(can != CANVAS_SIZE.individual); + inputs[3].setVisible(can != CANVAS_SIZE.individual); var siz = getInputData(3); var ww = -1, hh = -1; var _ww = -1, _hh = -1; - var surfs = outputs[| 0].getValue(); + var surfs = outputs[0].getValue(); var amo = array_length(spr); for(var i = amo; i < array_length(surfs); i++) surface_free(surfs[i]); @@ -246,11 +246,11 @@ function Node_Image_Sequence(_x, _y, _group = noone) : Node(_x, _y, _group) cons } - outputs[| 0].setValue(surfs); + outputs[0].setValue(surfs); } static dropPath = function(path) { if(!is_array(path)) path = [ path ]; - inputs[| 0].setValue(path); + inputs[0].setValue(path); } } \ No newline at end of file diff --git a/scripts/node_image_sheet/node_image_sheet.gml b/scripts/node_image_sheet/node_image_sheet.gml index ac0e5f5b0..f92cc48db 100644 --- a/scripts/node_image_sheet/node_image_sheet.gml +++ b/scripts/node_image_sheet/node_image_sheet.gml @@ -1,27 +1,27 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Splice Spritesheet"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Vector("Sprite size", self, [ 32, 32 ]); + inputs[1] = nodeValue_Vector("Sprite size", self, [ 32, 32 ]); - inputs[| 2] = nodeValue_Int("Row", self, 1); //unused - inputs[| 3] = nodeValue_Vector("Amount", self, [ 1, 1 ]); + inputs[2] = nodeValue_Int("Row", self, 1); //unused + inputs[3] = nodeValue_Vector("Amount", self, [ 1, 1 ]); - inputs[| 4] = nodeValue_Vector("Offset", self, [ 0, 0 ]); + inputs[4] = nodeValue_Vector("Offset", self, [ 0, 0 ]); - inputs[| 5] = nodeValue_Vector("Spacing", self, [ 0, 0 ]); + inputs[5] = nodeValue_Vector("Spacing", self, [ 0, 0 ]); - inputs[| 6] = nodeValue_Padding("Padding", self, [0, 0, 0, 0]); + inputs[6] = nodeValue_Padding("Padding", self, [0, 0, 0, 0]); - inputs[| 7] = nodeValue_Enum_Scroll("Output", self, 1, [ "Animation", "Array" ]); + inputs[7] = nodeValue_Enum_Scroll("Output", self, 1, [ "Animation", "Array" ]); - inputs[| 8] = nodeValue_Float("Animation speed", self, 1); + inputs[8] = nodeValue_Float("Animation speed", self, 1); - inputs[| 9] = nodeValue_Enum_Scroll("Main Axis", self, 0, [ new scrollItem("Horizontal", s_node_alignment, 0), + inputs[9] = nodeValue_Enum_Scroll("Main Axis", self, 0, [ new scrollItem("Horizontal", s_node_alignment, 0), new scrollItem("Vertical", s_node_alignment, 1), ]); - inputs[| 10] = nodeValue_Trigger("Auto fill", self, false, "Automatically set amount based on sprite size.") + inputs[10] = nodeValue_Trigger("Auto fill", self, false, "Automatically set amount based on sprite size.") .setDisplay(VALUE_DISPLAY.button, { name: "Auto fill", UI : true, onClick: function() { #region var _sur = getInputData(0); if(!is_surface(_sur) || _sur == DEF_SURFACE) return; @@ -38,23 +38,23 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru var fill_w = floor((ww - _offs[0]) / sh_w); var fill_h = floor((hh - _offs[1]) / sh_h); - inputs[| 3].setValue([ fill_w, fill_h ]); + inputs[3].setValue([ fill_w, fill_h ]); doUpdate(); } }); #endregion - inputs[| 11] = nodeValue_Trigger("Sync animation", self, false ) + inputs[11] = nodeValue_Trigger("Sync animation", self, false ) .setDisplay(VALUE_DISPLAY.button, { name: "Sync frames", UI : true, onClick: function() { - var _atl = outputs[| 1].getValue(); + var _atl = outputs[1].getValue(); var _spd = getInputData(8); TOTAL_FRAMES = max(1, _spd == 0? 1 : ceil(array_length(_atl) / _spd)); } }); - inputs[| 12] = nodeValue_Bool("Filter empty output", self, false); + inputs[12] = nodeValue_Bool("Filter empty output", self, false); - inputs[| 13] = nodeValue_Enum_Scroll("Filtered Pixel", self, 0, [ "Transparent", "Color" ]); + inputs[13] = nodeValue_Enum_Scroll("Filtered Pixel", self, 0, [ "Transparent", "Color" ]); - inputs[| 14] = nodeValue_Color("Filtered Color", self, c_black) + inputs[14] = nodeValue_Color("Filtered Color", self, c_black) input_display_list = [ ["Sprite", false], 0, 1, 6, @@ -63,9 +63,9 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru ["Filter Empty", true, 12], 13, 14, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Atlas Data", self, VALUE_TYPE.surface, []) + outputs[1] = nodeValue_Output("Atlas Data", self, VALUE_TYPE.surface, []) .setArrayDepth(1); attribute_surface_depth(); @@ -215,7 +215,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru if(mouse_release(mb_left)) { drag_type = 0; - inputs[| 4].setValue(off); + inputs[4].setValue(off); } } else if(drag_type == 2) { var _dx = value_snap(round(abs((_mx - drag_mx) / _s)), _snx); @@ -231,7 +231,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru if(mouse_release(mb_left)) { drag_type = 0; - inputs[| 1].setValue(dim); + inputs[1].setValue(dim); } } else if(drag_type == 3) { var _col = floor((abs(_mx - drag_mx) / _s - _spc[0]) / (__dim[0] + _spc[0])); @@ -239,7 +239,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru if(mouse_release(mb_left)) { drag_type = 0; - inputs[| 3].setValue(curr_amo); + inputs[3].setValue(curr_amo); } } else if(drag_type == 4) { var _row = floor((abs(_my - drag_my) / _s - _spc[1]) / (__dim[1] + _spc[1])); @@ -247,7 +247,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru if(mouse_release(mb_left)) { drag_type = 0; - inputs[| 3].setValue(curr_amo); + inputs[3].setValue(curr_amo); } } @@ -279,9 +279,9 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru var _out = getInputData(7); var _flty = getInputData(13); - inputs[| 11].setVisible(!_out); - inputs[| 8].setVisible(!_out); - inputs[| 14].setVisible(_flty); + inputs[11].setVisible(!_out); + inputs[ 8].setVisible(!_out); + inputs[14].setVisible(_flty); } static spliceSprite = function() { @@ -290,7 +290,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru spliceSurf = _inSurf; - var _outSurf = outputs[| 0].getValue(); + var _outSurf = outputs[0].getValue(); var _out = getInputData(7); var _dim = getInputData(1); @@ -400,8 +400,8 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru atls_array = array_create(_arrAmo); array_copy(atls_array, 0, _atl, 0, _arrAmo); - if(_out == 1) outputs[| 0].setValue(surf_array); - outputs[| 1].setValue(atls_array); + if(_out == 1) outputs[0].setValue(surf_array); + outputs[1].setValue(atls_array); } static update = function(frame = CURRENT_FRAME) { @@ -418,7 +418,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru if(array_length(surf_array)) { var ind = safe_mod(CURRENT_FRAME * _spd, array_length(surf_array)); - outputs[| 0].setValue(array_safe_get_fast(surf_array, ind)); + outputs[0].setValue(array_safe_get_fast(surf_array, ind)); } } } \ No newline at end of file diff --git a/scripts/node_interlaced/node_interlaced.gml b/scripts/node_interlaced/node_interlaced.gml index 7379ee1c4..6172b7c9d 100644 --- a/scripts/node_interlaced/node_interlaced.gml +++ b/scripts/node_interlaced/node_interlaced.gml @@ -1,27 +1,27 @@ function Node_Interlaced(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Interlace"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Bool("Active", self, true); + inputs[1] = nodeValue_Bool("Active", self, true); active_index = 1; - inputs[| 2] = nodeValue_Surface("Mask", self); + inputs[2] = nodeValue_Surface("Mask", self); - inputs[| 3] = nodeValue_Float("Mix", self, 1) + inputs[3] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(2); // inputs 5, 6 - inputs[| 7] = nodeValue_Enum_Button("Axis", self, 0, [ "X", "Y" ]); + inputs[7] = nodeValue_Enum_Button("Axis", self, 0, [ "X", "Y" ]); - inputs[| 8] = nodeValue_Float("Size", self, 1); + inputs[8] = nodeValue_Float("Size", self, 1); - inputs[| 9] = nodeValue_Bool("Invert", self, false); + inputs[9] = nodeValue_Bool("Invert", self, false); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); temp_surface = [ ]; diff --git a/scripts/node_interpret_number/node_interpret_number.gml b/scripts/node_interpret_number/node_interpret_number.gml index b70fd4e52..23aae0d64 100644 --- a/scripts/node_interpret_number/node_interpret_number.gml +++ b/scripts/node_interpret_number/node_interpret_number.gml @@ -2,26 +2,26 @@ function Node_Interpret_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, name = "Interpret Number"; dimension_index = -1; - inputs[| 0] = nodeValue_Float("Number", self, [] ) + inputs[0] = nodeValue_Float("Number", self, [] ) .setVisible(true, true) .setArrayDepth(1); - inputs[| 1] = nodeValue_Enum_Button("Mode", self, 0, [ "Greyscale", "Gradient" ]); + inputs[1] = nodeValue_Enum_Button("Mode", self, 0, [ "Greyscale", "Gradient" ]); - inputs[| 2] = nodeValue_Range("Range", self, [ 0, 1 ] ); + inputs[2] = nodeValue_Range("Range", self, [ 0, 1 ] ); - inputs[| 3] = nodeValue_Gradient("Gradient", self, new gradientObject(cola(c_white))) + inputs[3] = nodeValue_Gradient("Gradient", self, new gradientObject(cola(c_white))) .setMappable(4); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 4] = nodeValueMap("Gradient map", self); + inputs[4] = nodeValueMap("Gradient map", self); - inputs[| 5] = nodeValueGradientRange("Gradient map range", self, inputs[| 3]); + inputs[5] = nodeValueGradientRange("Gradient map range", self, inputs[3]); ////////////////////////////////////////////////////////////////////////////////////////////////// - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 0, ["Interpret", false], 1, 2, 3, 4, @@ -31,7 +31,7 @@ function Node_Interpret_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getDimension()); active &= !hv; _hov |= hv; + var hv = inputs[5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getDimension()); active &= !hv; _hov |= hv; return _hov; } @@ -39,8 +39,8 @@ function Node_Interpret_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, static step = function() { var _mode = getInputData(1); - inputs[| 3].setVisible(_mode == 1); - inputs[| 3].mappableStep(); + inputs[3].setVisible(_mode == 1); + inputs[3].mappableStep(); } static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -62,7 +62,7 @@ function Node_Interpret_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, shader_set_i("mode", _mod); shader_set_f("range", _ran); - shader_set_gradient(_data[3], _data[4], _data[5], inputs[| 3]); + shader_set_gradient(_data[3], _data[4], _data[5], inputs[3]); for(var i = 0; i < _amo; i += BATCH_SIZE) { var _arr = []; diff --git a/scripts/node_invert/node_invert.gml b/scripts/node_invert/node_invert.gml index 8fe1740e6..bdf099249 100644 --- a/scripts/node_invert/node_invert.gml +++ b/scripts/node_invert/node_invert.gml @@ -1,27 +1,27 @@ function Node_Invert(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Invert"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Surface("Mask", self); + inputs[1] = nodeValue_Surface("Mask", self); - inputs[| 2] = nodeValue_Float("Mix", self, 1) + inputs[2] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Bool("Active", self, true); + inputs[3] = nodeValue_Bool("Active", self, true); active_index = 3; - inputs[| 4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(1); // inputs 5, 6 - inputs[| 7] = nodeValue_Bool("Include Alpha", self, false); + inputs[7] = nodeValue_Bool("Include Alpha", self, false); input_display_list = [ 3, 4, 7, ["Surfaces", true], 0, 1, 2, 5, 6, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); diff --git a/scripts/node_isosurf/node_isosurf.gml b/scripts/node_isosurf/node_isosurf.gml index 70d88ba03..db75309d5 100644 --- a/scripts/node_isosurf/node_isosurf.gml +++ b/scripts/node_isosurf/node_isosurf.gml @@ -1,23 +1,23 @@ function Node_IsoSurf(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "IsoSurf"; - inputs[| 0] = nodeValue_Int("Direction", self, 4) + inputs[0] = nodeValue_Int("Direction", self, 4) .setValidator(VV_min(1)); - inputs[| 1] = nodeValue_Surface("Surfaces", self) + inputs[1] = nodeValue_Surface("Surfaces", self) .setVisible(true, true) .setArrayDepth(1); - inputs[| 2] = nodeValue_Rotation("Angle Shift", self, 0); + inputs[2] = nodeValue_Rotation("Angle Shift", self, 0); - inputs[| 3] = nodeValue_Float("Angle Split", self, [ 0 * 90, 1 * 90, 2 * 90, 3 * 90 ]) + inputs[3] = nodeValue_Float("Angle Split", self, [ 0 * 90, 1 * 90, 2 * 90, 3 * 90 ]) .setArrayDynamic() .setArrayDepth(1); - inputs[| 4] = nodeValue_Vector("Offsets", self, []) + inputs[4] = nodeValue_Vector("Offsets", self, []) .setArrayDepth(1); - outputs[| 0] = nodeValue_Output("IsoSurf", self, VALUE_TYPE.dynaSurface, noone); + outputs[0] = nodeValue_Output("IsoSurf", self, VALUE_TYPE.dynaSurface, noone); knob_select = noone; knob_hover = noone; @@ -92,7 +92,7 @@ function Node_IsoSurf(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c var val = key_mod_press(CTRL)? round(real_val / 15) * 15 : real_val; _angle[knob_dragging] = val; - if(inputs[| 3].setValue(_angle)) UNDO_HOLDING = true; + if(inputs[3].setValue(_angle)) UNDO_HOLDING = true; if(mouse_release(mb_left)) knob_dragging = noone; @@ -148,7 +148,7 @@ function Node_IsoSurf(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c _offs[knob_select][0] = _mx; _offs[knob_select][1] = _my; - inputs[| 4].setValue(_offs); + inputs[4].setValue(_offs); } } @@ -177,7 +177,7 @@ function Node_IsoSurf(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c for( var i = 0, n = _amo; i < n; i++ ) _off[i] = [ 0, 0 ]; - inputs[| 4].setValue(_off); + inputs[4].setValue(_off); } static onValueUpdate = function(index) { @@ -194,8 +194,8 @@ function Node_IsoSurf(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c _off[i] = array_verify(_off[i], 2); } - inputs[| 3].setValue(_ang); - inputs[| 4].setValue(_off); + inputs[3].setValue(_ang); + inputs[4].setValue(_off); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_iterate/node_iterate.gml b/scripts/node_iterate/node_iterate.gml index aa300f206..ede9d6762 100644 --- a/scripts/node_iterate/node_iterate.gml +++ b/scripts/node_iterate/node_iterate.gml @@ -1,17 +1,17 @@ function Node_Iterate(_x, _y, _group = noone) : Node_Iterator(_x, _y, _group) constructor { name = "Loop"; - inputs[| 0] = nodeValue_Int("Repeat", self, 1 ) + inputs[0] = nodeValue_Int("Repeat", self, 1 ) .uncache(); - custom_input_index = ds_list_size(inputs); + custom_input_index = array_length(inputs); if(NODE_NEW_MANUAL) { #region var input = nodeBuild("Node_Iterator_Input", -256, -32, self); var output = nodeBuild("Node_Iterator_Output", 256, -32, self); - input.inputs[| 2].setValue(4); - output.inputs[| 1].setFrom(input.outputs[| 1]); + input.inputs[2].setValue(4); + output.inputs[1].setFrom(input.outputs[1]); } #endregion static getIterationCount = function() { return getInputData(0); } diff --git a/scripts/node_iterate_each/node_iterate_each.gml b/scripts/node_iterate_each/node_iterate_each.gml index 8e446b674..e96f8f419 100644 --- a/scripts/node_iterate_each/node_iterate_each.gml +++ b/scripts/node_iterate_each/node_iterate_each.gml @@ -1,32 +1,32 @@ function Node_Iterate_Each(_x, _y, _group = noone) : Node_Iterator(_x, _y, _group) constructor { name = "Loop Array"; - inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, [] ) + inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, [] ) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Array", self, VALUE_TYPE.any, [] ); + outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, [] ); - custom_input_index = ds_list_size(inputs); - custom_output_index = ds_list_size(inputs); + custom_input_index = array_length(inputs); + custom_output_index = array_length(inputs); if(NODE_NEW_MANUAL) { #region var input = nodeBuild("Node_Iterator_Each_Input", -256, -32, self); var output = nodeBuild("Node_Iterator_Each_Output", 256, -32, self); - output.inputs[| 0].setFrom(input.outputs[| 0]); + output.inputs[0].setFrom(input.outputs[0]); } #endregion static onStep = function() { #region - var type = inputs[| 0].value_from == noone? VALUE_TYPE.any : inputs[| 0].value_from.type; - inputs[| 0].setType(type); + var type = inputs[0].value_from == noone? VALUE_TYPE.any : inputs[0].value_from.type; + inputs[0].setType(type); } #endregion static doInitLoop = function() { #region var arrIn = getInputData(0); - var arrOut = outputs[| 0].getValue(); + var arrOut = outputs[0].getValue(); if(array_length(arrOut) != array_length(arrIn)) - outputs[| 0].setValue([]); + outputs[0].setValue([]); } #endregion static getIterationCount = function() { #region diff --git a/scripts/node_iterate_each_inline/node_iterate_each_inline.gml b/scripts/node_iterate_each_inline/node_iterate_each_inline.gml index ad0a1e467..b9f61648b 100644 --- a/scripts/node_iterate_each_inline/node_iterate_each_inline.gml +++ b/scripts/node_iterate_each_inline/node_iterate_each_inline.gml @@ -15,7 +15,7 @@ function Node_Iterate_Each_Inline(_x, _y, _group = noone) : Node_Collection_Inli var input = nodeBuild("Node_Iterator_Each_Inline_Input", x, y); var output = nodeBuild("Node_Iterator_Each_Inline_Output", x + 256, y); - if(!CLONING) output.inputs[| 0].setFrom(input.outputs[| 0]); + if(!CLONING) output.inputs[0].setFrom(input.outputs[0]); addNode(input); addNode(output); @@ -35,7 +35,7 @@ function Node_Iterate_Each_Inline(_x, _y, _group = noone) : Node_Collection_Inli } #endregion static getIterationCount = function() { #region - var _arr = input_node.inputs[| 0].getValue(); + var _arr = input_node.inputs[0].getValue(); return array_length(_arr); } #endregion @@ -100,7 +100,7 @@ function Node_Iterate_Each_Inline(_x, _y, _group = noone) : Node_Collection_Inli } iterated = 0; - output_node.outputs[| 0].setValue([]); + output_node.outputs[0].setValue([]); } #endregion } \ No newline at end of file diff --git a/scripts/node_iterate_filter/node_iterate_filter.gml b/scripts/node_iterate_filter/node_iterate_filter.gml index cd25bdc7e..9ff7dfaf3 100644 --- a/scripts/node_iterate_filter/node_iterate_filter.gml +++ b/scripts/node_iterate_filter/node_iterate_filter.gml @@ -1,29 +1,29 @@ function Node_Iterate_Filter(_x, _y, _group = noone) : Node_Iterator(_x, _y, _group) constructor { name = "Filter Array"; - inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, [] ) + inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, [] ) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Array", self, VALUE_TYPE.any, noone ); + outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, noone ); - custom_input_index = ds_list_size(inputs); - custom_output_index = ds_list_size(inputs); + custom_input_index = array_length(inputs); + custom_output_index = array_length(inputs); if(NODE_NEW_MANUAL) { #region var input = nodeBuild("Node_Iterator_Filter_Input", -256, -32, self); var output = nodeBuild("Node_Iterator_Filter_Output", 256, -32, self); - output.inputs[| 0].setFrom(input.outputs[| 0]); + output.inputs[0].setFrom(input.outputs[0]); } #endregion static onStep = function() { #region - var type = inputs[| 0].value_from == noone? VALUE_TYPE.any : inputs[| 0].value_from.type; - inputs[| 0].setType(type); + var type = inputs[0].value_from == noone? VALUE_TYPE.any : inputs[0].value_from.type; + inputs[0].setType(type); } #endregion static doInitLoop = function() { #region var arrIn = getInputData(0); - var arrOut = outputs[| 0].getValue(); + var arrOut = outputs[0].getValue(); var _int = noone; var _oup = noone; @@ -49,11 +49,11 @@ function Node_Iterate_Filter(_x, _y, _group = noone) : Node_Iterator(_x, _y, _gr return; } - var _ofr = _oup.inputs[| 0].value_from; + var _ofr = _oup.inputs[0].value_from; var _imm = _ofr && is_instanceof(_ofr.node, Node_Iterator_Filter_Input); if(!_imm) surface_array_free(arrOut); - outputs[| 0].setValue([]) + outputs[0].setValue([]) } #endregion static getIterationCount = function() { #region diff --git a/scripts/node_iterate_filter_inline/node_iterate_filter_inline.gml b/scripts/node_iterate_filter_inline/node_iterate_filter_inline.gml index 6155ef0dd..d43c656b4 100644 --- a/scripts/node_iterate_filter_inline/node_iterate_filter_inline.gml +++ b/scripts/node_iterate_filter_inline/node_iterate_filter_inline.gml @@ -14,7 +14,7 @@ function Node_Iterate_Filter_Inline(_x, _y, _group = noone) : Node_Collection_In var input = nodeBuild("Node_Iterator_Filter_Inline_Input", x, y); var output = nodeBuild("Node_Iterator_Filter_Inline_Output", x + 256, y); - if(!CLONING) output.inputs[| 0].setFrom(input.outputs[| 0]); + if(!CLONING) output.inputs[0].setFrom(input.outputs[0]); addNode(input); addNode(output); @@ -34,7 +34,7 @@ function Node_Iterate_Filter_Inline(_x, _y, _group = noone) : Node_Collection_In } #endregion static getIterationCount = function() { #region - var _arr = input_node.inputs[| 0].getValue(); + var _arr = input_node.inputs[0].getValue(); return array_length(_arr); } #endregion @@ -97,7 +97,7 @@ function Node_Iterate_Filter_Inline(_x, _y, _group = noone) : Node_Collection_In } iterated = 0; - output_node.outputs[| 0].setValue([]); + output_node.outputs[0].setValue([]); } #endregion } \ No newline at end of file diff --git a/scripts/node_iterate_inline/node_iterate_inline.gml b/scripts/node_iterate_inline/node_iterate_inline.gml index b55664be5..03d4bfd83 100644 --- a/scripts/node_iterate_inline/node_iterate_inline.gml +++ b/scripts/node_iterate_inline/node_iterate_inline.gml @@ -6,7 +6,7 @@ function Node_Iterate_Inline(_x, _y, _group = noone) : Node_Collection_Inline(_x is_root = false; - inputs[| 0] = nodeValue_Int("Repeat", self, 1 ) + inputs[0] = nodeValue_Int("Repeat", self, 1 ) .uncache(); managedRenderOrder = true; @@ -21,15 +21,10 @@ function Node_Iterate_Inline(_x, _y, _group = noone) : Node_Collection_Inline(_x iterated = 0; static getIterationCount = function() { return getInputData(0); } + static bypassConnection = function() { return iterated > 0 && !is_undefined(value_buffer); } + static bypassNextNode = function() { return iterated < getIterationCount(); } - static bypassConnection = function() { return iterated > 0 && !is_undefined(value_buffer); - } #endregion - - static bypassNextNode = function() { #region - return iterated < getIterationCount(); - } #endregion - - static getNextNodes = function() { #region + static getNextNodes = function() { LOG_BLOCK_START(); LOG_IF(global.FLAG.render == 1, "[outputNextNode] Get next node from inline iterate"); @@ -42,7 +37,7 @@ function Node_Iterate_Inline(_x, _y, _group = noone) : Node_Collection_Inline(_x LOG_BLOCK_END(); return _nodes; - } #endregion + } static connectJunctions = function(jFrom, jTo) { junc_in = jFrom.is_dummy? jFrom.dummy_get() : jFrom; @@ -52,18 +47,18 @@ function Node_Iterate_Inline(_x, _y, _group = noone) : Node_Collection_Inline(_x attributes.junc_out = [ junc_out.node.node_id, junc_out.index ]; } - static scanJunc = function() { #region + static scanJunc = function() { var node_in = PROJECT.nodeMap[? attributes.junc_in[0]]; var node_out = PROJECT.nodeMap[? attributes.junc_out[0]]; - junc_in = node_in? node_in.inputs[| attributes.junc_in[1]] : noone; - junc_out = node_out? node_out.outputs[| attributes.junc_out[1]] : noone; + junc_in = node_in? node_in.inputs[attributes.junc_in[1]] : noone; + junc_out = node_out? node_out.outputs[attributes.junc_out[1]] : noone; if(junc_in) { junc_in.value_from_loop = self; addNode(junc_in.node); } if(junc_out) { array_push(junc_out.value_to_loop, self); addNode(junc_out.node); } - } #endregion + } - static updateValue = function() { #region + static updateValue = function() { var type = junc_out.type; var val = junc_out.getValue(); @@ -72,41 +67,42 @@ function Node_Iterate_Inline(_x, _y, _group = noone) : Node_Collection_Inline(_x surface_array_free(value_buffer); value_buffer = surface_array_clone(val); break; + default : value_buffer = variable_clone(val); break; } - } #endregion + } - static getValue = function(arr) { #region + static getValue = function(arr) { INLINE arr[@ 0] = value_buffer; arr[@ 1] = junc_out; - } #endregion + } - static update = function() { #region - iteration_count = inputs[| 0].getValue(); + static update = function() { + iteration_count = inputs[0].getValue(); iterated = 0; value_buffer = undefined; - } #endregion + } - static drawConnections = function(params = {}) { #region + static drawConnections = function(params = {}) { if(!active) return; if(!junc_in || !junc_out) return; if(!junc_in.node.active || !junc_out.node.active) return; if(drawJuncConnection(junc_out, junc_in, params)) return self; - } #endregion + } - static postDeserialize = function() { #region + static postDeserialize = function() { refreshMember(); scanJunc(); - } #endregion + } - static onDestroy = function() { #region + static onDestroy = function() { if(junc_in) junc_in.value_from_loop = noone; if(junc_out) array_remove(junc_out.value_to_loop, self); - } #endregion + } } \ No newline at end of file diff --git a/scripts/node_iterate_sort/node_iterate_sort.gml b/scripts/node_iterate_sort/node_iterate_sort.gml index 0eac839eb..ca91d4d1f 100644 --- a/scripts/node_iterate_sort/node_iterate_sort.gml +++ b/scripts/node_iterate_sort/node_iterate_sort.gml @@ -6,15 +6,15 @@ function Node_Iterate_Sort(_x, _y, _group = noone) : Node_Collection(_x, _y, _gr reset_all_child = true; managedRenderOrder = true; - inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, [] ) + inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, [] ) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Array", self, VALUE_TYPE.any, noone ); + outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, noone ); topoList = []; - custom_input_index = ds_list_size(inputs); - custom_output_index = ds_list_size(inputs); + custom_input_index = array_length(inputs); + custom_output_index = array_length(inputs); loop_start_time = 0; inputNodes = [ noone, noone ]; @@ -44,8 +44,8 @@ function Node_Iterate_Sort(_x, _y, _group = noone) : Node_Collection(_x, _y, _gr static getNextNodes = function() { return getNextNodesExternal(); } static onStep = function() { #region - var type = inputs[| 0].value_from == noone? VALUE_TYPE.any : inputs[| 0].value_from.type; - inputs[| 0].setType(type); + var type = inputs[0].value_from == noone? VALUE_TYPE.any : inputs[0].value_from.type; + inputs[0].setType(type); } #endregion static update = function(frame = CURRENT_FRAME) { #region @@ -56,12 +56,12 @@ function Node_Iterate_Sort(_x, _y, _group = noone) : Node_Collection(_x, _y, _gr outputNode = noone; var inputReady = 0; - if(inputs[| 0].value_from) { - inputs[| 0].setType(inputs[| 0].value_from.type); - outputs[| 0].setType(inputs[| 0].value_from.type); + if(inputs[0].value_from) { + inputs[0].setType(inputs[0].value_from.type); + outputs[0].setType(inputs[0].value_from.type); } - var _typ = inputs[| 0].type; + var _typ = inputs[0].type; for( var i = 0; i < array_length(nodes); i++ ) { var _n = nodes[i]; @@ -69,21 +69,21 @@ function Node_Iterate_Sort(_x, _y, _group = noone) : Node_Collection(_x, _y, _gr switch(_n.attributes.sort_inputs) { case 1 : - inputNodes[0] = _n.inputs[| 0]; + inputNodes[0] = _n.inputs[0]; - _n.inputs[| 0].setType( _typ); - _n.outputs[| 0].setType(_typ); + _n.inputs[0].setType( _typ); + _n.outputs[0].setType(_typ); inputReady += 1; break; case 2 : - inputNodes[1] = _n.inputs[| 0]; + inputNodes[1] = _n.inputs[0]; - _n.inputs[| 0].setType( _typ); - _n.outputs[| 0].setType(_typ); + _n.inputs[0].setType( _typ); + _n.outputs[0].setType(_typ); inputReady += 2; break; case 9 : - outputNode = nodes[i].inputs[| 0]; + outputNode = nodes[i].inputs[0]; inputReady += 4; break; } @@ -148,15 +148,15 @@ function Node_Iterate_Sort(_x, _y, _group = noone) : Node_Collection(_x, _y, _gr loop_start_time = get_timer(); var arrIn = getInputData(0); - var arrOut = outputs[| 0].getValue(); + var arrOut = outputs[0].getValue(); - if(inputs[| 0].type == VALUE_TYPE.surface) { + if(inputs[0].type == VALUE_TYPE.surface) { surface_array_free(arrOut); arrOut = surface_array_clone(arrIn); } else arrOut = array_clone(arrIn); quickSort(arrOut, 0, array_length(arrOut) - 1); - outputs[| 0].setValue(arrOut); + outputs[0].setValue(arrOut); } #endregion } \ No newline at end of file diff --git a/scripts/node_iterate_sort_inline/node_iterate_sort_inline.gml b/scripts/node_iterate_sort_inline/node_iterate_sort_inline.gml index 890eb64a8..a6694d96f 100644 --- a/scripts/node_iterate_sort_inline/node_iterate_sort_inline.gml +++ b/scripts/node_iterate_sort_inline/node_iterate_sort_inline.gml @@ -102,13 +102,13 @@ function Node_Iterate_Sort_Inline(_x, _y, _group = noone) : Node_Collection_Inli } #endregion static compareValue = function(val1, val2) { #region - input_node.outputs[| 0].setValue(val1,,, false); - input_node.outputs[| 1].setValue(val2,,, false); + input_node.outputs[0].setValue(val1,,, false); + input_node.outputs[1].setValue(val2,,, false); resetRender(true); RenderList(topoList); - var res = output_node.inputs[| 0].getValue(); + var res = output_node.inputs[0].getValue(); //print($"Comparing value {val1}, {val2} > [{res}]"); return res; @@ -142,24 +142,24 @@ function Node_Iterate_Sort_Inline(_x, _y, _group = noone) : Node_Collection_Inli iterated = 0; loop_start_time = get_timer(); - var _frj = input_node.inputs[| 0].value_from; + var _frj = input_node.inputs[0].value_from; var type = _frj == noone? VALUE_TYPE.any : _frj.type; - input_node.inputs[| 0].setType(type); - input_node.outputs[| 0].setType(type); - input_node.outputs[| 1].setType(type); + input_node.inputs[0].setType(type); + input_node.outputs[0].setType(type); + input_node.outputs[1].setType(type); - output_node.outputs[| 0].setType(type); + output_node.outputs[0].setType(type); - if(input_node.inputs[| 0].value_from == noone) return; + if(input_node.inputs[0].value_from == noone) return; - var arrIn = input_node.inputs[| 0].getValue(); - var arrOut = output_node.outputs[| 0].getValue(); + var arrIn = input_node.inputs[0].getValue(); + var arrOut = output_node.outputs[0].getValue(); arrOut = array_clone(arrIn); quickSort(arrOut, 0, array_length(arrOut) - 1); - output_node.outputs[| 0].setValue(arrOut); + output_node.outputs[0].setValue(arrOut); } #endregion } \ No newline at end of file diff --git a/scripts/node_iterator_each_inline_input/node_iterator_each_inline_input.gml b/scripts/node_iterator_each_inline_input/node_iterator_each_inline_input.gml index e1dc814e5..7755f16f0 100644 --- a/scripts/node_iterator_each_inline_input/node_iterator_each_inline_input.gml +++ b/scripts/node_iterator_each_inline_input/node_iterator_each_inline_input.gml @@ -8,10 +8,10 @@ function Node_Iterator_Each_Inline_Input(_x, _y, _group = noone) : Node(_x, _y, inline_parent_object = "Node_Iterate_Each_Inline"; manual_ungroupable = false; - inputs[| 0] = nodeValue("Array in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, [] ) + inputs[0] = nodeValue("Array in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, [] ) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Value in", self, VALUE_TYPE.any, 0 ); + outputs[0] = nodeValue_Output("Value in", self, VALUE_TYPE.any, 0 ); static onGetPreviousNodes = function(arr) { array_push(arr, loop); @@ -20,15 +20,15 @@ function Node_Iterator_Each_Inline_Input(_x, _y, _group = noone) : Node(_x, _y, static update = function() { #region if(!is_instanceof(loop, Node_Iterate_Each_Inline)) return; - var _typ = inputs[| 0].value_from == noone? VALUE_TYPE.any : inputs[| 0].value_from.type; - inputs[| 0].setType(_typ); - outputs[| 0].setType(_typ); + var _typ = inputs[0].value_from == noone? VALUE_TYPE.any : inputs[0].value_from.type; + inputs[0].setType(_typ); + outputs[0].setType(_typ); - var val = inputs[| 0].getValue(); + var val = inputs[0].getValue(); var itr = loop.iterated - 1; if(!is_array(val)) return; - outputs[| 0].setValue(array_safe_get_fast(val, itr)); + outputs[0].setValue(array_safe_get_fast(val, itr)); } #endregion } \ No newline at end of file diff --git a/scripts/node_iterator_each_inline_output/node_iterator_each_inline_output.gml b/scripts/node_iterator_each_inline_output/node_iterator_each_inline_output.gml index a53d62bf1..775d11d50 100644 --- a/scripts/node_iterator_each_inline_output/node_iterator_each_inline_output.gml +++ b/scripts/node_iterator_each_inline_output/node_iterator_each_inline_output.gml @@ -8,10 +8,10 @@ function Node_Iterator_Each_Inline_Output(_x, _y, _group = noone) : Node(_x, _y, inline_parent_object = "Node_Iterate_Each_Inline"; manual_ungroupable = false; - inputs[| 0] = nodeValue("Value out", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0 ) + inputs[0] = nodeValue("Value out", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0 ) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Array out", self, VALUE_TYPE.any, [] ); + outputs[0] = nodeValue_Output("Array out", self, VALUE_TYPE.any, [] ); static getNextNodes = function() { #region if(loop.bypassNextNode()) @@ -22,12 +22,12 @@ function Node_Iterator_Each_Inline_Output(_x, _y, _group = noone) : Node(_x, _y, static update = function(frame = CURRENT_FRAME) { #region if(!is_instanceof(loop, Node_Iterate_Each_Inline)) return; - var _typ = inputs[| 0].value_from == noone? VALUE_TYPE.any : inputs[| 0].value_from.type; - inputs[| 0].setType(_typ); - outputs[| 0].setType(_typ); + var _typ = inputs[0].value_from == noone? VALUE_TYPE.any : inputs[0].value_from.type; + inputs[0].setType(_typ); + outputs[0].setType(_typ); var val = getInputData(0); - var arr = outputs[| 0].getValue(); + var arr = outputs[0].getValue(); var itr = loop.iterated - 1; if(!is_array(arr)) return; @@ -45,6 +45,6 @@ function Node_Iterator_Each_Inline_Output(_x, _y, _group = noone) : Node(_x, _y, } else arr[@ itr] = val; - outputs[| 0].setValue(arr); + outputs[0].setValue(arr); } #endregion } \ No newline at end of file diff --git a/scripts/node_iterator_each_input/node_iterator_each_input.gml b/scripts/node_iterator_each_input/node_iterator_each_input.gml index 44ea17ea1..1a476b0d5 100644 --- a/scripts/node_iterator_each_input/node_iterator_each_input.gml +++ b/scripts/node_iterator_each_input/node_iterator_each_input.gml @@ -5,34 +5,34 @@ function Node_Iterator_Each_Input(_x, _y, _group = noone) : Node(_x, _y, _group) manual_deletable = false; - outputs[| 0] = nodeValue_Output("Value in", self, VALUE_TYPE.any, 0 ); + outputs[0] = nodeValue_Output("Value in", self, VALUE_TYPE.any, 0 ); - outputs[| 0].getValueDefault = method(outputs[| 0], outputs[| 0].getValueRecursive); //Get value from outside loop + outputs[0].getValueDefault = method(outputs[0], outputs[0].getValueRecursive); //Get value from outside loop - outputs[| 0].getValueRecursive = function(arr) { + outputs[0].getValueRecursive = function(arr) { if(!variable_struct_exists(group, "iterated")) - return outputs[| 0].getValueDefault(arr); + return outputs[0].getValueDefault(arr); var ind = group.iterated; var val = group.getInputData(0); var ivl = array_safe_get_fast(val, ind); arr[@ 0] = ivl; - arr[@ 1] = group.inputs[| 0]; + arr[@ 1] = group.inputs[0]; } static step = function() { if(group == noone) return; if(!variable_struct_exists(group, "iterated")) return; - if(outputs[| 0].setType(group.inputs[| 0].type)) + if(outputs[0].setType(group.inputs[0].type)) will_setHeight = true; } static getPreviewValues = function() { #region if(group == noone) return noone; - switch(group.inputs[| 0].type) { + switch(group.inputs[0].type) { case VALUE_TYPE.surface : case VALUE_TYPE.dynaSurface : break; @@ -46,7 +46,7 @@ function Node_Iterator_Each_Input(_x, _y, _group = noone) : Node(_x, _y, _group) static getGraphPreviewSurface = function() { #region if(group == noone) return noone; - switch(group.inputs[| 0].type) { + switch(group.inputs[0].type) { case VALUE_TYPE.surface : case VALUE_TYPE.dynaSurface : break; diff --git a/scripts/node_iterator_each_output/node_iterator_each_output.gml b/scripts/node_iterator_each_output/node_iterator_each_output.gml index ffa1da1b7..ba72680e0 100644 --- a/scripts/node_iterator_each_output/node_iterator_each_output.gml +++ b/scripts/node_iterator_each_output/node_iterator_each_output.gml @@ -5,10 +5,10 @@ function Node_Iterator_Each_Output(_x, _y, _group = noone) : Node(_x, _y, _group manual_deletable = false; - inputs[| 0] = nodeValue("Value out", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0 ) + inputs[0] = nodeValue("Value out", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0 ) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Preview", self, VALUE_TYPE.any, 0 ) + outputs[0] = nodeValue_Output("Preview", self, VALUE_TYPE.any, 0 ) .setVisible(false, false); static getNextNodes = function() { #region @@ -19,22 +19,22 @@ function Node_Iterator_Each_Output(_x, _y, _group = noone) : Node(_x, _y, _group static step = function() { #region if(!variable_struct_exists(group, "iterated")) return; - var type = inputs[| 0].value_from == noone? VALUE_TYPE.any : inputs[| 0].value_from.type; + var type = inputs[0].value_from == noone? VALUE_TYPE.any : inputs[0].value_from.type; - inputs[| 0].setType(type); - group.outputs[| 0].setType(type); + inputs[0].setType(type); + group.outputs[0].setType(type); - if(outputs[| 0].setType(type)) + if(outputs[0].setType(type)) will_setHeight = true; } #endregion static cloneValue = function(_prev_val, _val) { #region - if(inputs[| 0].value_from == noone) return _prev_val; + if(inputs[0].value_from == noone) return _prev_val; - var is_surf = inputs[| 0].value_from.type == VALUE_TYPE.surface; + var is_surf = inputs[0].value_from.type == VALUE_TYPE.surface; var _new_val = []; - if(!is_instanceof(inputs[| 0].value_from.node, Node_Iterator_Each_Input)) + if(!is_instanceof(inputs[0].value_from.node, Node_Iterator_Each_Input)) surface_array_free(_prev_val); if(is_surf) _new_val = surface_array_clone(_val); @@ -44,13 +44,13 @@ function Node_Iterator_Each_Output(_x, _y, _group = noone) : Node(_x, _y, _group } #endregion static update = function(frame = CURRENT_FRAME) { #region - if(inputs[| 0].value_from == noone) { + if(inputs[0].value_from == noone) { group.iterationUpdate(); return; } var ind = group.iterated; - var _val = group.outputs[| 0].getValue(); + var _val = group.outputs[0].getValue(); if(!is_array(_val)) { group.iterationUpdate(); return; @@ -58,8 +58,8 @@ function Node_Iterator_Each_Output(_x, _y, _group = noone) : Node(_x, _y, _group _val[@ ind] = cloneValue(array_safe_get_fast(_val, ind), getInputData(0)); - outputs[| 0].setValue(_val); - group.outputs[| 0].setValue(_val); + outputs[0].setValue(_val); + group.outputs[0].setValue(_val); group.iterationUpdate(); } #endregion diff --git a/scripts/node_iterator_each_size/node_iterator_each_size.gml b/scripts/node_iterator_each_size/node_iterator_each_size.gml index 32f856660..7bdd82831 100644 --- a/scripts/node_iterator_each_size/node_iterator_each_size.gml +++ b/scripts/node_iterator_each_size/node_iterator_each_size.gml @@ -5,12 +5,12 @@ function Node_Iterator_Each_Length(_x, _y, _group = noone) : Node(_x, _y, _group setDimension(96, 48); - outputs[| 0] = nodeValue_Output("Length", self, VALUE_TYPE.integer, 0); + outputs[0] = nodeValue_Output("Length", self, VALUE_TYPE.integer, 0); static update = function(frame = CURRENT_FRAME) { if(!variable_struct_exists(group, "iterated")) return; var val = group.getInputData(0); - outputs[| 0].setValue(array_length(val)); + outputs[0].setValue(array_length(val)); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_iterator_filter_inline_input/node_iterator_filter_inline_input.gml b/scripts/node_iterator_filter_inline_input/node_iterator_filter_inline_input.gml index 3148bdaa0..52dc967a0 100644 --- a/scripts/node_iterator_filter_inline_input/node_iterator_filter_inline_input.gml +++ b/scripts/node_iterator_filter_inline_input/node_iterator_filter_inline_input.gml @@ -8,10 +8,10 @@ function Node_Iterator_Filter_Inline_Input(_x, _y, _group = noone) : Node(_x, _y inline_parent_object = "Node_Iterate_Filter_Inline"; manual_ungroupable = false; - inputs[| 0] = nodeValue("Array in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, [] ) + inputs[0] = nodeValue("Array in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, [] ) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Value in", self, VALUE_TYPE.any, 0 ); + outputs[0] = nodeValue_Output("Value in", self, VALUE_TYPE.any, 0 ); static onGetPreviousNodes = function(arr) { array_push(arr, loop); @@ -20,13 +20,13 @@ function Node_Iterator_Filter_Inline_Input(_x, _y, _group = noone) : Node(_x, _y static update = function() { #region if(!is_instanceof(loop, Node_Iterate_Filter_Inline)) return; - var _typ = inputs[| 0].value_from == noone? VALUE_TYPE.any : inputs[| 0].value_from.type; - inputs[| 0].setType(_typ); - outputs[| 0].setType(_typ); + var _typ = inputs[0].value_from == noone? VALUE_TYPE.any : inputs[0].value_from.type; + inputs[0].setType(_typ); + outputs[0].setType(_typ); - var val = inputs[| 0].getValue(); + var val = inputs[0].getValue(); var itr = loop.iterated - 1; - outputs[| 0].setValue(array_safe_get_fast(val, itr)); + outputs[0].setValue(array_safe_get_fast(val, itr)); } #endregion } \ No newline at end of file diff --git a/scripts/node_iterator_filter_inline_output/node_iterator_filter_inline_output.gml b/scripts/node_iterator_filter_inline_output/node_iterator_filter_inline_output.gml index 0a4ca80da..dec7e8e14 100644 --- a/scripts/node_iterator_filter_inline_output/node_iterator_filter_inline_output.gml +++ b/scripts/node_iterator_filter_inline_output/node_iterator_filter_inline_output.gml @@ -8,13 +8,13 @@ function Node_Iterator_Filter_Inline_Output(_x, _y, _group = noone) : Node(_x, _ inline_parent_object = "Node_Iterate_Filter_Inline"; manual_ungroupable = false; - inputs[| 0] = nodeValue("Value out", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0 ) + inputs[0] = nodeValue("Value out", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0 ) .setVisible(true, true); - inputs[| 1] = nodeValue_Bool("Filter result", self, false ) + inputs[1] = nodeValue_Bool("Filter result", self, false ) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Array out", self, VALUE_TYPE.any, [] ); + outputs[0] = nodeValue_Output("Array out", self, VALUE_TYPE.any, [] ); static getNextNodes = function() { #region if(loop.bypassNextNode()) @@ -25,16 +25,16 @@ function Node_Iterator_Filter_Inline_Output(_x, _y, _group = noone) : Node(_x, _ static update = function(frame = CURRENT_FRAME) { #region if(!is_instanceof(loop, Node_Iterate_Filter_Inline)) return; - var _typ = inputs[| 0].value_from == noone? VALUE_TYPE.any : inputs[| 0].value_from.type; - inputs[| 0].setType(_typ); - outputs[| 0].setType(_typ); + var _typ = inputs[0].value_from == noone? VALUE_TYPE.any : inputs[0].value_from.type; + inputs[0].setType(_typ); + outputs[0].setType(_typ); var val = getInputData(0); var res = getInputData(1); - var arr = outputs[| 0].getValue(); + var arr = outputs[0].getValue(); var itr = loop.iterated - 1; if(res) array_push(arr, val); - outputs[| 0].setValue(arr); + outputs[0].setValue(arr); } #endregion } \ No newline at end of file diff --git a/scripts/node_iterator_filter_input/node_iterator_filter_input.gml b/scripts/node_iterator_filter_input/node_iterator_filter_input.gml index 6be6fcdc4..88b0906fa 100644 --- a/scripts/node_iterator_filter_input/node_iterator_filter_input.gml +++ b/scripts/node_iterator_filter_input/node_iterator_filter_input.gml @@ -5,31 +5,31 @@ function Node_Iterator_Filter_Input(_x, _y, _group = noone) : Node(_x, _y, _grou manual_deletable = false; - outputs[| 0] = nodeValue_Output("Value in", self, VALUE_TYPE.any, 0 ); - outputs[| 0].getValueDefault = method(outputs[| 0], outputs[| 0].getValueRecursive); //Get value from outside loop - outputs[| 0].getValueRecursive = function(arr) { #region + outputs[0] = nodeValue_Output("Value in", self, VALUE_TYPE.any, 0 ); + outputs[0].getValueDefault = method(outputs[0], outputs[0].getValueRecursive); //Get value from outside loop + outputs[0].getValueRecursive = function(arr) { #region if(!variable_struct_exists(group, "iterated")) - return outputs[| 0].getValueDefault(arr); + return outputs[0].getValueDefault(arr); var ind = group.iterated; var val = group.getInputData(0); arr[@ 0] = array_safe_get_fast(val, ind) - arr[@ 1] = group.inputs[| 0]; + arr[@ 1] = group.inputs[0]; } #endregion static step = function() { #region if(group == noone) return noone; if(!variable_struct_exists(group, "iterated")) return; - if(outputs[| 0].setType(group.inputs[| 0].type)) + if(outputs[0].setType(group.inputs[0].type)) will_setHeight = true; } #endregion static getPreviewValues = function() { #region if(group == noone) return noone; - switch(group.inputs[| 0].type) { + switch(group.inputs[0].type) { case VALUE_TYPE.surface : case VALUE_TYPE.dynaSurface : break; @@ -43,7 +43,7 @@ function Node_Iterator_Filter_Input(_x, _y, _group = noone) : Node(_x, _y, _grou static getGraphPreviewSurface = function() { #region if(group == noone) return noone; - switch(group.inputs[| 0].type) { + switch(group.inputs[0].type) { case VALUE_TYPE.surface : case VALUE_TYPE.dynaSurface : break; diff --git a/scripts/node_iterator_filter_output/node_iterator_filter_output.gml b/scripts/node_iterator_filter_output/node_iterator_filter_output.gml index 19c7721c0..2ecd48d7b 100644 --- a/scripts/node_iterator_filter_output/node_iterator_filter_output.gml +++ b/scripts/node_iterator_filter_output/node_iterator_filter_output.gml @@ -5,10 +5,10 @@ function Node_Iterator_Filter_Output(_x, _y, _group = noone) : Node(_x, _y, _gro manual_deletable = false; - inputs[| 0] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, false ) + inputs[0] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, false ) .setVisible(true, true); - inputs[| 1] = nodeValue_Bool("Result", self, false ) + inputs[1] = nodeValue_Bool("Result", self, false ) .setVisible(true, true); static getNextNodes = function() { @@ -19,13 +19,13 @@ function Node_Iterator_Filter_Output(_x, _y, _group = noone) : Node(_x, _y, _gro static step = function() { if(!variable_struct_exists(group, "iterated")) return; - var type = inputs[| 0].value_from == noone? VALUE_TYPE.any : inputs[| 0].value_from.type; - inputs[| 0].setType(type) - group.outputs[| 0].setType(type); + var type = inputs[0].value_from == noone? VALUE_TYPE.any : inputs[0].value_from.type; + inputs[0].setType(type) + group.outputs[0].setType(type); } static update = function(frame = CURRENT_FRAME) { - if(inputs[| 0].value_from == noone) { + if(inputs[0].value_from == noone) { group.iterationUpdate(); return; } @@ -33,14 +33,14 @@ function Node_Iterator_Filter_Output(_x, _y, _group = noone) : Node(_x, _y, _gro var val = getInputData(0); var res = getInputData(1); - var _val = group.outputs[| 0].getValue(); + var _val = group.outputs[0].getValue(); if(!is_array(_val)) { group.iterationUpdate(); return; } if(res) { - var is_surf = inputs[| 0].value_from.type == VALUE_TYPE.surface; + var is_surf = inputs[0].value_from.type == VALUE_TYPE.surface; var _new_val = val; if(is_surf) _new_val = surface_array_clone(val); @@ -50,7 +50,7 @@ function Node_Iterator_Filter_Output(_x, _y, _group = noone) : Node(_x, _y, _gro LOG_IF(global.FLAG.render == 1, $"Value {val} filter result {res} to array {_val}"); - group.outputs[| 0].setValue(_val); + group.outputs[0].setValue(_val); group.iterationUpdate(); } } \ No newline at end of file diff --git a/scripts/node_iterator_index/node_iterator_index.gml b/scripts/node_iterator_index/node_iterator_index.gml index 751abbaee..b497e0de9 100644 --- a/scripts/node_iterator_index/node_iterator_index.gml +++ b/scripts/node_iterator_index/node_iterator_index.gml @@ -6,14 +6,14 @@ function Node_Iterator_Index(_x, _y, _group = noone) : Node(_x, _y, _group) cons setDimension(96, 48); - outputs[| 0] = nodeValue_Output("Loop index", self, VALUE_TYPE.integer, 0); + outputs[0] = nodeValue_Output("Loop index", self, VALUE_TYPE.integer, 0); static update = function(frame = CURRENT_FRAME) { #region var gr = is_instanceof(group, Node_Iterator)? group : noone; if(inline_context != noone) gr = inline_context; if(gr == noone) return; - outputs[| 0].setValue(gr.iterated - 1); + outputs[0].setValue(gr.iterated - 1); } #endregion static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region diff --git a/scripts/node_iterator_input/node_iterator_input.gml b/scripts/node_iterator_input/node_iterator_input.gml index d3eebd334..cc0ff5e12 100644 --- a/scripts/node_iterator_input/node_iterator_input.gml +++ b/scripts/node_iterator_input/node_iterator_input.gml @@ -7,13 +7,13 @@ function Node_Iterator_Input(_x, _y, _group = noone) : Node_Group_Input(_x, _y, manual_ungroupable = false; setDimension(96, 48); - outputs[| 0].getValueDefault = method(outputs[| 0], outputs[| 0].getValueRecursive); //Get value from outside loop + outputs[0].getValueDefault = method(outputs[0], outputs[0].getValueRecursive); //Get value from outside loop - outputs[| 0].getValueRecursive = function(arr) { + outputs[0].getValueRecursive = function(arr) { if(!struct_has(group, "iterated")) - return outputs[| 0].getValueDefault(arr); + return outputs[0].getValueDefault(arr); - var _to = outputs[| 1].getJunctionTo(); + var _to = outputs[1].getJunctionTo(); // Not connect to any loop output if(array_empty(_to)) { @@ -26,7 +26,7 @@ function Node_Iterator_Input(_x, _y, _group = noone) : Node_Group_Input(_x, _y, // First iteration, get value from outside if(_node_output == noone || group.iterated == 0) { - outputs[| 0].getValueDefault(arr); + outputs[0].getValueDefault(arr); arr[@ 0] = variable_clone(arr[@ 0]); return; } @@ -36,6 +36,6 @@ function Node_Iterator_Input(_x, _y, _group = noone) : Node_Group_Input(_x, _y, arr[@ 1] = inParent; } - outputs[| 1] = nodeValue_Output("Loop entrance", self, VALUE_TYPE.node, 0) + outputs[1] = nodeValue_Output("Loop entrance", self, VALUE_TYPE.node, 0) .nonForward(); } \ No newline at end of file diff --git a/scripts/node_iterator_length/node_iterator_length.gml b/scripts/node_iterator_length/node_iterator_length.gml index 3d035d1e6..75ce79262 100644 --- a/scripts/node_iterator_length/node_iterator_length.gml +++ b/scripts/node_iterator_length/node_iterator_length.gml @@ -5,14 +5,14 @@ function Node_Iterator_Length(_x, _y, _group = noone) : Node(_x, _y, _group) con manual_ungroupable = false; setDimension(96, 48); - outputs[| 0] = nodeValue_Output("Length", self, VALUE_TYPE.integer, 0); + outputs[0] = nodeValue_Output("Length", self, VALUE_TYPE.integer, 0); static update = function(frame = CURRENT_FRAME) { #region var gr = is_instanceof(group, Node_Iterator)? group : noone; if(inline_context != noone) gr = inline_context; if(gr == noone) return; - outputs[| 0].setValue(gr.getIterationCount()); + outputs[0].setValue(gr.getIterationCount()); } #endregion static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region diff --git a/scripts/node_iterator_output/node_iterator_output.gml b/scripts/node_iterator_output/node_iterator_output.gml index 6511e6203..dc0bd54a3 100644 --- a/scripts/node_iterator_output/node_iterator_output.gml +++ b/scripts/node_iterator_output/node_iterator_output.gml @@ -6,24 +6,24 @@ function Node_Iterator_Output(_x, _y, _group = noone) : Node_Group_Output(_x, _y manual_ungroupable = false; setDimension(96, 48); - inputs[| 0].setFrom_condition = function(_valueFrom) { + inputs[0].setFrom_condition = function(_valueFrom) { if(instanceof(_valueFrom.node) != "Node_Iterator_Input") return true; - if(inputs[| 1].value_from == noone) return true; - if(inputs[| 1].value_from.node == _valueFrom.node) { + if(inputs[1].value_from == noone) return true; + if(inputs[1].value_from.node == _valueFrom.node) { noti_warning("setFrom: Immediate cycle disallowed",, self); return false; } return true; } - inputs[| 1] = nodeValue("Loop exit", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, -1) + inputs[1] = nodeValue("Loop exit", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, -1) .uncache() .setVisible(true, true); - inputs[| 1].setFrom_condition = function(_valueFrom) { + inputs[1].setFrom_condition = function(_valueFrom) { if(instanceof(_valueFrom.node) != "Node_Iterator_Input") return true; - if(inputs[| 0].value_from == noone) return true; - if(inputs[| 0].value_from.node == _valueFrom.node) { + if(inputs[0].value_from == noone) return true; + if(inputs[0].value_from.node == _valueFrom.node) { noti_warning("setFrom: Immediate cycle disallowed",, self); return false; } @@ -42,9 +42,9 @@ function Node_Iterator_Output(_x, _y, _group = noone) : Node_Group_Output(_x, _y } static cloneValue = function(_prev_val, _val) { - if(inputs[| 0].value_from == noone) return _prev_val; + if(inputs[0].value_from == noone) return _prev_val; - var is_surf = inputs[| 0].value_from.type == VALUE_TYPE.surface; + var is_surf = inputs[0].value_from.type == VALUE_TYPE.surface; var _new_val; surface_array_free(_prev_val); @@ -54,7 +54,7 @@ function Node_Iterator_Output(_x, _y, _group = noone) : Node_Group_Output(_x, _y } static update = function(frame = CURRENT_FRAME) { - if(inputs[| 0].value_from == noone) { + if(inputs[0].value_from == noone) { group.iterationUpdate(); return; } diff --git a/scripts/node_iterator_sort_inline_input/node_iterator_sort_inline_input.gml b/scripts/node_iterator_sort_inline_input/node_iterator_sort_inline_input.gml index 33e2ce363..41fd6837e 100644 --- a/scripts/node_iterator_sort_inline_input/node_iterator_sort_inline_input.gml +++ b/scripts/node_iterator_sort_inline_input/node_iterator_sort_inline_input.gml @@ -8,12 +8,12 @@ function Node_Iterator_Sort_Inline_Input(_x, _y, _group = noone) : Node(_x, _y, inline_parent_object = "Node_Iterate_Sort_Inline"; manual_ungroupable = false; - inputs[| 0] = nodeValue("Array in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, [] ) + inputs[0] = nodeValue("Array in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, [] ) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Value 1", self, VALUE_TYPE.any, 0 ); + outputs[0] = nodeValue_Output("Value 1", self, VALUE_TYPE.any, 0 ); - outputs[| 1] = nodeValue_Output("Value 2", self, VALUE_TYPE.any, 0 ); + outputs[1] = nodeValue_Output("Value 2", self, VALUE_TYPE.any, 0 ); startSort = false; diff --git a/scripts/node_iterator_sort_inline_output/node_iterator_sort_inline_output.gml b/scripts/node_iterator_sort_inline_output/node_iterator_sort_inline_output.gml index 3405fc4d7..1a48f7f79 100644 --- a/scripts/node_iterator_sort_inline_output/node_iterator_sort_inline_output.gml +++ b/scripts/node_iterator_sort_inline_output/node_iterator_sort_inline_output.gml @@ -8,8 +8,8 @@ function Node_Iterator_Sort_Inline_Output(_x, _y, _group = noone) : Node(_x, _y, inline_parent_object = "Node_Iterate_Sort_Inline"; manual_ungroupable = false; - inputs[| 0] = nodeValue_Bool("Swap", self, false ) + inputs[0] = nodeValue_Bool("Swap", self, false ) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Array out", self, VALUE_TYPE.any, [] ); + outputs[0] = nodeValue_Output("Array out", self, VALUE_TYPE.any, [] ); } \ No newline at end of file diff --git a/scripts/node_iterator_sort_input/node_iterator_sort_input.gml b/scripts/node_iterator_sort_input/node_iterator_sort_input.gml index 66e5d8692..4f031538b 100644 --- a/scripts/node_iterator_sort_input/node_iterator_sort_input.gml +++ b/scripts/node_iterator_sort_input/node_iterator_sort_input.gml @@ -4,16 +4,16 @@ function Node_Iterator_Sort_Input(_x, _y, _group = noone) : Node(_x, _y, _group) manual_deletable = false; - inputs[| 0] = nodeValue("Value in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0 ) + inputs[0] = nodeValue("Value in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0 ) .setVisible(false, false); - outputs[| 0] = nodeValue_Output("Value in", self, VALUE_TYPE.any, 0 ); + outputs[0] = nodeValue_Output("Value in", self, VALUE_TYPE.any, 0 ); attributes.sort_inputs = 0; static update = function() { var val = getInputData(0); - outputs[| 0].setValue(val); + outputs[0].setValue(val); } } \ No newline at end of file diff --git a/scripts/node_iterator_sort_output/node_iterator_sort_output.gml b/scripts/node_iterator_sort_output/node_iterator_sort_output.gml index 74193b6c3..b198d7615 100644 --- a/scripts/node_iterator_sort_output/node_iterator_sort_output.gml +++ b/scripts/node_iterator_sort_output/node_iterator_sort_output.gml @@ -4,7 +4,7 @@ function Node_Iterator_Sort_Output(_x, _y, _group = noone) : Node(_x, _y, _group manual_deletable = false; - inputs[| 0] = nodeValue_Bool("Result", self, false ) + inputs[0] = nodeValue_Bool("Result", self, false ) .setVisible(true, true); attributes.sort_inputs = 0; diff --git a/scripts/node_jpeg/node_jpeg.gml b/scripts/node_jpeg/node_jpeg.gml index 0220de707..ac6a107c2 100644 --- a/scripts/node_jpeg/node_jpeg.gml +++ b/scripts/node_jpeg/node_jpeg.gml @@ -1,37 +1,37 @@ function Node_JPEG(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "JPEG"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Bool("Active", self, true); + inputs[1] = nodeValue_Bool("Active", self, true); active_index = 1; - inputs[| 2] = nodeValue_Int("Patch Size", self, 8) + inputs[2] = nodeValue_Int("Patch Size", self, 8) .setValidator(VV_min(1)); - inputs[| 3] = nodeValue_Float("Compression", self, 10); + inputs[3] = nodeValue_Float("Compression", self, 10); - inputs[| 4] = nodeValue_Int("Reconstruction", self, 8) + inputs[4] = nodeValue_Int("Reconstruction", self, 8) .setValidator(VV_min(0)); - inputs[| 5] = nodeValue_Surface("Mask", self); + inputs[5] = nodeValue_Surface("Mask", self); - inputs[| 6] = nodeValue_Float("Mix", self, 1) + inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(5); // inputs 8, 9 - inputs[| 10] = nodeValue_Enum_Scroll("Transformation", self, 0, [ "Cosine", "Zigzag", "Smooth Zigzag", "Step" ]); + inputs[10] = nodeValue_Enum_Scroll("Transformation", self, 0, [ "Cosine", "Zigzag", "Smooth Zigzag", "Step" ]); - inputs[| 11] = nodeValue_Rotation("Phase", self, 0); + inputs[11] = nodeValue_Rotation("Phase", self, 0); - inputs[| 12] = nodeValue_Bool("Deconstruct Only", self, false) + inputs[12] = nodeValue_Bool("Deconstruct Only", self, false) - inputs[| 13] = nodeValue_Bool("Reconstruct All", self, false) + inputs[13] = nodeValue_Bool("Reconstruct All", self, false) - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 1, ["Surface", false], 0, 5, 6, 7, @@ -47,7 +47,7 @@ function Node_JPEG(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons var _reall = getSingleValue(13); - inputs[| 4].setVisible(!_reall); + inputs[4].setVisible(!_reall); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region diff --git a/scripts/node_json_file_read/node_json_file_read.gml b/scripts/node_json_file_read/node_json_file_read.gml index 540da9ff8..fac172b38 100644 --- a/scripts/node_json_file_read/node_json_file_read.gml +++ b/scripts/node_json_file_read/node_json_file_read.gml @@ -7,7 +7,7 @@ function Node_create_Json_File_Read(_x, _y, _group = noone) { } var node = new Node_Json_File_Read(_x, _y, _group).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); node.doUpdate(); return node; @@ -17,7 +17,7 @@ function Node_create_Json_File_Read_path(_x, _y, path) { if(!file_exists_empty(path)) return noone; var node = new Node_Json_File_Read(_x, _y, PANEL_GRAPH.getCurrentContext()).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); node.doUpdate(); return node; @@ -29,14 +29,14 @@ function Node_Json_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons w = 128; - inputs[| 0] = nodeValue_Text("Path", self, "") + inputs[0] = nodeValue_Text("Path", self, "") .setDisplay(VALUE_DISPLAY.path_load, { filter: "JSON file|*.json" }) .rejectArray(); - outputs[| 0] = nodeValue_Output("Path", self, VALUE_TYPE.path, "") + outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.path, "") .setVisible(true, true); - outputs[| 1] = nodeValue_Output("Struct", self, VALUE_TYPE.struct, {}); + outputs[1] = nodeValue_Output("Struct", self, VALUE_TYPE.struct, {}); content = {}; path_current = ""; @@ -73,7 +73,7 @@ function Node_Json_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons if(ext != ".json") return false; - outputs[| 0].setValue(path); + outputs[0].setValue(path); content = json_load_struct(path); @@ -101,7 +101,7 @@ function Node_Json_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons var path = path_get(getInputData(0)); if(path_current != path) updatePaths(path); - outputs[| 1].setValue(content); + outputs[1].setValue(content); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { @@ -116,6 +116,6 @@ function Node_Json_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons if(is_array(path)) path = array_safe_get(path, 0); if(!file_exists_empty(path)) return; - inputs[| 0].setValue(path); + inputs[0].setValue(path); } } \ No newline at end of file diff --git a/scripts/node_json_file_write/node_json_file_write.gml b/scripts/node_json_file_write/node_json_file_write.gml index 7047a49d4..cf08bfb08 100644 --- a/scripts/node_json_file_write/node_json_file_write.gml +++ b/scripts/node_json_file_write/node_json_file_write.gml @@ -4,11 +4,11 @@ function Node_Json_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) con w = 128; - inputs[| 0] = nodeValue_Text("Path", self, "") + inputs[0] = nodeValue_Text("Path", self, "") .setDisplay(VALUE_DISPLAY.path_save, { filter: "json file|*.json" }) .rejectArray(); - inputs[| 1] = nodeValue_Struct("Struct", self, {}) + inputs[1] = nodeValue_Struct("Struct", self, {}) .setVisible(true, true); input_display_list = [ 0, 1 ] diff --git a/scripts/node_kuwahara/node_kuwahara.gml b/scripts/node_kuwahara/node_kuwahara.gml index e8cadba82..e4442d4a0 100644 --- a/scripts/node_kuwahara/node_kuwahara.gml +++ b/scripts/node_kuwahara/node_kuwahara.gml @@ -1,27 +1,27 @@ function Node_Kuwahara(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Kuwahara"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Bool("Active", self, true); + inputs[1] = nodeValue_Bool("Active", self, true); active_index = 1; - inputs[| 2] = nodeValue_Int("Radius", self, 2) + inputs[2] = nodeValue_Int("Radius", self, 2) .setValidator(VV_min(1)); - inputs[| 3] = nodeValue_Surface("Mask", self); + inputs[3] = nodeValue_Surface("Mask", self); - inputs[| 4] = nodeValue_Float("Mix", self, 1) + inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Bool("Active", self, true); + inputs[5] = nodeValue_Bool("Active", self, true); active_index = 5; - inputs[| 6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(3); // inputs 7, 8 - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 1, ["Surfaces", true], 0, 3, 4, 7, 8, diff --git a/scripts/node_lerp/node_lerp.gml b/scripts/node_lerp/node_lerp.gml index f1af47906..ee161b5ef 100644 --- a/scripts/node_lerp/node_lerp.gml +++ b/scripts/node_lerp/node_lerp.gml @@ -4,11 +4,11 @@ function Node_Lerp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons setDimension(96, 48); - inputs[| 0] = nodeValue_Float("a", self, 0); - inputs[| 1] = nodeValue_Float("b", self, 0); - inputs[| 2] = nodeValue_Slider_Range("Progress", self, 0); + inputs[0] = nodeValue_Float("a", self, 0); + inputs[1] = nodeValue_Float("b", self, 0); + inputs[2] = nodeValue_Slider_Range("Progress", self, 0); - outputs[| 0] = nodeValue_Output("Result", self, VALUE_TYPE.float, 0); + outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.float, 0); static processData = function(_output, _data, _output_index, _array_index = 0) { return lerp(_data[0], _data[1], _data[2]); diff --git a/scripts/node_level/node_level.gml b/scripts/node_level/node_level.gml index 7b50b9678..1c3d5dcf9 100644 --- a/scripts/node_level/node_level.gml +++ b/scripts/node_level/node_level.gml @@ -1,41 +1,41 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Level"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Slider_Range("White in", self, [0, 1]); + inputs[1] = nodeValue_Slider_Range("White in", self, [0, 1]); - inputs[| 2] = nodeValue_Slider_Range("Red in", self, [0, 1]); + inputs[2] = nodeValue_Slider_Range("Red in", self, [0, 1]); - inputs[| 3] = nodeValue_Slider_Range("Green in", self, [0, 1]); + inputs[3] = nodeValue_Slider_Range("Green in", self, [0, 1]); - inputs[| 4] = nodeValue_Slider_Range("Blue in", self, [0, 1]); + inputs[4] = nodeValue_Slider_Range("Blue in", self, [0, 1]); - inputs[| 5] = nodeValue_Slider_Range("Alpha in", self, [0, 1]); + inputs[5] = nodeValue_Slider_Range("Alpha in", self, [0, 1]); - inputs[| 6] = nodeValue_Surface("Mask", self); + inputs[6] = nodeValue_Surface("Mask", self); - inputs[| 7] = nodeValue_Float("Mix", self, 1) + inputs[7] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 8] = nodeValue_Bool("Active", self, true); + inputs[8] = nodeValue_Bool("Active", self, true); active_index = 8; - inputs[| 9] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[9] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(6); // inputs 10, 11 - inputs[| 12] = nodeValue_Slider_Range("White out", self, [0, 1]); + inputs[12] = nodeValue_Slider_Range("White out", self, [0, 1]); - inputs[| 13] = nodeValue_Slider_Range("Red out", self, [0, 1]); + inputs[13] = nodeValue_Slider_Range("Red out", self, [0, 1]); - inputs[| 14] = nodeValue_Slider_Range("Green out", self, [0, 1]); + inputs[14] = nodeValue_Slider_Range("Green out", self, [0, 1]); - inputs[| 15] = nodeValue_Slider_Range("Blue out", self, [0, 1]); + inputs[15] = nodeValue_Slider_Range("Blue out", self, [0, 1]); - inputs[| 16] = nodeValue_Slider_Range("Alpha out", self, [0, 1]); + inputs[16] = nodeValue_Slider_Range("Alpha out", self, [0, 1]); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); diff --git a/scripts/node_level_selector/node_level_selector.gml b/scripts/node_level_selector/node_level_selector.gml index 8e0c130a5..4c591f005 100644 --- a/scripts/node_level_selector/node_level_selector.gml +++ b/scripts/node_level_selector/node_level_selector.gml @@ -1,39 +1,39 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Level Selector"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Midpoint", self, 0) + inputs[1] = nodeValue_Float("Midpoint", self, 0) .setDisplay(VALUE_DISPLAY.slider) .setMappable(9); - inputs[| 2] = nodeValue_Float("Range", self, 0.1) + inputs[2] = nodeValue_Float("Range", self, 0.1) .setDisplay(VALUE_DISPLAY.slider) .setMappable(10); - inputs[| 3] = nodeValue_Surface("Mask", self); + inputs[3] = nodeValue_Surface("Mask", self); - inputs[| 4] = nodeValue_Float("Mix", self, 1) + inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Bool("Active", self, true); + inputs[5] = nodeValue_Bool("Active", self, true); active_index = 5; - inputs[| 6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(3); // inputs 7, 8, ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 9] = nodeValueMap("Midpoint map", self); + inputs[ 9] = nodeValueMap("Midpoint map", self); - inputs[| 10] = nodeValueMap("Range map", self); + inputs[10] = nodeValueMap("Range map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValue_Bool("Keep Original", self, false); + inputs[11] = nodeValue_Bool("Keep Original", self, false); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); @@ -100,15 +100,15 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g static step = function() { #region __step_mask_modifier(); - inputs[| 1].mappableStep(); - inputs[| 2].mappableStep(); + inputs[1].mappableStep(); + inputs[2].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region surface_set_shader(_outSurf, sh_level_selector); - shader_set_f_map("middle", _data[1], _data[ 9], inputs[| 1]); - shader_set_f_map("range" , _data[2], _data[10], inputs[| 2]); + shader_set_f_map("middle", _data[1], _data[ 9], inputs[1]); + shader_set_f_map("range" , _data[2], _data[10], inputs[2]); shader_set_i("keep", _data[11]); draw_surface_safe(_data[0]); diff --git a/scripts/node_line/node_line.gml b/scripts/node_line/node_line.gml index 5a7e47279..86fabf46b 100644 --- a/scripts/node_line/node_line.gml +++ b/scripts/node_line/node_line.gml @@ -1,75 +1,75 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Draw Line"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Bool("Background", self, false); + inputs[1] = nodeValue_Bool("Background", self, false); - inputs[| 2] = nodeValue_Int("Segment", self, 1) + inputs[2] = nodeValue_Int("Segment", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] }); - inputs[| 3] = nodeValue_Vector("Width", self, [ 2, 2 ]); + inputs[3] = nodeValue_Vector("Width", self, [ 2, 2 ]); - inputs[| 4] = nodeValue_Float("Wiggle", self, 0) + inputs[4] = nodeValue_Float("Wiggle", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.01] }); - inputs[| 5] = nodeValue_Float("Random seed", self, 0); + inputs[5] = nodeValue_Float("Random seed", self, 0); - inputs[| 6] = nodeValue_Rotation("Rotation", self, 0); + inputs[6] = nodeValue_Rotation("Rotation", self, 0); - inputs[| 7] = nodeValue_PathNode("Path", self, noone, "Draw line along path.") + inputs[7] = nodeValue_PathNode("Path", self, noone, "Draw line along path.") .setVisible(true, true); - inputs[| 8] = nodeValue_Slider_Range("Range", self, [0, 1]) + inputs[8] = nodeValue_Slider_Range("Range", self, [0, 1]) .setTooltip("Range of the path to draw."); - inputs[| 9] = nodeValue_Float("Shift", self, 0); + inputs[9] = nodeValue_Float("Shift", self, 0); - inputs[| 10] = nodeValue_Gradient("Color over length", self, new gradientObject(cola(c_white))); + inputs[10] = nodeValue_Gradient("Color over length", self, new gradientObject(cola(c_white))); - inputs[| 11] = nodeValue("Width over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + inputs[11] = nodeValue("Width over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); - inputs[| 12] = nodeValue_Bool("Span width over path", self, false, "Apply the full 'width over length' to the trimmed path."); + inputs[12] = nodeValue_Bool("Span width over path", self, false, "Apply the full 'width over length' to the trimmed path."); - inputs[| 13] = nodeValue_Bool("Round cap", self, false); + inputs[13] = nodeValue_Bool("Round cap", self, false); - inputs[| 14] = nodeValue_Int("Round segment", self, 4) + inputs[14] = nodeValue_Int("Round segment", self, 4) .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 0.1] }); - inputs[| 15] = nodeValue_Bool("Span color over path", self, false, "Apply the full 'color over length' to the trimmed path."); + inputs[15] = nodeValue_Bool("Span color over path", self, false, "Apply the full 'color over length' to the trimmed path."); - inputs[| 16] = nodeValue_Bool("Width pass", self, false); + inputs[16] = nodeValue_Bool("Width pass", self, false); - inputs[| 17] = nodeValue_Bool("1px mode", self, false, "Render pixel perfect 1px line."); + inputs[17] = nodeValue_Bool("1px mode", self, false, "Render pixel perfect 1px line."); - inputs[| 18] = nodeValue_Surface("Texture", self); + inputs[18] = nodeValue_Surface("Texture", self); - inputs[| 19] = nodeValue_Bool("Fix length", self, false, "Fix length of each segment instead of segment count."); + inputs[19] = nodeValue_Bool("Fix length", self, false, "Fix length of each segment instead of segment count."); - inputs[| 20] = nodeValue_Float("Segment length", self, 4); + inputs[20] = nodeValue_Float("Segment length", self, 4); - inputs[| 21] = nodeValue_Vector("Texture position", self, [ 0, 0 ]); + inputs[21] = nodeValue_Vector("Texture position", self, [ 0, 0 ]); - inputs[| 22] = nodeValue_Rotation("Texture Rotation", self, 0); + inputs[22] = nodeValue_Rotation("Texture Rotation", self, 0); - inputs[| 23] = nodeValue_Vector("Texture scale", self, [ 1, 1 ]); + inputs[23] = nodeValue_Vector("Texture scale", self, [ 1, 1 ]); - inputs[| 24] = nodeValue_Gradient("Random Blend", self, new gradientObject(cola(c_white))); + inputs[24] = nodeValue_Gradient("Random Blend", self, new gradientObject(cola(c_white))); - inputs[| 25] = nodeValue_Bool("Invert", self, false ); + inputs[25] = nodeValue_Bool("Invert", self, false ); - inputs[| 26] = nodeValue_Bool("Clamp range", self, false ); + inputs[26] = nodeValue_Bool("Clamp range", self, false ); - inputs[| 27] = nodeValue_Enum_Scroll("Data Type", self, 1, [ "None", "Path", "Segments" ]); + inputs[27] = nodeValue_Enum_Scroll("Data Type", self, 1, [ "None", "Path", "Segments" ]); - inputs[| 28] = nodeValue_Vector("Segments", self, [[]]) + inputs[28] = nodeValue_Vector("Segments", self, [[]]) .setArrayDepth(2); - inputs[| 29] = nodeValue_Bool("Scale texture to length", self, true ); + inputs[29] = nodeValue_Bool("Scale texture to length", self, true ); - inputs[| 30] = nodeValue_Bool("Use Path Bounding box", self, false ); + inputs[30] = nodeValue_Bool("Use Path Bounding box", self, false ); - inputs[| 31] = nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ]) + inputs[31] = nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ]) input_display_list = [ ["Output", true], 0, 1, 30, 31, @@ -80,9 +80,9 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons ["Texture", false], 18, 21, 22, 23, 29, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Width Pass", self, VALUE_TYPE.surface, noone); + outputs[1] = nodeValue_Output("Width Pass", self, VALUE_TYPE.surface, noone); lines = []; line_data = []; @@ -118,31 +118,31 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons static step = function() { var px = !getInputData(17); - var _tex = inputs[| 18].value_from != noone; + var _tex = inputs[18].value_from != noone; var _flen = getInputData(19); - inputs[| 3].setVisible(px); - inputs[| 11].setVisible(px); - inputs[| 12].setVisible(px); - inputs[| 13].setVisible(px && !_tex); - inputs[| 14].setVisible(px); - inputs[| 18].setVisible(px); + inputs[ 3].setVisible(px); + inputs[11].setVisible(px); + inputs[12].setVisible(px); + inputs[13].setVisible(px && !_tex); + inputs[14].setVisible(px); + inputs[18].setVisible(px); - inputs[| 15].setVisible(!_tex); - inputs[| 16].setVisible(!_tex); + inputs[15].setVisible(!_tex); + inputs[16].setVisible(!_tex); - inputs[| 2].setVisible(!_flen); - inputs[| 20].setVisible( _flen); + inputs[ 2].setVisible(!_flen); + inputs[20].setVisible( _flen); var _dtype = getInputData(27); var _pbbox = getInputData(30); - inputs[| 6].setVisible(_dtype == 0); - inputs[| 7].setVisible(_dtype == 1, _dtype == 1); - inputs[| 28].setVisible(_dtype == 2, _dtype == 2); + inputs[ 6].setVisible(_dtype == 0); + inputs[ 7].setVisible(_dtype == 1, _dtype == 1); + inputs[28].setVisible(_dtype == 2, _dtype == 2); - inputs[| 30].setVisible(_dtype); - inputs[| 31].setVisible(_dtype && _pbbox); + inputs[30].setVisible(_dtype); + inputs[31].setVisible(_dtype && _pbbox); } static onValueUpdate = function(index = 0) { @@ -200,7 +200,7 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons /////// Data - if(IS_FIRST_FRAME || inputs[| 11].is_anim) + if(IS_FIRST_FRAME || inputs[11].is_anim) ds_map_clear(widthMap); var _surfDim = [ _dim[0], _dim[1] ]; diff --git a/scripts/node_local_analyze/node_local_analyze.gml b/scripts/node_local_analyze/node_local_analyze.gml index d1ff63bcd..c92687399 100644 --- a/scripts/node_local_analyze/node_local_analyze.gml +++ b/scripts/node_local_analyze/node_local_analyze.gml @@ -1,33 +1,33 @@ function Node_Local_Analyze(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Local Analyze"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Enum_Scroll("Algorithm", self, 0, [ "Average (Blur)", "Maximum", "Minimum" ]); + inputs[1] = nodeValue_Enum_Scroll("Algorithm", self, 0, [ "Average (Blur)", "Maximum", "Minimum" ]); - inputs[| 2] = nodeValue_Float("Size", self, 1) + inputs[2] = nodeValue_Float("Size", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 16, 0.1] }); - inputs[| 3] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + inputs[3] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 4] = nodeValue_Enum_Scroll("Shape", self, 0, [ new scrollItem("Square", s_node_shape_rectangle, 0), + inputs[4] = nodeValue_Enum_Scroll("Shape", self, 0, [ new scrollItem("Square", s_node_shape_rectangle, 0), new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Diamond", s_node_shape_misc, 0) ]); - inputs[| 5] = nodeValue_Surface("Mask", self); + inputs[5] = nodeValue_Surface("Mask", self); - inputs[| 6] = nodeValue_Float("Mix", self, 1) + inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Bool("Active", self, true); + inputs[7] = nodeValue_Bool("Active", self, true); active_index = 7; - inputs[| 8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(5); // inputs 9, 10 - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 7, 8, ["Surfaces", true], 0, 5, 6, 9, 10, diff --git a/scripts/node_logic/node_logic.gml b/scripts/node_logic/node_logic.gml index d072f0649..50759f6ba 100644 --- a/scripts/node_logic/node_logic.gml +++ b/scripts/node_logic/node_logic.gml @@ -20,7 +20,7 @@ enum LOGIC_OPERATOR { default : ind = array_find(global.node_logic_keys, query); } - if(ind >= 0) node.inputs[| 0].setValue(ind); + if(ind >= 0) node.inputs[0].setValue(ind); return node; } @@ -32,7 +32,7 @@ function Node_Logic(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { setDimension(96, 48); - inputs[| 0] = nodeValue_Enum_Scroll("Type", self, 0, [ new scrollItem("And" , s_node_logic, 0), + inputs[0] = nodeValue_Enum_Scroll("Type", self, 0, [ new scrollItem("And" , s_node_logic, 0), new scrollItem("Or" , s_node_logic, 1), new scrollItem("Not" , s_node_logic, 2), new scrollItem("Nand", s_node_logic, 3), @@ -40,25 +40,25 @@ function Node_Logic(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { new scrollItem("Xor" , s_node_logic, 5), ]) .rejectArray(); - outputs[| 0] = nodeValue_Output("Result", self, VALUE_TYPE.boolean, false); + outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.boolean, false); static createNewInput = function() { - var index = ds_list_size(inputs); + var index = array_length(inputs); var jname = chr(ord("a") + index - 1); - inputs[| index] = nodeValue_Bool(jname, self, false ) + inputs[index] = nodeValue_Bool(jname, self, false ) .setVisible(true, true); - return inputs[| index]; + return inputs[index]; } setDynamicInput(1, true, VALUE_TYPE.boolean); static trimInputs = function(amo) { - if(ds_list_size(inputs) < amo + 1) { - while(ds_list_size(inputs) < amo + 1) + if(array_length(inputs) < amo + 1) { + while(array_length(inputs) < amo + 1) createNewInput(); } else { - while(ds_list_size(inputs) > amo + 1) - ds_list_delete(inputs, amo + 1); + while(array_length(inputs) > amo + 1) + array_delete(inputs, amo + 1, 1); } } @@ -143,7 +143,7 @@ function Node_Logic(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { case LOGIC_OPERATOR.land : case LOGIC_OPERATOR.lor : var val = a; - var to = ds_list_size(inputs); + var to = array_length(inputs); for( var i = 2; i < to; i++ ) { var b = getInputData(i); @@ -151,7 +151,7 @@ function Node_Logic(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { } } - outputs[| 0].setValue(val); + outputs[0].setValue(val); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_lovify/node_lovify.gml b/scripts/node_lovify/node_lovify.gml index b76e77fb4..276d0a428 100644 --- a/scripts/node_lovify/node_lovify.gml +++ b/scripts/node_lovify/node_lovify.gml @@ -2,18 +2,18 @@ function Node_Lovify(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co name = "Lovify"; color = CDEF.red; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[1] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 2] = nodeValue_Float("Density", self, 0.5 ) + inputs[2] = nodeValue_Float("Density", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Float("Distribution", self, 0.1 ) + inputs[3] = nodeValue_Float("Distribution", self, 0.1 ) .setDisplay(VALUE_DISPLAY.slider); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 1, ["Surfaces", false], 0, diff --git a/scripts/node_lua_compute/node_lua_compute.gml b/scripts/node_lua_compute/node_lua_compute.gml index 7937e659a..71fe5b83b 100644 --- a/scripts/node_lua_compute/node_lua_compute.gml +++ b/scripts/node_lua_compute/node_lua_compute.gml @@ -2,21 +2,21 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru name = "Lua Compute"; update_on_frame = true; - inputs[| 0] = nodeValue_Text("Function name", self, "render" + string(irandom_range(100000, 999999))); + inputs[0] = nodeValue_Text("Function name", self, "render" + string(irandom_range(100000, 999999))); - inputs[| 1] = nodeValue_Enum_Scroll("Return type", self, 0, { data: [ "Number", "String", "Struct" ], update_hover: false }); + inputs[1] = nodeValue_Enum_Scroll("Return type", self, 0, { data: [ "Number", "String", "Struct" ], update_hover: false }); - inputs[| 2] = nodeValue_Text("Lua code", self, "", o_dialog_lua_reference) + inputs[2] = nodeValue_Text("Lua code", self, "", o_dialog_lua_reference) .setDisplay(VALUE_DISPLAY.codeLUA); - inputs[| 3] = nodeValue("Execution thread", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, noone) + inputs[3] = nodeValue("Execution thread", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, noone) .setVisible(false, true); - inputs[| 4] = nodeValue_Bool("Execute on frame", self, true) + inputs[4] = nodeValue_Bool("Execute on frame", self, true) - outputs[| 0] = nodeValue_Output("Execution thread", self, VALUE_TYPE.node, noone ); + outputs[0] = nodeValue_Output("Execution thread", self, VALUE_TYPE.node, noone ); - outputs[| 1] = nodeValue_Output("Return value", self, VALUE_TYPE.surface, noone); + outputs[1] = nodeValue_Output("Return value", self, VALUE_TYPE.surface, noone); argumentRenderer(global.lua_arguments); @@ -33,57 +33,57 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru lua_state = lua_create(); static createNewInput = function() { - var index = ds_list_size(inputs); - inputs[| index + 0] = nodeValue_Text("Argument name", self, "" ); + var index = array_length(inputs); + inputs[index + 0] = nodeValue_Text("Argument name", self, "" ); - inputs[| index + 1] = nodeValue_Enum_Scroll("Argument type", self, 0 , { data: [ "Number", "String", "Surface", "Struct" ], update_hover: false }); - inputs[| index + 1].editWidget.interactable = false; + inputs[index + 1] = nodeValue_Enum_Scroll("Argument type", self, 0 , { data: [ "Number", "String", "Surface", "Struct" ], update_hover: false }); + inputs[index + 1].editWidget.interactable = false; - inputs[| index + 2] = nodeValue_Float("Argument value", self, 0 ) + inputs[index + 2] = nodeValue_Float("Argument value", self, 0 ) .setVisible(true, true); - inputs[| index + 2].editWidget.interactable = false; + inputs[index + 2].editWidget.interactable = false; - return inputs[| index + 0]; + return inputs[index + 0]; } setDynamicInput(3, false); if(!LOADING && !APPENDING) createNewInput(); static getState = function() { #region - if(inputs[| 3].value_from == noone) return lua_state; - return inputs[| 3].value_from.node.getState(); + if(inputs[3].value_from == noone) return lua_state; + return inputs[3].value_from.node.getState(); } #endregion static refreshDynamicInput = function() { #region - var _in = ds_list_create(); + var _in = []; for( var i = 0; i < input_fix_len; i++ ) - ds_list_add(_in, inputs[| i]); + array_push(_in, inputs[i]); array_resize(input_display_list, input_display_len); - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { if(getInputData(i) != "") { - ds_list_add(_in, inputs[| i + 0]); - ds_list_add(_in, inputs[| i + 1]); - ds_list_add(_in, inputs[| i + 2]); + array_push(_in, inputs[i + 0]); + array_push(_in, inputs[i + 1]); + array_push(_in, inputs[i + 2]); - inputs[| i + 1].editWidget.interactable = true; - if(inputs[| i + 2].editWidget != noone) - inputs[| i + 2].editWidget.interactable = true; + inputs[i + 1].editWidget.interactable = true; + if(inputs[i + 2].editWidget != noone) + inputs[i + 2].editWidget.interactable = true; array_push(input_display_list, i + 2); } else { - delete inputs[| i + 0]; - delete inputs[| i + 1]; - delete inputs[| i + 2]; + delete inputs[i + 0]; + delete inputs[i + 1]; + delete inputs[i + 2]; } } - for( var i = 0; i < ds_list_size(_in); i++ ) - _in[| i].index = i; + for( var i = 0; i < array_length(_in); i++ ) + _in[i].index = i; - ds_list_destroy(inputs); + inputs = _in; refreshInputType(); @@ -91,16 +91,16 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru } #endregion static refreshInputType = function() { #region - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { var type = getInputData(i + 1); switch(type) { - case 0 : inputs[| i + 2].setType(VALUE_TYPE.float); break; - case 1 : inputs[| i + 2].setType(VALUE_TYPE.text); break; - case 2 : inputs[| i + 2].setType(VALUE_TYPE.surface); break; - case 3 : inputs[| i + 2].setType(VALUE_TYPE.struct); break; + case 0 : inputs[i + 2].setType(VALUE_TYPE.float); break; + case 1 : inputs[i + 2].setType(VALUE_TYPE.text); break; + case 2 : inputs[i + 2].setType(VALUE_TYPE.surface); break; + case 3 : inputs[i + 2].setType(VALUE_TYPE.struct); break; } - inputs[| i + 2].setDisplay(VALUE_DISPLAY._default); + inputs[i + 2].setDisplay(VALUE_DISPLAY._default); } } #endregion @@ -116,14 +116,14 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru static step = function() { #region var _type = getInputData(1); switch(_type) { - case 0 : outputs[| 1].setType(VALUE_TYPE.float); break; - case 1 : outputs[| 1].setType(VALUE_TYPE.text); break; - case 2 : outputs[| 1].setType(VALUE_TYPE.struct); break; + case 0 : outputs[1].setType(VALUE_TYPE.float); break; + case 1 : outputs[1].setType(VALUE_TYPE.text); break; + case 2 : outputs[1].setType(VALUE_TYPE.struct); break; } - for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs) - data_length; i += data_length ) { var name = getInputData(i + 0); - inputs[| i + 2].name = name; + inputs[i + 2].name = name; } } #endregion @@ -134,7 +134,7 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru update_on_frame = _exec; argument_val = []; - for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) + for( var i = input_fix_len; i < array_length(inputs) - data_length; i += data_length ) array_push(argument_val, getInputData(i + 2)); lua_projectData(getState()); @@ -144,7 +144,7 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru try { res = lua_call_w(getState(), _func, argument_val); } catch(e) { noti_warning(exception_print(e),, self); } - outputs[| 1].setValue(res); + outputs[1].setValue(res); } #endregion static addCode = function() { #region @@ -152,7 +152,7 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru var _code = getInputData(2); argument_name = []; - for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs) - data_length; i += data_length ) { array_push(argument_name, getInputData(i + 0)); } @@ -170,20 +170,20 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru static doApplyDeserialize = function() { #region refreshDynamicInput(); - for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs) - data_length; i += data_length ) { var name = getInputData(i + 0); var type = getInputData(i + 1); - inputs[| i + 2].name = name; + inputs[i + 2].name = name; switch(type) { - case 0 : inputs[| i + 2].setType(VALUE_TYPE.float); break; - case 1 : inputs[| i + 2].setType(VALUE_TYPE.text); break; - case 2 : inputs[| i + 2].setType(VALUE_TYPE.surface); break; - case 3 : inputs[| i + 2].setType(VALUE_TYPE.struct); break; + case 0 : inputs[i + 2].setType(VALUE_TYPE.float); break; + case 1 : inputs[i + 2].setType(VALUE_TYPE.text); break; + case 2 : inputs[i + 2].setType(VALUE_TYPE.surface); break; + case 3 : inputs[i + 2].setType(VALUE_TYPE.struct); break; } - inputs[| i + 2].setDisplay(VALUE_DISPLAY._default); + inputs[i + 2].setDisplay(VALUE_DISPLAY._default); } } #endregion diff --git a/scripts/node_lua_global/node_lua_global.gml b/scripts/node_lua_global/node_lua_global.gml index b4c8ae3db..330942194 100644 --- a/scripts/node_lua_global/node_lua_global.gml +++ b/scripts/node_lua_global/node_lua_global.gml @@ -2,15 +2,15 @@ function Node_Lua_Global(_x, _y, _group = noone) : Node(_x, _y, _group) construc name = "Lua Global"; preview_channel = 1; - inputs[| 0] = nodeValue_Text("Lua code", self, "", o_dialog_lua_reference) + inputs[0] = nodeValue_Text("Lua code", self, "", o_dialog_lua_reference) .setDisplay(VALUE_DISPLAY.codeLUA); - inputs[| 1] = nodeValue_Enum_Scroll("Run order", self, 0, [ "On start", "Every frame" ]); + inputs[1] = nodeValue_Enum_Scroll("Run order", self, 0, [ "On start", "Every frame" ]); - inputs[| 2] = nodeValue("Execution thread", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, noone) + inputs[2] = nodeValue("Execution thread", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, noone) .setVisible(false, true); - outputs[| 0] = nodeValue_Output("Execution thread", self, VALUE_TYPE.node, noone ); + outputs[0] = nodeValue_Output("Execution thread", self, VALUE_TYPE.node, noone ); input_display_list = [ ["Main", false], 2, 1, 0, @@ -20,8 +20,8 @@ function Node_Lua_Global(_x, _y, _group = noone) : Node(_x, _y, _group) construc is_beginning = false; static getState = function() { #region - if(inputs[| 2].value_from == noone) return lua_state; - return inputs[| 2].value_from.node.getState(); + if(inputs[2].value_from == noone) return lua_state; + return inputs[2].value_from.node.getState(); } #endregion static update = function(frame = CURRENT_FRAME) { #region diff --git a/scripts/node_lua_surface/node_lua_surface.gml b/scripts/node_lua_surface/node_lua_surface.gml index 29d4affea..059f08e3e 100644 --- a/scripts/node_lua_surface/node_lua_surface.gml +++ b/scripts/node_lua_surface/node_lua_surface.gml @@ -3,21 +3,21 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru preview_channel = 1; update_on_frame = true; - inputs[| 0] = nodeValue_Text("Function name", self, "render" + string(irandom_range(100000, 999999))); + inputs[0] = nodeValue_Text("Function name", self, "render" + string(irandom_range(100000, 999999))); - inputs[| 1] = nodeValue_Vector("Output dimension", self, DEF_SURF); + inputs[1] = nodeValue_Vector("Output dimension", self, DEF_SURF); - inputs[| 2] = nodeValue_Text("Lua code", self, "", o_dialog_lua_reference) + inputs[2] = nodeValue_Text("Lua code", self, "", o_dialog_lua_reference) .setDisplay(VALUE_DISPLAY.codeLUA); - inputs[| 3] = nodeValue("Execution thread", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, noone) + inputs[3] = nodeValue("Execution thread", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, noone) .setVisible(false, true); - inputs[| 4] = nodeValue_Bool("Execute on frame", self, true) + inputs[4] = nodeValue_Bool("Execute on frame", self, true) - outputs[| 0] = nodeValue_Output("Execution thread", self, VALUE_TYPE.node, noone ); + outputs[0] = nodeValue_Output("Execution thread", self, VALUE_TYPE.node, noone ); - outputs[| 1] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[1] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); argumentRenderer(global.lua_arguments); @@ -35,108 +35,108 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru lua_state = lua_create(); static createNewInput = function() { - var index = ds_list_size(inputs); - inputs[| index + 0] = nodeValue_Text("Argument name", self, "" ); + var index = array_length(inputs); + inputs[index + 0] = nodeValue_Text("Argument name", self, "" ); - inputs[| index + 1] = nodeValue_Enum_Scroll("Argument type", self, 0 , { data: [ "Number", "String", "Surface", "Struct" ], update_hover: false }); - inputs[| index + 1].editWidget.interactable = false; + inputs[index + 1] = nodeValue_Enum_Scroll("Argument type", self, 0 , { data: [ "Number", "String", "Surface", "Struct" ], update_hover: false }); + inputs[index + 1].editWidget.interactable = false; - inputs[| index + 2] = nodeValue_Float("Argument value", self, 0 ) + inputs[index + 2] = nodeValue_Float("Argument value", self, 0 ) .setVisible(true, true); - inputs[| index + 2].editWidget.interactable = false; + inputs[index + 2].editWidget.interactable = false; - return inputs[| index + 0]; + return inputs[index + 0]; } setDynamicInput(3, false); if(!LOADING && !APPENDING) createNewInput(); - static getState = function() { #region - if(inputs[| 3].value_from == noone) + static getState = function() { + if(inputs[3].value_from == noone) return lua_state; - return inputs[| 3].value_from.node.getState(); - } #endregion + return inputs[3].value_from.node.getState(); + } - static refreshDynamicInput = function() { #region - var _in = ds_list_create(); + static refreshDynamicInput = function() { + var _in = []; for( var i = 0; i < input_fix_len; i++ ) - ds_list_add(_in, inputs[| i]); + array_push(_in, inputs[i]); array_resize(input_display_list, input_display_len); - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { if(getInputData(i) != "") { - ds_list_add(_in, inputs[| i + 0]); - ds_list_add(_in, inputs[| i + 1]); - ds_list_add(_in, inputs[| i + 2]); + array_push(_in, inputs[i + 0]); + array_push(_in, inputs[i + 1]); + array_push(_in, inputs[i + 2]); - inputs[| i + 1].editWidget.interactable = true; - if(inputs[| i + 2].editWidget != noone) - inputs[| i + 2].editWidget.interactable = true; + inputs[i + 1].editWidget.interactable = true; + if(inputs[i + 2].editWidget != noone) + inputs[i + 2].editWidget.interactable = true; array_push(input_display_list, i + 2); } else { - delete inputs[| i + 0]; - delete inputs[| i + 1]; - delete inputs[| i + 2]; + delete inputs[i + 0]; + delete inputs[i + 1]; + delete inputs[i + 2]; } } - for( var i = 0; i < ds_list_size(_in); i++ ) - _in[| i].index = i; + for( var i = 0; i < array_length(_in); i++ ) + _in[i].index = i; - ds_list_destroy(inputs); + inputs = _in; refreshInputType(); createNewInput(); - } #endregion + } - static refreshInputType = function() { #region - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + static refreshInputType = function() { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { var type = getInputData(i + 1); switch(type) { - case 0 : inputs[| i + 2].setType(VALUE_TYPE.float); break; - case 1 : inputs[| i + 2].setType(VALUE_TYPE.text); break; - case 2 : inputs[| i + 2].setType(VALUE_TYPE.surface); break; - case 3 : inputs[| i + 2].setType(VALUE_TYPE.struct); break; + case 0 : inputs[i + 2].setType(VALUE_TYPE.float); break; + case 1 : inputs[i + 2].setType(VALUE_TYPE.text); break; + case 2 : inputs[i + 2].setType(VALUE_TYPE.surface); break; + case 3 : inputs[i + 2].setType(VALUE_TYPE.struct); break; } - inputs[| i + 2].setDisplay(VALUE_DISPLAY._default); + inputs[i + 2].setDisplay(VALUE_DISPLAY._default); } - } #endregion + } - static onValueUpdate = function(index = 0) { #region + static onValueUpdate = function(index = 0) { if(LOADING || APPENDING) return; var _ind = (index - input_fix_len) % data_length; if(_ind == 0) refreshDynamicInput(); else if(_ind == 1) refreshInputType(); - } #endregion + } - static step = function() { #region - for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) { + static step = function() { + for( var i = input_fix_len; i < array_length(inputs) - data_length; i += data_length ) { var name = getInputData(i + 0); - inputs[| i + 2].name = name; + inputs[i + 2].name = name; } - } #endregion + } - static update = function(frame = CURRENT_FRAME) { #region + static update = function(frame = CURRENT_FRAME) { var _func = getInputData(0); var _dimm = getInputData(1); var _exec = getInputData(4); update_on_frame = _exec; argument_val = []; - for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) + for( var i = input_fix_len; i < array_length(inputs) - data_length; i += data_length ) array_push(argument_val, getInputData(i + 2)); lua_projectData(getState()); addCode(); - var _outSurf = outputs[| 1].getValue(); + var _outSurf = outputs[1].getValue(); _outSurf = surface_verify(_outSurf, _dimm[0], _dimm[1], attrDepth()); surface_set_target(_outSurf); @@ -144,15 +144,15 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru catch(e) { noti_warning(exception_print(e),, self); } surface_reset_target(); - outputs[| 1].setValue(_outSurf); - } #endregion + outputs[1].setValue(_outSurf); + } - static addCode = function() { #region + static addCode = function() { var _func = getInputData(0); var _code = getInputData(2); argument_name = []; - for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs) - data_length; i += data_length ) { array_push(argument_name, getInputData(i + 0)); } @@ -165,28 +165,28 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru lua_code += $")\n{_code}\nend"; lua_add_code(getState(), lua_code); - } #endregion + } - static doApplyDeserialize = function() { #region + static doApplyDeserialize = function() { refreshDynamicInput(); - for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs) - data_length; i += data_length ) { var name = getInputData(i + 0); var type = getInputData(i + 1); - inputs[| i + 2].name = name; + inputs[i + 2].name = name; switch(type) { - case 0 : inputs[| i + 2].setType(VALUE_TYPE.float); break; - case 1 : inputs[| i + 2].setType(VALUE_TYPE.text); break; - case 2 : inputs[| i + 2].setType(VALUE_TYPE.surface); break; - case 3 : inputs[| i + 2].setType(VALUE_TYPE.struct); break; + case 0 : inputs[i + 2].setType(VALUE_TYPE.float); break; + case 1 : inputs[i + 2].setType(VALUE_TYPE.text); break; + case 2 : inputs[i + 2].setType(VALUE_TYPE.surface); break; + case 3 : inputs[i + 2].setType(VALUE_TYPE.struct); break; } - inputs[| i + 2].setDisplay(VALUE_DISPLAY._default); + inputs[i + 2].setDisplay(VALUE_DISPLAY._default); } - } #endregion + } static onDestroy = function() { lua_state_destroy(lua_state); diff --git a/scripts/node_math/node_math.gml b/scripts/node_math/node_math.gml index d26b38371..e695298e2 100644 --- a/scripts/node_math/node_math.gml +++ b/scripts/node_math/node_math.gml @@ -38,36 +38,36 @@ enum MATH_OPERATOR { switch(query) { #region case "add" : case "+" : - node.inputs[| 0].setValue(MATH_OPERATOR.add); break; + node.inputs[0].setValue(MATH_OPERATOR.add); break; case "subtract" : case "-" : - node.inputs[| 0].setValue(MATH_OPERATOR.subtract); break; + node.inputs[0].setValue(MATH_OPERATOR.subtract); break; case "multiply" : case "*" : - node.inputs[| 0].setValue(MATH_OPERATOR.multiply); break; + node.inputs[0].setValue(MATH_OPERATOR.multiply); break; case "divide" : case "/" : - node.inputs[| 0].setValue(MATH_OPERATOR.divide); break; + node.inputs[0].setValue(MATH_OPERATOR.divide); break; case "power" : case "^" : - node.inputs[| 0].setValue(MATH_OPERATOR.power); break; - case "root" : node.inputs[| 0].setValue(MATH_OPERATOR.root); break; + node.inputs[0].setValue(MATH_OPERATOR.power); break; + case "root" : node.inputs[0].setValue(MATH_OPERATOR.root); break; - case "sin" : node.inputs[| 0].setValue(MATH_OPERATOR.sin); break; - case "cos" : node.inputs[| 0].setValue(MATH_OPERATOR.cos); break; - case "tan" : node.inputs[| 0].setValue(MATH_OPERATOR.tan); break; + case "sin" : node.inputs[0].setValue(MATH_OPERATOR.sin); break; + case "cos" : node.inputs[0].setValue(MATH_OPERATOR.cos); break; + case "tan" : node.inputs[0].setValue(MATH_OPERATOR.tan); break; - case "modulo" : node.inputs[| 0].setValue(MATH_OPERATOR.modulo); break; + case "modulo" : node.inputs[0].setValue(MATH_OPERATOR.modulo); break; - case "floor" : node.inputs[| 0].setValue(MATH_OPERATOR.floor); break; - case "ceiling" : node.inputs[| 0].setValue(MATH_OPERATOR.ceiling); break; - case "round" : node.inputs[| 0].setValue(MATH_OPERATOR.round); break; + case "floor" : node.inputs[0].setValue(MATH_OPERATOR.floor); break; + case "ceiling" : node.inputs[0].setValue(MATH_OPERATOR.ceiling); break; + case "round" : node.inputs[0].setValue(MATH_OPERATOR.round); break; - case "lerp" : node.inputs[| 0].setValue(MATH_OPERATOR.lerp); break; - case "abs" : node.inputs[| 0].setValue(MATH_OPERATOR.abs); break; + case "lerp" : node.inputs[0].setValue(MATH_OPERATOR.lerp); break; + case "abs" : node.inputs[0].setValue(MATH_OPERATOR.abs); break; - case "clamp" : node.inputs[| 0].setValue(MATH_OPERATOR.clamp); break; - case "snap" : node.inputs[| 0].setValue(MATH_OPERATOR.snap); break; + case "clamp" : node.inputs[0].setValue(MATH_OPERATOR.clamp); break; + case "snap" : node.inputs[0].setValue(MATH_OPERATOR.snap); break; } #endregion return node; @@ -79,28 +79,28 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { color = COLORS.node_blend_number; setDimension(96, 48); - inputs[| 0] = nodeValue_Enum_Scroll("Type", self, 0, [ + inputs[0] = nodeValue_Enum_Scroll("Type", self, 0, [ /* 0 - 9*/ "Add", "Subtract", "Multiply", "Divide", "Power", "Root", "Sin", "Cos", "Tan", "Modulo", /*10 - 20*/ "Floor", "Ceil", "Round", "Lerp", "Abs", "Clamp", "Snap" ]) .rejectArray(); - inputs[| 1] = nodeValue_Float("a", self, 0) + inputs[1] = nodeValue_Float("a", self, 0) .setVisible(true, true); - inputs[| 2] = nodeValue_Float("b", self, 0) + inputs[2] = nodeValue_Float("b", self, 0) .setVisible(true, true); - inputs[| 3] = nodeValue_Bool("Degree angle", self, true); + inputs[3] = nodeValue_Bool("Degree angle", self, true); - inputs[| 4] = nodeValue_Bool("To integer", self, false); + inputs[4] = nodeValue_Bool("To integer", self, false); - inputs[| 5] = nodeValue_Float("Amount", self, 0); + inputs[5] = nodeValue_Float("Amount", self, 0); input_display_list = [ 0, 1, 2, 5, 3, 4, ] - outputs[| 0] = nodeValue_Output("Result", self, VALUE_TYPE.float, 0); + outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.float, 0); use_mod = 0; use_deg = false; @@ -140,10 +140,10 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { case MATH_OPERATOR.sin : case MATH_OPERATOR.cos : case MATH_OPERATOR.tan : - inputs[| 3].setVisible(true); + inputs[3].setVisible(true); break; default: - inputs[| 3].setVisible(false); + inputs[3].setVisible(false); break; } @@ -151,20 +151,20 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { case MATH_OPERATOR.round : case MATH_OPERATOR.floor : case MATH_OPERATOR.ceiling : - inputs[| 4].setVisible(true); + inputs[4].setVisible(true); var int = getInputData(4); - if(int) outputs[| 0].setType(VALUE_TYPE.integer); - else outputs[| 0].setType(VALUE_TYPE.float); + if(int) outputs[0].setType(VALUE_TYPE.integer); + else outputs[0].setType(VALUE_TYPE.float); break; default: - inputs[| 4].setVisible(false); + inputs[4].setVisible(false); - outputs[| 0].setType(VALUE_TYPE.float); + outputs[0].setType(VALUE_TYPE.float); break; } - inputs[| 5].setVisible(false); + inputs[5].setVisible(false); switch(mode) { case MATH_OPERATOR.add : @@ -174,46 +174,46 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { case MATH_OPERATOR.power : case MATH_OPERATOR.root : case MATH_OPERATOR.modulo : - inputs[| 2].name = "b"; + inputs[2].name = "b"; - inputs[| 2].setVisible(true, true); + inputs[2].setVisible(true, true); break; case MATH_OPERATOR.sin : case MATH_OPERATOR.cos : case MATH_OPERATOR.tan : - inputs[| 2].name = "Amplitude"; + inputs[2].name = "Amplitude"; - inputs[| 2].setVisible(true, true); + inputs[2].setVisible(true, true); break; case MATH_OPERATOR.floor : case MATH_OPERATOR.ceiling : case MATH_OPERATOR.round : case MATH_OPERATOR.abs : - inputs[| 2].setVisible(false); + inputs[2].setVisible(false); break; case MATH_OPERATOR.lerp : - inputs[| 2].name = "To"; - inputs[| 5].name = "Amount"; + inputs[2].name = "To"; + inputs[5].name = "Amount"; - inputs[| 2].setVisible(true, true); - inputs[| 5].setVisible(true, true); + inputs[2].setVisible(true, true); + inputs[5].setVisible(true, true); break; case MATH_OPERATOR.clamp : - inputs[| 2].name = "Min"; - inputs[| 5].name = "Max"; + inputs[2].name = "Min"; + inputs[5].name = "Max"; - inputs[| 2].setVisible(true, true); - inputs[| 5].setVisible(true, true); + inputs[2].setVisible(true, true); + inputs[5].setVisible(true, true); break; case MATH_OPERATOR.snap : - inputs[| 2].name = "Snap"; + inputs[2].name = "Snap"; - inputs[| 2].setVisible(true, true); + inputs[2].setVisible(true, true); break; default: return; @@ -258,7 +258,7 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var c = getInputData(5); var val = evalArray(a, b, c); - outputs[| 0].setValue(val); + outputs[0].setValue(val); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_mesh_create_path/node_mesh_create_path.gml b/scripts/node_mesh_create_path/node_mesh_create_path.gml index 9ed1c2845..6fc6270d4 100644 --- a/scripts/node_mesh_create_path/node_mesh_create_path.gml +++ b/scripts/node_mesh_create_path/node_mesh_create_path.gml @@ -3,17 +3,17 @@ function Node_Mesh_Create_Path(_x, _y, _group = noone) : Node(_x, _y, _group) co setDimension(96, 48); - inputs[| 0] = nodeValue_PathNode("Path", self, noone) + inputs[0] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Int("Sample", self, 8); + inputs[1] = nodeValue_Int("Sample", self, 8); - inputs[| 2] = nodeValue_Enum_Scroll("Algorithm", self, 0, [ "Ear Clipping", "Convex Fan", "Delaunay" ]); + inputs[2] = nodeValue_Enum_Scroll("Algorithm", self, 0, [ "Ear Clipping", "Convex Fan", "Delaunay" ]); - outputs[| 0] = nodeValue_Output("Mesh", self, VALUE_TYPE.mesh, noone); + outputs[0] = nodeValue_Output("Mesh", self, VALUE_TYPE.mesh, noone); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - var mesh = outputs[| 0].getValue(); + var mesh = outputs[0].getValue(); if(mesh == noone) return; draw_set_color(COLORS._main_accent); @@ -53,7 +53,7 @@ function Node_Mesh_Create_Path(_x, _y, _group = noone) : Node(_x, _y, _group) co mesh.points = points; mesh.triangles = triangles; - outputs[| 0].setValue(mesh); + outputs[0].setValue(mesh); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_mesh_to_path/node_mesh_to_path.gml b/scripts/node_mesh_to_path/node_mesh_to_path.gml index 85160bb41..4afb2ad66 100644 --- a/scripts/node_mesh_to_path/node_mesh_to_path.gml +++ b/scripts/node_mesh_to_path/node_mesh_to_path.gml @@ -3,10 +3,10 @@ function Node_Mesh_To_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constr setDimension(96, 48); - inputs[| 0] = nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone) + inputs[0] = nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, noone); + outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, noone); segments = []; length = 0; @@ -49,7 +49,7 @@ function Node_Mesh_To_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constr static update = function() { var _mesh = getInputData(0); - outputs[| 0].setValue(self); + outputs[0].setValue(self); if(_mesh == noone) return; segments = _mesh.mergePath(); diff --git a/scripts/node_mesh_transform/node_mesh_transform.gml b/scripts/node_mesh_transform/node_mesh_transform.gml index 16f1f5ed2..401999231 100644 --- a/scripts/node_mesh_transform/node_mesh_transform.gml +++ b/scripts/node_mesh_transform/node_mesh_transform.gml @@ -2,22 +2,22 @@ function Node_Mesh_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) cons name = "Mesh Transform"; setDimension(96, 48);; - inputs[| 0] = nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone) + inputs[0] = nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]); + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]); - inputs[| 2] = nodeValue_Rotation("Rotation", self, 0); + inputs[2] = nodeValue_Rotation("Rotation", self, 0); - inputs[| 3] = nodeValue_Vector("Scale", self, [ 1, 1 ]); + inputs[3] = nodeValue_Vector("Scale", self, [ 1, 1 ]); - inputs[| 4] = nodeValue_Vector("Anchor", self, [ 0, 0 ]); + inputs[4] = nodeValue_Vector("Anchor", self, [ 0, 0 ]); - outputs[| 0] = nodeValue_Output("Mesh", self, VALUE_TYPE.mesh, noone); + outputs[0] = nodeValue_Output("Mesh", self, VALUE_TYPE.mesh, noone); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var imesh = getInputData(0); - var omesh = outputs[| 0].getValue(); + var omesh = outputs[0].getValue(); if(imesh == noone) return; var _cm = imesh.center; @@ -31,8 +31,8 @@ function Node_Mesh_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) cons var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, ax, ay, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; - var hv = inputs[| 2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, ax, ay, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; + var hv = inputs[2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; draw_set_color(COLORS._main_accent); omesh.draw(_x, _y, _s); @@ -73,7 +73,7 @@ function Node_Mesh_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) cons mesh.calcCoM(); - outputs[| 0].setValue(mesh); + outputs[0].setValue(mesh); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_mesh_warp/node_mesh_warp.gml b/scripts/node_mesh_warp/node_mesh_warp.gml index e54bb1ee9..0b5e865b4 100644 --- a/scripts/node_mesh_warp/node_mesh_warp.gml +++ b/scripts/node_mesh_warp/node_mesh_warp.gml @@ -154,38 +154,38 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) anchor_drag_mx = -1; anchor_drag_my = -1; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Int("Sample", self, 8, "Amount of grid subdivision. Higher number means more grid, detail.") + inputs[1] = nodeValue_Int("Sample", self, 8, "Amount of grid subdivision. Higher number means more grid, detail.") .setDisplay(VALUE_DISPLAY.slider, { range: [ 2, 32, 0.1 ] }); - inputs[| 2] = nodeValue_Float("Spring Force", self, 0.5) + inputs[2] = nodeValue_Float("Spring Force", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Trigger("Mesh", self, false ) + inputs[3] = nodeValue_Trigger("Mesh", self, false ) .setDisplay(VALUE_DISPLAY.button, { name: "Generate", UI : true, onClick: function() { Mesh_setTriangle(); } }); - inputs[| 4] = nodeValue_Bool("Diagonal Link", self, false, "Include diagonal link to prevent drastic grid deformation."); + inputs[4] = nodeValue_Bool("Diagonal Link", self, false, "Include diagonal link to prevent drastic grid deformation."); - inputs[| 5] = nodeValue_Bool("Active", self, true); + inputs[5] = nodeValue_Bool("Active", self, true); active_index = 5; - inputs[| 6] = nodeValue_Float("Link Strength", self, 0, "Link length preservation, setting it to 1 will prevent any stretching, contraction.") + inputs[6] = nodeValue_Float("Link Strength", self, 0, "Link length preservation, setting it to 1 will prevent any stretching, contraction.") .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Bool("Full Mesh", self, false); + inputs[7] = nodeValue_Bool("Full Mesh", self, false); - inputs[| 8] = nodeValue_Enum_Scroll("Mesh Type", self, 0, [ new scrollItem("Grid", s_node_mesh_type, 0), + inputs[8] = nodeValue_Enum_Scroll("Mesh Type", self, 0, [ new scrollItem("Grid", s_node_mesh_type, 0), new scrollItem("Custom", s_node_mesh_type, 1), ] ); - inputs[| 9] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 9].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[9] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[9].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Mesh data", self, VALUE_TYPE.object, mesh_data); + outputs[1] = nodeValue_Output("Mesh data", self, VALUE_TYPE.object, mesh_data); input_display_list = [ 5, ["Mesh", false], 0, 8, 9, 1, 7, 3, @@ -193,15 +193,15 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ["Control points", false], ]; - control_index = ds_list_size(inputs); + control_index = array_length(inputs); function createControl() { #region - var index = ds_list_size(inputs); - inputs[| index] = nodeValue_Float("Control point", self, [ PUPPET_FORCE_MODE.move, 16, 16, 8, 0, 8, 8 ]) + var index = array_length(inputs); + inputs[index] = nodeValue_Float("Control point", self, [ PUPPET_FORCE_MODE.move, 16, 16, 8, 0, 8, 8 ]) .setDisplay(VALUE_DISPLAY.puppet_control) array_push(input_display_list, index); - return inputs[| index]; + return inputs[index]; } #endregion attribute_surface_depth(); @@ -350,8 +350,8 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) mesh_data.tris[i].drawPoints(_x, _y, _s); var _hover = -1; - for(var i = control_index; i < ds_list_size(inputs); i++) { - if(inputs[| i].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) + for(var i = control_index; i < array_length(inputs); i++) { + if(inputs[i].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) _hover = i; } @@ -371,7 +371,7 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) i.drag_mx = _mx; i.drag_my = _my; } else if(key_mod_press(SHIFT)) { - ds_list_delete(inputs, _hover); + array_delete(inputs, _hover, 1); array_delete(input_display_list, input_display_index + _hover - control_index, 1); } @@ -407,9 +407,9 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static step = function() { var _type = getInputData(8); - inputs[| 2].setVisible(_type == 0); - inputs[| 4].setVisible(_type == 0); - inputs[| 7].setVisible(_type == 0); + inputs[2].setVisible(_type == 0); + inputs[4].setVisible(_type == 0); + inputs[7].setVisible(_type == 0); if(_type == 0) tools = tools_edit; else if (_type == 1) tools = tools_mesh; @@ -426,7 +426,7 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) if(is_array(surf)) surf = array_safe_get_fast(surf, 0); if(!is_surface(surf)) return; - if(!inputs[| 0].value_from) return; + if(!inputs[0].value_from) return; var sample = getInputData(1); var spring = getInputData(2); @@ -524,7 +524,7 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var sample = getInputData(1); var seed = getInputData(9); - if(!inputs[| 0].value_from) return; + if(!inputs[0].value_from) return; if(is_array(surf)) surf = surf[0]; var ww = surface_get_width_safe(surf); @@ -652,7 +652,7 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static control = function() { var lStr = getInputData(6); - for(var i = control_index, n = ds_list_size(inputs); i < n; i++) { + for(var i = control_index, n = array_length(inputs); i < n; i++) { var c = getInputData(i); for( var j = 0, m = array_length(mesh_data.points); j < m; j++ ) { @@ -709,7 +709,7 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) if(!is_surface(_inSurf)) return [ _outSurf, mesh_data ]; mesh_data.controls = []; - for(var i = control_index; i < ds_list_size(inputs); i++) { + for(var i = control_index; i < array_length(inputs); i++) { var c = getInputData(i); if(c[0] == PUPPET_FORCE_MODE.puppet) diff --git a/scripts/node_midi_in/node_midi_in.gml b/scripts/node_midi_in/node_midi_in.gml index 88be33ad9..2c9ca866f 100644 --- a/scripts/node_midi_in/node_midi_in.gml +++ b/scripts/node_midi_in/node_midi_in.gml @@ -13,14 +13,14 @@ function Node_MIDI_In(_x, _y, _group = noone) : Node(_x, _y, _group) constructor for( var i = 0; i < inps; i++ ) _miniNames[i] = rtmidi_name_in(i); - inputs[| 0] = nodeValue_Enum_Scroll("Input", self, 0, { data: _miniNames, update_hover: false }) + inputs[0] = nodeValue_Enum_Scroll("Input", self, 0, { data: _miniNames, update_hover: false }) .rejectArray(); - outputs[| 0] = nodeValue_Output("Raw Message", self, VALUE_TYPE.float, []); + outputs[0] = nodeValue_Output("Raw Message", self, VALUE_TYPE.float, []); - outputs[| 1] = nodeValue_Output("Pressing notes", self, VALUE_TYPE.float, []); + outputs[1] = nodeValue_Output("Pressing notes", self, VALUE_TYPE.float, []); - outputs[| 2] = nodeValue_Output("Direct values", self, VALUE_TYPE.struct, {}); + outputs[2] = nodeValue_Output("Direct values", self, VALUE_TYPE.struct, {}); watcher_controllers = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { #region var _h = ui(48); @@ -31,16 +31,16 @@ function Node_MIDI_In(_x, _y, _group = noone) : Node(_x, _y, _group) constructor createNewInput(); } - var amo = ds_list_size(inputs); + var amo = array_length(inputs); if(buttonTextIconInstant(amo > 1, THEME.button_hide, _x + _w - bw, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.minus, __txt("Remove"), COLORS._main_value_negative) == 2) { - var _out = outputs[| ds_list_size(outputs) - 1]; + var _out = outputs[array_length(outputs) - 1]; for( var i = 0, n = array_length(_out.value_to); i < n; i++ ) _out.value_to[i].removeFrom(); - array_remove(input_display_list, ds_list_size(inputs) - 1); - ds_list_delete(inputs, ds_list_size(inputs) - 1); - ds_list_delete(inputs, ds_list_size(inputs) - 1); - ds_list_delete(outputs, ds_list_size(outputs) - 1); + array_remove(input_display_list, array_length(inputs) - 1); + array_delete(inputs, array_length(inputs) - 1, 1); + array_delete(inputs, array_length(inputs) - 1, 1); + array_delete(outputs, array_length(outputs) - 1, 1); } var _wx = TEXTBOX_HEIGHT + ui(16); @@ -48,9 +48,9 @@ function Node_MIDI_In(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var _wh = TEXTBOX_HEIGHT; var _ww = _w - _wx - _wh - ui(8); - for( var i = input_fix_len, n = ds_list_size(inputs); i < n; i += data_length ) { - var jun = inputs[| i + 0]; - var nor = inputs[| i + 1]; + for( var i = input_fix_len, n = array_length(inputs); i < n; i += data_length ) { + var jun = inputs[i + 0]; + var nor = inputs[i + 1]; var _name = jun.getName(); var wid = jun.editWidget; @@ -94,15 +94,15 @@ function Node_MIDI_In(_x, _y, _group = noone) : Node(_x, _y, _group) constructor ]; static createNewInput = function() { - var _index = ds_list_size(inputs); + var _index = array_length(inputs); index_watching = _index; var _inp = nodeValue_Int("Index", self, -1 ); _inp.editWidget.slidable = false; - ds_list_add(inputs, _inp); - ds_list_add(inputs, nodeValue("Normalize", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false )); + array_push(inputs, _inp); + array_push(inputs, nodeValue("Normalize", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false )); - ds_list_add(outputs, nodeValue_Output("Value", self, VALUE_TYPE.float, -1 )); + array_push(outputs, nodeValue_Output("Value", self, VALUE_TYPE.float, -1 )); return _inp; } setDynamicInput(2, false); @@ -123,7 +123,7 @@ function Node_MIDI_In(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } #endregion static update = function() { #region - var _inport = inputs[| 0].getValue(); + var _inport = inputs[0].getValue(); if(_inport != MIDI_INPORT) { rtmidi_set_inport(_inport); MIDI_INPORT = _inport; @@ -150,25 +150,25 @@ function Node_MIDI_In(_x, _y, _group = noone) : Node(_x, _y, _group) constructor disp_value = vval; if(index_watching != noone) { - inputs[| index_watching].setValue(vkey); + inputs[index_watching].setValue(vkey); index_watching = noone; } } - outputs[| 0].setValue(a); - outputs[| 1].setValue(notesPressing); - outputs[| 2].setValue(values); + outputs[0].setValue(a); + outputs[1].setValue(notesPressing); + outputs[2].setValue(values); var _ind = 1; - for( var i = input_fix_len, n = ds_list_size(inputs); i < n; i += data_length ) { - var _ikey = inputs[| i + 0].getValue(); - var _inor = inputs[| i + 1].getValue(); + for( var i = input_fix_len, n = array_length(inputs); i < n; i += data_length ) { + var _ikey = inputs[i + 0].getValue(); + var _inor = inputs[i + 1].getValue(); var _val = struct_try_get(values, _ikey, 0); if(_inor) _val /= 127; - outputs[| 2 + _ind].setName($"{_ikey} Value"); - outputs[| 2 + _ind].setValue(_val); + outputs[2 + _ind].setName($"{_ikey} Value"); + outputs[2 + _ind].setValue(_val); _ind++; } diff --git a/scripts/node_mirror/node_mirror.gml b/scripts/node_mirror/node_mirror.gml index b0aed8609..a80746d72 100644 --- a/scripts/node_mirror/node_mirror.gml +++ b/scripts/node_mirror/node_mirror.gml @@ -2,19 +2,19 @@ function Node_Mirror(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co name = "Mirror"; batch_output = false; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0.5, 0.5 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[| 2] = nodeValue_Rotation("Angle", self, 0); + inputs[2] = nodeValue_Rotation("Angle", self, 0); - inputs[| 3] = nodeValue_Bool("Active", self, true); + inputs[3] = nodeValue_Bool("Active", self, true); active_index = 3; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Mirror mask", self, VALUE_TYPE.surface, noone); + outputs[1] = nodeValue_Output("Mirror mask", self, VALUE_TYPE.surface, noone); input_display_list = [ 3, ["Surfaces", false], 0, @@ -40,8 +40,8 @@ function Node_Mirror(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co draw_line(dx0, dy0, dx1, dy1); var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; - var hv = inputs[| 2].drawOverlay(hover, active, _posx, _posy, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; + var hv = inputs[2].drawOverlay(hover, active, _posx, _posy, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; return _hov; } #endregion diff --git a/scripts/node_mk_blinker/node_mk_blinker.gml b/scripts/node_mk_blinker/node_mk_blinker.gml index 1fba8c4a8..d8d9407d1 100644 --- a/scripts/node_mk_blinker/node_mk_blinker.gml +++ b/scripts/node_mk_blinker/node_mk_blinker.gml @@ -2,37 +2,37 @@ function Node_MK_Blinker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group name = "MK Blinker"; batch_output = false; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Surface("Mask", self); + inputs[1] = nodeValue_Surface("Mask", self); - inputs[| 2] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[2] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 3] = nodeValue_Float("Amount", self, 0.5) + inputs[3] = nodeValue_Float("Amount", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 4] = nodeValue_Palette("Target Colors", self, [ c_black ] ); + inputs[4] = nodeValue_Palette("Target Colors", self, [ c_black ] ); - inputs[| 5] = nodeValue_Palette("Light Colors", self, [ c_white ] ); + inputs[5] = nodeValue_Palette("Light Colors", self, [ c_white ] ); - inputs[| 6] = nodeValue_Bool("Active", self, true); + inputs[6] = nodeValue_Bool("Active", self, true); active_index = 6; - inputs[| 7] = nodeValue_Float("Tolerance", self, 0.1 ) + inputs[7] = nodeValue_Float("Tolerance", self, 0.1 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 8] = nodeValue_Bool("Glow", self, false); + inputs[8] = nodeValue_Bool("Glow", self, false); - inputs[| 9] = nodeValue_Float("Size", self, 4 ) + inputs[9] = nodeValue_Float("Size", self, 4 ) .setDisplay(VALUE_DISPLAY.slider, { range : [ 1, 8, 0.1 ] }); - inputs[| 10] = nodeValue_Float("Strength", self, 0.5 ) + inputs[10] = nodeValue_Float("Strength", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Light only", self, VALUE_TYPE.surface, noone); + outputs[1] = nodeValue_Output("Light only", self, VALUE_TYPE.surface, noone); input_display_list = [ new Inspector_Sprite(s_MKFX), 6, ["Surfaces", false], 0, 1, diff --git a/scripts/node_mk_brownian/node_mk_brownian.gml b/scripts/node_mk_brownian/node_mk_brownian.gml index bc9475de3..dce8cc399 100644 --- a/scripts/node_mk_brownian/node_mk_brownian.gml +++ b/scripts/node_mk_brownian/node_mk_brownian.gml @@ -2,36 +2,36 @@ function Node_MK_Brownian(_x, _y, _group = noone) : Node(_x, _y, _group) constru name = "MK Brownian"; update_on_frame = true; - inputs[| 0] = nodeValue_Surface("Background", self); + inputs[0] = nodeValue_Surface("Background", self); - inputs[| 1] = nodeValue_Surface("Sprite", self); + inputs[1] = nodeValue_Surface("Sprite", self); - inputs[| 2] = nodeValue_Int("Amount", self, 10); + inputs[2] = nodeValue_Int("Amount", self, 10); - inputs[| 3] = nodeValue_Area("Area", self, DEF_AREA); + inputs[3] = nodeValue_Area("Area", self, DEF_AREA); - inputs[| 4] = nodeValue_Rotation_Random("Direction", self, [ 0, 45, 135, 0, 0 ] ); + inputs[4] = nodeValue_Rotation_Random("Direction", self, [ 0, 45, 135, 0, 0 ] ); - inputs[| 5] = nodeValue_Range("Speed", self, [ 1, 1 ]); + inputs[5] = nodeValue_Range("Speed", self, [ 1, 1 ]); - inputs[| 6] = nodeValue_Gradient("Color", self, new gradientObject(cola(c_white))); + inputs[6] = nodeValue_Gradient("Color", self, new gradientObject(cola(c_white))); - inputs[| 7] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + inputs[7] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); - inputs[| 8] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[8] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 9] = nodeValue_Range("Angular speed", self, [ -45, 45 ]); + inputs[9] = nodeValue_Range("Angular speed", self, [ -45, 45 ]); - inputs[| 10] = nodeValue_Range("Angular acceleration", self, [ -2, 2 ]); + inputs[10] = nodeValue_Range("Angular acceleration", self, [ -2, 2 ]); - inputs[| 11] = nodeValue_Bool("Turn", self, false); + inputs[11] = nodeValue_Bool("Turn", self, false); - inputs[| 12] = nodeValue_Dimension(self); + inputs[12] = nodeValue_Dimension(self); - inputs[| 13] = nodeValue_Range("Size", self, [ 1, 1 ], { linked : true }); + inputs[13] = nodeValue_Range("Size", self, [ 1, 1 ], { linked : true }); - outputs[| 0] = nodeValue_Output("Output", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Output", self, VALUE_TYPE.surface, noone); input_display_list = [ new Inspector_Sprite(s_MKFX), 8, ["Dimension", false], 0, 12, @@ -44,7 +44,7 @@ function Node_MK_Brownian(_x, _y, _group = noone) : Node(_x, _y, _group) constru static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } @@ -97,9 +97,9 @@ function Node_MK_Brownian(_x, _y, _group = noone) : Node(_x, _y, _group) constru if(is_surface(_surf)) _dim = surface_get_dimension(_surf) - var _outSurf = outputs[| 0].getValue(); + var _outSurf = outputs[0].getValue(); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1]); - outputs[| 0].setValue(_outSurf); + outputs[0].setValue(_outSurf); surface_set_target(_outSurf); DRAW_CLEAR diff --git a/scripts/node_mk_cable/node_mk_cable.gml b/scripts/node_mk_cable/node_mk_cable.gml index 7f5d27a45..52a185f95 100644 --- a/scripts/node_mk_cable/node_mk_cable.gml +++ b/scripts/node_mk_cable/node_mk_cable.gml @@ -1,22 +1,22 @@ function Node_MK_Cable(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "MK Cable"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Vector("Point 1", self, [ 0, 0 ]); + inputs[1] = nodeValue_Vector("Point 1", self, [ 0, 0 ]); - inputs[| 2] = nodeValue_Vector("Point 2", self, [ 16, 16 ]); + inputs[2] = nodeValue_Vector("Point 2", self, [ 16, 16 ]); input_display_list = [ new Inspector_Sprite(s_MKFX), 0, ["Saber", false], 1, 2, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= hv; _hov |= hv; - var hv = inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= hv; _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= hv; _hov |= hv; + var hv = inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= hv; _hov |= hv; return _hov; } diff --git a/scripts/node_mk_fall/node_mk_fall.gml b/scripts/node_mk_fall/node_mk_fall.gml index c7021c04e..e098b433e 100644 --- a/scripts/node_mk_fall/node_mk_fall.gml +++ b/scripts/node_mk_fall/node_mk_fall.gml @@ -2,58 +2,58 @@ function Node_MK_Fall(_x, _y, _group = noone) : Node(_x, _y, _group) constructor name = "MK Fall"; update_on_frame = true; - inputs[| 0] = nodeValue_Surface("Background", self); + inputs[0] = nodeValue_Surface("Background", self); - inputs[| 1] = nodeValue_Dimension(self); + inputs[1] = nodeValue_Dimension(self); - inputs[| 2] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[2] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 3] = nodeValue_Area("Area", self, DEF_AREA); + inputs[3] = nodeValue_Area("Area", self, DEF_AREA); - inputs[| 4] = nodeValue_Int("Amount", self, 10); + inputs[4] = nodeValue_Int("Amount", self, 10); - inputs[| 5] = nodeValue_Float("Gravity", self, 0); + inputs[5] = nodeValue_Float("Gravity", self, 0); - inputs[| 6] = nodeValue_Range("X Swing", self, [ 1, 1 ], { linked : true }); + inputs[6] = nodeValue_Range("X Swing", self, [ 1, 1 ], { linked : true }); - inputs[| 7] = nodeValue_Range("Y Swing", self, [ 0.25, 0.25 ], { linked : true }); + inputs[7] = nodeValue_Range("Y Swing", self, [ 0.25, 0.25 ], { linked : true }); - inputs[| 8] = nodeValue_Range("Swing frequency", self, [ 1, 1 ], { linked : true }); + inputs[8] = nodeValue_Range("Swing frequency", self, [ 1, 1 ], { linked : true }); - inputs[| 9] = nodeValue_Vector("Size", self, [ 4, 2 ]); + inputs[9] = nodeValue_Vector("Size", self, [ 4, 2 ]); - inputs[| 10] = nodeValue_Range("Speed", self, [ 1, 1 ], { linked : true }); + inputs[10] = nodeValue_Range("Speed", self, [ 1, 1 ], { linked : true }); - inputs[| 11] = nodeValue_Range("X Momentum", self, [ 0, 0 ], { linked : true }); + inputs[11] = nodeValue_Range("X Momentum", self, [ 0, 0 ], { linked : true }); - inputs[| 12] = nodeValue_Vector("Wind", self, [ 0, 0 ]); + inputs[12] = nodeValue_Vector("Wind", self, [ 0, 0 ]); - inputs[| 13] = nodeValue_Gradient("Color", self, new gradientObject(cola(c_white))) + inputs[13] = nodeValue_Gradient("Color", self, new gradientObject(cola(c_white))) - inputs[| 14] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + inputs[14] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); - inputs[| 15] = nodeValue_Bool("Ground", self, false); + inputs[15] = nodeValue_Bool("Ground", self, false); - inputs[| 16] = nodeValue_Range("Ground levels", self, [ DEF_SURF_H / 2, DEF_SURF_H ]); + inputs[16] = nodeValue_Range("Ground levels", self, [ DEF_SURF_H / 2, DEF_SURF_H ]); - inputs[| 17] = nodeValue_Range("Y Momentum", self, [ 0, 0 ], { linked : true }); + inputs[17] = nodeValue_Range("Y Momentum", self, [ 0, 0 ], { linked : true }); - inputs[| 18] = nodeValue_Bool("Twist", self, false); + inputs[18] = nodeValue_Bool("Twist", self, false); - inputs[| 19] = nodeValue_Float("Twist Rate", self, 0.1) + inputs[19] = nodeValue_Float("Twist Rate", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 20] = nodeValue_Range("Twist Speed", self, [ 5, 10 ]); + inputs[20] = nodeValue_Range("Twist Speed", self, [ 5, 10 ]); - inputs[| 21] = nodeValue_Range("Scale", self, [ 1, 1 ], { linked : true }); + inputs[21] = nodeValue_Range("Scale", self, [ 1, 1 ], { linked : true }); - inputs[| 22] = nodeValue_Enum_Scroll("Render Type", self, 0, [ new scrollItem("Leaf", s_node_shape_leaf, 0), new scrollItem("Circle", s_node_shape_circle, 0) ]); + inputs[22] = nodeValue_Enum_Scroll("Render Type", self, 0, [ new scrollItem("Leaf", s_node_shape_leaf, 0), new scrollItem("Circle", s_node_shape_circle, 0) ]); - inputs[| 23] = nodeValue_Float("Twist Radius", self, 0.7) + inputs[23] = nodeValue_Float("Twist Radius", self, 0.7) .setDisplay(VALUE_DISPLAY.slider); - outputs[| 0] = nodeValue_Output("Output", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Output", self, VALUE_TYPE.surface, noone); input_display_list = [ new Inspector_Sprite(s_MKFX), 2, ["Dimension", false], 0, 1, @@ -104,7 +104,7 @@ function Node_MK_Fall(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } var _hov = false; - var hv = inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; if(getInputData(15)) { var _gr = getInputData(16); @@ -250,7 +250,7 @@ function Node_MK_Fall(_x, _y, _group = noone) : Node(_x, _y, _group) constructor static step = function() { #region var _typ = getInputData(22); - inputs[| 9].setVisible(_typ == 0); + inputs[9].setVisible(_typ == 0); } #endregion static update = function() { #region @@ -284,9 +284,9 @@ function Node_MK_Fall(_x, _y, _group = noone) : Node(_x, _y, _group) constructor if(is_surface(_surf)) _dim = surface_get_dimension(_surf); - var _outSurf = outputs[| 0].getValue(); + var _outSurf = outputs[0].getValue(); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1]); - outputs[| 0].setValue(_outSurf); + outputs[0].setValue(_outSurf); surface_set_target(_outSurf); DRAW_CLEAR diff --git a/scripts/node_mk_flag/node_mk_flag.gml b/scripts/node_mk_flag/node_mk_flag.gml index 50230244e..666c9cc00 100644 --- a/scripts/node_mk_flag/node_mk_flag.gml +++ b/scripts/node_mk_flag/node_mk_flag.gml @@ -2,37 +2,37 @@ function Node_MK_Flag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c name = "MK Flag"; update_on_frame = true; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Surface("Texture", self); + inputs[1] = nodeValue_Surface("Texture", self); - inputs[| 2] = nodeValue_Vector("Position", self, [ 0, 0 ]); + inputs[2] = nodeValue_Vector("Position", self, [ 0, 0 ]); - inputs[| 3] = nodeValue_Enum_Button("Pin side", self, 0, [ "Left", "Right", "Up", "Down" ]); + inputs[3] = nodeValue_Enum_Button("Pin side", self, 0, [ "Left", "Right", "Up", "Down" ]); - inputs[| 4] = nodeValue_Int("Subdivision", self, 8); + inputs[4] = nodeValue_Int("Subdivision", self, 8); - inputs[| 5] = nodeValue_Float("Wind speed", self, 2); + inputs[5] = nodeValue_Float("Wind speed", self, 2); - inputs[| 6] = nodeValue_Float("Wave width", self, 1) + inputs[6] = nodeValue_Float("Wave width", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 4, 0.1] }); - inputs[| 7] = nodeValue_Float("Wave size", self, 0.2) + inputs[7] = nodeValue_Float("Wave size", self, 0.2) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 8] = nodeValue_Float("Phase", self, 0.1) + inputs[8] = nodeValue_Float("Phase", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 9] = nodeValue_Float("Clip", self, 0.2) + inputs[9] = nodeValue_Float("Clip", self, 0.2) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 10] = nodeValue_Float("Shadow", self, 0.2) + inputs[10] = nodeValue_Float("Shadow", self, 0.2) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 11] = nodeValue_Float("Shadow threshold", self, 0) + inputs[11] = nodeValue_Float("Shadow threshold", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-0.1, 0.1, 0.001] }); - inputs[| 12] = nodeValue_Bool("Invert shadow", self, 0); + inputs[12] = nodeValue_Bool("Invert shadow", self, 0); input_display_list = [ new Inspector_Sprite(s_MKFX), 0, ["Flag", false], 4, 1, 2, 3, @@ -40,7 +40,7 @@ function Node_MK_Flag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c ["Rendering", false], 10, 11, 12, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attributes.iteration = 4; array_push(attributeEditors, "Verlet solver"); @@ -180,7 +180,7 @@ function Node_MK_Flag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; + var hv = inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; //for( var i = 0, n = array_length(links); i < n; i++ ) { // var _l = links[i]; diff --git a/scripts/node_mk_flame/node_mk_flame.gml b/scripts/node_mk_flame/node_mk_flame.gml index 6a2b4ebe6..310efa9b0 100644 --- a/scripts/node_mk_flame/node_mk_flame.gml +++ b/scripts/node_mk_flame/node_mk_flame.gml @@ -2,15 +2,15 @@ function Node_MK_Flame(_x, _y, _group = noone) : Node(_x, _y, _group) constructo name = "MK Flame"; update_on_frame = true; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Rotation("Direction", self, 45); + inputs[1] = nodeValue_Rotation("Direction", self, 45); input_display_list = [ new Inspector_Sprite(s_MKFX), 0, ["Shape", false], 1, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); static step = function() { #region diff --git a/scripts/node_mk_flare/node_mk_flare.gml b/scripts/node_mk_flare/node_mk_flare.gml index 5c7987c88..bdbf1a91a 100644 --- a/scripts/node_mk_flare/node_mk_flare.gml +++ b/scripts/node_mk_flare/node_mk_flare.gml @@ -25,19 +25,19 @@ function Node_MK_Flare(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) name = "MK Lens Flare"; batch_output = false; - inputs[| 0] = nodeValue_Surface("Background", self); + inputs[0] = nodeValue_Surface("Background", self); - inputs[| 1] = nodeValue_Vector("Origin", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Origin", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[| 2] = nodeValue_Dimension(self); + inputs[2] = nodeValue_Dimension(self); - inputs[| 3] = nodeValue_Float("Scale", self, 1) + inputs[3] = nodeValue_Float("Scale", self, 1) - inputs[| 4] = nodeValue_Float("Alpha", self, 1) + inputs[4] = nodeValue_Float("Alpha", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Struct("Flares", self, [ + inputs[5] = nodeValue_Struct("Flares", self, [ new __FlarePart( FLARE_TYPE.circle, 0, 8, 0.75, 16, false, , [ 0, 1 ] ), new __FlarePart( FLARE_TYPE.circle, 0, 16, 0.5, 16, false, , [ 0, 1 ] ), new __FlarePart( FLARE_TYPE.star, 0, 14, 0.3, 8, true, , [ 0.2, 0.8 ], 2, 0.85 ), @@ -55,12 +55,12 @@ function Node_MK_Flare(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setArrayDepth(1) .setArrayDynamic(); - inputs[| 6] = nodeValue_Vector("Focus", self, [ 0.5, 0.5 ]) + inputs[6] = nodeValue_Vector("Focus", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Light only", self, VALUE_TYPE.surface, noone); + outputs[1] = nodeValue_Output("Light only", self, VALUE_TYPE.surface, noone); static __frame = function(_x, _y, _w, _h, _m, _hover) { var _hv = point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h) && _hover; @@ -84,13 +84,13 @@ function Node_MK_Flare(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) flare_draw_y = 0; function edit_flare_color(color) { - var _flares = inputs[| 5].getValue(); + var _flares = inputs[5].getValue(); _flares[flare_color_editing].blend = color; triggerRender(); } flare_builder = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { #region - var _flares = inputs[| 5].getValue(); + var _flares = inputs[5].getValue(); var _amo = array_length(_flares); var _fx = _x; @@ -261,7 +261,7 @@ function Node_MK_Flare(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover, "", THEME.add_16, 0, COLORS._main_value_positive) == 2) { array_push(_flares, new __FlarePart()); - inputs[| 5].setValue(_flares); + inputs[5].setValue(_flares); triggerRender(); } @@ -269,7 +269,7 @@ function Node_MK_Flare(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover, "", THEME.minus_16, 0, COLORS._main_value_negative) == 2) { array_delete(_flares, array_length(_flares) - 1, 1); - inputs[| 5].setValue(_flares); + inputs[5].setValue(_flares); triggerRender(); } @@ -320,8 +320,8 @@ function Node_MK_Flare(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; - var hv = inputs[| 6].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[6].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } diff --git a/scripts/node_mk_fracture/node_mk_fracture.gml b/scripts/node_mk_fracture/node_mk_fracture.gml index 12d93490c..638aa8f11 100644 --- a/scripts/node_mk_fracture/node_mk_fracture.gml +++ b/scripts/node_mk_fracture/node_mk_fracture.gml @@ -1,41 +1,41 @@ function Node_MK_Fracture(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "MK Fracture"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Vector("Subdivision", self, [ 4, 4 ]); + inputs[1] = nodeValue_Vector("Subdivision", self, [ 4, 4 ]); - inputs[| 2] = nodeValue_Float("Progress", self, 0.5) + inputs[2] = nodeValue_Float("Progress", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) .setMappable(3); - inputs[| 3] = nodeValueMap("Progress map", self); + inputs[3] = nodeValueMap("Progress map", self); - inputs[| 4] = nodeValue_Vector("Movement", self, [ 0, 0 ]) + inputs[4] = nodeValue_Vector("Movement", self, [ 0, 0 ]) .setMappable(9, true); - inputs[| 5] = nodeValue_Rotation("Rotation", self, 180) + inputs[5] = nodeValue_Rotation("Rotation", self, 180) .setMappable(10); - inputs[| 6] = nodeValue_Float("Scale", self, 0.) + inputs[6] = nodeValue_Float("Scale", self, 0.) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Float("Alpha", self, 1.) + inputs[7] = nodeValue_Float("Alpha", self, 1.) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 8] = nodeValue_Float("Gravity", self, 0.); + inputs[8] = nodeValue_Float("Gravity", self, 0.); - inputs[| 9] = nodeValueMap("Movement map", self); + inputs[9] = nodeValueMap("Movement map", self); - inputs[| 10] = nodeValueMap("Rotation map", self); + inputs[10] = nodeValueMap("Rotation map", self); - inputs[| 11] = nodeValue_Float("Brick Shift", self, 0.) + inputs[11] = nodeValue_Float("Brick Shift", self, 0.) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 12] = nodeValue_Float("Skew", self, 0.) + inputs[12] = nodeValue_Float("Skew", self, 0.) .setDisplay(VALUE_DISPLAY.slider, { range : [ -1, 1, 0.01 ] }); - inputs[| 13] = nodeValue_Enum_Button("Brick Axis", self, 0, [ "X", "Y" ]); + inputs[13] = nodeValue_Enum_Button("Brick Axis", self, 0, [ "X", "Y" ]); input_display_list = [ new Inspector_Sprite(s_MKFX), 0, ["Fracture", false], 1, 2, 13, 11, 12, @@ -43,15 +43,15 @@ function Node_MK_Fracture(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou ["Render", false], 7, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region } #endregion static step = function() { #region - inputs[| 2].mappableStep(); - inputs[| 4].mappableStep(); + inputs[2].mappableStep(); + inputs[4].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -63,10 +63,10 @@ function Node_MK_Fracture(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou shader_set_f("dimension", _dim); shader_set_f("subdivision", _data[ 1]); - shader_set_f_map("progress", _data[ 2], _data[3], inputs[| 2]); - shader_set_f_map("movement", _data[ 4], _data[9], inputs[| 4]); + shader_set_f_map("progress", _data[ 2], _data[3], inputs[2]); + shader_set_f_map("movement", _data[ 4], _data[9], inputs[4]); shader_set_f("gravity", _data[ 8]); - shader_set_f("rotation", _data[ 5], _data[10], inputs[| 5]); + shader_set_f("rotation", _data[ 5], _data[10], inputs[5]); shader_set_f("scale", _data[ 6]); shader_set_f("alpha", _data[ 7]); shader_set_i("axis", _data[13]); diff --git a/scripts/node_mk_gridballs/node_mk_gridballs.gml b/scripts/node_mk_gridballs/node_mk_gridballs.gml index 733bb9a9c..c37ce5a00 100644 --- a/scripts/node_mk_gridballs/node_mk_gridballs.gml +++ b/scripts/node_mk_gridballs/node_mk_gridballs.gml @@ -1,41 +1,41 @@ function Node_MK_GridBalls(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "MK GridBalls"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Dimension(self); + inputs[1] = nodeValue_Dimension(self); - inputs[| 2] = nodeValue_Vector("Amount", self, [ 4, 4 ]); + inputs[2] = nodeValue_Vector("Amount", self, [ 4, 4 ]); - inputs[| 3] = nodeValue_Rotation("Light", self, 0); + inputs[3] = nodeValue_Rotation("Light", self, 0); - inputs[| 4] = nodeValue_Float("Scatter", self, 0); + inputs[4] = nodeValue_Float("Scatter", self, 0); - inputs[| 5] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[5] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 6] = nodeValue_Float("Shading", self, 0.5) + inputs[6] = nodeValue_Float("Shading", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Rotation("Scatter direction", self, 0); + inputs[7] = nodeValue_Rotation("Scatter direction", self, 0); - inputs[| 8] = nodeValue_Vector("Shift", self, [ 0, 0 ]); + inputs[8] = nodeValue_Vector("Shift", self, [ 0, 0 ]); - inputs[| 9] = nodeValue_Float("Stretch", self, 0); + inputs[9] = nodeValue_Float("Stretch", self, 0); - inputs[| 10] = nodeValue_Rotation("Stretch direction", self, 0); + inputs[10] = nodeValue_Rotation("Stretch direction", self, 0); - inputs[| 11] = nodeValue_Float("Stretch shift", self, 0) + inputs[11] = nodeValue_Float("Stretch shift", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); - inputs[| 12] = nodeValue_Float("Roundness", self, 1) + inputs[12] = nodeValue_Float("Roundness", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 13] = nodeValue_Float("Twist", self, 0); + inputs[13] = nodeValue_Float("Twist", self, 0); - inputs[| 14] = nodeValue_Rotation("Twist axis", self, 0); + inputs[14] = nodeValue_Rotation("Twist axis", self, 0); - inputs[| 15] = nodeValue_Float("Twist shift", self, 0) + inputs[15] = nodeValue_Float("Twist shift", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); input_display_list = [ new Inspector_Sprite(s_MKFX), 5, 1, @@ -45,7 +45,7 @@ function Node_MK_GridBalls(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro ["Render", false], 12, 3, 6, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); @@ -53,7 +53,7 @@ function Node_MK_GridBalls(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 8].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[8].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } diff --git a/scripts/node_mk_gridflip/node_mk_gridflip.gml b/scripts/node_mk_gridflip/node_mk_gridflip.gml index 0c8c12d7b..fd32e246d 100644 --- a/scripts/node_mk_gridflip/node_mk_gridflip.gml +++ b/scripts/node_mk_gridflip/node_mk_gridflip.gml @@ -1,29 +1,29 @@ function Node_MK_GridFlip(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "MK GridFlip"; - inputs[| 0] = nodeValue_Surface("Surface front", self); + inputs[0] = nodeValue_Surface("Surface front", self); - inputs[| 1] = nodeValue_Dimension(self); + inputs[1] = nodeValue_Dimension(self); - inputs[| 2] = nodeValue_Vector("Amount", self, [ 4, 4 ]); + inputs[2] = nodeValue_Vector("Amount", self, [ 4, 4 ]); - inputs[| 3] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[3] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 4] = nodeValue_Surface("Surface back", self); + inputs[4] = nodeValue_Surface("Surface back", self); - inputs[| 5] = nodeValue_Rotation("Rotation", self, 0); + inputs[5] = nodeValue_Rotation("Rotation", self, 0); - inputs[| 6] = nodeValue_Enum_Button("Axis", self, 0, [ "X", "Y" ]); + inputs[6] = nodeValue_Enum_Button("Axis", self, 0, [ "X", "Y" ]); - inputs[| 7] = nodeValue_Float("Sweep", self, 0); + inputs[7] = nodeValue_Float("Sweep", self, 0); - inputs[| 8] = nodeValue_Rotation("Sweep direction", self, 0); + inputs[8] = nodeValue_Rotation("Sweep direction", self, 0); - inputs[| 9] = nodeValue_Float("Sweep shift", self, 0) + inputs[9] = nodeValue_Float("Sweep shift", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); - inputs[| 10] = nodeValue_Enum_Scroll("Flip limit", self, 0, [ new scrollItem("None", s_node_mk_grid_flip, 0), + inputs[10] = nodeValue_Enum_Scroll("Flip limit", self, 0, [ new scrollItem("None", s_node_mk_grid_flip, 0), new scrollItem("90", s_node_mk_grid_flip, 1), new scrollItem("180", s_node_mk_grid_flip, 2), ]); @@ -33,7 +33,7 @@ function Node_MK_GridFlip(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou ["Flip", false], 6, 10, 5, 7, 8, 9, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); diff --git a/scripts/node_mk_rain/node_mk_rain.gml b/scripts/node_mk_rain/node_mk_rain.gml index b368a001b..23837ac04 100644 --- a/scripts/node_mk_rain/node_mk_rain.gml +++ b/scripts/node_mk_rain/node_mk_rain.gml @@ -2,45 +2,45 @@ function Node_MK_Rain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c name = "MK Rain"; update_on_frame = true; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Rotation("Direction", self, 45); + inputs[1] = nodeValue_Rotation("Direction", self, 45); - inputs[| 2] = nodeValue_Float("Density", self, 5); + inputs[2] = nodeValue_Float("Density", self, 5); - inputs[| 3] = nodeValue_Range("Raindrop width", self, [ 1, 1 ]); + inputs[3] = nodeValue_Range("Raindrop width", self, [ 1, 1 ]); - inputs[| 4] = nodeValue_Range("Raindrop length", self, [ 5, 10 ]); + inputs[4] = nodeValue_Range("Raindrop length", self, [ 5, 10 ]); - inputs[| 5] = nodeValue_Gradient("Color", self, new gradientObject(cola(c_white))); + inputs[5] = nodeValue_Gradient("Color", self, new gradientObject(cola(c_white))); - inputs[| 6] = nodeValue_Slider_Range("Alpha", self, [ 0.5, 1 ]); + inputs[6] = nodeValue_Slider_Range("Alpha", self, [ 0.5, 1 ]); - inputs[| 7] = nodeValue_Range("Velocity", self, [ 1, 2 ]); + inputs[7] = nodeValue_Range("Velocity", self, [ 1, 2 ]); - inputs[| 8] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[8] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 9] = nodeValue_Enum_Scroll("Shape", self, 0, [ new scrollItem("Rain", s_node_mk_rain_type, 0), + inputs[9] = nodeValue_Enum_Scroll("Shape", self, 0, [ new scrollItem("Rain", s_node_mk_rain_type, 0), new scrollItem("Snow", s_node_mk_rain_type, 1), new scrollItem("Texture", s_node_mk_rain_type, 2) ]); - inputs[| 10] = nodeValue_Range("Snow size", self, [ 3, 4 ]); + inputs[10] = nodeValue_Range("Snow size", self, [ 3, 4 ]); - inputs[| 11] = nodeValue_Surface("Texture", self); + inputs[11] = nodeValue_Surface("Texture", self); - inputs[| 12] = nodeValue_Slider_Range("Track extension", self, [ 0, 0 ], { range: [ 0, 10, 0.01 ] }); + inputs[12] = nodeValue_Slider_Range("Track extension", self, [ 0, 0 ], { range: [ 0, 10, 0.01 ] }); - inputs[| 13] = nodeValue("Size over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + inputs[13] = nodeValue("Size over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); - inputs[| 14] = nodeValue_Bool("Limited lifespan", self, false); + inputs[14] = nodeValue_Bool("Limited lifespan", self, false); - inputs[| 15] = nodeValue_Slider_Range("Lifespan", self, [ 0, 1 ]) + inputs[15] = nodeValue_Slider_Range("Lifespan", self, [ 0, 1 ]) .setTooltip("Lifespan of a droplet as a ratio of the entire animation."); - inputs[| 16] = nodeValue("Alpha over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + inputs[16] = nodeValue("Alpha over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); - inputs[| 17] = nodeValue_Bool("Fade alpha", self, false); + inputs[17] = nodeValue_Bool("Fade alpha", self, false); input_display_list = [ new Inspector_Sprite(s_MKFX), 0, 8, ["Shape", false], 9, 3, 4, 10, 11, @@ -49,16 +49,16 @@ function Node_MK_Rain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c ["Render", false], 5, 6, 17, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); static step = function() { #region var _shap = getSingleValue(9); - inputs[| 3].setVisible(_shap == 0); - inputs[| 4].setVisible(_shap == 0); - inputs[| 10].setVisible(_shap == 1); - inputs[| 11].setVisible(_shap == 2); - inputs[| 17].setVisible(_shap == 0); + inputs[ 3].setVisible(_shap == 0); + inputs[ 4].setVisible(_shap == 0); + inputs[10].setVisible(_shap == 1); + inputs[11].setVisible(_shap == 2); + inputs[17].setVisible(_shap == 0); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region diff --git a/scripts/node_mk_saber/node_mk_saber.gml b/scripts/node_mk_saber/node_mk_saber.gml index d3e075f43..44c62bc07 100644 --- a/scripts/node_mk_saber/node_mk_saber.gml +++ b/scripts/node_mk_saber/node_mk_saber.gml @@ -1,28 +1,28 @@ function Node_MK_Saber(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "MK Saber"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Vector("Point 1", self, [ 0, 0 ]); + inputs[1] = nodeValue_Vector("Point 1", self, [ 0, 0 ]); - inputs[| 2] = nodeValue_Vector("Point 2", self, [ 16, 16 ]); + inputs[2] = nodeValue_Vector("Point 2", self, [ 16, 16 ]); - inputs[| 3] = nodeValue_Int("Thickness", self, 2) + inputs[3] = nodeValue_Int("Thickness", self, 2) - inputs[| 4] = nodeValue_Gradient("Color", self, new gradientObject(cola(c_white))) + inputs[4] = nodeValue_Gradient("Color", self, new gradientObject(cola(c_white))) - inputs[| 5] = nodeValue_Int("Trace", self, 0); + inputs[5] = nodeValue_Int("Trace", self, 0); - inputs[| 6] = nodeValue_Bool("Fix length", self, false); + inputs[6] = nodeValue_Bool("Fix length", self, false); - inputs[| 7] = nodeValue_Int("Gradient step", self, 1); + inputs[7] = nodeValue_Int("Gradient step", self, 1); - inputs[| 8] = nodeValue_Float("Glow intensity", self, 0) + inputs[8] = nodeValue_Float("Glow intensity", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 9] = nodeValue_Int("Glow radius", self, 0); + inputs[9] = nodeValue_Int("Glow radius", self, 0); - inputs[| 10] = nodeValue_Surface("Trace texture", self) + inputs[10] = nodeValue_Surface("Trace texture", self) .setVisible(true, true); input_display_list = [ new Inspector_Sprite(s_MKFX), 0, @@ -30,7 +30,7 @@ function Node_MK_Saber(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ["Render", false], 4, 7, 5, 8, 9, 10, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); prev_points = noone; fixed_length = 0; @@ -50,8 +50,8 @@ function Node_MK_Saber(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) draw_set_color(COLORS._main_accent); draw_line(_p1x, _p1y, _p2x, _p2y); var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; - var hv = inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; + var hv = inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; return _hov; } #endregion diff --git a/scripts/node_mk_sparkle/node_mk_sparkle.gml b/scripts/node_mk_sparkle/node_mk_sparkle.gml index 6516d6c33..debd67cc1 100644 --- a/scripts/node_mk_sparkle/node_mk_sparkle.gml +++ b/scripts/node_mk_sparkle/node_mk_sparkle.gml @@ -6,29 +6,29 @@ function Node_MK_Sparkle(_x, _y, _group = noone) : Node_Processor(_x, _y, _group dimension_index = -1; update_on_frame = true; - inputs[| 0] = nodeValue_Int("Size", self, 5); + inputs[0] = nodeValue_Int("Size", self, 5); - inputs[| 1] = nodeValueSeed(self, VALUE_TYPE.float); + inputs[1] = nodeValueSeed(self, VALUE_TYPE.float); - inputs[| 2] = nodeValue_Float("Speed", self, 1) + inputs[2] = nodeValue_Float("Speed", self, 1) .setDisplay(VALUE_DISPLAY.slider) - inputs[| 3] = nodeValue_Bool("Shade", self, false); + inputs[3] = nodeValue_Bool("Shade", self, false); - inputs[| 4] = nodeValue_Float("Amount", self, 0.5) + inputs[4] = nodeValue_Float("Amount", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) - inputs[| 5] = nodeValue_Float("Scatter", self, 0.5) + inputs[5] = nodeValue_Float("Scatter", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) - inputs[| 6] = nodeValue_Palette("Colors", self, [ cola(c_black), cola(c_white) ]) + inputs[6] = nodeValue_Palette("Colors", self, [ cola(c_black), cola(c_white) ]) - inputs[| 7] = nodeValue_Bool("Additive", self, false) + inputs[7] = nodeValue_Bool("Additive", self, false) - inputs[| 8] = nodeValue_Float("Diagonal", self, 0.2) + inputs[8] = nodeValue_Float("Diagonal", self, 0.2) .setDisplay(VALUE_DISPLAY.slider) - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ new Inspector_Sprite(s_MKFX), 1, ["Surfaces", false], 0, @@ -149,20 +149,20 @@ function __Node_MK_Sparkle(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro dimension_index = -1; update_on_frame = true; - inputs[| 0] = nodeValue_Int("Size", self, 5); + inputs[0] = nodeValue_Int("Size", self, 5); - inputs[| 1] = nodeValue_Float("Sparkle", self, [ + inputs[1] = nodeValue_Float("Sparkle", self, [ [ MKSPARK_DIRR.main, 0, 0, 2, 1, 0, 0 ], [ MKSPARK_DIRR.main, 0, -1, 1, 1, 0, 0 ], ]) .setArrayDepth(2) .setArrayDynamic(); - inputs[| 2] = nodeValue_Int("Start frame", self, 0); + inputs[2] = nodeValue_Int("Start frame", self, 0); - inputs[| 3] = nodeValue_Float("Speed", self, 1); + inputs[3] = nodeValue_Float("Speed", self, 1); - inputs[| 4] = nodeValue_Int("Loop", self, []) + inputs[4] = nodeValue_Int("Loop", self, []) .setArrayDepth(1) .setArrayDynamic(); @@ -176,8 +176,8 @@ function __Node_MK_Sparkle(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro editor_timer_sx = 0; sparkleEditor = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { - var _size = inputs[| 0].getValue(); - var _sprk = inputs[| 1].getValue(); + var _size = inputs[0].getValue(); + var _sprk = inputs[1].getValue(); var _c = ceil(_size / 2); @@ -358,7 +358,7 @@ function __Node_MK_Sparkle(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro sparkleEditor ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); temp_surface = [ noone, noone ]; diff --git a/scripts/node_mk_tile/node_mk_tile.gml b/scripts/node_mk_tile/node_mk_tile.gml index f2e642107..60595f34d 100644 --- a/scripts/node_mk_tile/node_mk_tile.gml +++ b/scripts/node_mk_tile/node_mk_tile.gml @@ -2,32 +2,32 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c name = "MK Tile"; dimension_index = -1; - inputs[| 0] = nodeValue_Surface("Texture", self); + inputs[0] = nodeValue_Surface("Texture", self); - inputs[| 1] = nodeValue_Surface("Background texture", self); + inputs[1] = nodeValue_Surface("Background texture", self); - inputs[| 2] = nodeValue_Enum_Button("Type", self, 0, [ "GMS Corner (18 sprites)", "GMS Corner + Side (55 sprites)", "Godot Blob (48 sprites)" ] ); + inputs[2] = nodeValue_Enum_Button("Type", self, 0, [ "GMS Corner (18 sprites)", "GMS Corner + Side (55 sprites)", "Godot Blob (48 sprites)" ] ); - inputs[| 3] = nodeValue_Enum_Button("Output type", self, 0, [ "Sheet", "Array" ] ); + inputs[3] = nodeValue_Enum_Button("Output type", self, 0, [ "Sheet", "Array" ] ); - inputs[| 4] = nodeValue_Padding("Crop", self, [ 8, 8, 8, 8 ]); + inputs[4] = nodeValue_Padding("Crop", self, [ 8, 8, 8, 8 ]); - inputs[| 5] = nodeValue_Enum_Button("Edge type", self, 0, [ "Uniform", "Individual" ] ); + inputs[5] = nodeValue_Enum_Button("Edge type", self, 0, [ "Uniform", "Individual" ] ); - inputs[| 6] = nodeValue_Surface("Edge", self); - inputs[| 7] = nodeValue_Surface("Edge bottom", self); - inputs[| 8] = nodeValue_Surface("Edge left", self); - inputs[| 9] = nodeValue_Surface("Edge right", self); + inputs[6] = nodeValue_Surface("Edge", self); + inputs[7] = nodeValue_Surface("Edge bottom", self); + inputs[8] = nodeValue_Surface("Edge left", self); + inputs[9] = nodeValue_Surface("Edge right", self); - inputs[| 10] = nodeValue_Padding("Edge shift", self, [ 0, 0, 0, 0 ]); + inputs[10] = nodeValue_Padding("Edge shift", self, [ 0, 0, 0, 0 ]); - inputs[| 11] = nodeValue_Toggle("Full edge", self, 0, { data: [ "T", "B", "L", "R" ] }); + inputs[11] = nodeValue_Toggle("Full edge", self, 0, { data: [ "T", "B", "L", "R" ] }); - inputs[| 12] = nodeValue_Enum_Scroll("Edge sprite", self, 0, [ "Single", "Side + Center", "Side + Center + Side" ] ); + inputs[12] = nodeValue_Enum_Scroll("Edge sprite", self, 0, [ "Single", "Side + Center", "Side + Center + Side" ] ); - inputs[| 13] = nodeValue_Enum_Button("Edge transform", self, 0, [ "Flip", "Rotate" ] ); + inputs[13] = nodeValue_Enum_Button("Edge transform", self, 0, [ "Flip", "Rotate" ] ); - inputs[| 14] = nodeValue_Bool("Sort array by bit", self, true) + inputs[14] = nodeValue_Bool("Sort array by bit", self, true) input_display_list = [ new Inspector_Sprite(s_MKFX), ["Surfaces", true], 0, 1, @@ -37,7 +37,7 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c ["Output", false], 3, 14, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); temp_surface = array_create(55); for( var i = 0, n = array_length(temp_surface); i < n; i++ ) @@ -139,12 +139,12 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c var _edgType = getSingleValue( 5); var _edgFull = getSingleValue(11); - inputs[| 6].name = _edgType == 1? "Edge top" : "Edge" - inputs[| 7].setVisible(_edgType == 1, _edgType == 1); - inputs[| 8].setVisible(_edgType == 1, _edgType == 1); - inputs[| 9].setVisible(_edgType == 1, _edgType == 1); - inputs[| 13].setVisible(_edgType == 0); - inputs[| 14].setVisible(_outType == 1); + inputs[ 6].name = _edgType == 1? "Edge top" : "Edge" + inputs[ 7].setVisible(_edgType == 1, _edgType == 1); + inputs[ 8].setVisible(_edgType == 1, _edgType == 1); + inputs[ 9].setVisible(_edgType == 1, _edgType == 1); + inputs[13].setVisible(_edgType == 0); + inputs[14].setVisible(_outType == 1); } #endregion static generateFull = function(_data, _tex0, _tex1, _edge, _crop, indMain, indEdge_et, indEdge_eb, indEdge_el, indEdge_er) { #region diff --git a/scripts/node_module_test/node_module_test.gml b/scripts/node_module_test/node_module_test.gml index 02d038a41..76bbe3e7b 100644 --- a/scripts/node_module_test/node_module_test.gml +++ b/scripts/node_module_test/node_module_test.gml @@ -1,26 +1,26 @@ function Node_Module_SubModule(parent) : NodeModule(parent) constructor { - inputs[| 0] = nodeValue_Surface("Module input 0", parent); + inputs[0] = nodeValue_Surface("Module input 0", parent); - inputs[| 1] = nodeValue("Module input 1", parent, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); + inputs[1] = nodeValue("Module input 1", parent, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); } function Node_Module_Test(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Module test"; - inputs[| 0] = nodeValue_Float("Static input", self, 0); + inputs[0] = nodeValue_Float("Static input", self, 0); - outputs[| 0] = nodeValue_Output("Output", self, VALUE_TYPE.float, 0); + outputs[0] = nodeValue_Output("Output", self, VALUE_TYPE.float, 0); //input_display_list = [ 0 ]; setDynamicInput(1); static createNewInput = function() { #region - var index = ds_list_size(inputs); + var index = array_length(inputs); - inputs[| index] = new Node_Module_SubModule(self); + inputs[index] = new Node_Module_SubModule(self); - return inputs[| index]; + return inputs[index]; } if(!LOADING && !APPENDING) createNewInput(); #endregion static step = function() {} diff --git a/scripts/node_monitor_capture/node_monitor_capture.gml b/scripts/node_monitor_capture/node_monitor_capture.gml index 359740333..084eba5f3 100644 --- a/scripts/node_monitor_capture/node_monitor_capture.gml +++ b/scripts/node_monitor_capture/node_monitor_capture.gml @@ -4,13 +4,13 @@ function Node_Monitor_Capture(_x, _y, _group = noone) : Node(_x, _y, _group) con monitors = display_measure_all(); - inputs[| 0] = nodeValue_Enum_Scroll("Mode", self, 0, [ "Monitor", "Region" ]); + inputs[0] = nodeValue_Enum_Scroll("Mode", self, 0, [ "Monitor", "Region" ]); - inputs[| 1] = nodeValue_Enum_Scroll("Monitor", self, 0, array_create_ext(array_length(monitors), function(ind) { return monitors[ind][9]; })); + inputs[1] = nodeValue_Enum_Scroll("Monitor", self, 0, array_create_ext(array_length(monitors), function(ind) { return monitors[ind][9]; })); - inputs[| 2] = nodeValue_Vector("Region", self, [ 0, 0, display_get_width(), display_get_height() ]); + inputs[2] = nodeValue_Vector("Region", self, [ 0, 0, display_get_width(), display_get_height() ]); - outputs[| 0] = nodeValue_Output("GUI", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("GUI", self, VALUE_TYPE.surface, noone); input_display_list = [ 0, 1, 2, @@ -23,8 +23,8 @@ function Node_Monitor_Capture(_x, _y, _group = noone) : Node(_x, _y, _group) con var _mode = getInputData(0); - inputs[| 1].setVisible(_mode == 0); - inputs[| 2].setVisible(_mode == 1); + inputs[1].setVisible(_mode == 0); + inputs[2].setVisible(_mode == 1); } #endregion static update = function() { #region @@ -42,6 +42,6 @@ function Node_Monitor_Capture(_x, _y, _group = noone) : Node(_x, _y, _group) con break; } - outputs[| 0].setValue(surface); + outputs[0].setValue(surface); } #endregion } \ No newline at end of file diff --git a/scripts/node_morph_surface/node_morph_surface.gml b/scripts/node_morph_surface/node_morph_surface.gml index df6ec1c59..876f418d7 100644 --- a/scripts/node_morph_surface/node_morph_surface.gml +++ b/scripts/node_morph_surface/node_morph_surface.gml @@ -1,17 +1,17 @@ function Node_Morph_Surface(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Morph Surface"; - inputs[| 0] = nodeValue_Surface("Surface from", self); + inputs[0] = nodeValue_Surface("Surface from", self); - inputs[| 1] = nodeValue_Surface("Surface to", self); + inputs[1] = nodeValue_Surface("Surface to", self); - inputs[| 2] = nodeValue_Float("Morph amount", self, 0) + inputs[2] = nodeValue_Float("Morph amount", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Float("Threshold", self, 0.5) + inputs[3] = nodeValue_Float("Threshold", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Surfaces", true], 0, 1, diff --git a/scripts/node_move_point/node_move_point.gml b/scripts/node_move_point/node_move_point.gml index 9b50651b7..b2fca5781 100644 --- a/scripts/node_move_point/node_move_point.gml +++ b/scripts/node_move_point/node_move_point.gml @@ -4,26 +4,26 @@ function Node_Move_Point(_x, _y, _group = noone) : Node_Processor(_x, _y, _group setDimension(96, 48); - inputs[| 0] = nodeValue_Vector("Point", self, [ 0, 0, ]) + inputs[0] = nodeValue_Vector("Point", self, [ 0, 0, ]) .setVisible(true, true); - inputs[| 1] = nodeValue_Enum_Scroll("Mode", self, 0, [ "XY Shift", "Direction + Distance" ]); + inputs[1] = nodeValue_Enum_Scroll("Mode", self, 0, [ "XY Shift", "Direction + Distance" ]); - inputs[| 2] = nodeValue_Vector("Shift", self, [ 0, 0 ]); + inputs[2] = nodeValue_Vector("Shift", self, [ 0, 0 ]); - inputs[| 3] = nodeValue_Rotation("Direction", self, 0); + inputs[3] = nodeValue_Rotation("Direction", self, 0); - inputs[| 4] = nodeValue_Float("Distance", self, 4 ); + inputs[4] = nodeValue_Float("Distance", self, 4 ); - outputs[| 0] = nodeValue_Output("Result", self, VALUE_TYPE.float, [ 0, 0 ]) + outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); static step = function() { var _mode = getInputData(1); - inputs[| 2].setVisible(_mode == 0); - inputs[| 3].setVisible(_mode == 1); - inputs[| 4].setVisible(_mode == 1); + inputs[2].setVisible(_mode == 0); + inputs[3].setVisible(_mode == 1); + inputs[4].setVisible(_mode == 1); } static processData = function(_output, _data, _output_index, _array_index = 0) { diff --git a/scripts/node_noise/node_noise.gml b/scripts/node_noise/node_noise.gml index 42379c2c4..1172bf537 100644 --- a/scripts/node_noise/node_noise.gml +++ b/scripts/node_noise/node_noise.gml @@ -1,18 +1,18 @@ function Node_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Noise"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[1] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 2] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); + inputs[2] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); - inputs[| 3] = nodeValue_Slider_Range("Color R range", self, [ 0, 1 ]); + inputs[3] = nodeValue_Slider_Range("Color R range", self, [ 0, 1 ]); - inputs[| 4] = nodeValue_Slider_Range("Color G range", self, [ 0, 1 ]); + inputs[4] = nodeValue_Slider_Range("Color G range", self, [ 0, 1 ]); - inputs[| 5] = nodeValue_Slider_Range("Color B range", self, [ 0, 1 ]); + inputs[5] = nodeValue_Slider_Range("Color B range", self, [ 0, 1 ]); input_display_list = [ ["Output", false], 0, @@ -20,20 +20,20 @@ function Node_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con ["Color", false], 2, 3, 4, 5, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static step = function() { var _col = getInputData(2); - inputs[| 3].setVisible(_col != 0); - inputs[| 4].setVisible(_col != 0); - inputs[| 5].setVisible(_col != 0); + inputs[3].setVisible(_col != 0); + inputs[4].setVisible(_col != 0); + inputs[5].setVisible(_col != 0); - inputs[| 3].name = _col == 1? "Color R range" : "Color H range"; - inputs[| 4].name = _col == 1? "Color G range" : "Color S range"; - inputs[| 5].name = _col == 1? "Color B range" : "Color V range"; + inputs[3].name = _col == 1? "Color R range" : "Color H range"; + inputs[4].name = _col == 1? "Color G range" : "Color S range"; + inputs[5].name = _col == 1? "Color B range" : "Color V range"; } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_noise_aniso/node_noise_aniso.gml b/scripts/node_noise_aniso/node_noise_aniso.gml index 14c279a44..cef7aee2a 100644 --- a/scripts/node_noise_aniso/node_noise_aniso.gml +++ b/scripts/node_noise_aniso/node_noise_aniso.gml @@ -1,34 +1,34 @@ function Node_Noise_Aniso(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Anisotropic Noise"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Float("X Amount", self, 2) + inputs[1] = nodeValue_Float("X Amount", self, 2) .setMappable(6); - inputs[| 2] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[2] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 3] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[3] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 4] = nodeValue_Rotation("Rotation", self, 0) + inputs[4] = nodeValue_Rotation("Rotation", self, 0) .setMappable(8); - inputs[| 5] = nodeValue_Float("Y Amount", self, 16) + inputs[5] = nodeValue_Float("Y Amount", self, 16) .setMappable(7); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 6] = nodeValueMap("X Amount map", self); + inputs[6] = nodeValueMap("X Amount map", self); - inputs[| 7] = nodeValueMap("Y Amount map", self); + inputs[7] = nodeValueMap("Y Amount map", self); - inputs[| 8] = nodeValueMap("Rotation map", self); + inputs[8] = nodeValueMap("Rotation map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 9] = nodeValue_Enum_Scroll("Render mode", self, 0, [ "Blend", "Waterfall" ] ) + inputs[9] = nodeValue_Enum_Scroll("Render mode", self, 0, [ "Blend", "Waterfall" ] ) input_display_list = [ ["Output", false], 0, @@ -36,21 +36,21 @@ function Node_Noise_Aniso(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou ["Render", false], 9, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } static step = function() { #region - inputs[| 1].mappableStep(); - inputs[| 4].mappableStep(); - inputs[| 5].mappableStep(); + inputs[1].mappableStep(); + inputs[4].mappableStep(); + inputs[5].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -63,9 +63,9 @@ function Node_Noise_Aniso(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou shader_set_f("position", _pos[0] / _dim[0], _pos[1] / _dim[1]); shader_set_f("seed", _data[2]); - shader_set_f_map("noiseX", _data[1], _data[6], inputs[| 1]); - shader_set_f_map("noiseY", _data[5], _data[7], inputs[| 5]); - shader_set_f_map("angle", _data[4], _data[8], inputs[| 4]); + shader_set_f_map("noiseX", _data[1], _data[6], inputs[1]); + shader_set_f_map("noiseY", _data[5], _data[7], inputs[5]); + shader_set_f_map("angle", _data[4], _data[8], inputs[4]); shader_set_i("mode", _data[9]); diff --git a/scripts/node_noise_bubble/node_noise_bubble.gml b/scripts/node_noise_bubble/node_noise_bubble.gml index ef1a4f45d..d5cfb49e3 100644 --- a/scripts/node_noise_bubble/node_noise_bubble.gml +++ b/scripts/node_noise_bubble/node_noise_bubble.gml @@ -2,28 +2,28 @@ function Node_Noise_Bubble(_x, _y, _group = noone) : Node_Shader_Generator(_x, _ name = "Bubble Noise"; shader = sh_noise_bubble; - inputs[| 1] = nodeValue_Float("Density", self, 0.5 ) + inputs[1] = nodeValue_Float("Density", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); addShaderProp(SHADER_UNIFORM.float, "density"); - inputs[| 2] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[2] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); addShaderProp(SHADER_UNIFORM.float, "seed"); - inputs[| 3] = nodeValue_Slider_Range("Scale", self, [ 0.5, 0.8 ] ); + inputs[3] = nodeValue_Slider_Range("Scale", self, [ 0.5, 0.8 ] ); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[| 4] = nodeValue_Float("Thickness", self, 0 ) + inputs[4] = nodeValue_Float("Thickness", self, 0 ) .setDisplay(VALUE_DISPLAY.slider); addShaderProp(SHADER_UNIFORM.float, "thickness"); - inputs[| 5] = nodeValue_Enum_Button("Mode", self, 0 , [ "Line", "Fill" ] ); + inputs[5] = nodeValue_Enum_Button("Mode", self, 0 , [ "Line", "Fill" ] ); addShaderProp(SHADER_UNIFORM.integer, "mode"); - inputs[| 6] = nodeValue_Slider_Range("Opacity", self, [ 0., 1. ] ); + inputs[6] = nodeValue_Slider_Range("Opacity", self, [ 0., 1. ] ); addShaderProp(SHADER_UNIFORM.float, "alpha"); - inputs[| 7] = nodeValue_Enum_Scroll("Blending", self, 0 , [ "Max", "Add" ] ); + inputs[7] = nodeValue_Enum_Scroll("Blending", self, 0 , [ "Max", "Add" ] ); addShaderProp(SHADER_UNIFORM.integer, "render"); input_display_list = [ 2, diff --git a/scripts/node_noise_cristal/node_noise_cristal.gml b/scripts/node_noise_cristal/node_noise_cristal.gml index 6530c4db0..28ab69a58 100644 --- a/scripts/node_noise_cristal/node_noise_cristal.gml +++ b/scripts/node_noise_cristal/node_noise_cristal.gml @@ -2,27 +2,27 @@ function Node_Noise_Cristal(_x, _y, _group = noone) : Node_Shader_Generator(_x, name = "Cristal Noise"; shader = sh_noise_cristal; - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ] ); + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ] ); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 1, 1 ] ); + inputs[2] = nodeValue_Vector("Scale", self, [ 1, 1 ] ); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[| 3] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); addShaderProp(SHADER_UNIFORM.float, "seed"); - inputs[| 4] = nodeValue_Int("Iteration", self, 15 ); + inputs[4] = nodeValue_Int("Iteration", self, 15 ); addShaderProp(SHADER_UNIFORM.integer, "iteration"); - inputs[| 5] = nodeValue_Color("Color", self, c_white ); + inputs[5] = nodeValue_Color("Color", self, c_white ); addShaderProp(SHADER_UNIFORM.color, "color"); - inputs[| 6] = nodeValue_Float("Gamma", self, 1 ) + inputs[6] = nodeValue_Float("Gamma", self, 1 ) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); addShaderProp(SHADER_UNIFORM.float, "gamma"); - inputs[| 7] = nodeValue_Rotation("Phase", self, 0); + inputs[7] = nodeValue_Rotation("Phase", self, 0); addShaderProp(SHADER_UNIFORM.float, "phase"); input_display_list = [ 3, diff --git a/scripts/node_noise_fbm/node_noise_fbm.gml b/scripts/node_noise_fbm/node_noise_fbm.gml index 126ea5e00..12ca08c09 100644 --- a/scripts/node_noise_fbm/node_noise_fbm.gml +++ b/scripts/node_noise_fbm/node_noise_fbm.gml @@ -1,24 +1,24 @@ function Node_Noise_FBM(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "FBM Noise"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[1] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 2] = nodeValue_Vector("Position", self, [ 0, 0 ]); + inputs[2] = nodeValue_Vector("Position", self, [ 0, 0 ]); - inputs[| 3] = nodeValue_Vector("Scale", self, [ 4, 4 ]); + inputs[3] = nodeValue_Vector("Scale", self, [ 4, 4 ]); - inputs[| 4] = nodeValue_Int("Iteration", self, 4); + inputs[4] = nodeValue_Int("Iteration", self, 4); - inputs[| 5] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); + inputs[5] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); - inputs[| 6] = nodeValue_Slider_Range("Color R range", self, [ 0, 1 ]); + inputs[6] = nodeValue_Slider_Range("Color R range", self, [ 0, 1 ]); - inputs[| 7] = nodeValue_Slider_Range("Color G range", self, [ 0, 1 ]); + inputs[7] = nodeValue_Slider_Range("Color G range", self, [ 0, 1 ]); - inputs[| 8] = nodeValue_Slider_Range("Color B range", self, [ 0, 1 ]); + inputs[8] = nodeValue_Slider_Range("Color B range", self, [ 0, 1 ]); input_display_list = [ ["Output", false], 0, @@ -26,20 +26,20 @@ function Node_Noise_FBM(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ["Color", false], 5, 6, 7, 8, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static step = function() { var _col = getInputData(5); - inputs[| 6].setVisible(_col != 0); - inputs[| 7].setVisible(_col != 0); - inputs[| 8].setVisible(_col != 0); + inputs[6].setVisible(_col != 0); + inputs[7].setVisible(_col != 0); + inputs[8].setVisible(_col != 0); - inputs[| 6].name = _col == 1? "Color R range" : "Color H range"; - inputs[| 7].name = _col == 1? "Color G range" : "Color S range"; - inputs[| 8].name = _col == 1? "Color B range" : "Color V range"; + inputs[6].name = _col == 1? "Color R range" : "Color H range"; + inputs[7].name = _col == 1? "Color G range" : "Color S range"; + inputs[8].name = _col == 1? "Color B range" : "Color V range"; } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_noise_hex/node_noise_hex.gml b/scripts/node_noise_hex/node_noise_hex.gml index 6044c9e2f..d1aab63d0 100644 --- a/scripts/node_noise_hex/node_noise_hex.gml +++ b/scripts/node_noise_hex/node_noise_hex.gml @@ -11,18 +11,18 @@ function Node_Noise_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) uniform_sam = shader_get_uniform(shader, "useSampler"); uniform_samTyp = shader_get_uniform(shader, "sampleMode"); - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[1] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 2] = nodeValue_Vector("Position", self, [ 0, 0] ); + inputs[2] = nodeValue_Vector("Position", self, [ 0, 0] ); - inputs[| 3] = nodeValue_Vector("Scale", self, [ 8, 8 ] ); + inputs[3] = nodeValue_Vector("Scale", self, [ 8, 8 ] ); - inputs[| 4] = nodeValue_Surface("Texture sample", self); + inputs[4] = nodeValue_Surface("Texture sample", self); - inputs[| 5] = nodeValue_Enum_Scroll("Oversample mode", self, 2, [ "Empty", "Clamp", "Repeat" ]); + inputs[5] = nodeValue_Enum_Scroll("Oversample mode", self, 2, [ "Empty", "Clamp", "Repeat" ]); input_display_list = [ ["Output", false], 0, @@ -30,14 +30,14 @@ function Node_Noise_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ["Texture", false], 4 ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); attribute_oversample(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } diff --git a/scripts/node_noise_simplex/node_noise_simplex.gml b/scripts/node_noise_simplex/node_noise_simplex.gml index d934433e4..6db446680 100644 --- a/scripts/node_noise_simplex/node_noise_simplex.gml +++ b/scripts/node_noise_simplex/node_noise_simplex.gml @@ -1,34 +1,34 @@ function Node_Noise_Simplex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Simplex Noise"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0, 0 ] ); + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0, 0 ] ); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 1, 1 ] ) + inputs[2] = nodeValue_Vector("Scale", self, [ 1, 1 ] ) .setMappable(8); - inputs[| 3] = nodeValue_Int("Iteration", self, 1 ) + inputs[3] = nodeValue_Int("Iteration", self, 1 ) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }) .setMappable(9); - inputs[| 4] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); + inputs[4] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); - inputs[| 5] = nodeValue_Slider_Range("Color R range", self, [ 0, 1 ]); + inputs[5] = nodeValue_Slider_Range("Color R range", self, [ 0, 1 ]); - inputs[| 6] = nodeValue_Slider_Range("Color G range", self, [ 0, 1 ]); + inputs[6] = nodeValue_Slider_Range("Color G range", self, [ 0, 1 ]); - inputs[| 7] = nodeValue_Slider_Range("Color B range", self, [ 0, 1 ]); + inputs[7] = nodeValue_Slider_Range("Color B range", self, [ 0, 1 ]); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 8] = nodeValueMap("Scale map", self); + inputs[8] = nodeValueMap("Scale map", self); - inputs[| 9] = nodeValueMap("Iteration map", self); + inputs[9] = nodeValueMap("Iteration map", self); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 10] = nodeValue_Rotation("Rotation", self, 0); + inputs[10] = nodeValue_Rotation("Rotation", self, 0); input_display_list = [ ["Output", false], 0, @@ -36,23 +36,23 @@ function Node_Noise_Simplex(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr ["Render", false], 4, 5, 6, 7, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static step = function() { #region var _col = getInputData(4); - inputs[| 5].setVisible(_col != 0); - inputs[| 6].setVisible(_col != 0); - inputs[| 7].setVisible(_col != 0); + inputs[5].setVisible(_col != 0); + inputs[6].setVisible(_col != 0); + inputs[7].setVisible(_col != 0); - inputs[| 5].name = _col == 1? "Color R range" : "Color H range"; - inputs[| 6].name = _col == 1? "Color G range" : "Color S range"; - inputs[| 7].name = _col == 1? "Color B range" : "Color V range"; + inputs[5].name = _col == 1? "Color R range" : "Color H range"; + inputs[6].name = _col == 1? "Color G range" : "Color S range"; + inputs[7].name = _col == 1? "Color B range" : "Color V range"; - inputs[| 2].mappableStep(); - inputs[| 3].mappableStep(); + inputs[2].mappableStep(); + inputs[3].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -71,8 +71,8 @@ function Node_Noise_Simplex(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr shader_set_f("dimension", _dim); shader_set_3("position", _pos); shader_set_f("rotation", degtorad(_ang)); - shader_set_f_map("scale", _data[2], _data[8], inputs[| 2]); - shader_set_f_map("iteration", _data[3], _data[9], inputs[| 3]); + shader_set_f_map("scale", _data[2], _data[8], inputs[2]); + shader_set_f_map("iteration", _data[3], _data[9], inputs[3]); shader_set_i("colored", _col); shader_set_2("colorRanR", _clr); @@ -87,7 +87,7 @@ function Node_Noise_Simplex(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } diff --git a/scripts/node_noise_strand/node_noise_strand.gml b/scripts/node_noise_strand/node_noise_strand.gml index e5436404c..1d1825fea 100644 --- a/scripts/node_noise_strand/node_noise_strand.gml +++ b/scripts/node_noise_strand/node_noise_strand.gml @@ -2,42 +2,42 @@ function Node_Noise_Strand(_x, _y, _group = noone) : Node_Shader_Generator(_x, _ name = "Strand Noise"; shader = sh_noise_strand; - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[| 2] = nodeValue_Float("Density", self, 0.5 ) + inputs[2] = nodeValue_Float("Density", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); addShaderProp(SHADER_UNIFORM.float, "density"); - inputs[| 3] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); addShaderProp(SHADER_UNIFORM.float, "seed"); - inputs[| 4] = nodeValue_Float("Slope", self, 0.5 ) + inputs[4] = nodeValue_Float("Slope", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); addShaderProp(SHADER_UNIFORM.float, "slope"); - inputs[| 5] = nodeValue_Slider_Range("Curve", self, [ 0, 0 ] , { range: [ 0, 4, 0.01 ] }); + inputs[5] = nodeValue_Slider_Range("Curve", self, [ 0, 0 ] , { range: [ 0, 4, 0.01 ] }); addShaderProp(SHADER_UNIFORM.float, "curve"); - inputs[| 6] = nodeValue_Float("Curve scale", self, 1 ); + inputs[6] = nodeValue_Float("Curve scale", self, 1 ); addShaderProp(SHADER_UNIFORM.float, "curveDetail"); - inputs[| 7] = nodeValue_Float("Thickness", self, 0 ) + inputs[7] = nodeValue_Float("Thickness", self, 0 ) .setDisplay(VALUE_DISPLAY.slider); addShaderProp(SHADER_UNIFORM.float, "thickness"); - inputs[| 8] = nodeValue_Float("Curve shift", self, 0 ); + inputs[8] = nodeValue_Float("Curve shift", self, 0 ); addShaderProp(SHADER_UNIFORM.float, "curveShift"); - inputs[| 9] = nodeValue_Enum_Button("Axis", self, 0 , [ "x", "y" ] ); + inputs[9] = nodeValue_Enum_Button("Axis", self, 0 , [ "x", "y" ] ); addShaderProp(SHADER_UNIFORM.integer, "axis"); - inputs[| 10] = nodeValue_Enum_Button("Mode", self, 0 , [ "Line", "Area" ] ); + inputs[10] = nodeValue_Enum_Button("Mode", self, 0 , [ "Line", "Area" ] ); addShaderProp(SHADER_UNIFORM.integer, "mode"); - inputs[| 11] = nodeValue_Slider_Range("Opacity", self, [ 0., 1. ] ); + inputs[11] = nodeValue_Slider_Range("Opacity", self, [ 0., 1. ] ); addShaderProp(SHADER_UNIFORM.float, "alpha"); input_display_list = [ 3, diff --git a/scripts/node_noise_tri/node_noise_tri.gml b/scripts/node_noise_tri/node_noise_tri.gml index 9c6849dd5..963a945ff 100644 --- a/scripts/node_noise_tri/node_noise_tri.gml +++ b/scripts/node_noise_tri/node_noise_tri.gml @@ -11,18 +11,18 @@ function Node_Noise_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) uniform_sam = shader_get_uniform(shader, "useSampler"); uniform_samTyp = shader_get_uniform(shader, "sampleMode"); - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[1] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 2] = nodeValue_Vector("Position", self, [ 0, 0] ); + inputs[2] = nodeValue_Vector("Position", self, [ 0, 0] ); - inputs[| 3] = nodeValue_Vector("Scale", self, [ 4, 4 ] ); + inputs[3] = nodeValue_Vector("Scale", self, [ 4, 4 ] ); - inputs[| 4] = nodeValue_Surface("Texture sample", self); + inputs[4] = nodeValue_Surface("Texture sample", self); - inputs[| 5] = nodeValue_Enum_Scroll("Oversample mode", self, 2, [ "Empty", "Clamp", "Repeat" ]); + inputs[5] = nodeValue_Enum_Scroll("Oversample mode", self, 2, [ "Empty", "Clamp", "Repeat" ]); input_display_list = [ ["Output", false], 0, @@ -30,14 +30,14 @@ function Node_Noise_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ["Texture", false], 4, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); attribute_oversample(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } diff --git a/scripts/node_normal/node_normal.gml b/scripts/node_normal/node_normal.gml index f8a701583..fab3be5e4 100644 --- a/scripts/node_normal/node_normal.gml +++ b/scripts/node_normal/node_normal.gml @@ -1,14 +1,14 @@ function Node_Normal(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Normal"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Height", self, 1); + inputs[1] = nodeValue_Float("Height", self, 1); - inputs[| 2] = nodeValue_Float("Smooth", self, 0, "Include diagonal pixel in normal calculation, which leads to smoother output.") + inputs[2] = nodeValue_Float("Smooth", self, 0, "Include diagonal pixel in normal calculation, which leads to smoother output.") .setDisplay(VALUE_DISPLAY.slider, { range : [ 0, 4, 0.1] }); - inputs[| 3] = nodeValue_Bool("Active", self, true); + inputs[3] = nodeValue_Bool("Active", self, true); active_index = 3; input_display_list = [ 3, @@ -16,7 +16,7 @@ function Node_Normal(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co ["Normal", false], 1, 2, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); diff --git a/scripts/node_normal_light/node_normal_light.gml b/scripts/node_normal_light/node_normal_light.gml index 3af43da17..2a254665a 100644 --- a/scripts/node_normal_light/node_normal_light.gml +++ b/scripts/node_normal_light/node_normal_light.gml @@ -1,36 +1,36 @@ function Node_Normal_Light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Normal Light"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Surface("Normal map", self); + inputs[1] = nodeValue_Surface("Normal map", self); - inputs[| 2] = nodeValue_Float("Normal intensity", self, 1); + inputs[2] = nodeValue_Float("Normal intensity", self, 1); - inputs[| 3] = nodeValue_Color("Ambient", self, c_black); + inputs[3] = nodeValue_Color("Ambient", self, c_black); - inputs[| 4] = nodeValue_Vector("Light position", self, [ 0, 0 ]) + inputs[4] = nodeValue_Vector("Light position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 5] = nodeValue_Float("Light range", self, 16); + inputs[5] = nodeValue_Float("Light range", self, 16); - inputs[| 6] = nodeValue_Float("Light intensity", self, 32); + inputs[6] = nodeValue_Float("Light intensity", self, 32); - inputs[| 7] = nodeValue_Color("Light color", self, c_white); + inputs[7] = nodeValue_Color("Light color", self, c_white); - inputs[| 8] = nodeValue_Enum_Button("Light type", self, 0, ["Point", "Sun"]); + inputs[8] = nodeValue_Enum_Button("Light type", self, 0, ["Point", "Sun"]); - inputs[| 9] = nodeValue_Bool("Active", self, true); + inputs[9] = nodeValue_Bool("Active", self, true); active_index = 9; - inputs[| 10] = nodeValue_Float("Light height", self, 1); + inputs[10] = nodeValue_Float("Light height", self, 1); input_display_list = [ 9, 0, ["Normal", false], 1, 2, ["Light", false], 3, 8, 4, 10, 5, 6, 7 ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); @@ -42,8 +42,8 @@ function Node_Normal_Light(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro var py = _y + pos[1] * _s; var _hov = false; - var hv = inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; - var hv = inputs[| 5].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[5].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } diff --git a/scripts/node_normalize/node_normalize.gml b/scripts/node_normalize/node_normalize.gml index b2a34a183..3e3d21a9e 100644 --- a/scripts/node_normalize/node_normalize.gml +++ b/scripts/node_normalize/node_normalize.gml @@ -1,13 +1,13 @@ function Node_Normalize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Normalize"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Enum_Button("Mode", self, 0, [ "BW", "RGB" ]); + inputs[1] = nodeValue_Enum_Button("Mode", self, 0, [ "BW", "RGB" ]); input_display_list = [ 0, 1 ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); diff --git a/scripts/node_number/node_number.gml b/scripts/node_number/node_number.gml index 624aaa2e6..d178ea0b9 100644 --- a/scripts/node_number/node_number.gml +++ b/scripts/node_number/node_number.gml @@ -4,7 +4,7 @@ function Node_Number(_x, _y, _group = noone) : Node(_x, _y, _group) constructor setDimension(96, 32 + 24 * 1); - wd_slider = slider(0, 1, 0.01, function(val) { inputs[| 0].setValue(val); } ); + wd_slider = slider(0, 1, 0.01, function(val) { inputs[0].setValue(val); } ); slider_value = -1; slider_surface = -1; @@ -19,26 +19,26 @@ function Node_Number(_x, _y, _group = noone) : Node(_x, _y, _group) constructor rotator_p = 0; rotator_m = 0; - inputs[| 0] = nodeValue_Float("Value", self, 0) + inputs[0] = nodeValue_Float("Value", self, 0) .setVisible(true, true); - inputs[| 1] = nodeValue_Bool("Integer", self, false); + inputs[1] = nodeValue_Bool("Integer", self, false); - inputs[| 2] = nodeValue_Enum_Scroll("Display", self, 0, { data: [ "Number", "Slider", "Rotator" ], update_hover: false }); + inputs[2] = nodeValue_Enum_Scroll("Display", self, 0, { data: [ "Number", "Slider", "Rotator" ], update_hover: false }); - inputs[| 3] = nodeValue_Range("Range", self, [ 0, 1 ]); + inputs[3] = nodeValue_Range("Range", self, [ 0, 1 ]); - inputs[| 4] = nodeValue_Float("Step", self, 0.01); + inputs[4] = nodeValue_Float("Step", self, 0.01); - inputs[| 5] = nodeValue_Bool("Clamp to range", self, true); + inputs[5] = nodeValue_Bool("Clamp to range", self, true); - outputs[| 0] = nodeValue_Output("Number", self, VALUE_TYPE.float, 0); + outputs[0] = nodeValue_Output("Number", self, VALUE_TYPE.float, 0); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var __ax = getInputData(0); if(is_array(__ax)) return; - inputs[| 0].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[0].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static step = function() { @@ -51,35 +51,35 @@ function Node_Number(_x, _y, _group = noone) : Node(_x, _y, _group) constructor switch(disp) { case 0 : min_h = 0; - inputs[| 3].setVisible(false); - inputs[| 4].setVisible(false); - inputs[| 5].setVisible(false); + inputs[3].setVisible(false); + inputs[4].setVisible(false); + inputs[5].setVisible(false); break; case 1 : - if(inputs[| 0].value_from == noone && !show_parameter) setDimension(160, 96, false); + if(inputs[0].value_from == noone && !show_parameter) setDimension(160, 96, false); min_h = con_h; - inputs[| 3].setVisible(true); - inputs[| 4].setVisible(true); - inputs[| 5].setVisible(true); + inputs[3].setVisible(true); + inputs[4].setVisible(true); + inputs[5].setVisible(true); break; case 2 : - if(inputs[| 0].value_from == noone && !show_parameter) setDimension(128, 128, false); + if(inputs[0].value_from == noone && !show_parameter) setDimension(128, 128, false); min_h = con_h; - inputs[| 3].setVisible(false); - inputs[| 4].setVisible(false); - inputs[| 5].setVisible(false); + inputs[3].setVisible(false); + inputs[4].setVisible(false); + inputs[5].setVisible(false); break; } if(_ch != con_h) will_setHeight = true; for( var i = 0; i < 1; i++ ) - inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); - outputs[| 0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); + inputs[i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); + outputs[0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); } static processNumber = function(_val, _int) { @@ -96,13 +96,13 @@ function Node_Number(_x, _y, _group = noone) : Node(_x, _y, _group) constructor static update = function() { var _dat = getInputData(0); - outputs[| 0].setValue(_dat); + outputs[0].setValue(_dat); var _int = getInputData(1); var _res = processNumber(_dat, _int); - outputs[| 0].setValue(_res); + outputs[0].setValue(_res); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { @@ -115,7 +115,7 @@ function Node_Number(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var cmp = getInputData(5); var _col = getColor(); - if(disp == 0 || inputs[| 0].value_from != noone || bbox.h < line_get_height(f_p2)) { + if(disp == 0 || inputs[0].value_from != noone || bbox.h < line_get_height(f_p2)) { draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); draw_text_bbox(bbox, string(val)); return; @@ -164,7 +164,7 @@ function Node_Number(_x, _y, _group = noone) : Node(_x, _y, _group) constructor _valL = value_snap(_valL, stp); if(cmp) _valL = clamp(_valL, _minn, _maxx); - if(inputs[| 0].setValue(_valL)) + if(inputs[0].setValue(_valL)) UNDO_HOLDING = true; if(mouse_release(mb_left)) { @@ -214,7 +214,7 @@ function Node_Number(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var dx = angle_difference(dir, rotator_p); rotator_p = dir; - if(inputs[| 0].setValue(val + dx)) + if(inputs[0].setValue(val + dx)) UNDO_HOLDING = true; if(mouse_release(mb_left)) { diff --git a/scripts/node_offset/node_offset.gml b/scripts/node_offset/node_offset.gml index 457a32c63..ff9cf2a84 100644 --- a/scripts/node_offset/node_offset.gml +++ b/scripts/node_offset/node_offset.gml @@ -1,15 +1,15 @@ function Node_Offset(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Offset"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("X Offset", self, 0.5) + inputs[1] = nodeValue_Float("X Offset", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 2] = nodeValue_Float("Y Offset", self, 0.5) + inputs[2] = nodeValue_Float("Y Offset", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Bool("Active", self, true); + inputs[3] = nodeValue_Bool("Active", self, true); active_index = 3; input_display_list = [ 3, @@ -17,7 +17,7 @@ function Node_Offset(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co ["Offset", false], 1, 2, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); diff --git a/scripts/node_onion_skin/node_onion_skin.gml b/scripts/node_onion_skin/node_onion_skin.gml index 27f414f4e..110b9a244 100644 --- a/scripts/node_onion_skin/node_onion_skin.gml +++ b/scripts/node_onion_skin/node_onion_skin.gml @@ -3,22 +3,22 @@ function Node_Onion_Skin(_x, _y, _group = noone) : Node(_x, _y, _group) construc use_cache = CACHE_USE.manual; clearCacheOnChange = false; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Slider_Range("Range", self, [-1, 1], { range: [ -16, 16, 0.1 ] }); + inputs[1] = nodeValue_Slider_Range("Range", self, [-1, 1], { range: [ -16, 16, 0.1 ] }); - inputs[| 2] = nodeValue_Float("Alpha", self, 0.5) + inputs[2] = nodeValue_Float("Alpha", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Color("Color pre", self, c_red) + inputs[3] = nodeValue_Color("Color pre", self, c_red) - inputs[| 4] = nodeValue_Color("Color post", self, c_blue) + inputs[4] = nodeValue_Color("Color post", self, c_blue) - inputs[| 5] = nodeValue_Int("Step", self, 1) + inputs[5] = nodeValue_Int("Step", self, 1) - inputs[| 6] = nodeValue_Bool("On top", self, true, "Render current frame on top of all frames.") + inputs[6] = nodeValue_Bool("On top", self, true, "Render current frame on top of all frames.") - outputs[| 0] = nodeValue_Output("Output", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Output", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Surface", false], 0, 1, 5, @@ -31,7 +31,7 @@ function Node_Onion_Skin(_x, _y, _group = noone) : Node(_x, _y, _group) construc static onInspector2Update = function() { clearCache(); } static update = function() { - if(!inputs[| 0].value_from) return; + if(!inputs[0].value_from) return; var _surf = getInputData(0); var _rang = getInputData(1); @@ -44,9 +44,9 @@ function Node_Onion_Skin(_x, _y, _group = noone) : Node(_x, _y, _group) construc var _top = getInputData(6); cacheCurrentFrame(_surf); - var _outSurf = outputs[| 0].getValue(); + var _outSurf = outputs[0].getValue(); _outSurf = surface_verify(_outSurf, surface_get_width_safe(_surf), surface_get_height_safe(_surf)); - outputs[| 0].setValue(_outSurf); + outputs[0].setValue(_outSurf); surface_set_target(_outSurf); DRAW_CLEAR diff --git a/scripts/node_outline/node_outline.gml b/scripts/node_outline/node_outline.gml index dadbd999e..185f5341c 100644 --- a/scripts/node_outline/node_outline.gml +++ b/scripts/node_outline/node_outline.gml @@ -12,56 +12,56 @@ function Node_Outline(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c triggerRender(); }); - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Int("Width", self, 0) + inputs[1] = nodeValue_Int("Width", self, 0) .setDisplay(VALUE_DISPLAY._default, { front_button : filter_button }) .setValidator(VV_min(0)) .setMappable(15); - inputs[| 2] = nodeValue_Color("Color", self, c_white); + inputs[2] = nodeValue_Color("Color", self, c_white); - inputs[| 3] = nodeValue_Bool("Blend", self, 0, "Blend outline color with the original color."); + inputs[3] = nodeValue_Bool("Blend", self, 0, "Blend outline color with the original color."); - inputs[| 4] = nodeValue_Float("Blend alpha", self, 1) + inputs[4] = nodeValue_Float("Blend alpha", self, 1) .setDisplay(VALUE_DISPLAY.slider) .setMappable(16); - inputs[| 5] = nodeValue_Enum_Button("Position", self, 1, ["Inside", "Outside"]); + inputs[5] = nodeValue_Enum_Button("Position", self, 1, ["Inside", "Outside"]); - inputs[| 6] = nodeValue_Bool("Anti aliasing", self, 0); + inputs[6] = nodeValue_Bool("Anti aliasing", self, 0); - inputs[| 7] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + inputs[7] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 8] = nodeValue_Int("Start", self, 0, "Shift outline inside, outside the shape.") + inputs[8] = nodeValue_Int("Start", self, 0, "Shift outline inside, outside the shape.") .setMappable(17); - inputs[| 9] = nodeValue_Surface("Mask", self); + inputs[9] = nodeValue_Surface("Mask", self); - inputs[| 10] = nodeValue_Float("Mix", self, 1) + inputs[10] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 11] = nodeValue_Bool("Active", self, true); + inputs[11] = nodeValue_Bool("Active", self, true); active_index = 11; - inputs[| 12] = nodeValue_Bool("Crop border", self, false); + inputs[12] = nodeValue_Bool("Crop border", self, false); __init_mask_modifier(9); // inputs 13, 14 ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 15] = nodeValueMap("Width map", self); + inputs[15] = nodeValueMap("Width map", self); - inputs[| 16] = nodeValueMap("Blend alpha map", self); + inputs[16] = nodeValueMap("Blend alpha map", self); - inputs[| 17] = nodeValueMap("Start map", self); + inputs[17] = nodeValueMap("Start map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Outline", self, VALUE_TYPE.surface, noone); + outputs[1] = nodeValue_Output("Outline", self, VALUE_TYPE.surface, noone); input_display_list = [ 11, ["Surfaces", true], 0, 9, 10, 13, 14, @@ -77,13 +77,13 @@ function Node_Outline(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c var _wid = getInputData(1); var _side = getInputData(5); - inputs[| 12].setVisible(_side == 0); + inputs[12].setVisible(_side == 0); __step_mask_modifier(); - inputs[| 1].mappableStep(); - inputs[| 4].mappableStep(); - inputs[| 8].mappableStep(); + inputs[1].mappableStep(); + inputs[4].mappableStep(); + inputs[8].mappableStep(); filter_button.index = attributes.filter; } #endregion @@ -101,8 +101,8 @@ function Node_Outline(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c surface_set_shader(_outSurf, sh_outline); shader_set_f("dimension", ww, hh); - shader_set_f_map("borderSize", _data[1], _data[15], inputs[| 1]); - shader_set_f_map("borderStart", _data[8], _data[17], inputs[| 8]); + shader_set_f_map("borderSize", _data[1], _data[15], inputs[1]); + shader_set_f_map("borderStart", _data[8], _data[17], inputs[8]); shader_set_color("borderColor", cl); shader_set_i("side", side); @@ -110,7 +110,7 @@ function Node_Outline(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c shader_set_i("is_aa", aa); shader_set_i("outline_only", _output_index); shader_set_i("is_blend", blend); - shader_set_f_map("blend_alpha", _data[4], _data[16], inputs[| 4]); + shader_set_f_map("blend_alpha", _data[4], _data[16], inputs[4]); shader_set_i("sampleMode", sam); shader_set_i("crop_border", _crop); shader_set_i("filter", attributes.filter); diff --git a/scripts/node_override_channel/node_override_channel.gml b/scripts/node_override_channel/node_override_channel.gml index 56056caea..362c571c2 100644 --- a/scripts/node_override_channel/node_override_channel.gml +++ b/scripts/node_override_channel/node_override_channel.gml @@ -1,16 +1,16 @@ function Node_Override_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Override Channel"; - inputs[| 0] = nodeValue_Surface("Surface", self); + inputs[0] = nodeValue_Surface("Surface", self); - inputs[| 1] = nodeValue_Surface("Red", self); - inputs[| 2] = nodeValue_Surface("Green", self); - inputs[| 3] = nodeValue_Surface("Blue", self); - inputs[| 4] = nodeValue_Surface("Alpha", self); + inputs[1] = nodeValue_Surface("Red", self); + inputs[2] = nodeValue_Surface("Green", self); + inputs[3] = nodeValue_Surface("Blue", self); + inputs[4] = nodeValue_Surface("Alpha", self); - inputs[| 5] = nodeValue_Enum_Scroll("Sampling type", self, 0, ["Brightness", "Channel value"]); + inputs[5] = nodeValue_Enum_Scroll("Sampling type", self, 0, ["Brightness", "Channel value"]); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 0, ["Sampling", false], 5, diff --git a/scripts/node_pack_sprites/node_pack_sprites.gml b/scripts/node_pack_sprites/node_pack_sprites.gml index 08d46cbb6..a7003bd22 100644 --- a/scripts/node_pack_sprites/node_pack_sprites.gml +++ b/scripts/node_pack_sprites/node_pack_sprites.gml @@ -1,24 +1,24 @@ function Node_Pack_Sprites(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Pack Sprites"; - inputs[| 0] = nodeValue_Surface("Sprites", self); + inputs[0] = nodeValue_Surface("Sprites", self); - inputs[| 1] = nodeValue_Enum_Scroll("Algorithm", self, 0, { data: [ "Skyline", "Shelf", "Top left", "Best fit" ], update_hover: false }); + inputs[1] = nodeValue_Enum_Scroll("Algorithm", self, 0, { data: [ "Skyline", "Shelf", "Top left", "Best fit" ], update_hover: false }); - inputs[| 2] = nodeValue_Int("Max width", self, 128); + inputs[2] = nodeValue_Int("Max width", self, 128); - inputs[| 3] = nodeValue_Int("Max height", self, 128); + inputs[3] = nodeValue_Int("Max height", self, 128); - inputs[| 4] = nodeValue_Int("Spacing", self, 0); + inputs[4] = nodeValue_Int("Spacing", self, 0); - outputs[| 0] = nodeValue_Output("Packed image", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Packed image", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Atlas data", self, VALUE_TYPE.surface, []); + outputs[1] = nodeValue_Output("Atlas data", self, VALUE_TYPE.surface, []); input_display_list = [ 0, 4, 1, 2, 3 ]; static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var rect = outputs[| 1].getValue(); + var rect = outputs[1].getValue(); var spac = getInputData(4); draw_set_color(COLORS._main_accent); @@ -46,8 +46,8 @@ function Node_Pack_Sprites(_x, _y, _group = noone) : Node(_x, _y, _group) constr static step = function() { #region var algo = getInputData(1); - inputs[| 2].setVisible(algo == 1 || algo == 0); - inputs[| 3].setVisible(algo == 2 || algo == 0); + inputs[2].setVisible(algo == 1 || algo == 0); + inputs[3].setVisible(algo == 2 || algo == 0); } #endregion static update = function() { #region @@ -105,9 +105,9 @@ function Node_Pack_Sprites(_x, _y, _group = noone) : Node(_x, _y, _group) constr logNode(_txt); noti_warning(_txt); } - var _surf = outputs[| 0].getValue(); + var _surf = outputs[0].getValue(); _surf = surface_verify(_surf, area.w, area.h, surface_get_format(_inpt[0])); - outputs[| 0].setValue(_surf); + outputs[0].setValue(_surf); surface_set_target(_surf); DRAW_CLEAR @@ -123,6 +123,6 @@ function Node_Pack_Sprites(_x, _y, _group = noone) : Node(_x, _y, _group) constr BLEND_NORMAL surface_reset_target(); - outputs[| 1].setValue(atlas); + outputs[1].setValue(atlas); } #endregion } \ No newline at end of file diff --git a/scripts/node_padding/node_padding.gml b/scripts/node_padding/node_padding.gml index ee4e9d930..e2b23ed47 100644 --- a/scripts/node_padding/node_padding.gml +++ b/scripts/node_padding/node_padding.gml @@ -2,27 +2,27 @@ function Node_Padding(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c name = "Padding"; dimension_index = -1; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Padding("Padding", self, [0, 0, 0, 0]) + inputs[1] = nodeValue_Padding("Padding", self, [0, 0, 0, 0]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 2] = nodeValue_Enum_Scroll("Fill method", self, 0, [ "Empty", "Solid" ]); + inputs[2] = nodeValue_Enum_Scroll("Fill method", self, 0, [ "Empty", "Solid" ]); - inputs[| 3] = nodeValue_Color("Fill color", self, c_black); + inputs[3] = nodeValue_Color("Fill color", self, c_black); - inputs[| 4] = nodeValue_Bool("Active", self, true); + inputs[4] = nodeValue_Bool("Active", self, true); active_index = 4; - inputs[| 5] = nodeValue_Enum_Button("Pad mode", self, 0, [ "Pad out", "Pad to size" ]); + inputs[5] = nodeValue_Enum_Button("Pad mode", self, 0, [ "Pad out", "Pad to size" ]); - inputs[| 6] = nodeValue_Vector("Target dimension", self, DEF_SURF) + inputs[6] = nodeValue_Vector("Target dimension", self, DEF_SURF) - inputs[| 7] = nodeValue_Enum_Button("Horizontal alignment", self, 0 , [ THEME.inspector_surface_halign, THEME.inspector_surface_halign, THEME.inspector_surface_halign]); + inputs[7] = nodeValue_Enum_Button("Horizontal alignment", self, 0 , [ THEME.inspector_surface_halign, THEME.inspector_surface_halign, THEME.inspector_surface_halign]); - inputs[| 8] = nodeValue_Enum_Button("Vertical alignment", self, 0 , [ THEME.inspector_surface_valign, THEME.inspector_surface_valign, THEME.inspector_surface_valign ]); + inputs[8] = nodeValue_Enum_Button("Vertical alignment", self, 0 , [ THEME.inspector_surface_valign, THEME.inspector_surface_valign, THEME.inspector_surface_valign ]); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 4, ["Surfaces", true], 0, @@ -35,11 +35,11 @@ function Node_Padding(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c static step = function() { var mode = getInputData(5); - inputs[| 1].setVisible(mode == 0); + inputs[1].setVisible(mode == 0); - inputs[| 6].setVisible(mode == 1); - inputs[| 7].setVisible(mode == 1); - inputs[| 8].setVisible(mode == 1); + inputs[6].setVisible(mode == 1); + inputs[7].setVisible(mode == 1); + inputs[8].setVisible(mode == 1); } static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -55,7 +55,7 @@ function Node_Padding(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c var fillClr = _data[3]; var cDep = attrDepth(); - inputs[| 3].setVisible(fill); + inputs[3].setVisible(fill); var ww = surface_get_width_safe(_data[0]); var hh = surface_get_height_safe(_data[0]); diff --git a/scripts/node_palette/node_palette.gml b/scripts/node_palette/node_palette.gml index 933c5c86f..5373cf351 100644 --- a/scripts/node_palette/node_palette.gml +++ b/scripts/node_palette/node_palette.gml @@ -2,11 +2,11 @@ function Node_Palette(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c name = "Palette"; setDimension(96); - inputs[| 0] = nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE)); + inputs[0] = nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE)); - inputs[| 1] = nodeValue_Slider_Range("Trim range", self, [ 0, 1 ]); + inputs[1] = nodeValue_Slider_Range("Trim range", self, [ 0, 1 ]); - outputs[| 0] = nodeValue_Output("Palette", self, VALUE_TYPE.color, []) + outputs[0] = nodeValue_Output("Palette", self, VALUE_TYPE.color, []) .setDisplay(VALUE_DISPLAY.palette); input_display_list = [0, @@ -31,7 +31,7 @@ function Node_Palette(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c var bbox = drawGetBbox(xx, yy, _s); if(bbox.h < 1) return; - var pal = outputs[| 0].getValue(); + var pal = outputs[0].getValue(); if(array_empty(pal)) return; if(!is_array(pal[0])) pal = [ pal ]; diff --git a/scripts/node_palette_extract/node_palette_extract.gml b/scripts/node_palette_extract/node_palette_extract.gml index abe24271b..0ca8a27ea 100644 --- a/scripts/node_palette_extract/node_palette_extract.gml +++ b/scripts/node_palette_extract/node_palette_extract.gml @@ -2,22 +2,22 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _ name = "Palette Extract"; setDimension(96, 48);; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Int("Max colors", self, 5, "Amount of color in a palette.") + inputs[1] = nodeValue_Int("Max colors", self, 5, "Amount of color in a palette.") .rejectArray(); - inputs[| 2] = nodeValue_Int("Seed", self, seed_random(6), "Random seed to be used to initialize K-mean algorithm.") - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }) + inputs[2] = nodeValue_Int("Seed", self, seed_random(6), "Random seed to be used to initialize K-mean algorithm.") + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }) .rejectArray(); - inputs[| 3] = nodeValue_Enum_Scroll("Algorithm", self, 0, { data: [ "K-mean", "Frequency", "All colors" ], update_hover: false }) + inputs[3] = nodeValue_Enum_Scroll("Algorithm", self, 0, { data: [ "K-mean", "Frequency", "All colors" ], update_hover: false }) .rejectArray(); - inputs[| 4] = nodeValue_Enum_Scroll("Color Space", self, 1, { data: [ "RGB", "HSV" ], update_hover: false }) + inputs[4] = nodeValue_Enum_Scroll("Color Space", self, 1, { data: [ "RGB", "HSV" ], update_hover: false }) .rejectArray(); - outputs[| 0] = nodeValue_Output("Palette", self, VALUE_TYPE.color, [ ]) + outputs[0] = nodeValue_Output("Palette", self, VALUE_TYPE.color, [ ]) .setDisplay(VALUE_DISPLAY.palette); static getPreviewValues = function() { return getInputData(0); } @@ -277,9 +277,9 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _ static step = function() { #region var _algo = getInputData(3); - inputs[| 1].setVisible(_algo != 2); - inputs[| 2].setVisible(_algo == 0); - inputs[| 4].setVisible(_algo == 0); + inputs[1].setVisible(_algo != 2); + inputs[2].setVisible(_algo == 0); + inputs[4].setVisible(_algo == 0); } #endregion static extractPalette = function(_surf, _algo, _size, _seed) { #region @@ -307,7 +307,7 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _ var bbox = drawGetBbox(xx, yy, _s); if(bbox.h < 1) return; - var pal = outputs[| 0].getValue(); + var pal = outputs[0].getValue(); if(array_empty(pal)) return; if(!is_array(pal[0])) pal = [ pal ]; diff --git a/scripts/node_palette_replace/node_palette_replace.gml b/scripts/node_palette_replace/node_palette_replace.gml index c97028e53..33c0bf654 100644 --- a/scripts/node_palette_replace/node_palette_replace.gml +++ b/scripts/node_palette_replace/node_palette_replace.gml @@ -2,21 +2,21 @@ function Node_Palette_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _ name = "Palette Replace"; setDimension(96); - inputs[| 0] = nodeValue_Palette("Palette in", self, array_clone(DEF_PALETTE)) + inputs[0] = nodeValue_Palette("Palette in", self, array_clone(DEF_PALETTE)) .setVisible(true, true); - inputs[| 1] = nodeValue_Palette("Palette from", self, array_clone(DEF_PALETTE)); + inputs[1] = nodeValue_Palette("Palette from", self, array_clone(DEF_PALETTE)); - inputs[| 2] = nodeValue_Palette("Palette to", self, array_clone(DEF_PALETTE)); + inputs[2] = nodeValue_Palette("Palette to", self, array_clone(DEF_PALETTE)); - inputs[| 3] = nodeValue_Float("Threshold", self, 0.1) + inputs[3] = nodeValue_Float("Threshold", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); input_display_list = [ 0, ["Palette", false], 1, 2, 3, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.color, [ ] ) + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.color, [ ] ) .setDisplay(VALUE_DISPLAY.palette); static processData = function(_outSurf, _data, _output_index, _array_index) { #region @@ -51,7 +51,7 @@ function Node_Palette_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _ var bbox = drawGetBbox(xx, yy, _s); if(bbox.h < 1) return; - var pal = outputs[| 0].getValue(); + var pal = outputs[0].getValue(); if(array_empty(pal)) return; if(!is_array(pal[0])) pal = [ pal ]; diff --git a/scripts/node_palette_shift/node_palette_shift.gml b/scripts/node_palette_shift/node_palette_shift.gml index 2b57c6a35..1fa06263d 100644 --- a/scripts/node_palette_shift/node_palette_shift.gml +++ b/scripts/node_palette_shift/node_palette_shift.gml @@ -1,22 +1,22 @@ function Node_Palette_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Palette Shift"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE)); + inputs[1] = nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE)); - inputs[| 2] = nodeValue_Int("Shift", self, 0) + inputs[2] = nodeValue_Int("Shift", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.1] }); - inputs[| 3] = nodeValue_Surface("Mask", self); + inputs[3] = nodeValue_Surface("Mask", self); - inputs[| 4] = nodeValue_Float("Mix", self, 1) + inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Bool("Active", self, true); + inputs[5] = nodeValue_Bool("Active", self, true); active_index = 5; - inputs[| 6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(3); // inputs 7, 8 @@ -25,7 +25,7 @@ function Node_Palette_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr ["Palette", false], 1, 2 ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); @@ -41,8 +41,8 @@ function Node_Palette_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr for(var i = 0; i < array_length(_pal); i++) array_append(_colors, colToVec4(_pal[i])); - inputs[| 2].editWidget.slide_range[0] = -array_length(_pal); - inputs[| 2].editWidget.slide_range[1] = array_length(_pal); + inputs[2].editWidget.slide_range[0] = -array_length(_pal); + inputs[2].editWidget.slide_range[1] = array_length(_pal); surface_set_shader(_outSurf, sh_palette_shift); shader_set_f("palette", _colors); diff --git a/scripts/node_palette_sort/node_palette_sort.gml b/scripts/node_palette_sort/node_palette_sort.gml index d1759c822..7f868ce4c 100644 --- a/scripts/node_palette_sort/node_palette_sort.gml +++ b/scripts/node_palette_sort/node_palette_sort.gml @@ -2,21 +2,21 @@ function Node_Palette_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro name = "Sort Palette"; setDimension(96); - inputs[| 0] = nodeValue_Palette("Palette in", self, array_clone(DEF_PALETTE)) + inputs[0] = nodeValue_Palette("Palette in", self, array_clone(DEF_PALETTE)) .setVisible(true, true); - inputs[| 1] = nodeValue_Enum_Button("Order", self, 0, [ "Brightness", -1, "Hue (HSV)", "Saturation (SHV)", "Value (VHS)", -1, "Red (RGB)", "Green (GBR)", "Blue (BRG)", -1, "Custom" ]) + inputs[1] = nodeValue_Enum_Button("Order", self, 0, [ "Brightness", -1, "Hue (HSV)", "Saturation (SHV)", "Value (VHS)", -1, "Red (RGB)", "Green (GBR)", "Blue (BRG)", -1, "Custom" ]) .rejectArray(); - inputs[| 2] = nodeValue_Bool("Reverse", self, false); + inputs[2] = nodeValue_Bool("Reverse", self, false); - inputs[| 3] = nodeValue_Text("Sort Order", self, "RGB", @"Compose sorting algorithm using string. + inputs[3] = nodeValue_Text("Sort Order", self, "RGB", @"Compose sorting algorithm using string. - RGB: Red/Green/Blur channel - HSV: Hue/Saturation/Value - L: Brightness - Use small letter for ascending, capital letter for descending order."); - outputs[| 0] = nodeValue_Output("Sorted palette", self, VALUE_TYPE.color, []) + outputs[0] = nodeValue_Output("Sorted palette", self, VALUE_TYPE.color, []) .setDisplay(VALUE_DISPLAY.palette); input_display_list = [ @@ -26,7 +26,7 @@ function Node_Palette_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro static step = function() { #region var _typ = getInputData(1); - inputs[| 3].setVisible(_typ == 10); + inputs[3].setVisible(_typ == 10); } #endregion sort_string = ""; @@ -89,7 +89,7 @@ function Node_Palette_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro var bbox = drawGetBbox(xx, yy, _s); if(bbox.h < 1) return; - var pal = outputs[| 0].getValue(); + var pal = outputs[0].getValue(); if(array_empty(pal)) return; if(!is_array(pal[0])) pal = [ pal ]; diff --git a/scripts/node_particle/node_particle.gml b/scripts/node_particle/node_particle.gml index 46d24009d..b30b055a4 100644 --- a/scripts/node_particle/node_particle.gml +++ b/scripts/node_particle/node_particle.gml @@ -4,25 +4,25 @@ function Node_Particle(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y, _ onSurfaceSize = function() { return getInputData(input_len, DEF_SURF); }; - inputs[| 3] = nodeValue_Area("Spawn area", self, DEF_AREA_REF, { onSurfaceSize } ) + inputs[3] = nodeValue_Area("Spawn area", self, DEF_AREA_REF, { onSurfaceSize } ) .rejectArray() .setUnitRef(onSurfaceSize, VALUE_UNIT.reference); - inputs[| input_len + 0] = nodeValue_Vector("Output dimension", self, DEF_SURF); + inputs[input_len + 0] = nodeValue_Vector("Output dimension", self, DEF_SURF); - inputs[| input_len + 1] = nodeValue_Bool("Round position", self, true, "Round position to the closest integer value to avoid jittering."); + inputs[input_len + 1] = nodeValue_Bool("Round position", self, true, "Round position to the closest integer value to avoid jittering."); - inputs[| input_len + 2] = nodeValue_Enum_Scroll("Blend mode", self, 0 , [ "Normal", "Alpha", "Additive" ]); + inputs[input_len + 2] = nodeValue_Enum_Scroll("Blend mode", self, 0 , [ "Normal", "Alpha", "Additive" ]); - inputs[| input_len + 3] = nodeValue_Surface("Background", self); + inputs[input_len + 3] = nodeValue_Surface("Background", self); - inputs[| input_len + 4] = nodeValue_Enum_Button("Render Type", self, PARTICLE_RENDER_TYPE.surface , [ "Surface", "Line" ]); + inputs[input_len + 4] = nodeValue_Enum_Button("Render Type", self, PARTICLE_RENDER_TYPE.surface , [ "Surface", "Line" ]); - inputs[| input_len + 5] = nodeValue_Int("Line life", self, 4 ); + inputs[input_len + 5] = nodeValue_Int("Line life", self, 4 ); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - for(var i = input_len, n = ds_list_size(inputs); i < n; i++) inputs[| i].rejectArray(); + for(var i = input_len, n = array_length(inputs); i < n; i++) inputs[i].rejectArray(); attribute_surface_depth(); attribute_interpolation(); @@ -43,10 +43,10 @@ function Node_Particle(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y, _ static onValueUpdate = function(index = 0) { if(index == input_len + 0) { var _dim = getInputData(input_len + 0); - var _outSurf = outputs[| 0].getValue(); + var _outSurf = outputs[0].getValue(); _outSurf = surface_verify(_outSurf, array_safe_get_fast(_dim, 0, 1), array_safe_get_fast(_dim, 1, 1), attrDepth()); - outputs[| 0].setValue(_outSurf); + outputs[0].setValue(_outSurf); } if(PROJECT.animator.is_playing) @@ -71,7 +71,7 @@ function Node_Particle(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y, _ var _dim = getInputData(input_len + 0); var _typ = getInputData(input_len + 4); - inputs[| input_len + 5].setVisible(_typ == PARTICLE_RENDER_TYPE.line); + inputs[input_len + 5].setVisible(_typ == PARTICLE_RENDER_TYPE.line); if(curr_dimension[0] != _dim[0] || curr_dimension[1] != _dim[1]) { clearCache(); @@ -86,14 +86,14 @@ function Node_Particle(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y, _ var _dim = getInputData(input_len + 0); var _bg = getInputData(input_len + 3); - var _outSurf = outputs[| 0].getValue(); + var _outSurf = outputs[0].getValue(); if(is_surface(_bg)) _dim = surface_get_dimension(_bg) _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); render_amount = 0; - outputs[| 0].setValue(_outSurf); + outputs[0].setValue(_outSurf); if(IS_FIRST_FRAME) { reset(); @@ -104,15 +104,15 @@ function Node_Particle(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y, _ } function render(_time = CURRENT_FRAME) { - var _dim = inputs[| input_len + 0].getValue(_time); - var _exact = inputs[| input_len + 1].getValue(_time); - var _blend = inputs[| input_len + 2].getValue(_time); - var _bg = inputs[| input_len + 3].getValue(_time); + var _dim = inputs[input_len + 0].getValue(_time); + var _exact = inputs[input_len + 1].getValue(_time); + var _blend = inputs[input_len + 2].getValue(_time); + var _bg = inputs[input_len + 3].getValue(_time); - var _type = inputs[| input_len + 4].getValue(_time); - var _llife = inputs[| input_len + 5].getValue(_time); + var _type = inputs[input_len + 4].getValue(_time); + var _llife = inputs[input_len + 5].getValue(_time); - var _outSurf = outputs[| 0].getValue(); + var _outSurf = outputs[0].getValue(); if(is_surface(_bg)) _dim = surface_get_dimension(_bg) diff --git a/scripts/node_path/node_path.gml b/scripts/node_path/node_path.gml index 5781aeafc..0298ee310 100644 --- a/scripts/node_path/node_path.gml +++ b/scripts/node_path/node_path.gml @@ -15,24 +15,24 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { setDimension(96, 48); - inputs[| 0] = nodeValue_Float("Path progress", self, 0, "Sample position from path.") + inputs[0] = nodeValue_Float("Path progress", self, 0, "Sample position from path.") .setDisplay(VALUE_DISPLAY.slider); - inputs[| 1] = nodeValue_Bool("Loop", self, false) + inputs[1] = nodeValue_Bool("Loop", self, false) .rejectArray(); - inputs[| 2] = nodeValue_Enum_Scroll("Progress mode", self, 0, ["Entire line", "Segment"]) + inputs[2] = nodeValue_Enum_Scroll("Progress mode", self, 0, ["Entire line", "Segment"]) .rejectArray(); - inputs[| 3] = nodeValue_Bool("Round anchor", self, false) + inputs[3] = nodeValue_Bool("Round anchor", self, false) .rejectArray(); - outputs[| 0] = nodeValue_Output("Position out", self, VALUE_TYPE.float, [ 0, 0 ]) + outputs[0] = nodeValue_Output("Position out", self, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - outputs[| 1] = nodeValue_Output("Path data", self, VALUE_TYPE.pathnode, self); + outputs[1] = nodeValue_Output("Path data", self, VALUE_TYPE.pathnode, self); - outputs[| 2] = nodeValue_Output("Anchors", self, VALUE_TYPE.float, []) + outputs[2] = nodeValue_Output("Anchors", self, VALUE_TYPE.float, []) .setVisible(false) .setArrayDepth(1); @@ -96,32 +96,32 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { input_display_list = array_clone(input_display_list_raw); - for( var i = input_fix_len, n = ds_list_size(inputs); i < n; i++ ) { + for( var i = input_fix_len, n = array_length(inputs); i < n; i++ ) { array_push(input_display_list, i); - inputs[| i].name = $"Anchor {i - input_fix_len}"; + inputs[i].name = $"Anchor {i - input_fix_len}"; } } #endregion static createNewInput = function(_x = 0, _y = 0, _dxx = 0, _dxy = 0, _dyx = 0, _dyy = 0, rec = true) { #region - var index = ds_list_size(inputs); + var index = array_length(inputs); - inputs[| index] = nodeValue_Path_Anchor("Anchor", self, [ _x, _y, _dxx, _dxy, _dyx, _dyy, false ]); + inputs[index] = nodeValue_Path_Anchor("Anchor", self, [ _x, _y, _dxx, _dxy, _dyx, _dyy, false ]); if(rec) { - recordAction(ACTION_TYPE.list_insert, inputs, [ inputs[| index], index, $"add path anchor point {index}" ]); + recordAction(ACTION_TYPE.list_insert, inputs, [ inputs[index], index, $"add path anchor point {index}" ]); resetDisplayList(); } - return inputs[| index]; + return inputs[index]; } #endregion static onValueUpdate = function(index = 0) { #region if(index == 2) { var type = getInputData(2); if(type == 0) - inputs[| 0].setDisplay(VALUE_DISPLAY.slider); + inputs[0].setDisplay(VALUE_DISPLAY.slider); else if(type == 1) - inputs[| 0].setDisplay(VALUE_DISPLAY._default); + inputs[0].setDisplay(VALUE_DISPLAY._default); } } #endregion @@ -130,10 +130,10 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { } #endregion static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var ansize = ds_list_size(inputs) - input_fix_len; + var ansize = array_length(inputs) - input_fix_len; var edited = false; - var pos = outputs[| 0].getValue(); + var pos = outputs[0].getValue(); draw_set_color(COLORS._main_accent); draw_circle(_x + pos[0] * _s, _y + pos[1] * _s, 4, false); @@ -160,12 +160,12 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var dx = mx - transform_mx; var dy = my - transform_my; - for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) { + for( var i = input_fix_len; i < array_length(inputs); i++ ) { var p = array_clone(getInputData(i)); p[0] += dx / _s; p[1] += dy / _s; - if(inputs[| i].setValue(p)) + if(inputs[i].setValue(p)) edited = true; } @@ -256,7 +256,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var _tr_rx = _transform_maxx - _transform_minx; var _tr_ry = _transform_maxy - _transform_miny; - for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) { + for( var i = input_fix_len; i < array_length(inputs); i++ ) { var p = array_clone(getInputData(i)); var _p2 = p[_ANCHOR.x] + p[_ANCHOR.c1x]; @@ -277,7 +277,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { p[_ANCHOR.c2x] = _p4 - p[_ANCHOR.x]; p[_ANCHOR.c2y] = _p5 - p[_ANCHOR.y]; - if(inputs[| i].setValue(p)) + if(inputs[i].setValue(p)) edited = true; } #endregion @@ -296,7 +296,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var dy = value_snap(drag_point_sy + (_my - drag_point_my) / _s, _sny); if(drag_type < 2) { #region move points - var inp = inputs[| input_fix_len + drag_point]; + var inp = inputs[input_fix_len + drag_point]; var anc = array_clone(inp.getValue()); if(drag_type != 0 && key_mod_press(SHIFT)) @@ -380,7 +380,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var points = []; var thres = tool_pathDrawer.attribute.thres; var replace = tool_pathDrawer.attribute.create; - var asize = ds_list_size(inputs) - input_fix_len; + var asize = array_length(inputs) - input_fix_len; for( var i = 0; i < amo; i++ ) { var pT = drag_points[i]; @@ -438,15 +438,15 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { } anc = [ _p[_ANCHOR.x], _p[_ANCHOR.y], dxx, dxy, dyx, dyy ]; - if(input_fix_len + i >= ds_list_size(inputs)) + if(input_fix_len + i >= array_length(inputs)) createNewInput(_p[_ANCHOR.x], _p[_ANCHOR.y], dxx, dxy, dyx, dyy); else - inputs[| input_fix_len + i].setValue(anc); + inputs[input_fix_len + i].setValue(anc); } if(!replace) { for(; i < asize; i++ ) - inputs[| input_fix_len + i].setValue(anc); + inputs[input_fix_len + i].setValue(anc); } } #endregion @@ -484,7 +484,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { a[3][_ANCHOR.y] = maxy; for( var i = 0; i < 4; i++ ) { - if(inputs[| input_fix_len + i].setValue(a[i])) + if(inputs[input_fix_len + i].setValue(a[i])) edited = true; } #endregion @@ -538,7 +538,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { a[3][_ANCHOR.c2y] = -(maxy - miny) * 0.27614; for( var i = 0; i < 4; i++ ) { - if(inputs[| input_fix_len + i].setValue(a[i])) + if(inputs[input_fix_len + i].setValue(a[i])) edited = true; } #endregion @@ -619,7 +619,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { draw_sprite_colored(THEME.anchor_selector, 0, xx, yy); draw_set_text(f_p1, fa_left, fa_bottom, COLORS._main_accent); - draw_text(xx + ui(4), yy - ui(4), inputs[| input_fix_len + i].name); + draw_text(xx + ui(4), yy - ui(4), inputs[input_fix_len + i].name); if(drag_point == i) { draw_sprite_colored(THEME.anchor_selector, 1, xx, yy); @@ -681,8 +681,8 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { if(mouse_press(mb_left, active)) { var replace = tool_pathDrawer.attribute.create; if(replace) { - while(ds_list_size(inputs) > input_fix_len) - ds_list_delete(inputs, input_fix_len); + while(array_length(inputs) > input_fix_len) + array_delete(inputs, input_fix_len, 1); resetDisplayList(); } @@ -697,15 +697,15 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { draw_sprite_ui_uniform(THEME.cursor_path_add, 0, _mx + 16, _my + 16); if(mouse_press(mb_left, active)) { - while(ds_list_size(inputs) > input_fix_len) - ds_list_delete(inputs, input_fix_len); + while(array_length(inputs) > input_fix_len) + array_delete(inputs, input_fix_len, 1); resetDisplayList(); drag_point = 0; drag_type = isUsingTool(4)? 3 : 4; drag_point_mx = _mx; drag_point_my = _my; - inputs[| 1].setValue(true); + inputs[1].setValue(true); repeat(4) createNewInput(value_snap((_mx - _x) / _s, _snx), value_snap((_my - _y) / _s, _sny)); @@ -723,7 +723,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { _a[4] = 0; _a[5] = 0; _a[6] = false; - inputs[| input_fix_len + anchor_hover].setValue(_a); + inputs[input_fix_len + anchor_hover].setValue(_a); } else { _a[2] = -8; _a[3] = 0; @@ -744,9 +744,9 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { if(mouse_press(mb_left, active)) { var _indx = input_fix_len + anchor_hover; - recordAction(ACTION_TYPE.list_delete, inputs, [ inputs[| _indx], _indx, "remove path anchor point" ]); + recordAction(ACTION_TYPE.list_delete, inputs, [ inputs[_indx], _indx, "remove path anchor point" ]); - ds_list_delete(inputs, _indx); + array_delete(inputs, _indx, 1); resetDisplayList(); doUpdate(); } @@ -756,7 +756,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { if(mouse_press(mb_left, active)) { if(isUsingTool(2)) { _a[_ANCHOR.ind] = true; - inputs[| input_fix_len + anchor_hover].setValue(_a); + inputs[input_fix_len + anchor_hover].setValue(_a); } drag_point = anchor_hover; @@ -780,19 +780,19 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { draw_sprite_ui_uniform(THEME.cursor_path_add, 0, _mx + 16, _my + 16); if(mouse_press(mb_left, active)) { - var ind = ds_list_size(inputs); + var ind = array_length(inputs); var anc = createNewInput(value_snap((_mx - _x) / _s, _snx), value_snap((_my - _y) / _s, _sny), 0, 0, 0, 0, false); if(_line_hover == -1) { - drag_point = ds_list_size(inputs) - input_fix_len - 1; + drag_point = array_length(inputs) - input_fix_len - 1; } else { - ds_list_remove(inputs, anc); - ds_list_insert(inputs, input_fix_len + _line_hover + 1, anc); + array_remove(inputs, anc); + array_insert(inputs, input_fix_len + _line_hover + 1, anc); drag_point = _line_hover + 1; ind = input_fix_len + _line_hover + 1; } - recordAction(ACTION_TYPE.list_insert, inputs, [ inputs[| ind], ind, $"add path anchor point {ind}" ]); + recordAction(ACTION_TYPE.list_insert, inputs, [ inputs[ind], ind, $"add path anchor point {ind}" ]); resetDisplayList(); UNDO_HOLDING = true; @@ -817,7 +817,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var _index = 0; var sample = PREFERENCES.path_resolution; - var ansize = ds_list_size(inputs) - input_fix_len; + var ansize = array_length(inputs) - input_fix_len; if(ansize < 2) return; var con = path_loop? ansize : ansize - 1; @@ -924,7 +924,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var loop = getInputData(1); if(loop) _dist = safe_mod(_dist, lengthTotal, MOD_NEG.wrap); - var ansize = ds_list_size(inputs) - input_fix_len; + var ansize = array_length(inputs) - input_fix_len; if(ansize == 0) return out; var _a0, _a1; @@ -964,7 +964,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { if(array_empty(lengths)) return new __vec2(); var loop = getInputData(1); - var ansize = ds_list_size(inputs) - input_fix_len; + var ansize = array_length(inputs) - input_fix_len; if(_rat < 0) return new __vec2(anchors[0][0], anchors[0][1]); @@ -999,7 +999,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var _rnd = getInputData(3); var _a = []; - for(var i = input_fix_len; i < ds_list_size(inputs); i++) { + for(var i = input_fix_len; i < array_length(inputs); i++) { var _val = getInputData(i); var _anc = array_create(7, 0); @@ -1015,7 +1015,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { } anchors = _a; - outputs[| 2].setValue(_a); + outputs[2].setValue(_a); updateLength(); @@ -1027,14 +1027,14 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { else if(_typ == 1) _out[i] = getPointSegment(_rat[i]); } - outputs[| 0].setValue(_out); + outputs[0].setValue(_out); } else { var _out = [0, 0]; if(_typ == 0) _out = getPointRatio(_rat); else if(_typ == 1) _out = getPointSegment(_rat); - outputs[| 0].setValue(_out.toArray()); + outputs[0].setValue(_out.toArray()); } } #endregion diff --git a/scripts/node_path_3d/node_path_3d.gml b/scripts/node_path_3d/node_path_3d.gml index 08e26d7a6..92875c3b7 100644 --- a/scripts/node_path_3d/node_path_3d.gml +++ b/scripts/node_path_3d/node_path_3d.gml @@ -19,24 +19,24 @@ function Node_Path_3D(_x, _y, _group = noone) : Node(_x, _y, _group) constructor setDimension(96, 48); - inputs[| 0] = nodeValue_Float("Path progress", self, 0, "Sample position from path.") + inputs[0] = nodeValue_Float("Path progress", self, 0, "Sample position from path.") .setDisplay(VALUE_DISPLAY.slider); - inputs[| 1] = nodeValue_Bool("Loop", self, false) + inputs[1] = nodeValue_Bool("Loop", self, false) .rejectArray(); - inputs[| 2] = nodeValue_Enum_Scroll("Progress mode", self, 0, ["Entire line", "Segment"]) + inputs[2] = nodeValue_Enum_Scroll("Progress mode", self, 0, ["Entire line", "Segment"]) .rejectArray(); - inputs[| 3] = nodeValue_Bool("Round anchor", self, false) + inputs[3] = nodeValue_Bool("Round anchor", self, false) .rejectArray(); - outputs[| 0] = nodeValue_Output("Position out", self, VALUE_TYPE.float, [ 0, 0 ]) + outputs[0] = nodeValue_Output("Position out", self, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - outputs[| 1] = nodeValue_Output("Path data", self, VALUE_TYPE.pathnode, self); + outputs[1] = nodeValue_Output("Path data", self, VALUE_TYPE.pathnode, self); - outputs[| 2] = nodeValue_Output("Anchors", self, VALUE_TYPE.float, []) + outputs[2] = nodeValue_Output("Anchors", self, VALUE_TYPE.float, []) .setVisible(false) .setArrayDepth(1); @@ -102,9 +102,9 @@ function Node_Path_3D(_x, _y, _group = noone) : Node(_x, _y, _group) constructor input_display_list = array_clone(input_display_list_raw); - for( var i = input_fix_len, n = ds_list_size(inputs); i < n; i++ ) { + for( var i = input_fix_len, n = array_length(inputs); i < n; i++ ) { array_push(input_display_list, i); - inputs[| i].name = $"Anchor {i - input_fix_len}"; + inputs[i].name = $"Anchor {i - input_fix_len}"; } } @@ -112,31 +112,31 @@ function Node_Path_3D(_x, _y, _group = noone) : Node(_x, _y, _group) constructor _dxx = 0, _dxy = 0, _dxz = 0, _dyx = 0, _dyy = 0, _dyz = 0, rec = true) { - var index = ds_list_size(inputs); + var index = array_length(inputs); - inputs[| index] = nodeValue_Path_Anchor_3D("Anchor", self, [ _x, _y, _z, _dxx, _dxy, _dxz, _dyx, _dyy, _dyz, false ]); + inputs[index] = nodeValue_Path_Anchor_3D("Anchor", self, [ _x, _y, _z, _dxx, _dxy, _dxz, _dyx, _dyy, _dyz, false ]); - if(!rec) return inputs[| index]; + if(!rec) return inputs[index]; - recordAction(ACTION_TYPE.list_insert, inputs, [ inputs[| index], index, $"add path anchor point {index}" ]); + recordAction(ACTION_TYPE.list_insert, inputs, [ inputs[index], index, $"add path anchor point {index}" ]); resetDisplayList(); - return inputs[| index]; + return inputs[index]; } static onValueUpdate = function(index = 0) { if(index == 2) { var type = getInputData(2); - if(type == 0) inputs[| 0].setDisplay(VALUE_DISPLAY.slider); - else if(type == 1) inputs[| 0].setDisplay(VALUE_DISPLAY._default); + if(type == 0) inputs[0].setDisplay(VALUE_DISPLAY.slider); + else if(type == 1) inputs[0].setDisplay(VALUE_DISPLAY._default); } } static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) {} static drawOverlay3D = function(active, params, _mx, _my, _snx, _sny, _panel) { - var ansize = ds_list_size(inputs) - input_fix_len; + var ansize = array_length(inputs) - input_fix_len; var edited = false; var _qinv = new BBMOD_Quaternion().FromAxisAngle(new BBMOD_Vec3(1, 0, 0), 90); @@ -155,7 +155,7 @@ function Node_Path_3D(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var dz = drag_point_sz + mAdj.z - drag_point_mz; if(drag_type < 2) { // move points - var inp = inputs[| input_fix_len + drag_point]; + var inp = inputs[input_fix_len + drag_point]; var anc = array_clone(inp.getValue()); if(drag_type != 0 && key_mod_down(SHIFT)) @@ -322,7 +322,7 @@ function Node_Path_3D(_x, _y, _group = noone) : Node(_x, _y, _group) constructor draw_sprite_colored(THEME.anchor_selector, 0, xx, yy); draw_set_text(f_p1, fa_left, fa_bottom, COLORS._main_accent); - draw_text(xx + ui(4), yy - ui(4), inputs[| input_fix_len + i].name); + draw_text(xx + ui(4), yy - ui(4), inputs[input_fix_len + i].name); if(drag_point == i) { draw_sprite_colored(THEME.anchor_selector, 1, xx, yy); @@ -361,7 +361,7 @@ function Node_Path_3D(_x, _y, _group = noone) : Node(_x, _y, _group) constructor _a[6] = 0; _a[7] = 0; _a[8] = 0; _a[9] = false; - inputs[| input_fix_len + anchor_hover].setValue(_a); + inputs[input_fix_len + anchor_hover].setValue(_a); } else { _a[3] = -8; _a[4] = 0; _a[5] = 0; @@ -390,9 +390,9 @@ function Node_Path_3D(_x, _y, _group = noone) : Node(_x, _y, _group) constructor if(mouse_press(mb_left, active)) { var _indx = input_fix_len + anchor_hover; - recordAction(ACTION_TYPE.list_delete, inputs, [ inputs[| _indx], _indx, "remove path anchor point" ]); + recordAction(ACTION_TYPE.list_delete, inputs, [ inputs[_indx], _indx, "remove path anchor point" ]); - ds_list_delete(inputs, _indx); + array_delete(inputs, _indx, 1); resetDisplayList(); doUpdate(); } @@ -402,7 +402,7 @@ function Node_Path_3D(_x, _y, _group = noone) : Node(_x, _y, _group) constructor if(mouse_press(mb_left, active)) { if(isUsingTool(2)) { _a[_ANCHOR3.ind] = true; - inputs[| input_fix_len + anchor_hover].setValue(_a); + inputs[input_fix_len + anchor_hover].setValue(_a); } drag_point = anchor_hover; @@ -444,19 +444,19 @@ function Node_Path_3D(_x, _y, _group = noone) : Node(_x, _y, _group) constructor drag_plane = new __plane(drag_plane_origin, drag_plane_normal); var mAdj = d3d_intersect_ray_plane(ray, drag_plane); - var ind = ds_list_size(inputs); + var ind = array_length(inputs); var anc = createNewInput(mAdj.x, mAdj.y, mAdj.z, 0, 0, 0, 0, 0, 0, false); if(_line_hover == -1) { - drag_point = ds_list_size(inputs) - input_fix_len - 1; + drag_point = array_length(inputs) - input_fix_len - 1; } else { - ds_list_remove(inputs, anc); - ds_list_insert(inputs, input_fix_len + _line_hover + 1, anc); + array_remove(inputs, anc); + array_insert(inputs, input_fix_len + _line_hover + 1, anc); drag_point = _line_hover + 1; ind = input_fix_len + _line_hover + 1; } - recordAction(ACTION_TYPE.list_insert, inputs, [ inputs[| ind], ind, $"add path anchor point {ind}" ]); + recordAction(ACTION_TYPE.list_insert, inputs, [ inputs[ind], ind, $"add path anchor point {ind}" ]); resetDisplayList(); UNDO_HOLDING = true; @@ -485,7 +485,7 @@ function Node_Path_3D(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var _index = 0; var sample = PREFERENCES.path_resolution; - var ansize = ds_list_size(inputs) - input_fix_len; + var ansize = array_length(inputs) - input_fix_len; if(ansize < 2) return; var con = path_loop? ansize : ansize - 1; @@ -601,7 +601,7 @@ function Node_Path_3D(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var loop = getInputData(1); if(loop) _dist = safe_mod(_dist, lengthTotal, MOD_NEG.wrap); - var ansize = ds_list_size(inputs) - input_fix_len; + var ansize = array_length(inputs) - input_fix_len; if(ansize == 0) return out; var _a0, _a1; @@ -645,7 +645,7 @@ function Node_Path_3D(_x, _y, _group = noone) : Node(_x, _y, _group) constructor if(array_empty(lengths)) return new __vec3(); var loop = getInputData(1); - var ansize = ds_list_size(inputs) - input_fix_len; + var ansize = array_length(inputs) - input_fix_len; if(_rat < 0) return new __vec3(anchors[0][0], anchors[0][1], anchors[0][2]); @@ -684,7 +684,7 @@ function Node_Path_3D(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var _rnd = getInputData(3); var _a = []; - for(var i = input_fix_len; i < ds_list_size(inputs); i++) { + for(var i = input_fix_len; i < array_length(inputs); i++) { var _val = getInputData(i); var _anc = array_create(10, 0); @@ -701,7 +701,7 @@ function Node_Path_3D(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } anchors = _a; - outputs[| 2].setValue(_a); + outputs[2].setValue(_a); updateLength(); @@ -713,14 +713,14 @@ function Node_Path_3D(_x, _y, _group = noone) : Node(_x, _y, _group) constructor else if(_typ == 1) _out[i] = getPointSegment(_rat[i]); } - outputs[| 0].setValue(_out); + outputs[0].setValue(_out); } else { var _out = [0, 0]; if(_typ == 0) _out = getPointRatio(_rat); else if(_typ == 1) _out = getPointSegment(_rat); - outputs[| 0].setValue(_out.toArray()); + outputs[0].setValue(_out.toArray()); } } diff --git a/scripts/node_path_anchor/node_path_anchor.gml b/scripts/node_path_anchor/node_path_anchor.gml index 3608800fb..245de8a5d 100644 --- a/scripts/node_path_anchor/node_path_anchor.gml +++ b/scripts/node_path_anchor/node_path_anchor.gml @@ -3,16 +3,16 @@ function Node_Path_Anchor(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou color = COLORS.node_blend_number; setDimension(96, 48); - inputs[| 0] = nodeValue_Vector("Postion", self, [ 0, 0 ] ) + inputs[0] = nodeValue_Vector("Postion", self, [ 0, 0 ] ) .setVisible(true, true); - inputs[| 1] = nodeValue_Vector("Control point 1", self, [ -16, 0 ] ); + inputs[1] = nodeValue_Vector("Control point 1", self, [ -16, 0 ] ); - inputs[| 2] = nodeValue_Vector("Control point 2", self, [ 16, 0 ] ); + inputs[2] = nodeValue_Vector("Control point 2", self, [ 16, 0 ] ); - inputs[| 3] = nodeValue_Bool("Mirror control point", self, true ); + inputs[3] = nodeValue_Bool("Mirror control point", self, true ); - outputs[| 0] = nodeValue_Output("Anchor", self, VALUE_TYPE.float, [ 0, 0, 0, 0, 0, 0 ]) + outputs[0] = nodeValue_Output("Anchor", self, VALUE_TYPE.float, [ 0, 0, 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); tools = [ @@ -39,11 +39,11 @@ function Node_Path_Anchor(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou draw_line(px, py, c1x, c1y); draw_line(px, py, c2x, c2y); - active &= !inputs[| 0].drawOverlay(hover, !isUsingTool(0) && active, _x, _y, _s, _mx, _my, _snx, _sny); - active &= !inputs[| 1].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); + active &= !inputs[0].drawOverlay(hover, !isUsingTool(0) && active, _x, _y, _s, _mx, _my, _snx, _sny); + active &= !inputs[1].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); if(!_mir) - active &= !inputs[| 2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); + active &= !inputs[2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); else draw_circle_prec(c2x, c2y, 4, false); } diff --git a/scripts/node_path_array/node_path_array.gml b/scripts/node_path_array/node_path_array.gml index a1e724fb1..7f0da4fc1 100644 --- a/scripts/node_path_array/node_path_array.gml +++ b/scripts/node_path_array/node_path_array.gml @@ -4,20 +4,20 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc cached_pos = ds_map_create(); - outputs[| 0] = nodeValue_Output("Combined Path", self, VALUE_TYPE.pathnode, self); + outputs[0] = nodeValue_Output("Combined Path", self, VALUE_TYPE.pathnode, self); static createNewInput = function() { - var index = ds_list_size(inputs); + var index = array_length(inputs); - inputs[| index] = nodeValue_PathNode("Path", self, noone ) + inputs[index] = nodeValue_PathNode("Path", self, noone ) .setVisible(true, true); - return inputs[| index]; + return inputs[index]; } setDynamicInput(1, true, VALUE_TYPE.pathnode); static getLineCount = function() { var l = 0; - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { var _path = getInputData(i); l += struct_has(_path, "getLineCount")? _path.getLineCount() : 1; } @@ -25,7 +25,7 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc } static getSegmentCount = function(ind = 0) { - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { var _path = getInputData(i); var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1; @@ -37,7 +37,7 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc } static getLength = function(ind = 0) { - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { var _path = getInputData(i); var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1; @@ -49,7 +49,7 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc } static getAccuLength = function(ind = 0) { - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { var _path = getInputData(i); var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1; @@ -61,7 +61,7 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc } static getPointRatio = function(_rat, ind = 0) { - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { var _path = getInputData(i); var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1; @@ -73,7 +73,7 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc } static getPointDistance = function(_dist, ind = 0) { - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { var _path = getInputData(i); var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1; @@ -85,7 +85,7 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc } static getBoundary = function(ind = 0) { - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { var _path = getInputData(i); var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1; @@ -97,7 +97,7 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc } static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { var _path = getInputData(i); if(!struct_has(_path, "drawOverlay")) continue; @@ -107,6 +107,6 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc static update = function(frame = CURRENT_FRAME) { ds_map_clear(cached_pos); - outputs[| 0].setValue(self); + outputs[0].setValue(self); } } \ No newline at end of file diff --git a/scripts/node_path_bake/node_path_bake.gml b/scripts/node_path_bake/node_path_bake.gml index d2c5d8625..6666e497b 100644 --- a/scripts/node_path_bake/node_path_bake.gml +++ b/scripts/node_path_bake/node_path_bake.gml @@ -2,14 +2,14 @@ function Node_Path_Bake(_x, _y, _group = noone) : Node(_x, _y, _group) construct name = "Bake Path"; setDimension(96, 48); - inputs[| 0] = nodeValue_PathNode("Path", self, noone) + inputs[0] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Float("Segment length", self, 1); + inputs[1] = nodeValue_Float("Segment length", self, 1); - inputs[| 2] = nodeValue_Bool("Spread single path", self, true); + inputs[2] = nodeValue_Bool("Spread single path", self, true); - outputs[| 0] = nodeValue_Output("Segments", self, VALUE_TYPE.float, [[]]) + outputs[0] = nodeValue_Output("Segments", self, VALUE_TYPE.float, [[]]) .setDisplay(VALUE_DISPLAY.vector) .setArrayDepth(2); @@ -19,7 +19,7 @@ function Node_Path_Bake(_x, _y, _group = noone) : Node(_x, _y, _group) construct var _path = getInputData(0); if(_path && struct_has(_path, "drawOverlay")) _path.drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); - var _segs = outputs[| 0].getValue(); + var _segs = outputs[0].getValue(); var ox, oy, nx, ny; if(array_invalid(_segs) || array_invalid(_segs[0])) return; @@ -73,7 +73,7 @@ function Node_Path_Bake(_x, _y, _group = noone) : Node(_x, _y, _group) construct } if(_sped && _amo == 1) _segs = _segs[0]; - outputs[| 0].setValue(_segs); + outputs[0].setValue(_segs); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_path_blend/node_path_blend.gml b/scripts/node_path_blend/node_path_blend.gml index 019f988e0..90d815af4 100644 --- a/scripts/node_path_blend/node_path_blend.gml +++ b/scripts/node_path_blend/node_path_blend.gml @@ -3,19 +3,19 @@ function Node_Path_Blend(_x, _y, _group = noone) : Node(_x, _y, _group) construc setDimension(96, 48);; length = 0; - inputs[| 0] = nodeValue_PathNode("Path 1", self, noone) + inputs[0] = nodeValue_PathNode("Path 1", self, noone) .setVisible(true, true) .rejectArray(); - inputs[| 1] = nodeValue_PathNode("Path 2", self, noone) + inputs[1] = nodeValue_PathNode("Path 2", self, noone) .setVisible(true, true) .rejectArray(); - inputs[| 2] = nodeValue_Float("Ratio", self, 0) + inputs[2] = nodeValue_Float("Ratio", self, 0) .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); - outputs[| 0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); + outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); cached_pos = ds_map_create(); @@ -169,7 +169,7 @@ function Node_Path_Blend(_x, _y, _group = noone) : Node(_x, _y, _group) construc static update = function() { #region ds_map_clear(cached_pos); - outputs[| 0].setValue(self); + outputs[0].setValue(self); } #endregion static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region diff --git a/scripts/node_path_bridge/node_path_bridge.gml b/scripts/node_path_bridge/node_path_bridge.gml index 806a4af8f..26ab46810 100644 --- a/scripts/node_path_bridge/node_path_bridge.gml +++ b/scripts/node_path_bridge/node_path_bridge.gml @@ -2,17 +2,17 @@ function Node_Path_Bridge(_x, _y, _group = noone) : Node(_x, _y, _group) constru name = "Bridge Path"; setDimension(96, 48);; - inputs[| 0] = nodeValue_PathNode("Path", self, noone) + inputs[0] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true) .rejectArray(); - inputs[| 1] = nodeValue_Int("Amount", self, 4) + inputs[1] = nodeValue_Int("Amount", self, 4) .rejectArray(); - inputs[| 2] = nodeValue_Bool("Smooth", self, false) + inputs[2] = nodeValue_Bool("Smooth", self, false) .rejectArray(); - outputs[| 0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); + outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); input_display_list = [ 0, ["Bridge", false], 1, 2, diff --git a/scripts/node_path_builder/node_path_builder.gml b/scripts/node_path_builder/node_path_builder.gml index 18270c475..e361a7243 100644 --- a/scripts/node_path_builder/node_path_builder.gml +++ b/scripts/node_path_builder/node_path_builder.gml @@ -17,13 +17,13 @@ function Node_Path_Builder(_x, _y, _group = noone) : Node(_x, _y, _group) constr lines = []; #endregion - inputs[| 0] = nodeValue_Float("Point array", self, []) + inputs[0] = nodeValue_Float("Point array", self, []) .setVisible(true, true) .setArrayDepth(2); - inputs[| 1] = nodeValue_Bool("Loop", self, false); + inputs[1] = nodeValue_Bool("Loop", self, false); - outputs[| 0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); + outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); cached_pos = ds_map_create(); @@ -189,7 +189,7 @@ function Node_Path_Builder(_x, _y, _group = noone) : Node(_x, _y, _group) constr updateLength(); - outputs[| 0].setValue(self); + outputs[0].setValue(self); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_path_from_mask/node_path_from_mask.gml b/scripts/node_path_from_mask/node_path_from_mask.gml index cbcf8e156..4161b7997 100644 --- a/scripts/node_path_from_mask/node_path_from_mask.gml +++ b/scripts/node_path_from_mask/node_path_from_mask.gml @@ -1,11 +1,11 @@ function Node_Path_From_Mask(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Path from Mask"; - inputs[| 0] = nodeValue_Surface("Mask", self); + inputs[0] = nodeValue_Surface("Mask", self); - inputs[| 1] = nodeValue_Float("Smooth angle", self, 15); + inputs[1] = nodeValue_Float("Smooth angle", self, 15); - outputs[| 0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); + outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); temp_surface = [ surface_create(1, 1) ]; diff --git a/scripts/node_path_l_system/node_path_l_system.gml b/scripts/node_path_l_system/node_path_l_system.gml index 727814530..4da3ec55d 100644 --- a/scripts/node_path_l_system/node_path_l_system.gml +++ b/scripts/node_path_l_system/node_path_l_system.gml @@ -14,35 +14,35 @@ function Node_Path_L_System(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr name = "L System"; setDimension(96, 48); - inputs[| 0] = nodeValue_Float("Length", self, 8); + inputs[0] = nodeValue_Float("Length", self, 8); - inputs[| 1] = nodeValue_Rotation("Angle", self, 45); + inputs[1] = nodeValue_Rotation("Angle", self, 45); - inputs[| 2] = nodeValue_Vector("Starting position", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ]); + inputs[2] = nodeValue_Vector("Starting position", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ]); - inputs[| 3] = nodeValue_Int("Iteration", self, 4); + inputs[3] = nodeValue_Int("Iteration", self, 4); - inputs[| 4] = nodeValue_Text("Starting rule", self, "", o_dialog_l_system); + inputs[4] = nodeValue_Text("Starting rule", self, "", o_dialog_l_system); - inputs[| 5] = nodeValue_Text("End replacement", self, "", "Replace symbol of the last generated rule, for example a=F to replace all a with F. Use comma to separate different replacements."); + inputs[5] = nodeValue_Text("End replacement", self, "", "Replace symbol of the last generated rule, for example a=F to replace all a with F. Use comma to separate different replacements."); - inputs[| 6] = nodeValue_Rotation("Starting Angle", self, 90); + inputs[6] = nodeValue_Rotation("Starting Angle", self, 90); - inputs[| 7] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 7].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[7] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[7].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); static createNewInput = function() { - var index = ds_list_size(inputs); - inputs[| index + 0] = nodeValue_Text("Name " + string(index - input_fix_len), self, "" ); - inputs[| index + 1] = nodeValue_Text("Rule " + string(index - input_fix_len), self, "" ); + var index = array_length(inputs); + inputs[index + 0] = nodeValue_Text("Name " + string(index - input_fix_len), self, "" ); + inputs[index + 1] = nodeValue_Text("Rule " + string(index - input_fix_len), self, "" ); - return inputs[| index + 0]; + return inputs[index + 0]; } setDynamicInput(2, false); if(!LOADING && !APPENDING) createNewInput(); - outputs[| 0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); + outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); rule_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { rule_renderer.x = _x; @@ -56,9 +56,9 @@ function Node_Path_L_System(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr var _tw = ui(64); var _th = TEXTBOX_HEIGHT + ui(4); - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { - var _name = inputs[| i + 0]; - var _rule = inputs[| i + 1]; + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { + var _name = inputs[i + 0]; + var _rule = inputs[i + 1]; draw_set_text(f_p1, fa_left, fa_top, COLORS._main_text_sub); draw_text_add(_x + ui(8), ty + ui(8), string((i - input_fix_len) / data_length)); @@ -78,9 +78,9 @@ function Node_Path_L_System(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr return hh; }, function(parent = noone) { - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { - var _name = inputs[| i + 0]; - var _rule = inputs[| i + 1]; + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { + var _name = inputs[i + 0]; + var _rule = inputs[i + 1]; _name.editWidget.register(parent); _rule.editWidget.register(parent); @@ -112,25 +112,25 @@ function Node_Path_L_System(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr } static refreshDynamicInput = function() { - var _l = ds_list_create(); + var _l = []; for( var i = 0; i < input_fix_len; i++ ) - _l[| i] = inputs[| i]; + _l[i] = inputs[i]; - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { if(getInputData(i) != "") { - ds_list_add(_l, inputs[| i + 0]); - ds_list_add(_l, inputs[| i + 1]); + array_push(_l, inputs[i + 0]); + array_push(_l, inputs[i + 1]); } else { - delete inputs[| i + 0]; - delete inputs[| i + 1]; + delete inputs[i + 0]; + delete inputs[i + 1]; } } - for( var i = 0; i < ds_list_size(_l); i++ ) - _l[| i].index = i; + for( var i = 0; i < array_length(_l); i++ ) + _l[i].index = i; - ds_list_destroy(inputs); + inputs = _l; createNewInput(); @@ -142,7 +142,7 @@ function Node_Path_L_System(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr } static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); var _out = getSingleValue(0, preview_index, true); if(!is_struct(_out)) return; @@ -284,10 +284,10 @@ function Node_Path_L_System(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr __curr_path = new Path_LSystem(); __curr_path.current_length = _len; - if(ds_list_size(inputs) < input_fix_len + 2) return __curr_path; + if(array_length(inputs) < input_fix_len + 2) return __curr_path; var rules = {}; - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { var _name = _data[i + 0]; var _rule = _data[i + 1]; if(_name == "") continue; diff --git a/scripts/node_path_map/node_path_map.gml b/scripts/node_path_map/node_path_map.gml index b7ddeec82..24396a1e8 100644 --- a/scripts/node_path_map/node_path_map.gml +++ b/scripts/node_path_map/node_path_map.gml @@ -1,19 +1,19 @@ function Node_Path_Map(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Map Path"; - inputs[| 0] = nodeValue_PathNode("Path", self, noone) + inputs[0] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true) .rejectArray(); - inputs[| 1] = nodeValue_Dimension(self); + inputs[1] = nodeValue_Dimension(self); - inputs[| 2] = nodeValue_Surface("Texture", self); + inputs[2] = nodeValue_Surface("Texture", self); - inputs[| 3] = nodeValue_Int("Subdivision", self, 16) + inputs[3] = nodeValue_Int("Subdivision", self, 16) .setValidator(VV_min(2)) .rejectArray(); - outputs[| 0] = nodeValue_Output("Rendered", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Rendered", self, VALUE_TYPE.surface, noone); input_display_list = [ 0, ["Mapping", false], 1, 2, 3, @@ -66,7 +66,7 @@ function Node_Path_Map(_x, _y, _group = noone) : Node(_x, _y, _group) constructo _pnt[i] = _p; } - var _out = outputs[| 0].getValue(); + var _out = outputs[0].getValue(); _out = surface_verify(_out, _dim[0], _dim[1]) surface_set_shader(_out, noone); @@ -97,6 +97,6 @@ function Node_Path_Map(_x, _y, _group = noone) : Node(_x, _y, _group) constructo draw_primitive_end(); surface_reset_shader(); - outputs[| 0].setValue(_out); + outputs[0].setValue(_out); } } \ No newline at end of file diff --git a/scripts/node_path_map_area/node_path_map_area.gml b/scripts/node_path_map_area/node_path_map_area.gml index 619eb807c..37b6f13a5 100644 --- a/scripts/node_path_map_area/node_path_map_area.gml +++ b/scripts/node_path_map_area/node_path_map_area.gml @@ -2,18 +2,18 @@ function Node_Path_Map_Area(_x, _y, _group = noone) : Node(_x, _y, _group) const name = "Remap Path"; setDimension(96, 48);; - inputs[| 0] = nodeValue_PathNode("Path", self, noone) + inputs[0] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Area("Area", self, DEF_AREA, { useShape : false }); - inputs[| 1].editWidget.adjust_shape = false; + inputs[1] = nodeValue_Area("Area", self, DEF_AREA, { useShape : false }); + inputs[1].editWidget.adjust_shape = false; - outputs[| 0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); + outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); cached_pos = ds_map_create(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static getLineCount = function() { @@ -70,7 +70,7 @@ function Node_Path_Map_Area(_x, _y, _group = noone) : Node(_x, _y, _group) const } static update = function() { - outputs[| 0].setValue(self); + outputs[0].setValue(self); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_path_plot/node_path_plot.gml b/scripts/node_path_plot/node_path_plot.gml index c7cbfa69a..643146f56 100644 --- a/scripts/node_path_plot/node_path_plot.gml +++ b/scripts/node_path_plot/node_path_plot.gml @@ -3,27 +3,27 @@ function Node_Path_Plot(_x, _y, _group = noone) : Node(_x, _y, _group) construct length = 0; setDimension(96, 48);; - inputs[| 0] = nodeValue_Vector("Output scale", self, [ 8, 8 ]); + inputs[0] = nodeValue_Vector("Output scale", self, [ 8, 8 ]); - inputs[| 1] = nodeValue_Enum_Scroll("Coordinate", self, 0, [ new scrollItem("Cartesian", s_node_axis_type, 0), + inputs[1] = nodeValue_Enum_Scroll("Coordinate", self, 0, [ new scrollItem("Cartesian", s_node_axis_type, 0), new scrollItem("Polar", s_node_axis_type, 1), ]); eq_type_car = [ "x function", "y function", "parametric" ]; eq_type_pol = [ "r function", "O function", "parametric" ]; - inputs[| 2] = nodeValue_Enum_Scroll("Equation type", self, 0, eq_type_car); + inputs[2] = nodeValue_Enum_Scroll("Equation type", self, 0, eq_type_car); - inputs[| 3] = nodeValue_Text("0 function", self, ""); - inputs[| 4] = nodeValue_Text("1 function", self, ""); + inputs[3] = nodeValue_Text("0 function", self, ""); + inputs[4] = nodeValue_Text("1 function", self, ""); - inputs[| 5] = nodeValue_Vector("Origin", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ] ); + inputs[5] = nodeValue_Vector("Origin", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ] ); - inputs[| 6] = nodeValue_Slider_Range("Range", self, [ 0, 1 ], { range: [ -1, 1, 0.01 ] }); + inputs[6] = nodeValue_Slider_Range("Range", self, [ 0, 1 ], { range: [ -1, 1, 0.01 ] }); - inputs[| 7] = nodeValue_Vector("Input scale", self, [ 1, 1 ]); + inputs[7] = nodeValue_Vector("Input scale", self, [ 1, 1 ]); - inputs[| 8] = nodeValue_Vector("Input shift", self, [ 0, 0 ]); + inputs[8] = nodeValue_Vector("Input shift", self, [ 0, 0 ]); - outputs[| 0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); + outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); input_display_list = [ [ "Variable", false ], 5, 7, 8, 0, @@ -34,7 +34,7 @@ function Node_Path_Plot(_x, _y, _group = noone) : Node(_x, _y, _group) construct cached_pos = ds_map_create(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static getLineCount = function() { return 1; } @@ -111,46 +111,46 @@ function Node_Path_Plot(_x, _y, _group = noone) : Node(_x, _y, _group) construct var _coor = getInputData(1); var _eqa = getInputData(2); - inputs[| 2].editWidget.data_list = _coor? eq_type_pol : eq_type_car; + inputs[2].editWidget.data_list = _coor? eq_type_pol : eq_type_car; switch(_coor) { case 0 : switch(_eqa) { case 0 : - inputs[| 3].name = "f(x) = "; - inputs[| 4].setVisible(false); - inputs[| 6].name = "x range"; + inputs[3].name = "f(x) = "; + inputs[4].setVisible(false); + inputs[6].name = "x range"; break; case 1 : - inputs[| 3].name = "f(y) = "; - inputs[| 4].setVisible(false); - inputs[| 6].name = "y range"; + inputs[3].name = "f(y) = "; + inputs[4].setVisible(false); + inputs[6].name = "y range"; break; case 2 : - inputs[| 3].name = "x(t) = "; - inputs[| 4].name = "y(t) = "; - inputs[| 4].setVisible(true); - inputs[| 6].name = "t range"; + inputs[3].name = "x(t) = "; + inputs[4].name = "y(t) = "; + inputs[4].setVisible(true); + inputs[6].name = "t range"; break; } break; case 1 : switch(_eqa) { case 0 : - inputs[| 3].name = "f(r) = "; - inputs[| 4].setVisible(false); - inputs[| 6].name = "r range"; + inputs[3].name = "f(r) = "; + inputs[4].setVisible(false); + inputs[6].name = "r range"; break; case 1 : - inputs[| 3].name = "f(O) = "; - inputs[| 4].setVisible(false); - inputs[| 6].name = "O range"; + inputs[3].name = "f(O) = "; + inputs[4].setVisible(false); + inputs[6].name = "O range"; break; case 2 : - inputs[| 3].name = "r(t) = "; - inputs[| 4].name = "O(t) = "; - inputs[| 4].setVisible(true); - inputs[| 6].name = "t range"; + inputs[3].name = "r(t) = "; + inputs[4].name = "O(t) = "; + inputs[4].setVisible(true); + inputs[6].name = "t range"; break; } break; @@ -176,7 +176,7 @@ function Node_Path_Plot(_x, _y, _group = noone) : Node(_x, _y, _group) construct static update = function() { updateBoundary(); - outputs[| 0].setValue(self); + outputs[0].setValue(self); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_path_profile/node_path_profile.gml b/scripts/node_path_profile/node_path_profile.gml index 6ef0c03db..131e62450 100644 --- a/scripts/node_path_profile/node_path_profile.gml +++ b/scripts/node_path_profile/node_path_profile.gml @@ -1,26 +1,26 @@ function Node_Path_Profile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Draw Path Profile"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_PathNode("Path", self, noone ) + inputs[1] = nodeValue_PathNode("Path", self, noone ) .setVisible(true, true); - inputs[| 2] = nodeValue_Int("Resolution", self, 64 ); + inputs[2] = nodeValue_Int("Resolution", self, 64 ); - inputs[| 3] = nodeValue_Enum_Button("Side", self, 0 , [ "L", "R", "T", "D" ]); + inputs[3] = nodeValue_Enum_Button("Side", self, 0 , [ "L", "R", "T", "D" ]); - inputs[| 4] = nodeValue_Bool("Mirror", self, false ); + inputs[4] = nodeValue_Bool("Mirror", self, false ); - inputs[| 5] = nodeValue_Color("Color", self, c_white ); + inputs[5] = nodeValue_Color("Color", self, c_white ); - inputs[| 6] = nodeValue_Bool("Anti Aliasing", self, false ); + inputs[6] = nodeValue_Bool("Anti Aliasing", self, false ); - inputs[| 7] = nodeValue_Bool("Background", self, false ); + inputs[7] = nodeValue_Bool("Background", self, false ); - inputs[| 8] = nodeValue_Color("BG Color", self, c_black ); + inputs[8] = nodeValue_Color("BG Color", self, c_black ); - outputs[| 0] = nodeValue_Output("Output", self, VALUE_TYPE.surface, noone ); + outputs[0] = nodeValue_Output("Output", self, VALUE_TYPE.surface, noone ); input_display_list = [ 0, [ "Profile", false ], 1, 2, diff --git a/scripts/node_path_reverse/node_path_reverse.gml b/scripts/node_path_reverse/node_path_reverse.gml index a53d72f72..b49b8a297 100644 --- a/scripts/node_path_reverse/node_path_reverse.gml +++ b/scripts/node_path_reverse/node_path_reverse.gml @@ -2,10 +2,10 @@ function Node_Path_Reverse(_x, _y, _group = noone) : Node(_x, _y, _group) constr name = "Reverse Path"; setDimension(96, 48);; - inputs[| 0] = nodeValue_PathNode("Path", self, noone) + inputs[0] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); + outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); cached_pos = ds_map_create(); @@ -52,7 +52,7 @@ function Node_Path_Reverse(_x, _y, _group = noone) : Node(_x, _y, _group) constr static update = function() { #region ds_map_clear(cached_pos); - outputs[| 0].setValue(self); + outputs[0].setValue(self); } #endregion static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region diff --git a/scripts/node_path_sample/node_path_sample.gml b/scripts/node_path_sample/node_path_sample.gml index 91f6f0cb4..4efdf38b9 100644 --- a/scripts/node_path_sample/node_path_sample.gml +++ b/scripts/node_path_sample/node_path_sample.gml @@ -3,23 +3,23 @@ function Node_Path_Sample(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou batch_output = false; setDimension(96, 48); - inputs[| 0] = nodeValue_PathNode("Path", self, noone) + inputs[0] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Float("Ratio", self, 0); + inputs[1] = nodeValue_Float("Ratio", self, 0); - inputs[| 2] = nodeValue_Enum_Scroll("Type", self, 0, [ "Loop", "Ping pong" ]); + inputs[2] = nodeValue_Enum_Scroll("Type", self, 0, [ "Loop", "Ping pong" ]); - outputs[| 0] = nodeValue_Output("Position", self, VALUE_TYPE.float, [ 0, 0 ]) + outputs[0] = nodeValue_Output("Position", self, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - outputs[| 1] = nodeValue_Output("Direction", self, VALUE_TYPE.float, 0); + outputs[1] = nodeValue_Output("Direction", self, VALUE_TYPE.float, 0); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _path = getInputData(0); if(_path && struct_has(_path, "drawOverlay")) _path.drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); - var _pnt = outputs[| 0].getValue(); + var _pnt = outputs[0].getValue(); if(process_amount == 1) _pnt = [ _pnt ]; draw_set_color(COLORS._main_accent); diff --git a/scripts/node_path_scatter/node_path_scatter.gml b/scripts/node_path_scatter/node_path_scatter.gml index fc3b86b69..553ed2eb2 100644 --- a/scripts/node_path_scatter/node_path_scatter.gml +++ b/scripts/node_path_scatter/node_path_scatter.gml @@ -2,37 +2,37 @@ function Node_Path_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro name = "Scatter Path"; setDimension(96, 48); - inputs[| 0] = nodeValue_PathNode("Base Path", self, noone) + inputs[0] = nodeValue_PathNode("Base Path", self, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_PathNode("Scatter Path", self, noone) + inputs[1] = nodeValue_PathNode("Scatter Path", self, noone) .setVisible(true, true); - inputs[| 2] = nodeValue_Slider_Range("Range", self, [ 0, 1 ]); + inputs[2] = nodeValue_Slider_Range("Range", self, [ 0, 1 ]); - inputs[| 3] = nodeValue_Int("Amount", self, 4); + inputs[3] = nodeValue_Int("Amount", self, 4); - inputs[| 4] = nodeValue_Slider_Range("Scale", self, [ 0.5, 1 ]); + inputs[4] = nodeValue_Slider_Range("Scale", self, [ 0.5, 1 ]); - inputs[| 5] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[5] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 6] = nodeValue("Scale over Length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + inputs[6] = nodeValue("Scale over Length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); - inputs[| 7] = nodeValue_Rotation_Random("Rotation", self, [ 0, 45, 135, 0, 0 ] ); + inputs[7] = nodeValue_Rotation_Random("Rotation", self, [ 0, 45, 135, 0, 0 ] ); - inputs[| 8] = nodeValue_Enum_Scroll("Distribution", self, 0 , [ "Uniform", "Random" ]); + inputs[8] = nodeValue_Enum_Scroll("Distribution", self, 0 , [ "Uniform", "Random" ]); - inputs[| 9] = nodeValue("Trim over Length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + inputs[9] = nodeValue("Trim over Length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); - inputs[| 10] = nodeValue_Float("Range", self, 1) + inputs[10] = nodeValue_Float("Range", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 11] = nodeValue_Bool("Flip if Negative", self, false ); + inputs[11] = nodeValue_Bool("Flip if Negative", self, false ); - inputs[| 12] = nodeValue_Enum_Scroll("Origin", self, 0 , [ "Individual", "First", "Zero" ]); + inputs[12] = nodeValue_Enum_Scroll("Origin", self, 0 , [ "Individual", "First", "Zero" ]); - outputs[| 0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); + outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); input_display_list = [ 5, ["Paths", false], 0, 1, 10, 9, diff --git a/scripts/node_path_separate_folder/node_path_separate_folder.gml b/scripts/node_path_separate_folder/node_path_separate_folder.gml index 60229ee7b..abfe549e9 100644 --- a/scripts/node_path_separate_folder/node_path_separate_folder.gml +++ b/scripts/node_path_separate_folder/node_path_separate_folder.gml @@ -3,14 +3,14 @@ function Node_Path_Separate_Folder(_x, _y, _group = noone) : Node_Processor(_x, setDimension(96, 48); - inputs[| 0] = nodeValue_Text("Path", self, "") + inputs[0] = nodeValue_Text("Path", self, "") .setVisible(true, true); - inputs[| 1] = nodeValue_Bool("Keep extension", self, true); + inputs[1] = nodeValue_Bool("Keep extension", self, true); - outputs[| 0] = nodeValue_Output("Directory", self, VALUE_TYPE.path, ""); + outputs[0] = nodeValue_Output("Directory", self, VALUE_TYPE.path, ""); - outputs[| 1] = nodeValue_Output("File Name", self, VALUE_TYPE.path, ""); + outputs[1] = nodeValue_Output("File Name", self, VALUE_TYPE.path, ""); static processData = function(_output, _data, _index = 0) { if(_index == 0) @@ -20,7 +20,7 @@ function Node_Path_Separate_Folder(_x, _y, _group = noone) : Node_Processor(_x, } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { - var str = outputs[| 1].getValue(); + var str = outputs[1].getValue(); var bbox = drawGetBbox(xx, yy, _s); draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); diff --git a/scripts/node_path_shift/node_path_shift.gml b/scripts/node_path_shift/node_path_shift.gml index 01c12030d..67f5d259c 100644 --- a/scripts/node_path_shift/node_path_shift.gml +++ b/scripts/node_path_shift/node_path_shift.gml @@ -2,12 +2,12 @@ function Node_Path_Shift(_x, _y, _group = noone) : Node(_x, _y, _group) construc name = "Shift Path"; setDimension(96, 48);; - inputs[| 0] = nodeValue_PathNode("Path", self, noone) + inputs[0] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Float("Distance", self, 0); + inputs[1] = nodeValue_Float("Distance", self, 0); - outputs[| 0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); + outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); cached_pos = ds_map_create(); @@ -102,7 +102,7 @@ function Node_Path_Shift(_x, _y, _group = noone) : Node(_x, _y, _group) construc static update = function() { #region ds_map_clear(cached_pos); - outputs[| 0].setValue(self); + outputs[0].setValue(self); } #endregion static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region diff --git a/scripts/node_path_smooth/node_path_smooth.gml b/scripts/node_path_smooth/node_path_smooth.gml index 3b656c59f..3cce6d137 100644 --- a/scripts/node_path_smooth/node_path_smooth.gml +++ b/scripts/node_path_smooth/node_path_smooth.gml @@ -2,16 +2,16 @@ function Node_Path_Smooth(_x, _y, _group = noone) : Node(_x, _y, _group) constru name = "Smooth Path"; setDimension(96, 48);; - inputs[| 0] = nodeValue_Bool("Loop", self, false) + inputs[0] = nodeValue_Bool("Loop", self, false) .rejectArray(); - inputs[| 1] = nodeValue_Bool("Round anchor", self, false) + inputs[1] = nodeValue_Bool("Round anchor", self, false) .rejectArray(); - inputs[| 2] = nodeValue_Float("Smoothness", self, 3) + inputs[2] = nodeValue_Float("Smoothness", self, 3) .setDisplay(VALUE_DISPLAY.slider, { range : [ 1, 5, 0.01 ] } ); - outputs[| 0] = nodeValue_Output("Path data", self, VALUE_TYPE.pathnode, self); + outputs[0] = nodeValue_Output("Path data", self, VALUE_TYPE.pathnode, self); input_display_list = [ ["Path", false], 0, 1, 2, @@ -48,26 +48,26 @@ function Node_Path_Smooth(_x, _y, _group = noone) : Node(_x, _y, _group) constru ["Anchors", false], ]; - for( var i = input_fix_len, n = ds_list_size(inputs); i < n; i++ ) { + for( var i = input_fix_len, n = array_length(inputs); i < n; i++ ) { array_push(input_display_list, i); - inputs[| i].name = $"Anchor {i - input_fix_len}"; + inputs[i].name = $"Anchor {i - input_fix_len}"; } } #endregion static createNewInput = function(_x = 0, _y = 0) { #region - var index = ds_list_size(inputs); + var index = array_length(inputs); - inputs[| index] = nodeValue_Vector("Anchor", self, [ _x, _y ]); + inputs[index] = nodeValue_Vector("Anchor", self, [ _x, _y ]); - recordAction(ACTION_TYPE.list_insert, inputs, [ inputs[| index], index, "add path anchor point" ]); + recordAction(ACTION_TYPE.list_insert, inputs, [ inputs[index], index, "add path anchor point" ]); resetDisplayList(); - return inputs[| index]; + return inputs[index]; } #endregion static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var sample = PREFERENCES.path_resolution; - var ansize = ds_list_size(inputs) - input_fix_len; + var ansize = array_length(inputs) - input_fix_len; var loop = getInputData(0); var rond = getInputData(1); @@ -99,8 +99,8 @@ function Node_Path_Smooth(_x, _y, _group = noone) : Node(_x, _y, _group) constru #region draw anchor var _act = active && !isUsingTool(0); - for(var i = input_fix_len; i < ds_list_size(inputs); i++) { - var a = inputs[| i].drawOverlay(hover, _act, _x, _y, _s, _mx, _my, _snx, _sny); + for(var i = input_fix_len; i < array_length(inputs); i++) { + var a = inputs[i].drawOverlay(hover, _act, _x, _y, _s, _mx, _my, _snx, _sny); _act &= !a; if(a) _anchor_hover = i; } @@ -118,12 +118,12 @@ function Node_Path_Smooth(_x, _y, _group = noone) : Node(_x, _y, _group) constru UNDO_HOLDING = true; if(_line_hover != -1) { - ds_list_remove(inputs, anc); - ds_list_insert(inputs, input_fix_len + _line_hover + 1, anc); + array_remove(inputs, anc); + array_insert(inputs, input_fix_len + _line_hover + 1, anc); } } else { - recordAction(ACTION_TYPE.list_delete, inputs, [ inputs[| input_fix_len + _anchor_hover], input_fix_len + _anchor_hover, "remove path anchor point" ]); - ds_list_delete(inputs, input_fix_len + _anchor_hover); + recordAction(ACTION_TYPE.list_delete, inputs, [ inputs[input_fix_len + _anchor_hover], input_fix_len + _anchor_hover, "remove path anchor point" ]); + array_delete(inputs, input_fix_len + _anchor_hover, 1); resetDisplayList(); } @@ -143,7 +143,7 @@ function Node_Path_Smooth(_x, _y, _group = noone) : Node(_x, _y, _group) constru boundary = new BoundingBox(); var sample = PREFERENCES.path_resolution; - var ansize = ds_list_size(inputs) - input_fix_len; + var ansize = array_length(inputs) - input_fix_len; if(ansize < 2) return; var con = loop? ansize : ansize - 1; @@ -206,7 +206,7 @@ function Node_Path_Smooth(_x, _y, _group = noone) : Node(_x, _y, _group) constru var loop = getInputData(1); if(loop) _dist = safe_mod(_dist, lengthTotal, MOD_NEG.wrap); - var ansize = ds_list_size(inputs) - input_fix_len; + var ansize = array_length(inputs) - input_fix_len; if(ansize == 0) return out; for(var i = 0; i < ansize; i++) { @@ -250,7 +250,7 @@ function Node_Path_Smooth(_x, _y, _group = noone) : Node(_x, _y, _group) constru var smot = getInputData(2); var _a = []; - for(var i = input_fix_len; i < ds_list_size(inputs); i++) { + for(var i = input_fix_len; i < array_length(inputs); i++) { var _anc = array_clone(getInputData(i)); if(rond) { diff --git a/scripts/node_path_transform/node_path_transform.gml b/scripts/node_path_transform/node_path_transform.gml index d24b88c49..066c6ee54 100644 --- a/scripts/node_path_transform/node_path_transform.gml +++ b/scripts/node_path_transform/node_path_transform.gml @@ -2,18 +2,18 @@ function Node_Path_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) cons name = "Transform Path"; setDimension(96, 48); - inputs[| 0] = nodeValue_PathNode("Path", self, noone) + inputs[0] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]); + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]); - inputs[| 2] = nodeValue_Rotation("Rotation", self, 0); + inputs[2] = nodeValue_Rotation("Rotation", self, 0); - inputs[| 3] = nodeValue_Vector("Scale", self, [ 1, 1 ]); + inputs[3] = nodeValue_Vector("Scale", self, [ 1, 1 ]); - inputs[| 4] = nodeValue_Vector("Anchor", self, [ 0, 0 ]); + inputs[4] = nodeValue_Vector("Anchor", self, [ 0, 0 ]); - outputs[| 0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); + outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); cached_pos = ds_map_create(); @@ -25,11 +25,11 @@ function Node_Path_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) cons // if(pth) pth.drawOverlay(-1, false, _x, _y, _s, _mx, _my, _snx, _sny); - active &= !inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); - active &= !inputs[| 2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); + active &= !inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + active &= !inputs[2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); - inputs[| 4].overlay_draw_text = false; - active &= !inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, 1); + inputs[4].overlay_draw_text = false; + active &= !inputs[4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, 1); } static getLineCount = function() { var _path = getInputData(0); return struct_has(_path, "getLineCount")? _path.getLineCount() : 1; } @@ -132,7 +132,7 @@ function Node_Path_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) cons static update = function() { ds_map_clear(cached_pos); - outputs[| 0].setValue(self); + outputs[0].setValue(self); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_path_trim/node_path_trim.gml b/scripts/node_path_trim/node_path_trim.gml index 2b30a593e..d5204e9ab 100644 --- a/scripts/node_path_trim/node_path_trim.gml +++ b/scripts/node_path_trim/node_path_trim.gml @@ -2,12 +2,12 @@ function Node_Path_Trim(_x, _y, _group = noone) : Node(_x, _y, _group) construct name = "Trim Path"; setDimension(96, 48);; - inputs[| 0] = nodeValue_PathNode("Path", self, noone) + inputs[0] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Slider_Range("Range", self, [ 0, 1 ]); + inputs[1] = nodeValue_Slider_Range("Range", self, [ 0, 1 ]); - outputs[| 0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); + outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); cached_pos = ds_map_create(); @@ -85,7 +85,7 @@ function Node_Path_Trim(_x, _y, _group = noone) : Node(_x, _y, _group) construct static update = function() { #region ds_map_clear(cached_pos); - outputs[| 0].setValue(self); + outputs[0].setValue(self); } #endregion static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region diff --git a/scripts/node_path_wave/node_path_wave.gml b/scripts/node_path_wave/node_path_wave.gml index be6952f7e..67fe71097 100644 --- a/scripts/node_path_wave/node_path_wave.gml +++ b/scripts/node_path_wave/node_path_wave.gml @@ -2,29 +2,29 @@ function Node_Path_Wave(_x, _y, _group = noone) : Node(_x, _y, _group) construct name = "Wave Path"; setDimension(96, 48);; - inputs[| 0] = nodeValue_PathNode("Path", self, noone) + inputs[0] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Range("Frequency", self, [ 4, 4 ], { linked : true }); + inputs[1] = nodeValue_Range("Frequency", self, [ 4, 4 ], { linked : true }); - inputs[| 2] = nodeValue_Range("Amplitude", self, [ 4, 4 ], { linked : true }); + inputs[2] = nodeValue_Range("Amplitude", self, [ 4, 4 ], { linked : true }); - inputs[| 3] = nodeValue_Range("Shift", self, [ 0, 0 ], { linked : true }); + inputs[3] = nodeValue_Range("Shift", self, [ 0, 0 ], { linked : true }); - inputs[| 4] = nodeValue_Bool("Smooth", self, false); + inputs[4] = nodeValue_Bool("Smooth", self, false); - inputs[| 5] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[5] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 6] = nodeValue_Bool("Wiggle", self, false); + inputs[6] = nodeValue_Bool("Wiggle", self, false); - inputs[| 7] = nodeValue_Range("Wiggle Amplitude", self, [ -2, 2 ]); + inputs[7] = nodeValue_Range("Wiggle Amplitude", self, [ -2, 2 ]); - inputs[| 8] = nodeValue_Float("Wiggle Frequency", self, 8); + inputs[8] = nodeValue_Float("Wiggle Frequency", self, 8); - inputs[| 9] = nodeValue("Amplitude over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + inputs[9] = nodeValue("Amplitude over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); - outputs[| 0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); + outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); input_display_list = [ 5, ["Path", true], 0, @@ -196,7 +196,7 @@ function Node_Path_Wave(_x, _y, _group = noone) : Node(_x, _y, _group) construct amp_curve = new curveMap(_ampc, 128); - outputs[| 0].setValue(self); + outputs[0].setValue(self); } #endregion static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region diff --git a/scripts/node_pb/node_pb.gml b/scripts/node_pb/node_pb.gml index cf2f8279b..4730832ab 100644 --- a/scripts/node_pb/node_pb.gml +++ b/scripts/node_pb/node_pb.gml @@ -9,10 +9,10 @@ function Node_PB(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr if(drawOverlayPB != noone) drawOverlayPB(active, _x, _y, _s, _mx, _my, _snx, _sny); - for( var i = 0; i < ds_list_size(outputs); i++ ) { - if(outputs[| i].type != VALUE_TYPE.pbBox) continue; + for( var i = 0; i < array_length(outputs); i++ ) { + if(outputs[i].type != VALUE_TYPE.pbBox) continue; - var _box = outputs[| i].getValue(); + var _box = outputs[i].getValue(); if(!is_array(_box)) _box = [ _box ]; for( var j = 0; j < array_length(_box); j++ ) { @@ -27,8 +27,8 @@ function Node_PB(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr static getNextNodes = function() { if(!struct_has(group, "checkComplete")) return []; - for( var i = 0; i < ds_list_size(outputs); i++ ) { - var _ot = outputs[| i]; + for( var i = 0; i < array_length(outputs); i++ ) { + var _ot = outputs[i]; var _tos = _ot.getJunctionTo(); if(array_length(_tos) > 0) @@ -38,5 +38,5 @@ function Node_PB(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr return group.checkComplete(); } - static getPreviewValues = function() { return group.outputs[| 0].getValue(); } + static getPreviewValues = function() { return group.outputs[0].getValue(); } } \ No newline at end of file diff --git a/scripts/node_pb_box/node_pb_box.gml b/scripts/node_pb_box/node_pb_box.gml index 80476c4fc..764e28c3b 100644 --- a/scripts/node_pb_box/node_pb_box.gml +++ b/scripts/node_pb_box/node_pb_box.gml @@ -1,5 +1,5 @@ function Node_PB_Box(_x, _y, _group = noone) : Node_PB(_x, _y, _group) constructor { name = "PB Box"; - inputs[| 0] = nodeValue_Int("Layer Shift", self, 0 ) + inputs[0] = nodeValue_Int("Layer Shift", self, 0 ) } \ No newline at end of file diff --git a/scripts/node_pb_box_contract/node_pb_box_contract.gml b/scripts/node_pb_box_contract/node_pb_box_contract.gml index 53c34c9a0..84286b6d5 100644 --- a/scripts/node_pb_box_contract/node_pb_box_contract.gml +++ b/scripts/node_pb_box_contract/node_pb_box_contract.gml @@ -2,21 +2,21 @@ function Node_PB_Box_Contract(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _gro name = "Split"; batch_output = false; - inputs[| 1] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) + inputs[1] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) .setVisible(true, true); - inputs[| 2] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Ratio", "Fix" ]); + inputs[2] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Ratio", "Fix" ]); - inputs[| 3] = nodeValue_Float("Ratio", self, 0.5 ) + inputs[3] = nodeValue_Float("Ratio", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 4] = nodeValue_Int("Fix Width", self, 8 ) + inputs[4] = nodeValue_Int("Fix Width", self, 8 ) - inputs[| 5] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ]); + inputs[5] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ]); - outputs[| 0] = nodeValue_Output("pBox Center", self, VALUE_TYPE.pbBox, noone ); + outputs[0] = nodeValue_Output("pBox Center", self, VALUE_TYPE.pbBox, noone ); - outputs[| 1] = nodeValue_Output("pBox Side", self, VALUE_TYPE.pbBox, noone ); + outputs[1] = nodeValue_Output("pBox Side", self, VALUE_TYPE.pbBox, noone ); input_display_list = [ 0, 1, ["Split", false], 5, 2, 3, 4, @@ -28,11 +28,11 @@ function Node_PB_Box_Contract(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _gro var _typ = current_data[2]; var _axs = current_data[5]; - inputs[| 3].setVisible(_typ == 0); - inputs[| 4].setVisible(_typ != 0); + inputs[3].setVisible(_typ == 0); + inputs[4].setVisible(_typ != 0); - if(_axs == 0) inputs[| 4].name = "Fix Width"; - else inputs[| 4].name = "Fix Height"; + if(_axs == 0) inputs[4].name = "Fix Width"; + else inputs[4].name = "Fix Height"; } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_pb_box_divide/node_pb_box_divide.gml b/scripts/node_pb_box_divide/node_pb_box_divide.gml index 25553a396..a1b1fbc46 100644 --- a/scripts/node_pb_box_divide/node_pb_box_divide.gml +++ b/scripts/node_pb_box_divide/node_pb_box_divide.gml @@ -2,22 +2,22 @@ function Node_PB_Box_Divide(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group name = "Divide"; batch_output = false; - inputs[| 1] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) + inputs[1] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) .setVisible(true, true); - inputs[| 2] = nodeValue_Int("Amount", self, 2 ); + inputs[2] = nodeValue_Int("Amount", self, 2 ); - inputs[| 3] = nodeValue_Int("Spacing", self, 1 ); + inputs[3] = nodeValue_Int("Spacing", self, 1 ); - inputs[| 4] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ]); + inputs[4] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ]); - inputs[| 5] = nodeValue_Bool("Mirror", self, 0 ) + inputs[5] = nodeValue_Bool("Mirror", self, 0 ) - inputs[| 6] = nodeValue_Enum_Button("Spacing", self, 0 , [ "Space Between", "Space Around", "Begin", "End" ]); + inputs[6] = nodeValue_Enum_Button("Spacing", self, 0 , [ "Space Between", "Space Around", "Begin", "End" ]); - outputs[| 0] = nodeValue_Output("pBox Content", self, VALUE_TYPE.pbBox, [ noone ] ); + outputs[0] = nodeValue_Output("pBox Content", self, VALUE_TYPE.pbBox, [ noone ] ); - outputs[| 1] = nodeValue_Output("pBox Space", self, VALUE_TYPE.pbBox, [ noone ] ); + outputs[1] = nodeValue_Output("pBox Space", self, VALUE_TYPE.pbBox, [ noone ] ); input_display_list = [ 0, 1, ["Divide", false], 4, 2, 3, 6, 5, diff --git a/scripts/node_pb_box_divide_grid/node_pb_box_divide_grid.gml b/scripts/node_pb_box_divide_grid/node_pb_box_divide_grid.gml index 196a6cd8c..7ef655963 100644 --- a/scripts/node_pb_box_divide_grid/node_pb_box_divide_grid.gml +++ b/scripts/node_pb_box_divide_grid/node_pb_box_divide_grid.gml @@ -1,16 +1,16 @@ function Node_PB_Box_Divide_Grid(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group) constructor { name = "Divide Grid"; - inputs[| 1] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) + inputs[1] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) .setVisible(true, true); - inputs[| 2] = nodeValue_Vector("Amount", self, [ 2, 2 ] ); + inputs[2] = nodeValue_Vector("Amount", self, [ 2, 2 ] ); - inputs[| 3] = nodeValue_Int("Spacing", self, 1 ); + inputs[3] = nodeValue_Int("Spacing", self, 1 ); - inputs[| 4] = nodeValue_Bool("Mirror", self, 0 ) + inputs[4] = nodeValue_Bool("Mirror", self, 0 ) - outputs[| 0] = nodeValue_Output("pBox", self, VALUE_TYPE.pbBox, [ noone ] ); + outputs[0] = nodeValue_Output("pBox", self, VALUE_TYPE.pbBox, [ noone ] ); input_display_list = [ 0, 1, ["Divide", false], 2, 3, 4, diff --git a/scripts/node_pb_box_inset/node_pb_box_inset.gml b/scripts/node_pb_box_inset/node_pb_box_inset.gml index 48af97ff8..f203ae7a7 100644 --- a/scripts/node_pb_box_inset/node_pb_box_inset.gml +++ b/scripts/node_pb_box_inset/node_pb_box_inset.gml @@ -2,28 +2,28 @@ function Node_PB_Box_Inset(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group) name = "Inset"; batch_output = false; - inputs[| 1] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) + inputs[1] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) .setVisible(true, true); - inputs[| 2] = nodeValue_Padding("Inset", self, [ 2, 2, 2, 2 ] ); + inputs[2] = nodeValue_Padding("Inset", self, [ 2, 2, 2, 2 ] ); - inputs[| 3] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Padding", "Ratio" ]); + inputs[3] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Padding", "Ratio" ]); - inputs[| 4] = nodeValue_Float("Width", self, 0.5 ) + inputs[4] = nodeValue_Float("Width", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Float("Height", self, 0.5 ) + inputs[5] = nodeValue_Float("Height", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 6] = nodeValue_Float("Horizontal alignment", self, 0.5 ) + inputs[6] = nodeValue_Float("Horizontal alignment", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Float("Vertical alignment", self, 0.5 ) + inputs[7] = nodeValue_Float("Vertical alignment", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); - outputs[| 0] = nodeValue_Output("pBox Inset", self, VALUE_TYPE.pbBox, noone ); + outputs[0] = nodeValue_Output("pBox Inset", self, VALUE_TYPE.pbBox, noone ); - outputs[| 1] = nodeValue_Output("pBox Frame", self, VALUE_TYPE.pbBox, noone ); + outputs[1] = nodeValue_Output("pBox Frame", self, VALUE_TYPE.pbBox, noone ); input_display_list = [ 0, 1, ["Inset", false], 3, 2, 4, 5, 6, 7, @@ -34,11 +34,11 @@ function Node_PB_Box_Inset(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group) var _type = current_data[3]; - inputs[| 2].setVisible(_type == 0); - inputs[| 4].setVisible(_type == 1); - inputs[| 5].setVisible(_type == 1); - inputs[| 6].setVisible(_type == 1); - inputs[| 7].setVisible(_type == 1); + inputs[2].setVisible(_type == 0); + inputs[4].setVisible(_type == 1); + inputs[5].setVisible(_type == 1); + inputs[6].setVisible(_type == 1); + inputs[7].setVisible(_type == 1); } static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -122,7 +122,7 @@ function Node_PB_Box_Inset(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group) } else draw_clear(c_white); - var _msk = outputs[| 0].getValue(); + var _msk = outputs[0].getValue(); if(is_array(_msk)) _msk = array_safe_get_fast(_msk, _array_index); BLEND_SUBTRACT diff --git a/scripts/node_pb_box_mirror/node_pb_box_mirror.gml b/scripts/node_pb_box_mirror/node_pb_box_mirror.gml index de3ca4014..b737d4db7 100644 --- a/scripts/node_pb_box_mirror/node_pb_box_mirror.gml +++ b/scripts/node_pb_box_mirror/node_pb_box_mirror.gml @@ -1,14 +1,14 @@ function Node_PB_Box_Mirror(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group) constructor { name = "Mirror"; - inputs[| 1] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) + inputs[1] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) .setVisible(true, true); - inputs[| 2] = nodeValue_Bool("Horizontal", self, false ); + inputs[2] = nodeValue_Bool("Horizontal", self, false ); - inputs[| 3] = nodeValue_Bool("Vertical", self, false ); + inputs[3] = nodeValue_Bool("Vertical", self, false ); - outputs[| 0] = nodeValue_Output("pBox", self, VALUE_TYPE.pbBox, noone ); + outputs[0] = nodeValue_Output("pBox", self, VALUE_TYPE.pbBox, noone ); input_display_list = [ 0, 1, ["Mirror", false], 2, 3, diff --git a/scripts/node_pb_box_split/node_pb_box_split.gml b/scripts/node_pb_box_split/node_pb_box_split.gml index d418d97d9..aa4272d81 100644 --- a/scripts/node_pb_box_split/node_pb_box_split.gml +++ b/scripts/node_pb_box_split/node_pb_box_split.gml @@ -2,23 +2,23 @@ function Node_PB_Box_Split(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group) name = "Split"; batch_output = false; - inputs[| 1] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) + inputs[1] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) .setVisible(true, true); - inputs[| 2] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Ratio", "Fix Left", "Fix Right" ]); + inputs[2] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Ratio", "Fix Left", "Fix Right" ]); - inputs[| 3] = nodeValue_Float("Ratio", self, 0.5 ) + inputs[3] = nodeValue_Float("Ratio", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 4] = nodeValue_Int("Fix width", self, 8 ) + inputs[4] = nodeValue_Int("Fix width", self, 8 ) - inputs[| 5] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ]); + inputs[5] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ]); - inputs[| 6] = nodeValue_Bool("Mirror", self, 0 ) + inputs[6] = nodeValue_Bool("Mirror", self, 0 ) - outputs[| 0] = nodeValue_Output("pBox Left", self, VALUE_TYPE.pbBox, noone ); + outputs[0] = nodeValue_Output("pBox Left", self, VALUE_TYPE.pbBox, noone ); - outputs[| 1] = nodeValue_Output("pBox Right", self, VALUE_TYPE.pbBox, noone ); + outputs[1] = nodeValue_Output("pBox Right", self, VALUE_TYPE.pbBox, noone ); input_display_list = [ 0, 1, ["Split", false], 5, 2, 3, 4, 6, @@ -30,15 +30,15 @@ function Node_PB_Box_Split(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group) var _typ = current_data[2]; var _axs = current_data[5]; - inputs[| 3].setVisible(_typ == 0); - inputs[| 4].setVisible(_typ != 0); + inputs[3].setVisible(_typ == 0); + inputs[4].setVisible(_typ != 0); if(_axs == 0) { - inputs[| 2].editWidget.data_list = [ "Ratio", "Fix Left", "Fix Right" ]; - inputs[| 4].name = "Fix Width"; + inputs[2].editWidget.data_list = [ "Ratio", "Fix Left", "Fix Right" ]; + inputs[4].name = "Fix Width"; } else { - inputs[| 2].editWidget.data_list = [ "Ratio", "Fix Up", "Fix Down" ]; - inputs[| 4].name = "Fix Height"; + inputs[2].editWidget.data_list = [ "Ratio", "Fix Up", "Fix Down" ]; + inputs[4].name = "Fix Height"; } } diff --git a/scripts/node_pb_box_transform/node_pb_box_transform.gml b/scripts/node_pb_box_transform/node_pb_box_transform.gml index 1091e8c11..53e9f374e 100644 --- a/scripts/node_pb_box_transform/node_pb_box_transform.gml +++ b/scripts/node_pb_box_transform/node_pb_box_transform.gml @@ -1,19 +1,19 @@ function Node_PB_Box_Transform(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group) constructor { name = "Transform"; - inputs[| 1] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) + inputs[1] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) .setVisible(true, true); - inputs[| 2] = nodeValue_Vector("Translate", self, [ 0, 0 ] ); + inputs[2] = nodeValue_Vector("Translate", self, [ 0, 0 ] ); - outputs[| 0] = nodeValue_Output("pBox", self, VALUE_TYPE.pbBox, noone ); + outputs[0] = nodeValue_Output("pBox", self, VALUE_TYPE.pbBox, noone ); input_display_list = [ 0, 1, ["Translate", false], 2, ] static drawOverlayPB = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_pb_draw/node_pb_draw.gml b/scripts/node_pb_draw/node_pb_draw.gml index 80c6ec559..edf243713 100644 --- a/scripts/node_pb_draw/node_pb_draw.gml +++ b/scripts/node_pb_draw/node_pb_draw.gml @@ -1,17 +1,17 @@ function Node_PB_Draw(_x, _y, _group = noone) : Node_PB(_x, _y, _group) constructor { name = "PB Draw"; - inputs[| 0] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) + inputs[0] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) .setVisible(true, true); - inputs[| 1] = nodeValue_Color("Color", self, c_white ); + inputs[1] = nodeValue_Color("Color", self, c_white ); - inputs[| 2] = nodeValue_Bool("Apply Mask", self, true ); + inputs[2] = nodeValue_Bool("Apply Mask", self, true ); - outputs[| 0] = nodeValue_Output("pBox", self, VALUE_TYPE.pbBox, noone); + outputs[0] = nodeValue_Output("pBox", self, VALUE_TYPE.pbBox, noone); static getGraphPreviewSurface = function() { - var _nbox = outputs[| 0].getValue(); + var _nbox = outputs[0].getValue(); if(_nbox == noone) return noone; if(is_array(_nbox)) { if(array_empty(_nbox)) return noone; diff --git a/scripts/node_pb_draw_angle/node_pb_draw_angle.gml b/scripts/node_pb_draw_angle/node_pb_draw_angle.gml index 0f4eadc14..842c3b66c 100644 --- a/scripts/node_pb_draw_angle/node_pb_draw_angle.gml +++ b/scripts/node_pb_draw_angle/node_pb_draw_angle.gml @@ -1,9 +1,9 @@ function Node_PB_Draw_Angle(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group) constructor { name = "Angle"; - inputs[| 3] = nodeValue_Enum_Button("Side", self, 0 , array_create(4, THEME.obj_angle) ); + inputs[3] = nodeValue_Enum_Button("Side", self, 0 , array_create(4, THEME.obj_angle) ); - inputs[| 4] = nodeValue_Bool("Round", self, false ) + inputs[4] = nodeValue_Bool("Round", self, false ) input_display_list = [ ["Draw", false], 0, 1, 2, diff --git a/scripts/node_pb_draw_blob/node_pb_draw_blob.gml b/scripts/node_pb_draw_blob/node_pb_draw_blob.gml index 5cc3cba56..53bcaf76d 100644 --- a/scripts/node_pb_draw_blob/node_pb_draw_blob.gml +++ b/scripts/node_pb_draw_blob/node_pb_draw_blob.gml @@ -1,10 +1,10 @@ function Node_PB_Draw_Blob(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group) constructor { name = "Blob"; - inputs[| 3] = nodeValue_Float("Top", self, 0.5 ) + inputs[3] = nodeValue_Float("Top", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 4] = nodeValue_Float("Bottom", self, 1 ) + inputs[4] = nodeValue_Float("Bottom", self, 1 ) .setDisplay(VALUE_DISPLAY.slider); input_display_list = [ @@ -22,7 +22,7 @@ function Node_PB_Draw_Blob(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group x0 = _x + x0 * _s; y0 = _y + y0 * _s; - //inputs[| 2].drawOverlay(hover, active, x0, y0, _s, _mx, _my, _snx, _sny); + //inputs[2].drawOverlay(hover, active, x0, y0, _s, _mx, _my, _snx, _sny); var x0 = _pbox.x + _pbox.w / 2; var y0 = _pbox.y + _pbox.h; @@ -30,7 +30,7 @@ function Node_PB_Draw_Blob(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group x0 = _x + x0 * _s; y0 = _y + y0 * _s; - //inputs[| 3].drawOverlay(hover, active, x0, y0, _s, _mx, _my, _snx, _sny); + //inputs[3].drawOverlay(hover, active, x0, y0, _s, _mx, _my, _snx, _sny); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_pb_draw_line/node_pb_draw_line.gml b/scripts/node_pb_draw_line/node_pb_draw_line.gml index fb42f7ec4..294355ee6 100644 --- a/scripts/node_pb_draw_line/node_pb_draw_line.gml +++ b/scripts/node_pb_draw_line/node_pb_draw_line.gml @@ -1,9 +1,9 @@ function Node_PB_Draw_Line(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group) constructor { name = "Line"; - inputs[| 3] = nodeValue_Enum_Button("Direction", self, 0 , [ THEME.obj_draw_line, THEME.obj_draw_line, THEME.obj_draw_line, THEME.obj_draw_line ] ); + inputs[3] = nodeValue_Enum_Button("Direction", self, 0 , [ THEME.obj_draw_line, THEME.obj_draw_line, THEME.obj_draw_line, THEME.obj_draw_line ] ); - inputs[| 4] = nodeValue_Int("Thickness", self, 2 ) + inputs[4] = nodeValue_Int("Thickness", self, 2 ) input_display_list = [ ["Draw", false], 0, 1, 2, diff --git a/scripts/node_pb_draw_round_rectangle/node_pb_draw_round_rectangle.gml b/scripts/node_pb_draw_round_rectangle/node_pb_draw_round_rectangle.gml index 4a5460d24..69f577c32 100644 --- a/scripts/node_pb_draw_round_rectangle/node_pb_draw_round_rectangle.gml +++ b/scripts/node_pb_draw_round_rectangle/node_pb_draw_round_rectangle.gml @@ -1,16 +1,16 @@ function Node_PB_Draw_Round_Rectangle(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group) constructor { name = "Round Rectangle"; - inputs[| 3] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Uniform", "Per Corner" ]); + inputs[3] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Uniform", "Per Corner" ]); - inputs[| 4] = nodeValue_Int("Corner Radius", self, 1 ); + inputs[4] = nodeValue_Int("Corner Radius", self, 1 ); - inputs[| 5] = nodeValue_Corner("Corner Radius", self, [ 1, 1, 1, 1 ] ) + inputs[5] = nodeValue_Corner("Corner Radius", self, [ 1, 1, 1, 1 ] ) .setArrayDepth(1); - inputs[| 6] = nodeValue_Bool("Relative", self, false ); + inputs[6] = nodeValue_Bool("Relative", self, false ); - inputs[| 7] = nodeValue_Bool("Cut Corner", self, false ); + inputs[7] = nodeValue_Bool("Cut Corner", self, false ); input_display_list = [ ["Draw", false], 0, 1, 2, @@ -38,15 +38,15 @@ function Node_PB_Draw_Round_Rectangle(_x, _y, _group = noone) : Node_PB_Draw(_x, var _type = getInputData(3); var _rela = getInputData(6); - inputs[| 4].setVisible(_type == 0); - inputs[| 5].setVisible(_type == 1); + inputs[4].setVisible(_type == 0); + inputs[5].setVisible(_type == 1); if(_rela) { - inputs[| 4].setType(VALUE_TYPE.float); - inputs[| 5].setType(VALUE_TYPE.float); + inputs[4].setType(VALUE_TYPE.float); + inputs[5].setType(VALUE_TYPE.float); } else { - inputs[| 4].setType(VALUE_TYPE.integer); - inputs[| 5].setType(VALUE_TYPE.integer); + inputs[4].setType(VALUE_TYPE.integer); + inputs[5].setType(VALUE_TYPE.integer); } } diff --git a/scripts/node_pb_draw_semi_ellipse/node_pb_draw_semi_ellipse.gml b/scripts/node_pb_draw_semi_ellipse/node_pb_draw_semi_ellipse.gml index 1e2337cca..148351ca7 100644 --- a/scripts/node_pb_draw_semi_ellipse/node_pb_draw_semi_ellipse.gml +++ b/scripts/node_pb_draw_semi_ellipse/node_pb_draw_semi_ellipse.gml @@ -1,7 +1,7 @@ function Node_PB_Draw_Semi_Ellipse(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group) constructor { name = "Semi Ellipse"; - inputs[| 3] = nodeValue_Enum_Button("Side", self, 0 , array_create(4, THEME.obj_hemicircle) ); + inputs[3] = nodeValue_Enum_Button("Side", self, 0 , array_create(4, THEME.obj_hemicircle) ); input_display_list = [ ["Draw", false], 0, 1, 2, diff --git a/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml b/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml index 12e095fe7..ea121c0cc 100644 --- a/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml +++ b/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml @@ -1,21 +1,21 @@ function Node_PB_Draw_Trapezoid(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group) constructor { name = "Trapezoid"; - inputs[| 3] = nodeValue_Enum_Scroll("Axis", self, 0 , [ new scrollItem("Horizontal", s_node_alignment, 0), + inputs[3] = nodeValue_Enum_Scroll("Axis", self, 0 , [ new scrollItem("Horizontal", s_node_alignment, 0), new scrollItem("Vertical", s_node_alignment, 1), ]); - inputs[| 4] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Symmetric", "Independent" ]); + inputs[4] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Symmetric", "Independent" ]); - inputs[| 5] = nodeValue_Float("Bevel", self, 0.5 ) + inputs[5] = nodeValue_Float("Bevel", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 6] = nodeValue_Float("Bevel 1", self, 0.5 ) + inputs[6] = nodeValue_Float("Bevel 1", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Float("Bevel 2", self, 0.5 ) + inputs[7] = nodeValue_Float("Bevel 2", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 8] = nodeValue_Bool("Invert", self, false ); + inputs[8] = nodeValue_Bool("Invert", self, false ); input_display_list = [ ["Draw", false], 0, 1, 2, @@ -27,9 +27,9 @@ function Node_PB_Draw_Trapezoid(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _ var _type = current_data[4]; - inputs[| 5].setVisible(_type == 0); - inputs[| 6].setVisible(_type == 1); - inputs[| 7].setVisible(_type == 1); + inputs[5].setVisible(_type == 0); + inputs[6].setVisible(_type == 1); + inputs[7].setVisible(_type == 1); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_pb_fx/node_pb_fx.gml b/scripts/node_pb_fx/node_pb_fx.gml index acb1c4c8d..86f12d13b 100644 --- a/scripts/node_pb_fx/node_pb_fx.gml +++ b/scripts/node_pb_fx/node_pb_fx.gml @@ -2,13 +2,13 @@ function Node_PB_Fx(_x, _y, _group = noone) : Node_PB(_x, _y, _group) constructo name = "PB FX"; batch_output = false; - inputs[| 0] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone) + inputs[0] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("pBox", self, VALUE_TYPE.pbBox, noone); + outputs[0] = nodeValue_Output("pBox", self, VALUE_TYPE.pbBox, noone); static getGraphPreviewSurface = function() { - var _nbox = outputs[| 0].getValue(); + var _nbox = outputs[0].getValue(); if(_nbox == noone) return noone; if(is_array(_nbox)) { if(array_empty(_nbox)) return noone; @@ -20,7 +20,7 @@ function Node_PB_Fx(_x, _y, _group = noone) : Node_PB(_x, _y, _group) constructo } #macro PB_FX_PBOX if(_output_index == 1) { \ - var _surf = outputs[| 0].getValue(); \ + var _surf = outputs[0].getValue(); \ if(is_array(_surf)) _surf = array_safe_get_fast(_surf, _array_index); \ if(!is_surface(_surf)) return noone; \ \ diff --git a/scripts/node_pb_fx_add/node_pb_fx_add.gml b/scripts/node_pb_fx_add/node_pb_fx_add.gml index e7206fa02..4eedee7c7 100644 --- a/scripts/node_pb_fx_add/node_pb_fx_add.gml +++ b/scripts/node_pb_fx_add/node_pb_fx_add.gml @@ -1,7 +1,7 @@ function Node_PB_Fx_Add(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { name = "Add"; - inputs[| 1] = nodeValue("pbox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) + inputs[1] = nodeValue("pbox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) .setVisible(true, true); input_display_list = [ 0, diff --git a/scripts/node_pb_fx_brick/node_pb_fx_brick.gml b/scripts/node_pb_fx_brick/node_pb_fx_brick.gml index 21ab7c1bb..e055aa29c 100644 --- a/scripts/node_pb_fx_brick/node_pb_fx_brick.gml +++ b/scripts/node_pb_fx_brick/node_pb_fx_brick.gml @@ -1,20 +1,20 @@ function Node_PB_Fx_Brick(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { name = "Brick"; - inputs[| 1] = nodeValue_Vector("Scale", self, [ 4, 1 ] ); + inputs[1] = nodeValue_Vector("Scale", self, [ 4, 1 ] ); - inputs[| 2] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ] ); + inputs[2] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ] ); - inputs[| 3] = nodeValue_Int("Shift", self, 0); + inputs[3] = nodeValue_Int("Shift", self, 0); - inputs[| 4] = nodeValue_Color("Color", self, c_white ); + inputs[4] = nodeValue_Color("Color", self, c_white ); - inputs[| 5] = nodeValue_Float("Dissolve", self, 0. ) + inputs[5] = nodeValue_Float("Dissolve", self, 0. ) .setDisplay(VALUE_DISPLAY.slider) - inputs[| 6] = nodeValue_Int("Detail", self, 1 ) + inputs[6] = nodeValue_Int("Detail", self, 1 ) - inputs[| 7] = nodeValue_Vector("Dissolve Scale", self, [ 4, 4 ] ); + inputs[7] = nodeValue_Vector("Dissolve Scale", self, [ 4, 4 ] ); input_display_list = [ 0, ["Effect", false], 1, 2, 3, 4, diff --git a/scripts/node_pb_fx_hash/node_pb_fx_hash.gml b/scripts/node_pb_fx_hash/node_pb_fx_hash.gml index ba9afb95a..9c28a7f56 100644 --- a/scripts/node_pb_fx_hash/node_pb_fx_hash.gml +++ b/scripts/node_pb_fx_hash/node_pb_fx_hash.gml @@ -1,18 +1,18 @@ function Node_PB_Fx_Hash(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { name = "Hash"; - inputs[| 1] = nodeValue_Color("Color", self, c_white ); + inputs[1] = nodeValue_Color("Color", self, c_white ); - inputs[| 2] = nodeValue_Float("Hash", self, 2. ); + inputs[2] = nodeValue_Float("Hash", self, 2. ); - inputs[| 3] = nodeValue_Bool("Invert", self, false ); + inputs[3] = nodeValue_Bool("Invert", self, false ); - inputs[| 4] = nodeValue_Float("Dissolve", self, 0. ) + inputs[4] = nodeValue_Float("Dissolve", self, 0. ) .setDisplay(VALUE_DISPLAY.slider) - inputs[| 5] = nodeValue_Int("Detail", self, 1 ) + inputs[5] = nodeValue_Int("Detail", self, 1 ) - inputs[| 6] = nodeValue_Vector("Dissolve Scale", self, [ 4, 4 ] ); + inputs[6] = nodeValue_Vector("Dissolve Scale", self, [ 4, 4 ] ); input_display_list = [ 0, ["Effect", false], 2, 1, 3, diff --git a/scripts/node_pb_fx_highlight/node_pb_fx_highlight.gml b/scripts/node_pb_fx_highlight/node_pb_fx_highlight.gml index 6870423e1..b3d9178e9 100644 --- a/scripts/node_pb_fx_highlight/node_pb_fx_highlight.gml +++ b/scripts/node_pb_fx_highlight/node_pb_fx_highlight.gml @@ -1,20 +1,20 @@ function Node_PB_Fx_Highlight(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { name = "Highlight"; - inputs[| 1] = nodeValue_Int("Highlight Area", self, array_create(9) ) + inputs[1] = nodeValue_Int("Highlight Area", self, array_create(9) ) .setDisplay(VALUE_DISPLAY.matrix, { size: 3 }); - inputs[| 2] = nodeValue_Color("Light Color", self, c_white ); + inputs[2] = nodeValue_Color("Light Color", self, c_white ); - inputs[| 3] = nodeValue_Color("Shadow Color", self, c_black ); + inputs[3] = nodeValue_Color("Shadow Color", self, c_black ); - inputs[| 4] = nodeValue_Float("Roughness", self, 0 ) + inputs[4] = nodeValue_Float("Roughness", self, 0 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Float("Roughness Scale", self, 1 ); + inputs[5] = nodeValue_Float("Roughness Scale", self, 1 ); - inputs[| 6] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 6].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[6] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[6].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); holding_side = noone; @@ -46,7 +46,7 @@ function Node_PB_Fx_Highlight(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _grou if(holding_side != noone) { _side[ind] = holding_side; - inputs[| 1].setValue(_side); + inputs[1].setValue(_side); } } @@ -55,7 +55,7 @@ function Node_PB_Fx_Highlight(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _grou _side[ind] = !_side[ind]; else _side[ind] = (_side[ind] + 2) % 3 - 1; - inputs[| 1].setValue(_side); + inputs[1].setValue(_side); holding_side = _side[ind]; } diff --git a/scripts/node_pb_fx_intersect/node_pb_fx_intersect.gml b/scripts/node_pb_fx_intersect/node_pb_fx_intersect.gml index 041af3e4a..6f64c1bf4 100644 --- a/scripts/node_pb_fx_intersect/node_pb_fx_intersect.gml +++ b/scripts/node_pb_fx_intersect/node_pb_fx_intersect.gml @@ -1,7 +1,7 @@ function Node_PB_Fx_Intersect(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { name = "Subtract"; - inputs[| 1] = nodeValue_Surface("Surface", self) + inputs[1] = nodeValue_Surface("Surface", self) .setVisible(true, true); input_display_list = [ 0, diff --git a/scripts/node_pb_fx_outline/node_pb_fx_outline.gml b/scripts/node_pb_fx_outline/node_pb_fx_outline.gml index 3a241850e..7203e49c8 100644 --- a/scripts/node_pb_fx_outline/node_pb_fx_outline.gml +++ b/scripts/node_pb_fx_outline/node_pb_fx_outline.gml @@ -1,11 +1,11 @@ function Node_PB_Fx_Outline(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { name = "Outline"; - inputs[| 1] = nodeValue_Bool("Corner", self, false ); + inputs[1] = nodeValue_Bool("Corner", self, false ); - inputs[| 2] = nodeValue_Color("Color", self, c_white ); + inputs[2] = nodeValue_Color("Color", self, c_white ); - inputs[| 3] = nodeValue_Enum_Button("Side", self, 0, [ "Inside", "Outside" ]); + inputs[3] = nodeValue_Enum_Button("Side", self, 0, [ "Inside", "Outside" ]); input_display_list = [ 0, ["Effect", false], 3, 1, 2, diff --git a/scripts/node_pb_fx_radial/node_pb_fx_radial.gml b/scripts/node_pb_fx_radial/node_pb_fx_radial.gml index c6722dacf..c1b807820 100644 --- a/scripts/node_pb_fx_radial/node_pb_fx_radial.gml +++ b/scripts/node_pb_fx_radial/node_pb_fx_radial.gml @@ -1,7 +1,7 @@ function Node_PB_Fx_Radial(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { name = "Radial"; - inputs[| 1] = nodeValue_Int("Amount", self, 4 ) + inputs[1] = nodeValue_Int("Amount", self, 4 ) .setVisible(true, true); input_display_list = [ 0, diff --git a/scripts/node_pb_fx_shading/node_pb_fx_shading.gml b/scripts/node_pb_fx_shading/node_pb_fx_shading.gml index d34f54c90..d9a66bcee 100644 --- a/scripts/node_pb_fx_shading/node_pb_fx_shading.gml +++ b/scripts/node_pb_fx_shading/node_pb_fx_shading.gml @@ -1,9 +1,9 @@ function Node_PB_Fx_Shading(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { name = "Shading"; - inputs[| 1] = nodeValue_Padding("Width", self, [ 1, 1, 1, 1 ] ); + inputs[1] = nodeValue_Padding("Width", self, [ 1, 1, 1, 1 ] ); - inputs[| 2] = nodeValue_Color("Color", self, c_white ); + inputs[2] = nodeValue_Color("Color", self, c_white ); input_display_list = [ 0, ["Effect", false], 1, 2, diff --git a/scripts/node_pb_fx_stack/node_pb_fx_stack.gml b/scripts/node_pb_fx_stack/node_pb_fx_stack.gml index 56683bd51..95b91538a 100644 --- a/scripts/node_pb_fx_stack/node_pb_fx_stack.gml +++ b/scripts/node_pb_fx_stack/node_pb_fx_stack.gml @@ -1,17 +1,17 @@ function Node_PB_Fx_Stack(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { name = "Stack"; - inputs[| 1] = nodeValue_Int("Amount", self, 4 ); + inputs[1] = nodeValue_Int("Amount", self, 4 ); - inputs[| 2] = nodeValue_Enum_Button("Direction", self, 0 , array_create(4, THEME.obj_direction) ); + inputs[2] = nodeValue_Enum_Button("Direction", self, 0 , array_create(4, THEME.obj_direction) ); - inputs[| 3] = nodeValue_Color("Color", self, c_white ); + inputs[3] = nodeValue_Color("Color", self, c_white ); - inputs[| 4] = nodeValue_Bool("Highlight", self, false ); + inputs[4] = nodeValue_Bool("Highlight", self, false ); - inputs[| 5] = nodeValue_Color("Highlight Color", self, c_white ); + inputs[5] = nodeValue_Color("Highlight Color", self, c_white ); - inputs[| 6] = nodeValue_Bool("Invert", self, false ); + inputs[6] = nodeValue_Bool("Invert", self, false ); input_display_list = [ 0, ["Effect", false], 1, 2, 6, 3, 4, 5, @@ -22,7 +22,7 @@ function Node_PB_Fx_Stack(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) c var _high = current_data[4]; - inputs[| 5].setVisible(_high); + inputs[5].setVisible(_high); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_pb_fx_strip/node_pb_fx_strip.gml b/scripts/node_pb_fx_strip/node_pb_fx_strip.gml index a1ddd2d0e..45eb06e61 100644 --- a/scripts/node_pb_fx_strip/node_pb_fx_strip.gml +++ b/scripts/node_pb_fx_strip/node_pb_fx_strip.gml @@ -1,13 +1,13 @@ function Node_PB_Fx_Strip(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { name = "Strip"; - inputs[| 1] = nodeValue_Int("Scale", self, 1 ); + inputs[1] = nodeValue_Int("Scale", self, 1 ); - inputs[| 2] = nodeValue_Color("Color", self, c_white ); + inputs[2] = nodeValue_Color("Color", self, c_white ); - inputs[| 3] = nodeValue_Int("Shift", self, 0 ); + inputs[3] = nodeValue_Int("Shift", self, 0 ); - inputs[| 4] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ]); + inputs[4] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ]); input_display_list = [ 0, ["Effect", false], 1, 4, 2, 3, diff --git a/scripts/node_pb_fx_subtract/node_pb_fx_subtract.gml b/scripts/node_pb_fx_subtract/node_pb_fx_subtract.gml index 0c30755f7..cc86502fe 100644 --- a/scripts/node_pb_fx_subtract/node_pb_fx_subtract.gml +++ b/scripts/node_pb_fx_subtract/node_pb_fx_subtract.gml @@ -1,7 +1,7 @@ function Node_PB_Fx_Subtract(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { name = "Subtract"; - inputs[| 1] = nodeValue_Surface("Surface", self) + inputs[1] = nodeValue_Surface("Surface", self) .setVisible(true, true); input_display_list = [ 0, diff --git a/scripts/node_pb_layer/node_pb_layer.gml b/scripts/node_pb_layer/node_pb_layer.gml index c81f3000b..4aa0d13e7 100644 --- a/scripts/node_pb_layer/node_pb_layer.gml +++ b/scripts/node_pb_layer/node_pb_layer.gml @@ -2,9 +2,9 @@ function Node_PB_Layer(_x, _y, _group = noone) : Node(_x, _y, _group) constructo name = "PB Layer"; icon = THEME.pixel_builder; - inputs[| 0] = nodeValue_Int("Layer", self, 0 ); + inputs[0] = nodeValue_Int("Layer", self, 0 ); - outputs[| 0] = nodeValue_Output("pBox", self, VALUE_TYPE.pbBox, noone ); + outputs[0] = nodeValue_Output("pBox", self, VALUE_TYPE.pbBox, noone ); static update = function() { var _dim = group.getInputData(0); @@ -16,10 +16,10 @@ function Node_PB_Layer(_x, _y, _group = noone) : Node(_x, _y, _group) constructo _box.layer_w = array_safe_get_fast(_dim, 0, 1); _box.layer_h = array_safe_get_fast(_dim, 1, 1); - outputs[| 0].setValue(_box); + outputs[0].setValue(_box); } - static getPreviewValues = function() { return group.outputs[| 0].getValue(); } + static getPreviewValues = function() { return group.outputs[0].getValue(); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s) diff --git a/scripts/node_perlin/node_perlin.gml b/scripts/node_perlin/node_perlin.gml index 0b9cf1629..2eb434a4e 100644 --- a/scripts/node_perlin/node_perlin.gml +++ b/scripts/node_perlin/node_perlin.gml @@ -1,36 +1,36 @@ function Node_Perlin(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Perlin Noise"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 5, 5 ]) + inputs[2] = nodeValue_Vector("Scale", self, [ 5, 5 ]) .setMappable(10); - inputs[| 3] = nodeValue_Int("Iteration", self, 4); + inputs[3] = nodeValue_Int("Iteration", self, 4); - inputs[| 4] = nodeValue_Bool("Tile", self, true); + inputs[4] = nodeValue_Bool("Tile", self, true); - inputs[| 5] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[5] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 6] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); + inputs[6] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); - inputs[| 7] = nodeValue_Slider_Range("Color R range", self, [ 0, 1 ]); + inputs[7] = nodeValue_Slider_Range("Color R range", self, [ 0, 1 ]); - inputs[| 8] = nodeValue_Slider_Range("Color G range", self, [ 0, 1 ]); + inputs[8] = nodeValue_Slider_Range("Color G range", self, [ 0, 1 ]); - inputs[| 9] = nodeValue_Slider_Range("Color B range", self, [ 0, 1 ]); + inputs[9] = nodeValue_Slider_Range("Color B range", self, [ 0, 1 ]); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 10] = nodeValueMap("Scale map", self); + inputs[10] = nodeValueMap("Scale map", self); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValue_Rotation("Rotation", self, 0); + inputs[11] = nodeValue_Rotation("Rotation", self, 0); input_display_list = [ ["Output", true], 0, 5, @@ -38,13 +38,13 @@ function Node_Perlin(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co ["Render", false], 6, 7, 8, 9, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } @@ -52,15 +52,15 @@ function Node_Perlin(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co static step = function() { var _col = getInputData(6); - inputs[| 7].setVisible(_col != 0); - inputs[| 8].setVisible(_col != 0); - inputs[| 9].setVisible(_col != 0); + inputs[7].setVisible(_col != 0); + inputs[8].setVisible(_col != 0); + inputs[9].setVisible(_col != 0); - inputs[| 7].name = _col == 1? "Color R range" : "Color H range"; - inputs[| 8].name = _col == 1? "Color G range" : "Color S range"; - inputs[| 9].name = _col == 1? "Color B range" : "Color V range"; + inputs[7].name = _col == 1? "Color R range" : "Color H range"; + inputs[8].name = _col == 1? "Color G range" : "Color S range"; + inputs[9].name = _col == 1? "Color B range" : "Color V range"; - inputs[| 2].mappableStep(); + inputs[2].mappableStep(); } static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -82,7 +82,7 @@ function Node_Perlin(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co shader_set_f("u_resolution", _dim); shader_set_2("position", _pos); shader_set_f("rotation", degtorad(_rot)); - shader_set_f_map("scale", _data[2], _data[10], inputs[| 2]); + shader_set_f_map("scale", _data[2], _data[10], inputs[2]); shader_set_f("seed", _sed); shader_set_i("tile", _til); shader_set_i("iteration", _ite); diff --git a/scripts/node_perlin_extra/node_perlin_extra.gml b/scripts/node_perlin_extra/node_perlin_extra.gml index 7d757db33..8fb8eb27f 100644 --- a/scripts/node_perlin_extra/node_perlin_extra.gml +++ b/scripts/node_perlin_extra/node_perlin_extra.gml @@ -2,59 +2,59 @@ function Node_Perlin_Extra(_x, _y, _group = noone) : Node_Shader_Generator(_x, _ name = "Extra Perlins"; shader = sh_perlin_extra; - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 4, 4 ]) + inputs[2] = nodeValue_Vector("Scale", self, [ 4, 4 ]) .setMappable(13); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[| 3] = nodeValue_Int("Iteration", self, 2); + inputs[3] = nodeValue_Int("Iteration", self, 2); addShaderProp(SHADER_UNIFORM.integer, "iteration"); - inputs[| 4] = nodeValue_Bool("Tile", self, true, "Tiling only works with integer scale, and some effect type doesn't support tiling."); + inputs[4] = nodeValue_Bool("Tile", self, true, "Tiling only works with integer scale, and some effect type doesn't support tiling."); addShaderProp(SHADER_UNIFORM.integer, "tile"); - inputs[| 5] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[5] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); addShaderProp(SHADER_UNIFORM.float, "seed"); - inputs[| 6] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); + inputs[6] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); addShaderProp(SHADER_UNIFORM.integer, "colored"); - inputs[| 7] = nodeValue_Slider_Range("Color R range", self, [ 0, 1 ]); + inputs[7] = nodeValue_Slider_Range("Color R range", self, [ 0, 1 ]); addShaderProp(SHADER_UNIFORM.float, "colorRanR"); - inputs[| 8] = nodeValue_Slider_Range("Color G range", self, [ 0, 1 ]); + inputs[8] = nodeValue_Slider_Range("Color G range", self, [ 0, 1 ]); addShaderProp(SHADER_UNIFORM.float, "colorRanG"); - inputs[| 9] = nodeValue_Slider_Range("Color B range", self, [ 0, 1 ]); + inputs[9] = nodeValue_Slider_Range("Color B range", self, [ 0, 1 ]); addShaderProp(SHADER_UNIFORM.float, "colorRanB"); - inputs[| 10] = nodeValue_Enum_Scroll("Noise type", self, 0, [ "Absolute worley", "Fluid", "Noisy", "Camo", "Blocky", "Max", "Vine" ]); + inputs[10] = nodeValue_Enum_Scroll("Noise type", self, 0, [ "Absolute worley", "Fluid", "Noisy", "Camo", "Blocky", "Max", "Vine" ]); addShaderProp(SHADER_UNIFORM.integer, "type"); - inputs[| 11] = nodeValue_Float("Parameter A", self, 0) + inputs[11] = nodeValue_Float("Parameter A", self, 0) .setDisplay(VALUE_DISPLAY.slider) .setMappable(14); addShaderProp(SHADER_UNIFORM.float, "paramA"); - inputs[| 12] = nodeValue_Float("Parameter B", self, 1) + inputs[12] = nodeValue_Float("Parameter B", self, 1) .setMappable(15); addShaderProp(SHADER_UNIFORM.float, "paramB"); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 13] = nodeValueMap("Scale map", self); addShaderProp(); + inputs[13] = nodeValueMap("Scale map", self); addShaderProp(); - inputs[| 14] = nodeValueMap("Parameter A map", self); addShaderProp(); + inputs[14] = nodeValueMap("Parameter A map", self); addShaderProp(); - inputs[| 15] = nodeValueMap("Parameter B map", self); addShaderProp(); + inputs[15] = nodeValueMap("Parameter B map", self); addShaderProp(); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 16] = nodeValue_Rotation("Rotation", self, 0); + inputs[16] = nodeValue_Rotation("Rotation", self, 0); addShaderProp(SHADER_UNIFORM.float, "rotation"); input_display_list = [ @@ -65,7 +65,7 @@ function Node_Perlin_Extra(_x, _y, _group = noone) : Node_Shader_Generator(_x, _ static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } @@ -74,19 +74,19 @@ function Node_Perlin_Extra(_x, _y, _group = noone) : Node_Shader_Generator(_x, _ var _col = getInputData(6); var _typ = getInputData(10); - inputs[| 7].setVisible(_col != 0); - inputs[| 8].setVisible(_col != 0); - inputs[| 9].setVisible(_col != 0); + inputs[7].setVisible(_col != 0); + inputs[8].setVisible(_col != 0); + inputs[9].setVisible(_col != 0); - inputs[| 7].name = _col == 1? "Color R range" : "Color H range"; - inputs[| 8].name = _col == 1? "Color G range" : "Color S range"; - inputs[| 9].name = _col == 1? "Color B range" : "Color V range"; + inputs[7].name = _col == 1? "Color R range" : "Color H range"; + inputs[8].name = _col == 1? "Color G range" : "Color S range"; + inputs[9].name = _col == 1? "Color B range" : "Color V range"; - inputs[| 11].setVisible(_typ > 0); - inputs[| 12].setVisible(false); + inputs[11].setVisible(_typ > 0); + inputs[12].setVisible(false); - inputs[| 2].mappableStep(); - inputs[| 11].mappableStep(); - inputs[| 12].mappableStep(); + inputs[ 2].mappableStep(); + inputs[11].mappableStep(); + inputs[12].mappableStep(); } #endregion } \ No newline at end of file diff --git a/scripts/node_perlin_smear/node_perlin_smear.gml b/scripts/node_perlin_smear/node_perlin_smear.gml index d94b9733e..c4ff62ca5 100644 --- a/scripts/node_perlin_smear/node_perlin_smear.gml +++ b/scripts/node_perlin_smear/node_perlin_smear.gml @@ -1,21 +1,21 @@ function Node_Perlin_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Smear noise"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 4, 6 ]); + inputs[2] = nodeValue_Vector("Scale", self, [ 4, 6 ]); - inputs[| 3] = nodeValue_Int("Iteration", self, 3); + inputs[3] = nodeValue_Int("Iteration", self, 3); - inputs[| 4] = nodeValue_Float("Brightness", self, 0.5) + inputs[4] = nodeValue_Float("Brightness", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Rotation("Rotation", self, 0); + inputs[5] = nodeValue_Rotation("Rotation", self, 0); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Output", false], 0, @@ -26,7 +26,7 @@ function Node_Perlin_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } diff --git a/scripts/node_pin/node_pin.gml b/scripts/node_pin/node_pin.gml index c3baa29d6..42a3a2635 100644 --- a/scripts/node_pin/node_pin.gml +++ b/scripts/node_pin/node_pin.gml @@ -13,23 +13,23 @@ function Node_Pin(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { bg_spr_add = 0; - inputs[| 0] = nodeValue("In", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0 ) + inputs[0] = nodeValue("In", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0 ) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Out", self, VALUE_TYPE.any, 0); + outputs[0] = nodeValue_Output("Out", self, VALUE_TYPE.any, 0); static update = function() { - if(inputs[| 0].value_from != noone) { + if(inputs[0].value_from != noone) { - inputs[| 0].setType(inputs[| 0].value_from.type); - outputs[| 0].setType(inputs[| 0].value_from.type); + inputs[0].setType(inputs[0].value_from.type); + outputs[0].setType(inputs[0].value_from.type); - inputs[| 0].color_display = inputs[| 0].value_from.color_display; - outputs[| 0].color_display = inputs[| 0].color_display; + inputs[0].color_display = inputs[0].value_from.color_display; + outputs[0].color_display = inputs[0].color_display; } var _val = getInputData(0); - outputs[| 0].setValue(_val); + outputs[0].setValue(_val); } static pointIn = function(_x, _y, _mx, _my, _s) { @@ -43,11 +43,11 @@ function Node_Pin(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var xx = x * _s + _x; var yy = y * _s + _y; - inputs[| 0].x = xx; - inputs[| 0].y = yy; + inputs[0].x = xx; + inputs[0].y = yy; - outputs[| 0].x = xx; - outputs[| 0].y = yy; + outputs[0].x = xx; + outputs[0].y = yy; } static drawBadge = function(_x, _y, _s) {} @@ -55,7 +55,7 @@ function Node_Pin(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static drawJunctions = function(_x, _y, _mx, _my, _s) { var _dval = PANEL_GRAPH.value_dragging; - var hover = _dval == noone || _dval.connect_type == JUNCTION_CONNECT.input? outputs[| 0] : inputs[| 0]; + var hover = _dval == noone || _dval.connect_type == JUNCTION_CONNECT.input? outputs[0] : inputs[0]; var xx = x * _s + _x; var yy = y * _s + _y; diff --git a/scripts/node_pixel_builder/node_pixel_builder.gml b/scripts/node_pixel_builder/node_pixel_builder.gml index b8e8b38b4..c6eb5c38b 100644 --- a/scripts/node_pixel_builder/node_pixel_builder.gml +++ b/scripts/node_pixel_builder/node_pixel_builder.gml @@ -5,12 +5,12 @@ function Node_Pixel_Builder(_x, _y, _group = noone) : Node_Collection(_x, _y, _g reset_all_child = true; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - outputs[| 0] = nodeValue_Output("Surface Out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface Out", self, VALUE_TYPE.surface, noone); - custom_input_index = ds_list_size(inputs); - custom_output_index = ds_list_size(outputs); + custom_input_index = array_length(inputs); + custom_output_index = array_length(outputs); if(NODE_NEW_MANUAL) { var input = nodeBuild("Node_PB_Layer", -256, -32, self); @@ -19,8 +19,8 @@ function Node_Pixel_Builder(_x, _y, _group = noone) : Node_Collection(_x, _y, _g static getNextNodes = function() { #region var allReady = true; - for(var i = custom_input_index; i < ds_list_size(inputs); i++) { - var _in = inputs[| i].from; + for(var i = custom_input_index; i < array_length(inputs); i++) { + var _in = inputs[i].from; if(!_in.isRenderActive()) continue; allReady &= _in.isRenderable() @@ -38,7 +38,7 @@ function Node_Pixel_Builder(_x, _y, _group = noone) : Node_Collection(_x, _y, _g buildPixel(); var _nodes = []; - var _tos = outputs[| 0].getJunctionTo(); + var _tos = outputs[0].getJunctionTo(); for( var j = 0; j < array_length(_tos); j++ ) { var _to = _tos[j]; @@ -58,14 +58,14 @@ function Node_Pixel_Builder(_x, _y, _group = noone) : Node_Collection(_x, _y, _g for( var i = 0; i < array_length(nodes); i++ ) { var _n = nodes[i]; - for( var j = 0; j < ds_list_size(_n.outputs); j++ ) { - var _out = _n.outputs[| j]; + for( var j = 0; j < array_length(_n.outputs); j++ ) { + var _out = _n.outputs[j]; if(_out.type != VALUE_TYPE.pbBox) continue; var _to = _out.getJunctionTo(); if(array_length(_to)) continue; - var _pbox = _n.outputs[| j].getValue(); + var _pbox = _n.outputs[j].getValue(); if(!is_array(_pbox)) _pbox = [ _pbox ]; @@ -83,12 +83,12 @@ function Node_Pixel_Builder(_x, _y, _group = noone) : Node_Collection(_x, _y, _g } } - var _outSurf = outputs[| 0].getValue(); + var _outSurf = outputs[0].getValue(); surface_array_free(_outSurf); if(ds_map_empty(_surfs)) { ds_map_destroy(_surfs); - outputs[| 0].setValue(surface_create(_dim[0], _dim[1])); + outputs[0].setValue(surface_create(_dim[0], _dim[1])); LOG_BLOCK_END(); return; } @@ -112,7 +112,7 @@ function Node_Pixel_Builder(_x, _y, _group = noone) : Node_Collection(_x, _y, _g ds_map_destroy(_surfs); - outputs[| 0].setValue(_outSurf); + outputs[0].setValue(_outSurf); LOG_BLOCK_END(); } #endregion } \ No newline at end of file diff --git a/scripts/node_pixel_cloud/node_pixel_cloud.gml b/scripts/node_pixel_cloud/node_pixel_cloud.gml index 6245b1a6b..bf329a4d0 100644 --- a/scripts/node_pixel_cloud/node_pixel_cloud.gml +++ b/scripts/node_pixel_cloud/node_pixel_cloud.gml @@ -1,34 +1,34 @@ function Node_Pixel_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Pixel Cloud"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[1] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 2] = nodeValue_Float("Strength", self, 0.1) + inputs[2] = nodeValue_Float("Strength", self, 0.1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] }); - inputs[| 3] = nodeValue_Surface("Strength map", self); + inputs[3] = nodeValue_Surface("Strength map", self); - inputs[| 4] = nodeValue_Gradient("Color over lifetime", self, new gradientObject(cola(c_white))) + inputs[4] = nodeValue_Gradient("Color over lifetime", self, new gradientObject(cola(c_white))) .setMappable(9); - inputs[| 5] = nodeValue_Float("Distance", self, 1); + inputs[5] = nodeValue_Float("Distance", self, 1); - inputs[| 6] = nodeValue("Alpha over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + inputs[6] = nodeValue("Alpha over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); - inputs[| 7] = nodeValue_Float("Random blending", self, 0.1) + inputs[7] = nodeValue_Float("Random blending", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 8] = nodeValue_Bool("Active", self, true); + inputs[8] = nodeValue_Bool("Active", self, true); active_index = 8; ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 9] = nodeValueMap("Gradient map", self); + inputs[9] = nodeValueMap("Gradient map", self); - inputs[| 10] = nodeValueGradientRange("Gradient map range", self, inputs[| 4]); + inputs[10] = nodeValueGradientRange("Gradient map range", self, inputs[4]); ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -38,12 +38,12 @@ function Node_Pixel_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou ["Color", true], 4, 9, 6, 7 ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static step = function() { - inputs[| 4].mappableStep(); + inputs[4].mappableStep(); } static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -56,7 +56,7 @@ function Node_Pixel_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou shader_set_i("useMap", is_surface(_data[3])); shader_set_surface("strengthMap", _data[3]); - shader_set_gradient(_data[4], _data[9], _data[10], inputs[| 4]); + shader_set_gradient(_data[4], _data[9], _data[10], inputs[4]); shader_set_f("alpha_curve" , _data[6]); shader_set_i("curve_amount", array_length(_data[6])); diff --git a/scripts/node_pixel_sampler/node_pixel_sampler.gml b/scripts/node_pixel_sampler/node_pixel_sampler.gml index 6d08b9745..2dd82b872 100644 --- a/scripts/node_pixel_sampler/node_pixel_sampler.gml +++ b/scripts/node_pixel_sampler/node_pixel_sampler.gml @@ -1,28 +1,28 @@ function Node_Pixel_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Pixel Sampler"; - inputs[| 0] = nodeValue_Surface("Base Texture", self); + inputs[0] = nodeValue_Surface("Base Texture", self); - inputs[| 1] = nodeValue_Enum_Button("Sample Mode", self, 0 , [ "Keep Size", "Expand" ]); + inputs[1] = nodeValue_Enum_Button("Sample Mode", self, 0 , [ "Keep Size", "Expand" ]); - inputs[| 2] = nodeValue_Enum_Button("Match Mode", self, 0 , [ "Brightness", "RGB", "Hue" ]); + inputs[2] = nodeValue_Enum_Button("Match Mode", self, 0 , [ "Brightness", "RGB", "Hue" ]); - inputs[| 3] = nodeValue_Surface("Surfaces", self, [ noone ]) + inputs[3] = nodeValue_Surface("Surfaces", self, [ noone ]) .setArrayDepth(1); - inputs[| 4] = nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ])) + inputs[4] = nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ])) .setMappable(5); - inputs[| 5] = nodeValueMap("Gradient map", self); + inputs[5] = nodeValueMap("Gradient map", self); - inputs[| 6] = nodeValueGradientRange("Gradient map range", self, inputs[| 4]); + inputs[6] = nodeValueGradientRange("Gradient map range", self, inputs[4]); - inputs[| 7] = nodeValue_Enum_Scroll("Color Blending", self, 0 , [ "None", "Multiply" ]); + inputs[7] = nodeValue_Enum_Scroll("Color Blending", self, 0 , [ "None", "Multiply" ]); - inputs[| 8] = nodeValue_Float("Blending Intensity", self, 1 ) + inputs[8] = nodeValue_Float("Blending Intensity", self, 1 ) .setDisplay(VALUE_DISPLAY.slider); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Base Texture", false], 0, 1, 2, @@ -35,7 +35,7 @@ function Node_Pixel_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr temp_surface = [ noone ]; static step = function() { - inputs[| 4].mappableStep(); + inputs[4].mappableStep(); } static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -106,7 +106,7 @@ function Node_Pixel_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr shader_set_i("amount", _inps); shader_set_i("sampleMode", _samp); shader_set_i("matchMode", _mach); - shader_set_gradient(_data[4], _data[5], _data[6], inputs[| 4]); + shader_set_gradient(_data[4], _data[5], _data[6], inputs[4]); shader_set_i("blendMode", _blnd); shader_set_f("blendIntensity", _bint); diff --git a/scripts/node_pixel_sort/node_pixel_sort.gml b/scripts/node_pixel_sort/node_pixel_sort.gml index e82cada65..03f8a22e1 100644 --- a/scripts/node_pixel_sort/node_pixel_sort.gml +++ b/scripts/node_pixel_sort/node_pixel_sort.gml @@ -7,25 +7,25 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group uniform_tre = shader_get_uniform(shader, "threshold"); uniform_dir = shader_get_uniform(shader, "direction"); - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Int("Iteration", self, 2); + inputs[1] = nodeValue_Int("Iteration", self, 2); - inputs[| 2] = nodeValue_Float("Threshold", self, 0.1) + inputs[2] = nodeValue_Float("Threshold", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Int("Direction", self, 0) + inputs[3] = nodeValue_Int("Direction", self, 0) .setDisplay(VALUE_DISPLAY.rotation, { step: 90 }); - inputs[| 4] = nodeValue_Surface("Mask", self); + inputs[4] = nodeValue_Surface("Mask", self); - inputs[| 5] = nodeValue_Float("Mix", self, 1) + inputs[5] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 6] = nodeValue_Bool("Active", self, true); + inputs[6] = nodeValue_Bool("Active", self, true); active_index = 6; - inputs[| 7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(4); // inputs 8, 9 @@ -34,7 +34,7 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group ["Pixel sort", false], 1, 2, 3, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); diff --git a/scripts/node_plot_linear/node_plot_linear.gml b/scripts/node_plot_linear/node_plot_linear.gml index 31debcc7e..894bc9f85 100644 --- a/scripts/node_plot_linear/node_plot_linear.gml +++ b/scripts/node_plot_linear/node_plot_linear.gml @@ -8,7 +8,7 @@ switch(query) { case "waveform" : case "graph" : - node.inputs[| 11].setValue(1); + node.inputs[11].setValue(1); break; } @@ -19,80 +19,80 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Draw Bar / Graph"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Float("Data", self, []) + inputs[1] = nodeValue_Float("Data", self, []) .setArrayDepth(1) .setVisible(true, true); - inputs[| 2] = nodeValue_Slider_Range("Range", self, [ 0, 1 ]); + inputs[2] = nodeValue_Slider_Range("Range", self, [ 0, 1 ]); - inputs[| 3] = nodeValue_Float("Sample frequency", self, 1); + inputs[3] = nodeValue_Float("Sample frequency", self, 1); - inputs[| 4] = nodeValue_Vector("Origin", self, [ 0, DEF_SURF_H / 2 ]); + inputs[4] = nodeValue_Vector("Origin", self, [ 0, DEF_SURF_H / 2 ]); - inputs[| 5] = nodeValue_Float("Scale", self, DEF_SURF_W / 2); + inputs[5] = nodeValue_Float("Scale", self, DEF_SURF_W / 2); - inputs[| 6] = nodeValue_Color("Base Color", self, c_white); + inputs[6] = nodeValue_Color("Base Color", self, c_white); - inputs[| 7] = nodeValue_Float("Graph Thickness", self, 1); + inputs[7] = nodeValue_Float("Graph Thickness", self, 1); - inputs[| 8] = nodeValue_Bool("Background", self, false); + inputs[8] = nodeValue_Bool("Background", self, false); - inputs[| 9] = nodeValue_Color("Background color", self, c_black); + inputs[9] = nodeValue_Color("Background color", self, c_black); - inputs[| 10] = nodeValue_Rotation("Direction", self, 0); + inputs[10] = nodeValue_Rotation("Direction", self, 0); - inputs[| 11] = nodeValue_Enum_Scroll("Type", self, 0, [ new scrollItem("Bar chart", s_node_plot_linear_type, 0), + inputs[11] = nodeValue_Enum_Scroll("Type", self, 0, [ new scrollItem("Bar chart", s_node_plot_linear_type, 0), new scrollItem("Graph", s_node_plot_linear_type, 1), ]); - inputs[| 12] = nodeValue_Float("Value Offset", self, 0); + inputs[12] = nodeValue_Float("Value Offset", self, 0); - inputs[| 13] = nodeValue_Gradient("Color Over Sample", self, new gradientObject(cola(c_white))) + inputs[13] = nodeValue_Gradient("Color Over Sample", self, new gradientObject(cola(c_white))) .setMappable(27); - inputs[| 14] = nodeValue_Enum_Scroll("Trim mode", self, 0, [ "Range", "Window" ]); + inputs[14] = nodeValue_Enum_Scroll("Trim mode", self, 0, [ "Range", "Window" ]); - inputs[| 15] = nodeValue_Int("Window Size", self, 8); + inputs[15] = nodeValue_Int("Window Size", self, 8); - inputs[| 16] = nodeValue_Float("Window Offset", self, 0); + inputs[16] = nodeValue_Float("Window Offset", self, 0); - inputs[| 17] = nodeValue_Float("Spacing", self, 1); + inputs[17] = nodeValue_Float("Spacing", self, 1); - inputs[| 18] = nodeValue_Float("Bar Width", self, 4); + inputs[18] = nodeValue_Float("Bar Width", self, 4); - inputs[| 19] = nodeValue_Bool("Rounded Bar", self, false); + inputs[19] = nodeValue_Bool("Rounded Bar", self, false); - inputs[| 20] = nodeValue_PathNode("Path", self, noone) + inputs[20] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - inputs[| 21] = nodeValue_Bool("Flip Value", self, false); + inputs[21] = nodeValue_Bool("Flip Value", self, false); - inputs[| 22] = nodeValue_Bool("Loop", self, false); + inputs[22] = nodeValue_Bool("Loop", self, false); - inputs[| 23] = nodeValue_Float("Smooth", self, 0) + inputs[23] = nodeValue_Float("Smooth", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 24] = nodeValue_Gradient("Color Over Value", self, new gradientObject(cola(c_white))) + inputs[24] = nodeValue_Gradient("Color Over Value", self, new gradientObject(cola(c_white))) .setMappable(29); - inputs[| 25] = nodeValue_Range("Value range", self, [ 0, 1 ] ); + inputs[25] = nodeValue_Range("Value range", self, [ 0, 1 ] ); - inputs[| 26] = nodeValue_Bool("Absolute", self, false); + inputs[26] = nodeValue_Bool("Absolute", self, false); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 27] = nodeValueMap("Sample Gradient map", self); + inputs[27] = nodeValueMap("Sample Gradient map", self); - inputs[| 28] = nodeValueGradientRange("Sample Gradient map range", self, inputs[| 13]); + inputs[28] = nodeValueGradientRange("Sample Gradient map range", self, inputs[13]); - inputs[| 29] = nodeValueMap("Value Gradient map", self); + inputs[29] = nodeValueMap("Value Gradient map", self); - inputs[| 30] = nodeValueGradientRange("Value Gradient map range", self, inputs[| 24]); + inputs[30] = nodeValueGradientRange("Value Gradient map range", self, inputs[24]); ////////////////////////////////////////////////////////////////////////////////////////////////// - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 0, ["Data", true], 1, 12, 21, 14, 2, 3, 15, 16, @@ -110,22 +110,22 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou var _use_path = getSingleValue(20) != noone; - inputs[| 2].setVisible(_trim_mode == 0); - inputs[| 15].setVisible(_trim_mode == 1); - inputs[| 16].setVisible(_trim_mode == 1); + inputs[ 2].setVisible(_trim_mode == 0); + inputs[15].setVisible(_trim_mode == 1); + inputs[16].setVisible(_trim_mode == 1); - inputs[| 9].setVisible(_ubg); - inputs[| 7].setVisible(_typ == 1); - inputs[| 18].setVisible(_typ == 0); - inputs[| 19].setVisible(_typ == 0); - inputs[| 22].setVisible(_typ == 1); - inputs[| 23].setVisible(_typ == 1); + inputs[ 9].setVisible(_ubg); + inputs[ 7].setVisible(_typ == 1); + inputs[18].setVisible(_typ == 0); + inputs[19].setVisible(_typ == 0); + inputs[22].setVisible(_typ == 1); + inputs[23].setVisible(_typ == 1); - inputs[| 4].setVisible(!_use_path); - inputs[| 10].setVisible(!_use_path); + inputs[ 4].setVisible(!_use_path); + inputs[10].setVisible(!_use_path); - inputs[| 13].mappableStep(); - inputs[| 24].mappableStep(); + inputs[13].mappableStep(); + inputs[24].mappableStep(); } static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { @@ -134,12 +134,12 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou var _use_path = current_data[20] != noone; if(!_use_path) { - var a = inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + var a = inputs[4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; } - var a = inputs[| 28].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[0]); active &= !a; - var a = inputs[| 30].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[0]); active &= !a; + var a = inputs[28].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[0]); active &= !a; + var a = inputs[30].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[0]); active &= !a; } static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -239,11 +239,11 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou _ang_nor = _ang + 90; _val = _smp_data[i] + _off; - _col_sam = evaluate_gradient_map(i / amo, _cls, _cls_map, _cls_rng, inputs[| 13]); + _col_sam = evaluate_gradient_map(i / amo, _cls, _cls_map, _cls_rng, inputs[13]); var _val_p = _clv_a? abs(_val) : _val; var _val_prog = (_val_p - _clv_r[0]) / (_clv_r[1] - _clv_r[0]); - _col_val = evaluate_gradient_map(_val_prog, _clv, _clv_map, _clv_rng, inputs[| 24]); + _col_val = evaluate_gradient_map(_val_prog, _clv, _clv_map, _clv_rng, inputs[24]); var _c1 = colorMultiply(_lcl, _col_sam); var _c2 = _col_val; diff --git a/scripts/node_polar/node_polar.gml b/scripts/node_polar/node_polar.gml index 32e21fedd..d7d141023 100644 --- a/scripts/node_polar/node_polar.gml +++ b/scripts/node_polar/node_polar.gml @@ -1,41 +1,41 @@ function Node_Polar(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Polar"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Surface("Mask", self); + inputs[1] = nodeValue_Surface("Mask", self); - inputs[| 2] = nodeValue_Float("Mix", self, 1) + inputs[2] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Bool("Active", self, true); + inputs[3] = nodeValue_Bool("Active", self, true); active_index = 3; - inputs[| 4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); - inputs[| 5] = nodeValue_Bool("Invert", self, false) + inputs[5] = nodeValue_Bool("Invert", self, false) - inputs[| 6] = nodeValue_Float("Blend", self, 1) + inputs[6] = nodeValue_Float("Blend", self, 1) .setDisplay(VALUE_DISPLAY.slider) .setMappable(11); __init_mask_modifier(1); // inputs 7, 8, - inputs[| 9] = nodeValue_Enum_Scroll("Radius mode", self, 0, [ new scrollItem("Linear", s_node_curve, 2), + inputs[9] = nodeValue_Enum_Scroll("Radius mode", self, 0, [ new scrollItem("Linear", s_node_curve, 2), new scrollItem("Inverse Square", s_node_curve, 1), new scrollItem("Logarithm", s_node_curve, 3), ]); - inputs[| 10] = nodeValue_Bool("Swap", self, false) + inputs[10] = nodeValue_Bool("Swap", self, false) ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValueMap("Blend map", self); + inputs[11] = nodeValueMap("Blend map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 12] = nodeValue_Vector("Tile", self, [ 1, 1 ] ); + inputs[12] = nodeValue_Vector("Tile", self, [ 1, 1 ] ); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 3, 4, ["Surfaces", false], 0, 1, 2, 7, 8, 12, @@ -48,7 +48,7 @@ function Node_Polar(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con static step = function() { #region __step_mask_modifier(); - inputs[| 6].mappableStep(); + inputs[6].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -57,7 +57,7 @@ function Node_Polar(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con shader_set_interpolation( _data[0]); shader_set_i("invert", _data[5]); shader_set_i("distMode", _data[9]); - shader_set_f_map("blend", _data[6], _data[11], inputs[| 6]); + shader_set_f_map("blend", _data[6], _data[11], inputs[6]); shader_set_i("swap", _data[10]); shader_set_2("tile", _data[12]); diff --git a/scripts/node_posterize/node_posterize.gml b/scripts/node_posterize/node_posterize.gml index 8254b713b..fdaace377 100644 --- a/scripts/node_posterize/node_posterize.gml +++ b/scripts/node_posterize/node_posterize.gml @@ -1,38 +1,38 @@ function Node_Posterize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Posterize"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE)); + inputs[1] = nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE)); - inputs[| 2] = nodeValue_Bool("Use palette", self, true); + inputs[2] = nodeValue_Bool("Use palette", self, true); - inputs[| 3] = nodeValue_Int("Steps", self, 4) + inputs[3] = nodeValue_Int("Steps", self, 4) .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 0.1] }); - inputs[| 4] = nodeValue_Float("Gamma", self, 1) + inputs[4] = nodeValue_Float("Gamma", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 2, 0.01] }) .setMappable(7); - inputs[| 5] = nodeValue_Bool("Active", self, true); + inputs[5] = nodeValue_Bool("Active", self, true); active_index = 5; - inputs[| 6] = nodeValue_Bool("Posterize alpha", self, true); + inputs[6] = nodeValue_Bool("Posterize alpha", self, true); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 7] = nodeValueMap("Gamma map", self); + inputs[7] = nodeValueMap("Gamma map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 8] = nodeValue_Enum_Button("Space", self, 0, [ "RGB", "LAB" ]); + inputs[8] = nodeValue_Enum_Button("Space", self, 0, [ "RGB", "LAB" ]); input_display_list = [ 5, 0, ["Palette", false, 2], 1, 3, 4, 7, 8, ["Alpha", false], 6, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); @@ -41,11 +41,11 @@ function Node_Posterize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static step = function() { var _use_pal = getInputData(2); - inputs[| 1].setVisible(_use_pal); - inputs[| 3].setVisible(!_use_pal); - inputs[| 4].setVisible(!_use_pal); - inputs[| 4].mappableStep(); - inputs[| 8].setVisible(_use_pal); + inputs[1].setVisible(_use_pal); + inputs[3].setVisible(!_use_pal); + inputs[4].setVisible(!_use_pal); + inputs[4].mappableStep(); + inputs[8].setVisible(_use_pal); } static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -143,7 +143,7 @@ function Node_Posterize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) shader_set_f("cMax", _max); shader_set_f("cMin", _min); shader_set_f("colors", _data[3]); - shader_set_f_map("gamma", _data[4], _data[7], inputs[| 4]); + shader_set_f_map("gamma", _data[4], _data[7], inputs[4]); shader_set_i("alpha", _alp); draw_surface_safe(_surf); diff --git a/scripts/node_print/node_print.gml b/scripts/node_print/node_print.gml index 580c6951c..52bd31fcc 100644 --- a/scripts/node_print/node_print.gml +++ b/scripts/node_print/node_print.gml @@ -4,9 +4,9 @@ function Node_Print(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { draw_padding = 8; - inputs[| 0] = nodeValue_Bool("Active", self, true); + inputs[0] = nodeValue_Bool("Active", self, true); - inputs[| 1] = nodeValue_Text("Text", self, ""); + inputs[1] = nodeValue_Text("Text", self, ""); static update = function() { var act = getInputData(0); diff --git a/scripts/node_processor/node_processor.gml b/scripts/node_processor/node_processor.gml index b99aa3b0a..c1b6ef1f8 100644 --- a/scripts/node_processor/node_processor.gml +++ b/scripts/node_processor/node_processor.gml @@ -5,7 +5,7 @@ enum ARRAY_PROCESS { expand_inv, } -#macro PROCESSOR_OVERLAY_CHECK if(array_length(current_data) != ds_list_size(inputs)) return 0; +#macro PROCESSOR_OVERLAY_CHECK if(array_length(current_data) != array_length(inputs)) return 0; function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { attributes.array_process = ARRAY_PROCESS.loop; @@ -41,9 +41,9 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct static getSingleValue = function(_index, _arr = preview_index, output = false) { var _l = output? outputs : inputs; - if(_index < 0 || _index >= ds_list_size(_l)) return 0; + if(_index < 0 || _index >= array_length(_l)) return 0; - var _n = _l[| _index]; + var _n = _l[_index]; var _in = output? _n.getValue() : getInputData(_index); if(!_n.isArray(_in)) return _in; @@ -52,10 +52,10 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct if(!is_array(_in)) return 0; switch(attributes.array_process) { - 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.expand : _aIndex = floor(_arr / process_length[_index][1]) % process_length[_index][0]; break; - case ARRAY_PROCESS.expand_inv : _aIndex = floor(_arr / process_length[ds_list_size(_l) - 1 - _index][1]) % process_length[_index][0]; 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.expand : _aIndex = floor(_arr / process_length[_index][1]) % process_length[_index][0]; break; + case ARRAY_PROCESS.expand_inv : _aIndex = floor(_arr / process_length[array_length(_l) - 1 - _index][1]) % process_length[_index][0]; break; } return array_safe_get_fast(_in, _aIndex); @@ -66,7 +66,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct var _in = getSingleValue(dimension_index, arr); - if(inputs[| dimension_index].type == VALUE_TYPE.surface && is_surface(_in)) { + if(inputs[dimension_index].type == VALUE_TYPE.surface && is_surface(_in)) { var ww = surface_get_width_safe(_in); var hh = surface_get_height_safe(_in); return [ww, hh]; @@ -79,18 +79,17 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct } static processDataArray = function(outIndex) { - var _output = outputs[| outIndex]; + var _output = outputs[outIndex]; var _out = _output.getValue(); var _atlas = false; var _pAtl = noone; - var _data = array_create(ds_list_size(inputs)); + var _data = []; if(process_amount == 1) { // render single data if(_output.type == VALUE_TYPE.d3object) //passing 3D vertex call return _out; - for(var i = 0; i < ds_list_size(inputs); i++) - _data[i] = inputs_data[i]; + _data = array_map(inputs, function(_in, i) /*=>*/ {return inputs_data[i]}); if(_output.type == VALUE_TYPE.surface) { // Surface preparation if(manage_atlas) { @@ -103,7 +102,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct if(dimension_index > -1) { var surf = _data[dimension_index]; var _sw = 1, _sh = 1; - if(inputs[| dimension_index].type == VALUE_TYPE.surface) { + if(inputs[dimension_index].type == VALUE_TYPE.surface) { if(is_surface(surf)) { _sw = surface_get_width_safe(surf); _sh = surface_get_height_safe(surf); @@ -127,7 +126,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct current_data = _data; if(active_index > -1 && !_data[active_index]) // skip - return inputs[| 0].type == VALUE_TYPE.surface? surface_clone(_data[0], _out) : _data[0]; + return inputs[0].type == VALUE_TYPE.surface? surface_clone(_data[0], _out) : _data[0]; var data = processData(_out, _data, outIndex, 0); // Process data @@ -152,8 +151,8 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct #endregion for(var l = 0; l < process_amount; l++) { - for(var i = 0; i < ds_list_size(inputs); i++) - _data[i] = all_inputs[i][l]; + __l = l; + _data[i] = array_map(inputs, function(_in, i) /*=>*/ {return all_inputs[i][__l]}); if(_output.type == VALUE_TYPE.surface) { #region // Output surface verification if(manage_atlas) { @@ -166,7 +165,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct if(dimension_index > -1) { var surf = _data[dimension_index]; var _sw = 1, _sh = 1; - if(inputs[| dimension_index].type == VALUE_TYPE.surface) { + if(inputs[dimension_index].type == VALUE_TYPE.surface) { if(is_surface(surf)) { _sw = surface_get_width_safe(surf); _sh = surface_get_height_safe(surf); @@ -192,7 +191,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct current_data = _data; if(active_index > -1 && !_data[active_index]) { // skip - if(!_atlas && inputs[| 0].type == VALUE_TYPE.surface) + if(!_atlas && inputs[0].type == VALUE_TYPE.surface) _out[l] = surface_clone(_data[0], _out[l]); else _out[l] = _data[0]; @@ -216,22 +215,22 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct } static processBatchOutput = function() { - var _is = ds_list_size(inputs); - var _os = ds_list_size(outputs); + var _is = array_length(inputs); + var _os = array_length(outputs); var _dep = attrDepth(); var data; var _out = array_create(_os); - for(var i = 0; i < _os; i++) _out[i] = outputs[| i].getValue(); + for(var i = 0; i < _os; i++) _out[i] = outputs[i].getValue(); - var _surfOut = outputs[| 0]; + var _surfOut = outputs[0]; var _skip = active_index != -1 && !inputs_data[active_index]; if(process_amount == 1) { current_data = inputs_data; if(_skip) { // skip - var _skp = inputs[| 0].type == VALUE_TYPE.surface? surface_clone(inputs_data[0], _out[0]) : inputs_data[0]; + var _skp = inputs[0].type == VALUE_TYPE.surface? surface_clone(inputs_data[0], _out[0]) : inputs_data[0]; _surfOut.setValue(_skp); return; } @@ -240,16 +239,16 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct var _dim = getDimension(); for(var i = 0; i < _os; i++) - if(outputs[| i].type == VALUE_TYPE.surface) _out[i] = surface_verify(_out[i], _dim[0], _dim[1], _dep); + if(outputs[i].type == VALUE_TYPE.surface) _out[i] = surface_verify(_out[i], _dim[0], _dim[1], _dep); } if(_os == 1) { data = processData(_out[0], inputs_data, 0, 0); - outputs[| 0].setValue(data); + outputs[0].setValue(data); } else { data = processData(_out, inputs_data, 0, 0); - for(var i = 0; i < _os; i++) outputs[| i].setValue(data[i]); + for(var i = 0; i < _os; i++) outputs[i].setValue(data[i]); } return; @@ -257,7 +256,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct if(_skip) { - var _skp = inputs[| 0].type == VALUE_TYPE.surface? surface_array_clone(inputs_data[0]) : inputs_data[0]; + var _skp = inputs[0].type == VALUE_TYPE.surface? surface_array_clone(inputs_data[0]) : inputs_data[0]; _surfOut.setValue(_skp); } else { @@ -274,7 +273,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct for(var i = 0; i < _os; i++) { _outa[i] = array_safe_get(_out[i], l); - if(outputs[| i].type == VALUE_TYPE.surface) + if(outputs[i].type == VALUE_TYPE.surface) _outa[i] = surface_verify(_outa[i], _dim[0], _dim[1], _dep); } @@ -289,25 +288,27 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct } for( var i = 0, n = _os; i < n; i++ ) - outputs[| i].setValue(_outputs[i]); + outputs[i].setValue(_outputs[i]); } } static processOutput = function() { - for(var i = 0; i < ds_list_size(outputs); i++) { - var val = outputs[| i].process_array? processDataArray(i) : processData(outputs[| i].getValue(), noone, i); + for(var i = 0; i < array_length(outputs); i++) { + var val = outputs[i].process_array? processDataArray(i) : processData(outputs[i].getValue(), noone, i); if(val != undefined) - outputs[| i].setValue(val); + outputs[i].setValue(val); } } static preGetInputs = function() {} static getInputs = function() { + NODE_SET_INPUT_SIZE + preGetInputs(); - var _len = ds_list_size(inputs); + var _len = input_list_size; process_amount = 1; inputs_data = array_verify(inputs_data, _len); @@ -315,9 +316,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct process_length = array_verify(process_length, _len); all_inputs = array_verify(all_inputs, _len); - for(var i = 0; i < _len; i++) { - var _in = inputs[| i]; - + array_foreach(inputs, function(_in, i) /*=>*/ { var raw = _in.getValue(); var amo = _in.arrayLength(raw); var val = raw; @@ -326,11 +325,10 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct else if(amo == 1) val = raw[0]; //spread single array amo = max(1, amo); - //setInputData(i, val); - inputs_data[i] = val; + inputs_data[i] = val; //setInputData(i, val); input_value_map[$ _in.internalName] = val; - inputs_is_array[i] = _in.isArray(val); + inputs_is_array[i] = _in.__is_array; switch(attributes.array_process) { case ARRAY_PROCESS.loop : @@ -345,7 +343,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct } process_length[i] = [ amo, process_amount ]; - } + }); var amoMax = process_amount; for( var i = 0; i < _len; i++ ) { @@ -375,10 +373,10 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct case ARRAY_PROCESS.loop : _index = safe_mod(l, array_length(_in)); break; case ARRAY_PROCESS.hold : _index = min(l, array_length(_in) - 1); break; case ARRAY_PROCESS.expand : _index = floor(l / process_length[i][1]) % process_length[i][0]; break; - case ARRAY_PROCESS.expand_inv : _index = floor(l / process_length[ds_list_size(inputs) - 1 - i][1]) % process_length[i][0]; break; + case ARRAY_PROCESS.expand_inv : _index = floor(l / process_length[array_length(inputs) - 1 - i][1]) % process_length[i][0]; break; } - all_inputs[i][l] = inputs[| i].arrayBalance(_in[_index]); + all_inputs[i][l] = inputs[i].arrayBalance(_in[_index]); } #endregion } diff --git a/scripts/node_project_data/node_project_data.gml b/scripts/node_project_data/node_project_data.gml index f9f14bfbb..f52d0f555 100644 --- a/scripts/node_project_data/node_project_data.gml +++ b/scripts/node_project_data/node_project_data.gml @@ -2,33 +2,33 @@ function Node_Project_Data(_x, _y, _group = noone) : Node(_x, _y, _group) constr name = "Project Data"; setDimension(96, 48);; - outputs[| 0] = nodeValue_Output("Name", self, VALUE_TYPE.text, "") + outputs[0] = nodeValue_Output("Name", self, VALUE_TYPE.text, "") .setVisible(false); - outputs[| 1] = nodeValue_Output("Description", self, VALUE_TYPE.text, "") + outputs[1] = nodeValue_Output("Description", self, VALUE_TYPE.text, "") .setVisible(false); - outputs[| 2] = nodeValue_Output("Author", self, VALUE_TYPE.text, "") + outputs[2] = nodeValue_Output("Author", self, VALUE_TYPE.text, "") .setVisible(false); - outputs[| 3] = nodeValue_Output("Contact", self, VALUE_TYPE.text, "") + outputs[3] = nodeValue_Output("Contact", self, VALUE_TYPE.text, "") .setVisible(false); - outputs[| 4] = nodeValue_Output("Path", self, VALUE_TYPE.path, "") + outputs[4] = nodeValue_Output("Path", self, VALUE_TYPE.path, "") .setVisible(false); static update = function() { - outputs[| 0].setValue(filename_name_only(PROJECT.path)); - outputs[| 1].setValue(PROJECT.meta.description); - outputs[| 2].setValue(PROJECT.meta.author); - outputs[| 3].setValue(PROJECT.meta.contact); + outputs[0].setValue(filename_name_only(PROJECT.path)); + outputs[1].setValue(PROJECT.meta.description); + outputs[2].setValue(PROJECT.meta.author); + outputs[3].setValue(PROJECT.meta.contact); - outputs[| 4].setValue(PROJECT.path); + outputs[4].setValue(PROJECT.path); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); - var txt = outputs[| 0].getValue(); + var txt = outputs[0].getValue(); draw_set_text(f_p0, fa_center, fa_center, COLORS._main_text); draw_text_bbox(bbox, txt); diff --git a/scripts/node_pytagorean_tile/node_pytagorean_tile.gml b/scripts/node_pytagorean_tile/node_pytagorean_tile.gml index 6f86f6583..2afe6ad63 100644 --- a/scripts/node_pytagorean_tile/node_pytagorean_tile.gml +++ b/scripts/node_pytagorean_tile/node_pytagorean_tile.gml @@ -1,65 +1,65 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Pytagorean Tile"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 1, 1 ]) + inputs[2] = nodeValue_Vector("Scale", self, [ 1, 1 ]) .setMappable(11); - inputs[| 3] = nodeValue_Rotation("Rotation", self, 0) + inputs[3] = nodeValue_Rotation("Rotation", self, 0) .setMappable(12); - inputs[| 4] = nodeValue_Float("Gap", self, 0.25) + inputs[4] = nodeValue_Float("Gap", self, 0.25) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) .setMappable(13); - inputs[| 5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) + inputs[5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) .setMappable(18); - inputs[| 6] = nodeValue_Color("Gap color", self, c_black); + inputs[6] = nodeValue_Color("Gap color", self, c_black); - inputs[| 7] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]); + inputs[7] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]); - inputs[| 8] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[8] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 9] = nodeValue_Surface("Texture", self); + inputs[9] = nodeValue_Surface("Texture", self); - inputs[| 10] = nodeValue_Bool("Anti aliasing", self, false); + inputs[10] = nodeValue_Bool("Anti aliasing", self, false); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValueMap("Scale map", self); + inputs[11] = nodeValueMap("Scale map", self); - inputs[| 12] = nodeValueMap("Angle map", self); + inputs[12] = nodeValueMap("Angle map", self); - inputs[| 13] = nodeValueMap("Gap map", self); + inputs[13] = nodeValueMap("Gap map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 14] = nodeValue_Bool("Truchet", self, false); + inputs[14] = nodeValue_Bool("Truchet", self, false); - inputs[| 15] = nodeValue_Int("Truchet seed", self, seed_random()); + inputs[15] = nodeValue_Int("Truchet seed", self, seed_random()); - inputs[| 16] = nodeValue_Float("Truchet threshold", self, 0.5) + inputs[16] = nodeValue_Float("Truchet threshold", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) - inputs[| 17] = nodeValue_Rotation("Phase", self, 90); + inputs[17] = nodeValue_Rotation("Phase", self, 90); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 18] = nodeValueMap("Gradient map", self); + inputs[18] = nodeValueMap("Gradient map", self); - inputs[| 19] = nodeValueGradientRange("Gradient map range", self, inputs[| 5]); + inputs[19] = nodeValueGradientRange("Gradient map range", self, inputs[5]); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 20] = nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ]); + inputs[20] = nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ]); - inputs[| 21] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); + inputs[21] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); input_display_list = [ ["Output", false], 0, @@ -68,23 +68,23 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _ ["Truchet", true, 14], 15, 16, 20, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; - var hv = inputs[| 19].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !hv; _hov |= hv; + var hv = inputs[ 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; + var hv = inputs[19].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !hv; _hov |= hv; return _hov; } static step = function() { #region - inputs[| 2].mappableStep(); - inputs[| 3].mappableStep(); - inputs[| 4].mappableStep(); - inputs[| 5].mappableStep(); + inputs[2].mappableStep(); + inputs[3].mappableStep(); + inputs[4].mappableStep(); + inputs[5].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -96,10 +96,10 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _ var _col_gap = _data[6]; var _gra = _data[5]; - inputs[| 5].setVisible(_mode == 0); - inputs[| 6].setVisible(_mode != 1); - inputs[| 21].setVisible(_mode == 1); - inputs[| 9].setVisible(_mode == 2 || _mode == 3); + inputs[ 5].setVisible(_mode == 0); + inputs[ 6].setVisible(_mode != 1); + inputs[21].setVisible(_mode == 1); + inputs[ 9].setVisible(_mode == 2 || _mode == 3); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); @@ -107,9 +107,9 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _ shader_set_f("dimension", _dim[0], _dim[1]); shader_set_f("position", _pos[0] / _dim[0], _pos[1] / _dim[1]); - shader_set_f_map("scale", _data[ 2], _data[11], inputs[| 2]); - shader_set_f_map("angle", _data[ 3], _data[12], inputs[| 3]); - shader_set_f_map("thick", _data[ 4], _data[13], inputs[| 4]); + shader_set_f_map("scale", _data[ 2], _data[11], inputs[2]); + shader_set_f_map("angle", _data[ 3], _data[12], inputs[3]); + shader_set_f_map("thick", _data[ 4], _data[13], inputs[4]); shader_set_f("seed", _data[ 8]); shader_set_i("mode", _mode); @@ -123,7 +123,7 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _ shader_set_2("truchetAngle", _data[20]); shader_set_2("level", _data[21]); - shader_set_gradient(_data[5], _data[18], _data[19], inputs[| 5]); + shader_set_gradient(_data[5], _data[18], _data[19], inputs[5]); if(is_surface(_sam)) draw_surface_stretched_safe(_sam, 0, 0, _dim[0], _dim[1]); else draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1); diff --git a/scripts/node_quasicrystal/node_quasicrystal.gml b/scripts/node_quasicrystal/node_quasicrystal.gml index c1bed9cd8..c8a6742db 100644 --- a/scripts/node_quasicrystal/node_quasicrystal.gml +++ b/scripts/node_quasicrystal/node_quasicrystal.gml @@ -1,39 +1,39 @@ function Node_Quasicrystal(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Quasicrystal"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Float("Scale", self, 16) + inputs[1] = nodeValue_Float("Scale", self, 16) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 64, 0.1] }) .setMappable(6); - inputs[| 2] = nodeValue_Rotation("Angle", self, 0) + inputs[2] = nodeValue_Rotation("Angle", self, 0) .setMappable(7); - inputs[| 3] = nodeValue_Vector("Position", self, [ 0, 0 ] ) + inputs[3] = nodeValue_Vector("Position", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 4] = nodeValue_Color("Color 1", self, c_white); + inputs[4] = nodeValue_Color("Color 1", self, c_white); - inputs[| 5] = nodeValue_Color("Color 2", self, c_black); + inputs[5] = nodeValue_Color("Color 2", self, c_black); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 6] = nodeValueMap("Scale map", self); + inputs[6] = nodeValueMap("Scale map", self); - inputs[| 7] = nodeValueMap("Angle map", self); + inputs[7] = nodeValueMap("Angle map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 8] = nodeValue_Float("Phase", self, 0) + inputs[8] = nodeValue_Float("Phase", self, 0) .setDisplay(VALUE_DISPLAY.slider) .setMappable(8); - inputs[| 9] = nodeValueMap("Phasemap", self); + inputs[9] = nodeValueMap("Phasemap", self); - inputs[| 10] = nodeValue_Rotation_Range("Angle Range", self, [ 0, 180 ]); + inputs[10] = nodeValue_Rotation_Range("Angle Range", self, [ 0, 180 ]); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Output", true], 0, @@ -49,16 +49,16 @@ function Node_Quasicrystal(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro var py = _y + pos[1] * _s; var _hov = false; - var hv = inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; - var hv = inputs[| 2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; + var hv = inputs[3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; + var hv = inputs[2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; return _hov; } #endregion static step = function() { #region - inputs[| 1].mappableStep(); - inputs[| 2].mappableStep(); - inputs[| 8].mappableStep(); + inputs[1].mappableStep(); + inputs[2].mappableStep(); + inputs[8].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region @@ -77,9 +77,9 @@ function Node_Quasicrystal(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro shader_set_f("position", _pos[0] / _dim[0], _pos[1] / _dim[1]); shader_set_2("rangleRange", _aran); - shader_set_f_map("amount", _data[1], _data[6], inputs[| 1]); - shader_set_f_map("angle", _data[2], _data[7], inputs[| 2]); - shader_set_f_map("phase", _data[8], _data[9], inputs[| 8]); + shader_set_f_map("amount", _data[1], _data[6], inputs[ 1]); + shader_set_f_map("angle", _data[2], _data[7], inputs[ 2]); + shader_set_f_map("phase", _data[8], _data[9], inputs[ 8]); shader_set_color("color0", _clr0); shader_set_color("color1", _clr1); diff --git a/scripts/node_random/node_random.gml b/scripts/node_random/node_random.gml index 40a1500ee..d353bbd92 100644 --- a/scripts/node_random/node_random.gml +++ b/scripts/node_random/node_random.gml @@ -4,13 +4,13 @@ function Node_Random(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co setDimension(96, 48); - inputs[| 0] = nodeValue_Int("seed", self, irandom(99999)); + inputs[0] = nodeValue_Int("seed", self, irandom(99999)); - inputs[| 1] = nodeValue_Float("from", self, 0); + inputs[1] = nodeValue_Float("from", self, 0); - inputs[| 2] = nodeValue_Float("to", self, 1); + inputs[2] = nodeValue_Float("to", self, 1); - outputs[| 0] = nodeValue_Output("Result", self, VALUE_TYPE.float, 0); + outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.float, 0); static processData = function(_output, _data, _output_index, _array_index = 0) { random_set_seed(_data[0]); @@ -19,7 +19,7 @@ function Node_Random(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); - var str = outputs[| 0].getValue(); + var str = outputs[0].getValue(); var bbox = drawGetBbox(xx, yy, _s); var ss = string_scale(str, bbox.w, bbox.h); diff --git a/scripts/node_random_shape/node_random_shape.gml b/scripts/node_random_shape/node_random_shape.gml index 8b0b81d6d..ecfc832b6 100644 --- a/scripts/node_random_shape/node_random_shape.gml +++ b/scripts/node_random_shape/node_random_shape.gml @@ -1,12 +1,12 @@ function Node_Random_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Draw Random Shape"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[1] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Output", false], 0, diff --git a/scripts/node_random_tile/node_random_tile.gml b/scripts/node_random_tile/node_random_tile.gml index b8eb3274d..51676a44a 100644 --- a/scripts/node_random_tile/node_random_tile.gml +++ b/scripts/node_random_tile/node_random_tile.gml @@ -1,63 +1,63 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Random Tile"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 2, 2 ]) + inputs[2] = nodeValue_Vector("Scale", self, [ 2, 2 ]) .setMappable(11); - inputs[| 3] = nodeValue_Rotation("Angle", self, 0) + inputs[3] = nodeValue_Rotation("Angle", self, 0) .setMappable(12); - inputs[| 4] = nodeValue_Float("Gap", self, 0.1) + inputs[4] = nodeValue_Float("Gap", self, 0.1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) .setMappable(13); - inputs[| 5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) + inputs[5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) .setMappable(17); - inputs[| 6] = nodeValue_Color("Gap color", self, c_black); + inputs[6] = nodeValue_Color("Gap color", self, c_black); - inputs[| 7] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]); + inputs[7] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]); - inputs[| 8] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[8] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 9] = nodeValue_Surface("Texture", self); + inputs[9] = nodeValue_Surface("Texture", self); - inputs[| 10] = nodeValue_Bool("Anti aliasing", self, false); + inputs[10] = nodeValue_Bool("Anti aliasing", self, false); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValueMap("Scale map", self); + inputs[11] = nodeValueMap("Scale map", self); - inputs[| 12] = nodeValueMap("Angle map", self); + inputs[12] = nodeValueMap("Angle map", self); - inputs[| 13] = nodeValueMap("Gap map", self); + inputs[13] = nodeValueMap("Gap map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 14] = nodeValue_Bool("Truchet", self, false); + inputs[14] = nodeValue_Bool("Truchet", self, false); - inputs[| 15] = nodeValue_Int("Truchet seed", self, seed_random()); + inputs[15] = nodeValue_Int("Truchet seed", self, seed_random()); - inputs[| 16] = nodeValue_Float("Truchet threshold", self, 0.5) + inputs[16] = nodeValue_Float("Truchet threshold", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 17] = nodeValueMap("Gradient map", self); + inputs[17] = nodeValueMap("Gradient map", self); - inputs[| 18] = nodeValueGradientRange("Gradient map range", self, inputs[| 5]); + inputs[18] = nodeValueGradientRange("Gradient map range", self, inputs[5]); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 19] = nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ]); + inputs[19] = nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ]); - inputs[| 20] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); + inputs[20] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); input_display_list = [ ["Output", false], 0, @@ -66,23 +66,23 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou ["Truchet", true, 14], 15, 16, 19, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; - var hv = inputs[| 18].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !hv; _hov |= hv; + var hv = inputs[ 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; + var hv = inputs[18].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !hv; _hov |= hv; return _hov; } static step = function() { #region - inputs[| 2].mappableStep(); - inputs[| 3].mappableStep(); - inputs[| 4].mappableStep(); - inputs[| 5].mappableStep(); + inputs[2].mappableStep(); + inputs[3].mappableStep(); + inputs[4].mappableStep(); + inputs[5].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -93,10 +93,10 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou var _col_gap = _data[6]; - inputs[| 5].setVisible(_mode == 0); - inputs[| 6].setVisible(_mode != 1); - inputs[| 20].setVisible(_mode == 1); - inputs[| 9].setVisible(_mode == 2 || _mode == 3); + inputs[ 5].setVisible(_mode == 0); + inputs[ 6].setVisible(_mode != 1); + inputs[20].setVisible(_mode == 1); + inputs[ 9].setVisible(_mode == 2 || _mode == 3); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); @@ -104,9 +104,9 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou shader_set_f("dimension", _dim[0], _dim[1]); shader_set_f("position", _pos[0] / _dim[0], _pos[1] / _dim[1]); - shader_set_f_map("scale", _data[ 2], _data[11], inputs[| 2]); - shader_set_f_map("angle", _data[ 3], _data[12], inputs[| 3]); - shader_set_f_map("thick", _data[ 4], _data[13], inputs[| 4]); + shader_set_f_map("scale", _data[ 2], _data[11], inputs[2]); + shader_set_f_map("angle", _data[ 3], _data[12], inputs[3]); + shader_set_f_map("thick", _data[ 4], _data[13], inputs[4]); shader_set_f("seed", _data[ 8]); shader_set_i("mode", _mode); @@ -119,7 +119,7 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou shader_set_2("truchetAngle", _data[19]); shader_set_2("level", _data[20]); - shader_set_gradient(_data[5], _data[17], _data[18], inputs[| 5]); + shader_set_gradient(_data[5], _data[17], _data[18], inputs[5]); if(is_surface(_sam)) draw_surface_stretched_safe(_sam, 0, 0, _dim[0], _dim[1]); else draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1); diff --git a/scripts/node_rate_remap/node_rate_remap.gml b/scripts/node_rate_remap/node_rate_remap.gml index 0f8ff1ed5..cb10e97c8 100644 --- a/scripts/node_rate_remap/node_rate_remap.gml +++ b/scripts/node_rate_remap/node_rate_remap.gml @@ -2,15 +2,15 @@ function Node_Rate_Remap(_x, _y, _group = noone) : Node_Processor(_x, _y, _group name = "Rate Remap"; use_cache = CACHE_USE.manual; - inputs[| 0] = nodeValue_Surface("Surface", self); + inputs[0] = nodeValue_Surface("Surface", self); - inputs[| 1] = nodeValue_Float("Framerate", self, 10) + inputs[1] = nodeValue_Float("Framerate", self, 10) .setValidator(VV_min(1)); - inputs[| 2] = nodeValue_Bool("Active", self, true); + inputs[2] = nodeValue_Bool("Active", self, true); active_index = 2; - outputs[| 0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone); input_display_list = [ 2, ["Remap", false], 0, 1 diff --git a/scripts/node_rd/node_rd.gml b/scripts/node_rd/node_rd.gml index d419ce418..cf20bf9fe 100644 --- a/scripts/node_rd/node_rd.gml +++ b/scripts/node_rd/node_rd.gml @@ -1,56 +1,56 @@ function Node_RD(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Reaction Diffusion"; - inputs[| 0] = nodeValue_Surface("Seed", self); + inputs[0] = nodeValue_Surface("Seed", self); - inputs[| 1] = nodeValue_Float("Kill rate", self, 0.058) + inputs[1] = nodeValue_Float("Kill rate", self, 0.058) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.001] }) .setMappable(8); - inputs[| 2] = nodeValue_Float("Feed rate", self, 0.043) + inputs[2] = nodeValue_Float("Feed rate", self, 0.043) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.001] }) .setMappable(9); - inputs[| 3] = nodeValue_Float("Timestep", self, 1) + inputs[3] = nodeValue_Float("Timestep", self, 1) .setMappable(10); - inputs[| 4] = nodeValue_Int("Iteration", self, 16); + inputs[4] = nodeValue_Int("Iteration", self, 16); - inputs[| 5] = nodeValue_Float("Diffusion A", self, 1.) + inputs[5] = nodeValue_Float("Diffusion A", self, 1.) .setDisplay(VALUE_DISPLAY.slider) .setMappable(11); - inputs[| 6] = nodeValue_Float("Diffusion B", self, .2) + inputs[6] = nodeValue_Float("Diffusion B", self, .2) .setDisplay(VALUE_DISPLAY.slider) .setMappable(12); - inputs[| 7] = nodeValue_Surface("Add B", self); + inputs[7] = nodeValue_Surface("Add B", self); ////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 8] = nodeValue_Surface("Kill map", self) + inputs[8] = nodeValue_Surface("Kill map", self) .setVisible(false, false); - inputs[| 9] = nodeValue_Surface("Feed map", self) + inputs[9] = nodeValue_Surface("Feed map", self) .setVisible(false, false); - inputs[| 10] = nodeValue_Surface("Time map", self) + inputs[10] = nodeValue_Surface("Time map", self) .setVisible(false, false); - inputs[| 11] = nodeValue_Surface("DfA map", self) + inputs[11] = nodeValue_Surface("DfA map", self) .setVisible(false, false); - inputs[| 12] = nodeValue_Surface("DfB map", self) + inputs[12] = nodeValue_Surface("DfB map", self) .setVisible(false, false); ////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 13] = nodeValue_Float("Diffusion", self, 1.) + inputs[13] = nodeValue_Float("Diffusion", self, 1.) .setDisplay(VALUE_DISPLAY.slider) - outputs[| 0] = nodeValue_Output("Reacted", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Reacted", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Rendered", self, VALUE_TYPE.surface, noone); + outputs[1] = nodeValue_Output("Rendered", self, VALUE_TYPE.surface, noone); preview_channel = 1; @@ -66,11 +66,11 @@ function Node_RD(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { temp_surface = [ surface_create(1, 1), surface_create(1, 1) ]; static step = function() { #region - inputs[| 1].mappableStep(); - inputs[| 2].mappableStep(); - inputs[| 3].mappableStep(); - inputs[| 5].mappableStep(); - inputs[| 6].mappableStep(); + inputs[1].mappableStep(); + inputs[2].mappableStep(); + inputs[3].mappableStep(); + inputs[5].mappableStep(); + inputs[6].mappableStep(); } #endregion static update = function() { @@ -84,8 +84,8 @@ function Node_RD(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var _db = getInputData(6); var _b = getInputData(7); - var _outp = outputs[| 0].getValue(); - var _rend = outputs[| 1].getValue(); + var _outp = outputs[0].getValue(); + var _rend = outputs[1].getValue(); var _sw = surface_get_width_safe(_surf); var _sh = surface_get_height_safe(_surf); @@ -114,13 +114,13 @@ function Node_RD(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { repeat(_it) { surface_set_shader(temp_surface[!_ind], sh_rd_propagate); shader_set_f("dimension", _sw, _sh); - shader_set_f_map("k", _k , getInputData( 8), inputs[| 1]); - shader_set_f_map("f", _f , getInputData( 9), inputs[| 2]); - shader_set_f_map("dt", _dt, getInputData(10), inputs[| 3]); + shader_set_f_map("k", _k , getInputData( 8), inputs[1]); + shader_set_f_map("f", _f , getInputData( 9), inputs[2]); + shader_set_f_map("dt", _dt, getInputData(10), inputs[3]); shader_set_f("dd", _dd); - shader_set_f_map("da", _da, getInputData(11), inputs[| 5]); - shader_set_f_map("db", _db, getInputData(12), inputs[| 6]); + shader_set_f_map("da", _da, getInputData(11), inputs[5]); + shader_set_f_map("db", _db, getInputData(12), inputs[6]); draw_surface_safe(temp_surface[_ind]); surface_reset_shader(); @@ -136,7 +136,7 @@ function Node_RD(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { draw_surface_safe(_surf); surface_reset_shader(); - outputs[| 0].setValue(_outp); - outputs[| 1].setValue(_rend); + outputs[0].setValue(_outp); + outputs[1].setValue(_rend); } } \ No newline at end of file diff --git a/scripts/node_region_fill/node_region_fill.gml b/scripts/node_region_fill/node_region_fill.gml index fdbe09f50..dcb13c1b0 100644 --- a/scripts/node_region_fill/node_region_fill.gml +++ b/scripts/node_region_fill/node_region_fill.gml @@ -1,32 +1,32 @@ function Node_Region_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Region Fill"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Surface("Mask", self); + inputs[1] = nodeValue_Surface("Mask", self); - inputs[| 2] = nodeValue_Palette("Fill Colors", self, array_clone(DEF_PALETTE)); + inputs[2] = nodeValue_Palette("Fill Colors", self, array_clone(DEF_PALETTE)); - inputs[| 3] = nodeValue_Bool("Fill", self, true); + inputs[3] = nodeValue_Bool("Fill", self, true); - inputs[| 4] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 4].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[4] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[4].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 5] = nodeValue_Color("Target Color", self, c_white); + inputs[5] = nodeValue_Color("Target Color", self, c_white); - inputs[| 6] = nodeValue_Bool("Inner only", self, false, "Only fill regions with surrounding pixels."); + inputs[6] = nodeValue_Bool("Inner only", self, false, "Only fill regions with surrounding pixels."); - inputs[| 7] = nodeValue_Enum_Scroll("Draw original", self, 0, [ "None", "Above", "Behind" ]); + inputs[7] = nodeValue_Enum_Scroll("Draw original", self, 0, [ "None", "Above", "Behind" ]); - inputs[| 8] = nodeValue_Enum_Scroll("Fill type", self, 0, [ "Random", "Color map", "Texture map" ]); + inputs[8] = nodeValue_Enum_Scroll("Fill type", self, 0, [ "Random", "Color map", "Texture map" ]); - inputs[| 9] = nodeValue_Surface("Color map", self); + inputs[9] = nodeValue_Surface("Color map", self); - inputs[| 10] = nodeValue_Surface("Texture map", self); + inputs[10] = nodeValue_Surface("Texture map", self); - inputs[| 11] = nodeValue_Bool("Color Filter", self, false); + inputs[11] = nodeValue_Bool("Color Filter", self, false); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 4, ["Surfaces", false], 0, 1, @@ -41,12 +41,12 @@ function Node_Region_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou var _filt = getInputData( 8); var _fclr = getInputData(11); - inputs[| 2].setVisible(_filt == 0); - inputs[| 9].setVisible(_filt == 1, _filt == 1); - inputs[| 10].setVisible(_filt == 2, _filt == 2); + inputs[ 2].setVisible(_filt == 0); + inputs[ 9].setVisible(_filt == 1, _filt == 1); + inputs[10].setVisible(_filt == 2, _filt == 2); - inputs[| 5].setVisible(_fclr); - inputs[| 6].setVisible(_fclr); + inputs[ 5].setVisible(_fclr); + inputs[ 6].setVisible(_fclr); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_render_sprite_sheet/node_render_sprite_sheet.gml b/scripts/node_render_sprite_sheet/node_render_sprite_sheet.gml index 42bf6ee06..32a581567 100644 --- a/scripts/node_render_sprite_sheet/node_render_sprite_sheet.gml +++ b/scripts/node_render_sprite_sheet/node_render_sprite_sheet.gml @@ -15,41 +15,41 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) name = "Render Spritesheet"; anim_drawn = array_create(TOTAL_FRAMES + 1, false); - inputs[| 0] = nodeValue_Surface("Sprites", self); + inputs[0] = nodeValue_Surface("Sprites", self); - inputs[| 1] = nodeValue_Enum_Scroll("Sprite set", self, 0, [ "Animation", "Sprite array" ]) + inputs[1] = nodeValue_Enum_Scroll("Sprite set", self, 0, [ "Animation", "Sprite array" ]) .rejectArray(); - inputs[| 2] = nodeValue_Int("Frame step", self, 1, "Number of frames until next sprite. Can be seen as (Step - 1) frame skip.") + inputs[2] = nodeValue_Int("Frame step", self, 1, "Number of frames until next sprite. Can be seen as (Step - 1) frame skip.") .rejectArray(); - inputs[| 3] = nodeValue_Enum_Scroll("Packing type", self, 0, [ new scrollItem("Horizontal", s_node_alignment, 0), + inputs[3] = nodeValue_Enum_Scroll("Packing type", self, 0, [ new scrollItem("Horizontal", s_node_alignment, 0), new scrollItem("Vertical", s_node_alignment, 1), new scrollItem("Grid", s_node_alignment, 2), ]) .rejectArray(); - inputs[| 4] = nodeValue_Int("Grid column", self, 4) + inputs[4] = nodeValue_Int("Grid column", self, 4) .rejectArray(); - inputs[| 5] = nodeValue_Enum_Button("Alignment", self, 0, [ "First", "Middle", "Last" ]) + inputs[5] = nodeValue_Enum_Button("Alignment", self, 0, [ "First", "Middle", "Last" ]) .rejectArray(); - inputs[| 6] = nodeValue_Int("Spacing", self, 0); + inputs[6] = nodeValue_Int("Spacing", self, 0); - inputs[| 7] = nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ]) + inputs[7] = nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ]) - inputs[| 8] = nodeValue_Slider_Range("Range", self, [ 0, 0 ]) + inputs[8] = nodeValue_Slider_Range("Range", self, [ 0, 0 ]) .setTooltip("Starting/ending frames, set end to 0 to default to last frame.") - inputs[| 9] = nodeValue_Vector("Spacing", self, [ 0, 0 ]); + inputs[9] = nodeValue_Vector("Spacing", self, [ 0, 0 ]); - inputs[| 10] = nodeValue_Bool("Overlappable", self, false); + inputs[10] = nodeValue_Bool("Overlappable", self, false); - inputs[| 11] = nodeValue_Bool("Custom Range", self, false); + inputs[11] = nodeValue_Bool("Custom Range", self, false); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Atlas Data", self, VALUE_TYPE.surface, []); + outputs[1] = nodeValue_Output("Atlas Data", self, VALUE_TYPE.surface, []); input_display_list = [ ["Surfaces", false], 0, 1, 2, @@ -71,23 +71,23 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) var pack = getInputData(3); var user = getInputData(11); - if(pack == 0) inputs[| 5].editWidget.data = [ "Top", "Center", "Bottom" ]; - else inputs[| 5].editWidget.data = [ "Left", "Center", "Right" ]; + if(pack == 0) inputs[5].editWidget.data = [ "Top", "Center", "Bottom" ]; + else inputs[5].editWidget.data = [ "Left", "Center", "Right" ]; - inputs[| 2].setVisible(grup == SPRITE_ANIM_GROUP.animation); - inputs[| 4].setVisible(pack == SPRITE_STACK.grid); - inputs[| 5].setVisible(pack != SPRITE_STACK.grid); - inputs[| 6].setVisible(pack != SPRITE_STACK.grid); - inputs[| 9].setVisible(pack == SPRITE_STACK.grid); + inputs[2].setVisible(grup == SPRITE_ANIM_GROUP.animation); + inputs[4].setVisible(pack == SPRITE_STACK.grid); + inputs[5].setVisible(pack != SPRITE_STACK.grid); + inputs[6].setVisible(pack != SPRITE_STACK.grid); + inputs[9].setVisible(pack == SPRITE_STACK.grid); if(grup == SPRITE_ANIM_GROUP.animation) { - inputs[| 8].editWidget.slide_range[0] = FIRST_FRAME + 1; - inputs[| 8].editWidget.slide_range[1] = LAST_FRAME + 1; - if(!user) inputs[| 8].setValueDirect([ FIRST_FRAME + 1, LAST_FRAME + 1], noone, false, 0, false); + inputs[8].editWidget.slide_range[0] = FIRST_FRAME + 1; + inputs[8].editWidget.slide_range[1] = LAST_FRAME + 1; + if(!user) inputs[8].setValueDirect([ FIRST_FRAME + 1, LAST_FRAME + 1], noone, false, 0, false); } else { - inputs[| 8].editWidget.slide_range[0] = 0; - inputs[| 8].editWidget.slide_range[1] = array_length(inpt) - 1; - if(!user) inputs[| 8].setValueDirect([ 0, array_length(inpt) - 1], noone, false, 0, false); + inputs[8].editWidget.slide_range[0] = 0; + inputs[8].editWidget.slide_range[1] = array_length(inpt) - 1; + if(!user) inputs[8].setValueDirect([ 0, array_length(inpt) - 1], noone, false, 0, false); } update_on_frame = grup == 0; @@ -125,8 +125,8 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) var cDep = attrDepth(); if(!is_array(inpt)) { - outputs[| 0].setValue(surface_clone(inpt)); - outputs[| 1].setValue([]); + outputs[0].setValue(surface_clone(inpt)); + outputs[1].setValue([]); return; } @@ -308,8 +308,8 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) surface_reset_shader(); #endregion - outputs[| 0].setValue(_surf); - outputs[| 1].setValue(array_spread(atlases)); + outputs[0].setValue(_surf); + outputs[1].setValue(array_spread(atlases)); } #endregion anim_curr_w = -1; @@ -328,7 +328,7 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) //var ovlp = getInputData(10); var user = getInputData(11); - var _out = outputs[| 0].getValue(); + var _out = outputs[0].getValue(); var cDep = attrDepth(); printIf(log, $"Init animation"); @@ -397,8 +397,8 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) } if(!arr) _out = array_safe_get_fast(_out, 0); - outputs[| 0].setValue(_out); - outputs[| 1].setValue(array_spread(atlases)); + outputs[0].setValue(_out); + outputs[1].setValue(array_spread(atlases)); printIf(log, $"Surface generated [{ww}, {hh}]"); } #endregion @@ -455,7 +455,7 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) } #endregion - var oupt = outputs[| 0].getValue(); + var oupt = outputs[0].getValue(); var _frame = floor((CURRENT_FRAME - _st) / skip); var drawn = false; var px = padd[2]; @@ -544,6 +544,6 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) } #endregion if(drawn) array_safe_set(anim_drawn, CURRENT_FRAME, true); - outputs[| 1].setValue(array_spread(atlases)); + outputs[1].setValue(array_spread(atlases)); } #endregion } \ No newline at end of file diff --git a/scripts/node_repeat/node_repeat.gml b/scripts/node_repeat/node_repeat.gml index af6e05406..25751c5cf 100644 --- a/scripts/node_repeat/node_repeat.gml +++ b/scripts/node_repeat/node_repeat.gml @@ -7,9 +7,9 @@ function Node_create_Repeat(_x, _y, _group = noone, _param = {}) { switch(query) { case "repeat polar" : case "repeat circular" : - _node.inputs[| 3].setValue(2); - _node.inputs[| 9].unit.setMode(VALUE_UNIT.reference); - _node.inputs[| 9].setValueDirect([ 0.5, 0.5 ]); + _node.inputs[3].setValue(2); + _node.inputs[9].unit.setMode(VALUE_UNIT.reference); + _node.inputs[9].setValueDirect([ 0.5, 0.5 ]); break; } @@ -20,96 +20,96 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co name = "Repeat"; dimension_index = 1; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Dimension(self); + inputs[1] = nodeValue_Dimension(self); - inputs[| 2] = nodeValue_Int("Amount", self, 2) + inputs[2] = nodeValue_Int("Amount", self, 2) .rejectArray(); - inputs[| 3] = nodeValue_Enum_Scroll("Pattern", self, 0, [ new scrollItem("Linear", s_node_repeat_axis, 0), + inputs[3] = nodeValue_Enum_Scroll("Pattern", self, 0, [ new scrollItem("Linear", s_node_repeat_axis, 0), new scrollItem("Grid", s_node_repeat_axis, 1), new scrollItem("Circular", s_node_repeat_axis, 2), ]); - inputs[| 4] = nodeValue_Vector("Shift position", self, [ DEF_SURF_W / 2, 0 ]) + inputs[4] = nodeValue_Vector("Shift position", self, [ DEF_SURF_W / 2, 0 ]) .setUnitRef(function() { return getDimension(); }); - inputs[| 5] = nodeValue_Rotation_Range("Repeat rotation", self, [0, 0]); + inputs[5] = nodeValue_Rotation_Range("Repeat rotation", self, [0, 0]); - inputs[| 6] = nodeValue_Float("Scale multiply", self, 1); + inputs[6] = nodeValue_Float("Scale multiply", self, 1); - inputs[| 7] = nodeValue_Rotation_Range("Angle range", self, [0, 360]); + inputs[7] = nodeValue_Rotation_Range("Angle range", self, [0, 360]); - inputs[| 8] = nodeValue_Float("Radius", self, 1); + inputs[8] = nodeValue_Float("Radius", self, 1); - inputs[| 9] = nodeValue_Vector("Start position", self, [0, 0]) + inputs[9] = nodeValue_Vector("Start position", self, [0, 0]) .setUnitRef(function(index) { return getInputData(1); }); - inputs[| 10] = nodeValue("Scale over copy", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 ); + inputs[10] = nodeValue("Scale over copy", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 ); - inputs[| 11] = nodeValue_PathNode("Path", self, noone, "Make each copy follow along path." ) + inputs[11] = nodeValue_PathNode("Path", self, noone, "Make each copy follow along path." ) .setVisible(true, true); - inputs[| 12] = nodeValue_Slider_Range("Path range", self, [0, 1]) + inputs[12] = nodeValue_Slider_Range("Path range", self, [0, 1]) .setTooltip("Range of the path to follow."); - inputs[| 13] = nodeValue_Float("Path shift", self, 0); + inputs[13] = nodeValue_Float("Path shift", self, 0); - inputs[| 14] = nodeValue_Gradient("Color over copy", self, new gradientObject(cola(c_white))) + inputs[14] = nodeValue_Gradient("Color over copy", self, new gradientObject(cola(c_white))) .setMappable(30); - inputs[| 15] = nodeValue("Alpha over copy", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 ); + inputs[15] = nodeValue("Alpha over copy", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 ); - inputs[| 16] = nodeValue_Enum_Button("Array select", self, 0, [ "Order", "Random", "Spread" ]) + inputs[16] = nodeValue_Enum_Button("Array select", self, 0, [ "Order", "Random", "Spread" ]) .setTooltip("Whether to select image from an array in order, at random, or spread or each image to one output."); - inputs[| 17] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 17].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[17] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[17].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 18] = nodeValue_Int("Column", self, 4); + inputs[18] = nodeValue_Int("Column", self, 4); - inputs[| 19] = nodeValue_Vector("Column shift", self, [0, DEF_SURF_H / 2]) + inputs[19] = nodeValue_Vector("Column shift", self, [0, DEF_SURF_H / 2]) .setUnitRef(function() { return getDimension(); }); - inputs[| 20] = nodeValue_Float("Animator midpoint", self, 0.5) + inputs[20] = nodeValue_Float("Animator midpoint", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 2, 0.01] }); - inputs[| 21] = nodeValue_Float("Animator range", self, 0.1) + inputs[21] = nodeValue_Float("Animator range", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 22] = nodeValue_Vector("Animator position", self, [ 0, 0 ]); + inputs[22] = nodeValue_Vector("Animator position", self, [ 0, 0 ]); - inputs[| 23] = nodeValue_Rotation("Animator rotation", self, 0); + inputs[23] = nodeValue_Rotation("Animator rotation", self, 0); - inputs[| 24] = nodeValue_Vector("Animator scale", self, [ 0, 0 ]); + inputs[24] = nodeValue_Vector("Animator scale", self, [ 0, 0 ]); - inputs[| 25] = nodeValue("Animator falloff", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_10); + inputs[25] = nodeValue("Animator falloff", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_10); - inputs[| 26] = nodeValue_Enum_Button("Stack", self, 0, [ "None", "X", "Y" ]) + inputs[26] = nodeValue_Enum_Button("Stack", self, 0, [ "None", "X", "Y" ]) .setTooltip("Place each copy next to each other, taking surface dimension into account."); - inputs[| 27] = nodeValue_Color("Animator blend", self, cola(c_white)); + inputs[27] = nodeValue_Color("Animator blend", self, cola(c_white)); - inputs[| 28] = nodeValue_Float("Animator alpha", self, 1) + inputs[28] = nodeValue_Float("Animator alpha", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 29] = nodeValue_Bool("Animator", self, false) + inputs[29] = nodeValue_Bool("Animator", self, false) ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 30] = nodeValueMap("Gradient map", self); + inputs[30] = nodeValueMap("Gradient map", self); - inputs[| 31] = nodeValueGradientRange("Gradient map range", self, inputs[| 14]); + inputs[31] = nodeValueGradientRange("Gradient map range", self, inputs[14]); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 32] = nodeValue_Rotation("Start rotation", self, 0); + inputs[32] = nodeValue_Rotation("Start rotation", self, 0); - inputs[| 33] = nodeValue_Rotation("Rotation", self, 0); + inputs[33] = nodeValue_Rotation("Rotation", self, 0); - inputs[| 34] = nodeValue_Enum_Scroll("Blend Mode", self, 0, [ "Normal", "Additive", "Maximum" ]); + inputs[34] = nodeValue_Enum_Scroll("Blend Mode", self, 0, [ "Normal", "Additive", "Maximum" ]); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Surfaces", true], 0, 1, 16, 17, @@ -129,7 +129,7 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co PROCESSOR_OVERLAY_CHECK var _hov = false; - var hv = inputs[| 9].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; + var hv = inputs[9].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; var _pat = current_data[3]; var _spos = current_data[9]; @@ -137,10 +137,10 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co var px = _x + _spos[0] * _s; var py = _y + _spos[1] * _s; - if(_pat == 0 || _pat == 1) { var hv = inputs[| 4].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; } - else if(_pat == 2) { var hv = inputs[| 8].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; } + if(_pat == 0 || _pat == 1) { var hv = inputs[4].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; } + else if(_pat == 2) { var hv = inputs[8].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; } - var hv = inputs[| 31].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[1]); active &= !hv; _hov |= hv; + var hv = inputs[31].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[1]); active &= !hv; _hov |= hv; return _hov; } @@ -149,17 +149,17 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co var _arr = getSingleValue(16); var _pat = getSingleValue(3); - inputs[| 0].setArrayDepth(_arr != 2); + inputs[ 0].setArrayDepth(_arr != 2); - inputs[| 4].setVisible( _pat == 0 || _pat == 1); - inputs[| 7].setVisible( _pat == 2); - inputs[| 8].setVisible( _pat == 2); - inputs[| 18].setVisible( _pat == 1); - inputs[| 19].setVisible( _pat == 1); - inputs[| 26].setVisible( _pat == 0); - inputs[| 32].setVisible( _pat == 2); + inputs[ 4].setVisible( _pat == 0 || _pat == 1); + inputs[ 7].setVisible( _pat == 2); + inputs[ 8].setVisible( _pat == 2); + inputs[18].setVisible( _pat == 1); + inputs[19].setVisible( _pat == 1); + inputs[26].setVisible( _pat == 0); + inputs[32].setVisible( _pat == 2); - inputs[| 14].mappableStep(); + inputs[14].mappableStep(); } static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -297,7 +297,7 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co } var pos = point_rotate(-sw / 2, -sh / 2, 0, 0, rot); - var cc = evaluate_gradient_map(i / (_amo - 1), _grad, _grad_map, _grad_range, inputs[| 14]); + var cc = evaluate_gradient_map(i / (_amo - 1), _grad, _grad_map, _grad_range, inputs[14]); var aa = _color_get_alpha(cc); if(_an_use) { diff --git a/scripts/node_repeat_texture/node_repeat_texture.gml b/scripts/node_repeat_texture/node_repeat_texture.gml index 9b1df124d..76da7981b 100644 --- a/scripts/node_repeat_texture/node_repeat_texture.gml +++ b/scripts/node_repeat_texture/node_repeat_texture.gml @@ -2,16 +2,16 @@ function Node_Repeat_Texture(_x, _y, _group = noone) : Node_Processor(_x, _y, _g name = "Repeat Texture"; dimension_index = 1; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Vector("Target dimension", self, DEF_SURF); + inputs[1] = nodeValue_Vector("Target dimension", self, DEF_SURF); - inputs[| 2] = nodeValue_Enum_Scroll("Type", self, 1, [ "Tile", "Scatter", "Cell" ]); + inputs[2] = nodeValue_Enum_Scroll("Type", self, 1, [ "Tile", "Scatter", "Cell" ]); - inputs[| 3] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }) + inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }) - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 3, ["Surfaces", false], 0, diff --git a/scripts/node_rgb_channel/node_rgb_channel.gml b/scripts/node_rgb_channel/node_rgb_channel.gml index 0a869c8e7..2a474fc45 100644 --- a/scripts/node_rgb_channel/node_rgb_channel.gml +++ b/scripts/node_rgb_channel/node_rgb_channel.gml @@ -2,30 +2,30 @@ function Node_RGB_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou name = "RGBA Extract"; batch_output = false; - inputs[| 0] = nodeValue_Surface("Surface In", self); + inputs[0] = nodeValue_Surface("Surface In", self); - inputs[| 1] = nodeValue_Enum_Scroll("Output Type", self, 0, [ "Channel value", "Greyscale" ]); + inputs[1] = nodeValue_Enum_Scroll("Output Type", self, 0, [ "Channel value", "Greyscale" ]); - inputs[| 2] = nodeValue_Bool("Keep Alpha", self, false); + inputs[2] = nodeValue_Bool("Keep Alpha", self, false); - inputs[| 3] = nodeValue_Bool("Output Array", self, false); + inputs[3] = nodeValue_Bool("Output Array", self, false); - outputs[| 0] = nodeValue_Output("Red", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Green", self, VALUE_TYPE.surface, noone); - outputs[| 2] = nodeValue_Output("Blue", self, VALUE_TYPE.surface, noone); - outputs[| 3] = nodeValue_Output("Alpha", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Red", self, VALUE_TYPE.surface, noone); + outputs[1] = nodeValue_Output("Green", self, VALUE_TYPE.surface, noone); + outputs[2] = nodeValue_Output("Blue", self, VALUE_TYPE.surface, noone); + outputs[3] = nodeValue_Output("Alpha", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); static step = function() { #region var _arr = getInputData(3); - outputs[| 0].name = _arr? "RGBA" : "Red"; - outputs[| 0].setArrayDepth(_arr); + outputs[0].name = _arr? "RGBA" : "Red"; + outputs[0].setArrayDepth(_arr); - outputs[| 1].setVisible(!_arr, !_arr); - outputs[| 2].setVisible(!_arr, !_arr); - outputs[| 3].setVisible(!_arr, !_arr); + outputs[1].setVisible(!_arr, !_arr); + outputs[2].setVisible(!_arr, !_arr); + outputs[3].setVisible(!_arr, !_arr); } #endregion static setShader = function(index, grey, _alp) { diff --git a/scripts/node_rigid_activate/node_rigid_activate.gml b/scripts/node_rigid_activate/node_rigid_activate.gml index baaca3bb8..514dcdc60 100644 --- a/scripts/node_rigid_activate/node_rigid_activate.gml +++ b/scripts/node_rigid_activate/node_rigid_activate.gml @@ -6,13 +6,13 @@ function Node_Rigid_Activate(_x, _y, _group = noone) : Node(_x, _y, _group) cons manual_ungroupable = false; - inputs[| 0] = nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone) + inputs[0] = nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Bool("Physics activated", self, true) + inputs[1] = nodeValue_Bool("Physics activated", self, true) .rejectArray(); - outputs[| 0] = nodeValue_Output("Object", self, VALUE_TYPE.rigid, noone); + outputs[0] = nodeValue_Output("Object", self, VALUE_TYPE.rigid, noone); input_display_list = [ ["Object", true], 0, @@ -21,7 +21,7 @@ function Node_Rigid_Activate(_x, _y, _group = noone) : Node(_x, _y, _group) cons static update = function(frame = CURRENT_FRAME) { var _obj = getInputData(0); - outputs[| 0].setValue(_obj); + outputs[0].setValue(_obj); RETURN_ON_REST diff --git a/scripts/node_rigid_force_apply/node_rigid_force_apply.gml b/scripts/node_rigid_force_apply/node_rigid_force_apply.gml index dfda0c53f..122b0fbf2 100644 --- a/scripts/node_rigid_force_apply/node_rigid_force_apply.gml +++ b/scripts/node_rigid_force_apply/node_rigid_force_apply.gml @@ -6,35 +6,35 @@ function Node_Rigid_Force_Apply(_x, _y, _group = noone) : Node(_x, _y, _group) c manual_ungroupable = false; - inputs[| 0] = nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone) + inputs[0] = nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Enum_Scroll("Force type", self, 0, [ "Constant", "Impulse", "Torque", "Explode" ]) + inputs[1] = nodeValue_Enum_Scroll("Force type", self, 0, [ "Constant", "Impulse", "Torque", "Explode" ]) .rejectArray(); - inputs[| 2] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[2] = nodeValue_Vector("Position", self, [ 0, 0 ]) .rejectArray(); - inputs[| 3] = nodeValue_Float("Torque", self, 0) + inputs[3] = nodeValue_Float("Torque", self, 0) .rejectArray(); - inputs[| 4] = nodeValue_Int("Apply frame", self, 0, "Frame index to apply force.") + inputs[4] = nodeValue_Int("Apply frame", self, 0, "Frame index to apply force.") .rejectArray(); - inputs[| 5] = nodeValue_Vector("Force", self, [ 0.1, 0 ]) + inputs[5] = nodeValue_Vector("Force", self, [ 0.1, 0 ]) .rejectArray(); - inputs[| 6] = nodeValue_Enum_Button("Scope", self, 0, [ "Global", "Local" ]) + inputs[6] = nodeValue_Enum_Button("Scope", self, 0, [ "Global", "Local" ]) .rejectArray(); - inputs[| 7] = nodeValue_Float("Strength", self, 1) + inputs[7] = nodeValue_Float("Strength", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.01] }) .rejectArray(); - inputs[| 8] = nodeValue_Float("Range", self, 8) + inputs[8] = nodeValue_Float("Range", self, 8) .rejectArray(); - outputs[| 0] = nodeValue_Output("Object", self, VALUE_TYPE.rigid, noone); + outputs[0] = nodeValue_Output("Object", self, VALUE_TYPE.rigid, noone); input_display_list = [ ["Object", true], 0, @@ -72,8 +72,8 @@ function Node_Rigid_Force_Apply(_x, _y, _group = noone) : Node(_x, _y, _group) c draw_line_width2(px, py, fx, fy, 8, 2); draw_set_alpha(1); - inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 5].drawOverlay(hover, active, px, py, _s * attributes.display_scale, _mx, _my, _snx, _sny, 0, 10); + inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[5].drawOverlay(hover, active, px, py, _s * attributes.display_scale, _mx, _my, _snx, _sny, 0, 10); } else if(_typ == 3) { var _rad = getInputData(8); @@ -82,26 +82,26 @@ function Node_Rigid_Force_Apply(_x, _y, _group = noone) : Node(_x, _y, _group) c draw_circle_prec(px, py, _rad * _s, 1); draw_set_alpha(1); - inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 8].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); + inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[8].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); } else - inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static step = function() { var _typ = getInputData(1); - inputs[| 3].setVisible(_typ == 2); - inputs[| 4].setVisible(_typ > 0); - inputs[| 5].setVisible(_typ == 0 || _typ == 1); - inputs[| 6].setVisible(_typ != 3); - inputs[| 7].setVisible(_typ == 3); - inputs[| 8].setVisible(_typ == 3); + inputs[3].setVisible(_typ == 2); + inputs[4].setVisible(_typ > 0); + inputs[5].setVisible(_typ == 0 || _typ == 1); + inputs[6].setVisible(_typ != 3); + inputs[7].setVisible(_typ == 3); + inputs[8].setVisible(_typ == 3); } static update = function(frame = CURRENT_FRAME) { var _obj = getInputData(0); - outputs[| 0].setValue(_obj); + outputs[0].setValue(_obj); RETURN_ON_REST diff --git a/scripts/node_rigid_global/node_rigid_global.gml b/scripts/node_rigid_global/node_rigid_global.gml index 0f932c1af..270aedadb 100644 --- a/scripts/node_rigid_global/node_rigid_global.gml +++ b/scripts/node_rigid_global/node_rigid_global.gml @@ -8,7 +8,7 @@ function Node_Rigid_Global(_x, _y, _group = noone) : Node(_x, _y, _group) constr object = noone; - inputs[| 0] = nodeValue_Vector("Gravity", self, [ 0, 10 ]); + inputs[0] = nodeValue_Vector("Gravity", self, [ 0, 10 ]); current_gra = [0, 0]; diff --git a/scripts/node_rigid_group_inline/node_rigid_group_inline.gml b/scripts/node_rigid_group_inline/node_rigid_group_inline.gml index 901b6b7cd..d8b3e9cbe 100644 --- a/scripts/node_rigid_group_inline/node_rigid_group_inline.gml +++ b/scripts/node_rigid_group_inline/node_rigid_group_inline.gml @@ -6,13 +6,13 @@ function Node_Rigid_Group_Inline(_x, _y, _group = noone) : Node_Collection_Inlin is_simulation = true; manual_ungroupable = false; - inputs[| 0] = nodeValue_Vector("Gravity", self, [ 0, 10 ]); + inputs[0] = nodeValue_Vector("Gravity", self, [ 0, 10 ]); if(NODE_NEW_MANUAL) { var _object = nodeBuild("Node_Rigid_Object", x, y); var _output = nodeBuild("Node_Rigid_Render", x + 160, y); - _output.dummy_input.setFrom(_object.outputs[| 0]) + _output.dummy_input.setFrom(_object.outputs[0]) addNode(_object); addNode(_output); diff --git a/scripts/node_rigid_object/node_rigid_object.gml b/scripts/node_rigid_object/node_rigid_object.gml index 1033c7cac..9839a126d 100644 --- a/scripts/node_rigid_object/node_rigid_object.gml +++ b/scripts/node_rigid_object/node_rigid_object.gml @@ -15,56 +15,56 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr object = []; attributes.mesh = []; - inputs[| 0] = nodeValue_Bool("Affect by force", self, true) + inputs[0] = nodeValue_Bool("Affect by force", self, true) .rejectArray() .setAnimable(false); - inputs[| 1] = nodeValue_Float("Weight", self, 0.5) + inputs[1] = nodeValue_Float("Weight", self, 0.5) .rejectArray() .setAnimable(false); - inputs[| 2] = nodeValue_Float("Contact friction", self, 0.2) + inputs[2] = nodeValue_Float("Contact friction", self, 0.2) .rejectArray() .setAnimable(false); - inputs[| 3] = nodeValue_Float("Air resistance", self, 0.2) + inputs[3] = nodeValue_Float("Air resistance", self, 0.2) .rejectArray() .setAnimable(false); - inputs[| 4] = nodeValue_Float("Rotation resistance", self, 0.2) + inputs[4] = nodeValue_Float("Rotation resistance", self, 0.2) .rejectArray() .setAnimable(false); - inputs[| 5] = nodeValue_Enum_Scroll("Shape", self, 0, [ new scrollItem("Box", s_node_shape_rectangle, 0), new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Custom", s_node_shape_misc, 1) ]) + inputs[5] = nodeValue_Enum_Scroll("Shape", self, 0, [ new scrollItem("Box", s_node_shape_rectangle, 0), new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Custom", s_node_shape_misc, 1) ]) .rejectArray() .setAnimable(false); - inputs[| 6] = nodeValue_Surface("Texture", self) + inputs[6] = nodeValue_Surface("Texture", self) .setAnimable(false); - inputs[| 7] = nodeValue_Vector("Start position", self, [ 16, 16 ]) + inputs[7] = nodeValue_Vector("Start position", self, [ 16, 16 ]) .setAnimable(false); - inputs[| 8] = nodeValue_Bool("Spawn", self, true, "Make object spawn when start.") + inputs[8] = nodeValue_Bool("Spawn", self, true, "Make object spawn when start.") .rejectArray() .setAnimable(false); - inputs[| 9] = nodeValue_Trigger("Generate mesh", self, false ) + inputs[9] = nodeValue_Trigger("Generate mesh", self, false ) .setDisplay(VALUE_DISPLAY.button, { name: "Generate", UI : true, onClick: function() { generateAllMesh(); } }); - inputs[| 10] = nodeValue_Float("Mesh expansion", self, 0) + inputs[10] = nodeValue_Float("Mesh expansion", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -2, 2, 0.1 ] }) .rejectArray() .setAnimable(false); - inputs[| 11] = nodeValue_Bool("Add pixel collider", self, true) + inputs[11] = nodeValue_Bool("Add pixel collider", self, true) .rejectArray() .setAnimable(false); - inputs[| 12] = nodeValue_Int("Collision group", self, 1) + inputs[12] = nodeValue_Int("Collision group", self, 1) .rejectArray() - outputs[| 0] = nodeValue_Output("Object", self, VALUE_TYPE.rigid, object); + outputs[0] = nodeValue_Output("Object", self, VALUE_TYPE.rigid, object); input_display_list = [ 8, 12, ["Texture", false], 6, @@ -166,7 +166,7 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr } else drawOverlayPreviewSingle(0, _x, _y, _s, _pr_x, _pr_y, _tex); - return inputs[| 7].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + return inputs[7].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } #endregion static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region @@ -286,7 +286,7 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr } } - var a = inputs[| 7].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[7].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; return active; } #endregion @@ -687,15 +687,15 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr static update = function(frame = CURRENT_FRAME) { #region if(IS_FIRST_FRAME) reset(); - outputs[| 0].setValue(object); + outputs[0].setValue(object); } #endregion static step = function() { #region var _shp = getInputData(5); - inputs[| 9].setVisible(_shp == 2); - inputs[| 10].setVisible(_shp == 2); - inputs[| 11].setVisible(_shp == 2); + inputs[ 9].setVisible(_shp == 2); + inputs[10].setVisible(_shp == 2); + inputs[11].setVisible(_shp == 2); tools = _shp == 2? mesh_tools : -1; diff --git a/scripts/node_rigid_object_spawner/node_rigid_object_spawner.gml b/scripts/node_rigid_object_spawner/node_rigid_object_spawner.gml index 826c636da..c60fd6c1f 100644 --- a/scripts/node_rigid_object_spawner/node_rigid_object_spawner.gml +++ b/scripts/node_rigid_object_spawner/node_rigid_object_spawner.gml @@ -8,31 +8,31 @@ function Node_Rigid_Object_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group object = []; - inputs[| 0] = nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone) + inputs[0] = nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Area("Spawn area", self, DEF_AREA) + inputs[1] = nodeValue_Area("Spawn area", self, DEF_AREA) .rejectArray(); - inputs[| 2] = nodeValue_Enum_Button("Spawn type", self, 0, [ "Stream", "Burst" ]) + inputs[2] = nodeValue_Enum_Button("Spawn type", self, 0, [ "Stream", "Burst" ]) .rejectArray(); - inputs[| 3] = nodeValue_Int("Spawn delay", self, 4) + inputs[3] = nodeValue_Int("Spawn delay", self, 4) .rejectArray(); - inputs[| 4] = nodeValue_Int("Spawn amount", self, 1) + inputs[4] = nodeValue_Int("Spawn amount", self, 1) .rejectArray(); - inputs[| 5] = nodeValue_Int("Spawn frame", self, 0) + inputs[5] = nodeValue_Int("Spawn frame", self, 0) .rejectArray(); - inputs[| 6] = nodeValue_Bool("Spawn", self, true) + inputs[6] = nodeValue_Bool("Spawn", self, true) .rejectArray(); - inputs[| 7] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 7].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[7] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[7].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - outputs[| 0] = nodeValue_Output("Object", self, VALUE_TYPE.rigid, object); + outputs[0] = nodeValue_Output("Object", self, VALUE_TYPE.rigid, object); input_display_list = [ 0, 7, ["Spawn", false], 6, 1, 2, 3, 5, 4, @@ -59,7 +59,7 @@ function Node_Rigid_Object_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group active &= !_hov; } - return inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + return inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static reset = function() { @@ -70,8 +70,8 @@ function Node_Rigid_Object_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group static step = function() { var _typ = getInputData(2); - inputs[| 3].setVisible(_typ == 0); - inputs[| 5].setVisible(_typ == 1); + inputs[3].setVisible(_typ == 0); + inputs[5].setVisible(_typ == 1); } static spawn = function(seed = 0) { @@ -111,7 +111,7 @@ function Node_Rigid_Object_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group else if(_typ == 1 && CURRENT_FRAME == _frm) spawn(_sed); - outputs[| 0].setValue(object); + outputs[0].setValue(object); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_rigid_override/node_rigid_override.gml b/scripts/node_rigid_override/node_rigid_override.gml index 29117eed4..da7cc4d3c 100644 --- a/scripts/node_rigid_override/node_rigid_override.gml +++ b/scripts/node_rigid_override/node_rigid_override.gml @@ -7,26 +7,26 @@ function Node_Rigid_Override(_x, _y, _group = noone) : Node(_x, _y, _group) cons manual_ungroupable = false; setDimension(96, 48); - inputs[| 0] = nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone ) + inputs[0] = nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone ) .setVisible(true, true); - inputs[| 1] = nodeValue_Vector("Positions", self, [0, 0] ); + inputs[1] = nodeValue_Vector("Positions", self, [0, 0] ); - inputs[| 2] = nodeValue_Vector("Scales", self, [0, 0] ); + inputs[2] = nodeValue_Vector("Scales", self, [0, 0] ); - inputs[| 3] = nodeValue_Float("Rotations", self, 0 ); + inputs[3] = nodeValue_Float("Rotations", self, 0 ); - inputs[| 4] = nodeValue_Color("Blends", self, 0 ); + inputs[4] = nodeValue_Color("Blends", self, 0 ); - inputs[| 5] = nodeValue_Float("Alpha", self, 0 ); + inputs[5] = nodeValue_Float("Alpha", self, 0 ); - inputs[| 6] = nodeValue_Vector("Velocity", self, [0, 0] ); + inputs[6] = nodeValue_Vector("Velocity", self, [0, 0] ); - outputs[| 0] = nodeValue_Output("Object", self, VALUE_TYPE.rigid, noone ); + outputs[0] = nodeValue_Output("Object", self, VALUE_TYPE.rigid, noone ); static update = function(frame = CURRENT_FRAME) { var objs = getInputData(0); - outputs[| 0].setValue(objs); + outputs[0].setValue(objs); var _pos = getInputData(1); var _sca = getInputData(2); diff --git a/scripts/node_rigid_render/node_rigid_render.gml b/scripts/node_rigid_render/node_rigid_render.gml index 507f1c078..57106cfa2 100644 --- a/scripts/node_rigid_render/node_rigid_render.gml +++ b/scripts/node_rigid_render/node_rigid_render.gml @@ -8,11 +8,11 @@ function Node_Rigid_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constr //use_cache = CACHE_USE.auto; update_on_frame = true; - inputs[| 0] = nodeValue_Vector("Render dimension", self, DEF_SURF); + inputs[0] = nodeValue_Vector("Render dimension", self, DEF_SURF); - inputs[| 1] = nodeValue_Bool("Round position", self, false) + inputs[1] = nodeValue_Bool("Round position", self, false) - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); @@ -29,11 +29,11 @@ function Node_Rigid_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constr static onInspector2Update = function() { clearCache(); } static createNewInput = function() { - var index = ds_list_size(inputs); - inputs[| index] = nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone ) + var index = array_length(inputs); + inputs[index] = nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone ) .setVisible(true, true); - return inputs[| index]; + return inputs[index]; } setDynamicInput(1, true, VALUE_TYPE.rigid); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region @@ -59,10 +59,10 @@ function Node_Rigid_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constr // return; var _rnd = getInputData(1); - var _outSurf = outputs[| 0].getValue(); + var _outSurf = outputs[0].getValue(); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); - outputs[| 0].setValue(_outSurf); + outputs[0].setValue(_outSurf); surface_set_target(_outSurf); DRAW_CLEAR @@ -72,7 +72,7 @@ function Node_Rigid_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constr draw_set_color(c_white); physics_world_draw_debug(flag); } else { - for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) { + for( var i = input_fix_len; i < array_length(inputs); i++ ) { var objNode = getInputData(i); if(!is_array(objNode)) continue; @@ -101,7 +101,7 @@ function Node_Rigid_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constr } #endregion static getPreviewValues = function() { #region - var _surf = outputs[| 0].getValue(); + var _surf = outputs[0].getValue(); if(is_surface(_surf)) return _surf; return preview_surface; } #endregion diff --git a/scripts/node_rigid_render_output/node_rigid_render_output.gml b/scripts/node_rigid_render_output/node_rigid_render_output.gml index ad6242265..702bbafd4 100644 --- a/scripts/node_rigid_render_output/node_rigid_render_output.gml +++ b/scripts/node_rigid_render_output/node_rigid_render_output.gml @@ -7,10 +7,10 @@ function Node_Rigid_Render_Output(_x, _y, _group = noone) : Node_Group_Output(_x previewable = true; - inputs[| 0] = nodeValue_Vector("Render dimension", self, DEF_SURF) + inputs[0] = nodeValue_Vector("Render dimension", self, DEF_SURF) .rejectArray(); - inputs[| 1] = nodeValue_Bool("Round position", self, false) + inputs[1] = nodeValue_Bool("Round position", self, false) attribute_surface_depth(); @@ -22,11 +22,11 @@ function Node_Rigid_Render_Output(_x, _y, _group = noone) : Node_Group_Output(_x })]); static createNewInput = function() { - var index = ds_list_size(inputs); - inputs[| index] = nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone ) + var index = array_length(inputs); + inputs[index] = nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone ) .setVisible(true, true); - return inputs[| index]; + return inputs[index]; } setDynamicInput(1, true, VALUE_TYPE.rigid); static createOutput = function() { #region @@ -34,14 +34,14 @@ function Node_Rigid_Render_Output(_x, _y, _group = noone) : Node_Group_Output(_x if(!is_struct(group)) return; if(!is_undefined(outParent)) - ds_list_remove(group.outputs, outParent); + array_remove(group.outputs, outParent); outParent = nodeValue("Rendered", group, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone) .uncache() .setVisible(true, true); outParent.from = self; - ds_list_add(group.outputs, outParent); + array_push(group.outputs, outParent); group.refreshNodeDisplay(); group.sortIO(); } if(!LOADING && !APPENDING) createOutput(); #endregion @@ -79,7 +79,7 @@ function Node_Rigid_Render_Output(_x, _y, _group = noone) : Node_Group_Output(_x draw_set_color(c_white); physics_world_draw_debug(flag); } else { - for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i++ ) { + for( var i = input_fix_len; i < array_length(inputs) - 1; i++ ) { var objNode = getInputData(i); if(!is_array(objNode)) continue; diff --git a/scripts/node_rigid_variable/node_rigid_variable.gml b/scripts/node_rigid_variable/node_rigid_variable.gml index e768c1b6d..d7a100cdf 100644 --- a/scripts/node_rigid_variable/node_rigid_variable.gml +++ b/scripts/node_rigid_variable/node_rigid_variable.gml @@ -8,49 +8,49 @@ function Node_Rigid_Variable(_x, _y, _group = noone) : Node(_x, _y, _group) cons setDimension(96, 48); - inputs[| 0] = nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone ) + inputs[0] = nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone ) .setVisible(true, true); input_display_list = [ 0 ]; - outputs[| 0] = nodeValue_Output("Positions", self, VALUE_TYPE.float, [ 0, 0 ] ) + outputs[0] = nodeValue_Output("Positions", self, VALUE_TYPE.float, [ 0, 0 ] ) .setDisplay(VALUE_DISPLAY.vector) .setVisible(false); - outputs[| 1] = nodeValue_Output("Scales", self, VALUE_TYPE.float, [ 0, 0 ] ) + outputs[1] = nodeValue_Output("Scales", self, VALUE_TYPE.float, [ 0, 0 ] ) .setDisplay(VALUE_DISPLAY.vector) .setVisible(false); - outputs[| 2] = nodeValue_Output("Rotations", self, VALUE_TYPE.float, 0 ) + outputs[2] = nodeValue_Output("Rotations", self, VALUE_TYPE.float, 0 ) .setVisible(false); - outputs[| 3] = nodeValue_Output("Blends", self, VALUE_TYPE.color, 0 ) + outputs[3] = nodeValue_Output("Blends", self, VALUE_TYPE.color, 0 ) .setVisible(false); - outputs[| 4] = nodeValue_Output("Alpha", self, VALUE_TYPE.float, 0 ) + outputs[4] = nodeValue_Output("Alpha", self, VALUE_TYPE.float, 0 ) .setVisible(false); - outputs[| 5] = nodeValue_Output("Velocity", self, VALUE_TYPE.float, [ 0, 0 ] ) + outputs[5] = nodeValue_Output("Velocity", self, VALUE_TYPE.float, [ 0, 0 ] ) .setDisplay(VALUE_DISPLAY.vector) .setVisible(false); - outputs[| 6] = nodeValue_Output("Center of mass", self, VALUE_TYPE.float, [ 0, 0 ] ) + outputs[6] = nodeValue_Output("Center of mass", self, VALUE_TYPE.float, [ 0, 0 ] ) .setDisplay(VALUE_DISPLAY.vector) .setVisible(false); - outputs[| 7] = nodeValue_Output("Velocity magnitude", self, VALUE_TYPE.float, 0 ) + outputs[7] = nodeValue_Output("Velocity magnitude", self, VALUE_TYPE.float, 0 ) .setDisplay(VALUE_DISPLAY.vector) .setVisible(false); static update = function(frame = CURRENT_FRAME) { var objs = getInputData(0); - outputs[| 0].setValue(objs); + outputs[0].setValue(objs); var _get = []; var _val = []; - for( var i = 0; i < ds_list_size(outputs); i++ ) { - _get[i] = outputs[| i].visible; + for( var i = 0; i < array_length(outputs); i++ ) { + _get[i] = outputs[i].visible; _val[i] = []; if(_get[i]) _val[i] = array_create(array_length(objs)); } @@ -70,8 +70,8 @@ function Node_Rigid_Variable(_x, _y, _group = noone) : Node(_x, _y, _group) cons if(_get[7]) _val[7][i] = point_distance(0, 0, obj.phy_linear_velocity_x, obj.phy_linear_velocity_y); } - for( var i = 0; i < ds_list_size(outputs); i++ ) - if(_get[i]) outputs[| i].setValue(_val[i]); + for( var i = 0; i < array_length(outputs); i++ ) + if(_get[i]) outputs[i].setValue(_val[i]); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_rigid_wall/node_rigid_wall.gml b/scripts/node_rigid_wall/node_rigid_wall.gml index d8925529b..882a1874b 100644 --- a/scripts/node_rigid_wall/node_rigid_wall.gml +++ b/scripts/node_rigid_wall/node_rigid_wall.gml @@ -8,13 +8,13 @@ function Node_Rigid_Wall(_x, _y, _group = noone) : Node(_x, _y, _group) construc object = []; - inputs[| 0] = nodeValue_Toggle("Sides", self, 0b0010, { data : [ "T", "B", "L", "R" ] }); + inputs[0] = nodeValue_Toggle("Sides", self, 0b0010, { data : [ "T", "B", "L", "R" ] }); - inputs[| 1] = nodeValue_Float("Contact Friction", self, 0.2); + inputs[1] = nodeValue_Float("Contact Friction", self, 0.2); - inputs[| 2] = nodeValue_Dimension(self); + inputs[2] = nodeValue_Dimension(self); - inputs[| 3] = nodeValue_Int("Collision Group", self, 1); + inputs[3] = nodeValue_Int("Collision Group", self, 1); input_display_list = [ 3, 0, 2, ["Physics", false], 1 @@ -35,7 +35,7 @@ function Node_Rigid_Wall(_x, _y, _group = noone) : Node(_x, _y, _group) construc draw_set_color(COLORS._main_accent); draw_rectangle(_x0, _y0, _x1, _y1, true); - return inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + return inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } #endregion static spawn = function(side = 0) { #region diff --git a/scripts/node_rim/node_rim.gml b/scripts/node_rim/node_rim.gml index 516f7ab56..30e8479ca 100644 --- a/scripts/node_rim/node_rim.gml +++ b/scripts/node_rim/node_rim.gml @@ -2,7 +2,7 @@ function Node_Rim(_x, _y, _group = noone) : Node_Shader_Processor(_x, _y, _group name = "Rim"; shader = sh_rim; - inputs[| 1] = nodeValue_Rotation("Angle", self, 0); + inputs[1] = nodeValue_Rotation("Angle", self, 0); addShaderProp(SHADER_UNIFORM.float, "rotation"); } \ No newline at end of file diff --git a/scripts/node_rm_cloud/node_rm_cloud.gml b/scripts/node_rm_cloud/node_rm_cloud.gml index 76d8237ea..977d9b8f5 100644 --- a/scripts/node_rm_cloud/node_rm_cloud.gml +++ b/scripts/node_rm_cloud/node_rm_cloud.gml @@ -1,40 +1,40 @@ function Node_RM_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "RM CLoud"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0, 0 ]); + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0, 0 ]); - inputs[| 2] = nodeValue_Vector("Rotation", self, [ 0, 0, 0 ]); + inputs[2] = nodeValue_Vector("Rotation", self, [ 0, 0, 0 ]); - inputs[| 3] = nodeValue_Float("Scale", self, 1) + inputs[3] = nodeValue_Float("Scale", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); - inputs[| 4] = nodeValue_Float("FOV", self, 30) + inputs[4] = nodeValue_Float("FOV", self, 30) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }); - inputs[| 5] = nodeValue_Vector("View Range", self, [ 0, 6 ]); + inputs[5] = nodeValue_Vector("View Range", self, [ 0, 6 ]); - inputs[| 6] = nodeValue_Float("Density", self, 0.5) + inputs[6] = nodeValue_Float("Density", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Int("Detail", self, 8); + inputs[7] = nodeValue_Int("Detail", self, 8); - inputs[| 8] = nodeValue_Float("Threshold", self, 0.4) + inputs[8] = nodeValue_Float("Threshold", self, 0.4) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 9] = nodeValue_Float("Detail Scaling", self, 2.); + inputs[9] = nodeValue_Float("Detail Scaling", self, 2.); - inputs[| 10] = nodeValue_Float("Detail Attenuation", self, 0.5) + inputs[10] = nodeValue_Float("Detail Attenuation", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 11] = nodeValue_Enum_Scroll("Shape", self, 0, [ "Volume", "Plane" ]); + inputs[11] = nodeValue_Enum_Scroll("Shape", self, 0, [ "Volume", "Plane" ]); - inputs[| 12] = nodeValue_Bool("Use Fog", self, 0) + inputs[12] = nodeValue_Bool("Use Fog", self, 0) - inputs[| 13] = nodeValue_Gradient("Colors", self, new gradientObject([ cola(c_black), cola(c_white) ])) + inputs[13] = nodeValue_Gradient("Colors", self, new gradientObject([ cola(c_black), cola(c_white) ])) - outputs[| 0] = nodeValue_Output("Surface Out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface Out", self, VALUE_TYPE.surface, noone); input_display_list = [ 0, ["Transform", false], 1, 2, 3, diff --git a/scripts/node_rm_combine/node_rm_combine.gml b/scripts/node_rm_combine/node_rm_combine.gml index 4a24bf741..2b932c6ef 100644 --- a/scripts/node_rm_combine/node_rm_combine.gml +++ b/scripts/node_rm_combine/node_rm_combine.gml @@ -1,60 +1,60 @@ function Node_RM_Combine(_x, _y, _group = noone) : Node_RM(_x, _y, _group) constructor { name = "RM Combine"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 1] = nodeValue_Enum_Button("Projection", self, 0, [ "Perspective", "Orthographic" ]); + inputs[1] = nodeValue_Enum_Button("Projection", self, 0, [ "Perspective", "Orthographic" ]); - inputs[| 2] = nodeValue_Float("FOV", self, 30) + inputs[2] = nodeValue_Float("FOV", self, 30) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }); - inputs[| 3] = nodeValue_Float("Ortho Scale", self, 5.) + inputs[3] = nodeValue_Float("Ortho Scale", self, 5.) - inputs[| 4] = nodeValue_Vector("View Range", self, [ 3, 6 ]); + inputs[4] = nodeValue_Vector("View Range", self, [ 3, 6 ]); - inputs[| 5] = nodeValue_Float("Depth", self, 0) + inputs[5] = nodeValue_Float("Depth", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 6] = nodeValue_Bool("Draw BG", self, false); + inputs[6] = nodeValue_Bool("Draw BG", self, false); - inputs[| 7] = nodeValue_Color("Background", self, c_black); + inputs[7] = nodeValue_Color("Background", self, c_black); - inputs[| 8] = nodeValue_Float("Ambient Level", self, 0.2) + inputs[8] = nodeValue_Float("Ambient Level", self, 0.2) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 9] = nodeValue_Vector("Light Position", self, [ -.4, -.5, 1 ]); + inputs[9] = nodeValue_Vector("Light Position", self, [ -.4, -.5, 1 ]); - inputs[| 10] = nodeValue_Surface("Environment", self); + inputs[10] = nodeValue_Surface("Environment", self); - inputs[| 11] = nodeValue_Vector("Camera Rotation", self, [ 30, 45, 0 ]); + inputs[11] = nodeValue_Vector("Camera Rotation", self, [ 30, 45, 0 ]); - inputs[| 12] = nodeValue_Float("Camera Scale", self, 1) + inputs[12] = nodeValue_Float("Camera Scale", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 13] = nodeValue_SDF("Shape 1", self, {}) + inputs[13] = nodeValue_SDF("Shape 1", self, {}) .setVisible(true, true); - inputs[| 14] = nodeValue_SDF("Shape 2", self, {}) + inputs[14] = nodeValue_SDF("Shape 2", self, {}) .setVisible(true, true); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 15] = nodeValue_Enum_Scroll("Type", self, 0, [ "Place", "Union", "Subtract", "Intersect" ]); + inputs[15] = nodeValue_Enum_Scroll("Type", self, 0, [ "Place", "Union", "Subtract", "Intersect" ]); - inputs[| 16] = nodeValue_Float("Merge", self, 0.1) + inputs[16] = nodeValue_Float("Merge", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 17] = nodeValue_Bool("Render", self, true); + inputs[17] = nodeValue_Bool("Render", self, true); - inputs[| 18] = nodeValue_Bool("Env Interpolation", self, false); + inputs[18] = nodeValue_Bool("Env Interpolation", self, false); - outputs[| 0] = nodeValue_Output("Surface Out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface Out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Shape Data", self, VALUE_TYPE.sdf, noone); + outputs[1] = nodeValue_Output("Shape Data", self, VALUE_TYPE.sdf, noone); input_display_list = [ 0, ["Combine", false], 15, 16, 13, 14, @@ -72,9 +72,9 @@ function Node_RM_Combine(_x, _y, _group = noone) : Node_RM(_x, _y, _group) const var _type = getSingleValue(15); var _ren = getSingleValue(17); - inputs[| 16].setVisible(_type > 0); + inputs[16].setVisible(_type > 0); - outputs[| 0].setVisible(_ren, _ren); + outputs[0].setVisible(_ren, _ren); } static processData = function(_outData, _data, _output_index, _array_index = 0) { diff --git a/scripts/node_rm_primitive/node_rm_primitive.gml b/scripts/node_rm_primitive/node_rm_primitive.gml index 8c91cb0ee..3322429ea 100644 --- a/scripts/node_rm_primitive/node_rm_primitive.gml +++ b/scripts/node_rm_primitive/node_rm_primitive.gml @@ -1,7 +1,7 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) constructor { name = "RM Primitive"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); shape_types = [ "Plane", "Box", "Box Frame", "Box Round", @@ -18,136 +18,136 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con for( var i = 0, n = array_length(shape_types); i < n; i++ ) shape_types_str[i] = shape_types[i] == -1? -1 : new scrollItem(shape_types[i], s_node_shape_3d, _ind++, COLORS._main_icon_light); - inputs[| 1] = nodeValue_Enum_Scroll("Shape", self, 1, { data: shape_types_str, horizontal: true, text_pad: ui(16) }); + inputs[1] = nodeValue_Enum_Scroll("Shape", self, 1, { data: shape_types_str, horizontal: true, text_pad: ui(16) }); - inputs[| 2] = nodeValue_Vector("Position", self, [ 0, 0, 0 ]); + inputs[2] = nodeValue_Vector("Position", self, [ 0, 0, 0 ]); - inputs[| 3] = nodeValue_Vector("Rotation", self, [ 0, 0, 0 ]); + inputs[3] = nodeValue_Vector("Rotation", self, [ 0, 0, 0 ]); - inputs[| 4] = nodeValue_Float("Scale", self, 1) + inputs[4] = nodeValue_Float("Scale", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); - inputs[| 5] = nodeValue_Float("FOV", self, 30) + inputs[5] = nodeValue_Float("FOV", self, 30) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }); - inputs[| 6] = nodeValue_Vector("View Range", self, [ 3, 6 ]); + inputs[6] = nodeValue_Vector("View Range", self, [ 3, 6 ]); - inputs[| 7] = nodeValue_Float("Depth", self, 0) + inputs[7] = nodeValue_Float("Depth", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 8] = nodeValue_Vector("Light Position", self, [ -.4, -.5, 1 ]); + inputs[8] = nodeValue_Vector("Light Position", self, [ -.4, -.5, 1 ]); - inputs[| 9] = nodeValue_Color("Base Color", self, c_white); + inputs[9] = nodeValue_Color("Base Color", self, c_white); - inputs[| 10] = nodeValue_Float("Ambient Level", self, 0.2) + inputs[10] = nodeValue_Float("Ambient Level", self, 0.2) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 11] = nodeValue_Vector("Elongate", self, [ 0, 0, 0 ]); + inputs[11] = nodeValue_Vector("Elongate", self, [ 0, 0, 0 ]); - inputs[| 12] = nodeValue_Float("Rounded", self, 0.) + inputs[12] = nodeValue_Float("Rounded", self, 0.) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 13] = nodeValue_Enum_Button("Projection", self, 0, [ "Perspective", "Orthographic" ]); + inputs[13] = nodeValue_Enum_Button("Projection", self, 0, [ "Perspective", "Orthographic" ]); - inputs[| 14] = nodeValue_Float("Ortho Scale", self, 1.) + inputs[14] = nodeValue_Float("Ortho Scale", self, 1.) - inputs[| 15] = nodeValue_Vector("Wave Amplitude", self, [ 4, 4, 4 ]); + inputs[15] = nodeValue_Vector("Wave Amplitude", self, [ 4, 4, 4 ]); - inputs[| 16] = nodeValue_Vector("Wave Intensity", self, [ 0, 0, 0 ]); + inputs[16] = nodeValue_Vector("Wave Intensity", self, [ 0, 0, 0 ]); - inputs[| 17] = nodeValue_Vector("Wave Phase", self, [ 0, 0, 0 ]); + inputs[17] = nodeValue_Vector("Wave Phase", self, [ 0, 0, 0 ]); - inputs[| 18] = nodeValue_Enum_Button("Twist Axis", self, 0, [ "X", "Y", "Z" ]); + inputs[18] = nodeValue_Enum_Button("Twist Axis", self, 0, [ "X", "Y", "Z" ]); - inputs[| 19] = nodeValue_Float("Twist Amount", self, 0) + inputs[19] = nodeValue_Float("Twist Amount", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 8, 0.1 ] }); - inputs[| 20] = nodeValue_Vector("Tile Distance", self, [ 1, 1, 1 ]); + inputs[20] = nodeValue_Vector("Tile Distance", self, [ 1, 1, 1 ]); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 21] = nodeValue_Vector("Size", self, [ 1, 1, 1 ]); + inputs[21] = nodeValue_Vector("Size", self, [ 1, 1, 1 ]); - inputs[| 22] = nodeValue_Float("Radius", self, .7) + inputs[22] = nodeValue_Float("Radius", self, .7) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 23] = nodeValue_Float("Thickness", self, .2) + inputs[23] = nodeValue_Float("Thickness", self, .2) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 24] = nodeValue_Float("Crop", self, 0.) + inputs[24] = nodeValue_Float("Crop", self, 0.) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); - inputs[| 25] = nodeValue_Rotation("Angle", self, 30); + inputs[25] = nodeValue_Rotation("Angle", self, 30); - inputs[| 26] = nodeValue_Float("Height", self, .5) + inputs[26] = nodeValue_Float("Height", self, .5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 27] = nodeValue_Slider_Range("Radius Range", self, [ .7, .1 ]); + inputs[27] = nodeValue_Slider_Range("Radius Range", self, [ .7, .1 ]); - inputs[| 28] = nodeValue_Float("Uniform Size", self, 1) + inputs[28] = nodeValue_Float("Uniform Size", self, 1) .setDisplay(VALUE_DISPLAY.slider); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 29] = nodeValue_Vector("Tile Amount", self, [ 1, 1, 1 ]); + inputs[29] = nodeValue_Vector("Tile Amount", self, [ 1, 1, 1 ]); - inputs[| 30] = nodeValue_Color("Background", self, c_black); + inputs[30] = nodeValue_Color("Background", self, c_black); - inputs[| 31] = nodeValue_Bool("Draw BG", self, false); + inputs[31] = nodeValue_Bool("Draw BG", self, false); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 32] = nodeValue_Bool("Volumetric", self, false); + inputs[32] = nodeValue_Bool("Volumetric", self, false); - inputs[| 33] = nodeValue_Float("Density", self, 0.3) + inputs[33] = nodeValue_Float("Density", self, 0.3) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 34] = nodeValue_Surface("Environment", self); + inputs[34] = nodeValue_Surface("Environment", self); - inputs[| 35] = nodeValue_Float("Reflective", self, 0.) + inputs[35] = nodeValue_Float("Reflective", self, 0.) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 36] = nodeValue_Surface("Texture", self); + inputs[36] = nodeValue_Surface("Texture", self); - inputs[| 37] = nodeValue_Float("Triplanar Smoothing", self, 1.) + inputs[37] = nodeValue_Float("Triplanar Smoothing", self, 1.) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 10, 0.1 ] }); - inputs[| 38] = nodeValue_Float("Texture Scale", self, 1.); + inputs[38] = nodeValue_Float("Texture Scale", self, 1.); - inputs[| 39] = nodeValue_Vector("Corner", self, [ 0.25, 0.25, 0.25, 0.25 ]); + inputs[39] = nodeValue_Vector("Corner", self, [ 0.25, 0.25, 0.25, 0.25 ]); - inputs[| 40] = nodeValue_Vector("2D Size", self, [ 0.5, 0.5 ]); + inputs[40] = nodeValue_Vector("2D Size", self, [ 0.5, 0.5 ]); - inputs[| 41] = nodeValue_Int("Side", self, 3); + inputs[41] = nodeValue_Int("Side", self, 3); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 42] = nodeValue_Vector("Camera Rotation", self, [ 30, 45, 0 ]); + inputs[42] = nodeValue_Vector("Camera Rotation", self, [ 30, 45, 0 ]); - inputs[| 43] = nodeValue_Float("Camera Scale", self, 1) + inputs[43] = nodeValue_Float("Camera Scale", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); - inputs[| 44] = nodeValue_Bool("Render", self, true); + inputs[44] = nodeValue_Bool("Render", self, true); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 45] = nodeValue_Bool("Tile", self, false); + inputs[45] = nodeValue_Bool("Tile", self, false); - inputs[| 46] = nodeValue_Vector("Tiled Shift", self, [ 0, 0, 0 ]); + inputs[46] = nodeValue_Vector("Tiled Shift", self, [ 0, 0, 0 ]); - inputs[| 47] = nodeValue_Vector("Tiled Rotation", self, [ 0, 0, 0 ]); + inputs[47] = nodeValue_Vector("Tiled Rotation", self, [ 0, 0, 0 ]); - inputs[| 48] = nodeValue_Float("Tiled Scale", self, 0); + inputs[48] = nodeValue_Float("Tiled Scale", self, 0); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 49] = nodeValue_Bool("Env Interpolation", self, false); + inputs[49] = nodeValue_Bool("Env Interpolation", self, false); - inputs[| 50] = nodeValue_Bool("Texture Interpolation", self, false); + inputs[50] = nodeValue_Bool("Texture Interpolation", self, false); - outputs[| 0] = nodeValue_Output("Surface Out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface Out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Shape Data", self, VALUE_TYPE.sdf, noone); + outputs[1] = nodeValue_Output("Shape Data", self, VALUE_TYPE.sdf, noone); input_display_list = [ 0, ["Primitive", false], 1, 21, 22, 23, 24, 25, 26, 27, 28, 39, 40, 41, @@ -194,7 +194,7 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con static drawGizmoPosition = function(index, _vpos, active, params, _mx, _my, _snx, _sny, _panel) { #region #region ---- main ---- - var _pos = inputs[| index].getValue(,,, true); + var _pos = inputs[index].getValue(,,, true); // _pos = [ -_pos[0], _pos[2], -_pos[1] ]; var _qinv = new BBMOD_Quaternion().FromAxisAngle(new BBMOD_Vec3(1, 0, 0), 90); @@ -345,7 +345,7 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con drag_pre0 = mAdj; - if(inputs[| index].setValue(value_snap(val, _snx))) + if(inputs[index].setValue(value_snap(val, _snx))) UNDO_HOLDING = true; drag_val = [ val[0], val[1], val[2] ]; @@ -391,26 +391,26 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con var _ort = getSingleValue(13); var _ren = getSingleValue(44); - inputs[| 21].setVisible(false); - inputs[| 22].setVisible(false); - inputs[| 23].setVisible(false); - inputs[| 24].setVisible(false); - inputs[| 25].setVisible(false); - inputs[| 26].setVisible(false); - inputs[| 27].setVisible(false); - inputs[| 28].setVisible(false); - inputs[| 39].setVisible(false); - inputs[| 40].setVisible(false); - inputs[| 41].setVisible(false); + inputs[21].setVisible(false); + inputs[22].setVisible(false); + inputs[23].setVisible(false); + inputs[24].setVisible(false); + inputs[25].setVisible(false); + inputs[26].setVisible(false); + inputs[27].setVisible(false); + inputs[28].setVisible(false); + inputs[39].setVisible(false); + inputs[40].setVisible(false); + inputs[41].setVisible(false); - outputs[| 0].setVisible(_ren, _ren); + outputs[0].setVisible(_ren, _ren); var _shape = shape_types[_shp]; switch(_shape) { // Size case "Box" : case "Box Frame" : case "Ellipse" : - inputs[| 21].setVisible(true); + inputs[21].setVisible(true); break; } @@ -424,7 +424,7 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con case "Capsule" : case "3D Arc" : case "Pie" : - inputs[| 22].setVisible(true); + inputs[22].setVisible(true); break; } @@ -438,14 +438,14 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con case "Extrude" : case "Prism" : case "Pie" : - inputs[| 23].setVisible(true); + inputs[23].setVisible(true); break; } switch(_shape) { // Crop case "Cut Sphere" : case "Cut Hollow Sphere" : - inputs[| 24].setVisible(true); + inputs[24].setVisible(true); break; } @@ -454,7 +454,7 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con case "Cone" : case "3D Arc" : case "Pie" : - inputs[| 25].setVisible(true); + inputs[25].setVisible(true); break; } @@ -464,14 +464,14 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con case "Cone" : case "Capped Cone" : case "Round Cone" : - inputs[| 26].setVisible(true); + inputs[26].setVisible(true); break; } switch(_shape) { // Radius Range case "Capped Cone" : case "Round Cone" : - inputs[| 27].setVisible(true); + inputs[27].setVisible(true); break; } @@ -480,30 +480,30 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con case "Pyramid" : case "Terrain" : case "Extrude" : - inputs[| 28].setVisible(true); + inputs[28].setVisible(true); break; } switch(_shape) { // Corner case "Box Round" : - inputs[| 39].setVisible(true); + inputs[39].setVisible(true); break; } switch(_shape) { // Size 2D case "Box Round" : - inputs[| 40].setVisible(true); + inputs[40].setVisible(true); break; } switch(_shape) { // Sides case "Prism" : - inputs[| 41].setVisible(true); + inputs[41].setVisible(true); break; } - inputs[| 5].setVisible(_ort == 0); - inputs[| 14].setVisible(_ort == 1); + inputs[ 5].setVisible(_ort == 0); + inputs[14].setVisible(_ort == 1); } static processData = function(_outSurf, _data, _output_index, _array_index = 0) { diff --git a/scripts/node_rm_render/node_rm_render.gml b/scripts/node_rm_render/node_rm_render.gml index 172a08f26..0503e20e4 100644 --- a/scripts/node_rm_render/node_rm_render.gml +++ b/scripts/node_rm_render/node_rm_render.gml @@ -1,48 +1,48 @@ function Node_RM_Render(_x, _y, _group = noone) : Node_RM(_x, _y, _group) constructor { name = "RM Render"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 1] = nodeValue_Enum_Button("Projection", self, 0, [ "Perspective", "Orthographic" ]); + inputs[1] = nodeValue_Enum_Button("Projection", self, 0, [ "Perspective", "Orthographic" ]); - inputs[| 2] = nodeValue_Float("FOV", self, 30) + inputs[2] = nodeValue_Float("FOV", self, 30) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }); - inputs[| 3] = nodeValue_Float("Ortho Scale", self, 5.) + inputs[3] = nodeValue_Float("Ortho Scale", self, 5.) - inputs[| 4] = nodeValue_Vector("View Range", self, [ 3, 6 ]); + inputs[4] = nodeValue_Vector("View Range", self, [ 3, 6 ]); - inputs[| 5] = nodeValue_Float("Depth", self, 0) + inputs[5] = nodeValue_Float("Depth", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 6] = nodeValue_Bool("Draw BG", self, false); + inputs[6] = nodeValue_Bool("Draw BG", self, false); - inputs[| 7] = nodeValue_Color("Background", self, c_black); + inputs[7] = nodeValue_Color("Background", self, c_black); - inputs[| 8] = nodeValue_Float("Ambient Level", self, 0.2) + inputs[8] = nodeValue_Float("Ambient Level", self, 0.2) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 9] = nodeValue_Vector("Light Position", self, [ -.4, -.5, 1 ]); + inputs[9] = nodeValue_Vector("Light Position", self, [ -.4, -.5, 1 ]); - inputs[| 10] = nodeValue_Surface("Environment", self); + inputs[10] = nodeValue_Surface("Environment", self); - inputs[| 11] = nodeValue_Vector("Camera Rotation", self, [ 30, 45, 0 ]); + inputs[11] = nodeValue_Vector("Camera Rotation", self, [ 30, 45, 0 ]); - inputs[| 12] = nodeValue_Float("Camera Scale", self, 1) + inputs[12] = nodeValue_Float("Camera Scale", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 13] = nodeValue_SDF("SDF Object", self, {}) + inputs[13] = nodeValue_SDF("SDF Object", self, {}) .setVisible(true, true); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 14] = nodeValue_Bool("Env Interpolation", self, false); + inputs[14] = nodeValue_Bool("Env Interpolation", self, false); - outputs[| 0] = nodeValue_Output("Surface Out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface Out", self, VALUE_TYPE.surface, noone); input_display_list = [ 0, 13, ["Camera", false], 11, 12, 1, 2, 3, 4, 5, @@ -58,7 +58,7 @@ function Node_RM_Render(_x, _y, _group = noone) : Node_RM(_x, _y, _group) constr static step = function() { var _pro = getSingleValue( 1); - inputs[| 3].setVisible(_pro == 1); + inputs[3].setVisible(_pro == 1); } static processData = function(_outSurf, _data, _output_index, _array_index = 0) { diff --git a/scripts/node_rm_terrain/node_rm_terrain.gml b/scripts/node_rm_terrain/node_rm_terrain.gml index 6a653f6a2..819fc1405 100644 --- a/scripts/node_rm_terrain/node_rm_terrain.gml +++ b/scripts/node_rm_terrain/node_rm_terrain.gml @@ -1,44 +1,44 @@ function Node_RM_Terrain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "RM Terrain"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Surface("Surface", self); + inputs[1] = nodeValue_Surface("Surface", self); - inputs[| 2] = nodeValue_Vector("Position", self, [ 0, 0, 0 ]); + inputs[2] = nodeValue_Vector("Position", self, [ 0, 0, 0 ]); - inputs[| 3] = nodeValue_Vector("Rotation", self, [ 30, 45, 0 ]); + inputs[3] = nodeValue_Vector("Rotation", self, [ 30, 45, 0 ]); - inputs[| 4] = nodeValue_Float("Scale", self, 1) + inputs[4] = nodeValue_Float("Scale", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); - inputs[| 5] = nodeValue_Float("FOV", self, 30) + inputs[5] = nodeValue_Float("FOV", self, 30) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }); - inputs[| 6] = nodeValue_Vector("View Range", self, [ 0, 6 ]); + inputs[6] = nodeValue_Vector("View Range", self, [ 0, 6 ]); - inputs[| 7] = nodeValue_Float("BG Bleed", self, 1) + inputs[7] = nodeValue_Float("BG Bleed", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 8] = nodeValue_Color("Ambient", self, c_white); + inputs[8] = nodeValue_Color("Ambient", self, c_white); - inputs[| 9] = nodeValue_Float("Height", self, 1) + inputs[9] = nodeValue_Float("Height", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); - inputs[| 10] = nodeValue_Bool("Tile", self, true) + inputs[10] = nodeValue_Bool("Tile", self, true) - inputs[| 11] = nodeValue_Surface("Texture", self); + inputs[11] = nodeValue_Surface("Texture", self); - inputs[| 12] = nodeValue_Color("Background", self, c_black); + inputs[12] = nodeValue_Color("Background", self, c_black); - inputs[| 13] = nodeValue_Surface("Reflection", self); + inputs[13] = nodeValue_Surface("Reflection", self); - inputs[| 14] = nodeValue_Vector("Sun Position", self, [ .5, 1, .5 ]); + inputs[14] = nodeValue_Vector("Sun Position", self, [ .5, 1, .5 ]); - inputs[| 15] = nodeValue_Float("Shadow", self, 0.2) + inputs[15] = nodeValue_Float("Shadow", self, 0.2) .setDisplay(VALUE_DISPLAY.slider); - outputs[| 0] = nodeValue_Output("Surface Out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface Out", self, VALUE_TYPE.surface, noone); input_display_list = [ 0, ["Extrusion", false], 1, 9, 10, diff --git a/scripts/node_sampler/node_sampler.gml b/scripts/node_sampler/node_sampler.gml index 2aeeb4b1e..27ab1dcc8 100644 --- a/scripts/node_sampler/node_sampler.gml +++ b/scripts/node_sampler/node_sampler.gml @@ -2,24 +2,24 @@ function Node_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c name = "Sampler"; setDimension(96, 48); - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 2] = nodeValue_Int("Sampling size", self, 1, "Size of square around the position to sample and average pixel color.") + inputs[2] = nodeValue_Int("Sampling size", self, 1, "Size of square around the position to sample and average pixel color.") .setDisplay(VALUE_DISPLAY.slider, { range: [1, 3, 0.1] }); - inputs[| 3] = nodeValue_Bool("Alpha", self, false); + inputs[3] = nodeValue_Bool("Alpha", self, false); - outputs[| 0] = nodeValue_Output("Color", self, VALUE_TYPE.color, c_white); + outputs[0] = nodeValue_Output("Color", self, VALUE_TYPE.color, c_white); static getPreviewValues = function() { return getInputData(0); } static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region PROCESSOR_OVERLAY_CHECK - inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); var _suf = current_data[0]; if(!is_surface(_suf)) return; @@ -89,7 +89,7 @@ function Node_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region var bbox = drawGetBbox(xx, yy, _s); - var col = outputs[| 0].getValue(); + var col = outputs[0].getValue(); if(bbox.h <= 0) return; if(is_array(col)) { diff --git a/scripts/node_scale/node_scale.gml b/scripts/node_scale/node_scale.gml index 698b92046..80f8c4a9b 100644 --- a/scripts/node_scale/node_scale.gml +++ b/scripts/node_scale/node_scale.gml @@ -4,20 +4,20 @@ function Node_Scale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con manage_atlas = false; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Scale", self, 1); + inputs[1] = nodeValue_Float("Scale", self, 1); - inputs[| 2] = nodeValue_Enum_Button("Mode", self, 0, [ "Upscale", "Scale to fit" ]); + inputs[2] = nodeValue_Enum_Button("Mode", self, 0, [ "Upscale", "Scale to fit" ]); - inputs[| 3] = nodeValue_Vector("Target dimension", self, DEF_SURF); + inputs[3] = nodeValue_Vector("Target dimension", self, DEF_SURF); - inputs[| 4] = nodeValue_Bool("Active", self, true); + inputs[4] = nodeValue_Bool("Active", self, true); active_index = 4; - inputs[| 5] = nodeValue_Bool("Scale atlas position", self, true); + inputs[5] = nodeValue_Bool("Scale atlas position", self, true); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 4, ["Surfaces", true], 0, @@ -31,7 +31,7 @@ function Node_Scale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con var _surf = getSingleValue(0); var _atlas = is_instanceof(_surf, SurfaceAtlas); - inputs[| 5].setVisible(_atlas); + inputs[5].setVisible(_atlas); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -42,8 +42,8 @@ function Node_Scale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con var _atlS = _data[5]; var cDep = attrDepth(); - inputs[| 1].setVisible(mode == 0); - inputs[| 3].setVisible(mode == 1); + inputs[1].setVisible(mode == 0); + inputs[3].setVisible(mode == 1); var isAtlas = is_instanceof(surf, SurfaceAtlas); if(isAtlas && !is_instanceof(_outSurf, SurfaceAtlas)) diff --git a/scripts/node_scale_algo/node_scale_algo.gml b/scripts/node_scale_algo/node_scale_algo.gml index cab151648..9a399150a 100644 --- a/scripts/node_scale_algo/node_scale_algo.gml +++ b/scripts/node_scale_algo/node_scale_algo.gml @@ -3,9 +3,9 @@ function Node_create_Scale_Algo(_x, _y, _group = noone, _param = {}) { var node = new Node_Scale_Algo(_x, _y, _group).skipDefault(); switch(query) { - case "scale2x" : node.inputs[| 1].setValue(0); break; - case "scale3x" : node.inputs[| 1].setValue(1); break; - case "cleanshape" : node.inputs[| 1].setValue(2); break; + case "scale2x" : node.inputs[1].setValue(0); break; + case "scale3x" : node.inputs[1].setValue(1); break; + case "cleanshape" : node.inputs[1].setValue(2); break; } return node; @@ -16,21 +16,21 @@ function Node_Scale_Algo(_x, _y, _group = noone) : Node_Processor(_x, _y, _group manage_atlas = false; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Enum_Scroll("Algorithm", self, 0, [ "Scale2x", "Scale3x", "CleanEdge" ]); + inputs[1] = nodeValue_Enum_Scroll("Algorithm", self, 0, [ "Scale2x", "Scale3x", "CleanEdge" ]); - inputs[| 2] = nodeValue_Float("Tolerance", self, 0) + inputs[2] = nodeValue_Float("Tolerance", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Bool("Active", self, true); + inputs[3] = nodeValue_Bool("Active", self, true); active_index = 3; - inputs[| 4] = nodeValue_Bool("Scale atlas position", self, true); + inputs[4] = nodeValue_Bool("Scale atlas position", self, true); - inputs[| 5] = nodeValue_Float("Scale", self, 4); + inputs[5] = nodeValue_Float("Scale", self, 4); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 3, ["Surfaces", false], 0, @@ -44,8 +44,8 @@ function Node_Scale_Algo(_x, _y, _group = noone) : Node_Processor(_x, _y, _group var _type = getSingleValue(1); var _atlas = is_instanceof(_surf, SurfaceAtlas); - inputs[| 4].setVisible(_atlas); - inputs[| 5].setVisible(_type == 2); + inputs[4].setVisible(_atlas); + inputs[5].setVisible(_type == 2); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_scatter/node_scatter.gml b/scripts/node_scatter/node_scatter.gml index 6dfeea967..c2c0d038f 100644 --- a/scripts/node_scatter/node_scatter.gml +++ b/scripts/node_scatter/node_scatter.gml @@ -12,103 +12,103 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c batch_output = false; dimension_index = 1; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Dimension(self); + inputs[1] = nodeValue_Dimension(self); - inputs[| 2] = nodeValue_Int("Amount", self, 8) + inputs[2] = nodeValue_Int("Amount", self, 8) .setValidator(VV_min(0)); - inputs[| 3] = nodeValue_Vec2_Range("Scale", self, [ 1, 1, 1, 1 ] , { linked : true }); + inputs[3] = nodeValue_Vec2_Range("Scale", self, [ 1, 1, 1, 1 ] , { linked : true }); - inputs[| 4] = nodeValue_Rotation_Random("Angle", self, [ 0, 0, 0, 0, 0 ] ); + inputs[4] = nodeValue_Rotation_Random("Angle", self, [ 0, 0, 0, 0, 0 ] ); onSurfaceSize = function() { return getInputData(1, DEF_SURF); }; - inputs[| 5] = nodeValue_Area("Area", self, DEF_AREA_REF, { onSurfaceSize }) + inputs[5] = nodeValue_Area("Area", self, DEF_AREA_REF, { onSurfaceSize }) .setUnitRef(onSurfaceSize, VALUE_UNIT.reference); - inputs[| 6] = nodeValue_Enum_Scroll("Distribution", self, 5, [ "Area", "Border", "Map", "Direct Data", "Path", "Full image + Tile" ]); + inputs[6] = nodeValue_Enum_Scroll("Distribution", self, 5, [ "Area", "Border", "Map", "Direct Data", "Path", "Full image + Tile" ]); - inputs[| 7] = nodeValue_Bool("Point at center", self, false, "Rotate each copy to face the spawn center."); + inputs[7] = nodeValue_Bool("Point at center", self, false, "Rotate each copy to face the spawn center."); - inputs[| 8] = nodeValue_Bool("Uniform scaling", self, true); + inputs[8] = nodeValue_Bool("Uniform scaling", self, true); - inputs[| 9] = nodeValue_Enum_Button("Scatter", self, 1, [ "Uniform", "Random" ]); + inputs[9] = nodeValue_Enum_Button("Scatter", self, 1, [ "Uniform", "Random" ]); - inputs[| 10] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 10].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[10] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[10].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 11] = nodeValue_Gradient("Random blend", self, new gradientObject(cola(c_white))) + inputs[11] = nodeValue_Gradient("Random blend", self, new gradientObject(cola(c_white))) .setMappable(28); - inputs[| 12] = nodeValue_Slider_Range("Alpha", self, [ 1, 1 ]); + inputs[12] = nodeValue_Slider_Range("Alpha", self, [ 1, 1 ]); - inputs[| 13] = nodeValue_Surface("Distribution map", self); + inputs[13] = nodeValue_Surface("Distribution map", self); - inputs[| 14] = nodeValue_Vector("Distribution data", self, []); - inputs[| 14].array_depth = 1; + inputs[14] = nodeValue_Vector("Distribution data", self, []); + inputs[14].array_depth = 1; - inputs[| 15] = nodeValue_Int("Array", self, 0, @"What to do when input array of surface. + inputs[15] = nodeValue_Int("Array", self, 0, @"What to do when input array of surface. - Spread: Create Array of output each scattering single surface. - Mixed: Create single output scattering multiple images.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Spread output", "Index", "Random", "Data", "Texture" ]); - inputs[| 16] = nodeValue_Bool("Multiply alpha", self, true); + inputs[16] = nodeValue_Bool("Multiply alpha", self, true); - inputs[| 17] = nodeValue_Text("Use value", self, [ "Scale" ], "Apply the third value in each data point (if exist) on given properties.") + inputs[17] = nodeValue_Text("Use value", self, [ "Scale" ], "Apply the third value in each data point (if exist) on given properties.") .setDisplay(VALUE_DISPLAY.text_array, { data: [ "Scale", "Rotation", "Color" ] }); - inputs[| 18] = nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Normal", "Add", "Max" ]); + inputs[18] = nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Normal", "Add", "Max" ]); - inputs[| 19] = nodeValue_PathNode("Path", self, noone); + inputs[19] = nodeValue_PathNode("Path", self, noone); - inputs[| 20] = nodeValue_Bool("Rotate along path", self, true); + inputs[20] = nodeValue_Bool("Rotate along path", self, true); - inputs[| 21] = nodeValue_Float("Path Shift", self, 0) + inputs[21] = nodeValue_Float("Path Shift", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 22] = nodeValue_Float("Scatter Distance", self, 0); + inputs[22] = nodeValue_Float("Scatter Distance", self, 0); - inputs[| 23] = nodeValue_Bool("Sort Y", self, false); + inputs[23] = nodeValue_Bool("Sort Y", self, false); - inputs[| 24] = nodeValue_Int("Array indices", self, []) + inputs[24] = nodeValue_Int("Array indices", self, []) .setArrayDepth(1); - inputs[| 25] = nodeValue_Surface("Array texture", self); + inputs[25] = nodeValue_Surface("Array texture", self); - inputs[| 26] = nodeValue_Range("Animated array", self, [ 0, 0 ], { linked : true }); + inputs[26] = nodeValue_Range("Animated array", self, [ 0, 0 ], { linked : true }); - inputs[| 27] = nodeValue_Enum_Scroll("Animated array end", self, 0, [ "Loop", "Ping Pong" ]); + inputs[27] = nodeValue_Enum_Scroll("Animated array end", self, 0, [ "Loop", "Ping Pong" ]); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 28] = nodeValueMap("Gradient map", self); + inputs[28] = nodeValueMap("Gradient map", self); - inputs[| 29] = nodeValueGradientRange("Gradient map range", self, inputs[| 11]); + inputs[29] = nodeValueGradientRange("Gradient map range", self, inputs[11]); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 30] = nodeValue_Vector("Uniform amount", self, [ 4, 4 ]); + inputs[30] = nodeValue_Vector("Uniform amount", self, [ 4, 4 ]); - inputs[| 31] = nodeValue_Bool("Auto amount", self, false); + inputs[31] = nodeValue_Bool("Auto amount", self, false); - inputs[| 32] = nodeValue_Rotation("Rotate per radius", self, 0); + inputs[32] = nodeValue_Rotation("Rotate per radius", self, 0); - inputs[| 33] = nodeValue_Vec2_Range("Random position", self, [ 0, 0, 0, 0 ]); + inputs[33] = nodeValue_Vec2_Range("Random position", self, [ 0, 0, 0, 0 ]); - inputs[| 34] = nodeValue_Vector("Scale per radius", self, [ 0, 0 ]); + inputs[34] = nodeValue_Vector("Scale per radius", self, [ 0, 0 ]); - inputs[| 35] = nodeValue_Rotation_Range("Angle range", self, [ 0, 360 ]); + inputs[35] = nodeValue_Rotation_Range("Angle range", self, [ 0, 360 ]); - inputs[| 36] = nodeValue_Vector("Shift position", self, [ 0, 0 ]); + inputs[36] = nodeValue_Vector("Shift position", self, [ 0, 0 ]); - inputs[| 37] = nodeValue_Bool("Exact", self, false) + inputs[37] = nodeValue_Bool("Exact", self, false) - inputs[| 38] = nodeValue_Enum_Button("Spacing", self, 0, [ "After", "Between", "Around" ]); + inputs[38] = nodeValue_Enum_Button("Spacing", self, 0, [ "After", "Between", "Around" ]); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Atlas data", self, VALUE_TYPE.surface, []) + outputs[1] = nodeValue_Output("Atlas data", self, VALUE_TYPE.surface, []) .setVisible(false) .rejectArrayProcess(); @@ -140,8 +140,8 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c var _distType = current_data[6]; var _hov = false; - if(_distType < 3) { var hv = inputs[| 5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; } - var hv = inputs[| 29].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[1]); active &= !hv; _hov |= hv; + if(_distType < 3) { var hv = inputs[5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; } + var hv = inputs[29].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[1]); active &= !hv; _hov |= hv; return _hov; } #endregion @@ -149,7 +149,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c static onValueUpdate = function(index) { #region if(index == 15) { var _arr = getInputData(15); - inputs[| 0].array_depth = _arr; + inputs[0].array_depth = _arr; update(); } @@ -165,51 +165,51 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c update_on_frame = _arr && (_amn[0] != 0 || _amn[1] != 0); - inputs[| 0].array_depth = bool(_arr); + inputs[0].array_depth = bool(_arr); - inputs[| 13].setVisible(_dis == 2, _dis == 2); - inputs[| 14].setVisible(_dis == 3, _dis == 3); - inputs[| 17].setVisible(_dis == 3); - inputs[| 9].setVisible(_dis != 2 && _dis != 3); - inputs[| 19].setVisible(_dis == 4, _dis == 4); - inputs[| 20].setVisible(_dis == 4); - inputs[| 21].setVisible(_dis == 4 && _spa == 0); - inputs[| 22].setVisible(_dis == 4); - inputs[| 38].setVisible(_dis == 4 && _sct == 0); - inputs[| 24].setVisible(_arr == 3, _arr == 3); - inputs[| 25].setVisible(_arr == 4, _arr == 4); - inputs[| 26].setVisible(_arr); - inputs[| 27].setVisible(_arr); + inputs[13].setVisible(_dis == 2, _dis == 2); + inputs[14].setVisible(_dis == 3, _dis == 3); + inputs[17].setVisible(_dis == 3); + inputs[ 9].setVisible(_dis != 2 && _dis != 3); + inputs[19].setVisible(_dis == 4, _dis == 4); + inputs[20].setVisible(_dis == 4); + inputs[21].setVisible(_dis == 4 && _spa == 0); + inputs[22].setVisible(_dis == 4); + inputs[38].setVisible(_dis == 4 && _sct == 0); + inputs[24].setVisible(_arr == 3, _arr == 3); + inputs[25].setVisible(_arr == 4, _arr == 4); + inputs[26].setVisible(_arr); + inputs[27].setVisible(_arr); - inputs[| 5].setVisible(_dis < 3); - inputs[| 2].setVisible( true); - inputs[| 30].setVisible(false); - inputs[| 31].setVisible(false); - inputs[| 32].setVisible(false); - inputs[| 34].setVisible(false); - inputs[| 35].setVisible(false); + inputs[ 5].setVisible(_dis < 3); + inputs[ 2].setVisible( true); + inputs[30].setVisible(false); + inputs[31].setVisible(false); + inputs[32].setVisible(false); + inputs[34].setVisible(false); + inputs[35].setVisible(false); if(_dis == 0 && _sct == 0) { if(_are[AREA_INDEX.shape] == AREA_SHAPE.elipse) { var _aut = getInputData(31); - inputs[| 2].setVisible( _aut); - inputs[| 30].setVisible(!_aut); - inputs[| 31].setVisible( true); - inputs[| 32].setVisible(!_aut); - inputs[| 34].setVisible(!_aut); - inputs[| 35].setVisible(!_aut); + inputs[ 2].setVisible( _aut); + inputs[30].setVisible(!_aut); + inputs[31].setVisible( true); + inputs[32].setVisible(!_aut); + inputs[34].setVisible(!_aut); + inputs[35].setVisible(!_aut); } else { - inputs[| 2].setVisible(false); - inputs[| 30].setVisible( true); + inputs[ 2].setVisible(false); + inputs[30].setVisible( true); } } else if(_dis == 5) { - inputs[| 2].setVisible(_sct == 1); - inputs[| 30].setVisible(_sct == 0); + inputs[ 2].setVisible(_sct == 1); + inputs[30].setVisible(_sct == 0); } - inputs[| 11].mappableStep(); + inputs[11].mappableStep(); } #endregion ////=========== PROCESS =========== @@ -343,10 +343,10 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c var _alpUni = alpha[0] == alpha[1]; - var _clrUni = !inputs[| 11].attributes.mapped && color.keyLength == 1; + var _clrUni = !inputs[11].attributes.mapped && color.keyLength == 1; var _clrSin = color.evalFast(0); - var _useAtl = outputs[| 1].visible; + var _useAtl = outputs[1].visible; var _datLen = array_length(scatter_data); @@ -570,7 +570,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c if(vCol && _v != noone) grSamp *= _v; - var clr = _clrUni? _clrSin : evaluate_gradient_map(grSamp, color, clr_map, clr_rng, inputs[| 11], true); + var clr = _clrUni? _clrSin : evaluate_gradient_map(grSamp, color, clr_map, clr_rng, inputs[11], true); var alp = _alpUni? alpha[0] : random_range(alpha[0], alpha[1]); var _atl = _sct_len >= _datLen? noone : scatter_data[_sct_len]; diff --git a/scripts/node_scatter_points/node_scatter_points.gml b/scripts/node_scatter_points/node_scatter_points.gml index 5956352ad..53d628509 100644 --- a/scripts/node_scatter_points/node_scatter_points.gml +++ b/scripts/node_scatter_points/node_scatter_points.gml @@ -5,36 +5,36 @@ function Node_Scatter_Points(_x, _y, _group = noone) : Node(_x, _y, _group) cons setDimension(96, 48); onSurfaceSize = function() { return getInputData(7, DEF_SURF); }; - inputs[| 0] = nodeValue_Area("Point area", self, DEF_AREA_REF, { onSurfaceSize } ) + inputs[0] = nodeValue_Area("Point area", self, DEF_AREA_REF, { onSurfaceSize } ) .setUnitRef(onSurfaceSize, VALUE_UNIT.reference); - inputs[| 1] = nodeValue_Enum_Button("Point distribution", self, 0, [ "Area", "Border", "Map" ]) + inputs[1] = nodeValue_Enum_Button("Point distribution", self, 0, [ "Area", "Border", "Map" ]) .rejectArray(); - inputs[| 2] = nodeValue_Enum_Button("Scatter", self, 1, [ "Uniform", "Random" ]) + inputs[2] = nodeValue_Enum_Button("Scatter", self, 1, [ "Uniform", "Random" ]) .rejectArray(); - inputs[| 3] = nodeValue_Int("Point amount", self, 2, "Amount of particle spawn in that frame.") + inputs[3] = nodeValue_Int("Point amount", self, 2, "Amount of particle spawn in that frame.") .rejectArray(); - inputs[| 4] = nodeValue_Surface("Distribution map", self) + inputs[4] = nodeValue_Surface("Distribution map", self) .rejectArray(); - inputs[| 5] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }) + inputs[5] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }) .rejectArray(); - inputs[| 6] = nodeValue_Bool("Fixed position", self, false, "Fix point position, and only select point in the area."); + inputs[6] = nodeValue_Bool("Fixed position", self, false, "Fix point position, and only select point in the area."); - inputs[| 7] = nodeValue_Vector("Reference dimension", self, DEF_SURF); + inputs[7] = nodeValue_Vector("Reference dimension", self, DEF_SURF); - inputs[| 8] = nodeValue_Surface("Reference value", self); + inputs[8] = nodeValue_Surface("Reference value", self); - inputs[| 9] = nodeValue_Bool("Output 3D", self, false); + inputs[9] = nodeValue_Bool("Output 3D", self, false); - inputs[| 10] = nodeValue_Enum_Button("Normal", self, 0, [ "X", "Y", "Z" ]); + inputs[10] = nodeValue_Enum_Button("Normal", self, 0, [ "X", "Y", "Z" ]); - inputs[| 11] = nodeValue_Float("Plane position", self, 0); + inputs[11] = nodeValue_Float("Plane position", self, 0); input_display_list = [ ["Base", false], 5, 6, 7, @@ -42,18 +42,18 @@ function Node_Scatter_Points(_x, _y, _group = noone) : Node(_x, _y, _group) cons ["3D", true, 9], 10, 11 ]; - outputs[| 0] = nodeValue_Output("Points", self, VALUE_TYPE.float, [ ]) + outputs[0] = nodeValue_Output("Points", self, VALUE_TYPE.float, [ ]) .setDisplay(VALUE_DISPLAY.vector); static step = function() { var _dist = getInputData(1); - inputs[| 2].setVisible(_dist != 2); - inputs[| 4].setVisible(_dist == 2, _dist == 2); + inputs[2].setVisible(_dist != 2); + inputs[4].setVisible(_dist == 2, _dist == 2); } static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 0].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[0].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static getPreviewValues = function() { return getInputData(8); } @@ -72,7 +72,7 @@ function Node_Scatter_Points(_x, _y, _group = noone) : Node(_x, _y, _group) cons __temp_3dNorm = getInputData(10); __temp_3dPos = getInputData(11); - inputs[| 7].setVisible(_fix); + inputs[7].setVisible(_fix); var pos = []; random_set_seed(_seed); @@ -80,7 +80,7 @@ function Node_Scatter_Points(_x, _y, _group = noone) : Node(_x, _y, _group) cons if(_fix) { var ref = getInputData(8); ref = surface_verify(ref, _fixRef[0], _fixRef[1]); - inputs[| 8].setValue(ref); + inputs[8].setValue(ref); } var aBox = area_get_bbox(_area); @@ -125,7 +125,7 @@ function Node_Scatter_Points(_x, _y, _group = noone) : Node(_x, _y, _group) cons return val; }); - outputs[| 0].setValue(pos); + outputs[0].setValue(pos); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_sdf/node_sdf.gml b/scripts/node_sdf/node_sdf.gml index f03efb3b5..d0c6aeac5 100644 --- a/scripts/node_sdf/node_sdf.gml +++ b/scripts/node_sdf/node_sdf.gml @@ -8,17 +8,17 @@ function Node_SDF(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const uniform_dst_sid = shader_get_uniform(sh_sdf_dist, "side"); uniform_dst_dst = shader_get_uniform(sh_sdf_dist, "max_distance"); - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Bool("Active", self, true); + inputs[1] = nodeValue_Bool("Active", self, true); active_index = 1; - inputs[| 2] = nodeValue_Enum_Button("Side", self, 2, [ "Inside", "Outside", "Both" ]); + inputs[2] = nodeValue_Enum_Button("Side", self, 2, [ "Inside", "Outside", "Both" ]); - inputs[| 3] = nodeValue_Float("Max distance", self, 1) + inputs[3] = nodeValue_Float("Max distance", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 1, ["Surfaces", false], 0, diff --git a/scripts/node_segment_filter/node_segment_filter.gml b/scripts/node_segment_filter/node_segment_filter.gml index 44caa43a5..4f6241cc6 100644 --- a/scripts/node_segment_filter/node_segment_filter.gml +++ b/scripts/node_segment_filter/node_segment_filter.gml @@ -3,17 +3,17 @@ function Node_Segment_Filter(_x, _y, _group = noone) : Node(_x, _y, _group) cons setDimension(96, 48); - inputs[| 0] = nodeValue_Vector("Segments", self, [[]]) + inputs[0] = nodeValue_Vector("Segments", self, [[]]) .setVisible(true, true) .setArrayDepth(1); - inputs[| 1] = nodeValue_Rotation("Angle", self, 0); + inputs[1] = nodeValue_Rotation("Angle", self, 0); - inputs[| 2] = nodeValue_Float("Spread", self, 15); + inputs[2] = nodeValue_Float("Spread", self, 15); - inputs[| 3] = nodeValue_Bool("Both side", self, true); + inputs[3] = nodeValue_Bool("Both side", self, true); - outputs[| 0] = nodeValue_Output("Segments", self, VALUE_TYPE.float, [[]]) + outputs[0] = nodeValue_Output("Segments", self, VALUE_TYPE.float, [[]]) .setDisplay(VALUE_DISPLAY.vector) .setArrayDepth(2); @@ -25,7 +25,7 @@ function Node_Segment_Filter(_x, _y, _group = noone) : Node(_x, _y, _group) cons path_preview_surface = noone; static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _segs = outputs[| 0].getValue(); + var _segs = outputs[0].getValue(); var ox, oy, nx, ny; if(array_invalid(_segs) || array_invalid(_segs[0])) return; @@ -102,7 +102,7 @@ function Node_Segment_Filter(_x, _y, _group = noone) : Node(_x, _y, _group) cons if(!array_empty(_seg)) array_push(_segOut, _seg); } - outputs[| 0].setValue(_segOut); + outputs[0].setValue(_segOut); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_seperate_shape/node_seperate_shape.gml b/scripts/node_seperate_shape/node_seperate_shape.gml index 3e9ed9471..3b5d009b1 100644 --- a/scripts/node_seperate_shape/node_seperate_shape.gml +++ b/scripts/node_seperate_shape/node_seperate_shape.gml @@ -1,27 +1,27 @@ function Node_Seperate_Shape(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Separate Shape"; - inputs[| 0] = nodeValue_Surface("Surface in", self) + inputs[0] = nodeValue_Surface("Surface in", self) .rejectArray(); - inputs[| 1] = nodeValue_Float("Tolerance", self, 0.2) + inputs[1] = nodeValue_Float("Tolerance", self, 0.2) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 1, 0.01 ], update_stat: SLIDER_UPDATE.release }) .rejectArray(); - inputs[| 2] = nodeValue_Bool("Override color", self, false) + inputs[2] = nodeValue_Bool("Override color", self, false) .rejectArray(); - inputs[| 3] = nodeValue_Color("Color", self, c_white) + inputs[3] = nodeValue_Color("Color", self, c_white) .rejectArray(); - inputs[| 4] = nodeValue_Bool("Ignore blank", self, true, "Skip empty and black shape.") + inputs[4] = nodeValue_Bool("Ignore blank", self, true, "Skip empty and black shape.") .rejectArray(); - inputs[| 5] = nodeValue_Enum_Button("Mode", self, 0 , [ "Greyscale", "Alpha" ] ) + inputs[5] = nodeValue_Enum_Button("Mode", self, 0 , [ "Greyscale", "Alpha" ] ) - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Atlas", self, VALUE_TYPE.surface, []); + outputs[1] = nodeValue_Output("Atlas", self, VALUE_TYPE.surface, []); input_display_list = [ ["Shape", false], 0, 5, 1, 4, @@ -153,8 +153,8 @@ function Node_Seperate_Shape(_x, _y, _group = noone) : Node(_x, _y, _group) cons ds_map_destroy(reg); - outputs[| 0].setValue(_val); - outputs[| 1].setValue(_atlas); + outputs[0].setValue(_val); + outputs[1].setValue(_atlas); #endregion } } \ No newline at end of file diff --git a/scripts/node_sequence_anim/node_sequence_anim.gml b/scripts/node_sequence_anim/node_sequence_anim.gml index 0b77ee4c9..66ce2273a 100644 --- a/scripts/node_sequence_anim/node_sequence_anim.gml +++ b/scripts/node_sequence_anim/node_sequence_anim.gml @@ -3,19 +3,19 @@ function Node_Sequence_Anim(_x, _y, _group = noone) : Node(_x, _y, _group) const update_on_frame = true; setAlwaysTimeline(new timelineItemNode_Sequence_Anim(self)); - inputs[| 0] = nodeValue_Surface("Surface in", self, []) + inputs[0] = nodeValue_Surface("Surface in", self, []) .setArrayDepth(1); - inputs[| 1] = nodeValue_Float("Speed", self, 1) + inputs[1] = nodeValue_Float("Speed", self, 1) .rejectArray(); - inputs[| 2] = nodeValue_Int("Sequence", self, []) + inputs[2] = nodeValue_Int("Sequence", self, []) .setVisible(true, true) .setArrayDepth(1); - inputs[| 3] = nodeValue_Enum_Scroll("Overflow", self, 0, [ "Hold", "Loop", "Ping Pong", "Empty" ]); + inputs[3] = nodeValue_Enum_Scroll("Overflow", self, 0, [ "Hold", "Loop", "Ping Pong", "Empty" ]); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); sequence_surface = noone; sequence_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { @@ -33,7 +33,7 @@ function Node_Sequence_Anim(_x, _y, _group = noone) : Node(_x, _y, _group) const draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _y, _w, _h, COLORS.node_composite_bg_blend, 1); - if(_hover && point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h) && inputs[| 2].value_from == noone) { + if(_hover && point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h) && inputs[2].value_from == noone) { draw_sprite_stretched_add(THEME.ui_panel, 1, _x, _y, _w, _h, c_white, 0.2); if(mouse_press(mb_left, _focus)) @@ -87,7 +87,7 @@ function Node_Sequence_Anim(_x, _y, _group = noone) : Node(_x, _y, _group) const static update = function(frame = CURRENT_FRAME) { var _sur = getInputData(0); if(!is_array(_sur)) { - outputs[| 0].setValue(_sur); + outputs[0].setValue(_sur); return; } @@ -113,18 +113,18 @@ function Node_Sequence_Anim(_x, _y, _group = noone) : Node(_x, _y, _group) const if(ind >= _slen) ind = _slpp - ind; } else if(_ovf == 3 && ind >= array_length(_seq)) { - outputs[| 0].setValue(noone); + outputs[0].setValue(noone); return; } ind = array_safe_get(_seq, ind,, ARRAY_OVERFLOW.loop); if(ind == noone) { - outputs[| 0].setValue(noone); + outputs[0].setValue(noone); return; } - outputs[| 0].setValue(array_safe_get_fast(_sur, ind)); + outputs[0].setValue(array_safe_get_fast(_sur, ind)); } } diff --git a/scripts/node_shadow/node_shadow.gml b/scripts/node_shadow/node_shadow.gml index 492657a32..8a8ba2a60 100644 --- a/scripts/node_shadow/node_shadow.gml +++ b/scripts/node_shadow/node_shadow.gml @@ -1,37 +1,37 @@ function Node_Shadow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Shadow"; - inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Color("Color", self, c_black); + inputs[0] = nodeValue_Surface("Surface in", self); + inputs[1] = nodeValue_Color("Color", self, c_black); - inputs[| 2] = nodeValue_Float("Strength", self, .5) + inputs[2] = nodeValue_Float("Strength", self, .5) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] }); - inputs[| 3] = nodeValue_Vector("Shift", self, [ 4, 4 ]) + inputs[3] = nodeValue_Vector("Shift", self, [ 4, 4 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 4] = nodeValue_Float("Grow", self, 3) + inputs[4] = nodeValue_Float("Grow", self, 3) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.1] }); - inputs[| 5] = nodeValue_Float("Blur", self, 3) + inputs[5] = nodeValue_Float("Blur", self, 3) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); - inputs[| 6] = nodeValue_Surface("Mask", self); + inputs[6] = nodeValue_Surface("Mask", self); - inputs[| 7] = nodeValue_Float("Mix", self, 1) + inputs[7] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 8] = nodeValue_Bool("Active", self, true); + inputs[8] = nodeValue_Bool("Active", self, true); active_index = 8; __init_mask_modifier(6); // inputs 9, 10 - inputs[| 11] = nodeValue_Enum_Scroll("Positioning", self, 0, [ "Shift", "Light" ]); + inputs[11] = nodeValue_Enum_Scroll("Positioning", self, 0, [ "Shift", "Light" ]); - inputs[| 12] = nodeValue_Vector("Light Position", self, [ 0, 0 ]) + inputs[12] = nodeValue_Vector("Light Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 8, ["Surfaces", true], 0, 6, 7, 9, 10, @@ -42,7 +42,7 @@ function Node_Shadow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co attribute_surface_depth(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _surf = outputs[| 0].getValue(); + var _surf = outputs[0].getValue(); var _hov = false; if(is_array(_surf)) { @@ -55,8 +55,8 @@ function Node_Shadow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co var _typ = getSingleValue(11); - if(_typ == 0) { var hv = inputs[| 3].drawOverlay(hover, active, _x + ww / 2, _y + hh / 2, _s, _mx, _my, _snx, _sny); _hov |= hv; } - else if(_typ == 1) { var hv = inputs[| 12].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; } + if(_typ == 0) { var hv = inputs[ 3].drawOverlay(hover, active, _x + ww / 2, _y + hh / 2, _s, _mx, _my, _snx, _sny); _hov |= hv; } + else if(_typ == 1) { var hv = inputs[12].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; } return _hov; } @@ -66,8 +66,8 @@ function Node_Shadow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co var _typ = getSingleValue(11); - inputs[| 3].setVisible(_typ == 0); - inputs[| 12].setVisible(_typ == 1); + inputs[ 3].setVisible(_typ == 0); + inputs[12].setVisible(_typ == 1); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_shadow_cast/node_shadow_cast.gml b/scripts/node_shadow_cast/node_shadow_cast.gml index acc06f80d..7c2e011ff 100644 --- a/scripts/node_shadow_cast/node_shadow_cast.gml +++ b/scripts/node_shadow_cast/node_shadow_cast.gml @@ -2,11 +2,11 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou name = "Cast Shadow"; batch_output = false; - inputs[| 0] = nodeValue_Surface("Background", self); + inputs[0] = nodeValue_Surface("Background", self); - inputs[| 1] = nodeValue_Surface("Solid", self); + inputs[1] = nodeValue_Surface("Solid", self); - inputs[| 2] = nodeValue_Vector("Light Position", self, [ 0, 0 ]) + inputs[2] = nodeValue_Vector("Light Position", self, [ 0, 0 ]) .setUnitRef(function(index) { var _surf = getInputData(0); if(is_array(_surf) && array_length(_surf) == 0) @@ -21,51 +21,51 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou return [ surface_get_width_safe(_surf), surface_get_height_safe(_surf) ]; }, VALUE_UNIT.reference); - inputs[| 3] = nodeValue_Float("Soft light radius", self, 1) + inputs[3] = nodeValue_Float("Soft light radius", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 2, 0.01] }); - inputs[| 4] = nodeValue_Int("Light density", self, 1) + inputs[4] = nodeValue_Int("Light density", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); - inputs[| 5] = nodeValue_Enum_Scroll("Light type", self, 0, [ new scrollItem("Point", s_node_shadow_type, 0), + inputs[5] = nodeValue_Enum_Scroll("Light type", self, 0, [ new scrollItem("Point", s_node_shadow_type, 0), new scrollItem("Sun", s_node_shadow_type, 1) ]); - inputs[| 6] = nodeValue_Color("Ambient color", self, c_grey); + inputs[6] = nodeValue_Color("Ambient color", self, c_grey); - inputs[| 7] = nodeValue_Color("Light color", self, c_white); + inputs[7] = nodeValue_Color("Light color", self, c_white); - inputs[| 8] = nodeValue_Float("Light radius", self, 16); + inputs[8] = nodeValue_Float("Light radius", self, 16); - inputs[| 9] = nodeValue_Bool("Render solid", self, true); + inputs[9] = nodeValue_Bool("Render solid", self, true); - inputs[| 10] = nodeValue_Bool("Use BG color", self, false, "If checked, background color will be used as shadow caster."); + inputs[10] = nodeValue_Bool("Use BG color", self, false, "If checked, background color will be used as shadow caster."); - inputs[| 11] = nodeValue_Float("BG threshold", self, 0.1) + inputs[11] = nodeValue_Float("BG threshold", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 12] = nodeValue_Float("Light intensity", self, 1) + inputs[12] = nodeValue_Float("Light intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 2, 0.01] }); - inputs[| 13] = nodeValue_Int("Banding", self, 0) + inputs[13] = nodeValue_Int("Banding", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.1] }); - inputs[| 14] = nodeValue_Enum_Scroll("Attenuation", self, 0, [ new scrollItem("Quadratic", s_node_curve, 0), + inputs[14] = nodeValue_Enum_Scroll("Attenuation", self, 0, [ new scrollItem("Quadratic", s_node_curve, 0), new scrollItem("Invert quadratic", s_node_curve, 1), new scrollItem("Linear", s_node_curve, 2), ]) .setTooltip("Control how light fade out over distance."); - inputs[| 15] = nodeValue_Int("Ambient occlusion", self, 0) + inputs[15] = nodeValue_Int("Ambient occlusion", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.1] }); - inputs[| 16] = nodeValue_Float("Ambient occlusion strength", self, 0.1) + inputs[16] = nodeValue_Float("Ambient occlusion strength", self, 0.1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }); - inputs[| 17] = nodeValue_Bool("Active", self, true); + inputs[17] = nodeValue_Bool("Active", self, true); active_index = 17; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Light mask", self, VALUE_TYPE.surface, noone); + outputs[1] = nodeValue_Output("Light mask", self, VALUE_TYPE.surface, noone); input_display_list = [ 17, ["Surfaces", true], 0, 1, @@ -82,8 +82,8 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou PROCESSOR_OVERLAY_CHECK var _hov = false; - var hv = inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; - if(array_length(current_data) != ds_list_size(inputs)) return _hov; + var hv = inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + if(array_length(current_data) != array_length(inputs)) return _hov; var _type = current_data[5]; if(_type == 0) { @@ -91,7 +91,7 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; - var hv = inputs[| 8].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny, 0, 1 / 4); _hov |= hv; + var hv = inputs[8].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny, 0, 1 / 4); _hov |= hv; } return _hov; @@ -117,7 +117,7 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou var _bg_use = _data[10]; var _bg_thr = _data[11]; - inputs[| 8].setVisible(_type == 0); + inputs[8].setVisible(_type == 0); if(!is_surface(_bg)) return _outSurf; diff --git a/scripts/node_shape/node_shape.gml b/scripts/node_shape/node_shape.gml index 5818a0fa0..18917e0fd 100644 --- a/scripts/node_shape/node_shape.gml +++ b/scripts/node_shape/node_shape.gml @@ -14,14 +14,14 @@ case "square" : ind = array_find_string(node.shape_types, "rectangle"); break; case "circle" : ind = array_find_string(node.shape_types, "ellipse"); break; case "ring" : ind = array_find_string(node.shape_types, "donut"); break; - case "triangle" : ind = array_find_string(node.shape_types, "regular polygon"); node.inputs[| 4].setValue(3); break; - case "pentagon" : ind = array_find_string(node.shape_types, "regular polygon"); node.inputs[| 4].setValue(5); break; - case "hexagon" : ind = array_find_string(node.shape_types, "regular polygon"); node.inputs[| 4].setValue(6); break; + case "triangle" : ind = array_find_string(node.shape_types, "regular polygon"); node.inputs[4].setValue(3); break; + case "pentagon" : ind = array_find_string(node.shape_types, "regular polygon"); node.inputs[4].setValue(5); break; + case "hexagon" : ind = array_find_string(node.shape_types, "regular polygon"); node.inputs[4].setValue(6); break; default : ind = array_find_string(node.shape_types, query); } - if(ind >= 0) node.inputs[| 2].setValue(ind); + if(ind >= 0) node.inputs[2].setValue(ind); return node; } @@ -33,9 +33,9 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con onSurfaceSize = function() { return getInputData(0, DEF_SURF); }; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Bool("Background", self, false); + inputs[1] = nodeValue_Bool("Background", self, false); shape_types = [ "Rectangle", "Diamond", "Trapezoid", "Parallelogram", @@ -52,72 +52,72 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con for( var i = 0, n = array_length(shape_types); i < n; i++ ) shape_types_str[i] = shape_types[i] == -1? -1 : new scrollItem(shape_types[i], s_node_shape_type, _ind++); - inputs[| 2] = nodeValue_Enum_Scroll("Shape", self, 0, { data: shape_types_str, horizontal: true, text_pad: ui(16) }); + inputs[2] = nodeValue_Enum_Scroll("Shape", self, 0, { data: shape_types_str, horizontal: true, text_pad: ui(16) }); - inputs[| 3] = nodeValue_Area("Position", self, DEF_AREA_REF, { onSurfaceSize, useShape : false }) + inputs[3] = nodeValue_Area("Position", self, DEF_AREA_REF, { onSurfaceSize, useShape : false }) .setUnitRef(onSurfaceSize, VALUE_UNIT.reference); - inputs[| 4] = nodeValue_Int("Sides", self, 3) + inputs[4] = nodeValue_Int("Sides", self, 3) .setVisible(false); - inputs[| 5] = nodeValue_Float("Inner radius", self, 0.5) + inputs[5] = nodeValue_Float("Inner radius", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) .setVisible(false); - inputs[| 6] = nodeValue_Bool("Anti-aliasing", self, false); + inputs[6] = nodeValue_Bool("Anti-aliasing", self, false); - inputs[| 7] = nodeValue_Rotation("Rotation", self, 0); + inputs[7] = nodeValue_Rotation("Rotation", self, 0); - inputs[| 8] = nodeValue_Rotation_Range("Angle range", self, [ 0, 180 ]); + inputs[8] = nodeValue_Rotation_Range("Angle range", self, [ 0, 180 ]); - inputs[| 9] = nodeValue_Float("Corner radius", self, 0) + inputs[9] = nodeValue_Float("Corner radius", self, 0) .setValidator(VV_clamp(0, .5)) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }); - inputs[| 9].overlay_draw_text = false; + inputs[9].overlay_draw_text = false; - inputs[| 10] = nodeValue_Color("Shape color", self, c_white); + inputs[10] = nodeValue_Color("Shape color", self, c_white); - inputs[| 11] = nodeValue_Color("Background color", self, c_black); + inputs[11] = nodeValue_Color("Background color", self, c_black); - inputs[| 12] = nodeValue_Bool("Height", self, false); + inputs[12] = nodeValue_Bool("Height", self, false); - inputs[| 13] = nodeValue_Float("Start radius", self, 0.1) + inputs[13] = nodeValue_Float("Start radius", self, 0.1) .setDisplay(VALUE_DISPLAY.slider) .setVisible(false); - inputs[| 14] = nodeValue_PathNode("Shape path", self, noone) + inputs[14] = nodeValue_PathNode("Shape path", self, noone) .setVisible(true, true); - inputs[| 15] = nodeValue_Enum_Scroll("Positioning Mode", self, 0, [ "Area", "Center + Scale", "Full Image" ]) + inputs[15] = nodeValue_Enum_Scroll("Positioning Mode", self, 0, [ "Area", "Center + Scale", "Full Image" ]) - inputs[| 16] = nodeValue_Vector("Center", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ] ) + inputs[16] = nodeValue_Vector("Center", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ] ) .setUnitRef(onSurfaceSize); - inputs[| 17] = nodeValue_Vector("Half Size", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ] ) + inputs[17] = nodeValue_Vector("Half Size", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ] ) .setUnitRef(onSurfaceSize); - inputs[| 18] = nodeValue_Bool("Tile", self, false); + inputs[18] = nodeValue_Bool("Tile", self, false); - inputs[| 19] = nodeValue_Rotation("Shape rotation", self, 0); + inputs[19] = nodeValue_Rotation("Shape rotation", self, 0); - inputs[| 20] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); + inputs[20] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); - inputs[| 21] = nodeValue_Slider_Range("Angles", self, [ 0.5, 1.0 ]); + inputs[21] = nodeValue_Slider_Range("Angles", self, [ 0.5, 1.0 ]); - inputs[| 22] = nodeValue_Float("Skew", self, 0.5 ) + inputs[22] = nodeValue_Float("Skew", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 23] = nodeValue_Slider_Range("Arrow Sizes", self, [ 0.2, 0.3 ] ); + inputs[23] = nodeValue_Slider_Range("Arrow Sizes", self, [ 0.2, 0.3 ] ); - inputs[| 24] = nodeValue_Float("Arrow Head", self, 3 ); + inputs[24] = nodeValue_Float("Arrow Head", self, 3 ); - inputs[| 25] = nodeValue_Int("Teeth Amount", self, 6 ); + inputs[25] = nodeValue_Int("Teeth Amount", self, 6 ); - inputs[| 26] = nodeValue_Vector("Teeth Size", self, [ 0.2, 0.2 ] , { slideSpeed : 0.01 }); + inputs[26] = nodeValue_Vector("Teeth Size", self, [ 0.2, 0.2 ] , { slideSpeed : 0.01 }); - inputs[| 27] = nodeValue_Rotation("Teeth Rotation", self, 0); + inputs[27] = nodeValue_Rotation("Teeth Rotation", self, 0); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Output", false], 0, 6, @@ -178,7 +178,7 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con } if(_type != 2) { - if(inputs[| 9].show_in_inspector) { + if(inputs[9].show_in_inspector) { var _px = _x + _pos[0] * _s; var _py = _y + _pos[1] * _s; @@ -204,19 +204,19 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con draw_set_color(COLORS._main_accent); draw_arc(cx, cy, _cor - _corr, ar, ar + 90, 2); - hv = inputs[| 9].drawOverlay(_int, active, _x0, _y0, _s, _mx, _my, _snx, _sny, aa, _max_s, 1); _hov |= hv; _int &= !_hov; + hv = inputs[9].drawOverlay(_int, active, _x0, _y0, _s, _mx, _my, _snx, _sny, aa, _max_s, 1); _hov |= hv; _int &= !_hov; } } if(_type == 0) { - hv = inputs[| 3].drawOverlay(_int, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; _int &= !_hov; + hv = inputs[3].drawOverlay(_int, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; _int &= !_hov; } else if(_type == 1) { _px = _x + _pos[0] * _s; _py = _y + _pos[1] * _s; - hv = inputs[| 16].drawOverlay(_int, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; _int &= !_hov; - hv = inputs[| 17].drawOverlay(_int, active, _px, _py, _s, _mx, _my, _snx, _sny); _hov |= hv; _int &= !_hov; + hv = inputs[16].drawOverlay(_int, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; _int &= !_hov; + hv = inputs[17].drawOverlay(_int, active, _px, _py, _s, _mx, _my, _snx, _sny); _hov |= hv; _int &= !_hov; } @@ -263,33 +263,33 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con break; } - inputs[| 3].setVisible(_posTyp == 0); - inputs[| 16].setVisible(_posTyp == 1); - inputs[| 17].setVisible(_posTyp == 1); + inputs[ 3].setVisible(_posTyp == 0); + inputs[16].setVisible(_posTyp == 1); + inputs[17].setVisible(_posTyp == 1); - inputs[| 4].setVisible(true); - inputs[| 5].setVisible(true); - inputs[| 6].setVisible(_path == noone); - inputs[| 7].setVisible(true); - inputs[| 8].setVisible(true); - inputs[| 9].setVisible(true); - inputs[| 12].setVisible(_path == noone); - inputs[| 20].setVisible(_path == noone); - inputs[| 13].setVisible(true); - inputs[| 15].setVisible(true); + inputs[ 4].setVisible(true); + inputs[ 5].setVisible(true); + inputs[ 6].setVisible(_path == noone); + inputs[ 7].setVisible(true); + inputs[ 8].setVisible(true); + inputs[ 9].setVisible(true); + inputs[12].setVisible(_path == noone); + inputs[20].setVisible(_path == noone); + inputs[13].setVisible(true); + inputs[15].setVisible(true); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); use_path = _path != noone && struct_has(_path, "getPointRatio"); if(use_path) { - inputs[| 3].setVisible(false); - inputs[| 4].setVisible(false); - inputs[| 5].setVisible(false); - inputs[| 7].setVisible(false); - inputs[| 8].setVisible(false); - inputs[| 9].setVisible(false); - inputs[| 13].setVisible(false); - inputs[| 15].setVisible(false); + inputs[ 3].setVisible(false); + inputs[ 4].setVisible(false); + inputs[ 5].setVisible(false); + inputs[ 7].setVisible(false); + inputs[ 8].setVisible(false); + inputs[ 9].setVisible(false); + inputs[13].setVisible(false); + inputs[15].setVisible(false); surface_set_target(_outSurf); if(_bg) draw_clear_alpha(0, 1); @@ -332,49 +332,49 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con if(_bg) draw_clear_alpha(0, 1); else DRAW_CLEAR - inputs[| 4].setVisible(false); - inputs[| 5].setVisible(false); - inputs[| 7].setVisible(false); - inputs[| 8].setVisible(false); - inputs[| 9].setVisible(false); - inputs[| 13].setVisible(false); - inputs[| 18].setVisible( true); - inputs[| 21].setVisible(false); - inputs[| 22].setVisible(false); - inputs[| 23].setVisible(false); - inputs[| 24].setVisible(false); - inputs[| 25].setVisible(false); - inputs[| 26].setVisible(false); - inputs[| 27].setVisible(false); + inputs[ 4].setVisible(false); + inputs[ 5].setVisible(false); + inputs[ 7].setVisible(false); + inputs[ 8].setVisible(false); + inputs[ 9].setVisible(false); + inputs[13].setVisible(false); + inputs[18].setVisible( true); + inputs[21].setVisible(false); + inputs[22].setVisible(false); + inputs[23].setVisible(false); + inputs[24].setVisible(false); + inputs[25].setVisible(false); + inputs[26].setVisible(false); + inputs[27].setVisible(false); var _shp = array_safe_get(shape_types, _shape, ""); if(is_struct(_shp)) _shp = _shp.data; switch(_shp) { case "Rectangle" : - inputs[| 9].setVisible( true); - inputs[| 18].setVisible(false); + inputs[ 9].setVisible( true); + inputs[18].setVisible(false); shader_set_i("shape", 0); break; case "Diamond" : - inputs[| 9].setVisible( true); + inputs[ 9].setVisible( true); shader_set_i("shape", 10); break; case "Trapezoid" : - inputs[| 9].setVisible( true); - inputs[| 21].setVisible( true); + inputs[ 9].setVisible( true); + inputs[21].setVisible( true); shader_set_i("shape", 11); shader_set_2("trep", _data[21]); break; case "Parallelogram" : - inputs[| 9].setVisible( true); - inputs[| 22].setVisible( true); + inputs[ 9].setVisible( true); + inputs[22].setVisible( true); shader_set_i("shape", 12); shader_set_f("parall", _data[22]); @@ -385,9 +385,9 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con break; case "Regular polygon" : - inputs[| 4].setVisible(true); - inputs[| 7].setVisible(true); - inputs[| 9].setVisible(true); + inputs[4].setVisible(true); + inputs[7].setVisible(true); + inputs[9].setVisible(true); shader_set_i("shape", 2); shader_set_i("sides", _data[4]); @@ -395,12 +395,12 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con break; case "Star" : - inputs[| 4].setVisible(true); - inputs[| 5].setVisible(true); - inputs[| 7].setVisible(true); - inputs[| 9].setVisible(true); + inputs[4].setVisible(true); + inputs[5].setVisible(true); + inputs[7].setVisible(true); + inputs[9].setVisible(true); - inputs[| 5].name = "Inner radius"; + inputs[5].name = "Inner radius"; shader_set_i("shape", 3); shader_set_i("sides", _data[4]); @@ -409,10 +409,10 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con break; case "Arc" : - inputs[| 5].setVisible(true); - inputs[| 8].setVisible(true); + inputs[5].setVisible(true); + inputs[8].setVisible(true); - inputs[| 5].name = "Inner radius"; + inputs[5].name = "Inner radius"; var ar = _data[8]; var center = degtorad(ar[0] + ar[1]) / 2; @@ -425,11 +425,11 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con break; case "Teardrop" : - inputs[| 5].setVisible(true); - inputs[| 13].setVisible(true); + inputs[ 5].setVisible(true); + inputs[13].setVisible(true); - inputs[| 5].name = "End radius"; - inputs[| 13].name = "Start radius"; + inputs[ 5].name = "End radius"; + inputs[13].name = "Start radius"; shader_set_i("shape", 5); shader_set_f("edRad", _data[ 5]); @@ -437,21 +437,21 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con break; case "Cross" : - inputs[| 9].setVisible(true); - inputs[| 13].setVisible(true); + inputs[ 9].setVisible(true); + inputs[13].setVisible(true); - inputs[| 13].name = "Outer radius"; + inputs[13].name = "Outer radius"; shader_set_i("shape", 6); shader_set_f("outer", _data[13]); break; case "Leaf" : - inputs[| 5].setVisible(true); - inputs[| 13].setVisible(true); + inputs[ 5].setVisible(true); + inputs[13].setVisible(true); - inputs[| 5].name = "Inner radius"; - inputs[| 13].name = "Outer radius"; + inputs[ 5].name = "Inner radius"; + inputs[13].name = "Outer radius"; shader_set_i("shape", 7); shader_set_f("inner", _data[ 5]); @@ -459,12 +459,12 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con break; case "Crescent" : - inputs[| 5].setVisible(true); - inputs[| 7].setVisible(true); - inputs[| 13].setVisible(true); + inputs[ 5].setVisible(true); + inputs[ 7].setVisible(true); + inputs[13].setVisible(true); - inputs[| 5].name = "Shift"; - inputs[| 13].name = "Inner circle"; + inputs[ 5].name = "Shift"; + inputs[13].name = "Inner circle"; shader_set_i("shape", 8); shader_set_f("outer", _data[ 5]); @@ -473,9 +473,9 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con break; case "Donut" : - inputs[| 13].setVisible(true); + inputs[13].setVisible(true); - inputs[| 13].name = "Inner circle"; + inputs[13].name = "Inner circle"; shader_set_i("shape", 9); shader_set_f("inner", _data[13]); @@ -487,30 +487,30 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con break; case "Disk Segment": - inputs[| 13].setVisible(true); + inputs[13].setVisible(true); - inputs[| 13].name = "Segment Size"; + inputs[13].name = "Segment Size"; shader_set_i("shape", 14); shader_set_f("inner", -1 + _data[13] * 2.); break; case "Pie": - inputs[| 7].setVisible(true); + inputs[ 7].setVisible(true); shader_set_i("shape", 15); shader_set_f("angle", degtorad(_data[7])); break; case "Rounded Cross": - inputs[| 9].setVisible(true); + inputs[ 9].setVisible(true); shader_set_i("shape", 16); break; case "Arrow": - inputs[| 23].setVisible(true); - inputs[| 24].setVisible(true); + inputs[23].setVisible(true); + inputs[24].setVisible(true); shader_set_i("shape", 17); shader_set_2("arrow", _data[23]); @@ -518,12 +518,12 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con break; case "Gear": - inputs[| 13].setVisible(true); - inputs[| 25].setVisible(true); - inputs[| 26].setVisible(true); - inputs[| 27].setVisible(true); + inputs[13].setVisible(true); + inputs[25].setVisible(true); + inputs[26].setVisible(true); + inputs[27].setVisible(true); - inputs[| 13].name = "Inner Radius"; + inputs[13].name = "Inner Radius"; shader_set_i("shape", 18); shader_set_f("inner", _data[13]); diff --git a/scripts/node_shape_map/node_shape_map.gml b/scripts/node_shape_map/node_shape_map.gml index 666a9acbc..c73d930c6 100644 --- a/scripts/node_shape_map/node_shape_map.gml +++ b/scripts/node_shape_map/node_shape_map.gml @@ -1,26 +1,26 @@ function Node_Shape_Map(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Shape Map"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Bool("Active", self, true); + inputs[1] = nodeValue_Bool("Active", self, true); active_index = 1; - inputs[| 2] = nodeValue_Enum_Scroll("Shape", self, 0, [ new scrollItem("Circle", s_node_shape_circle, 0), + inputs[2] = nodeValue_Enum_Scroll("Shape", self, 0, [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Polygon", s_node_shape_misc, 1), ]); - inputs[| 3] = nodeValue_Vector("Map Scale", self, [ 4, 1 ]); + inputs[3] = nodeValue_Vector("Map Scale", self, [ 4, 1 ]); - inputs[| 4] = nodeValue_Float("Radius", self, 0.5); + inputs[4] = nodeValue_Float("Radius", self, 0.5); - inputs[| 5] = nodeValue_Int("Sides", self, 4); + inputs[5] = nodeValue_Int("Sides", self, 4); - inputs[| 6] = nodeValue_Float("Scale", self, 1) + inputs[6] = nodeValue_Float("Scale", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); - inputs[| 7] = nodeValue_Rotation("Angle", self, 0); + inputs[7] = nodeValue_Rotation("Angle", self, 0); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 1, ["Surfaces", true], 0, @@ -35,7 +35,7 @@ function Node_Shape_Map(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static step = function() { #region var _shape = getInputData(2); - inputs[| 5].setVisible(_shape == 1); + inputs[5].setVisible(_shape == 1); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region diff --git a/scripts/node_shape_polygon/node_shape_polygon.gml b/scripts/node_shape_polygon/node_shape_polygon.gml index ded875270..0ead6d3f8 100644 --- a/scripts/node_shape_polygon/node_shape_polygon.gml +++ b/scripts/node_shape_polygon/node_shape_polygon.gml @@ -6,54 +6,54 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr for( var i = 0, n = array_length(shapesArray); i < n; i++ ) shapesArray[i] = new scrollItem(shapesArray[i], s_node_shape_poly_type, i); - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Bool("Background", self, false); + inputs[1] = nodeValue_Bool("Background", self, false); - inputs[| 2] = nodeValue_Color("Background color", self, c_black); + inputs[2] = nodeValue_Color("Background color", self, c_black); - inputs[| 3] = nodeValue_Color("Shape color", self, c_white); + inputs[3] = nodeValue_Color("Shape color", self, c_white); - inputs[| 4] = nodeValue_Enum_Scroll("Shape", self, 0, shapesArray); + inputs[4] = nodeValue_Enum_Scroll("Shape", self, 0, shapesArray); - inputs[| 5] = nodeValue_Vector("Position", self, [ 0.5, 0.5 ]) + inputs[5] = nodeValue_Vector("Position", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[| 6] = nodeValue_Rotation("Rotation", self, 0); + inputs[6] = nodeValue_Rotation("Rotation", self, 0); - inputs[| 7] = nodeValue_Vector("Scale", self, [ 0.5, 0.5 ]) + inputs[7] = nodeValue_Vector("Scale", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[| 8] = nodeValue_Int("Sides", self, 16) + inputs[8] = nodeValue_Int("Sides", self, 16) .setDisplay(VALUE_DISPLAY.slider, { range: [2, 64, 0.1] }); - inputs[| 9] = nodeValue_Float("Inner radius", self, 0.5) + inputs[9] = nodeValue_Float("Inner radius", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 10] = nodeValue_Float("Radius", self, 0.5) + inputs[10] = nodeValue_Float("Radius", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 11] = nodeValue_Int("Teeth", self, 6) + inputs[11] = nodeValue_Int("Teeth", self, 6) .setDisplay(VALUE_DISPLAY.slider, { range: [3, 16, 0.1] }); - inputs[| 12] = nodeValue_Float("Teeth height", self, 0.2) + inputs[12] = nodeValue_Float("Teeth height", self, 0.2) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 13] = nodeValue_Float("Teeth taper", self, 0) + inputs[13] = nodeValue_Float("Teeth taper", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-0.5, 0.5, 0.01] }); - inputs[| 14] = nodeValue_Rotation_Range("Angle range", self, [ 0, 360 ]); + inputs[14] = nodeValue_Rotation_Range("Angle range", self, [ 0, 360 ]); - inputs[| 15] = nodeValue_Bool("Round cap", self, false); + inputs[15] = nodeValue_Bool("Round cap", self, false); - inputs[| 16] = nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone) + inputs[16] = nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Mesh", self, VALUE_TYPE.mesh, noone); + outputs[1] = nodeValue_Output("Mesh", self, VALUE_TYPE.mesh, noone); - outputs[| 2] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, noone); + outputs[2] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, noone); input_display_list = [ 16, ["Output", false], 0, @@ -68,7 +68,7 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr node_draw_transform_init(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - if(array_length(current_data) != ds_list_size(inputs)) return; + if(array_length(current_data) != array_length(inputs)) return; if(process_amount > 1) return; draw_set_color(c_grey); @@ -112,14 +112,14 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr var _cap = _data[15]; var _mesh = _data[16]; - inputs[| 8].setVisible(_shp == 1 || _shp == 2 || _shp == 3 || _shp == 4 || _shp == 5); - inputs[| 9].setVisible(_shp == 2 || _shp == 4 || _shp == 5 || _shp == 6 || _shp == 7); - inputs[| 10].setVisible(_shp == 3); - inputs[| 11].setVisible(_shp == 6); - inputs[| 12].setVisible(_shp == 6); - inputs[| 13].setVisible(_shp == 6); - inputs[| 14].setVisible(_shp == 5); - inputs[| 15].setVisible(_shp == 5); + inputs[ 8].setVisible(_shp == 1 || _shp == 2 || _shp == 3 || _shp == 4 || _shp == 5); + inputs[ 9].setVisible(_shp == 2 || _shp == 4 || _shp == 5 || _shp == 6 || _shp == 7); + inputs[10].setVisible(_shp == 3); + inputs[11].setVisible(_shp == 6); + inputs[12].setVisible(_shp == 6); + inputs[13].setVisible(_shp == 6); + inputs[14].setVisible(_shp == 5); + inputs[15].setVisible(_shp == 5); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); @@ -141,7 +141,7 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr draw_set_color(_shc); draw_primitive_begin(pr_trianglelist); - outputs[| 2].setVisible(_mesh == noone); + outputs[2].setVisible(_mesh == noone); if(_mesh != noone) { for( var j = 0; j < array_length(_mesh.triangles); j++ ) { diff --git a/scripts/node_shard_noise/node_shard_noise.gml b/scripts/node_shard_noise/node_shard_noise.gml index 4b425efa7..37d2c8ad9 100644 --- a/scripts/node_shard_noise/node_shard_noise.gml +++ b/scripts/node_shard_noise/node_shard_noise.gml @@ -2,38 +2,38 @@ function Node_Shard_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y name = "Shard Noise"; shader = sh_noise_shard; - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 4, 4 ]) + inputs[2] = nodeValue_Vector("Scale", self, [ 4, 4 ]) .setMappable(6); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[| 3] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); addShaderProp(SHADER_UNIFORM.float, "seed"); - inputs[| 4] = nodeValue_Float("Sharpness", self, 1) + inputs[4] = nodeValue_Float("Sharpness", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }) .setMappable(7); addShaderProp(SHADER_UNIFORM.float, "sharpness"); - inputs[| 5] = nodeValue_Float("Progress", self, 0) + inputs[5] = nodeValue_Float("Progress", self, 0) .setMappable(8); addShaderProp(SHADER_UNIFORM.float, "progress") ////////////////////////////////////////////////////////////////////////////////// - inputs[| 6] = nodeValueMap("Scale map", self); addShaderProp(); + inputs[ 6] = nodeValueMap("Scale map", self); addShaderProp(); - inputs[| 7] = nodeValueMap("Sharpness map", self); addShaderProp(); + inputs[ 7] = nodeValueMap("Sharpness map", self); addShaderProp(); - inputs[| 8] = nodeValueMap("Progress map", self); addShaderProp(); + inputs[ 8] = nodeValueMap("Progress map", self); addShaderProp(); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 9] = nodeValue_Rotation("Rotation", self, 0); + inputs[9] = nodeValue_Rotation("Rotation", self, 0); addShaderProp(SHADER_UNIFORM.float, "rotation"); input_display_list = [ @@ -43,15 +43,15 @@ function Node_Shard_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } static step = function() { - inputs[| 2].mappableStep(); - inputs[| 4].mappableStep(); - inputs[| 5].mappableStep(); + inputs[2].mappableStep(); + inputs[4].mappableStep(); + inputs[5].mappableStep(); } } \ No newline at end of file diff --git a/scripts/node_shell/node_shell.gml b/scripts/node_shell/node_shell.gml index bdc699f68..04cc18159 100644 --- a/scripts/node_shell/node_shell.gml +++ b/scripts/node_shell/node_shell.gml @@ -2,9 +2,9 @@ function Node_Shell(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Execute Shell"; setDimension(96, 32 + 24 * 1); - inputs[| 0] = nodeValue_Text("Path", self, ""); + inputs[0] = nodeValue_Text("Path", self, ""); - inputs[| 1] = nodeValue_Text("Script", self, ""); + inputs[1] = nodeValue_Text("Script", self, ""); insp1UpdateTooltip = "Run"; insp1UpdateIcon = [ THEME.sequence_control, 1, COLORS._main_value_positive ]; diff --git a/scripts/node_skew/node_skew.gml b/scripts/node_skew/node_skew.gml index 3be2edeaa..44b9b2bd8 100644 --- a/scripts/node_skew/node_skew.gml +++ b/scripts/node_skew/node_skew.gml @@ -1,37 +1,37 @@ function Node_Skew(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Skew"; - inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Enum_Button("Axis", self, 0, ["x", "y"]); + inputs[0] = nodeValue_Surface("Surface in", self); + inputs[1] = nodeValue_Enum_Button("Axis", self, 0, ["x", "y"]); - inputs[| 2] = nodeValue_Float("Strength", self, 0) + inputs[2] = nodeValue_Float("Strength", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }) .setMappable(12); - inputs[| 3] = nodeValue_Bool("Wrap", self, false); + inputs[3] = nodeValue_Bool("Wrap", self, false); - inputs[| 4] = nodeValue_Vector("Center", self, [0, 0] , { side_button : button(function() { centerAnchor(); }) + inputs[4] = nodeValue_Vector("Center", self, [0, 0] , { side_button : button(function() { centerAnchor(); }) .setIcon(THEME.anchor) .setTooltip(__txt("Set to center")) }); - inputs[| 5] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + inputs[5] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 6] = nodeValue_Surface("Mask", self); + inputs[6] = nodeValue_Surface("Mask", self); - inputs[| 7] = nodeValue_Float("Mix", self, 1) + inputs[7] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 8] = nodeValue_Bool("Active", self, true); + inputs[8] = nodeValue_Bool("Active", self, true); active_index = 8; - inputs[| 9] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[9] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(6); // inputs 10, 11 ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 12] = nodeValueMap("Strength map", self); + inputs[12] = nodeValueMap("Strength map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -40,7 +40,7 @@ function Node_Skew(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons ["Skew", false], 1, 2, 12, 4, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); attribute_oversample(); @@ -51,14 +51,14 @@ function Node_Skew(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons var ww = surface_get_width_safe(current_data[0]); var hh = surface_get_height_safe(current_data[0]); - inputs[| 4].setValue([ww / 2, hh / 2]); + inputs[4].setValue([ww / 2, hh / 2]); } #endregion static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region PROCESSOR_OVERLAY_CHECK var _hov = false; - var hv = inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } #endregion @@ -66,7 +66,7 @@ function Node_Skew(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons static step = function() { #region __step_mask_modifier(); - inputs[| 2].mappableStep(); + inputs[2].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region @@ -77,7 +77,7 @@ function Node_Skew(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons shader_set_dim("dimension", _data[0]); shader_set_2("center", _data[4]); shader_set_i("axis", _data[1]); - shader_set_f_map("amount", _data[2], _data[12], inputs[| 2]); + shader_set_f_map("amount", _data[2], _data[12], inputs[2]); shader_set_i("sampleMode", _samp); draw_surface_safe(_data[0]); surface_reset_shader(); diff --git a/scripts/node_slideshow/node_slideshow.gml b/scripts/node_slideshow/node_slideshow.gml index 38bcc33ed..ab0c79186 100644 --- a/scripts/node_slideshow/node_slideshow.gml +++ b/scripts/node_slideshow/node_slideshow.gml @@ -6,21 +6,21 @@ function Node_Slideshow(_x, _y, _group = noone) : Node(_x, _y, _group) construct setDimension(128, 32); - inputs[| 0] = nodeValue_Int("Order", self, 0); + inputs[0] = nodeValue_Int("Order", self, 0); - inputs[| 1] = nodeValue_Text("Title", self, ""); + inputs[1] = nodeValue_Text("Title", self, ""); - inputs[| 2] = nodeValue_Enum_Scroll("Anchor", self, 0, [ "Center", "Top left" ]); + inputs[2] = nodeValue_Enum_Scroll("Anchor", self, 0, [ "Center", "Top left" ]); slide_title = ""; slide_anchor = 0; static step = function() { - var _ord = inputs[| 0].getValue(); + var _ord = inputs[0].getValue(); project.slideShow[$ _ord] = self; - slide_title = inputs[| 1].getValue(); - slide_anchor = inputs[| 2].getValue(); + slide_title = inputs[1].getValue(); + slide_anchor = inputs[2].getValue(); setDisplayName($"Slide-{slide_title}"); } diff --git a/scripts/node_smear/node_smear.gml b/scripts/node_smear/node_smear.gml index e56d853c0..1cbe46001 100644 --- a/scripts/node_smear/node_smear.gml +++ b/scripts/node_smear/node_smear.gml @@ -1,56 +1,56 @@ function Node_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Smear"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Strength", self, 0.2) + inputs[1] = nodeValue_Float("Strength", self, 0.2) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) .setMappable(9); - inputs[| 2] = nodeValue_Rotation("Direction", self, 0) + inputs[2] = nodeValue_Rotation("Direction", self, 0) .setMappable(10); - inputs[| 3] = nodeValue_Surface("Mask", self); + inputs[3] = nodeValue_Surface("Mask", self); - inputs[| 4] = nodeValue_Float("Mix", self, 1) + inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Bool("Active", self, true); + inputs[5] = nodeValue_Bool("Active", self, true); active_index = 5; - inputs[| 6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(3); // inputs 7, 8 ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 9] = nodeValueMap("Strength map", self); + inputs[ 9] = nodeValueMap("Strength map", self); - inputs[| 10] = nodeValueMap("Direction map", self); + inputs[10] = nodeValueMap("Direction map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValue_Enum_Button("Mode", self, 0, [ "Greyscale", "Alpha" ]); + inputs[11] = nodeValue_Enum_Button("Mode", self, 0, [ "Greyscale", "Alpha" ]); - inputs[| 12] = nodeValue_Enum_Button("Modulate strength", self, 0, [ "Distance", "Color", "None" ]); + inputs[12] = nodeValue_Enum_Button("Modulate strength", self, 0, [ "Distance", "Color", "None" ]); - inputs[| 13] = nodeValue_Int("Spread", self, 0) + inputs[13] = nodeValue_Int("Spread", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range : [ 0, 30, 1 ] }); - inputs[| 14] = nodeValue_Bool("Invert", self, false); + inputs[14] = nodeValue_Bool("Invert", self, false); input_display_list = [ 5, 6, ["Surfaces", true], 0, 3, 4, 7, 8, ["Smear", false], 11, 14, 1, 9, 2, 10, 13, 12, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); attribute_oversample(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _surf = outputs[| 0].getValue(); + var _surf = outputs[0].getValue(); if(is_array(_surf)) { if(array_length(_surf) == 0) return; _surf = _surf[preview_index]; @@ -59,7 +59,7 @@ function Node_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con var ww = surface_get_width_safe(_surf); var hh = surface_get_height_safe(_surf); var _hov = false; - var hv = inputs[| 2].drawOverlay(hover, active, _x + ww / 2 * _s, _y + hh / 2 * _s, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[2].drawOverlay(hover, active, _x + ww / 2 * _s, _y + hh / 2 * _s, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } @@ -67,8 +67,8 @@ function Node_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con static step = function() { __step_mask_modifier(); - inputs[| 1].mappableStep(); - inputs[| 2].mappableStep(); + inputs[ 1].mappableStep(); + inputs[ 2].mappableStep(); } static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -79,8 +79,8 @@ function Node_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con shader_set_f("dimension", _dim); shader_set_f("size", max(_dim[0], _dim[1])); - shader_set_f_map("strength", _data[ 1], _data[ 9], inputs[| 1]); - shader_set_f_map("direction", _data[ 2], _data[10], inputs[| 2]); + shader_set_f_map("strength", _data[ 1], _data[ 9], inputs[ 1]); + shader_set_f_map("direction", _data[ 2], _data[10], inputs[ 2]); shader_set_i("sampleMode", struct_try_get(attributes, "oversample")); shader_set_i("alpha", _data[11]); shader_set_i("inv", _data[14]); diff --git a/scripts/node_smoke_add/node_smoke_add.gml b/scripts/node_smoke_add/node_smoke_add.gml index 6dee4cddf..880faff15 100644 --- a/scripts/node_smoke_add/node_smoke_add.gml +++ b/scripts/node_smoke_add/node_smoke_add.gml @@ -6,24 +6,24 @@ function Node_Smoke_Add(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) con manual_ungroupable = false; - inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) + inputs[0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Surface("Fluid brush", self); + inputs[1] = nodeValue_Surface("Fluid brush", self); - inputs[| 2] = nodeValue_Vector("Position", self, [0, 0]); + inputs[2] = nodeValue_Vector("Position", self, [0, 0]); - inputs[| 3] = nodeValue_Bool("Active", self, true); + inputs[3] = nodeValue_Bool("Active", self, true); - inputs[| 4] = nodeValue_Float("Inherit velocity", self, 0) + inputs[4] = nodeValue_Float("Inherit velocity", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); - inputs[| 5] = nodeValue_Float("Density", self, 1) + inputs[5] = nodeValue_Float("Density", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 6] = nodeValue_Int("Expand velocity mask", self, 0); + inputs[6] = nodeValue_Int("Expand velocity mask", self, 0); - inputs[| 7] = nodeValue_Vector("Velocity", self, [0, 0]); + inputs[7] = nodeValue_Vector("Velocity", self, [0, 0]); input_display_list = [ ["Domain", false], 0, @@ -33,7 +33,7 @@ function Node_Smoke_Add(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) con _prevPos = noone; - outputs[| 0] = nodeValue_Output("Domain", self, VALUE_TYPE.sdomain, noone); + outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.sdomain, noone); temp_surface = [ surface_create(1, 1) ]; @@ -50,7 +50,7 @@ function Node_Smoke_Add(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) con draw_surface_ext_safe(_mat, mx, my, _s, _s, 0, c_white, 0.5); } - inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } #endregion static update = function(frame = CURRENT_FRAME) { @@ -64,7 +64,7 @@ function Node_Smoke_Add(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) con var _vel = getInputData(7); FLUID_DOMAIN_CHECK - outputs[| 0].setValue(_dom); + outputs[0].setValue(_dom); if(!_act) return; if(!is_surface(_mat)) return; diff --git a/scripts/node_smoke_add_collider/node_smoke_add_collider.gml b/scripts/node_smoke_add_collider/node_smoke_add_collider.gml index 52b1c3e07..386de4b3f 100644 --- a/scripts/node_smoke_add_collider/node_smoke_add_collider.gml +++ b/scripts/node_smoke_add_collider/node_smoke_add_collider.gml @@ -5,19 +5,19 @@ function Node_Smoke_Add_Collider(_x, _y, _group = noone) : Node_Smoke(_x, _y, _g manual_ungroupable = false; - inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) + inputs[0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Surface("Collider", self); + inputs[1] = nodeValue_Surface("Collider", self); - inputs[| 2] = nodeValue_Area("Area", self, DEF_AREA , { useShape : false }); + inputs[2] = nodeValue_Area("Area", self, DEF_AREA , { useShape : false }); input_display_list = [ ["Domain", false], 0, ["Collider", false], 1, 2, ]; - outputs[| 0] = nodeValue_Output("Domain", self, VALUE_TYPE.sdomain, noone); + outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.sdomain, noone); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _mat = getInputData(1); @@ -32,7 +32,7 @@ function Node_Smoke_Add_Collider(_x, _y, _group = noone) : Node_Smoke(_x, _y, _g draw_surface_stretched_ext(_mat, x0, y0, x1 - x0, y1 - y0, c_white, 0.5); } - inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static update = function(frame = CURRENT_FRAME) { @@ -41,7 +41,7 @@ function Node_Smoke_Add_Collider(_x, _y, _group = noone) : Node_Smoke(_x, _y, _g var _area = getInputData(2); FLUID_DOMAIN_CHECK - outputs[| 0].setValue(_dom); + outputs[0].setValue(_dom); if(!is_surface(_mat)) return; if(!is_surface(_dom.sf_world)) return; diff --git a/scripts/node_smoke_apply_velocity/node_smoke_apply_velocity.gml b/scripts/node_smoke_apply_velocity/node_smoke_apply_velocity.gml index 3ef5ca5a9..85952772a 100644 --- a/scripts/node_smoke_apply_velocity/node_smoke_apply_velocity.gml +++ b/scripts/node_smoke_apply_velocity/node_smoke_apply_velocity.gml @@ -4,23 +4,23 @@ function Node_Smoke_Apply_Velocity(_x, _y, _group = noone) : Node_Smoke(_x, _y, manual_ungroupable = false; - inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) + inputs[0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Surface("Brush", self); + inputs[1] = nodeValue_Surface("Brush", self); - inputs[| 2] = nodeValue_Vector("Position", self, [0, 0]); + inputs[2] = nodeValue_Vector("Position", self, [0, 0]); - inputs[| 3] = nodeValue_Vector("Velocity", self, [0, 0]); + inputs[3] = nodeValue_Vector("Velocity", self, [0, 0]); - inputs[| 4] = nodeValue_Bool("Active", self, true); + inputs[4] = nodeValue_Bool("Active", self, true); input_display_list = [ ["Domain", false], 0, ["Velocity", false], 4, 1, 2, 3 ]; - outputs[| 0] = nodeValue_Output("Domain", self, VALUE_TYPE.sdomain, noone); + outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.sdomain, noone); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _mat = getInputData(1); @@ -35,7 +35,7 @@ function Node_Smoke_Apply_Velocity(_x, _y, _group = noone) : Node_Smoke(_x, _y, draw_surface_ext_safe(_mat, mx, my, _s, _s, 0, c_white, 0.5); } - inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static update = function(frame = CURRENT_FRAME) { @@ -46,7 +46,7 @@ function Node_Smoke_Apply_Velocity(_x, _y, _group = noone) : Node_Smoke(_x, _y, var _act = getInputData(4); FLUID_DOMAIN_CHECK - outputs[| 0].setValue(_dom); + outputs[0].setValue(_dom); if(!_act) return; if(!is_surface(_mat)) return; diff --git a/scripts/node_smoke_domain/node_smoke_domain.gml b/scripts/node_smoke_domain/node_smoke_domain.gml index 5e48cad34..82c2726a6 100644 --- a/scripts/node_smoke_domain/node_smoke_domain.gml +++ b/scripts/node_smoke_domain/node_smoke_domain.gml @@ -5,36 +5,36 @@ function Node_Smoke_Domain(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) manual_ungroupable = false; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Surface("Collision", self); + inputs[1] = nodeValue_Surface("Collision", self); - inputs[| 2] = nodeValue_Enum_Button("Material dissipation type", self, 1, [ "Multiply", "Subtract" ]); + inputs[2] = nodeValue_Enum_Button("Material dissipation type", self, 1, [ "Multiply", "Subtract" ]); - inputs[| 3] = nodeValue_Float("Material dissipation", self, 0.02) + inputs[3] = nodeValue_Float("Material dissipation", self, 0.02) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.01 ] }); - inputs[| 4] = nodeValue_Enum_Button("Velocity dissipation type", self, 1, [ "Multiply", "Subtract" ]); + inputs[4] = nodeValue_Enum_Button("Velocity dissipation type", self, 1, [ "Multiply", "Subtract" ]); - inputs[| 5] = nodeValue_Float("Velocity dissipation", self, 0.00) + inputs[5] = nodeValue_Float("Velocity dissipation", self, 0.00) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.01 ] }); - inputs[| 6] = nodeValue_Vector("Acceleration", self, [ 0, 0 ]); + inputs[6] = nodeValue_Vector("Acceleration", self, [ 0, 0 ]); - inputs[| 7] = nodeValue_Vector("Material intertia", self, [ 1, -0.2 ]); + inputs[7] = nodeValue_Vector("Material intertia", self, [ 1, -0.2 ]); - inputs[| 8] = nodeValue_Float("Initial pressure", self, 0.75) + inputs[8] = nodeValue_Float("Initial pressure", self, 0.75) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 9] = nodeValue_Float("Material Maccormack weight", self, 1) + inputs[9] = nodeValue_Float("Material Maccormack weight", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 10] = nodeValue_Float("Velocity Maccormack weight", self, 0) + inputs[10] = nodeValue_Float("Velocity Maccormack weight", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 11] = nodeValue_Bool("Wrap", self, false); + inputs[11] = nodeValue_Bool("Wrap", self, false); - outputs[| 0] = nodeValue_Output("Domain", self, VALUE_TYPE.sdomain, noone); + outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.sdomain, noone); input_display_list = [ ["Domain", false], 0, 11, 1, @@ -95,7 +95,7 @@ function Node_Smoke_Domain(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) fd_rectangle_set_repeat(domain, wrap); - outputs[| 0].setValue(domain); + outputs[0].setValue(domain); } #region static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region diff --git a/scripts/node_smoke_domain_queue/node_smoke_domain_queue.gml b/scripts/node_smoke_domain_queue/node_smoke_domain_queue.gml index 7a9b1ef65..1f265090d 100644 --- a/scripts/node_smoke_domain_queue/node_smoke_domain_queue.gml +++ b/scripts/node_smoke_domain_queue/node_smoke_domain_queue.gml @@ -4,24 +4,24 @@ function Node_Smoke_Domain_Queue(_x, _y, _group = noone) : Node_Smoke(_x, _y, _g manual_ungroupable = false; - outputs[| 0] = nodeValue_Output("Domain", self, VALUE_TYPE.sdomain, noone); + outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.sdomain, noone); static createNewInput = function() { - var index = ds_list_size(inputs); + var index = array_length(inputs); - inputs[| index] = nodeValue("Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone ) + inputs[index] = nodeValue("Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone ) .setVisible(true, true); - return inputs[| index]; + return inputs[index]; } setDynamicInput(1, true, VALUE_TYPE.sdomain); static update = function() { - for( var i = 0; i < ds_list_size(inputs); i++ ) { + for( var i = 0; i < array_length(inputs); i++ ) { var _dom = getInputData(i); if(_dom != noone && instance_exists(_dom)) - outputs[| 0].setValue(_dom); + outputs[0].setValue(_dom); } } diff --git a/scripts/node_smoke_group/node_smoke_group.gml b/scripts/node_smoke_group/node_smoke_group.gml index fcda08536..17efe02fa 100644 --- a/scripts/node_smoke_group/node_smoke_group.gml +++ b/scripts/node_smoke_group/node_smoke_group.gml @@ -12,34 +12,34 @@ function Node_Smoke_Group(_x, _y, _group = noone) : Node_Collection(_x, _y, _gro outputNode = noone; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Surface("Collision", self); + inputs[1] = nodeValue_Surface("Collision", self); - inputs[| 2] = nodeValue_Enum_Button("Material dissipation type", self, 1, [ "Multiply", "Subtract" ]); + inputs[2] = nodeValue_Enum_Button("Material dissipation type", self, 1, [ "Multiply", "Subtract" ]); - inputs[| 3] = nodeValue_Float("Material dissipation", self, 0.02) + inputs[3] = nodeValue_Float("Material dissipation", self, 0.02) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.01 ] }); - inputs[| 4] = nodeValue_Enum_Button("Velocity dissipation type", self, 1, [ "Multiply", "Subtract" ]); + inputs[4] = nodeValue_Enum_Button("Velocity dissipation type", self, 1, [ "Multiply", "Subtract" ]); - inputs[| 5] = nodeValue_Float("Velocity dissipation", self, 0.00) + inputs[5] = nodeValue_Float("Velocity dissipation", self, 0.00) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.01 ] }); - inputs[| 6] = nodeValue_Vector("Acceleration", self, [ 0, 0 ]); + inputs[6] = nodeValue_Vector("Acceleration", self, [ 0, 0 ]); - inputs[| 7] = nodeValue_Vector("Material intertia", self, [ 1, -0.2 ]); + inputs[7] = nodeValue_Vector("Material intertia", self, [ 1, -0.2 ]); - inputs[| 8] = nodeValue_Float("Initial pressure", self, 0.75) + inputs[8] = nodeValue_Float("Initial pressure", self, 0.75) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 9] = nodeValue_Float("Material Maccormack weight", self, 1) + inputs[9] = nodeValue_Float("Material Maccormack weight", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 10] = nodeValue_Float("Velocity Maccormack weight", self, 0) + inputs[10] = nodeValue_Float("Velocity Maccormack weight", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 11] = nodeValue_Bool("Wrap", self, false); + inputs[11] = nodeValue_Bool("Wrap", self, false); input_display_list_def = [ ["Domain", false], 0, 11, 1, @@ -49,7 +49,7 @@ function Node_Smoke_Group(_x, _y, _group = noone) : Node_Collection(_x, _y, _gro ["Inputs", false], ]; - custom_input_index = ds_list_size(inputs); + custom_input_index = array_length(inputs); domain = fd_rectangle_create(PROJECT.attributes.surface_dimension[0], PROJECT.attributes.surface_dimension[1]); diff --git a/scripts/node_smoke_group_inline/node_smoke_group_inline.gml b/scripts/node_smoke_group_inline/node_smoke_group_inline.gml index 54e906ce9..6b5c251ad 100644 --- a/scripts/node_smoke_group_inline/node_smoke_group_inline.gml +++ b/scripts/node_smoke_group_inline/node_smoke_group_inline.gml @@ -9,7 +9,7 @@ function Node_Smoke_Group_Inline(_x, _y, _group = noone) : Node_Collection_Inlin var _domain = nodeBuild("Node_Smoke_Domain", x, y); var _render = nodeBuild("Node_Smoke_Render", x + 320, y); - _render.inputs[| 0].setFrom(_domain.outputs[| 0]); + _render.inputs[0].setFrom(_domain.outputs[0]); addNode(_domain); addNode(_render); diff --git a/scripts/node_smoke_render/node_smoke_render.gml b/scripts/node_smoke_render/node_smoke_render.gml index e3e4477ed..e2f9b964f 100644 --- a/scripts/node_smoke_render/node_smoke_render.gml +++ b/scripts/node_smoke_render/node_smoke_render.gml @@ -6,25 +6,25 @@ function Node_Smoke_Render(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) manual_ungroupable = false; - inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) + inputs[0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Dimension(self); + inputs[1] = nodeValue_Dimension(self); - inputs[| 2] = nodeValue_Bool("Interpolate", self, false); + inputs[2] = nodeValue_Bool("Interpolate", self, false); - inputs[| 3] = nodeValue_Bool("Draw Domain", self, false); + inputs[3] = nodeValue_Bool("Draw Domain", self, false); - inputs[| 4] = nodeValue_Bool("Auto Update", self, true); + inputs[4] = nodeValue_Bool("Auto Update", self, true); input_display_list = [ ["Domain", false], 0, ["Render", false], 4, 1, 2, 3, ]; - outputs[| 0] = nodeValue_Output("Smoke", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Smoke", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Domain", self, VALUE_TYPE.surface, noone); + outputs[1] = nodeValue_Output("Domain", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); @@ -38,9 +38,9 @@ function Node_Smoke_Render(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) return; var _dim = getInputData(1); - var _outSurf = outputs[| 0].getValue(); + var _outSurf = outputs[0].getValue(); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); - outputs[| 0].setValue(_outSurf); + outputs[0].setValue(_outSurf); var _dom = getInputData(0); var _int = getInputData(2); @@ -55,7 +55,7 @@ function Node_Smoke_Render(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) if(_upd) fd_rectangle_update(_dom); texture_set_interpolation(false); - outputs[| 1].setValue(_dom.sf_world); + outputs[1].setValue(_dom.sf_world); surface_set_shader(_outSurf, sh_fd_visualize_colorize_glsl); gpu_set_texfilter(_int); diff --git a/scripts/node_smoke_render_output/node_smoke_render_output.gml b/scripts/node_smoke_render_output/node_smoke_render_output.gml index f60172729..ccbe6a102 100644 --- a/scripts/node_smoke_render_output/node_smoke_render_output.gml +++ b/scripts/node_smoke_render_output/node_smoke_render_output.gml @@ -8,16 +8,16 @@ function Node_Smoke_Render_Output(_x, _y, _group = noone) : Node_Group_Output(_x manual_ungroupable = false; - inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) + inputs[0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Dimension(self); + inputs[1] = nodeValue_Dimension(self); - inputs[| 2] = nodeValue_Bool("Interpolate", self, false); + inputs[2] = nodeValue_Bool("Interpolate", self, false); - inputs[| 3] = nodeValue_Bool("Draw Domain", self, false); + inputs[3] = nodeValue_Bool("Draw Domain", self, false); - inputs[| 4] = nodeValue_Bool("Auto Update", self, true); + inputs[4] = nodeValue_Bool("Auto Update", self, true); input_display_list = [ ["Domain", false], 0, @@ -38,14 +38,14 @@ function Node_Smoke_Render_Output(_x, _y, _group = noone) : Node_Group_Output(_x if(!is_struct(group)) return; if(!is_undefined(outParent)) - ds_list_remove(group.outputs, outParent); + array_remove(group.outputs, outParent); outParent = nodeValue("Rendered", group, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone) .uncache() .setVisible(true, true); outParent.from = self; - ds_list_add(group.outputs, outParent); + array_push(group.outputs, outParent); group.refreshNodeDisplay(); group.sortIO(); } if(!LOADING && !APPENDING) createOutput(); diff --git a/scripts/node_smoke_repulse/node_smoke_repulse.gml b/scripts/node_smoke_repulse/node_smoke_repulse.gml index b0698e864..4b24d3607 100644 --- a/scripts/node_smoke_repulse/node_smoke_repulse.gml +++ b/scripts/node_smoke_repulse/node_smoke_repulse.gml @@ -4,24 +4,24 @@ function Node_Smoke_Repulse(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) manual_ungroupable = false; - inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) + inputs[0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Vector("Position", self, [0, 0]); + inputs[1] = nodeValue_Vector("Position", self, [0, 0]); - inputs[| 2] = nodeValue_Float("Radius", self, 8); + inputs[2] = nodeValue_Float("Radius", self, 8); - inputs[| 3] = nodeValue_Float("Strength", self, 0.10) + inputs[3] = nodeValue_Float("Strength", self, 0.10) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[| 4] = nodeValue_Enum_Button("Mode", self, 0, [ "Override", "Add" ]); + inputs[4] = nodeValue_Enum_Button("Mode", self, 0, [ "Override", "Add" ]); input_display_list = [ ["Domain", false], 0, ["Repulse", false], 4, 1, 2, 3 ]; - outputs[| 0] = nodeValue_Output("Domain", self, VALUE_TYPE.sdomain, noone); + outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.sdomain, noone); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _pos = getInputData(1); @@ -32,8 +32,8 @@ function Node_Smoke_Repulse(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) draw_set_color(COLORS._main_accent); draw_circle_prec(px, py, _rad * _s, true); - inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); + inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); } static update = function(frame = CURRENT_FRAME) { @@ -44,7 +44,7 @@ function Node_Smoke_Repulse(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) var _mod = getInputData(4); FLUID_DOMAIN_CHECK - outputs[| 0].setValue(_dom); + outputs[0].setValue(_dom); _rad = max(_rad, 1); var vSurface = surface_create_size(_dom.sf_velocity); diff --git a/scripts/node_smoke_turbulence/node_smoke_turbulence.gml b/scripts/node_smoke_turbulence/node_smoke_turbulence.gml index 660502b68..f1c54bc19 100644 --- a/scripts/node_smoke_turbulence/node_smoke_turbulence.gml +++ b/scripts/node_smoke_turbulence/node_smoke_turbulence.gml @@ -4,31 +4,31 @@ function Node_Smoke_Turbulence(_x, _y, _group = noone) : Node_Smoke(_x, _y, _gro manual_ungroupable = false; - inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) + inputs[0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Area("Effect area", self, DEF_AREA, { useShape : false }); + inputs[1] = nodeValue_Area("Effect area", self, DEF_AREA, { useShape : false }); - inputs[| 2] = nodeValue_Float("Strength", self, 0.10) + inputs[2] = nodeValue_Float("Strength", self, 0.10) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[| 3] = nodeValue_Float("Scale", self, 4) + inputs[3] = nodeValue_Float("Scale", self, 4) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.01] }); - inputs[| 4] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 4].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[4] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[4].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 5] = nodeValue_Enum_Button("Mode", self, 0, [ "Override", "Add" ]); + inputs[5] = nodeValue_Enum_Button("Mode", self, 0, [ "Override", "Add" ]); input_display_list = [ ["Domain", false], 0, ["Turbulence", false], 5, 1, 2, 4, 3 ]; - outputs[| 0] = nodeValue_Output("Domain", self, VALUE_TYPE.sdomain, noone); + outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.sdomain, noone); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static update = function(frame = CURRENT_FRAME) { @@ -40,7 +40,7 @@ function Node_Smoke_Turbulence(_x, _y, _group = noone) : Node_Smoke(_x, _y, _gro var _mod = getInputData(5); FLUID_DOMAIN_CHECK - outputs[| 0].setValue(_dom); + outputs[0].setValue(_dom); var vSurface = surface_create_size(_dom.sf_velocity); diff --git a/scripts/node_smoke_update/node_smoke_update.gml b/scripts/node_smoke_update/node_smoke_update.gml index eea0c6041..d5c4041a6 100644 --- a/scripts/node_smoke_update/node_smoke_update.gml +++ b/scripts/node_smoke_update/node_smoke_update.gml @@ -6,26 +6,26 @@ function Node_Smoke_Update(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) manual_ungroupable = false; - inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) + inputs[0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Bool("Active", self, true); + inputs[1] = nodeValue_Bool("Active", self, true); input_display_list = [ ["Domain", false], 0, ["Update", false], 1, ] - outputs[| 0] = nodeValue_Output("Domain", self, VALUE_TYPE.sdomain, noone); + outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.sdomain, noone); static update = function(frame = CURRENT_FRAME) { if(!PROJECT.animator.is_playing) return; - var _dom = inputs[| 0].getValue(frame); - var _act = inputs[| 1].getValue(frame); + var _dom = inputs[0].getValue(frame); + var _act = inputs[1].getValue(frame); FLUID_DOMAIN_CHECK - outputs[| 0].setValue(_dom); + outputs[0].setValue(_dom); if(!_act) return; if(is_surface(_dom.sf_world)) diff --git a/scripts/node_smoke_vortex/node_smoke_vortex.gml b/scripts/node_smoke_vortex/node_smoke_vortex.gml index b40f6b15c..ed42dc2e1 100644 --- a/scripts/node_smoke_vortex/node_smoke_vortex.gml +++ b/scripts/node_smoke_vortex/node_smoke_vortex.gml @@ -4,28 +4,28 @@ function Node_Smoke_Vortex(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) manual_ungroupable = false; - inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) + inputs[0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Vector("Position", self, [0, 0]); + inputs[1] = nodeValue_Vector("Position", self, [0, 0]); - inputs[| 2] = nodeValue_Float("Radius", self, 8); + inputs[2] = nodeValue_Float("Radius", self, 8); - inputs[| 3] = nodeValue_Float("Strength", self, 0.10) + inputs[3] = nodeValue_Float("Strength", self, 0.10) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[| 4] = nodeValue_Float("Attraction", self, 0) + inputs[4] = nodeValue_Float("Attraction", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[| 5] = nodeValue_Enum_Button("Mode", self, 0, [ "Override", "Add" ]); + inputs[5] = nodeValue_Enum_Button("Mode", self, 0, [ "Override", "Add" ]); input_display_list = [ ["Domain", false], 0, ["Vortex", false], 5, 1, 2, 3, 4 ]; - outputs[| 0] = nodeValue_Output("Domain", self, VALUE_TYPE.sdomain, noone); - outputs[| 1] = nodeValue_Output("Domain", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.sdomain, noone); + outputs[1] = nodeValue_Output("Domain", self, VALUE_TYPE.surface, noone); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _pos = getInputData(1); @@ -36,8 +36,8 @@ function Node_Smoke_Vortex(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) draw_set_color(COLORS._main_accent); draw_circle_prec(px, py, _rad * _s, true); - inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); + inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); } static update = function(frame = CURRENT_FRAME) { @@ -49,7 +49,7 @@ function Node_Smoke_Vortex(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) var _mod = getInputData(5); FLUID_DOMAIN_CHECK - outputs[| 0].setValue(_dom); + outputs[0].setValue(_dom); _rad = max(_rad, 1); var vSurface = surface_create_size(_dom.sf_velocity); @@ -73,7 +73,7 @@ function Node_Smoke_Vortex(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) } //surface_free(vSurface); - outputs[| 1].setValue(vSurface); + outputs[1].setValue(vSurface); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_solid/node_solid.gml b/scripts/node_solid/node_solid.gml index 1cabf60f6..3fe758a4b 100644 --- a/scripts/node_solid/node_solid.gml +++ b/scripts/node_solid/node_solid.gml @@ -1,17 +1,17 @@ function Node_Solid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Solid"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Color("Color", self, cola(c_white)); + inputs[1] = nodeValue_Color("Color", self, cola(c_white)); - inputs[| 2] = nodeValue_Bool("Empty", self, false); + inputs[2] = nodeValue_Bool("Empty", self, false); - inputs[| 3] = nodeValue_Surface("Mask", self); + inputs[3] = nodeValue_Surface("Mask", self); - inputs[| 4] = nodeValue_Bool("Use mask dimension", self, true); + inputs[4] = nodeValue_Bool("Use mask dimension", self, true); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Surfaces", false], 0, 3, 4, @@ -29,7 +29,7 @@ function Node_Solid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con var _maskUse = is_surface(_msk); - inputs[| 4].setVisible(_maskUse); + inputs[4].setVisible(_maskUse); if(_maskUse && _msd) _dim = [ surface_get_width_safe(_msk), surface_get_height_safe(_msk) ]; _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); diff --git a/scripts/node_spherize/node_spherize.gml b/scripts/node_spherize/node_spherize.gml index b4fefbcd0..d55fad896 100644 --- a/scripts/node_spherize/node_spherize.gml +++ b/scripts/node_spherize/node_spherize.gml @@ -1,48 +1,48 @@ function Node_Spherize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Spherize"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Vector("Center", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ]) + inputs[1] = nodeValue_Vector("Center", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 2] = nodeValue_Float("Strength", self, 1) + inputs[2] = nodeValue_Float("Strength", self, 1) .setDisplay(VALUE_DISPLAY.slider) .setMappable(11); - inputs[| 3] = nodeValue_Float("Radius", self, 0.2) + inputs[3] = nodeValue_Float("Radius", self, 0.2) .setDisplay(VALUE_DISPLAY.slider) .setMappable(12); - inputs[| 4] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + inputs[4] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 5] = nodeValue_Surface("Mask", self); + inputs[5] = nodeValue_Surface("Mask", self); - inputs[| 6] = nodeValue_Float("Mix", self, 1) + inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Bool("Active", self, true); + inputs[7] = nodeValue_Bool("Active", self, true); active_index = 7; - inputs[| 8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(5); // inputs 9, 10 ////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValue_Surface("Strength map", self) + inputs[11] = nodeValue_Surface("Strength map", self) .setVisible(false, false); - inputs[| 12] = nodeValue_Surface("Radius map", self) + inputs[12] = nodeValue_Surface("Radius map", self) .setVisible(false, false); ////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 13] = nodeValue_Float("Trim edge", self, 0) + inputs[13] = nodeValue_Float("Trim edge", self, 0) .setDisplay(VALUE_DISPLAY.slider) - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 7, 8, ["Surfaces", true], 0, 5, 6, 9, 10, @@ -63,7 +63,7 @@ function Node_Spherize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var py = _y + pos[1] * _s; var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } #endregion @@ -71,8 +71,8 @@ function Node_Spherize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static step = function() { #region __step_mask_modifier(); - inputs[| 2].mappableStep(); - inputs[| 3].mappableStep(); + inputs[2].mappableStep(); + inputs[3].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region @@ -83,8 +83,8 @@ function Node_Spherize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) shader_set_f("dimension", [ surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0]) ]); shader_set_2("center", _data[1]); shader_set_f("trim", _data[13]); - shader_set_f_map("strength", _data[2], _data[11], inputs[| 2]); - shader_set_f_map("radius", _data[3], _data[12], inputs[| 3]); + shader_set_f_map("strength", _data[2], _data[11], inputs[2]); + shader_set_f_map("radius", _data[3], _data[12], inputs[3]); shader_set_i("sampleMode", sam); draw_surface_safe(_data[0]); diff --git a/scripts/node_spout_send/node_spout_send.gml b/scripts/node_spout_send/node_spout_send.gml index c710bb334..3486dc24b 100644 --- a/scripts/node_spout_send/node_spout_send.gml +++ b/scripts/node_spout_send/node_spout_send.gml @@ -1,11 +1,11 @@ function Node_Spout_Send(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Spout Send"; - inputs[| 0] = nodeValue_Text("Sender name", self, "PixelComposer"); + inputs[0] = nodeValue_Text("Sender name", self, "PixelComposer"); - inputs[| 1] = nodeValue_Surface("Surface", self); + inputs[1] = nodeValue_Surface("Surface", self); - outputs[| 0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone) + outputs[0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone) .setVisible(false); spoutIndex = spoutSenderInit(); @@ -19,8 +19,8 @@ function Node_Spout_Send(_x, _y, _group = noone) : Node(_x, _y, _group) construc static update = function() { #region if(spoutIndex == noone) return; - var _name = inputs[| 0].getValue(); - var _surf = inputs[| 1].getValue(); + var _name = inputs[0].getValue(); + var _surf = inputs[1].getValue(); if(!is_surface(_surf)) return; @@ -33,6 +33,6 @@ function Node_Spout_Send(_x, _y, _group = noone) : Node(_x, _y, _group) construc spoutSetSenderName(spoutIndex, _name); spoutSendPixels(spoutIndex, buffer_get_address(surf_buff), _sw, _sh); - outputs[| 0].setValue(_surf); + outputs[0].setValue(_surf); } #endregion } \ No newline at end of file diff --git a/scripts/node_sprite_stack/node_sprite_stack.gml b/scripts/node_sprite_stack/node_sprite_stack.gml index 1eb6f3347..2f6c1990b 100644 --- a/scripts/node_sprite_stack/node_sprite_stack.gml +++ b/scripts/node_sprite_stack/node_sprite_stack.gml @@ -2,37 +2,37 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro name = "Sprite Stack"; dimension_index = 1; - inputs[| 0] = nodeValue_Surface("Base shape", self); + inputs[0] = nodeValue_Surface("Base shape", self); - inputs[| 1] = nodeValue_Dimension(self); + inputs[1] = nodeValue_Dimension(self); - inputs[| 2] = nodeValue_Int("Stack amount", self, 4); + inputs[2] = nodeValue_Int("Stack amount", self, 4); - inputs[| 3] = nodeValue_Vector("Stack shift", self, [ 0, 1 ] ); + inputs[3] = nodeValue_Vector("Stack shift", self, [ 0, 1 ] ); - inputs[| 4] = nodeValue_Vector("Position", self, [ 0, 0 ] ) + inputs[4] = nodeValue_Vector("Position", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 5] = nodeValue_Rotation("Rotation", self, 0); + inputs[5] = nodeValue_Rotation("Rotation", self, 0); - inputs[| 6] = nodeValue_Color("Stack blend", self, c_white ); + inputs[6] = nodeValue_Color("Stack blend", self, c_white ); - inputs[| 7] = nodeValue_Float("Alpha end", self, 1, "Alpha value for the last copy." ) + inputs[7] = nodeValue_Float("Alpha end", self, 1, "Alpha value for the last copy." ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 8] = nodeValue_Bool("Move base", self, false, "Make each copy move the original image." ); + inputs[8] = nodeValue_Bool("Move base", self, false, "Make each copy move the original image." ); - inputs[| 9] = nodeValue_Enum_Scroll("Highlight", self, 0, [ "None", "Color", "Inner pixel" ]); + inputs[9] = nodeValue_Enum_Scroll("Highlight", self, 0, [ "None", "Color", "Inner pixel" ]); - inputs[| 10] = nodeValue_Color("Highlight color", self, c_white); + inputs[10] = nodeValue_Color("Highlight color", self, c_white); - inputs[| 11] = nodeValue_Float("Highlight alpha", self, 1) + inputs[11] = nodeValue_Float("Highlight alpha", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 12] = nodeValue_Float("Array process", self, 1) + inputs[12] = nodeValue_Float("Array process", self, 1) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Individual", "Combined" ]); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Surface", false], 0, 1, 12, @@ -64,9 +64,9 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro draw_set_color(COLORS._main_accent); draw_line(px, py, sx, sy); var _hov = false; - var hv = inputs[| 3].drawOverlay(hover, active, px, py, _s * 4, _mx, _my, _snx, _sny, 1); active &= hv; _hov |= hv; - var hv = inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= hv; _hov |= hv; - var hv = inputs[| 5].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); active &= hv; _hov |= hv; + var hv = inputs[3].drawOverlay(hover, active, px, py, _s * 4, _mx, _my, _snx, _sny, 1); active &= hv; _hov |= hv; + var hv = inputs[4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= hv; _hov |= hv; + var hv = inputs[5].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); active &= hv; _hov |= hv; return _hov; } @@ -126,10 +126,10 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro } static preGetInputs = function() { - var _surf = inputs[| 0].getValue(); - var _arry = inputs[| 12].getValue(); + var _surf = inputs[ 0].getValue(); + var _arry = inputs[12].getValue(); - inputs[| 0].setArrayDepth(is_array(_surf) && _arry); + inputs[0].setArrayDepth(is_array(_surf) && _arry); } static step = function() { @@ -137,12 +137,12 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro var _surf = getInputData(0); var _arry = getInputData(12); - inputs[| 2].setVisible(_arry == 0 || !is_array(_surf)); + inputs[ 2].setVisible(_arry == 0 || !is_array(_surf)); - inputs[| 10].setVisible(_high); - inputs[| 11].setVisible(_high); + inputs[10].setVisible(_high); + inputs[11].setVisible(_high); - inputs[| 12].setVisible(is_array(_surf)); + inputs[12].setVisible(is_array(_surf)); // custom preview preview_custom = preview_custom_index != noone && is_array(_surf) && _arry; @@ -280,9 +280,9 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro static getPreviewValues = function() { if(preview_custom && is_surface(preview_custom_surface)) return preview_custom_surface; - if(preview_channel >= ds_list_size(outputs)) return noone; + if(preview_channel >= array_length(outputs)) return noone; - switch(outputs[| preview_channel].type) { + switch(outputs[preview_channel].type) { case VALUE_TYPE.surface : case VALUE_TYPE.dynaSurface : break; @@ -290,6 +290,6 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro return; } - return outputs[| preview_channel].getValue(); + return outputs[preview_channel].getValue(); } } \ No newline at end of file diff --git a/scripts/node_stack/node_stack.gml b/scripts/node_stack/node_stack.gml index b99085fe0..15dda4e2d 100644 --- a/scripts/node_stack/node_stack.gml +++ b/scripts/node_stack/node_stack.gml @@ -1,32 +1,32 @@ function Node_Stack(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Stack"; - inputs[| 0] = nodeValue_Enum_Scroll("Axis", self, 0, [ new scrollItem("Horizontal", s_node_alignment, 0), + inputs[0] = nodeValue_Enum_Scroll("Axis", self, 0, [ new scrollItem("Horizontal", s_node_alignment, 0), new scrollItem("Vertical", s_node_alignment, 1), new scrollItem("On top", s_node_alignment, 3), ]) .rejectArray(); - inputs[| 1] = nodeValue_Enum_Button("Align", self, 1, [ "Start", "Middle", "End"]) + inputs[1] = nodeValue_Enum_Button("Align", self, 1, [ "Start", "Middle", "End"]) .rejectArray(); - inputs[| 2] = nodeValue_Int("Spacing", self, 0) + inputs[2] = nodeValue_Int("Spacing", self, 0) .rejectArray(); - inputs[| 3] = nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ]) + inputs[3] = nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ]) .rejectArray(); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Atlas data", self, VALUE_TYPE.surface, []); + outputs[1] = nodeValue_Output("Atlas data", self, VALUE_TYPE.surface, []); temp_surface = [ noone, noone ]; static createNewInput = function() { - var index = ds_list_size(inputs); - inputs[| index] = nodeValue_Surface("Input", self) + var index = array_length(inputs); + inputs[index] = nodeValue_Surface("Input", self) .setVisible(true, true); - return inputs[| index]; + return inputs[index]; } setDynamicInput(1, true, VALUE_TYPE.surface); attribute_surface_depth(); @@ -34,8 +34,8 @@ function Node_Stack(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static step = function() { #region var _axis = getInputData(0); - inputs[| 1].setVisible(_axis != 2); - inputs[| 2].setVisible(_axis != 2); + inputs[1].setVisible(_axis != 2); + inputs[2].setVisible(_axis != 2); } #endregion static update = function(frame = CURRENT_FRAME) { #region @@ -47,7 +47,7 @@ function Node_Stack(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var ww = 0; var hh = 0; - for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) { + for( var i = input_fix_len; i < array_length(inputs); i++ ) { var _surf = getInputData(i); if(!is_array(_surf)) _surf = [ _surf ]; @@ -75,7 +75,7 @@ function Node_Stack(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var ow = ww + _padd[PADDING.left] + _padd[PADDING.right]; var oh = hh + _padd[PADDING.top] + _padd[PADDING.bottom]; - var _outSurf = outputs[| 0].getValue(); + var _outSurf = outputs[0].getValue(); _outSurf = surface_verify(_outSurf, ow, oh, attrDepth()); temp_surface[0] = surface_verify(temp_surface[0], ow, oh, attrDepth()); @@ -88,7 +88,7 @@ function Node_Stack(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var ppind = 0; var sx = 0, sy = 0; - for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) { + for( var i = input_fix_len; i < array_length(inputs); i++ ) { var _surf = getInputData(i); if(!is_array(_surf)) _surf = [ _surf ]; @@ -145,8 +145,8 @@ function Node_Stack(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { BLEND_NORMAL surface_reset_target(); - outputs[| 0].setValue(_outSurf); - outputs[| 1].setValue(atlas); + outputs[0].setValue(_outSurf); + outputs[1].setValue(atlas); } #endregion } diff --git a/scripts/node_stagger/node_stagger.gml b/scripts/node_stagger/node_stagger.gml index b466e97ee..71b95e9ad 100644 --- a/scripts/node_stagger/node_stagger.gml +++ b/scripts/node_stagger/node_stagger.gml @@ -1,17 +1,17 @@ function Node_Stagger(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Stagger"; - inputs[| 0] = nodeValue_Surface("Surface", self); + inputs[0] = nodeValue_Surface("Surface", self); - inputs[| 1] = nodeValue_Int("Delay Step", self, 1); + inputs[1] = nodeValue_Int("Delay Step", self, 1); - inputs[| 2] = nodeValue_Int("Delay Amount", self, 1); + inputs[2] = nodeValue_Int("Delay Amount", self, 1); - inputs[| 3] = nodeValue("Stagger Curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + inputs[3] = nodeValue("Stagger Curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); - inputs[| 4] = nodeValue_Enum_Button("Overflow", self, 0, [ "Hide", "Clamp" ]); + inputs[4] = nodeValue_Enum_Button("Overflow", self, 0, [ "Hide", "Clamp" ]); - outputs[| 0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone); input_display_list = [ 0, ["Stagger", false], 3, 1, 2, 4, diff --git a/scripts/node_statistic/node_statistic.gml b/scripts/node_statistic/node_statistic.gml index 64cf8b36c..b912b3f90 100644 --- a/scripts/node_statistic/node_statistic.gml +++ b/scripts/node_statistic/node_statistic.gml @@ -19,7 +19,7 @@ enum STAT_OPERATOR { default : ind = array_find(global.node_statistic_keys, query); } - if(ind >= 0) node.inputs[| 0].setValue(ind); + if(ind >= 0) node.inputs[0].setValue(ind); return node; } @@ -30,20 +30,20 @@ function Node_Statistic(_x, _y, _group = noone) : Node(_x, _y, _group) construct setDimension(96, 48); - inputs[| 0] = nodeValue_Enum_Scroll("Type", self, 0, [ "Sum", "Mean", "Median", "Max", "Min" ]) + inputs[0] = nodeValue_Enum_Scroll("Type", self, 0, [ "Sum", "Mean", "Median", "Max", "Min" ]) .rejectArray(); static createNewInput = function() { - var index = ds_list_size(inputs); - inputs[| index] = nodeValue_Float("Input", self, -1 ) + var index = array_length(inputs); + inputs[index] = nodeValue_Float("Input", self, -1 ) .setVisible(false, true); - return inputs[| index]; + return inputs[index]; } setDynamicInput(1, true, VALUE_TYPE.float); - outputs[| 0] = nodeValue_Output("Statistic", self, VALUE_TYPE.float, -1); + outputs[0] = nodeValue_Output("Statistic", self, VALUE_TYPE.float, -1); static update = function(frame = CURRENT_FRAME) { #region var type = getInputData(0); @@ -51,7 +51,7 @@ function Node_Statistic(_x, _y, _group = noone) : Node(_x, _y, _group) construct switch(type) { case STAT_OPERATOR._sum : - for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) { + for( var i = input_fix_len; i < array_length(inputs); i++ ) { var val = getInputData(i); if(is_array(val)) { for( var j = 0; j < array_length(val); j++ ) @@ -61,13 +61,13 @@ function Node_Statistic(_x, _y, _group = noone) : Node(_x, _y, _group) construct } break; case STAT_OPERATOR._average : - if(ds_list_size(inputs) <= input_fix_len + 1) { + if(array_length(inputs) <= input_fix_len + 1) { res = 0; break; } var amo = 0; - for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) { + for( var i = input_fix_len; i < array_length(inputs); i++ ) { var val = getInputData(i); if(is_array(val)) { for( var j = 0; j < array_length(val); j++ ) { @@ -82,14 +82,14 @@ function Node_Statistic(_x, _y, _group = noone) : Node(_x, _y, _group) construct res /= amo; break; case STAT_OPERATOR._median : - if(ds_list_size(inputs) - input_fix_len == 0) { + if(array_length(inputs) - input_fix_len == 0) { res = 0; break; } var vals = []; var amo = 0; - for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) { + for( var i = input_fix_len; i < array_length(inputs); i++ ) { var val = getInputData(i); if(is_array(val)) { for( var j = 0; j < array_length(val); j++ ) { @@ -115,7 +115,7 @@ function Node_Statistic(_x, _y, _group = noone) : Node(_x, _y, _group) construct break; case STAT_OPERATOR._min : var _min = 9999999999; - for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) { + for( var i = input_fix_len; i < array_length(inputs); i++ ) { var val = getInputData(i); if(is_array(val)) { for( var j = 0; j < array_length(val); j++ ) @@ -128,7 +128,7 @@ function Node_Statistic(_x, _y, _group = noone) : Node(_x, _y, _group) construct case STAT_OPERATOR._max : var _max = -9999999999; - for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) { + for( var i = input_fix_len; i < array_length(inputs); i++ ) { var val = getInputData(i); if(is_array(val)) { for( var j = 0; j < array_length(val); j++ ) @@ -140,7 +140,7 @@ function Node_Statistic(_x, _y, _group = noone) : Node(_x, _y, _group) construct break; } - outputs[| 0].setValue(res); + outputs[0].setValue(res); } #endregion static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region diff --git a/scripts/node_strand_break/node_strand_break.gml b/scripts/node_strand_break/node_strand_break.gml index 7abd3f5b9..fe68df55c 100644 --- a/scripts/node_strand_break/node_strand_break.gml +++ b/scripts/node_strand_break/node_strand_break.gml @@ -6,11 +6,11 @@ function Node_Strand_Break(_x, _y, _group = noone) : _Node_Strand_Affector(_x, _ manual_ungroupable = false; - inputs[| input_fix_len + 0] = nodeValue_Float("Chance", self, 1) + inputs[input_fix_len + 0] = nodeValue_Float("Chance", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| input_fix_len + 1] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| input_fix_len + 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[input_fix_len + 1] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[input_fix_len + 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); array_push(input_display_list, ["Break", false], input_fix_len + 0, input_fix_len + 1 diff --git a/scripts/node_strand_collision/node_strand_collision.gml b/scripts/node_strand_collision/node_strand_collision.gml index 3f1c2c5b7..ef6a19140 100644 --- a/scripts/node_strand_collision/node_strand_collision.gml +++ b/scripts/node_strand_collision/node_strand_collision.gml @@ -6,13 +6,13 @@ function Node_Strand_Collision(_x, _y, _group = noone) : Node(_x, _y, _group) co manual_ungroupable = false; - inputs[| 0] = nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone) + inputs[0] = nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone) .setVisible(true, true); - inputs[| 1] = nodeValue("Collision mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone) + inputs[1] = nodeValue("Collision mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Strand", self, VALUE_TYPE.strands, noone); + outputs[0] = nodeValue_Output("Strand", self, VALUE_TYPE.strands, noone); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _msh = getInputData(1); @@ -46,7 +46,7 @@ function Node_Strand_Collision(_x, _y, _group = noone) : Node(_x, _y, _group) co } } - outputs[| 0].setValue(_str); + outputs[0].setValue(_str); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_strand_create/node_strand_create.gml b/scripts/node_strand_create/node_strand_create.gml index 37f8831df..646ca628e 100644 --- a/scripts/node_strand_create/node_strand_create.gml +++ b/scripts/node_strand_create/node_strand_create.gml @@ -7,42 +7,42 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const update_on_frame = true; manual_ungroupable = false; - inputs[| 0] = nodeValue_Enum_Scroll("Type", self, 0, [ "Point", "Path", "Mesh" ]); + inputs[0] = nodeValue_Enum_Scroll("Type", self, 0, [ "Point", "Path", "Mesh" ]); - inputs[| 1] = nodeValue_Int("Density", self, 8, "How many strands to generate."); + inputs[1] = nodeValue_Int("Density", self, 8, "How many strands to generate."); - inputs[| 2] = nodeValue_Vector("Length", self, [ 4, 4 ]); + inputs[2] = nodeValue_Vector("Length", self, [ 4, 4 ]); - inputs[| 3] = nodeValue_Int("Segment", self, 4); + inputs[3] = nodeValue_Int("Segment", self, 4); - inputs[| 4] = nodeValue_Float("Elasticity", self, 0.05, "Length preservation, the higher the value the easier it is to stretch each segment.") + inputs[4] = nodeValue_Float("Elasticity", self, 0.05, "Length preservation, the higher the value the easier it is to stretch each segment.") .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_PathNode("Path", self, noone); + inputs[5] = nodeValue_PathNode("Path", self, noone); - inputs[| 6] = nodeValue_Vector("Position", self, [ 0, 0 ]); + inputs[6] = nodeValue_Vector("Position", self, [ 0, 0 ]); - inputs[| 7] = nodeValue_Enum_Button("Side", self, 0, [ "Inner", "Outer", "Both" ]); + inputs[7] = nodeValue_Enum_Button("Side", self, 0, [ "Inner", "Outer", "Both" ]); - inputs[| 8] = nodeValue_Float("Spring", self, 0.8, "Angular stiffness, the higher the value the easier it is to bend each segment.") + inputs[8] = nodeValue_Float("Spring", self, 0.8, "Angular stiffness, the higher the value the easier it is to bend each segment.") .setDisplay(VALUE_DISPLAY.slider); - inputs[| 9] = nodeValue_Float("Structure", self, 0.2, "The ability to keep its original shape.") + inputs[9] = nodeValue_Float("Structure", self, 0.2, "The ability to keep its original shape.") .setDisplay(VALUE_DISPLAY.slider); - inputs[| 10] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 10].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[10] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[10].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 11] = nodeValue_Float("Curl frequency", self, 0); + inputs[11] = nodeValue_Float("Curl frequency", self, 0); - inputs[| 12] = nodeValue_Float("Curliness", self, 1) + inputs[12] = nodeValue_Float("Curliness", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 13] = nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone); + inputs[13] = nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone); - inputs[| 14] = nodeValue_Enum_Scroll("Distribution", self, 0, [ "Uniform", "Random" ]); + inputs[14] = nodeValue_Enum_Scroll("Distribution", self, 0, [ "Uniform", "Random" ]); - inputs[| 15] = nodeValue_Trigger("Bake hair", self, false, "Prevent strand reseting to apply manual modification. Unbaking will remove all changes.") + inputs[15] = nodeValue_Trigger("Bake hair", self, false, "Prevent strand reseting to apply manual modification. Unbaking will remove all changes.") .setDisplay(VALUE_DISPLAY.button, { name: "Bake", UI : true, onClick: function() { attributes.use_groom = !attributes.use_groom; if(attributes.use_groom) @@ -50,12 +50,12 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const strandUpdate(true); } }); - inputs[| 16] = nodeValue_Bool("View fix hair", self, false); + inputs[16] = nodeValue_Bool("View fix hair", self, false); - inputs[| 17] = nodeValue_Vector("Root strength", self, [-1, -1]) + inputs[17] = nodeValue_Vector("Root strength", self, [-1, -1]) .setTooltip("The force required to break strand from its root. Set to -1 to make strand infinitely strong."); - outputs[| 0] = nodeValue_Output("Strand", self, VALUE_TYPE.strands, noone); + outputs[0] = nodeValue_Output("Strand", self, VALUE_TYPE.strands, noone); input_display_list = [ 10, ["Generation", false], 0, 1, 5, 6, 7, 13, 14, 15, @@ -125,7 +125,7 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const if(_typ == 0) { if(tool_dragging == noone) - inputs[| 6].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[6].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } else if(_typ == 1) { var _pth = getInputData(5); var _sid = getInputData(7); @@ -423,13 +423,13 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const static step = function() { #region var _typ = getInputData(0); - inputs[| 5].setVisible(_typ == 1, _typ == 1); - inputs[| 7].setVisible(_typ == 1); - inputs[| 13].setVisible(_typ == 2, _typ == 2); - inputs[| 14].setVisible(_typ != 2); + inputs[ 5].setVisible(_typ == 1, _typ == 1); + inputs[ 7].setVisible(_typ == 1); + inputs[13].setVisible(_typ == 2, _typ == 2); + inputs[14].setVisible(_typ != 2); - inputs[| 15].editWidget.text = attributes.use_groom? "Unbake" : "Bake"; - inputs[| 15].editWidget.blend = attributes.use_groom? COLORS._main_value_negative : COLORS._main_value_positive; + inputs[15].editWidget.text = attributes.use_groom? "Unbake" : "Bake"; + inputs[15].editWidget.blend = attributes.use_groom? COLORS._main_value_negative : COLORS._main_value_positive; } #endregion static strandUpdate = function(willReset = false) { #region @@ -454,14 +454,14 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const if(willReset) { if(attributes.use_groom) { strands = groomed.clone(); - outputs[| 0].setValue(strands); + outputs[0].setValue(strands); return; } strands = new StrandMesh(); } - outputs[| 0].setValue(strands); + outputs[0].setValue(strands); if(_typ == 0) strands.loop = true; diff --git a/scripts/node_strand_force_apply/node_strand_force_apply.gml b/scripts/node_strand_force_apply/node_strand_force_apply.gml index 5d62e74a5..698b219f3 100644 --- a/scripts/node_strand_force_apply/node_strand_force_apply.gml +++ b/scripts/node_strand_force_apply/node_strand_force_apply.gml @@ -6,17 +6,17 @@ function Node_Strand_Force_Apply(_x, _y, _group = noone) : _Node_Strand_Affector manual_ungroupable = false; - inputs[| input_fix_len + 0] = nodeValue_Float("Strength", self, 1) + inputs[input_fix_len + 0] = nodeValue_Float("Strength", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 5, 0.01 ] }); - inputs[| input_fix_len + 1] = nodeValue_Float("Turbulence", self, 0); + inputs[input_fix_len + 1] = nodeValue_Float("Turbulence", self, 0); - inputs[| input_fix_len + 2] = nodeValue_Int("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| input_fix_len + 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[input_fix_len + 2] = nodeValue_Int("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[input_fix_len + 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| input_fix_len + 3] = nodeValue_Float("Turbulence frequency", self, 0.5); + inputs[input_fix_len + 3] = nodeValue_Float("Turbulence frequency", self, 0.5); - inputs[| input_fix_len + 4] = nodeValue_Int("Turbulence detail", self, 2); + inputs[input_fix_len + 4] = nodeValue_Int("Turbulence detail", self, 2); array_push(input_display_list, ["Force", false], input_fix_len + 0, input_fix_len + 2, input_fix_len + 1, input_fix_len + 3, input_fix_len + 4 @@ -32,7 +32,7 @@ function Node_Strand_Force_Apply(_x, _y, _group = noone) : _Node_Strand_Affector var _tfr = getInputData(input_fix_len + 3); var _toc = getInputData(input_fix_len + 4); - inputs[| 4].setVisible(true); + inputs[4].setVisible(true); var _strTur = _tur == 0? _stn : perlin1D(CURRENT_FRAME, _sed, _tfr, _toc, _stn - _tur, _stn + _tur); var gx = lengthdir_x(_strTur, _dir); diff --git a/scripts/node_strand_gravity/node_strand_gravity.gml b/scripts/node_strand_gravity/node_strand_gravity.gml index 277d44d5d..9da017069 100644 --- a/scripts/node_strand_gravity/node_strand_gravity.gml +++ b/scripts/node_strand_gravity/node_strand_gravity.gml @@ -6,14 +6,14 @@ function Node_Strand_Gravity(_x, _y, _group = noone) : Node(_x, _y, _group) cons manual_ungroupable = false; - inputs[| 0] = nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone) + inputs[0] = nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Float("Gravity", self, 1); + inputs[1] = nodeValue_Float("Gravity", self, 1); - inputs[| 2] = nodeValue_Rotation("Direction", self, 0); + inputs[2] = nodeValue_Rotation("Direction", self, 0); - outputs[| 0] = nodeValue_Output("Strand", self, VALUE_TYPE.strands, noone); + outputs[0] = nodeValue_Output("Strand", self, VALUE_TYPE.strands, noone); static update = function(frame = CURRENT_FRAME) { var _str = getInputData(0); @@ -37,7 +37,7 @@ function Node_Strand_Gravity(_x, _y, _group = noone) : Node(_x, _y, _group) cons } } - outputs[| 0].setValue(_str); + outputs[0].setValue(_str); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_strand_group/node_strand_group.gml b/scripts/node_strand_group/node_strand_group.gml index 858b071a2..ac7669250 100644 --- a/scripts/node_strand_group/node_strand_group.gml +++ b/scripts/node_strand_group/node_strand_group.gml @@ -13,9 +13,9 @@ function Node_Strand_Group(_x, _y, _group = noone) : Node_Collection(_x, _y, _gr var _render = nodeBuild("Node_Strand_Render", 128, -32, self); var _output = nodeBuild("Node_Group_Output", 384, -32, self); - _output.inputs[| 0].setFrom(_render.outputs[| 0]); - _render.inputs[| 1].setFrom(_update.outputs[| 0]); - _update.inputs[| 0].setFrom(_create.outputs[| 0]); + _output.inputs[0].setFrom(_render.outputs[0]); + _render.inputs[1].setFrom(_update.outputs[0]); + _update.inputs[0].setFrom(_create.outputs[0]); } static onStep = function() { diff --git a/scripts/node_strand_group_inline/node_strand_group_inline.gml b/scripts/node_strand_group_inline/node_strand_group_inline.gml index 734bcd956..9e45732ef 100644 --- a/scripts/node_strand_group_inline/node_strand_group_inline.gml +++ b/scripts/node_strand_group_inline/node_strand_group_inline.gml @@ -10,7 +10,7 @@ function Node_Strand_Group_Inline(_x, _y, _group = noone) : Node_Collection_Inli var _create = nodeBuild("Node_Strand_Create", x, y); var _render = nodeBuild("Node_Strand_Render", x + 256, y); - _render.inputs[| 1].setFrom(_create.outputs[| 0]); + _render.inputs[1].setFrom(_create.outputs[0]); addNode(_create); addNode(_render); diff --git a/scripts/node_strand_length_adjust/node_strand_length_adjust.gml b/scripts/node_strand_length_adjust/node_strand_length_adjust.gml index 6af735cf8..eecad68ee 100644 --- a/scripts/node_strand_length_adjust/node_strand_length_adjust.gml +++ b/scripts/node_strand_length_adjust/node_strand_length_adjust.gml @@ -6,9 +6,9 @@ function Node_Strand_Length_Adjust(_x, _y, _group = noone) : _Node_Strand_Affect manual_ungroupable = false; - inputs[| input_fix_len + 0] = nodeValue_Enum_Button("Type", self, 0, [ "Increase", "Decrease" ]); + inputs[input_fix_len + 0] = nodeValue_Enum_Button("Type", self, 0, [ "Increase", "Decrease" ]); - inputs[| input_fix_len + 1] = nodeValue_Float("Strength", self, 0.1) + inputs[input_fix_len + 1] = nodeValue_Float("Strength", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); array_push(input_display_list, diff --git a/scripts/node_strand_render/node_strand_render.gml b/scripts/node_strand_render/node_strand_render.gml index 699807f38..fdc7d07de 100644 --- a/scripts/node_strand_render/node_strand_render.gml +++ b/scripts/node_strand_render/node_strand_render.gml @@ -6,27 +6,27 @@ function Node_Strand_Render(_x, _y, _group = noone) : Node(_x, _y, _group) const manual_ungroupable = false; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone) + inputs[1] = nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone) .setVisible(true, true); - inputs[| 2] = nodeValue_Range("Thickness", self, [ 1, 1 ], { linked : true }); + inputs[2] = nodeValue_Range("Thickness", self, [ 1, 1 ], { linked : true }); - inputs[| 3] = nodeValue("Thickness over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + inputs[3] = nodeValue("Thickness over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); - inputs[| 4] = nodeValue_Gradient("Random color", self, new gradientObject(cola(c_white))); + inputs[4] = nodeValue_Gradient("Random color", self, new gradientObject(cola(c_white))); - inputs[| 5] = nodeValue_Gradient("Color over length", self, new gradientObject(cola(c_white))); + inputs[5] = nodeValue_Gradient("Color over length", self, new gradientObject(cola(c_white))); - inputs[| 6] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 6].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[6] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[6].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 7] = nodeValue_Float("Child", self, 0, "Render extra strands between the real strands."); + inputs[7] = nodeValue_Float("Child", self, 0, "Render extra strands between the real strands."); - inputs[| 8] = nodeValue_Int("Update quality", self, 4); + inputs[8] = nodeValue_Int("Update quality", self, 4); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 6, 8, ["Output", false], 0, @@ -61,9 +61,9 @@ function Node_Strand_Render(_x, _y, _group = noone) : Node(_x, _y, _group) const var _chd = getInputData(7); var _stp = getInputData(8); - var _surf = outputs[| 0].getValue(); + var _surf = outputs[0].getValue(); _surf = surface_verify(_surf, _dim[0], _dim[1]); - outputs[| 0].setValue(_surf); + outputs[0].setValue(_surf); if(_str == noone) return; if(!is_array(_str)) _str = [ _str ]; diff --git a/scripts/node_strand_render_texture/node_strand_render_texture.gml b/scripts/node_strand_render_texture/node_strand_render_texture.gml index e49dd2cdb..a0f6d58e3 100644 --- a/scripts/node_strand_render_texture/node_strand_render_texture.gml +++ b/scripts/node_strand_render_texture/node_strand_render_texture.gml @@ -6,21 +6,21 @@ function Node_Strand_Render_Texture(_x, _y, _group = noone) : Node(_x, _y, _grou manual_ungroupable = false; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone) + inputs[1] = nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone) .setVisible(true, true); - inputs[| 2] = nodeValue_Range("Thickness", self, [ 8, 8 ], { linked : true }); + inputs[2] = nodeValue_Range("Thickness", self, [ 8, 8 ], { linked : true }); - inputs[| 3] = nodeValue_Gradient("Random color", self, new gradientObject(cola(c_white))); + inputs[3] = nodeValue_Gradient("Random color", self, new gradientObject(cola(c_white))); - inputs[| 4] = nodeValue_Surface("Texture", self); + inputs[4] = nodeValue_Surface("Texture", self); - inputs[| 5] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[5] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 5, ["Output", false], 0, @@ -51,15 +51,15 @@ function Node_Strand_Render_Texture(_x, _y, _group = noone) : Node(_x, _y, _grou var _tex = getInputData(4); var _sed = getInputData(5); - var _surf = outputs[| 0].getValue(); + var _surf = outputs[0].getValue(); _surf = surface_verify(_surf, _dim[0], _dim[1]); - outputs[| 0].setValue(_surf); + outputs[0].setValue(_surf); if(_str == noone) return; if(!is_array(_str)) _str = [ _str ]; - if(inputs[| 4].value_from == noone) + if(inputs[4].value_from == noone) return; if(!is_array(_tex)) _tex = [ _tex ]; diff --git a/scripts/node_strand_update/node_strand_update.gml b/scripts/node_strand_update/node_strand_update.gml index 6e9d80ed4..707d96ef2 100644 --- a/scripts/node_strand_update/node_strand_update.gml +++ b/scripts/node_strand_update/node_strand_update.gml @@ -6,12 +6,12 @@ function Node_Strand_Update(_x, _y, _group = noone) : Node(_x, _y, _group) const manual_ungroupable = false; - inputs[| 0] = nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone) + inputs[0] = nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone) .setVisible(true, true); - inputs[| 1] = nodeValue_Int("Step", self, 4) + inputs[1] = nodeValue_Int("Step", self, 4) - outputs[| 0] = nodeValue_Output("Strand", self, VALUE_TYPE.strands, noone); + outputs[0] = nodeValue_Output("Strand", self, VALUE_TYPE.strands, noone); static update = function(frame = CURRENT_FRAME) { var _str = getInputData(0); @@ -23,7 +23,7 @@ function Node_Strand_Update(_x, _y, _group = noone) : Node(_x, _y, _group) const for( var i = 0, n = array_length(__str); i < n; i++ ) __str[i].step(_itr); - outputs[| 0].setValue(_str); + outputs[0].setValue(_str); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_string/node_string.gml b/scripts/node_string/node_string.gml index 4c016a911..d32aa65ea 100644 --- a/scripts/node_string/node_string.gml +++ b/scripts/node_string/node_string.gml @@ -2,9 +2,9 @@ function Node_String(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co name = "Text"; setDimension(96, 48);; - inputs[| 0] = nodeValue_Text("Text", self, ""); + inputs[0] = nodeValue_Text("Text", self, ""); - outputs[| 0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); + outputs[0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); static processData = function(_output, _data, _index = 0) { return _data[0]; diff --git a/scripts/node_string_get_char/node_string_get_char.gml b/scripts/node_string_get_char/node_string_get_char.gml index 61d78eb0a..b9463e953 100644 --- a/scripts/node_string_get_char/node_string_get_char.gml +++ b/scripts/node_string_get_char/node_string_get_char.gml @@ -2,14 +2,14 @@ function Node_String_Get_Char(_x, _y, _group = noone) : Node_Processor(_x, _y, _ name = "Get Character"; setDimension(96, 48); - inputs[| 0] = nodeValue_Text("Text", self, "") + inputs[0] = nodeValue_Text("Text", self, "") .setVisible(true, true); - inputs[| 1] = nodeValue_Int("Index", self, 1); + inputs[1] = nodeValue_Int("Index", self, 1); - inputs[| 2] = nodeValue_Int("Amount", self, 1); + inputs[2] = nodeValue_Int("Amount", self, 1); - outputs[| 0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); + outputs[0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); static processData = function(_output, _data, _index = 0) { return string_copy(_data[0], _data[1], _data[2]); diff --git a/scripts/node_string_join/node_string_join.gml b/scripts/node_string_join/node_string_join.gml index 6fb21e752..787709e1a 100644 --- a/scripts/node_string_join/node_string_join.gml +++ b/scripts/node_string_join/node_string_join.gml @@ -3,15 +3,15 @@ function Node_String_Join(_x, _y, _group = noone) : Node(_x, _y, _group) constru setDimension(96, 48); - inputs[| 0] = nodeValue_Text("Text array", self, []) + inputs[0] = nodeValue_Text("Text array", self, []) .setVisible(true, true); - inputs[| 1] = nodeValue_Text("Divider", self, "") + inputs[1] = nodeValue_Text("Divider", self, "") .rejectArray(); - inputs[| 1].editWidget.format = TEXT_AREA_FORMAT.delimiter; + inputs[1].editWidget.format = TEXT_AREA_FORMAT.delimiter; - outputs[| 0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); + outputs[0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); static update = function() { var _arr = getInputData(0); @@ -21,11 +21,11 @@ function Node_String_Join(_x, _y, _group = noone) : Node(_x, _y, _group) constru for( var i = 0, n = array_length(_arr); i < n; i++ ) str += (i? _div : "") + string(_arr[i]); - outputs[| 0].setValue(str); + outputs[0].setValue(str); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { - var str = outputs[| 0].getValue(); + var str = outputs[0].getValue(); var bbox = drawGetBbox(xx, yy, _s); draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); diff --git a/scripts/node_string_length/node_string_length.gml b/scripts/node_string_length/node_string_length.gml index adc322e88..0084d0e6e 100644 --- a/scripts/node_string_length/node_string_length.gml +++ b/scripts/node_string_length/node_string_length.gml @@ -3,12 +3,12 @@ function Node_String_Length(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr setDimension(96, 48); - inputs[| 0] = nodeValue_Text("Text", self, "") + inputs[0] = nodeValue_Text("Text", self, "") .setVisible(true, true); - inputs[| 1] = nodeValue_Enum_Scroll("Mode", self, 0, ["Character", "Word"]); + inputs[1] = nodeValue_Enum_Scroll("Mode", self, 0, ["Character", "Word"]); - outputs[| 0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); + outputs[0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); static processData = function(_output, _data, _index = 0) { if(_data[1] == 0) @@ -18,7 +18,7 @@ function Node_String_Length(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { - var str = outputs[| 0].getValue(); + var str = outputs[0].getValue(); var bbox = drawGetBbox(xx, yy, _s); draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); diff --git a/scripts/node_string_merge/node_string_merge.gml b/scripts/node_string_merge/node_string_merge.gml index 3c797f004..07b3152bf 100644 --- a/scripts/node_string_merge/node_string_merge.gml +++ b/scripts/node_string_merge/node_string_merge.gml @@ -3,15 +3,15 @@ function Node_String_Merge(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro setDimension(96, 48); - outputs[| 0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); + outputs[0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); static createNewInput = function() { - var index = ds_list_size(inputs); + var index = array_length(inputs); - inputs[| index] = nodeValue_Text("Text", self, "" ) + inputs[index] = nodeValue_Text("Text", self, "" ) .setVisible(true, true); - return inputs[| index]; + return inputs[index]; } setDynamicInput(1, true, VALUE_TYPE.text); static processData = function(_output, _data, _index = 0) { @@ -23,7 +23,7 @@ function Node_String_Merge(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { - var _str = outputs[| 0].getValue(); + var _str = outputs[0].getValue(); var bbox = drawGetBbox(xx, yy, _s); draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); diff --git a/scripts/node_string_regex_match/node_string_regex_match.gml b/scripts/node_string_regex_match/node_string_regex_match.gml index 3cc968b77..d599385af 100644 --- a/scripts/node_string_regex_match/node_string_regex_match.gml +++ b/scripts/node_string_regex_match/node_string_regex_match.gml @@ -3,12 +3,12 @@ function Node_String_Regex_Match(_x, _y, _group = noone) : Node_Processor(_x, _y setDimension(96, 48); - inputs[| 0] = nodeValue_Text("Text", self, "") + inputs[0] = nodeValue_Text("Text", self, "") .setVisible(true, true); - inputs[| 1] = nodeValue_Text("Regex", self, ""); + inputs[1] = nodeValue_Text("Regex", self, ""); - outputs[| 0] = nodeValue_Output("Results", self, VALUE_TYPE.boolean, false); + outputs[0] = nodeValue_Output("Results", self, VALUE_TYPE.boolean, false); input_display_list = [ 0, 1, diff --git a/scripts/node_string_regex_replace/node_string_regex_replace.gml b/scripts/node_string_regex_replace/node_string_regex_replace.gml index e32dd332d..d28a1c36a 100644 --- a/scripts/node_string_regex_replace/node_string_regex_replace.gml +++ b/scripts/node_string_regex_replace/node_string_regex_replace.gml @@ -3,14 +3,14 @@ function Node_String_Regex_Replace(_x, _y, _group = noone) : Node_Processor(_x, setDimension(96, 48); - inputs[| 0] = nodeValue_Text("Text", self, "") + inputs[0] = nodeValue_Text("Text", self, "") .setVisible(true, true); - inputs[| 1] = nodeValue_Text("Regex", self, ""); + inputs[1] = nodeValue_Text("Regex", self, ""); - inputs[| 2] = nodeValue_Text("Replacement", self, ""); + inputs[2] = nodeValue_Text("Replacement", self, ""); - outputs[| 0] = nodeValue_Output("Results", self, VALUE_TYPE.text, ""); + outputs[0] = nodeValue_Output("Results", self, VALUE_TYPE.text, ""); input_display_list = [ 0, 1, 2, @@ -25,7 +25,7 @@ function Node_String_Regex_Replace(_x, _y, _group = noone) : Node_Processor(_x, } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { - var str = outputs[| 0].getValue(); + var str = outputs[0].getValue(); var bbox = drawGetBbox(xx, yy, _s); draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); diff --git a/scripts/node_string_regex_search/node_string_regex_search.gml b/scripts/node_string_regex_search/node_string_regex_search.gml index 235e58598..483c8ece1 100644 --- a/scripts/node_string_regex_search/node_string_regex_search.gml +++ b/scripts/node_string_regex_search/node_string_regex_search.gml @@ -3,12 +3,12 @@ function Node_String_Regex_Search(_x, _y, _group = noone) : Node_Processor(_x, _ setDimension(96, 48); - inputs[| 0] = nodeValue_Text("Text", self, "") + inputs[0] = nodeValue_Text("Text", self, "") .setVisible(true, true); - inputs[| 1] = nodeValue_Text("Regex", self, ""); + inputs[1] = nodeValue_Text("Regex", self, ""); - outputs[| 0] = nodeValue_Output("Results", self, VALUE_TYPE.text, []); + outputs[0] = nodeValue_Output("Results", self, VALUE_TYPE.text, []); input_display_list = [ 0, 1, @@ -23,7 +23,7 @@ function Node_String_Regex_Search(_x, _y, _group = noone) : Node_Processor(_x, _ } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { - var str = outputs[| 0].getValue(); + var str = outputs[0].getValue(); var bbox = drawGetBbox(xx, yy, _s); draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); diff --git a/scripts/node_string_split/node_string_split.gml b/scripts/node_string_split/node_string_split.gml index a274e93ea..ccce6fdae 100644 --- a/scripts/node_string_split/node_string_split.gml +++ b/scripts/node_string_split/node_string_split.gml @@ -2,12 +2,12 @@ function Node_String_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro name = "Split Text"; setDimension(96, 48); - inputs[| 0] = nodeValue_Text("Text", self, "") + inputs[0] = nodeValue_Text("Text", self, "") .setVisible(true, true); - inputs[| 1] = nodeValue_Text("Delimiter", self, " ", "Character that used to split text,\nleave blank to create character array."); - inputs[| 1].editWidget.format = TEXT_AREA_FORMAT.delimiter; + inputs[1] = nodeValue_Text("Delimiter", self, " ", "Character that used to split text,\nleave blank to create character array."); + inputs[1].editWidget.format = TEXT_AREA_FORMAT.delimiter; - outputs[| 0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); + outputs[0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); static processData = function(_output, _data, _index = 0) { if(_data[1] == "") diff --git a/scripts/node_string_trim/node_string_trim.gml b/scripts/node_string_trim/node_string_trim.gml index 09e13b7db..3aa9faaac 100644 --- a/scripts/node_string_trim/node_string_trim.gml +++ b/scripts/node_string_trim/node_string_trim.gml @@ -3,19 +3,19 @@ function Node_String_Trim(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou setDimension(96, 48); - inputs[| 0] = nodeValue_Text("Text", self, "") + inputs[0] = nodeValue_Text("Text", self, "") .setVisible(true, true); - inputs[| 1] = nodeValue_Int("Head", self, 0); + inputs[1] = nodeValue_Int("Head", self, 0); - inputs[| 2] = nodeValue_Int("Tail", self, 0); + inputs[2] = nodeValue_Int("Tail", self, 0); - inputs[| 3] = nodeValue_Enum_Scroll("Trim", self, 0, ["Character", "Word"]); + inputs[3] = nodeValue_Enum_Scroll("Trim", self, 0, ["Character", "Word"]); - inputs[| 4] = nodeValue_Enum_Scroll("Mode", self, 0, ["Counter", "Progress"]) + inputs[4] = nodeValue_Enum_Scroll("Mode", self, 0, ["Counter", "Progress"]) .setTooltip("Set to progress to use ratio, where 0 means no change and 1 means the entire length of the text."); - outputs[| 0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); + outputs[0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); input_display_list = [ ["Text", false], 0, @@ -25,8 +25,8 @@ function Node_String_Trim(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou static step = function() { var mode = getInputData(4); - inputs[| 1].setType(mode? VALUE_TYPE.float : VALUE_TYPE.integer); - inputs[| 2].setType(mode? VALUE_TYPE.float : VALUE_TYPE.integer); + inputs[1].setType(mode? VALUE_TYPE.float : VALUE_TYPE.integer); + inputs[2].setType(mode? VALUE_TYPE.float : VALUE_TYPE.integer); } static processData = function(_output, _data, _index = 0) { @@ -65,7 +65,7 @@ function Node_String_Trim(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { - var str = outputs[| 0].getValue(); + var str = outputs[0].getValue(); var bbox = drawGetBbox(xx, yy, _s); draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); diff --git a/scripts/node_stripe/node_stripe.gml b/scripts/node_stripe/node_stripe.gml index 27d0c348d..a9b2452a1 100644 --- a/scripts/node_stripe/node_stripe.gml +++ b/scripts/node_stripe/node_stripe.gml @@ -1,61 +1,61 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Stripe"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Float("Amount", self, 1) + inputs[1] = nodeValue_Float("Amount", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }) .setMappable(11); - inputs[| 2] = nodeValue_Rotation("Angle", self, 0) + inputs[2] = nodeValue_Rotation("Angle", self, 0) .setMappable(12); - inputs[| 3] = nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ]); + inputs[3] = nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ]); - inputs[| 4] = nodeValue_Vector("Position", self, [ 0, 0 ] ) + inputs[4] = nodeValue_Vector("Position", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 5] = nodeValue_Float("Random", self, 0) + inputs[5] = nodeValue_Float("Random", self, 0) .setDisplay(VALUE_DISPLAY.slider) .setMappable(13); - inputs[| 6] = nodeValue_Enum_Button("Coloring", self, 0, [ "Alternate", "Palette", "Random" ]); + inputs[6] = nodeValue_Enum_Button("Coloring", self, 0, [ "Alternate", "Palette", "Random" ]); - inputs[| 7] = nodeValue_Gradient("Colors", self, new gradientObject(cola(c_white))) + inputs[7] = nodeValue_Gradient("Colors", self, new gradientObject(cola(c_white))) .setMappable(15); - inputs[| 8] = nodeValue_Color("Color 1", self, c_white); + inputs[8] = nodeValue_Color("Color 1", self, c_white); - inputs[| 9] = nodeValue_Color("Color 2", self, c_black); + inputs[9] = nodeValue_Color("Color 2", self, c_black); - inputs[| 10] = nodeValue_Float("Strip ratio", self, 0.5) + inputs[10] = nodeValue_Float("Strip ratio", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) .setMappable(14); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValueMap("Amount map", self); + inputs[11] = nodeValueMap("Amount map", self); - inputs[| 12] = nodeValueMap("Angle map", self); + inputs[12] = nodeValueMap("Angle map", self); - inputs[| 13] = nodeValueMap("Random map", self); + inputs[13] = nodeValueMap("Random map", self); - inputs[| 14] = nodeValueMap("Ratio map", self); + inputs[14] = nodeValueMap("Ratio map", self); - inputs[| 15] = nodeValueMap("Gradient map", self); + inputs[15] = nodeValueMap("Gradient map", self); - inputs[| 16] = nodeValueGradientRange("Gradient map range", self, inputs[| 7]); + inputs[16] = nodeValueGradientRange("Gradient map range", self, inputs[7]); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 17] = nodeValue_Float("Progress", self, 0.5) + inputs[17] = nodeValue_Float("Progress", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 18] = nodeValue_Palette("Colors", self, [ c_black, c_white ] ); + inputs[18] = nodeValue_Palette("Colors", self, [ c_black, c_white ] ); - inputs[| 19] = nodeValueSeed(self, VALUE_TYPE.float); + inputs[19] = nodeValueSeed(self, VALUE_TYPE.float); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 19, ["Output", true], 0, @@ -73,9 +73,9 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co var py = _y + pos[1] * _s; var _hov = false; - var hv = inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; - var hv = inputs[| 2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; - var hv = inputs[| 16].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[0]); active &= !hv; _hov |= hv; + var hv = inputs[4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; + var hv = inputs[2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); active &= !hv; _hov |= hv; + var hv = inputs[16].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[0]); active &= !hv; _hov |= hv; return _hov; } @@ -83,16 +83,16 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co static step = function() { var _clr = getSingleValue(6); - inputs[| 1].mappableStep(); - inputs[| 2].mappableStep(); - inputs[| 5].mappableStep(); - inputs[| 7].mappableStep(); - inputs[| 10].mappableStep(); + inputs[ 1].mappableStep(); + inputs[ 2].mappableStep(); + inputs[ 5].mappableStep(); + inputs[ 7].mappableStep(); + inputs[10].mappableStep(); - inputs[| 8].setVisible(_clr == 0); - inputs[| 9].setVisible(_clr == 0); - inputs[| 18].setVisible(_clr == 1); - inputs[| 7].setVisible(_clr == 2); + inputs[ 8].setVisible(_clr == 0); + inputs[ 9].setVisible(_clr == 0); + inputs[18].setVisible(_clr == 1); + inputs[ 7].setVisible(_clr == 2); } static processData = function(_outSurf, _data, _output_index, _array_index) { #region @@ -116,10 +116,10 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co shader_set_i("blend", _bnd); shader_set_f("progress", _prg); - shader_set_f_map("amount", _data[ 1], _data[11], inputs[| 1]); - shader_set_f_map("angle", _data[ 2], _data[12], inputs[| 2]); - shader_set_f_map("randomAmount", _data[ 5], _data[13], inputs[| 5]); - shader_set_f_map("ratio", _data[10], _data[14], inputs[| 10]); + shader_set_f_map("amount", _data[ 1], _data[11], inputs[ 1]); + shader_set_f_map("angle", _data[ 2], _data[12], inputs[ 2]); + shader_set_f_map("randomAmount", _data[ 5], _data[13], inputs[ 5]); + shader_set_f_map("ratio", _data[10], _data[14], inputs[10]); shader_set_i("coloring", _color); @@ -127,7 +127,7 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co shader_set_color("color1", _clr1); shader_set_palette(_pal); - shader_set_gradient(_data[7], _data[15], _data[16], inputs[| 7]); + shader_set_gradient(_data[7], _data[15], _data[16], inputs[7]); draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1); surface_reset_shader(); diff --git a/scripts/node_struct/node_struct.gml b/scripts/node_struct/node_struct.gml index 6ad73f06c..f841cd467 100644 --- a/scripts/node_struct/node_struct.gml +++ b/scripts/node_struct/node_struct.gml @@ -13,14 +13,14 @@ function Node_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var amo = attributes.size; if(buttonTextIconInstant(attributes.size > 0, THEME.button_hide, _x + _w - bw, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.minus, __txt("Remove"), COLORS._main_value_negative) == 2) - deleteInput(ds_list_size(inputs) - data_length); + deleteInput(array_length(inputs) - data_length); return _h; }); #endregion input_display_list = [ size_adjust_tool, ]; - outputs[| 0] = nodeValue_Output("Struct", self, VALUE_TYPE.struct, {}); + outputs[0] = nodeValue_Output("Struct", self, VALUE_TYPE.struct, {}); #region //////////////////////////////// Dynamic IO //////////////////////////////// @@ -44,7 +44,7 @@ function Node_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constructor setDynamicInput(2, false); static addInput = function() { - var index = ds_list_size(inputs); + var index = array_length(inputs); attributes.size++; createNewInput(); @@ -52,7 +52,7 @@ function Node_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constructor if(!UNDO_HOLDING) { var _inputs = array_create(data_length); for(var i = 0; i < data_length; i++) - _inputs[i] = inputs[| index + i]; + _inputs[i] = inputs[index + i]; recordAction(ACTION_TYPE.custom, function(data, undo) { if(undo) deleteInput(data.index); @@ -67,7 +67,7 @@ function Node_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constructor if(!UNDO_HOLDING) { var _inputs = array_create(data_length); for(var i = 0; i < data_length; i++) - _inputs[i] = inputs[| index + i]; + _inputs[i] = inputs[index + i]; recordAction(ACTION_TYPE.custom, function(data, undo) { if(undo) insertInput(data.index, data.inputs); @@ -77,7 +77,7 @@ function Node_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constructor attributes.size--; for(var i = data_length - 1; i >= 0; i--) - ds_list_delete(inputs, index + i); + array_delete(inputs, index + i, 1); onInputResize(); } @@ -86,7 +86,7 @@ function Node_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constructor attributes.size++; for(var i = 0; i < data_length; i++) - ds_list_insert(inputs, index + i, _inputs[i]); + array_insert(inputs, index + i, _inputs[i]); onInputResize(); } @@ -94,8 +94,8 @@ function Node_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constructor static refreshDynamicInput = function() { input_display_list = array_clone(input_display_list_raw); - for( var i = 0; i < ds_list_size(inputs); i++ ) { - inputs[| i].index = i; + for( var i = 0; i < array_length(inputs); i++ ) { + inputs[i].index = i; array_push(input_display_list, i); } @@ -109,14 +109,14 @@ function Node_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constructor if(index < 0) return; if(safe_mod(index - input_fix_len, data_length) == 0) { - inputs[| index + 1].setVisible(false, true); - inputs[| index + 1].name = $"{getInputData(index)} value"; + inputs[index + 1].setVisible(false, true); + inputs[index + 1].name = $"{getInputData(index)} value"; } } static step = function() { - for(var i = input_fix_len; i < ds_list_size(inputs); i += data_length) { - var inp = inputs[| i + 1]; + for(var i = input_fix_len; i < array_length(inputs); i += data_length) { + var inp = inputs[i + 1]; var typ = inp.value_from == noone? VALUE_TYPE.any : inp.value_from.type; inp.setType(typ); } @@ -125,10 +125,10 @@ function Node_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constructor static update = function() { var str = {}; - for(var i = input_fix_len; i < ds_list_size(inputs); i += data_length) { + for(var i = input_fix_len; i < array_length(inputs); i += data_length) { var key = getInputData(i + 0); var val = getInputData(i + 1); - var frm = inputs[| i + 1].value_from; + var frm = inputs[i + 1].value_from; if(key == "") continue; @@ -140,7 +140,7 @@ function Node_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constructor str[$ key] = val; } - outputs[| 0].setValue(str); + outputs[0].setValue(str); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { @@ -148,9 +148,9 @@ function Node_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constructor draw_set_text(f_sdf, fa_left, fa_center, COLORS._main_text); - for(var i = input_fix_len; i < ds_list_size(inputs); i += data_length) { + for(var i = input_fix_len; i < array_length(inputs); i += data_length) { var key = getInputData(i + 0, ""); - var val = inputs[| i + 1]; + var val = inputs[i + 1]; if(!val.visible) continue; var _ss = min(_s * .4, string_scale(key, bbox.w - 12 * _s, 9999)); diff --git a/scripts/node_struct_get/node_struct_get.gml b/scripts/node_struct_get/node_struct_get.gml index 50cd7fdbe..f9a07af10 100644 --- a/scripts/node_struct_get/node_struct_get.gml +++ b/scripts/node_struct_get/node_struct_get.gml @@ -3,12 +3,12 @@ function Node_Struct_Get(_x, _y, _group = noone) : Node(_x, _y, _group) construc setDimension(96, 48); - inputs[| 0] = nodeValue_Struct("Struct", self, {}) + inputs[0] = nodeValue_Struct("Struct", self, {}) .setVisible(true, true); - inputs[| 1] = nodeValue_Text("Key", self, ""); + inputs[1] = nodeValue_Text("Key", self, ""); - outputs[| 0] = nodeValue_Output("Struct", self, VALUE_TYPE.struct, {}); + outputs[0] = nodeValue_Output("Struct", self, VALUE_TYPE.struct, {}); static getStructValue = function(str, keys) { #region var _pnt = str, val = 0; @@ -60,13 +60,13 @@ function Node_Struct_Get(_x, _y, _group = noone) : Node(_x, _y, _group) construc val[i] = _v[1]; } - outputs[| 0].setType(typ); - outputs[| 0].setValue(val); + outputs[0].setType(typ); + outputs[0].setValue(val); } else { var val = getStructValue(str, keys); - outputs[| 0].setType(val[0]); - outputs[| 0].setValue(val[1]); + outputs[0].setType(val[0]); + outputs[0].setValue(val[1]); } } #endregion diff --git a/scripts/node_struct_json_parse/node_struct_json_parse.gml b/scripts/node_struct_json_parse/node_struct_json_parse.gml index 2be241930..3a5dc26e8 100644 --- a/scripts/node_struct_json_parse/node_struct_json_parse.gml +++ b/scripts/node_struct_json_parse/node_struct_json_parse.gml @@ -2,15 +2,15 @@ function Node_Struct_JSON_Parse(_x, _y, _group = noone) : Node(_x, _y, _group) c name = "JSON Parse"; setDimension(96, 32 + 24); - inputs[| 0] = nodeValue_Text("JSON string", self, 0) + inputs[0] = nodeValue_Text("JSON string", self, 0) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Struct", self, VALUE_TYPE.struct, {} ); + outputs[0] = nodeValue_Output("Struct", self, VALUE_TYPE.struct, {} ); static update = function(frame = CURRENT_FRAME) { var _str = getInputData(0); var str = json_parse(_str); - outputs[| 0].setValue(str); + outputs[0].setValue(str); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_struct_set/node_struct_set.gml b/scripts/node_struct_set/node_struct_set.gml index fdda0b4e6..363f41207 100644 --- a/scripts/node_struct_set/node_struct_set.gml +++ b/scripts/node_struct_set/node_struct_set.gml @@ -3,14 +3,14 @@ function Node_Struct_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construc setDimension(96, 48); - inputs[| 0] = nodeValue_Struct("Struct", self, {}) + inputs[0] = nodeValue_Struct("Struct", self, {}) .setVisible(true, true); - inputs[| 1] = nodeValue_Text("Key", self, ""); + inputs[1] = nodeValue_Text("Key", self, ""); - inputs[| 2] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0); + inputs[2] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0); - outputs[| 0] = nodeValue_Output("Struct", self, VALUE_TYPE.struct, {}); + outputs[0] = nodeValue_Output("Struct", self, VALUE_TYPE.struct, {}); static update = function() { var str = getInputData(0); @@ -20,7 +20,7 @@ function Node_Struct_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construc var keys = string_splice(key, "."); var _str = str; - var out = outputs[| 0]; + var out = outputs[0]; for( var j = 0; j < array_length(keys); j++ ) { var k = keys[j]; diff --git a/scripts/node_surface_data/node_surface_data.gml b/scripts/node_surface_data/node_surface_data.gml index 40cee05ed..1b42657f1 100644 --- a/scripts/node_surface_data/node_surface_data.gml +++ b/scripts/node_surface_data/node_surface_data.gml @@ -2,12 +2,12 @@ function Node_Surface_data(_x, _y, _group = noone) : Node(_x, _y, _group) constr name = "Surface data"; color = COLORS.node_blend_number; - inputs[| 0] = nodeValue_Surface("Surface", self); + inputs[0] = nodeValue_Surface("Surface", self); - outputs[| 0] = nodeValue_Output("Dimension", self, VALUE_TYPE.integer, [ 1, 1 ]) + outputs[0] = nodeValue_Output("Dimension", self, VALUE_TYPE.integer, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); - outputs[| 1] = nodeValue_Output("Array length", self, VALUE_TYPE.integer, 0); + outputs[1] = nodeValue_Output("Array length", self, VALUE_TYPE.integer, 0); setDimension(96, 48); @@ -23,13 +23,13 @@ function Node_Surface_data(_x, _y, _group = noone) : Node(_x, _y, _group) constr _dim[i][1] = surface_get_height_safe(_insurf[i]); } - outputs[| 0].setValue(_dim); - outputs[| 1].setValue(len); + outputs[0].setValue(_dim); + outputs[1].setValue(len); return; } if(!_insurf || !surface_exists(_insurf)) return; - outputs[| 0].setValue([ surface_get_width_safe(_insurf), surface_get_height_safe(_insurf) ]); + outputs[0].setValue([ surface_get_width_safe(_insurf), surface_get_height_safe(_insurf) ]); } } \ No newline at end of file diff --git a/scripts/node_surface_from_buffer/node_surface_from_buffer.gml b/scripts/node_surface_from_buffer/node_surface_from_buffer.gml index 52740a35f..9335fc037 100644 --- a/scripts/node_surface_from_buffer/node_surface_from_buffer.gml +++ b/scripts/node_surface_from_buffer/node_surface_from_buffer.gml @@ -1,10 +1,10 @@ function Node_Surface_From_Buffer(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Surface from Buffer"; - inputs[| 0] = nodeValue_Buffer("Buffer", self, noone) + inputs[0] = nodeValue_Buffer("Buffer", self, noone) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone); static processData = function(_outSurf, _data, _output_index, _array_index) { var _buff = _data[0]; diff --git a/scripts/node_surface_from_color/node_surface_from_color.gml b/scripts/node_surface_from_color/node_surface_from_color.gml index 3d318415b..24911752c 100644 --- a/scripts/node_surface_from_color/node_surface_from_color.gml +++ b/scripts/node_surface_from_color/node_surface_from_color.gml @@ -1,9 +1,9 @@ function Node_Surface_From_Color(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Surface from Color"; - inputs[| 0] = nodeValue_Palette("Color", self, array_clone(DEF_PALETTE)); + inputs[0] = nodeValue_Palette("Color", self, array_clone(DEF_PALETTE)); - outputs[| 0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone); static processData = function(_outSurf, _data, _output_index, _array_index) { var _col = _data[0]; diff --git a/scripts/node_surface_replace/node_surface_replace.gml b/scripts/node_surface_replace/node_surface_replace.gml index 84724297c..9918d3875 100644 --- a/scripts/node_surface_replace/node_surface_replace.gml +++ b/scripts/node_surface_replace/node_surface_replace.gml @@ -1,32 +1,32 @@ function Node_Surface_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Replace Image"; - inputs[| 0] = nodeValue_Surface("Base Image", self); + inputs[0] = nodeValue_Surface("Base Image", self); - inputs[| 1] = nodeValue_Surface("Target Image", self) + inputs[1] = nodeValue_Surface("Target Image", self) .setArrayDepth(1); - inputs[| 2] = nodeValue_Surface("Replacement Image", self) + inputs[2] = nodeValue_Surface("Replacement Image", self) .setArrayDepth(1); - inputs[| 3] = nodeValue_Float("Color Threshold", self, 0.1, "How similiar the color need to be in order to be count as matched." ) + inputs[3] = nodeValue_Float("Color Threshold", self, 0.1, "How similiar the color need to be in order to be count as matched." ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 4] = nodeValue_Bool("Draw Base Image", self, true ); + inputs[4] = nodeValue_Bool("Draw Base Image", self, true ); - inputs[| 5] = nodeValue_Bool("Fast Mode", self, true ); + inputs[5] = nodeValue_Bool("Fast Mode", self, true ); - inputs[| 6] = nodeValue_Float("Pixel Threshold", self, 0.1, "How many pixel need to me matched to replace with replacement image." ) + inputs[6] = nodeValue_Float("Pixel Threshold", self, 0.1, "How many pixel need to me matched to replace with replacement image." ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Enum_Scroll("Array mode", self, 0, { data: [ "Match index", "Randomized" ], update_hover: false }); + inputs[7] = nodeValue_Enum_Scroll("Array mode", self, 0, { data: [ "Match index", "Randomized" ], update_hover: false }); - inputs[| 8] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[8] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 9] = nodeValue_Bool("Replace Empty", self, false) + inputs[9] = nodeValue_Bool("Replace Empty", self, false) - outputs[| 0] = nodeValue_Output("Surface Out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface Out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Surfaces", true], 0, 1, 2, 7, 8, @@ -80,7 +80,7 @@ function Node_Surface_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _ static step = function() { var _mode = getInputData(7); - inputs[| 8].setVisible(_mode == 1); + inputs[8].setVisible(_mode == 1); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_surface_to_buffer/node_surface_to_buffer.gml b/scripts/node_surface_to_buffer/node_surface_to_buffer.gml index 66d7960bf..d28c9923f 100644 --- a/scripts/node_surface_to_buffer/node_surface_to_buffer.gml +++ b/scripts/node_surface_to_buffer/node_surface_to_buffer.gml @@ -1,9 +1,9 @@ function Node_Surface_To_Buffer(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Buffer from Surface"; - inputs[| 0] = nodeValue_Surface("Surface", self); + inputs[0] = nodeValue_Surface("Surface", self); - outputs[| 0] = nodeValue_Output("Buffer", self, VALUE_TYPE.buffer, noone); + outputs[0] = nodeValue_Output("Buffer", self, VALUE_TYPE.buffer, noone); static processData = function(_outSurf, _data, _output_index, _array_index) { var _surf = _data[0]; diff --git a/scripts/node_surface_to_color/node_surface_to_color.gml b/scripts/node_surface_to_color/node_surface_to_color.gml index 05fe24cd5..7392e3649 100644 --- a/scripts/node_surface_to_color/node_surface_to_color.gml +++ b/scripts/node_surface_to_color/node_surface_to_color.gml @@ -1,9 +1,9 @@ function Node_Surface_To_Color(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Surface to Color"; - inputs[| 0] = nodeValue_Surface("Surface", self); + inputs[0] = nodeValue_Surface("Surface", self); - outputs[| 0] = nodeValue_Output("Colors", self, VALUE_TYPE.color, []) + outputs[0] = nodeValue_Output("Colors", self, VALUE_TYPE.color, []) .setDisplay(VALUE_DISPLAY.palette); static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_svg/node_svg.gml b/scripts/node_svg/node_svg.gml index 40968d399..f191cb144 100644 --- a/scripts/node_svg/node_svg.gml +++ b/scripts/node_svg/node_svg.gml @@ -2,7 +2,7 @@ function Node_create_SVG_path(_x, _y, path) { if(!file_exists_empty(path)) return noone; var node = new Node_SVG(_x, _y, PANEL_GRAPH.getCurrentContext()).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); node.doUpdate(); return node; } @@ -11,14 +11,14 @@ function Node_SVG(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "SVG"; color = COLORS.node_blend_input; - inputs[| 0] = nodeValue_Text("Path", self, "") + inputs[0] = nodeValue_Text("Path", self, "") .setDisplay(VALUE_DISPLAY.path_load, { filter: "Scalable Vector Graphics|*.svg" }); - inputs[| 1] = nodeValue_Float("Scale", self, 1); + inputs[1] = nodeValue_Float("Scale", self, 1); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("SVG Struct", self, VALUE_TYPE.struct, {}); + outputs[1] = nodeValue_Output("SVG Struct", self, VALUE_TYPE.struct, {}); attribute_surface_depth(); @@ -33,7 +33,7 @@ function Node_SVG(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { new checkBox(function() { attributes.file_checker = !attributes.file_checker; }) ]); on_drop_file = function(path) { - inputs[| 0].setValue(path); + inputs[0].setValue(path); if(readFile(path)) { doUpdate(); @@ -97,10 +97,10 @@ function Node_SVG(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { readFile(path); if(!is_instanceof(content, SVG)) return; - outputs[| 1].setValue(path); + outputs[1].setValue(path); var _scale = getInputData(1); - var _outsurf = outputs[| 0].getValue(); + var _outsurf = outputs[0].getValue(); var ww = content.width * _scale; var hh = content.height * _scale; @@ -111,14 +111,14 @@ function Node_SVG(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { content.draw(_scale); surface_reset_shader(); - outputs[| 0].setValue(_outsurf); - outputs[| 1].setValue(rawContent); + outputs[0].setValue(_outsurf); + outputs[1].setValue(rawContent); } static dropPath = function(path) { if(is_array(path)) path = array_safe_get(path, 0); if(!file_exists_empty(path)) return; - inputs[| 0].setValue(path); + inputs[0].setValue(path); } } \ No newline at end of file diff --git a/scripts/node_switch/node_switch.gml b/scripts/node_switch/node_switch.gml index e4fb56d37..59c27b417 100644 --- a/scripts/node_switch/node_switch.gml +++ b/scripts/node_switch/node_switch.gml @@ -3,11 +3,11 @@ function Node_Switch(_x, _y, _group = noone) : Node(_x, _y, _group) constructor setDimension(96, 48); - inputs[| 0] = nodeValue_Text("Index", self, "" ) + inputs[0] = nodeValue_Text("Index", self, "" ) .setVisible(true, true) .rejectArray(); - inputs[| 1] = nodeValue("Default value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0 ) + inputs[1] = nodeValue("Default value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0 ) .setVisible(false, true); size_adjust_tool = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { #region @@ -20,12 +20,12 @@ function Node_Switch(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var amo = attributes.size; if(buttonTextIconInstant(attributes.size > 0, THEME.button_hide, _x + _w - bw, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.minus, __txt("Remove"), COLORS._main_value_negative) == 2) - deleteInput(ds_list_size(inputs) - data_length); + deleteInput(array_length(inputs) - data_length); return _h; }); #endregion - outputs[| 0] = nodeValue_Output("Result", self, VALUE_TYPE.any, 0); + outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.any, 0); input_display_list = [ 0, 1, ["Cases", false], size_adjust_tool @@ -52,7 +52,7 @@ function Node_Switch(_x, _y, _group = noone) : Node(_x, _y, _group) constructor setDynamicInput(2, false); static addInput = function() { - var index = ds_list_size(inputs); + var index = array_length(inputs); attributes.size++; createNewInput(); @@ -60,7 +60,7 @@ function Node_Switch(_x, _y, _group = noone) : Node(_x, _y, _group) constructor if(!UNDO_HOLDING) { var _inputs = array_create(data_length); for(var i = 0; i < data_length; i++) - _inputs[i] = inputs[| index + i]; + _inputs[i] = inputs[index + i]; recordAction(ACTION_TYPE.custom, function(data, undo) { if(undo) deleteInput(data.index); @@ -75,7 +75,7 @@ function Node_Switch(_x, _y, _group = noone) : Node(_x, _y, _group) constructor if(!UNDO_HOLDING) { var _inputs = array_create(data_length); for(var i = 0; i < data_length; i++) - _inputs[i] = inputs[| index + i]; + _inputs[i] = inputs[index + i]; recordAction(ACTION_TYPE.custom, function(data, undo) { if(undo) insertInput(data.index, data.inputs); @@ -85,7 +85,7 @@ function Node_Switch(_x, _y, _group = noone) : Node(_x, _y, _group) constructor attributes.size--; for(var i = data_length - 1; i >= 0; i--) - ds_list_delete(inputs, index + i); + array_delete(inputs, index + i, 1); onInputResize(); } @@ -94,7 +94,7 @@ function Node_Switch(_x, _y, _group = noone) : Node(_x, _y, _group) constructor attributes.size++; for(var i = 0; i < data_length; i++) - ds_list_insert(inputs, index + i, _inputs[i]); + array_insert(inputs, index + i, _inputs[i]); onInputResize(); } @@ -102,8 +102,8 @@ function Node_Switch(_x, _y, _group = noone) : Node(_x, _y, _group) constructor static refreshDynamicInput = function() { input_display_list = array_clone(input_display_list_raw); - for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) { - inputs[| i].index = i; + for( var i = input_fix_len; i < array_length(inputs); i++ ) { + inputs[i].index = i; array_push(input_display_list, i); } @@ -116,12 +116,12 @@ function Node_Switch(_x, _y, _group = noone) : Node(_x, _y, _group) constructor if(LOADING || APPENDING) return; if(index < 0) return; - inputs[| 1].setType(inputs[| 1].value_from? inputs[| 1].value_from.type : VALUE_TYPE.any); + inputs[1].setType(inputs[1].value_from? inputs[1].value_from.type : VALUE_TYPE.any); - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { - inputs[| i + 1].setType(VALUE_TYPE.any); - if(inputs[| i + 1].value_from != noone) - inputs[| i + 1].setType(inputs[| i + 1].value_from.type); + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { + inputs[i + 1].setType(VALUE_TYPE.any); + if(inputs[i + 1].value_from != noone) + inputs[i + 1].setType(inputs[i + 1].value_from.type); } } #endregion @@ -130,16 +130,16 @@ function Node_Switch(_x, _y, _group = noone) : Node(_x, _y, _group) constructor if(LOADING || APPENDING) return; if(safe_mod(index - input_fix_len, data_length) == 0) { - inputs[| index + 1].setVisible(false, true); - inputs[| index + 1].name = $"{getInputData(index)} value"; + inputs[index + 1].setVisible(false, true); + inputs[index + 1].name = $"{getInputData(index)} value"; } refreshDynamicInput(); } #endregion static step = function() { #region - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { - var _inp = inputs[| i + 1]; + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { + var _inp = inputs[i + 1]; if(_inp.value_from == noone) continue; _inp.setType(_inp.value_from.type); @@ -150,33 +150,33 @@ function Node_Switch(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var sele = getInputData(0); var _res = getInputData(1); - outputs[| 0].setType(inputs[| 1].value_from? inputs[| 1].value_from.type : VALUE_TYPE.any); + outputs[0].setType(inputs[1].value_from? inputs[1].value_from.type : VALUE_TYPE.any); - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { var _cas = getInputData(i + 0); var _val = getInputData(i + 1); if(sele == _cas) { _res = _val; - var _typ = inputs[| i + 1].value_from? inputs[| i + 1].value_from.type : inputs[| i + 1].type; - outputs[| 0].setType(_typ); + var _typ = inputs[i + 1].value_from? inputs[i + 1].value_from.type : inputs[i + 1].type; + outputs[0].setType(_typ); } } - outputs[| 0].setValue(_res); + outputs[0].setValue(_res); } #endregion static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region - var frm = inputs[| 1]; + var frm = inputs[1]; var sele = getInputData(0); var _res = getInputData(1); - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { var _cas = getInputData(i + 0); - if(sele == _cas) frm = inputs[| i + 1]; + if(sele == _cas) frm = inputs[i + 1]; } - var to = outputs[| 0]; + var to = outputs[0]; var c0 = value_color(frm.type); draw_set_color(c0); @@ -187,22 +187,22 @@ function Node_Switch(_x, _y, _group = noone) : Node(_x, _y, _group) constructor draw_set_text(f_sdf, fa_left, fa_center); var bbox = drawGetBbox(xx, yy, _s); - if(inputs[| 1].visible) { + if(inputs[1].visible) { var str = string("default"); var ss = min(_s * 0.4, string_scale(str, bbox.w - 16 * _s, 999)); - draw_set_color(value_color(inputs[| 1].type)); - draw_text_transformed(bbox.x0 + 8 * _s, inputs[| 1].y, str, ss, ss, 0); + draw_set_color(value_color(inputs[1].type)); + draw_text_transformed(bbox.x0 + 8 * _s, inputs[1].y, str, ss, ss, 0); } - for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { - if(!inputs[| i + 1].visible) continue; + for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { + if(!inputs[i + 1].visible) continue; var str = string(getInputData(i, "")); if(str == "") continue; var ss = min(_s * 0.4, string_scale(str, bbox.w - 16 * _s, 999)); - draw_set_color(value_color(inputs[| i + 1].type)); - draw_text_transformed(bbox.x0 + 8 * _s, inputs[| i + 1].y, str, ss, ss, 0); + draw_set_color(value_color(inputs[i + 1].type)); + draw_text_transformed(bbox.x0 + 8 * _s, inputs[i + 1].y, str, ss, ss, 0); } } #endregion diff --git a/scripts/node_terminal_trigger/node_terminal_trigger.gml b/scripts/node_terminal_trigger/node_terminal_trigger.gml index 3092aa408..e651384cf 100644 --- a/scripts/node_terminal_trigger/node_terminal_trigger.gml +++ b/scripts/node_terminal_trigger/node_terminal_trigger.gml @@ -4,7 +4,7 @@ function Node_Terminal_Trigger(_x, _y, _group = noone) : Node(_x, _y, _group) co draw_padding = 8; - outputs[| 0] = nodeValue_Output("Terminal", self, VALUE_TYPE.trigger, false ); + outputs[0] = nodeValue_Output("Terminal", self, VALUE_TYPE.trigger, false ); static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); diff --git a/scripts/node_text/node_text.gml b/scripts/node_text/node_text.gml index de182a99f..6d7e45ac6 100644 --- a/scripts/node_text/node_text.gml +++ b/scripts/node_text/node_text.gml @@ -2,66 +2,66 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons name = "Draw Text"; font = f_p0; - inputs[| 0] = nodeValue_Text("Text", self, "") + inputs[0] = nodeValue_Text("Text", self, "") .setVisible(true, true); - inputs[| 1] = nodeValue_Text("Font", self, "") + inputs[1] = nodeValue_Text("Font", self, "") .setDisplay(VALUE_DISPLAY.path_font); - inputs[| 2] = nodeValue_Int("Size", self, 16); + inputs[2] = nodeValue_Int("Size", self, 16); - inputs[| 3] = nodeValue_Bool("Anti-Aliasing ", self, false); + inputs[3] = nodeValue_Bool("Anti-Aliasing ", self, false); - inputs[| 4] = nodeValue_Vector("Character range", self, [ 32, 128 ]); + inputs[4] = nodeValue_Vector("Character range", self, [ 32, 128 ]); - inputs[| 5] = nodeValue_Color("Color", self, c_white); + inputs[5] = nodeValue_Color("Color", self, c_white); - inputs[| 6] = nodeValue_Vector("Fixed dimension", self, DEF_SURF ) + inputs[6] = nodeValue_Vector("Fixed dimension", self, DEF_SURF ) .setVisible(true, false); - inputs[| 7] = nodeValue_Enum_Button("Horizontal alignment", self, 0 , [ THEME.inspector_text_halign, THEME.inspector_text_halign, THEME.inspector_text_halign]); + inputs[7] = nodeValue_Enum_Button("Horizontal alignment", self, 0 , [ THEME.inspector_text_halign, THEME.inspector_text_halign, THEME.inspector_text_halign]); - inputs[| 8] = nodeValue_Enum_Button("Vertical alignment", self, 0 , [ THEME.inspector_text_valign, THEME.inspector_text_valign, THEME.inspector_text_valign ]); + inputs[8] = nodeValue_Enum_Button("Vertical alignment", self, 0 , [ THEME.inspector_text_valign, THEME.inspector_text_valign, THEME.inspector_text_valign ]); - inputs[| 9] = nodeValue_Enum_Scroll("Output dimension", self, 1 , [ "Fixed", "Dynamic" ]); + inputs[9] = nodeValue_Enum_Scroll("Output dimension", self, 1 , [ "Fixed", "Dynamic" ]); - inputs[| 10] = nodeValue_Padding("Padding", self, [0, 0, 0, 0]); + inputs[10] = nodeValue_Padding("Padding", self, [0, 0, 0, 0]); - inputs[| 11] = nodeValue_Float("Letter spacing", self, 0); + inputs[11] = nodeValue_Float("Letter spacing", self, 0); - inputs[| 12] = nodeValue_Float("Line height", self, 0); + inputs[12] = nodeValue_Float("Line height", self, 0); - inputs[| 13] = nodeValue_PathNode("Path", self, noone) + inputs[13] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - inputs[| 14] = nodeValue_Float("Path shift", self, 0); + inputs[14] = nodeValue_Float("Path shift", self, 0); - inputs[| 15] = nodeValue_Bool("Scale to fit", self, false); + inputs[15] = nodeValue_Bool("Scale to fit", self, false); - inputs[| 16] = nodeValue_Bool("Render background", self, false); + inputs[16] = nodeValue_Bool("Render background", self, false); - inputs[| 17] = nodeValue_Color("BG Color", self, c_black); + inputs[17] = nodeValue_Color("BG Color", self, c_black); - inputs[| 18] = nodeValue_Bool("Wave", self, false); + inputs[18] = nodeValue_Bool("Wave", self, false); - inputs[| 19] = nodeValue_Float("Wave amplitude", self, 4); + inputs[19] = nodeValue_Float("Wave amplitude", self, 4); - inputs[| 20] = nodeValue_Float("Wave scale", self, 30); + inputs[20] = nodeValue_Float("Wave scale", self, 30); - inputs[| 21] = nodeValue_Rotation("Wave phase", self, 0); + inputs[21] = nodeValue_Rotation("Wave phase", self, 0); - inputs[| 22] = nodeValue_Float("Wave shape", self, 0) + inputs[22] = nodeValue_Float("Wave shape", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 3, 0.01 ] }); - inputs[| 23] = nodeValue_Bool("Typewriter", self, false); + inputs[23] = nodeValue_Bool("Typewriter", self, false); - inputs[| 24] = nodeValue_Slider_Range("Range", self, [ 0, 1 ]); + inputs[24] = nodeValue_Slider_Range("Range", self, [ 0, 1 ]); - inputs[| 25] = nodeValue_Enum_Button("Trim type", self, 0 , [ "Character", "Word", "Line" ]); + inputs[25] = nodeValue_Enum_Button("Trim type", self, 0 , [ "Character", "Word", "Line" ]); - inputs[| 26] = nodeValue_Bool("Use full text size", self, true ); + inputs[26] = nodeValue_Bool("Use full text size", self, true ); - inputs[| 27] = nodeValue_Int("Max line width", self, 0 ); + inputs[27] = nodeValue_Int("Max line width", self, 0 ); input_display_list = [ ["Output", true], 9, 6, 10, @@ -73,7 +73,7 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons ["Trim", true, 23], 25, 24, 26, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); @@ -109,17 +109,17 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons var _use_path = _path != noone && struct_has(_path, "getPointDistance"); - inputs[| 6].setVisible(_dimt == 0 || _use_path); - inputs[| 7].setVisible(_dimt == 0 || _use_path); - inputs[| 8].setVisible(_dimt == 0 || _use_path); - inputs[| 9].setVisible(!_use_path); - inputs[| 14].setVisible( _use_path); - inputs[| 15].setVisible(_dimt == 0 && !_use_path && _font != ""); + inputs[ 6].setVisible(_dimt == 0 || _use_path); + inputs[ 7].setVisible(_dimt == 0 || _use_path); + inputs[ 8].setVisible(_dimt == 0 || _use_path); + inputs[ 9].setVisible(!_use_path); + inputs[14].setVisible( _use_path); + inputs[15].setVisible(_dimt == 0 && !_use_path && _font != ""); - inputs[| 2].setVisible(_font != ""); - inputs[| 3].setVisible(_font != ""); - inputs[| 11].setVisible(_font != ""); - inputs[| 12].setVisible(_font != ""); + inputs[ 2].setVisible(_font != ""); + inputs[ 3].setVisible(_font != ""); + inputs[11].setVisible(_font != ""); + inputs[12].setVisible(_font != ""); } #endregion static waveGet = function(_ind) { #region diff --git a/scripts/node_text_file_read/node_text_file_read.gml b/scripts/node_text_file_read/node_text_file_read.gml index 8f26a7a10..7001b25ed 100644 --- a/scripts/node_text_file_read/node_text_file_read.gml +++ b/scripts/node_text_file_read/node_text_file_read.gml @@ -7,7 +7,7 @@ function Node_create_Text_File_Read(_x, _y, _group = noone) { } var node = new Node_Text_File_Read(_x, _y, _group).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); node.doUpdate(); return node; @@ -17,7 +17,7 @@ function Node_create_Text_File_Read_path(_x, _y, path) { if(!file_exists_empty(path)) return noone; var node = new Node_Text_File_Read(_x, _y, PANEL_GRAPH.getCurrentContext()).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); node.doUpdate(); return node; @@ -29,12 +29,12 @@ function Node_Text_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons w = 128; - inputs[| 0] = nodeValue_Text("Path", self, "") + inputs[0] = nodeValue_Text("Path", self, "") .setDisplay(VALUE_DISPLAY.path_load, { filter: "any file|*" }) .rejectArray(); - outputs[| 0] = nodeValue_Output("Content", self, VALUE_TYPE.text, ""); - outputs[| 1] = nodeValue_Output("Path", self, VALUE_TYPE.path, "") + outputs[0] = nodeValue_Output("Content", self, VALUE_TYPE.text, ""); + outputs[1] = nodeValue_Output("Path", self, VALUE_TYPE.path, "") .setVisible(true, true); content = ""; @@ -70,7 +70,7 @@ function Node_Text_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons var ext = string_lower(filename_ext(path)); var _name = string_replace(filename_name(path), filename_ext(path), ""); - outputs[| 1].setValue(path); + outputs[1].setValue(path); content = file_read_all(path); @@ -98,7 +98,7 @@ function Node_Text_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons var path = path_get(getInputData(0)); if(path_current != path) updatePaths(path); - outputs[| 0].setValue(content); + outputs[0].setValue(content); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { @@ -114,6 +114,6 @@ function Node_Text_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons if(is_array(path)) path = array_safe_get(path, 0); if(!file_exists_empty(path)) return; - inputs[| 0].setValue(path); + inputs[0].setValue(path); } } \ No newline at end of file diff --git a/scripts/node_text_file_write/node_text_file_write.gml b/scripts/node_text_file_write/node_text_file_write.gml index 2a5f9c1ef..7432ae7c7 100644 --- a/scripts/node_text_file_write/node_text_file_write.gml +++ b/scripts/node_text_file_write/node_text_file_write.gml @@ -4,11 +4,11 @@ function Node_Text_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) con w = 128; - inputs[| 0] = nodeValue_Text("Path", self, "") + inputs[0] = nodeValue_Text("Path", self, "") .setDisplay(VALUE_DISPLAY.path_save, { filter: "text file|*.txt" }) .rejectArray(); - inputs[| 1] = nodeValue_Text("Content", self, "") + inputs[1] = nodeValue_Text("Content", self, "") .setVisible(true, true); static writeFile = function() { diff --git a/scripts/node_texture_remap/node_texture_remap.gml b/scripts/node_texture_remap/node_texture_remap.gml index 7bb3195c3..a89108426 100644 --- a/scripts/node_texture_remap/node_texture_remap.gml +++ b/scripts/node_texture_remap/node_texture_remap.gml @@ -4,16 +4,16 @@ function Node_Texture_Remap(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr shader = sh_texture_remap; uniform_map = shader_get_sampler_index(shader, "map"); - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Surface("RG Map", self, "Displacement map where red retermine the X position, and green determine the Y position."); + inputs[1] = nodeValue_Surface("RG Map", self, "Displacement map where red retermine the X position, and green determine the Y position."); - inputs[| 2] = nodeValue_Bool("Active", self, true); + inputs[2] = nodeValue_Bool("Active", self, true); active_index = 2; - inputs[| 3] = nodeValue_Enum_Button("Dimension Source", self, 0, [ "Surface", "RG Map" ]); + inputs[3] = nodeValue_Enum_Button("Dimension Source", self, 0, [ "Surface", "RG Map" ]); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 2, ["Surfaces", false], 0, 1, 3, diff --git a/scripts/node_threshold/node_threshold.gml b/scripts/node_threshold/node_threshold.gml index 072434fd5..e8037352e 100644 --- a/scripts/node_threshold/node_threshold.gml +++ b/scripts/node_threshold/node_threshold.gml @@ -1,47 +1,47 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Threshold"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Bool("Brightness", self, false); + inputs[1] = nodeValue_Bool("Brightness", self, false); - inputs[| 2] = nodeValue_Float("Brightness Threshold", self, 0.5) + inputs[2] = nodeValue_Float("Brightness Threshold", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) .setMappable(13); - inputs[| 3] = nodeValue_Float("Brightness Smoothness", self, 0) + inputs[3] = nodeValue_Float("Brightness Smoothness", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 4] = nodeValue_Surface("Mask", self); + inputs[4] = nodeValue_Surface("Mask", self); - inputs[| 5] = nodeValue_Float("Mix", self, 1) + inputs[5] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 6] = nodeValue_Bool("Active", self, true); + inputs[6] = nodeValue_Bool("Active", self, true); active_index = 6; - inputs[| 7] = nodeValue_Bool("Alpha", self, false); + inputs[7] = nodeValue_Bool("Alpha", self, false); - inputs[| 8] = nodeValue_Float("Alpha Threshold", self, 0.5) + inputs[8] = nodeValue_Float("Alpha Threshold", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) .setMappable(14); - inputs[| 9] = nodeValue_Float("Alpha Smoothness", self, 0) + inputs[9] = nodeValue_Float("Alpha Smoothness", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 10] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[10] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(4); // inputs 11, 12 ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 13] = nodeValueMap("Brightness map", self); + inputs[13] = nodeValueMap("Brightness map", self); - inputs[| 14] = nodeValueMap("Alpha map", self); + inputs[14] = nodeValueMap("Alpha map", self); ////////////////////////////////////////////////////////////////////////////////////////////////// - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 6, 10, ["Surfaces", true], 0, 4, 5, 11, 12, @@ -54,19 +54,19 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static step = function() { #region __step_mask_modifier(); - inputs[| 2].mappableStep(); - inputs[| 8].mappableStep(); + inputs[2].mappableStep(); + inputs[8].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region surface_set_shader(_outSurf, sh_threshold); shader_set_i("bright", _data[1]); - shader_set_f_map("brightThreshold", _data[2], _data[13], inputs[| 2]); + shader_set_f_map("brightThreshold", _data[2], _data[13], inputs[2]); shader_set_f("brightSmooth", _data[3]); shader_set_i("alpha", _data[7]); - shader_set_f_map("alphaThreshold", _data[8], _data[14], inputs[| 8]); + shader_set_f_map("alphaThreshold", _data[8], _data[14], inputs[8]); shader_set_f("alphaSmooth", _data[9]); draw_surface_safe(_data[0]); diff --git a/scripts/node_tile/node_tile.gml b/scripts/node_tile/node_tile.gml index 0e4387011..164f7c42a 100644 --- a/scripts/node_tile/node_tile.gml +++ b/scripts/node_tile/node_tile.gml @@ -1,11 +1,11 @@ function Node_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Tile"; - inputs[| 0] = nodeValue_Surface("Base texture", self); + inputs[0] = nodeValue_Surface("Base texture", self); - inputs[| 1] = nodeValue_Surface("Border texture", self); + inputs[1] = nodeValue_Surface("Border texture", self); - outputs[| 0] = nodeValue_Output("", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("", self, VALUE_TYPE.surface, noone); input_display_list = [ 0 ]; diff --git a/scripts/node_tile_random/node_tile_random.gml b/scripts/node_tile_random/node_tile_random.gml index d9ef38374..38c7a6fab 100644 --- a/scripts/node_tile_random/node_tile_random.gml +++ b/scripts/node_tile_random/node_tile_random.gml @@ -2,14 +2,14 @@ function Node_Tile_Random(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou name = "Tile Random"; dimension_index = -1; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Dimension(self); + inputs[1] = nodeValue_Dimension(self); - inputs[| 2] = nodeValue_Float("Randomness", self, 0.5) + inputs[2] = nodeValue_Float("Randomness", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 1, ["Surfaces", true], 0, diff --git a/scripts/node_time_remap/node_time_remap.gml b/scripts/node_time_remap/node_time_remap.gml index dfbab5705..e7b76ccd9 100644 --- a/scripts/node_time_remap/node_time_remap.gml +++ b/scripts/node_time_remap/node_time_remap.gml @@ -8,18 +8,18 @@ function Node_Time_Remap(_x, _y, _group = noone) : Node(_x, _y, _group) construc uniform_min = shader_get_uniform(shader, "vMin"); uniform_max = shader_get_uniform(shader, "vMax"); - inputs[| 0] = nodeValue_Surface("Surface in", self) + inputs[0] = nodeValue_Surface("Surface in", self) .rejectArray(); - inputs[| 1] = nodeValue_Surface("Map", self) + inputs[1] = nodeValue_Surface("Map", self) .rejectArray(); - inputs[| 2] = nodeValue_Int("Max life", self, 3) + inputs[2] = nodeValue_Int("Max life", self, 3) .rejectArray(); - inputs[| 3] = nodeValue_Bool("Loop", self, false) + inputs[3] = nodeValue_Bool("Loop", self, false) - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Surfaces", false], 0, 1, @@ -34,9 +34,9 @@ function Node_Time_Remap(_x, _y, _group = noone) : Node(_x, _y, _group) construc var _life = getInputData(2); var _loop = getInputData(3); - var _surf = outputs[| 0].getValue(); + var _surf = outputs[0].getValue(); _surf = surface_verify(_surf, surface_get_width_safe(_inSurf), surface_get_height_safe(_inSurf), attrDepth()); - outputs[| 0].setValue(_surf); + outputs[0].setValue(_surf); var ste = 1 / _life; diff --git a/scripts/node_timeline_preview/node_timeline_preview.gml b/scripts/node_timeline_preview/node_timeline_preview.gml index dfa4a1a58..f8ebdec05 100644 --- a/scripts/node_timeline_preview/node_timeline_preview.gml +++ b/scripts/node_timeline_preview/node_timeline_preview.gml @@ -8,7 +8,7 @@ function Node_Timeline_Preview(_x, _y, _group = noone) : Node(_x, _y, _group) co PANEL_ANIMATION.timeline_preview = self; - inputs[| 0] = nodeValue_Surface("Surface", self); + inputs[0] = nodeValue_Surface("Surface", self); static update = function(frame = CURRENT_FRAME) { var _inSurf = getInputData(0); diff --git a/scripts/node_to_number/node_to_number.gml b/scripts/node_to_number/node_to_number.gml index c36c07e1f..a4574c709 100644 --- a/scripts/node_to_number/node_to_number.gml +++ b/scripts/node_to_number/node_to_number.gml @@ -4,10 +4,10 @@ function Node_To_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) setDimension(96, 48); - inputs[| 0] = nodeValue_Text("Text", self, "") + inputs[0] = nodeValue_Text("Text", self, "") .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Number", self, VALUE_TYPE.float, 0); + outputs[0] = nodeValue_Output("Number", self, VALUE_TYPE.float, 0); static processData = function(_output, _data, _output_index, _array_index = 0) { return toNumber(_data[0]); @@ -15,7 +15,7 @@ function Node_To_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); - var str = outputs[| 0].getValue(); + var str = outputs[0].getValue(); var bbox = drawGetBbox(xx, yy, _s); var ss = string_scale(str, bbox.w, bbox.h); diff --git a/scripts/node_to_text/node_to_text.gml b/scripts/node_to_text/node_to_text.gml index 4eddc84ce..1cca86658 100644 --- a/scripts/node_to_text/node_to_text.gml +++ b/scripts/node_to_text/node_to_text.gml @@ -3,10 +3,10 @@ function Node_To_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c setDimension(96, 48); - inputs[| 0] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + inputs[0] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); + outputs[0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); static processData = function(_output, _data, _output_index, _array_index = 0) { return string(_data[0]); @@ -14,7 +14,7 @@ function Node_To_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); - var str = outputs[| 0].getValue(); + var str = outputs[0].getValue(); var bbox = drawGetBbox(xx, yy, _s); var ss = string_scale(str, bbox.w, bbox.h); diff --git a/scripts/node_tonemap_ace/node_tonemap_ace.gml b/scripts/node_tonemap_ace/node_tonemap_ace.gml index e838898d6..0d154c94c 100644 --- a/scripts/node_tonemap_ace/node_tonemap_ace.gml +++ b/scripts/node_tonemap_ace/node_tonemap_ace.gml @@ -1,17 +1,17 @@ function Node_Tonemap_ACE(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "ACE"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Surface("Mask", self); + inputs[1] = nodeValue_Surface("Mask", self); - inputs[| 2] = nodeValue_Float("Mix", self, 1) + inputs[2] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue_Bool("Active", self, true); + inputs[3] = nodeValue_Bool("Active", self, true); active_index = 3; - inputs[| 4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(1); // inputs 5, 6 @@ -19,7 +19,7 @@ function Node_Tonemap_ACE(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou ["Surfaces", true], 0, 1, 2, 5, 6, ] - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); attribute_surface_depth(); diff --git a/scripts/node_trail/node_trail.gml b/scripts/node_trail/node_trail.gml index 2eba2c85c..455742409 100644 --- a/scripts/node_trail/node_trail.gml +++ b/scripts/node_trail/node_trail.gml @@ -3,23 +3,23 @@ function Node_Trail(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { use_cache = CACHE_USE.manual; clearCacheOnChange = false; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Int("Max life", self, 5); + inputs[1] = nodeValue_Int("Max life", self, 5); - inputs[| 2] = nodeValue_Bool("Loop", self, false); + inputs[2] = nodeValue_Bool("Loop", self, false); - inputs[| 3] = nodeValue_Int("Max distance", self, -1, "Maximum distance to search for movement, set to -1 to search the entire image."); + inputs[3] = nodeValue_Int("Max distance", self, -1, "Maximum distance to search for movement, set to -1 to search the entire image."); - inputs[| 4] = nodeValue_Bool("Match color", self, true, "Make trail track pixels of the same color, instead of the closet pixels."); + inputs[4] = nodeValue_Bool("Match color", self, true, "Make trail track pixels of the same color, instead of the closet pixels."); - inputs[| 5] = nodeValue_Bool("Blend color", self, true, "Blend color between two pixel smoothly."); + inputs[5] = nodeValue_Bool("Blend color", self, true, "Blend color between two pixel smoothly."); - inputs[| 6] = nodeValue("Alpha over life", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + inputs[6] = nodeValue("Alpha over life", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Trail UV", self, VALUE_TYPE.surface, noone); + outputs[1] = nodeValue_Output("Trail UV", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Surfaces", true], 0, @@ -47,11 +47,11 @@ function Node_Trail(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static step = function() { var _colr = getInputData(4); - inputs[| 5].setVisible(!_colr); + inputs[5].setVisible(!_colr); } static update = function() { - if(!inputs[| 0].value_from) return; + if(!inputs[0].value_from) return; var _surf = getInputData(0); var _life = getInputData(1); @@ -73,13 +73,13 @@ function Node_Trail(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { surface_reset_target(); } - var _outSurf = outputs[| 0].getValue(); + var _outSurf = outputs[0].getValue(); _outSurf = surface_verify(_outSurf, surface_get_width_safe(_surf), surface_get_height_safe(_surf), cDep); - outputs[| 0].setValue(_outSurf); + outputs[0].setValue(_outSurf); - var _outUV = outputs[| 1].getValue(); + var _outUV = outputs[1].getValue(); _outUV = surface_verify(_outUV, surface_get_width_safe(_surf), surface_get_height_safe(_surf), cDep); - outputs[| 1].setValue(_outUV); + outputs[1].setValue(_outUV); var curf = CURRENT_FRAME; var frame_amo = _loop? _life : min(_life, curf); diff --git a/scripts/node_transform/node_transform.gml b/scripts/node_transform/node_transform.gml index b5e80cbfc..d668ab520 100644 --- a/scripts/node_transform/node_transform.gml +++ b/scripts/node_transform/node_transform.gml @@ -8,56 +8,56 @@ enum OUTPUT_SCALING { function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Transform"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Vec2("Output dimension", self, [ 1, 1 ]) + inputs[1] = nodeValue_Vec2("Output dimension", self, [ 1, 1 ]) .setVisible(false); - inputs[| 2] = nodeValue_Vec2("Position", self, [ 0.5, 0.5 ]) + inputs[2] = nodeValue_Vec2("Position", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[| 3] = nodeValue_Vec2("Anchor", self, [ 0.5, 0.5 ]) + inputs[3] = nodeValue_Vec2("Anchor", self, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector, { side_button : new buttonAnchor(function(ind) { switch(ind) { - case 0 : inputs[| 3].setValue([ 0.0, 0.0 ]); break; - case 1 : inputs[| 3].setValue([ 0.5, 0.0 ]); break; - case 2 : inputs[| 3].setValue([ 1.0, 0.0 ]); break; + case 0 : inputs[3].setValue([ 0.0, 0.0 ]); break; + case 1 : inputs[3].setValue([ 0.5, 0.0 ]); break; + case 2 : inputs[3].setValue([ 1.0, 0.0 ]); break; - case 3 : inputs[| 3].setValue([ 0.0, 0.5 ]); break; - case 4 : inputs[| 3].setValue([ 0.5, 0.5 ]); break; - case 5 : inputs[| 3].setValue([ 1.0, 0.5 ]); break; + case 3 : inputs[3].setValue([ 0.0, 0.5 ]); break; + case 4 : inputs[3].setValue([ 0.5, 0.5 ]); break; + case 5 : inputs[3].setValue([ 1.0, 0.5 ]); break; - case 6 : inputs[| 3].setValue([ 0.0, 1.0 ]); break; - case 7 : inputs[| 3].setValue([ 0.5, 1.0 ]); break; - case 8 : inputs[| 3].setValue([ 1.0, 1.0 ]); break; + case 6 : inputs[3].setValue([ 0.0, 1.0 ]); break; + case 7 : inputs[3].setValue([ 0.5, 1.0 ]); break; + case 8 : inputs[3].setValue([ 1.0, 1.0 ]); break; } }) }); - inputs[| 4] = nodeValue_Bool("Relative anchor", self, true); + inputs[4] = nodeValue_Bool("Relative anchor", self, true); - inputs[| 5] = nodeValue_Rotation("Rotation", self, 0); + inputs[5] = nodeValue_Rotation("Rotation", self, 0); - inputs[| 6] = nodeValue_Vec2("Scale", self, [ 1, 1 ]); + inputs[6] = nodeValue_Vec2("Scale", self, [ 1, 1 ]); - inputs[| 7] = nodeValue_Enum_Button("Render Mode", self, 0, [ "Normal", "Tile", "Wrap" ]); + inputs[7] = nodeValue_Enum_Button("Render Mode", self, 0, [ "Normal", "Tile", "Wrap" ]); - inputs[| 8] = nodeValue_Float("Rotate by velocity", self, 0, "Make the surface rotates to follow its movement.") + inputs[8] = nodeValue_Float("Rotate by velocity", self, 0, "Make the surface rotates to follow its movement.") .setDisplay(VALUE_DISPLAY.slider); - inputs[| 9] = nodeValue_Enum_Scroll("Output dimension type", self, OUTPUT_SCALING.same_as_input, [ "Same as input", "Constant", "Relative to input", "Transformed" ]); + inputs[9] = nodeValue_Enum_Scroll("Output dimension type", self, OUTPUT_SCALING.same_as_input, [ "Same as input", "Constant", "Relative to input", "Transformed" ]); - inputs[| 10] = nodeValue_Bool("Round position", self, false, "Round position to the nearest integer value to avoid jittering."); + inputs[10] = nodeValue_Bool("Round position", self, false, "Round position to the nearest integer value to avoid jittering."); - inputs[| 11] = nodeValue_Bool("Active", self, true); + inputs[11] = nodeValue_Bool("Active", self, true); active_index = 11; - inputs[| 12] = nodeValue_Bool("Echo", self, false); + inputs[12] = nodeValue_Bool("Echo", self, false); - inputs[| 13] = nodeValue_Int("Echo amount", self, 8); + inputs[13] = nodeValue_Int("Echo amount", self, 8); - inputs[| 14] = nodeValue_Float("Alpha", self, 1) + inputs[14] = nodeValue_Float("Alpha", self, 1) .setDisplay(VALUE_DISPLAY.slider); input_display_list = [ 11, 0, @@ -69,9 +69,9 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ["Echo", true, 12], 13, ]; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue_Output("Dimension", self, VALUE_TYPE.integer, [ 1, 1 ]) + outputs[1] = nodeValue_Output("Dimension", self, VALUE_TYPE.integer, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector) .setVisible(false); @@ -140,15 +140,15 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) _surf = _surf[preview_index]; } - inputs[| 3].setValue([ 0.5, 0.5 ]); - inputs[| 2].setValue([ surface_get_width_safe(_surf) / 2, surface_get_height_safe(_surf) / 2 ]); + inputs[3].setValue([ 0.5, 0.5 ]); + inputs[2].setValue([ surface_get_width_safe(_surf) / 2, surface_get_height_safe(_surf) / 2 ]); } static step = function() { var pos = getSingleValue(2); var anc = getSingleValue(3); - var _b = inputs[| 3].editWidget.side_button; + var _b = inputs[3].editWidget.side_button; var _a = anc[0] * 2 + anc[1] * 20; switch(_a) { @@ -197,7 +197,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var alp = _data[14]; var _outSurf = _outData[0]; - var _outRes = array_create(ds_list_size(outputs)); + var _outRes = array_create(array_length(outputs)); var cDep = attrDepth(); @@ -218,20 +218,20 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) switch(out_type) { #region output dimension case OUTPUT_SCALING.same_as_input : - inputs[| 1].setVisible(false); + inputs[1].setVisible(false); break; case OUTPUT_SCALING.constant : - inputs[| 1].setVisible(true); + inputs[1].setVisible(true); _ww = out[0]; _hh = out[1]; break; case OUTPUT_SCALING.relative : - inputs[| 1].setVisible(true); + inputs[1].setVisible(true); _ww = ww * out[0]; _hh = hh * out[1]; break; case OUTPUT_SCALING.scale : - inputs[| 1].setVisible(false); + inputs[1].setVisible(false); _ww = ww * sca[0]; _hh = hh * sca[1]; @@ -352,7 +352,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) _surf = _surf[preview_index]; } - var _surf_out = outputs[| 0].getValue(); + var _surf_out = outputs[0].getValue(); if(is_array(_surf_out)) { if(array_length(_surf_out) == 0) return; _surf_out = _surf_out[preview_index]; @@ -456,7 +456,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) pos_y = value_snap(pos_y, _sny); if(overlay_dragging == 1) { //Move - if(inputs[| 2].setValue([ pos_x, pos_y ])) + if(inputs[2].setValue([ pos_x, pos_y ])) UNDO_HOLDING = true; } else if(overlay_dragging == 2) { //Move anchor var nanx = pos_x / ww; @@ -464,13 +464,13 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) if(key_mod_press(ALT)) { var modi = false; - modi |= inputs[| 3].setValue([ nanx, nany ]); - modi |= inputs[| 2].setValue([ overlay_drag_px + pos_x, overlay_drag_py + pos_y ]); + modi |= inputs[3].setValue([ nanx, nany ]); + modi |= inputs[2].setValue([ overlay_drag_px + pos_x, overlay_drag_py + pos_y ]); if(modi) UNDO_HOLDING = true; } else { - if(inputs[| 3].setValue([ nanx, nany ])) + if(inputs[3].setValue([ nanx, nany ])) UNDO_HOLDING = true; } } @@ -487,7 +487,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) if(key_mod_press(CTRL)) sa = round((overlay_drag_sa - da) / 15) * 15; else sa = overlay_drag_sa - da; - if(inputs[| 5].setValue(sa)) + if(inputs[5].setValue(sa)) UNDO_HOLDING = true; if(mouse_release(mb_left)) { @@ -536,7 +536,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) _sh = _sw; } - if(inputs[| 6].setValue([ _sw, _sh ])) + if(inputs[6].setValue([ _sw, _sh ])) UNDO_HOLDING = true; if(mouse_release(mb_left)) { @@ -589,8 +589,8 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } #region path - if(inputs[| 2].is_anim && inputs[| 2].value_from == noone && !inputs[| 2].sep_axis) { - var posInp = inputs[| 2]; + if(inputs[2].is_anim && inputs[2].value_from == noone && !inputs[2].sep_axis) { + var posInp = inputs[2]; var allPos = posInp.animator.values; var ox, oy, nx, ny; diff --git a/scripts/node_transform_array/node_transform_array.gml b/scripts/node_transform_array/node_transform_array.gml index 590774aed..3b4af16ba 100644 --- a/scripts/node_transform_array/node_transform_array.gml +++ b/scripts/node_transform_array/node_transform_array.gml @@ -4,16 +4,16 @@ function Node_Transform_Array(_x, _y, _group = noone) : Node_Processor(_x, _y, _ setDimension(96, 48); - inputs[| 0] = nodeValue_Vector("Postion", self, [ 0, 0 ] ) + inputs[0] = nodeValue_Vector("Postion", self, [ 0, 0 ] ) .setVisible(true, true); - inputs[| 1] = nodeValue_Rotation("Rotation", self, 0) + inputs[1] = nodeValue_Rotation("Rotation", self, 0) .setVisible(true, true); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 1, 1 ] ) + inputs[2] = nodeValue_Vector("Scale", self, [ 1, 1 ] ) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Transform", self, VALUE_TYPE.float, [ 0, 0, 0, 1, 1 ]) + outputs[0] = nodeValue_Output("Transform", self, VALUE_TYPE.float, [ 0, 0, 0, 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { @@ -23,8 +23,8 @@ function Node_Transform_Array(_x, _y, _group = noone) : Node_Processor(_x, _y, _ var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; - inputs[| 0].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 1].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); + inputs[0].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[1].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); } static processData = function(_output, _data, _output_index, _array_index = 0) { diff --git a/scripts/node_transform_single/node_transform_single.gml b/scripts/node_transform_single/node_transform_single.gml index c79e8aa62..83c1bd766 100644 --- a/scripts/node_transform_single/node_transform_single.gml +++ b/scripts/node_transform_single/node_transform_single.gml @@ -1,17 +1,17 @@ function Node_Transform_Single(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Transform single"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Float("Position x", self, 0); - inputs[| 2] = nodeValue_Float("Position y", self, 0); - inputs[| 3] = nodeValue_Float("Anchor x", self, 0); - inputs[| 4] = nodeValue_Float("Anchor y", self, 0); - inputs[| 5] = nodeValue_Float("Rotation", self, 0); - inputs[| 6] = nodeValue_Float("Scale x", self, 1); - inputs[| 7] = nodeValue_Float("Scale y", self, 1); + inputs[1] = nodeValue_Float("Position x", self, 0); + inputs[2] = nodeValue_Float("Position y", self, 0); + inputs[3] = nodeValue_Float("Anchor x", self, 0); + inputs[4] = nodeValue_Float("Anchor y", self, 0); + inputs[5] = nodeValue_Float("Rotation", self, 0); + inputs[6] = nodeValue_Float("Scale x", self, 1); + inputs[7] = nodeValue_Float("Scale y", self, 1); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); static processData = function(_outSurf, _data, _output_index, _array_index) { var pos_x = _data[1]; @@ -50,9 +50,9 @@ function Node_Transform_Single(_x, _y, _group = noone) : Node_Processor(_x, _y, static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { PROCESSOR_OVERLAY_CHECK - if(array_length(current_data) < ds_list_size(inputs)) return; + if(array_length(current_data) < array_length(inputs)) return; - var _surf = outputs[| 0].getValue(); + var _surf = outputs[0].getValue(); if(is_array(_surf)) { if(array_length(_surf) == 0) return; _surf = _surf[preview_index]; @@ -131,11 +131,11 @@ function Node_Transform_Single(_x, _y, _group = noone) : Node_Processor(_x, _y, } if(overlay_dragging == 1) { - inputs[| 1].setValue(pos_x); - inputs[| 2].setValue(pos_y); + inputs[1].setValue(pos_x); + inputs[2].setValue(pos_y); } else if(overlay_dragging == 2) { - inputs[| 3].setValue(pos_x); - inputs[| 4].setValue(pos_y); + inputs[3].setValue(pos_x); + inputs[4].setValue(pos_y); } if(mouse_release(mb_left)) @@ -145,7 +145,7 @@ function Node_Transform_Single(_x, _y, _group = noone) : Node_Processor(_x, _y, var da = angle_difference(overlay_drag_ma, aa); var sa = overlay_drag_sa - da; - inputs[| 5].setValue(sa); + inputs[5].setValue(sa); if(mouse_release(mb_left)) overlay_dragging = 0; diff --git a/scripts/node_trigger/node_trigger.gml b/scripts/node_trigger/node_trigger.gml index 6616e2791..593a64df6 100644 --- a/scripts/node_trigger/node_trigger.gml +++ b/scripts/node_trigger/node_trigger.gml @@ -2,26 +2,26 @@ function Node_Trigger(_x, _y, _group = noone) : Node(_x, _y, _group) constructor name = "Trigger"; setDimension(96, 56); - inputs[| 0] = nodeValue_Trigger("Trigger", self, false ) + inputs[0] = nodeValue_Trigger("Trigger", self, false ) .setDisplay(VALUE_DISPLAY.button, { name: "Trigger" }); - outputs[| 0] = nodeValue_Output("Trigger", self, VALUE_TYPE.trigger, false ); + outputs[0] = nodeValue_Output("Trigger", self, VALUE_TYPE.trigger, false ); insp2UpdateTooltip = "Trigger"; insp2UpdateIcon = [ THEME.sequence_control, 1, COLORS._main_value_positive ]; - static onInspector2Update = function() { inputs[| 0].setAnim(true); inputs[| 0].setValue(true); } + static onInspector2Update = function() { inputs[0].setAnim(true); inputs[0].setValue(true); } static update = function() { - var _val = inputs[| 0].getValue(); - outputs[| 0].setValue(_val); + var _val = inputs[0].getValue(); + outputs[0].setValue(_val); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); var bbox = drawGetBbox(xx, yy, _s); - var trg = outputs[| 0].getValue(); + var trg = outputs[0].getValue(); var cc = trg? COLORS._main_accent : COLORS._main_icon; var rr = min(bbox.w, bbox.h) / 2 - 6; diff --git a/scripts/node_trigger_bool/node_trigger_bool.gml b/scripts/node_trigger_bool/node_trigger_bool.gml index a453b7c29..af6414838 100644 --- a/scripts/node_trigger_bool/node_trigger_bool.gml +++ b/scripts/node_trigger_bool/node_trigger_bool.gml @@ -3,14 +3,14 @@ function Node_Trigger_Bool(_x, _y, _group = noone) : Node(_x, _y, _group) constr update_on_frame = true; setDimension(96, 32 + 24 * 1); - inputs[| 0] = nodeValue_Bool("Boolean", self, false); + inputs[0] = nodeValue_Bool("Boolean", self, false); - inputs[| 1] = nodeValue_Enum_Scroll("Trigger condition", self, 0, [ new scrollItem("True frame", s_node_trigger_cond, 0), + inputs[1] = nodeValue_Enum_Scroll("Trigger condition", self, 0, [ new scrollItem("True frame", s_node_trigger_cond, 0), new scrollItem("False to True", s_node_trigger_cond, 1), new scrollItem("True to False", s_node_trigger_cond, 2), new scrollItem("Value changed", s_node_trigger_cond, 3), ]); - outputs[| 0] = nodeValue_Output("Trigger", self, VALUE_TYPE.trigger, false); + outputs[0] = nodeValue_Output("Trigger", self, VALUE_TYPE.trigger, false); prevVal = false; preview = false; @@ -29,7 +29,7 @@ function Node_Trigger_Bool(_x, _y, _group = noone) : Node(_x, _y, _group) constr case 3 : doTrigger = prevVal != val; break; } - outputs[| 0].setValue(doTrigger); + outputs[0].setValue(doTrigger); preview = doTrigger; prevVal = val; diff --git a/scripts/node_tunnel_in/node_tunnel_in.gml b/scripts/node_tunnel_in/node_tunnel_in.gml index 3e509568b..1ed785daa 100644 --- a/scripts/node_tunnel_in/node_tunnel_in.gml +++ b/scripts/node_tunnel_in/node_tunnel_in.gml @@ -17,10 +17,10 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct var tname = ""; if(!LOADING && !APPENDING) tname = $"tunnel{ds_map_size(TUNNELS_IN_MAP)}"; - inputs[| 0] = nodeValue_Text("Name", self, tname ) + inputs[0] = nodeValue_Text("Name", self, tname ) .rejectArray(); - inputs[| 1] = nodeValue("Value in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, noone ) + inputs[1] = nodeValue("Value in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, noone ) .setVisible(true, true); error_notification = noone; @@ -30,19 +30,19 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct static onInspector2Update = function() { var _node = nodeBuild("Node_Tunnel_Out", x + 128, y); - _node.inputs[| 0].setValue(inputs[| 0].getValue()); + _node.inputs[0].setValue(inputs[0].getValue()); } static update = function(frame = CURRENT_FRAME) { onValueUpdate(); } static resetMap = function() { - var _key = inputs[| 0].getValue(); + var _key = inputs[0].getValue(); TUNNELS_IN_MAP[? node_id] = _key; - TUNNELS_IN[? _key] = inputs[| 1]; + TUNNELS_IN[? _key] = inputs[1]; } resetMap(); static checkDuplicate = function() { - var _key = inputs[| 0].getValue(); + var _key = inputs[0].getValue(); var amo = ds_map_size(TUNNELS_IN_MAP); var k = ds_map_find_first(TUNNELS_IN_MAP); var dup = false; @@ -64,7 +64,7 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct } static onValueUpdate = function(index = -1) { - var _key = inputs[| 0].getValue(); + var _key = inputs[0].getValue(); resetMap(); var amo = ds_map_size(TUNNELS_IN_MAP); @@ -86,23 +86,23 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct } static step = function() { - var _key = inputs[| 0].getValue(); + var _key = inputs[0].getValue(); value_validation[VALIDATION.error] = error_notification != noone; - if(inputs[| 1].value_from == noone) { - inputs[| 1].setType(VALUE_TYPE.any); - inputs[| 1].display_type = VALUE_DISPLAY._default; + if(inputs[1].value_from == noone) { + inputs[1].setType(VALUE_TYPE.any); + inputs[1].display_type = VALUE_DISPLAY._default; } else { - inputs[| 1].setType(inputs[| 1].value_from.type); - inputs[| 1].display_type = inputs[| 1].value_from.display_type; + inputs[1].setType(inputs[1].value_from.type); + inputs[1].display_type = inputs[1].value_from.display_type; } } static getNextNodes = function() { var nodes = []; var nodeNames = []; - var _key = inputs[| 0].getValue(); + var _key = inputs[0].getValue(); var amo = ds_map_size(TUNNELS_OUT); var k = ds_map_find_first(TUNNELS_OUT); @@ -137,11 +137,11 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct var xx = x * _s + _x; var yy = y * _s + _y; - inputs[| 0].x = xx; - inputs[| 0].y = yy; + inputs[0].x = xx; + inputs[0].y = yy; - inputs[| 1].x = xx; - inputs[| 1].y = yy; + inputs[1].x = xx; + inputs[1].y = yy; } static drawBadge = function(_x, _y, _s) {} @@ -156,10 +156,10 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct hover |= tun && tun.tunnel_hover == self; if(!hover) return; - var _key = inputs[| 0].getValue(); + var _key = inputs[0].getValue(); var _keys = ds_map_keys_to_array(TUNNELS_OUT); - draw_set_color(inputs[| 1].color_display); + draw_set_color(inputs[1].color_display); draw_set_alpha(0.5); for (var i = 0, n = array_length(_keys); i < n; i++) { @@ -187,11 +187,11 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct var yy = y * _s + _y; isHovering = point_in_circle(_mx, _my, xx, yy, _s * 24); - var jhov = inputs[| 1].drawJunction(_s, _mx, _my); + var jhov = inputs[1].drawJunction(_s, _mx, _my); if(!isHovering) return noone; hover_scale_to = 1; - return jhov? inputs[| 1] : noone; + return jhov? inputs[1] : noone; } static drawNode = function(_x, _y, _mx, _my, _s) { @@ -211,7 +211,7 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct preview_connecting = false; shader_set(sh_node_arc); - shader_set_color("color", inputs[| 1].color_display, hover_alpha); + shader_set_color("color", inputs[1].color_display, hover_alpha); shader_set_f("angle", degtorad(90)); var _r = preview_scale * _s * 20; @@ -241,7 +241,7 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct hover_scale_to = 0; draw_set_text(f_sdf, fa_center, fa_bottom, COLORS._main_text); - draw_text_transformed(xx, yy - 12 * _s, string(inputs[| 0].getValue()), _s * .3, _s * .3, 0); + draw_text_transformed(xx, yy - 12 * _s, string(inputs[0].getValue()), _s * .3, _s * .3, 0); return drawJunctions(_x, _y, _mx, _my, _s); } diff --git a/scripts/node_tunnel_out/node_tunnel_out.gml b/scripts/node_tunnel_out/node_tunnel_out.gml index da0b4e951..8601c71d6 100644 --- a/scripts/node_tunnel_out/node_tunnel_out.gml +++ b/scripts/node_tunnel_out/node_tunnel_out.gml @@ -18,17 +18,17 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc if(!LOADING && !APPENDING && !ds_map_empty(TUNNELS_IN)) tname = ds_map_find_first(TUNNELS_IN); - inputs[| 0] = nodeValue_Text("Name", self, tname ) + inputs[0] = nodeValue_Text("Name", self, tname ) .setDisplay(VALUE_DISPLAY.text_tunnel) .rejectArray(); - outputs[| 0] = nodeValue_Output("Value out", self, VALUE_TYPE.any, noone ); + outputs[0] = nodeValue_Output("Value out", self, VALUE_TYPE.any, noone ); insp2UpdateTooltip = "Goto tunnel in"; insp2UpdateIcon = [ THEME.tunnel, 1, c_white ]; static onInspector2Update = function() { - var _key = inputs[| 0].getValue(); + var _key = inputs[0].getValue(); if(!ds_map_exists(TUNNELS_IN, _key)) return; var _node = TUNNELS_IN[? _key].node; @@ -36,36 +36,36 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc } static isRenderable = function() { - var _key = inputs[| 0].getValue(); + var _key = inputs[0].getValue(); if(!ds_map_exists(TUNNELS_IN, _key)) return false; return TUNNELS_IN[? _key].node.rendered; } static onValueUpdate = function(index = -1) { - var _key = inputs[| 0].getValue(); + var _key = inputs[0].getValue(); if(index == 0) { RENDER_ALL_REORDER } } static step = function() { - var _key = inputs[| 0].getValue(); + var _key = inputs[0].getValue(); TUNNELS_OUT[? node_id] = _key; if(ds_map_exists(TUNNELS_IN, _key)) { - outputs[| 0].setType(TUNNELS_IN[? _key].type); - outputs[| 0].display_type = TUNNELS_IN[? _key].display_type; + outputs[0].setType(TUNNELS_IN[? _key].type); + outputs[0].display_type = TUNNELS_IN[? _key].display_type; } else { - outputs[| 0].setType(VALUE_TYPE.any); - outputs[| 0].display_type = VALUE_DISPLAY._default; + outputs[0].setType(VALUE_TYPE.any); + outputs[0].display_type = VALUE_DISPLAY._default; } } static update = function(frame = CURRENT_FRAME) { - var _key = inputs[| 0].getValue(); + var _key = inputs[0].getValue(); if(ds_map_exists(TUNNELS_IN, _key)) - outputs[| 0].setValue(TUNNELS_IN[? _key].getValue()); + outputs[0].setValue(TUNNELS_IN[? _key].getValue()); } ///////////////////////////////////////////////////////////////////////////// @@ -81,11 +81,11 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc var xx = x * _s + _x; var yy = y * _s + _y; - inputs[| 0].x = xx; - inputs[| 0].y = yy; + inputs[0].x = xx; + inputs[0].y = yy; - outputs[| 0].x = xx; - outputs[| 0].y = yy; + outputs[0].x = xx; + outputs[0].y = yy; } static drawBadge = function(_x, _y, _s) {} @@ -100,7 +100,7 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc hover |= tun && tun.tunnel_hover == self; if(!hover) return; - var _key = inputs[| 0].getValue(); + var _key = inputs[0].getValue(); if(!ds_map_exists(TUNNELS_IN, _key)) return; var node = TUNNELS_IN[? _key].node; @@ -109,7 +109,7 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc preview_connecting = true; node.preview_connecting = true; - draw_set_color(outputs[| 0].color_display); + draw_set_color(outputs[0].color_display); draw_set_alpha(0.5); var frx = _x + node.x * _s; @@ -124,11 +124,11 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc var yy = y * _s + _y; isHovering = point_in_circle(_mx, _my, xx, yy, _s * 24); - var jhov = outputs[| 0].drawJunction(_s, _mx, _my); + var jhov = outputs[0].drawJunction(_s, _mx, _my); if(!isHovering) return noone; hover_scale_to = 1; - return jhov? outputs[| 0] : noone; + return jhov? outputs[0] : noone; } static drawNode = function(_x, _y, _mx, _my, _s) { @@ -148,7 +148,7 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc preview_connecting = false; shader_set(sh_node_arc); - shader_set_color("color", outputs[| 0].color_display, hover_alpha); + shader_set_color("color", outputs[0].color_display, hover_alpha); shader_set_f("angle", degtorad(-90)); var _r = preview_scale * _s * 20; @@ -178,7 +178,7 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc hover_scale_to = 0; draw_set_text(f_sdf, fa_center, fa_bottom, COLORS._main_text); - draw_text_transformed(xx, yy - 12 * _s, string(inputs[| 0].getValue()), _s * .3, _s * .3, 0); + draw_text_transformed(xx, yy - 12 * _s, string(inputs[0].getValue()), _s * .3, _s * .3, 0); return drawJunctions(_x, _y, _mx, _my, _s); } diff --git a/scripts/node_twirl/node_twirl.gml b/scripts/node_twirl/node_twirl.gml index 7bd3e1bac..c69016ef5 100644 --- a/scripts/node_twirl/node_twirl.gml +++ b/scripts/node_twirl/node_twirl.gml @@ -1,44 +1,44 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Twirl"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Vector("Center", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Center", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 2] = nodeValue_Float("Strength", self, 3) + inputs[2] = nodeValue_Float("Strength", self, 3) .setDisplay(VALUE_DISPLAY.slider, { range: [-10, 10, 0.01] }) .setMappable(11); - inputs[| 3] = nodeValue_Float("Radius", self, 16) + inputs[3] = nodeValue_Float("Radius", self, 16) .setMappable(12); - inputs[| 4] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + inputs[4] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 5] = nodeValue_Surface("Mask", self); + inputs[5] = nodeValue_Surface("Mask", self); - inputs[| 6] = nodeValue_Float("Mix", self, 1) + inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue_Bool("Active", self, true); + inputs[7] = nodeValue_Bool("Active", self, true); active_index = 7; - inputs[| 8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + inputs[8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); __init_mask_modifier(5); // inputs 9, 10 //////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValue_Surface("Strength map", self) + inputs[11] = nodeValue_Surface("Strength map", self) .setVisible(false, false); - inputs[| 12] = nodeValue_Surface("Radius map", self) + inputs[12] = nodeValue_Surface("Radius map", self) .setVisible(false, false); //////////////////////////////////////////////////////////////////////////////////////////// - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 7, 8, ["Surfaces", true], 0, 5, 6, 9, 10, @@ -57,8 +57,8 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con var py = _y + pos[1] * _s; var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; - var hv = inputs[| 3].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[3].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } @@ -66,8 +66,8 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con static step = function() { __step_mask_modifier(); - inputs[| 2].mappableStep(); - inputs[| 3].mappableStep(); + inputs[2].mappableStep(); + inputs[3].mappableStep(); } static processData = function(_outSurf, _data, _output_index, _array_index) { #region @@ -77,8 +77,8 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con shader_set_interpolation(_data[0]); shader_set_f("dimension" , surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0])); shader_set_2("center" , _data[1]); - shader_set_f_map("strength", _data[2], _data[11], inputs[| 2]); - shader_set_f_map("radius" , _data[3], _data[12], inputs[| 3]); + shader_set_f_map("strength", _data[2], _data[11], inputs[2]); + shader_set_f_map("radius" , _data[3], _data[12], inputs[3]); shader_set_i("sampleMode", sam); draw_surface_safe(_data[0]); diff --git a/scripts/node_unicode/node_unicode.gml b/scripts/node_unicode/node_unicode.gml index c590e46de..17e7cb276 100644 --- a/scripts/node_unicode/node_unicode.gml +++ b/scripts/node_unicode/node_unicode.gml @@ -5,9 +5,9 @@ function Node_Unicode(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c setDimension(96, 48); - inputs[| 0] = nodeValue_Int("Unicode", self, 64); + inputs[0] = nodeValue_Int("Unicode", self, 64); - outputs[| 0] = nodeValue_Output("Character", self, VALUE_TYPE.text, 0); + outputs[0] = nodeValue_Output("Character", self, VALUE_TYPE.text, 0); static processData = function(_output, _data, index = 0) { return chr(_data[0]); @@ -15,7 +15,7 @@ function Node_Unicode(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); - var str = outputs[| 0].getValue(); + var str = outputs[0].getValue(); var ss = string_scale(str, bbox.w, bbox.h); draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0); } diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index 6c0775b8e..19725ae74 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -22,7 +22,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru rx = x; ry = y; - index = _connect == JUNCTION_CONNECT.input? ds_list_size(node.inputs) : ds_list_size(node.outputs); + index = _connect == JUNCTION_CONNECT.input? array_length(node.inputs) : array_length(node.outputs); type = _type; forward = true; _initName = _name; @@ -110,6 +110,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru dyna_depo = ds_list_create(); value_tag = ""; + type_array = 0; + is_modified = false; cache_value = [ false, false, undefined, undefined ]; cache_array = [ false, false ]; @@ -415,7 +417,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru editWidget = mapWidget && attributes.mapped? mapWidget : editWidgetRaw; setArrayDepth(attributes.mapped); - var inp = node.inputs[| attributes.map_index]; + var inp = node.inputs[attributes.map_index]; var vis = attributes.mapped && show_in_inspector; if(inp.visible != vis) { @@ -475,7 +477,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru } if(type == VALUE_TYPE.gradient && struct_has(attributes, "map_index")) - node.inputs[| attributes.map_index + 1].setAnim(anim); + node.inputs[attributes.map_index + 1].setAnim(anim); node.refreshTimeline(); } #endregion @@ -523,13 +525,14 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru return visible_in_list; } - static setDisplay = function(_type = VALUE_DISPLAY._default, _data = {}) { #region - display_type = _type; - display_data = _data; + static setDisplay = function(_type = VALUE_DISPLAY._default, _data = {}) { + display_type = _type; + display_data = _data; + type_array = typeArray(display_type); resetDisplay(); return self; - } #endregion + } static resetDisplay = function() { #region //////////////////// RESET DISPLAY //////////////////// editWidget = noone; @@ -1222,15 +1225,17 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru static getValueRecursive = function(arr = __curr_get_val, _time = CURRENT_FRAME) { - arr[@ 0] = __getAnimValue(_time); - arr[@ 1] = self; - if(value_from_loop && value_from_loop.bypassConnection() && value_from_loop.junc_out) value_from_loop.getValue(arr); else if(value_from && value_from != self) value_from.getValueRecursive(arr, _time); + else { + arr[@ 0] = __getAnimValue(_time); + arr[@ 1] = self; + } + if(!expUse || !expTree.validate()) return; if(global.EVALUATE_HEAD == self) { @@ -1350,33 +1355,27 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru return false; } + __is_array = false; static isArray = function(val = undefined) { - var _cac = val == undefined; - - if(_cac) { - if(cache_array[0]) return cache_array[1]; - val = getValue(); - cache_array[0] = true; - } - - var _dep = __array_get_depth(val) > array_depth + typeArray(display_type); - if(_cac) cache_array[1] = _dep; - return _dep; + val ??= getValue(); + return __array_get_depth(val) > array_depth + type_array; } static arrayLength = function(val = undefined) { val ??= getValue(); - if(!isArray(val)) - return -1; + __is_array = false; + type_array = typeArray(display_type); - if(array_depth == 0 && !typeArray(display_type)) - return array_length(val); + if(!is_array(val)) return -1; + + __is_array = isArray(val); + if(!__is_array) return -1; + if(array_depth + type_array == 0) return array_length(val); var ar = val; - var _depth = max(0, array_depth + typeArray(display_type) - 1); - repeat(_depth) - ar = ar[0]; + var _depth = max(0, array_depth + type_array - 1); + repeat(_depth) ar = ar[0]; return array_length(ar); } @@ -1468,9 +1467,9 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru for( var i = 0, n = array_length(PANEL_INSPECTOR.inspectings); i < n; i++ ) { var _node = PANEL_INSPECTOR.inspectings[i]; - if(ind >= ds_list_size(_node.inputs)) continue; + if(ind >= array_length(_node.inputs)) continue; - var r = _node.inputs[| ind].setValueDirect(val, index); + var r = _node.inputs[ind].setValueDirect(val, index); if(_node == node) res = r; } } else { @@ -1509,9 +1508,6 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru if(type == VALUE_TYPE.gradient) updated = true; if(display_type == VALUE_DISPLAY.palette) updated = true; - for( var i = 0, n = array_length(value_to_loop); i < n; i++ ) - value_to_loop[i].updateValue(); - if(!updated) return false; ///////////////////////////////////////////////////////////////////////////////// if(connect_type == JUNCTION_CONNECT.input && self.index >= 0) { @@ -1572,8 +1568,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru var _dat = json_try_parse(str); - if(typeArray(display_type) && !is_array(_dat)) - _dat = [ _dat ]; + if(type_array && !is_array(_dat)) _dat = [ _dat ]; setValue(_dat); } @@ -1731,8 +1726,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru static searchNodeBackward = function(_node) { #region if(node == _node) return true; - for(var i = 0; i < ds_list_size(node.inputs); i++) { - var _in = node.inputs[| i].value_from; + for(var i = 0; i < array_length(node.inputs); i++) { + var _in = node.inputs[i].value_from; if(_in && _in.searchNodeBackward(_node)) return true; } @@ -2166,14 +2161,14 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru } var _nd = PROJECT.nodeMap[? _node]; - var _ol = ds_list_size(_nd.outputs); + var _ol = array_length(_nd.outputs); if(log) log_warning("LOAD", $"[Connect] Reconnecting {node.name} to {_nd.name}", node); if(con_index == VALUE_TAG.updateInTrigger) return setFrom(_nd.updatedInTrigger); else if(con_index == VALUE_TAG.updateOutTrigger) return setFrom(_nd.updatedOutTrigger); else if(con_index < _ol) { - var _set = setFrom(_nd.outputs[| con_index], false, true); + var _set = setFrom(_nd.outputs[con_index], false, true); if(_set) return true; if(_set == -1) log_warning("LOAD", $"[Connect] Connection conflict {node.name} to {_nd.name} : Not connectable.", node); @@ -2194,8 +2189,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru var ext = nodeBuild(_type, node.x, node.y); ext.x -= ext.w + 32; - for( var i = 0; i < ds_list_size(ext.outputs); i++ ) { - if(setFrom(ext.outputs[| i])) break; + for( var i = 0; i < array_length(ext.outputs); i++ ) { + if(setFrom(ext.outputs[i])) break; } var animFrom = animator.values; @@ -2206,16 +2201,16 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru case "Node_Vector3": len++; case "Node_Vector2": for( var j = 0; j < len; j++ ) { - var animTo = ext.inputs[| j].animator; + var animTo = ext.inputs[j].animator; var animLs = animTo.values; - ext.inputs[| j].setAnim(is_anim); + ext.inputs[j].setAnim(is_anim); ds_list_clear(animLs); } for( var i = 0; i < ds_list_size(animFrom); i++ ) { for( var j = 0; j < len; j++ ) { - var animTo = ext.inputs[| j].animator; + var animTo = ext.inputs[j].animator; var animLs = animTo.values; var a = animFrom[| i].clone(animTo); @@ -2227,10 +2222,10 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru case "Node_Path": break; default: - var animTo = ext.inputs[| 0].animator; + var animTo = ext.inputs[0].animator; var animLs = animTo.values; - ext.inputs[| 0].setAnim(is_anim); + ext.inputs[0].setAnim(is_anim); ds_list_clear(animLs); for( var i = 0; i < ds_list_size(animFrom); i++ ) diff --git a/scripts/node_value_dimension/node_value_dimension.gml b/scripts/node_value_dimension/node_value_dimension.gml index 803ccb6d3..e390b95aa 100644 --- a/scripts/node_value_dimension/node_value_dimension.gml +++ b/scripts/node_value_dimension/node_value_dimension.gml @@ -1,6 +1,6 @@ -function nodeValue_Dimension(_node, _tooltip = "") { return new NodeValue_Dimension(_node, _tooltip); } +function nodeValue_Dimension(_node, value = DEF_SURF) { return new NodeValue_Dimension(_node, value); } -function NodeValue_Dimension(_node, _tooltip = "") : NodeValue("Dimension", _node, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF, _tooltip) constructor { +function NodeValue_Dimension(_node, value) : NodeValue("Dimension", _node, JUNCTION_CONNECT.input, VALUE_TYPE.integer, value, "") constructor { setDisplay(VALUE_DISPLAY.vector, 2); /////============== GET ============= diff --git a/scripts/node_value_float/node_value_float.gml b/scripts/node_value_float/node_value_float.gml index 7984abd93..ce47b4127 100644 --- a/scripts/node_value_float/node_value_float.gml +++ b/scripts/node_value_float/node_value_float.gml @@ -41,6 +41,7 @@ function NodeValue_Float(_name, _node, _value, _tooltip = "") : NodeValue(_name, return sArr; } else if (is_surface(val)) return [ surface_get_width_safe(val), surface_get_height_safe(val) ]; + return [ 1, 1 ]; } diff --git a/scripts/node_value_output/node_value_output.gml b/scripts/node_value_output/node_value_output.gml index 74b41e218..89f7d7a26 100644 --- a/scripts/node_value_output/node_value_output.gml +++ b/scripts/node_value_output/node_value_output.gml @@ -27,6 +27,10 @@ function NodeValue_Output(_name, _node, _type, _value, _tooltip = "") : NodeValu static setValue = function(val = 0, record = true, time = CURRENT_FRAME, _update = true) { ////Set value output_value = val; + + for( var i = 0, n = array_length(value_to_loop); i < n; i++ ) + value_to_loop[i].updateValue(); + return true; } diff --git a/scripts/node_value_palette/node_value_palette.gml b/scripts/node_value_palette/node_value_palette.gml index c74c483f7..bff8652bc 100644 --- a/scripts/node_value_palette/node_value_palette.gml +++ b/scripts/node_value_palette/node_value_palette.gml @@ -2,6 +2,8 @@ function nodeValue_Palette(_name, _node, _value, _tooltip = "") { return new Nod function NodeValue_Palette(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.color, _value, _tooltip) constructor {; + setDisplay(VALUE_DISPLAY.palette); + /////============== GET ============= static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value diff --git a/scripts/node_value_rotation/node_value_rotation.gml b/scripts/node_value_rotation/node_value_rotation.gml index 166a1ca65..327ddaafd 100644 --- a/scripts/node_value_rotation/node_value_rotation.gml +++ b/scripts/node_value_rotation/node_value_rotation.gml @@ -1,6 +1,6 @@ -function nodeValue_Rotation_Random(_name, _node, _value, _tooltip = "") { return new NodeValue_Rotation_Random(_name, _node, _value, _tooltip); } +function nodeValue_Rotation(_name, _node, _value, _tooltip = "") { return new NodeValue_Rotation(_name, _node, _value, _tooltip); } -function NodeValue_Rotation_Random(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.float, _value, _tooltip) constructor { +function NodeValue_Rotation(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.float, _value, _tooltip) constructor { setDisplay(VALUE_DISPLAY.rotation); /////============== GET ============= diff --git a/scripts/node_value_vec2_range/node_value_vec2_range.gml b/scripts/node_value_vec2_range/node_value_vec2_range.gml index 6c595e974..cccbeb90c 100644 --- a/scripts/node_value_vec2_range/node_value_vec2_range.gml +++ b/scripts/node_value_vec2_range/node_value_vec2_range.gml @@ -1,6 +1,6 @@ function nodeValue_Vec2_Range(_name, _node, _value, _data = {}) { return new NodeValue_Vec2_Range(_name, _node, _value, _data); } -function NodeValue_Vec2_Range(_name, _node, _value, _data, _data = {}) : NodeValue_Array(_name, _node, _value, "", 4) constructor { +function NodeValue_Vec2_Range(_name, _node, _value, _data = {}) : NodeValue_Array(_name, _node, _value, "", 4) constructor { setDisplay(VALUE_DISPLAY.vector_range, _data); } \ No newline at end of file diff --git a/scripts/node_vector2/node_vector2.gml b/scripts/node_vector2/node_vector2.gml index 1e76359a6..9cc7b8999 100644 --- a/scripts/node_vector2/node_vector2.gml +++ b/scripts/node_vector2/node_vector2.gml @@ -4,17 +4,17 @@ function Node_Vector2(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c setDimension(96, 32 + 24 * 2); - inputs[| 0] = nodeValue_Float("x", self, 0) + inputs[0] = nodeValue_Float("x", self, 0) .setVisible(true, true); - inputs[| 1] = nodeValue_Float("y", self, 0) + inputs[1] = nodeValue_Float("y", self, 0) .setVisible(true, true); - inputs[| 2] = nodeValue_Bool("Integer", self, false); + inputs[2] = nodeValue_Bool("Integer", self, false); - inputs[| 3] = nodeValue_Enum_Scroll("Display", self, 0, [ "Number", "Coordinate" ]); + inputs[3] = nodeValue_Enum_Scroll("Display", self, 0, [ "Number", "Coordinate" ]); - outputs[| 0] = nodeValue_Output("Vector", self, VALUE_TYPE.float, [ 0, 0 ]) + outputs[0] = nodeValue_Output("Vector", self, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); drag_type = 0; @@ -79,8 +79,8 @@ function Node_Vector2(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c _val[1] = _ny; } - var s0 = inputs[| 0].setValue(_val[0]); - var s1 = inputs[| 1].setValue(_val[1]); + var s0 = inputs[0].setValue(_val[0]); + var s1 = inputs[1].setValue(_val[1]); if(s0 || s1) UNDO_HOLDING = true; @@ -109,13 +109,13 @@ function Node_Vector2(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c var disp = getInputData(3); for( var i = 0; i < 2; i++ ) - inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); + inputs[i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); - outputs[| 0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); + outputs[0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); setDimension(96, 80, false); - if(disp == 1 && inputs[| 0].value_from == noone && inputs[| 1].value_from == noone) + if(disp == 1 && inputs[0].value_from == noone && inputs[1].value_from == noone) setDimension(160, 160, false); } #endregion @@ -135,7 +135,7 @@ function Node_Vector2(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c var v0 = array_safe_get_fast(vec, 0); var v1 = array_safe_get_fast(vec, 1); - if(disp == 0 || inputs[| 0].value_from != noone || inputs[| 1].value_from != noone) { + if(disp == 0 || inputs[0].value_from != noone || inputs[1].value_from != noone) { draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); var str = $"{v0}\n{v1}"; var ss = string_scale(str, bbox.w, bbox.h); @@ -190,8 +190,8 @@ function Node_Vector2(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c my = round(my); } - var _i0 = inputs[| 0].setValue(mx); - var _i1 = inputs[| 1].setValue(my); + var _i0 = inputs[0].setValue(mx); + var _i1 = inputs[1].setValue(my); if(_i0 || _i1) UNDO_HOLDING = true; if(mouse_release(mb_left)) { diff --git a/scripts/node_vector3/node_vector3.gml b/scripts/node_vector3/node_vector3.gml index 61729aa7a..c0e0c92a5 100644 --- a/scripts/node_vector3/node_vector3.gml +++ b/scripts/node_vector3/node_vector3.gml @@ -3,26 +3,26 @@ function Node_Vector3(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c color = COLORS.node_blend_number; setDimension(96, 32 + 24 * 3); - inputs[| 0] = nodeValue_Float("x", self, 0) + inputs[0] = nodeValue_Float("x", self, 0) .setVisible(true, true); - inputs[| 1] = nodeValue_Float("y", self, 0) + inputs[1] = nodeValue_Float("y", self, 0) .setVisible(true, true); - inputs[| 2] = nodeValue_Float("z", self, 0) + inputs[2] = nodeValue_Float("z", self, 0) .setVisible(true, true); - inputs[| 3] = nodeValue_Bool("Integer", self, false); + inputs[3] = nodeValue_Bool("Integer", self, false); - outputs[| 0] = nodeValue_Output("Vector", self, VALUE_TYPE.float, [ 0, 0, 0 ]) + outputs[0] = nodeValue_Output("Vector", self, VALUE_TYPE.float, [ 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); static step = function() { var int = getInputData(3); for( var i = 0; i < 3; i++ ) - inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); + inputs[i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); - outputs[| 0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); + outputs[0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); } static processData = function(_output, _data, _output_index, _array_index = 0) { diff --git a/scripts/node_vector4/node_vector4.gml b/scripts/node_vector4/node_vector4.gml index 77c802765..cea4f7894 100644 --- a/scripts/node_vector4/node_vector4.gml +++ b/scripts/node_vector4/node_vector4.gml @@ -3,29 +3,29 @@ function Node_Vector4(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c color = COLORS.node_blend_number; setDimension(96, 32 + 24 * 4); - inputs[| 0] = nodeValue_Float("x", self, 0) + inputs[0] = nodeValue_Float("x", self, 0) .setVisible(true, true); - inputs[| 1] = nodeValue_Float("y", self, 0) + inputs[1] = nodeValue_Float("y", self, 0) .setVisible(true, true); - inputs[| 2] = nodeValue_Float("z", self, 0) + inputs[2] = nodeValue_Float("z", self, 0) .setVisible(true, true); - inputs[| 3] = nodeValue_Float("w", self, 0) + inputs[3] = nodeValue_Float("w", self, 0) .setVisible(true, true); - inputs[| 4] = nodeValue_Bool("Integer", self, false); + inputs[4] = nodeValue_Bool("Integer", self, false); - outputs[| 0] = nodeValue_Output("Vector", self, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) + outputs[0] = nodeValue_Output("Vector", self, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); static step = function() { var int = getInputData(4); for( var i = 0; i < 4; i++ ) - inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); + inputs[i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); - outputs[| 0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); + outputs[0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); } static processData = function(_output, _data, _output_index, _array_index = 0) { diff --git a/scripts/node_vector_cross_2D/node_vector_cross_2D.gml b/scripts/node_vector_cross_2D/node_vector_cross_2D.gml index b22c3212d..6b36a5882 100644 --- a/scripts/node_vector_cross_2D/node_vector_cross_2D.gml +++ b/scripts/node_vector_cross_2D/node_vector_cross_2D.gml @@ -4,13 +4,13 @@ function Node_Vector_Cross_2D(_x, _y, _group = noone) : Node_Processor(_x, _y, _ setDimension(96, 48); - inputs[| 0] = nodeValue_Vector("Point 1", self, [ 0, 0 ]) + inputs[0] = nodeValue_Vector("Point 1", self, [ 0, 0 ]) .setVisible(true, true); - inputs[| 1] = nodeValue_Vector("Point 2", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Point 2", self, [ 0, 0 ]) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Result", self, VALUE_TYPE.float, 0 ); + outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.float, 0 ); static processData = function(_output, _data, _output_index, _array_index = 0) { var vec1 = _data[0]; diff --git a/scripts/node_vector_cross_3D/node_vector_cross_3D.gml b/scripts/node_vector_cross_3D/node_vector_cross_3D.gml index bda68dac8..902684ad0 100644 --- a/scripts/node_vector_cross_3D/node_vector_cross_3D.gml +++ b/scripts/node_vector_cross_3D/node_vector_cross_3D.gml @@ -4,13 +4,13 @@ function Node_Vector_Cross_3D(_x, _y, _group = noone) : Node_Processor(_x, _y, _ setDimension(96, 48); - inputs[| 0] = nodeValue_Vector("Point 1", self, [ 0, 0, 0 ]) + inputs[0] = nodeValue_Vector("Point 1", self, [ 0, 0, 0 ]) .setVisible(true, true); - inputs[| 1] = nodeValue_Vector("Point 2", self, [ 0, 0, 0 ]) + inputs[1] = nodeValue_Vector("Point 2", self, [ 0, 0, 0 ]) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Result", self, VALUE_TYPE.float, [ 0, 0, 0 ] ) + outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.float, [ 0, 0, 0 ] ) .setDisplay(VALUE_DISPLAY.vector); static processData = function(_output, _data, _output_index, _array_index = 0) { diff --git a/scripts/node_vector_dot/node_vector_dot.gml b/scripts/node_vector_dot/node_vector_dot.gml index eceb66054..48280b3d9 100644 --- a/scripts/node_vector_dot/node_vector_dot.gml +++ b/scripts/node_vector_dot/node_vector_dot.gml @@ -3,28 +3,28 @@ function Node_Vector_Dot(_x, _y, _group = noone) : Node_Processor(_x, _y, _group color = COLORS.node_blend_number; setDimension(96, 48); - inputs[| 0] = nodeValue_Vector("Point 1", self, [ 0, 0 ]) + inputs[0] = nodeValue_Vector("Point 1", self, [ 0, 0 ]) .setVisible(true, true); - inputs[| 1] = nodeValue_Vector("Point 2", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Point 2", self, [ 0, 0 ]) .setVisible(true, true); - outputs[| 0] = nodeValue_Output("Result", self, VALUE_TYPE.float, 0 ); + outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.float, 0 ); static processData = function(_output, _data, _output_index, _array_index = 0) { var _pnt1 = _data[0]; var _pnt2 = _data[1]; if(array_length(_pnt1) == 2) { - inputs[| 0].editWidget.size = 2; - inputs[| 1].editWidget.size = 2; + inputs[0].editWidget.size = 2; + inputs[1].editWidget.size = 2; return dot_product(array_safe_get_fast(_pnt1, 0), array_safe_get_fast(_pnt1, 1), array_safe_get_fast(_pnt2, 0), array_safe_get_fast(_pnt2, 1)); } else if(array_length(_pnt1) == 3) { - inputs[| 0].editWidget.size = 3; - inputs[| 1].editWidget.size = 3; + inputs[0].editWidget.size = 3; + inputs[1].editWidget.size = 3; return dot_product_3d(array_safe_get_fast(_pnt1, 0), array_safe_get_fast(_pnt1, 1), array_safe_get_fast(_pnt1, 2), array_safe_get_fast(_pnt2, 0), array_safe_get_fast(_pnt2, 1), array_safe_get_fast(_pnt2, 2), ); diff --git a/scripts/node_vector_split/node_vector_split.gml b/scripts/node_vector_split/node_vector_split.gml index bc95af4e2..2018f3191 100644 --- a/scripts/node_vector_split/node_vector_split.gml +++ b/scripts/node_vector_split/node_vector_split.gml @@ -7,25 +7,25 @@ function Node_Vector_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro draw_padding = 4; - inputs[| 0] = nodeValue_Vector("Vector", self, [ 0, 0, 0, 0 ]) + inputs[0] = nodeValue_Vector("Vector", self, [ 0, 0, 0, 0 ]) .setArrayDynamic() .setVisible(true, true); - outputs[| 0] = nodeValue_Output("x", self, VALUE_TYPE.float, 0); - outputs[| 1] = nodeValue_Output("y", self, VALUE_TYPE.float, 0); - outputs[| 2] = nodeValue_Output("z", self, VALUE_TYPE.float, 0); - outputs[| 3] = nodeValue_Output("w", self, VALUE_TYPE.float, 0); + outputs[0] = nodeValue_Output("x", self, VALUE_TYPE.float, 0); + outputs[1] = nodeValue_Output("y", self, VALUE_TYPE.float, 0); + outputs[2] = nodeValue_Output("z", self, VALUE_TYPE.float, 0); + outputs[3] = nodeValue_Output("w", self, VALUE_TYPE.float, 0); static step = function() { - if(inputs[| 0].value_from == noone) return; + if(inputs[0].value_from == noone) return; var type = VALUE_TYPE.float; - if(inputs[| 0].value_from.type == VALUE_TYPE.integer) + if(inputs[0].value_from.type == VALUE_TYPE.integer) type = VALUE_TYPE.integer; - inputs[| 0].setType(type); + inputs[0].setType(type); for( var i = 0; i < 4; i++ ) - outputs[| i].setType(type); + outputs[i].setType(type); } static processData = function(_output, _data, _output_index, _array_index = 0) { @@ -42,7 +42,7 @@ function Node_Vector_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); var str = ""; for( var i = 0; i < 4; i++ ) - if(outputs[| i].visible) str += $"{outputs[| i].getValue()}\n"; + if(outputs[i].visible) str += $"{outputs[i].getValue()}\n"; str = string_trim(str); var bbox = drawGetBbox(xx, yy, _s); diff --git a/scripts/node_vignette/node_vignette.gml b/scripts/node_vignette/node_vignette.gml index 1744c0f92..febf17ba6 100644 --- a/scripts/node_vignette/node_vignette.gml +++ b/scripts/node_vignette/node_vignette.gml @@ -1,23 +1,23 @@ function Node_Vignette(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Vignette"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Bool("Active", self, true); + inputs[1] = nodeValue_Bool("Active", self, true); active_index = 1; - inputs[| 2] = nodeValue_Float("Exposure", self, 15); + inputs[2] = nodeValue_Float("Exposure", self, 15); - inputs[| 3] = nodeValue_Float("Strength", self, 1) + inputs[3] = nodeValue_Float("Strength", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); - inputs[| 4] = nodeValue_Float("Exponent", self, 0.25) + inputs[4] = nodeValue_Float("Exponent", self, 0.25) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue_Float("Roundness", self, 0) + inputs[5] = nodeValue_Float("Roundness", self, 0) .setDisplay(VALUE_DISPLAY.slider); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 1, ["Surfaces", false], 0, diff --git a/scripts/node_voronoi_extra/node_voronoi_extra.gml b/scripts/node_voronoi_extra/node_voronoi_extra.gml index e811e4776..817ba1d53 100644 --- a/scripts/node_voronoi_extra/node_voronoi_extra.gml +++ b/scripts/node_voronoi_extra/node_voronoi_extra.gml @@ -2,28 +2,28 @@ function Node_Voronoi_Extra(_x, _y, _group = noone) : Node_Shader_Generator(_x, name = "Extra Voronoi"; shader = sh_voronoi_extra; - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 4, 4 ]); + inputs[2] = nodeValue_Vector("Scale", self, [ 4, 4 ]); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[| 3] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); addShaderProp(SHADER_UNIFORM.float, "seed"); - inputs[| 4] = nodeValue_Float("Progress", self, 0) + inputs[4] = nodeValue_Float("Progress", self, 0) addShaderProp(SHADER_UNIFORM.float, "progress"); - inputs[| 5] = nodeValue_Enum_Scroll("Mode", self, 0, [ "Block", "Triangle" ]); + inputs[5] = nodeValue_Enum_Scroll("Mode", self, 0, [ "Block", "Triangle" ]); addShaderProp(SHADER_UNIFORM.integer, "mode"); - inputs[| 6] = nodeValue_Float("Parameter A", self, 0) + inputs[6] = nodeValue_Float("Parameter A", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); addShaderProp(SHADER_UNIFORM.float, "paramA"); - inputs[| 7] = nodeValue_Rotation("Rotation", self, 0); + inputs[7] = nodeValue_Rotation("Rotation", self, 0); addShaderProp(SHADER_UNIFORM.float, "rotation"); input_display_list = [ @@ -33,7 +33,7 @@ function Node_Voronoi_Extra(_x, _y, _group = noone) : Node_Shader_Generator(_x, static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } diff --git a/scripts/node_warp/node_warp.gml b/scripts/node_warp/node_warp.gml index d9c6ba156..37d672c5d 100644 --- a/scripts/node_warp/node_warp.gml +++ b/scripts/node_warp/node_warp.gml @@ -1,28 +1,28 @@ function Node_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Warp"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Vector("Top left", self, [ 0, 0 ] ) + inputs[1] = nodeValue_Vector("Top left", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 2] = nodeValue_Vector("Top right", self, [ DEF_SURF_W, 0 ] ) + inputs[2] = nodeValue_Vector("Top right", self, [ DEF_SURF_W, 0 ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 3] = nodeValue_Vector("Bottom left", self, [ 0, DEF_SURF_H ] ) + inputs[3] = nodeValue_Vector("Bottom left", self, [ 0, DEF_SURF_H ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 4] = nodeValue_Vector("Bottom right", self, DEF_SURF ) + inputs[4] = nodeValue_Vector("Bottom right", self, DEF_SURF ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 5] = nodeValue_Bool("Active", self, true); + inputs[5] = nodeValue_Bool("Active", self, true); active_index = 5; - inputs[| 6] = nodeValue_Bool("Use custom dimension", self, false); + inputs[6] = nodeValue_Bool("Use custom dimension", self, false); - inputs[| 7] = nodeValue_Dimension(self); + inputs[7] = nodeValue_Dimension(self); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 5, ["Surfaces", false], 0, 6, 7, @@ -49,10 +49,10 @@ function Node_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons var _sw = surface_get_width_safe(_surf); var _sh = surface_get_height_safe(_surf); - inputs[| 1].setValue([ 0, 0 ]); - inputs[| 2].setValue([ _sw, 0 ]); - inputs[| 3].setValue([ 0, _sh ]); - inputs[| 4].setValue([ _sw, _sh ]); + inputs[1].setValue([ 0, 0 ]); + inputs[2].setValue([ _sw, 0 ]); + inputs[3].setValue([ 0, _sh ]); + inputs[4].setValue([ _sw, _sh ]); attributes.initalset = true; } @@ -61,14 +61,14 @@ function Node_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons static step = function() { var _useDim = getInputData(6); - inputs[| 7].setVisible(_useDim); + inputs[7].setVisible(_useDim); dimension_index = _useDim? 7 : 0; } static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, params) { PROCESSOR_OVERLAY_CHECK - var _surf = outputs[| 0].getValue(); + var _surf = outputs[0].getValue(); if(is_array(_surf)) { if(array_length(_surf) == 0) return; _surf = _surf[preview_index]; @@ -152,8 +152,8 @@ function Node_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons var _trx = value_snap(drag_s[1][0] + dx, _snx); var _try = value_snap(drag_s[1][1] + dy, _sny); - var _up1 = inputs[| 1].setValue([ _tlx, _tly ]); - var _up2 = inputs[| 2].setValue([ _trx, _try ]); + var _up1 = inputs[1].setValue([ _tlx, _tly ]); + var _up2 = inputs[2].setValue([ _trx, _try ]); if(_up1 || _up2) UNDO_HOLDING = true; } else if(drag_side == 1) { @@ -165,8 +165,8 @@ function Node_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons var _blx = value_snap(drag_s[1][0] + dx, _snx); var _bly = value_snap(drag_s[1][1] + dy, _sny); - var _up1 = inputs[| 1].setValue([ _tlx, _tly ]); - var _up3 = inputs[| 3].setValue([ _blx, _bly ]); + var _up1 = inputs[1].setValue([ _tlx, _tly ]); + var _up3 = inputs[3].setValue([ _blx, _bly ]); if(_up1 || _up3) UNDO_HOLDING = true; } else if(drag_side == 2) { @@ -178,8 +178,8 @@ function Node_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons var _trx = value_snap(drag_s[1][0] + dx, _snx); var _try = value_snap(drag_s[1][1] + dy, _sny); - var _up4 = inputs[| 4].setValue([ _brx, _bry ]); - var _up2 = inputs[| 2].setValue([ _trx, _try ]); + var _up4 = inputs[4].setValue([ _brx, _bry ]); + var _up2 = inputs[2].setValue([ _trx, _try ]); if(_up4 || _up2) UNDO_HOLDING = true; } else if(drag_side == 3) { @@ -191,8 +191,8 @@ function Node_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons var _blx = value_snap(drag_s[1][0] + dx, _snx); var _bly = value_snap(drag_s[1][1] + dy, _sny); - var _up4 = inputs[| 4].setValue([ _brx, _bry ]); - var _up3 = inputs[| 3].setValue([ _blx, _bly ]); + var _up4 = inputs[4].setValue([ _brx, _bry ]); + var _up3 = inputs[3].setValue([ _blx, _bly ]); if(_up4 || _up3) UNDO_HOLDING = true; } else if(_hactive) { @@ -233,10 +233,10 @@ function Node_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons } var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active = !hv; _hov |= hv; - var hv = inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active = !hv; _hov |= hv; - var hv = inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active = !hv; _hov |= hv; - var hv = inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active = !hv; _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active = !hv; _hov |= hv; + var hv = inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active = !hv; _hov |= hv; + var hv = inputs[3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active = !hv; _hov |= hv; + var hv = inputs[4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active = !hv; _hov |= hv; return _hov; #endregion diff --git a/scripts/node_wav_file_read/node_wav_file_read.gml b/scripts/node_wav_file_read/node_wav_file_read.gml index c62fbb6cf..bbe4363cf 100644 --- a/scripts/node_wav_file_read/node_wav_file_read.gml +++ b/scripts/node_wav_file_read/node_wav_file_read.gml @@ -7,7 +7,7 @@ function Node_create_WAV_File_Read(_x, _y, _group = noone) { } var node = new Node_WAV_File_Read(_x, _y, _group).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); if(NODE_NEW_MANUAL) node.doUpdate(); return node; @@ -17,7 +17,7 @@ function Node_create_WAV_File_Read_path(_x, _y, path) { if(!file_exists_empty(path)) return noone; var node = new Node_WAV_File_Read(_x, _y, PANEL_GRAPH.getCurrentContext()).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); node.doUpdate(); return node; @@ -27,30 +27,30 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const name = "WAV File In"; color = COLORS.node_blend_input; - inputs[| 0] = nodeValue_Text("Path", self, "") + inputs[0] = nodeValue_Text("Path", self, "") .setDisplay(VALUE_DISPLAY.path_load, { filter: "audio|*.wav" }) .rejectArray(); - inputs[| 1] = nodeValue_Trigger("Sync length", self, false ) + inputs[1] = nodeValue_Trigger("Sync length", self, false ) .setDisplay(VALUE_DISPLAY.button, { name: "Sync", UI : true, onClick: function() { if(content == noone) return; TOTAL_FRAMES = max(1, ceil(content.duration * PROJECT.animator.framerate)); } }); - inputs[| 2] = nodeValue_Bool("Mono", self, false); + inputs[2] = nodeValue_Bool("Mono", self, false); - outputs[| 0] = nodeValue_Output("Data", self, VALUE_TYPE.audioBit, noone) + outputs[0] = nodeValue_Output("Data", self, VALUE_TYPE.audioBit, noone) .setArrayDepth(1); - outputs[| 1] = nodeValue_Output("Path", self, VALUE_TYPE.path, ""); + outputs[1] = nodeValue_Output("Path", self, VALUE_TYPE.path, ""); - outputs[| 2] = nodeValue_Output("Sample rate", self, VALUE_TYPE.integer, 44100) + outputs[2] = nodeValue_Output("Sample rate", self, VALUE_TYPE.integer, 44100) .setVisible(false); - outputs[| 3] = nodeValue_Output("Channels", self, VALUE_TYPE.integer, 2) + outputs[3] = nodeValue_Output("Channels", self, VALUE_TYPE.integer, 2) .setVisible(false); - outputs[| 4] = nodeValue_Output("Duration (s)", self, VALUE_TYPE.float, 0) + outputs[4] = nodeValue_Output("Duration (s)", self, VALUE_TYPE.float, 0) .setVisible(false); content = noone; @@ -111,7 +111,7 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const if(ext != ".wav") return false; - outputs[| 1].setValue(path); + outputs[1].setValue(path); printIf(global.FLAG.wav_import, "-- Reading file..."); @@ -120,15 +120,15 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const } function readSoundComplete() { - outputs[| 0].setValue(content); - outputs[| 2].setValue(content.sample); - outputs[| 3].setValue(content.channels); - outputs[| 4].setValue(content.duration); + outputs[0].setValue(content); + outputs[2].setValue(content.sample); + outputs[3].setValue(content.channels); + outputs[4].setValue(content.duration); printIf(global.FLAG.wav_import, "-- Creating preview buffer..."); var frm = ceil(content.duration * PROJECT.animator.framerate); - inputs[| 1].editWidget.text = $"Sync ({frm} frames)"; + inputs[1].editWidget.text = $"Sync ({frm} frames)"; var bufferId = buffer_create(content.packet * 2, buffer_fixed, 1); buffer_seek(bufferId, buffer_seek_start, 0); @@ -169,7 +169,7 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const if(content != noone) { var frm = max(1, ceil(content.duration * PROJECT.animator.framerate)); - inputs[| 1].editWidget.text = $"Sync ({frm} frames)"; + inputs[1].editWidget.text = $"Sync ({frm} frames)"; } RENDER_ALL_REORDER @@ -280,6 +280,6 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const if(is_array(path)) path = array_safe_get(path, 0); if(!file_exists_empty(path)) return; - inputs[| 0].setValue(path); + inputs[0].setValue(path); } } \ No newline at end of file diff --git a/scripts/node_wav_file_write/node_wav_file_write.gml b/scripts/node_wav_file_write/node_wav_file_write.gml index 87a087805..0bf5e0e7b 100644 --- a/scripts/node_wav_file_write/node_wav_file_write.gml +++ b/scripts/node_wav_file_write/node_wav_file_write.gml @@ -3,22 +3,22 @@ function Node_WAV_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) cons color = COLORS.node_blend_input; setDimension(, 72); - inputs[| 0] = nodeValue_Text("Path", self, "") + inputs[0] = nodeValue_Text("Path", self, "") .setDisplay(VALUE_DISPLAY.path_save, { filter: "audio file|*.wav" }) .rejectArray() .setVisible(true); - inputs[| 1] = nodeValue_Float("Audio Data", self, [[]]) + inputs[1] = nodeValue_Float("Audio Data", self, [[]]) .setArrayDepth(1) .setVisible(true, true); - inputs[| 2] = nodeValue_Int("Sample", self, 44100); + inputs[2] = nodeValue_Int("Sample", self, 44100); - inputs[| 3] = nodeValue_Enum_Scroll("Bit Depth", self, 0, [ "8 bit positive", "16 bit integer" ]); + inputs[3] = nodeValue_Enum_Scroll("Bit Depth", self, 0, [ "8 bit positive", "16 bit integer" ]); - inputs[| 4] = nodeValue_Bool("Remap Data", self, false) + inputs[4] = nodeValue_Bool("Remap Data", self, false) - inputs[| 5] = nodeValue_Vector("Data Range", self, [ 0, 1 ]); + inputs[5] = nodeValue_Vector("Data Range", self, [ 0, 1 ]); input_display_list = [ [ "Data", false], 1, 0, 4, 5, @@ -35,7 +35,7 @@ function Node_WAV_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) cons static step = function() { var remap = getInputData(4); - inputs[| 5].setVisible(remap); + inputs[5].setVisible(remap); } static export = function() { diff --git a/scripts/node_wavelet_noise/node_wavelet_noise.gml b/scripts/node_wavelet_noise/node_wavelet_noise.gml index c100236ff..14382ab75 100644 --- a/scripts/node_wavelet_noise/node_wavelet_noise.gml +++ b/scripts/node_wavelet_noise/node_wavelet_noise.gml @@ -2,38 +2,38 @@ function Node_Wavelet_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, name = "Wavelet Noise"; shader = sh_noise_wavelet; - inputs[| 1] = nodeValue_Vector("Position", self, [ 0, 0 ]) + inputs[1] = nodeValue_Vector("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[| 2] = nodeValue_Vector("Scale", self, [ 4, 4 ]) + inputs[2] = nodeValue_Vector("Scale", self, [ 4, 4 ]) .setMappable(6); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[| 3] = nodeValue_Float("Seed", self, seed_random(6)) - .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); + inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); addShaderProp(SHADER_UNIFORM.float, "seed"); - inputs[| 4] = nodeValue_Float("Progress", self, 0) + inputs[4] = nodeValue_Float("Progress", self, 0) .setMappable(7) addShaderProp(SHADER_UNIFORM.float, "progress"); - inputs[| 5] = nodeValue_Float("Detail", self, 1.24) + inputs[5] = nodeValue_Float("Detail", self, 1.24) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }) .setMappable(8); addShaderProp(SHADER_UNIFORM.float, "detail"); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 6] = nodeValueMap("Scale map", self); addShaderProp(); + inputs[ 6] = nodeValueMap("Scale map", self); addShaderProp(); - inputs[| 7] = nodeValueMap("Progress map", self); addShaderProp(); + inputs[ 7] = nodeValueMap("Progress map", self); addShaderProp(); - inputs[| 8] = nodeValueMap("Detail map", self); addShaderProp(); + inputs[ 8] = nodeValueMap("Detail map", self); addShaderProp(); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 9] = nodeValue_Rotation("Rotation", self, 0); + inputs[9] = nodeValue_Rotation("Rotation", self, 0); addShaderProp(SHADER_UNIFORM.float, "rotation"); input_display_list = [ @@ -43,14 +43,14 @@ function Node_Wavelet_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } static step = function() { - inputs[| 2].mappableStep(); - inputs[| 4].mappableStep(); - inputs[| 5].mappableStep(); + inputs[2].mappableStep(); + inputs[4].mappableStep(); + inputs[5].mappableStep(); } } \ No newline at end of file diff --git a/scripts/node_websocket_receiver/node_websocket_receiver.gml b/scripts/node_websocket_receiver/node_websocket_receiver.gml index d73abc1ae..774405b65 100644 --- a/scripts/node_websocket_receiver/node_websocket_receiver.gml +++ b/scripts/node_websocket_receiver/node_websocket_receiver.gml @@ -1,17 +1,17 @@ function Node_Websocket_Receiver(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Websocket Receiver"; - inputs[| 0] = nodeValue_Int("Port", self, 22400); + inputs[0] = nodeValue_Int("Port", self, 22400); - inputs[| 1] = nodeValue_Bool("Active", self, true); + inputs[1] = nodeValue_Bool("Active", self, true); - inputs[| 2] = nodeValue_Enum_Button("Mode", self, 1, [ "Client", "Server" ]); + inputs[2] = nodeValue_Enum_Button("Mode", self, 1, [ "Client", "Server" ]); - inputs[| 3] = nodeValue_Text("Url", self, ""); + inputs[3] = nodeValue_Text("Url", self, ""); - outputs[| 0] = nodeValue_Output("Data", self, VALUE_TYPE.struct, {}); + outputs[0] = nodeValue_Output("Data", self, VALUE_TYPE.struct, {}); - outputs[| 1] = nodeValue_Output("Receive data", self, VALUE_TYPE.trigger, false); + outputs[1] = nodeValue_Output("Receive data", self, VALUE_TYPE.trigger, false); input_display_list = [ 1, 2, ["Connection", false], 0, 3, @@ -91,7 +91,7 @@ function Node_Websocket_Receiver(_x, _y, _group = noone) : Node(_x, _y, _group) if(_data == noone) _data = { rawData: new Buffer(_buffer) } else buffer_delete(_buffer); - outputs[| 0].setValue(_data); + outputs[0].setValue(_data); network_trigger = true; break; } @@ -100,13 +100,13 @@ function Node_Websocket_Receiver(_x, _y, _group = noone) : Node(_x, _y, _group) static step = function() { #region var _mode = getInputData(2); - inputs[| 3].setVisible(_mode == 0); + inputs[3].setVisible(_mode == 0); if(network_trigger == 1) { - outputs[| 1].setValue(1); + outputs[1].setValue(1); network_trigger = -1; } else if(network_trigger == -1) { - outputs[| 1].setValue(0); + outputs[1].setValue(0); network_trigger = 0; } } #endregion diff --git a/scripts/node_websocket_sender/node_websocket_sender.gml b/scripts/node_websocket_sender/node_websocket_sender.gml index 79d00b1a3..aeeecb69b 100644 --- a/scripts/node_websocket_sender/node_websocket_sender.gml +++ b/scripts/node_websocket_sender/node_websocket_sender.gml @@ -1,21 +1,21 @@ function Node_Websocket_Sender(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Websocket Sender"; - inputs[| 0] = nodeValue_Int("Port", self, 22800); + inputs[0] = nodeValue_Int("Port", self, 22800); - inputs[| 1] = nodeValue_Enum_Scroll("Data type", self, 0, [ "Struct", "Surface", "File", "Buffer" ]); + inputs[1] = nodeValue_Enum_Scroll("Data type", self, 0, [ "Struct", "Surface", "File", "Buffer" ]); - inputs[| 2] = nodeValue_Struct("Struct", self, {}); + inputs[2] = nodeValue_Struct("Struct", self, {}); - inputs[| 3] = nodeValue_Surface("Surface", self); + inputs[3] = nodeValue_Surface("Surface", self); - inputs[| 4] = nodeValue_Text("Path", self, "") + inputs[4] = nodeValue_Text("Path", self, "") .setDisplay(VALUE_DISPLAY.path_load) .nonValidate(); - inputs[| 5] = nodeValue_Text("Target", self, "127.0.0.1"); + inputs[5] = nodeValue_Text("Target", self, "127.0.0.1"); - inputs[| 6] = nodeValue_Buffer("Buffer", self, noone); + inputs[6] = nodeValue_Buffer("Buffer", self, noone); input_display_list = [ 5, 0, 1, 2, 3, 4, 6 ]; @@ -97,10 +97,10 @@ function Node_Websocket_Sender(_x, _y, _group = noone) : Node(_x, _y, _group) co static step = function() { #region var _type = getInputData(1); - inputs[| 2].setVisible(_type == 0, _type == 0); - inputs[| 3].setVisible(_type == 1, _type == 1); - inputs[| 4].setVisible(_type == 2, _type == 2); - inputs[| 6].setVisible(_type == 3, _type == 3); + inputs[2].setVisible(_type == 0, _type == 0); + inputs[3].setVisible(_type == 1, _type == 1); + inputs[4].setVisible(_type == 2, _type == 2); + inputs[6].setVisible(_type == 3, _type == 3); } #endregion static update = function(frame = CURRENT_FRAME) { #region diff --git a/scripts/node_widget_test/node_widget_test.gml b/scripts/node_widget_test/node_widget_test.gml index 3c94306c9..82fb4b04a 100644 --- a/scripts/node_widget_test/node_widget_test.gml +++ b/scripts/node_widget_test/node_widget_test.gml @@ -3,46 +3,46 @@ function Node_Widget_Test(_x, _y, _group = noone) : Node(_x, _y, _group) constru setDimension(96, 32 + 24 * 1); draw_padding = 8; - inputs[| 0] = nodeValue("textBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY._default) - inputs[| 1] = nodeValue("rangeBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0]) .setDisplay(VALUE_DISPLAY.range) - inputs[| 2] = nodeValue("vectorBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0]) .setDisplay(VALUE_DISPLAY.vector) - inputs[| 3] = nodeValue("vectorRangeBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0, 0, 0]) .setDisplay(VALUE_DISPLAY.vector_range) - inputs[| 4] = nodeValue("rotator", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.rotation) - inputs[| 5] = nodeValue("rotatorRange", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0]) .setDisplay(VALUE_DISPLAY.rotation_range) - inputs[| 6] = nodeValue_Float("rotatorRandom", self, [0, 0, 0, 0, 0]) .setDisplay(VALUE_DISPLAY.rotation_random) - inputs[| 7] = nodeValue("slider", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider) - inputs[| 8] = nodeValue("sliderRange", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.slider_range) - inputs[| 9] = nodeValue("areaBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, DEF_AREA) .setDisplay(VALUE_DISPLAY.area) - inputs[| 10] = nodeValue("paddingBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.padding) - inputs[| 11] = nodeValue("cornerBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.corner) - inputs[| 12] = nodeValue("controlPointBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.puppet_control) - inputs[| 13] = nodeValue("scrollBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Choice 1", "Choice 2" ]) - inputs[| 14] = nodeValue("buttonGroup", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.enum_button, [ "Choice 1", "Choice 2" ]) - inputs[| 15] = nodeValue("matrixGrid", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, array_create(9)) .setDisplay(VALUE_DISPLAY.matrix, { size: 3 }) - inputs[| 16] = nodeValue("transformBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.transform) - inputs[| 17] = nodeValue("transformBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.transform) - inputs[| 18] = nodeValue("quarternionBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.d3quarternion) + inputs[ 0] = nodeValue("textBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY._default) + inputs[ 1] = nodeValue("rangeBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0]) .setDisplay(VALUE_DISPLAY.range) + inputs[ 2] = nodeValue("vectorBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0]) .setDisplay(VALUE_DISPLAY.vector) + inputs[ 3] = nodeValue("vectorRangeBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0, 0, 0]) .setDisplay(VALUE_DISPLAY.vector_range) + inputs[ 4] = nodeValue("rotator", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.rotation) + inputs[ 5] = nodeValue("rotatorRange", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0]) .setDisplay(VALUE_DISPLAY.rotation_range) + inputs[ 6] = nodeValue_Float("rotatorRandom", self, [0, 0, 0, 0, 0]) .setDisplay(VALUE_DISPLAY.rotation_random) + inputs[ 7] = nodeValue("slider", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider) + inputs[ 8] = nodeValue("sliderRange", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.slider_range) + inputs[ 9] = nodeValue("areaBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, DEF_AREA) .setDisplay(VALUE_DISPLAY.area) + inputs[10] = nodeValue("paddingBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.padding) + inputs[11] = nodeValue("cornerBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.corner) + inputs[12] = nodeValue("controlPointBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.puppet_control) + inputs[13] = nodeValue("scrollBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Choice 1", "Choice 2" ]) + inputs[14] = nodeValue("buttonGroup", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.enum_button, [ "Choice 1", "Choice 2" ]) + inputs[15] = nodeValue("matrixGrid", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, array_create(9)) .setDisplay(VALUE_DISPLAY.matrix, { size: 3 }) + inputs[16] = nodeValue("transformBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.transform) + inputs[17] = nodeValue("transformBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.transform) + inputs[18] = nodeValue("quarternionBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.d3quarternion) - inputs[| 19] = nodeValue_Bool("checkBox", self, false) .setDisplay(VALUE_DISPLAY._default) + inputs[19] = nodeValue_Bool("checkBox", self, false) .setDisplay(VALUE_DISPLAY._default) - inputs[| 20] = nodeValue_Color("buttonColor", self, 0) .setDisplay(VALUE_DISPLAY._default) - inputs[| 21] = nodeValue_Palette("buttonPalette", self, array_clone(DEF_PALETTE)) .setDisplay(VALUE_DISPLAY.palette) - inputs[| 22] = nodeValue_Gradient("buttonGradient", self, new gradientObject(cola(c_white))) .setDisplay(VALUE_DISPLAY._default) + inputs[20] = nodeValue_Color("buttonColor", self, 0) .setDisplay(VALUE_DISPLAY._default) + inputs[21] = nodeValue_Palette("buttonPalette", self, array_clone(DEF_PALETTE)) .setDisplay(VALUE_DISPLAY.palette) + inputs[22] = nodeValue_Gradient("buttonGradient", self, new gradientObject(cola(c_white))) .setDisplay(VALUE_DISPLAY._default) - inputs[| 23] = nodeValue("pathArrayBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, []) .setDisplay(VALUE_DISPLAY.path_array, { filter: [ "image|*.png;*.jpg", "" ] }) - inputs[| 24] = nodeValue("pathLoad", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") .setDisplay(VALUE_DISPLAY.path_load) - inputs[| 25] = nodeValue("pathSave", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") .setDisplay(VALUE_DISPLAY.path_save) - inputs[| 26] = nodeValue("fontScrollBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") .setDisplay(VALUE_DISPLAY.path_font) + inputs[23] = nodeValue("pathArrayBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, []) .setDisplay(VALUE_DISPLAY.path_array, { filter: [ "image|*.png;*.jpg", "" ] }) + inputs[24] = nodeValue("pathLoad", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") .setDisplay(VALUE_DISPLAY.path_load) + inputs[25] = nodeValue("pathSave", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") .setDisplay(VALUE_DISPLAY.path_save) + inputs[26] = nodeValue("fontScrollBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") .setDisplay(VALUE_DISPLAY.path_font) - inputs[| 27] = nodeValue("curveBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11) .setDisplay(VALUE_DISPLAY._default) + inputs[27] = nodeValue("curveBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11) .setDisplay(VALUE_DISPLAY._default) - inputs[| 28] = nodeValue_Text("textArea", self, "") .setDisplay(VALUE_DISPLAY._default) - inputs[| 29] = nodeValue_Text("textBox", self, "") .setDisplay(VALUE_DISPLAY.text_box) - inputs[| 30] = nodeValue_Text("textArea", self, "") .setDisplay(VALUE_DISPLAY.codeLUA) - inputs[| 31] = nodeValue_Text("textArea", self, "") .setDisplay(VALUE_DISPLAY.codeHLSL) - inputs[| 32] = nodeValue_Text("textArrayBox", self, []) .setDisplay(VALUE_DISPLAY.text_array, { data: [ "Choice 1", "Choice 2" ] }) + inputs[28] = nodeValue_Text("textArea", self, "") .setDisplay(VALUE_DISPLAY._default) + inputs[29] = nodeValue_Text("textBox", self, "") .setDisplay(VALUE_DISPLAY.text_box) + inputs[30] = nodeValue_Text("textArea", self, "") .setDisplay(VALUE_DISPLAY.codeLUA) + inputs[31] = nodeValue_Text("textArea", self, "") .setDisplay(VALUE_DISPLAY.codeHLSL) + inputs[32] = nodeValue_Text("textArrayBox", self, []) .setDisplay(VALUE_DISPLAY.text_array, { data: [ "Choice 1", "Choice 2" ] }) - inputs[| 33] = nodeValue_Surface("surfaceBox", self) .setDisplay(VALUE_DISPLAY._default) + inputs[33] = nodeValue_Surface("surfaceBox", self) .setDisplay(VALUE_DISPLAY._default) input_display_list = [ ["Number", false], 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, diff --git a/scripts/node_wrap_area/node_wrap_area.gml b/scripts/node_wrap_area/node_wrap_area.gml index ec9bbe884..d8162cfcb 100644 --- a/scripts/node_wrap_area/node_wrap_area.gml +++ b/scripts/node_wrap_area/node_wrap_area.gml @@ -1,16 +1,16 @@ function Node_Wrap_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Area Warp"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); onSurfaceSize = function() { return surface_get_dimension(getInputData(0)); }; - inputs[| 1] = nodeValue_Area("Area", self, DEF_AREA_REF, { onSurfaceSize, useShape : false }) + inputs[1] = nodeValue_Area("Area", self, DEF_AREA_REF, { onSurfaceSize, useShape : false }) .setUnitRef(onSurfaceSize, VALUE_UNIT.reference); - inputs[| 2] = nodeValue_Bool("Active", self, true); + inputs[2] = nodeValue_Bool("Active", self, true); active_index = 2; - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 2, ["Surfaces", false], 0, @@ -22,7 +22,7 @@ function Node_Wrap_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _hov = false; - var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } diff --git a/scripts/node_wrap_perspective/node_wrap_perspective.gml b/scripts/node_wrap_perspective/node_wrap_perspective.gml index a42df483c..4ec87362a 100644 --- a/scripts/node_wrap_perspective/node_wrap_perspective.gml +++ b/scripts/node_wrap_perspective/node_wrap_perspective.gml @@ -1,36 +1,36 @@ function Node_Warp_Perspective(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Perspective Warp"; - inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue_Bool("Active", self, true); + inputs[1] = nodeValue_Bool("Active", self, true); active_index = 1; - inputs[| 2] = nodeValue_Vector("Top left", self, [ 0, 0 ] ) + inputs[2] = nodeValue_Vector("Top left", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 3] = nodeValue_Vector("Top right", self, [ DEF_SURF_W, 0 ] ) + inputs[3] = nodeValue_Vector("Top right", self, [ DEF_SURF_W, 0 ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 4] = nodeValue_Vector("Bottom left", self, [ 0, DEF_SURF_H ] ) + inputs[4] = nodeValue_Vector("Bottom left", self, [ 0, DEF_SURF_H ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 5] = nodeValue_Vector("Bottom right", self, DEF_SURF ) + inputs[5] = nodeValue_Vector("Bottom right", self, DEF_SURF ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 6] = nodeValue_Vector("Top left", self, [ 0, 0 ] ) + inputs[6] = nodeValue_Vector("Top left", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 7] = nodeValue_Vector("Top right", self, [ DEF_SURF_W, 0 ] ) + inputs[7] = nodeValue_Vector("Top right", self, [ DEF_SURF_W, 0 ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 8] = nodeValue_Vector("Bottom left", self, [ 0, DEF_SURF_H ] ) + inputs[8] = nodeValue_Vector("Bottom left", self, [ 0, DEF_SURF_H ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 9] = nodeValue_Vector("Bottom right", self, DEF_SURF ) + inputs[9] = nodeValue_Vector("Bottom right", self, DEF_SURF ) .setUnitRef(function(index) { return getDimension(index); }); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ 1, ["Surfaces", false], 0, @@ -49,9 +49,9 @@ function Node_Warp_Perspective(_x, _y, _group = noone) : Node_Processor(_x, _y, static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { PROCESSOR_OVERLAY_CHECK - if(array_length(current_data) < ds_list_size(inputs)) return; + if(array_length(current_data) < array_length(inputs)) return; - var _surf = outputs[| 0].getValue(); + var _surf = outputs[0].getValue(); if(is_array(_surf)) { if(array_length(_surf) == 0) return; _surf = _surf[preview_index]; @@ -90,10 +90,10 @@ function Node_Warp_Perspective(_x, _y, _group = noone) : Node_Processor(_x, _y, draw_line(br[0], br[1], tr[0], tr[1]); draw_line(br[0], br[1], bl[0], bl[1]); - if(inputs[| tool * 4 + 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; - if(inputs[| tool * 4 + 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; - if(inputs[| tool * 4 + 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; - if(inputs[| tool * 4 + 5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[tool * 4 + 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[tool * 4 + 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[tool * 4 + 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[tool * 4 + 5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; var dx = 0; var dy = 0; @@ -108,8 +108,8 @@ function Node_Warp_Perspective(_x, _y, _group = noone) : Node_Processor(_x, _y, var _trx = value_snap(drag_s[1][0] + dx, _snx); var _try = value_snap(drag_s[1][1] + dy, _sny); - inputs[| tool * 4 + 2].setValue([ _tlx, _tly ]) - if(inputs[| tool * 4 + 3].setValue([ _trx, _try ])) UNDO_HOLDING = true; + inputs[tool * 4 + 2].setValue([ _tlx, _tly ]) + if(inputs[tool * 4 + 3].setValue([ _trx, _try ])) UNDO_HOLDING = true; } else if(drag_side == tool * 4 + 3) { draw_line_width(tl[0], tl[1], bl[0], bl[1], 3); @@ -119,8 +119,8 @@ function Node_Warp_Perspective(_x, _y, _group = noone) : Node_Processor(_x, _y, var _blx = value_snap(drag_s[1][0] + dx, _snx); var _bly = value_snap(drag_s[1][1] + dy, _sny); - inputs[| tool * 4 + 2].setValue([ _tlx, _tly ]); - if(inputs[| tool * 4 + 4].setValue([ _blx, _bly ])) UNDO_HOLDING = true; + inputs[tool * 4 + 2].setValue([ _tlx, _tly ]); + if(inputs[tool * 4 + 4].setValue([ _blx, _bly ])) UNDO_HOLDING = true; } else if(drag_side == tool * 4 + 4) { draw_line_width(br[0], br[1], tr[0], tr[1], 3); @@ -130,8 +130,8 @@ function Node_Warp_Perspective(_x, _y, _group = noone) : Node_Processor(_x, _y, var _trx = value_snap(drag_s[1][0] + dx, _snx); var _try = value_snap(drag_s[1][1] + dy, _sny); - inputs[| tool * 4 + 5].setValue([ _brx, _bry ]); - if(inputs[| tool * 4 + 3].setValue([ _trx, _try ])) UNDO_HOLDING = true; + inputs[tool * 4 + 5].setValue([ _brx, _bry ]); + if(inputs[tool * 4 + 3].setValue([ _trx, _try ])) UNDO_HOLDING = true; } else if(drag_side == tool * 4 + 5) { draw_line_width(br[0], br[1], bl[0], bl[1], 3); @@ -141,8 +141,8 @@ function Node_Warp_Perspective(_x, _y, _group = noone) : Node_Processor(_x, _y, var _blx = value_snap(drag_s[1][0] + dx, _snx); var _bly = value_snap(drag_s[1][1] + dy, _sny); - inputs[| tool * 4 + 5].setValue([ _brx, _bry ]); - if(inputs[| tool * 4 + 4].setValue([ _blx, _bly ])) UNDO_HOLDING = true; + inputs[tool * 4 + 5].setValue([ _brx, _bry ]); + if(inputs[tool * 4 + 4].setValue([ _blx, _bly ])) UNDO_HOLDING = true; } else if(active) { draw_set_color(COLORS._main_accent); if(distance_to_line_infinite(_mx, _my, tl[0], tl[1], tr[0], tr[1]) < 12) { @@ -180,10 +180,10 @@ function Node_Warp_Perspective(_x, _y, _group = noone) : Node_Processor(_x, _y, } } - inputs[| tool * 4 + 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| tool * 4 + 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| tool * 4 + 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| tool * 4 + 5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[tool * 4 + 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[tool * 4 + 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[tool * 4 + 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[tool * 4 + 5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_xml_file_read/node_xml_file_read.gml b/scripts/node_xml_file_read/node_xml_file_read.gml index 3ff5e8e5c..5c04da04a 100644 --- a/scripts/node_xml_file_read/node_xml_file_read.gml +++ b/scripts/node_xml_file_read/node_xml_file_read.gml @@ -7,7 +7,7 @@ function Node_create_XML_File_Read(_x, _y, _group = noone) { } var node = new Node_XML_File_Read(_x, _y, _group).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); node.doUpdate(); return node; @@ -17,7 +17,7 @@ function Node_create_XML_File_Read_path(_x, _y, path) { if(!file_exists_empty(path)) return noone; var node = new Node_XML_File_Read(_x, _y, PANEL_GRAPH.getCurrentContext()).skipDefault(); - node.inputs[| 0].setValue(path); + node.inputs[0].setValue(path); node.doUpdate(); return node; @@ -29,13 +29,13 @@ function Node_XML_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const w = 128; - inputs[| 0] = nodeValue_Text("Path", self, "") + inputs[0] = nodeValue_Text("Path", self, "") .setDisplay(VALUE_DISPLAY.path_load, { filter: "XML file|*.xml" }) .rejectArray(); - outputs[| 0] = nodeValue_Output("Content", self, VALUE_TYPE.struct, {}); + outputs[0] = nodeValue_Output("Content", self, VALUE_TYPE.struct, {}); - outputs[| 1] = nodeValue_Output("Path", self, VALUE_TYPE.path, "") + outputs[1] = nodeValue_Output("Path", self, VALUE_TYPE.path, "") .setVisible(true, true); content = {}; @@ -64,7 +64,7 @@ function Node_XML_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const if(ext != ".xml") return false; - outputs[| 1].setValue(path); + outputs[1].setValue(path); var _content = file_text_read_all_lines(path); content = SnapFromXML(_content); @@ -100,7 +100,7 @@ function Node_XML_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const var path = getInputData(0); if(path_current != path) updatePaths(path); - outputs[| 0].setValue(content); + outputs[0].setValue(content); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { @@ -116,6 +116,6 @@ function Node_XML_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const if(is_array(path)) path = array_safe_get(path, 0); if(!file_exists_empty(path)) return; - inputs[| 0].setValue(path); + inputs[0].setValue(path); } } \ No newline at end of file diff --git a/scripts/node_xml_file_write/node_xml_file_write.gml b/scripts/node_xml_file_write/node_xml_file_write.gml index 2936eaefa..f7652991b 100644 --- a/scripts/node_xml_file_write/node_xml_file_write.gml +++ b/scripts/node_xml_file_write/node_xml_file_write.gml @@ -4,11 +4,11 @@ function Node_XML_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) cons w = 128; - inputs[| 0] = nodeValue_Text("Path", self, "") + inputs[0] = nodeValue_Text("Path", self, "") .setDisplay(VALUE_DISPLAY.path_save, { filter: "xml file|*.xml" }) .rejectArray(); - inputs[| 1] = nodeValue_Struct("Struct", self, {}) + inputs[1] = nodeValue_Struct("Struct", self, {}) .setVisible(true, true); input_display_list = [ 0, 1 ] diff --git a/scripts/node_zigzag/node_zigzag.gml b/scripts/node_zigzag/node_zigzag.gml index 9390e8370..a775da54e 100644 --- a/scripts/node_zigzag/node_zigzag.gml +++ b/scripts/node_zigzag/node_zigzag.gml @@ -1,33 +1,33 @@ function Node_Zigzag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Zigzag"; - inputs[| 0] = nodeValue_Dimension(self); + inputs[0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue_Int("Amount", self, 1) + inputs[1] = nodeValue_Int("Amount", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }) .setMappable(6); - inputs[| 2] = nodeValue_Vector("Position", self, [0, 0] ) + inputs[2] = nodeValue_Vector("Position", self, [0, 0] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 3] = nodeValue_Color("Color 1", self, c_white); + inputs[3] = nodeValue_Color("Color 1", self, c_white); - inputs[| 4] = nodeValue_Color("Color 2", self, c_black); + inputs[4] = nodeValue_Color("Color 2", self, c_black); - inputs[| 5] = nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ]); + inputs[5] = nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ]); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 6] = nodeValueMap("Amount map", self); + inputs[6] = nodeValueMap("Amount map", self); - inputs[| 7] = nodeValueMap("Angle map", self); + inputs[7] = nodeValueMap("Angle map", self); ////////////////////////////////////////////////////////////////////////////////// - inputs[| 8] = nodeValue_Rotation("Angle", self, 0) + inputs[8] = nodeValue_Rotation("Angle", self, 0) .setMappable(7); - outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); + outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); input_display_list = [ ["Output", false], 0, @@ -45,15 +45,15 @@ function Node_Zigzag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co var py = _y + pos[1] * _s; var _hov = false; - var hv = inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; - var hv = inputs[| 8].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; + var hv = inputs[8].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); _hov |= hv; return _hov; } static step = function() { #region - inputs[| 1].mappableStep(); - inputs[| 8].mappableStep(); + inputs[1].mappableStep(); + inputs[8].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -69,8 +69,8 @@ function Node_Zigzag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co surface_set_shader(_outSurf, sh_zigzag); shader_set_f("dimension", _dim); shader_set_f("position", _pos[0] / _dim[0], _pos[1] / _dim[1]); - shader_set_f_map("amount", _data[1], _data[6], inputs[| 1]); - shader_set_f_map("angle", _data[8], _data[7], inputs[| 8]); + shader_set_f_map("amount", _data[1], _data[6], inputs[1]); + shader_set_f_map("angle", _data[8], _data[7], inputs[8]); shader_set_i("blend", _bnd); shader_set_color("col1", _col1); shader_set_color("col2", _col2); diff --git a/scripts/panel_action_create/panel_action_create.gml b/scripts/panel_action_create/panel_action_create.gml index a20df4d8b..dbe2f5bfe 100644 --- a/scripts/panel_action_create/panel_action_create.gml +++ b/scripts/panel_action_create/panel_action_create.gml @@ -115,8 +115,8 @@ function Panel_Action_Create() : PanelContent() constructor { if(_r.expanded) { var _val = _nd.setValues; - for(var j = 0; j < ds_list_size(_n.inputs); j++) { - var _in = _n.inputs[| j]; + for(var j = 0; j < array_length(_n.inputs); j++) { + var _in = _n.inputs[j]; if(!value_type_direct_settable(_in.type)) continue; var _vali = _val[$ j]; @@ -214,8 +214,8 @@ function Panel_Action_Create() : PanelContent() constructor { var _idT = i; var _vals = {}; - for(var j = 0; j < ds_list_size(_n.inputs); j++) { - var _in = _n.inputs[| j]; + for(var j = 0; j < array_length(_n.inputs); j++) { + var _in = _n.inputs[j]; _vals[$ j] = {}; if(_in.value_from == noone || !struct_has(_nmap, _in.value_from.node.node_id)) { diff --git a/scripts/panel_animation/panel_animation.gml b/scripts/panel_animation/panel_animation.gml index d4f8a4a2f..8140878bb 100644 --- a/scripts/panel_animation/panel_animation.gml +++ b/scripts/panel_animation/panel_animation.gml @@ -586,8 +586,8 @@ function Panel_Animation() : PanelContent() constructor { var _anim = []; var _prop = []; - for( var j = 0, m = ds_list_size(_node.inputs); j < m; j++ ) { - var prop = _node.inputs[| j]; + for( var j = 0, m = array_length(_node.inputs); j < m; j++ ) { + var prop = _node.inputs[j]; if(!prop.isTimelineVisible()) continue; var anim = prop.sep_axis? prop.animators : [ prop.animator ]; @@ -2331,8 +2331,8 @@ function Panel_Animation() : PanelContent() constructor { var _node = PROJECT.allNodes[m]; if(!_node || !_node.active) continue; - for(var i = 0; i < ds_list_size(_node.inputs); i++) { - var in = _node.inputs[| i]; + for(var i = 0; i < array_length(_node.inputs); i++) { + var in = _node.inputs[i]; if(!in.is_anim) continue; for(var j = 0; j < ds_list_size(in.animator.values); j++) { @@ -2624,9 +2624,9 @@ function Panel_Animation() : PanelContent() constructor { var propFrom = copy_clipboard[| i].anim.prop; var propTo = noone; - for( var j = 0; j < ds_list_size(nodeTo.inputs); j++ ) { - if(nodeTo.inputs[| j].name == propFrom.name) { - propTo = nodeTo.inputs[| j].animator; + for( var j = 0; j < array_length(nodeTo.inputs); j++ ) { + if(nodeTo.inputs[j].name == propFrom.name) { + propTo = nodeTo.inputs[j].animator; copy_clipboard[| i].cloneAnimator(shf, propTo); break; } diff --git a/scripts/panel_animation_scaler/panel_animation_scaler.gml b/scripts/panel_animation_scaler/panel_animation_scaler.gml index 91745307c..e57635433 100644 --- a/scripts/panel_animation_scaler/panel_animation_scaler.gml +++ b/scripts/panel_animation_scaler/panel_animation_scaler.gml @@ -28,8 +28,8 @@ function Panel_Animation_Scaler() : Panel_Linear_Setting() constructor { if(!_node || !_node.active) continue; - for(var i = 0; i < ds_list_size(_node.inputs); i++) { - var in = _node.inputs[| i]; + for(var i = 0; i < array_length(_node.inputs); i++) { + var in = _node.inputs[i]; if(!in.is_anim) continue; for(var j = 0; j < ds_list_size(in.animator.values); j++) { var t = in.animator.values[| j]; diff --git a/scripts/panel_array_sequence/panel_array_sequence.gml b/scripts/panel_array_sequence/panel_array_sequence.gml index a0484deb8..3b5835152 100644 --- a/scripts/panel_array_sequence/panel_array_sequence.gml +++ b/scripts/panel_array_sequence/panel_array_sequence.gml @@ -135,7 +135,7 @@ function Panel_Array_Sequence(node) : PanelContent() constructor { if(pHOVER && !_def && point_in_rectangle(msx, msy, _sx, _sy, _sx + _ns, _sy + _ns)) { if(mouse_press(mb_left, pFOCUS)) { _ord[i] = noone; - node.inputs[| 2].setValue(_ord); + node.inputs[2].setValue(_ord); content_drag = _i; } } @@ -157,7 +157,7 @@ function Panel_Array_Sequence(node) : PanelContent() constructor { if(mouse_release(mb_left, pFOCUS)) { _ord = array_safe_set(_ord, frm, content_drag, noone); - node.inputs[| 2].setValue(_ord); + node.inputs[2].setValue(_ord); content_drag = noone; } } @@ -176,7 +176,7 @@ function Panel_Array_Sequence(node) : PanelContent() constructor { if(len_stretching) { var frm = round((msx - sequence_x - _ns / 2) / _ns); _ord = array_resize_fill(_ord, frm, noone); - node.inputs[| 2].setValue(_ord); + node.inputs[2].setValue(_ord); if(mouse_release(mb_left)) len_stretching = false; diff --git a/scripts/panel_graph/panel_graph.gml b/scripts/panel_graph/panel_graph.gml index 1c4001756..567d1c423 100644 --- a/scripts/panel_graph/panel_graph.gml +++ b/scripts/panel_graph/panel_graph.gml @@ -508,20 +508,20 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { var _outp = -1; var _path = -1; - for( var i = 0; i < ds_list_size(_node.outputs); i++ ) { - if(_node.outputs[| i].type == VALUE_TYPE.path) - _path = _node.outputs[| i]; - if(_node.outputs[| i].type == VALUE_TYPE.surface && _outp == -1) - _outp = _node.outputs[| i]; + for( var i = 0; i < array_length(_node.outputs); i++ ) { + if(_node.outputs[i].type == VALUE_TYPE.path) + _path = _node.outputs[i]; + if(_node.outputs[i].type == VALUE_TYPE.surface && _outp == -1) + _outp = _node.outputs[i]; } if(_outp == -1) return; var _export = nodeBuild("Node_Export", _node.x + _node.w + 64, _node.y); if(_path != -1) - _export.inputs[| 1].setFrom(_path); + _export.inputs[1].setFrom(_path); - _export.inputs[| 0].setFrom(_outp); + _export.inputs[0].setFrom(_outp); } function setTriggerPreview() { @@ -556,10 +556,10 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { var _outp = -1; var surf = -1; - for( var i = 0; i < ds_list_size(_node.outputs); i++ ) { - if(_node.outputs[| i].type != VALUE_TYPE.surface) continue; + for( var i = 0; i < array_length(_node.outputs); i++ ) { + if(_node.outputs[i].type != VALUE_TYPE.surface) continue; - _outp = _node.outputs[| i]; + _outp = _node.outputs[i]; surf = _outp.getValue(); break; } @@ -570,7 +570,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { var _canvas = nodeBuild("Node_Canvas", _node.x + _node.w + 64, _node.y).skipDefault(); var _dim = surface_get_dimension(surf[0]); - _canvas.inputs[| 0].setValue(_dim); + _canvas.inputs[0].setValue(_dim); _canvas.attributes.dimension = _dim; _canvas.attributes.frames = array_length(surf); _canvas.canvas_surface = surface_array_clone(surf); @@ -584,10 +584,10 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { var _outp = -1; var surf = -1; - for( var i = 0; i < ds_list_size(_node.outputs); i++ ) { - if(_node.outputs[| i].type == VALUE_TYPE.surface) { - _outp = _node.outputs[| i]; - var _val = _node.outputs[| i].getValue(); + for( var i = 0; i < array_length(_node.outputs); i++ ) { + if(_node.outputs[i].type == VALUE_TYPE.surface) { + _outp = _node.outputs[i]; + var _val = _node.outputs[i].getValue(); if(is_array(_val)) surf = _val[_node.preview_index]; else @@ -600,12 +600,12 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { var _canvas = nodeBuild("Node_Canvas", _node.x, _node.y + _node.h + 64).skipDefault(); - _canvas.inputs[| 0].setValue([surface_get_width_safe(surf), surface_get_height_safe(surf)]); - _canvas.inputs[| 5].setValue(true); + _canvas.inputs[0].setValue([surface_get_width_safe(surf), surface_get_height_safe(surf)]); + _canvas.inputs[5].setValue(true); var _blend = nodeBuild("Node_Blend", _node.x + _node.w + 64, _node.y).skipDefault(); - _blend.inputs[| 0].setFrom(_outp); - _blend.inputs[| 1].setFrom(_canvas.outputs[| 0]); + _blend.inputs[0].setFrom(_outp); + _blend.inputs[1].setFrom(_canvas.outputs[0]); } function getFocusingNode() { return array_empty(nodes_selecting)? noone : nodes_selecting[0]; } @@ -722,8 +722,8 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { for(var i = 0; i < array_length(nodes_selecting); i++) { var _node = nodes_selecting[i]; - for( var j = 0, m = ds_list_size(_node.inputs); j < m; j++ ) { - var _input = _node.inputs[| j]; + for( var j = 0, m = array_length(_node.inputs); j < m; j++ ) { + var _input = _node.inputs[j]; if(_input.value_from == noone) continue; _input.setColor(color); } @@ -1646,8 +1646,8 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { var _my = round(mouse_graph_y / project.graphGrid.size) * project.graphGrid.size; var _pin = nodeBuild("Node_Pin", _mx, _my).skipDefault(); - _pin.inputs[| 0].setFrom(junction_hovering.value_from); - junction_hovering.setFrom(_pin.outputs[| 0]); + _pin.inputs[0].setFrom(junction_hovering.value_from); + junction_hovering.setFrom(_pin.outputs[0]); } } @@ -1771,8 +1771,8 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { var _indx = target.index; for( var i = 0, n = array_length(value_draggings); i < n; i++ ) { - _node.inputs[| _indx].setFrom(value_draggings[i]); - if(++_indx > ds_list_size(_node.inputs)) break; + _node.inputs[_indx].setFrom(value_draggings[i]); + if(++_indx > array_length(_node.inputs)) break; } } @@ -1968,8 +1968,8 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { if(_node == value_focus.node) { ds_priority_add(_jlist, value_focus, value_focus.y); } else { - for( var j = 0, m = ds_list_size(_node.outputs); j < m; j++ ) { - var _junction = _node.outputs[| j]; + for( var j = 0, m = array_length(_node.outputs); j < m; j++ ) { + var _junction = _node.outputs[j]; if(!_junction.visible) continue; if(value_bit(_junction.type) & value_bit(value_dragging.type) == 0) continue; @@ -2541,17 +2541,17 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { if(node.input_display_list != -1) { for (var i = 0, n = array_length(node.input_display_list); i < n; i++) { if(!is_real(node.input_display_list[i])) continue; - if(node.inputs[| node.input_display_list[i]].setFrom(value_dragging)) break; + if(node.inputs[node.input_display_list[i]].setFrom(value_dragging)) break; } } else { - for (var i = 0, n = ds_list_size(node.inputs); i < n; i++) - if(node.inputs[| i].setFrom(value_dragging)) break; + for (var i = 0, n = array_length(node.inputs); i < n; i++) + if(node.inputs[i].setFrom(value_dragging)) break; } } else if(value_dragging.connect_type == JUNCTION_CONNECT.input) { - for (var i = 0, n = ds_list_size(node.outputs); i < n; i++) - if(value_dragging.setFrom(node.outputs[| i])) break; + for (var i = 0, n = array_length(node.outputs); i < n; i++) + if(value_dragging.setFrom(node.outputs[i])) break; } @@ -2561,12 +2561,12 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { function doTransform() { for( var i = 0; i < array_length(nodes_selecting); i++ ) { var node = nodes_selecting[i]; - if(ds_list_empty(node.outputs)) continue; + if(array_empty(node.outputs)) continue; - var _o = node.outputs[| 0]; + var _o = node.outputs[0]; if(_o.type == VALUE_TYPE.surface || _o.type == VALUE_TYPE.dynaSurface) { var tr = nodeBuild("Node_Transform", node.x + node.w + 64, node.y).skipDefault(); - tr.inputs[| 0].setFrom(_o); + tr.inputs[0].setFrom(_o); } } } @@ -2735,7 +2735,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { var args = [node, path]; global.FILE_LOAD_ASYNC[? img] = [ function(args) { - args[0].inputs[| 0].setValue(args[1]); + args[0].inputs[0].setValue(args[1]); args[0].doUpdate(); }, args]; } @@ -2750,18 +2750,18 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { var cx = max(_n0.x, _n1.x) + 160; var cy = round((_n0.y + _n1.y) / 2 / 32) * 32; - var _j0 = _n0.outputs[| 0]; - var _j1 = _n1.outputs[| 0]; + var _j0 = _n0.outputs[0]; + var _j1 = _n1.outputs[0]; if(_j0.type == VALUE_TYPE.surface && _j1.type == VALUE_TYPE.surface) { var _blend = nodeBuild("Node_Blend", cx, cy, getCurrentContext()).skipDefault().skipDefault(); - _blend.inputs[| 0].setFrom(_j0); - _blend.inputs[| 1].setFrom(_j1); + _blend.inputs[0].setFrom(_j0); + _blend.inputs[1].setFrom(_j1); } else if((_j0.type == VALUE_TYPE.integer || _j0.type == VALUE_TYPE.float) && (_j1.type == VALUE_TYPE.integer || _j1.type == VALUE_TYPE.float)) { var _blend = nodeBuild("Node_Math", cx, cy, getCurrentContext()).skipDefault().skipDefault(); - _blend.inputs[| 1].setFrom(_j0); - _blend.inputs[| 2].setFrom(_j1); + _blend.inputs[1].setFrom(_j0); + _blend.inputs[2].setFrom(_j1); } @@ -2779,9 +2779,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { for(var i = 0; i < amo; i++) { var _node = nodes_selecting[i]; - if(ds_list_size(_node.outputs) == 0) continue; + if(array_length(_node.outputs) == 0) continue; - if(_node.outputs[| 0].type != VALUE_TYPE.surface) continue; + if(_node.outputs[0].type != VALUE_TYPE.surface) continue; cx = max(cx, _node.x); cy += _node.y; @@ -2797,7 +2797,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { repeat(len) { var _node = ds_priority_delete_min(pr); - _compose.addInput(_node.outputs[| 0]); + _compose.addInput(_node.outputs[0]); } nodes_selecting = []; @@ -2815,7 +2815,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { for(var i = 0; i < amo; i++) { var _node = nodes_selecting[i]; - if(ds_list_size(_node.outputs) == 0) continue; + if(array_length(_node.outputs) == 0) continue; cx = max(cx, _node.x); cy += _node.y; @@ -2831,7 +2831,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { repeat(len) { var _node = ds_priority_delete_min(pr); - _array.addInput(_node.outputs[| 0]); + _array.addInput(_node.outputs[0]); } nodes_selecting = []; @@ -2868,7 +2868,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { y1 += 64; var f = nodeBuild("Node_Frame", x0, y0, getCurrentContext()).skipDefault(); - f.inputs[| 0].setValue([x1 - x0, y1 - y0]); + f.inputs[0].setValue([x1 - x0, y1 - y0]); } function doDelete(_merge = false) { // @@ -2896,13 +2896,13 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { if(instanceof(node_prop_clipboard) != instanceof(node_hover)) return; var _vals = []; - for( var i = 0, n = ds_list_size(node_prop_clipboard.inputs); i < n; i++ ) { - var _inp = node_prop_clipboard.inputs[| i]; + for( var i = 0, n = array_length(node_prop_clipboard.inputs); i < n; i++ ) { + var _inp = node_prop_clipboard.inputs[i]; _vals[i] = _inp.serialize(); } - for( var i = 0, n = ds_list_size(node_hover.inputs); i < n; i++ ) { - var _inp = node_hover.inputs[| i]; + for( var i = 0, n = array_length(node_hover.inputs); i < n; i++ ) { + var _inp = node_hover.inputs[i]; if(_inp.value_from != noone) continue; _inp.applyDeserialize(_vals[i]); @@ -2924,17 +2924,17 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { switch(DRAGGING.type) { case "Color": node = nodeBuild("Node_Color", mouse_grid_x, mouse_grid_y).skipDefault(); - node.inputs[| 0].setValue(DRAGGING.data); + node.inputs[0].setValue(DRAGGING.data); break; case "Palette": node = nodeBuild("Node_Palette", mouse_grid_x, mouse_grid_y).skipDefault(); - node.inputs[| 0].setValue(DRAGGING.data); + node.inputs[0].setValue(DRAGGING.data); break; case "Gradient": node = nodeBuild("Node_Gradient_Out", mouse_grid_x, mouse_grid_y).skipDefault(); - node.inputs[| 0].setValue(DRAGGING.data); + node.inputs[0].setValue(DRAGGING.data); break; case "Number": @@ -2946,21 +2946,21 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { } for( var i = 0, n = array_length(DRAGGING.data); i < n; i++ ) - node.inputs[| i].setValue(DRAGGING.data[i]); + node.inputs[i].setValue(DRAGGING.data[i]); } else { node = nodeBuild("Node_Number", mouse_grid_x, mouse_grid_y).skipDefault(); - node.inputs[| 0].setValue(DRAGGING.data); + node.inputs[0].setValue(DRAGGING.data); } break; case "Bool": node = nodeBuild("Node_Boolean", mouse_grid_x, mouse_grid_y).skipDefault(); - node.inputs[| 0].setValue(DRAGGING.data); + node.inputs[0].setValue(DRAGGING.data); break; case "Text": node = nodeBuild("Node_String", mouse_grid_x, mouse_grid_y).skipDefault(); - node.inputs[| 0].setValue(DRAGGING.data); + node.inputs[0].setValue(DRAGGING.data); break; case "Path": @@ -3012,8 +3012,8 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { } if(!key_mod_press(SHIFT) && node && struct_has(DRAGGING, "from") && DRAGGING.from.value_from == noone) { - for( var i = 0; i < ds_list_size(node.outputs); i++ ) - if(DRAGGING.from.setFrom(node.outputs[| i])) break; + for( var i = 0; i < array_length(node.outputs); i++ ) + if(DRAGGING.from.setFrom(node.outputs[i])) break; } } @@ -3068,16 +3068,16 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { for (var i = 0, n = array_length(_list); i < n; i++) { var _node = _list[i]; - for(var j = 0; j < ds_list_size(_node.inputs); j++) { - var _jun = _node.inputs[| j]; + for(var j = 0; j < array_length(_node.inputs); j++) { + var _jun = _node.inputs[j]; if(!_jun.isVisible()) continue; if(_jun.value_from == noone) _jun.visible_manual = -1; } - for(var j = 0; j < ds_list_size(_node.outputs); j++) { - var _jun = _node.outputs[| j]; + for(var j = 0; j < array_length(_node.outputs); j++) { + var _jun = _node.outputs[j]; if(!_jun.isVisible()) continue; if(array_empty(_jun.getJunctionTo())) @@ -3100,11 +3100,11 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { var _ti = nodeBuild("Node_Tunnel_In", _jo.rx + 32, _jo.ry).skipDefault(); var _to = nodeBuild("Node_Tunnel_Out", _ji.rx - 32, _ji.ry).skipDefault(); - _to.inputs[| 0].setValue(_key); - _ti.inputs[| 0].setValue(_key); + _to.inputs[0].setValue(_key); + _ti.inputs[0].setValue(_key); - _ti.inputs[| 1].setFrom(_jo); - _ji.setFrom(_to.outputs[| 0]); + _ti.inputs[1].setFrom(_jo); + _ji.setFrom(_to.outputs[0]); } function createAction() { @@ -3240,7 +3240,7 @@ function load_file_path(path, _x = undefined, _y = undefined) { case "gpl" : case "pal" : node = new Node_Palette(_x, _y, PANEL_GRAPH.getCurrentContext()).skipDefault(); - node.inputs[| 0].setValue(loadPalette(p)); + node.inputs[0].setValue(loadPalette(p)); break; } diff --git a/scripts/panel_inspector/panel_inspector.gml b/scripts/panel_inspector/panel_inspector.gml index f8e539109..031e7b234 100644 --- a/scripts/panel_inspector/panel_inspector.gml +++ b/scripts/panel_inspector/panel_inspector.gml @@ -527,8 +527,8 @@ function Panel_Inspector() : PanelContent() constructor { _inspecting.inspecting = true; prop_hover = noone; var jun = noone; - var amoIn = is_array(_inspecting.input_display_list)? array_length(_inspecting.input_display_list) : ds_list_size(_inspecting.inputs); - var amoOut = is_array(_inspecting.output_display_list)? array_length(_inspecting.output_display_list) : ds_list_size(_inspecting.outputs); + var amoIn = is_array(_inspecting.input_display_list)? array_length(_inspecting.input_display_list) : array_length(_inspecting.inputs); + var amoOut = is_array(_inspecting.output_display_list)? array_length(_inspecting.output_display_list) : array_length(_inspecting.outputs); var amo = inspectGroup == 0? amoIn + 1 + amoOut : amoIn; var hh = 0; @@ -637,8 +637,8 @@ function Panel_Inspector() : PanelContent() constructor { var yy = hh + _y; if(i < amoIn) { // inputs - if(!is_array(_inspecting.input_display_list)) jun = _inspecting.inputs[| i]; - else if(is_real(_inspecting.input_display_list[i])) jun = _inspecting.inputs[| _inspecting.input_display_list[i]]; + if(!is_array(_inspecting.input_display_list)) jun = _inspecting.inputs[i]; + else if(is_real(_inspecting.input_display_list[i])) jun = _inspecting.inputs[_inspecting.input_display_list[i]]; else jun = _inspecting.input_display_list[i]; } else if(i == amoIn) { // output label @@ -652,8 +652,8 @@ function Panel_Inspector() : PanelContent() constructor { } else { // outputs var _oi = i - amoIn - 1; - if(!is_array(_inspecting.output_display_list)) jun = _inspecting.outputs[| _oi]; - else if(is_real(_inspecting.output_display_list[_oi])) jun = _inspecting.outputs[| _inspecting.output_display_list[_oi]]; + if(!is_array(_inspecting.output_display_list)) jun = _inspecting.outputs[_oi]; + else if(is_real(_inspecting.output_display_list[_oi])) jun = _inspecting.outputs[_inspecting.output_display_list[_oi]]; else jun = _inspecting.output_display_list[_oi]; } @@ -736,7 +736,7 @@ function Panel_Inspector() : PanelContent() constructor { draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, 0, yy, ui(32), lbh, COLORS.panel_inspector_group_hover, 1); if(mouse_press(mb_left, pFOCUS)) - _inspecting.inputs[| togl].setValue(!toging); + _inspecting.inputs[togl].setValue(!toging); } else draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, 0, yy, ui(32), lbh, COLORS.panel_inspector_group_bg, 1); diff --git a/scripts/panel_node_data_gen/panel_node_data_gen.gml b/scripts/panel_node_data_gen/panel_node_data_gen.gml index c8fe2ea16..8a86fa56b 100644 --- a/scripts/panel_node_data_gen/panel_node_data_gen.gml +++ b/scripts/panel_node_data_gen/panel_node_data_gen.gml @@ -81,9 +81,9 @@ function Panel_Node_Data_Gen() : PanelContent() constructor { var _lin = [], _lot = []; var _din = [], _dot = []; - for( var i = 0; i < ds_list_size(_b.inputs); i++ ) { - _din[i] = __node_data_clone(_b.inputs[| i]); - var _in = _b.inputs[| i]; + for( var i = 0; i < array_length(_b.inputs); i++ ) { + _din[i] = __node_data_clone(_b.inputs[i]); + var _in = _b.inputs[i]; if(!is_instanceof(_in, NodeValue)) continue; _jin[i] = { @@ -104,9 +104,9 @@ function Panel_Node_Data_Gen() : PanelContent() constructor { } } - for( var i = 0; i < ds_list_size(_b.outputs); i++ ) { - _dot[i] = __node_data_clone(_b.outputs[| i]); - var _ot = _b.outputs[| i]; + for( var i = 0; i < array_length(_b.outputs); i++ ) { + _dot[i] = __node_data_clone(_b.outputs[i]); + var _ot = _b.outputs[i]; if(!is_instanceof(_ot, NodeValue)) continue; _jot[i] = { diff --git a/scripts/panel_preview/panel_preview.gml b/scripts/panel_preview/panel_preview.gml index c3403550c..50c407cfd 100644 --- a/scripts/panel_preview/panel_preview.gml +++ b/scripts/panel_preview/panel_preview.gml @@ -682,12 +682,12 @@ function Panel_Preview() : PanelContent() constructor { } function drawNodeChannel(_node, _x, _y) { - if(ds_list_size(_node.outputs) < 2) return 0; + if(array_length(_node.outputs) < 2) return 0; var chName = []; sbChannelIndex = []; - var currName = _node.outputs[| _node.preview_channel].name; + var currName = _node.outputs[_node.preview_channel].name; draw_set_text(sbChannel.font, fa_center, fa_center); var ww = 0; var hh = TEXTBOX_HEIGHT - ui(2); @@ -695,7 +695,7 @@ function Panel_Preview() : PanelContent() constructor { for( var i = 0; i < _am; i++ ) { var _outi = _node.getOutputJunctionIndex(i); - var _outj = _node.outputs[| _outi]; + var _outj = _node.outputs[_outi]; array_push(chName, _outj.name); array_push(sbChannelIndex, _outj); diff --git a/scripts/panel_preview_window/panel_preview_window.gml b/scripts/panel_preview_window/panel_preview_window.gml index 9b36bbaa2..9cff63c3c 100644 --- a/scripts/panel_preview_window/panel_preview_window.gml +++ b/scripts/panel_preview_window/panel_preview_window.gml @@ -35,8 +35,8 @@ function Panel_Preview_Window() : PanelContent() constructor { function changeChannel(index) { var channel = index - array_length(menu); - for( var i = 0; i < ds_list_size(node_target.outputs); i++ ) { - var o = node_target.outputs[| i]; + for( var i = 0; i < array_length(node_target.outputs); i++ ) { + var o = node_target.outputs[i]; if(o.type != VALUE_TYPE.surface) continue; if(channel-- == 0) { preview_channel = i; @@ -147,8 +147,8 @@ function Panel_Preview_Window() : PanelContent() constructor { if(mouse_click(mb_right, pFOCUS)) { var _menu = array_clone(menu); - for( var i = 0; i < ds_list_size(node_target.outputs); i++ ) { - var o = node_target.outputs[| i]; + for( var i = 0; i < array_length(node_target.outputs); i++ ) { + var o = node_target.outputs[i]; if(o.type != VALUE_TYPE.surface) continue; array_push(_menu, menuItem(o.name, function(_dat) { changeChannel(_dat.index); })); diff --git a/scripts/panel_tunnels/panel_tunnels.gml b/scripts/panel_tunnels/panel_tunnels.gml index 184568351..f2fd679c4 100644 --- a/scripts/panel_tunnels/panel_tunnels.gml +++ b/scripts/panel_tunnels/panel_tunnels.gml @@ -45,7 +45,7 @@ function Panel_Tunnels() : PanelContent() constructor { search_res = []; for( var i = 0, n = array_length(tunnel_ins); i < n; i++ ) { var node = tunnel_ins[i]; - var key = node.inputs[| 0].getValue(0); + var key = node.inputs[0].getValue(0); if(string_pos(search_string, key) == 0) continue; array_push(search_res, node); @@ -80,7 +80,7 @@ function Panel_Tunnels() : PanelContent() constructor { draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, 0, _y, ww, hg, COLORS._main_icon_light, 1); draw_sprite_stretched_add(THEME.ui_panel, 1, 0, _y, ww, hg, c_white, .3); - var key = node.inputs[| 0].getValue(0); + var key = node.inputs[0].getValue(0); var bw = ui(28); var bh = ui(28); var bx = ww - ui(4) - bw; @@ -92,7 +92,7 @@ function Panel_Tunnels() : PanelContent() constructor { if(buttonInstant(THEME.button_hide, bx, by, bw, bh, _m, sc_tunnel.active, sc_tunnel.hover, __txtx("panel_tunnel_create_tunnel", "Create tunnel out"), THEME.tunnel) == 2) { var _node = nodeBuild("Node_Tunnel_Out", build_x, build_y); - _node.inputs[| 0].setValue(key); + _node.inputs[0].setValue(key); if(in_dialog) instance_destroy(); } diff --git a/scripts/preview_overlay_gradient_range/preview_overlay_gradient_range.gml b/scripts/preview_overlay_gradient_range/preview_overlay_gradient_range.gml index 3afd8cd5b..ecd5a5da3 100644 --- a/scripts/preview_overlay_gradient_range/preview_overlay_gradient_range.gml +++ b/scripts/preview_overlay_gradient_range/preview_overlay_gradient_range.gml @@ -1,6 +1,6 @@ function preview_overlay_gradient_range(interact, active, _x, _y, _s, _mx, _my, _snx, _sny, _dim) { var _val = array_clone(getValue()); - var _targI = node.inputs[| mappedJunc.attributes.map_index]; + var _targI = node.inputs[mappedJunc.attributes.map_index]; var _surf = _targI.getValue(); var hover = -1; diff --git a/scripts/render_data/render_data.gml b/scripts/render_data/render_data.gml index 6b9c65d28..f88fe5af2 100644 --- a/scripts/render_data/render_data.gml +++ b/scripts/render_data/render_data.gml @@ -24,8 +24,8 @@ function ResetAllNodesRender() { #region if(!is_instanceof(_node, Node)) return; _node.setRenderStatus(false); - for( var i = 0, n = ds_list_size(_node.inputs); i < n; i++ ) - _node.inputs[| i].resetCache(); + for( var i = 0, n = array_length(_node.inputs); i < n; i++ ) + _node.inputs[i].resetCache(); return; }); @@ -107,8 +107,8 @@ function __topoSort(_arr, _nodeArr) { #region _isRoot = false; } else { - for( var j = 0, m = ds_list_size(_node.outputs); j < m; j++ ) { - var _to = _node.outputs[| j].getJunctionTo(); + for( var j = 0, m = array_length(_node.outputs); j < m; j++ ) { + var _to = _node.outputs[j].getJunctionTo(); if(_global) _isRoot &= array_empty(_to); else _isRoot &= !array_any(_to, function(_val) { return array_exists(__temp_nodeList, _val.node); } ); @@ -186,6 +186,7 @@ function Render(partial = false, runAction = false) { #region var rendering = noone; var error = 0; var reset_all = !partial; + var renderable; if(reset_all) { LOG_IF(global.FLAG.render == 1, $"xxxxxxxxxx Resetting {array_length(PROJECT.nodeTopo)} nodes xxxxxxxxxx"); @@ -225,8 +226,8 @@ function Render(partial = false, runAction = false) { #region LOG_BLOCK_START(); LOG_IF(global.FLAG.render == 1, $"➤➤➤➤➤➤ CURRENT RENDER QUEUE {RENDER_QUEUE} [{RENDER_QUEUE.size()}] "); - rendering = RENDER_QUEUE.dequeue(); - var renderable = rendering.isRenderable(); + rendering = RENDER_QUEUE.dequeue(); + renderable = rendering.isRenderable(); LOG_IF(global.FLAG.render == 1, $"Rendering {rendering.internalName} ({rendering.display_name}) : {renderable? "Update" : "Pass"} ({rendering.rendered})"); diff --git a/scripts/testing_script/testing_script.gml b/scripts/testing_script/testing_script.gml index d334e0702..f1f3277c9 100644 --- a/scripts/testing_script/testing_script.gml +++ b/scripts/testing_script/testing_script.gml @@ -5,7 +5,7 @@ function __test_update_current_collections() { #region print("---------- COLLECTION UPDATING STARTED ----------"); var sel = PANEL_GRAPH.getFocusingNode(), outj = noone; - if(sel != noone) outj = sel.outputs[| 0]; + if(sel != noone) outj = sel.outputs[0]; while(!ds_stack_empty(st)) { var _st = ds_stack_pop(st); @@ -62,7 +62,7 @@ function __test_load_current_collections() { #region print("---------- COLLECTION TESTING STARTED ----------"); var sel = PANEL_GRAPH.getFocusingNode(); - var outj = sel == noone? noone : sel.outputs[| 0]; + var outj = sel == noone? noone : sel.outputs[0]; while(!ds_stack_empty(st)) { var _st = ds_stack_pop(st); @@ -78,9 +78,9 @@ function __test_load_current_collections() { #region coll.y = yy; if(outj) - for( var k = 0; k < ds_list_size(coll.inputs); k++ ) { - if(coll.inputs[| k].type != VALUE_TYPE.surface) continue; - coll.inputs[| k].setFrom(outj); + for( var k = 0; k < array_length(coll.inputs); k++ ) { + if(coll.inputs[k].type != VALUE_TYPE.surface) continue; + coll.inputs[k].setFrom(outj); break; } } else { @@ -89,9 +89,9 @@ function __test_load_current_collections() { #region coll[j].y = yy; if(outj) - for( var k = 0; k < ds_list_size(coll[j].inputs); k++ ) { - if(coll[j].inputs[| k].type != VALUE_TYPE.surface) continue; - coll[j].inputs[| k].setFrom(outj); + for( var k = 0; k < array_length(coll[j].inputs); k++ ) { + if(coll[j].inputs[k].type != VALUE_TYPE.surface) continue; + coll[j].inputs[k].setFrom(outj); break; } } @@ -122,7 +122,7 @@ function __test_load_all_nodes() { #region var col = 10; var ind = 0; var sel = PANEL_GRAPH.getFocusingNode(); - var outj = sel == noone? noone : sel.outputs[| 0]; + var outj = sel == noone? noone : sel.outputs[0]; var index = 0; var indst = 0; // 150 -- 175 -- 200 @@ -144,9 +144,9 @@ function __test_load_all_nodes() { #region xx += 160; if(b) { if(outj) - for( var i = 0; i < ds_list_size(b.inputs); i++ ) { - if(b.inputs[| i].type != VALUE_TYPE.surface) continue; - b.inputs[| i].setFrom(outj); + for( var i = 0; i < array_length(b.inputs); i++ ) { + if(b.inputs[i].type != VALUE_TYPE.surface) continue; + b.inputs[i].setFrom(outj); break; } } @@ -166,7 +166,7 @@ function __test_metadata_current_collections() { #region var sel = PANEL_GRAPH.getFocusingNode(), outj = noone; var _meta = PROJECT.meta.serialize(); - if(sel != noone) outj = sel.outputs[| 0]; + if(sel != noone) outj = sel.outputs[0]; while(!ds_stack_empty(st)) { var _st = ds_stack_pop(st); diff --git a/scripts/timeline_data/timeline_data.gml b/scripts/timeline_data/timeline_data.gml index dd648b41a..41a979216 100644 --- a/scripts/timeline_data/timeline_data.gml +++ b/scripts/timeline_data/timeline_data.gml @@ -120,7 +120,7 @@ function timelineItemNode(node) : timelineItem() constructor { } static drawDopesheetOutput = function(_x, _y, _s, _msx, _msy) { return; - var _surf = node.outputs[| 0].getValue(); + var _surf = node.outputs[0].getValue(); if(!is_surface(_surf)) return; var _h = h - 2;