diff --git a/scripts/__node_3d_combine/__node_3d_combine.gml b/scripts/__node_3d_combine/__node_3d_combine.gml index d6c2df184..934def62f 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) + newInput(0, nodeValue_Dimension(self)) .rejectArray(); - inputs[1] = nodeValue_Vec3("Object position", self, [ 0, 0, 0 ]) + newInput(1, nodeValue_Vec3("Object position", self, [ 0, 0, 0 ])) .rejectArray(); - inputs[2] = nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ]) + newInput(2, nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ])) .rejectArray(); - inputs[3] = nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ]) + newInput(3, nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ])) .rejectArray(); - inputs[4] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) + newInput(4, nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ])) .setUnitRef( function() { return getInputData(2); }, VALUE_UNIT.reference) .rejectArray(); - inputs[5] = nodeValue_Vec2("Render scale", self, [ 1, 1 ]) + newInput(5, nodeValue_Vec2("Render scale", self, [ 1, 1 ])) .rejectArray(); - inputs[6] = nodeValue_Rotation("Light direction", self, 0) + newInput(6, nodeValue_Rotation("Light direction", self, 0)) .rejectArray(); - inputs[7] = nodeValue_Float("Light height", self, 0.5) + newInput(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) + newInput(8, nodeValue_Float("Light intensity", self, 1)) .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); - inputs[9] = nodeValue_Color("Light color", self, c_white) + newInput(9, nodeValue_Color("Light color", self, c_white)) .rejectArray(); - inputs[10] = nodeValue_Color("Ambient color", self, c_grey) + newInput(10, nodeValue_Color("Ambient color", self, c_grey)) .rejectArray(); - inputs[11] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + newInput(11, nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ])) .rejectArray(); - inputs[12] = nodeValue_Float("Field of view", self, 60) + newInput(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) + newInput(13, nodeValue_Bool("Scale view with dimension", self, true)) input_display_list = [ ["Output", false], 0, 13, @@ -66,7 +66,7 @@ function __Node_3D_Combine(_x, _y, _group = noone) : Node(_x, _y, _group) constr static createNewInput = function() { var index = array_length(inputs); - inputs[index] = nodeValue("3D object", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3object, noone ) + newInput(index, nodeValue("3D object", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3object, noone )) .setVisible(true, true); array_push(input_display_list, index); diff --git a/scripts/__node_3d_displace/__node_3d_displace.gml b/scripts/__node_3d_displace/__node_3d_displace.gml index 3cf9f2c42..65d9e148c 100644 --- a/scripts/__node_3d_displace/__node_3d_displace.gml +++ b/scripts/__node_3d_displace/__node_3d_displace.gml @@ -10,37 +10,37 @@ function __Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr newInput(3, nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ])); - inputs[4] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) + newInput(4, nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ])) .setUnitRef( function() { return getInputData(0); }, VALUE_UNIT.reference); newInput(5, nodeValue_Vec2("Render scale", self, [ 1, 1 ])); newInput(6, nodeValue_Rotation("Light direction", self, 0)); - inputs[7] = nodeValue_Float("Light height", self, 0.5) + newInput(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) + newInput(8, nodeValue_Float("Light intensity", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(9, nodeValue_Color("Light color", self, c_white)); newInput(10, nodeValue_Color("Ambient color", self, c_grey)); - inputs[11] = nodeValue("3D vertex", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3vertex, []) + newInput(11, nodeValue("3D vertex", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3vertex, [])) .setVisible(true, true); - inputs[12] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + newInput(12, nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ])) .rejectArray(); - inputs[13] = nodeValue_Float("Field of view", self, 60) + newInput(13, nodeValue_Float("Field of view", self, 60)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); newInput(14, nodeValue_Bool("Scale view with dimension", self, true)); newInput(15, nodeValue_Surface("Displacement map", self)); - inputs[16] = nodeValue_Float("Strength", self, 1) + newInput(16, nodeValue_Float("Strength", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); input_display_list = [ 11, diff --git a/scripts/__node_3d_export/__node_3d_export.gml b/scripts/__node_3d_export/__node_3d_export.gml index a73db22ea..69969f7e3 100644 --- a/scripts/__node_3d_export/__node_3d_export.gml +++ b/scripts/__node_3d_export/__node_3d_export.gml @@ -1,10 +1,10 @@ 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, [] ) + newInput(0, nodeValue("Vertex data", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3vertex, [] )) .setVisible(true, true); - inputs[1] = nodeValue_Path("Path", self, "", "Export location without '.obj' extension." ) + newInput(1, nodeValue_Path("Path", self, "", "Export location without '.obj' extension." )) .setDisplay(VALUE_DISPLAY.path_save, { filter: "3d object|*.obj" }); newInput(2, nodeValue_Bool("Export texture", self, true )); diff --git a/scripts/__node_3d_extrude/__node_3d_extrude.gml b/scripts/__node_3d_extrude/__node_3d_extrude.gml index 1d5011df6..f67fdf20b 100644 --- a/scripts/__node_3d_extrude/__node_3d_extrude.gml +++ b/scripts/__node_3d_extrude/__node_3d_extrude.gml @@ -12,22 +12,22 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(4, nodeValue_Vec3("Object scale", self, [ 1, 1, 0.1 ])); - inputs[5] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) + newInput(5, nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ])) .setUnitRef( function() { return getInputData(1); }, VALUE_UNIT.reference); newInput(6, nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ])); newInput(7, nodeValue_Vec2("Render scale", self, [ 1, 1 ])); - inputs[8] = nodeValue_Trigger("Manual generate", self, false ) + newInput(8, nodeValue_Trigger("Manual generate", self, false )) .setDisplay(VALUE_DISPLAY.button, { name: "Generate", UI : true, onClick: function() { generateMesh(); doUpdate(); } }); newInput(9, nodeValue_Rotation("Light direction", self, 0)); - inputs[10] = nodeValue_Float("Light height", self, 0.5) + newInput(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) + newInput(11, nodeValue_Float("Light intensity", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(12, nodeValue_Color("Light color", self, c_white)); @@ -37,15 +37,15 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(15, nodeValue_Bool("Always update", self, false)); - inputs[16] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + newInput(16, nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ])) .rejectArray(); - inputs[17] = nodeValue_Float("Field of view", self, 60) + newInput(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) + newInput(18, nodeValue_Bool("Scale view with dimension", self, true)) - inputs[19] = nodeValue_Bool("Smooth", self, false) + newInput(19, nodeValue_Bool("Smooth", self, false)) input_display_list = [ ["Output", false], 1, 18, diff --git a/scripts/__node_3d_light/__node_3d_light.gml b/scripts/__node_3d_light/__node_3d_light.gml index f985781e4..6d089e723 100644 --- a/scripts/__node_3d_light/__node_3d_light.gml +++ b/scripts/__node_3d_light/__node_3d_light.gml @@ -8,7 +8,7 @@ function Node_3D_Light(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) newInput(in_d3d + 1, nodeValue_Color("Color", self, c_white)); - inputs[in_d3d + 2] = nodeValue_Float("Intensity", self, 1) + newInput(in_d3d + 2, nodeValue_Float("Intensity", self, 1)) .setDisplay(VALUE_DISPLAY.slider); in_light = array_length(inputs); diff --git a/scripts/__node_3d_modifier/__node_3d_modifier.gml b/scripts/__node_3d_modifier/__node_3d_modifier.gml index 5d58b5e27..89f16af92 100644 --- a/scripts/__node_3d_modifier/__node_3d_modifier.gml +++ b/scripts/__node_3d_modifier/__node_3d_modifier.gml @@ -1,7 +1,7 @@ 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) + newInput(0, nodeValue_D3Mesh("Mesh", self, noone)) .setVisible(true, true); in_mesh = array_length(inputs); diff --git a/scripts/__node_3d_obj/__node_3d_obj.gml b/scripts/__node_3d_obj/__node_3d_obj.gml index 4ec1bab49..7a5d79da9 100644 --- a/scripts/__node_3d_obj/__node_3d_obj.gml +++ b/scripts/__node_3d_obj/__node_3d_obj.gml @@ -1,11 +1,11 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "3D Object"; - inputs[0] = nodeValue_Path("Path", self, "") + newInput(0, nodeValue_Path("Path", self, "")) .setDisplay(VALUE_DISPLAY.path_load, { filter: "3d object|*.obj" }) .rejectArray(); - inputs[1] = nodeValue_Trigger("Generate", self, false ) + newInput(1, nodeValue_Trigger("Generate", self, false )) .setDisplay(VALUE_DISPLAY.button, { name: "Generate", UI : true, onClick: function() { updateObj(); doUpdate(); @@ -13,47 +13,47 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo newInput(2, nodeValue_Dimension(self)); - inputs[3] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) + newInput(3, nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ])) .setUnitRef( function() { return getInputData(2); }, VALUE_UNIT.reference); newInput(4, nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ])); newInput(5, nodeValue_Vec2("Render scale", self, [ 1, 1 ])); - inputs[6] = nodeValue_Rotation("Light direction", self, 0) + newInput(6, nodeValue_Rotation("Light direction", self, 0)) .rejectArray(); - inputs[7] = nodeValue_Float("Light height", self, 0.5) + newInput(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) + newInput(8, nodeValue_Float("Light intensity", self, 1)) .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); - inputs[9] = nodeValue_Color("Light color", self, c_white) + newInput(9, nodeValue_Color("Light color", self, c_white)) .rejectArray(); - inputs[10] = nodeValue_Color("Ambient color", self, c_grey) + newInput(10, nodeValue_Color("Ambient color", self, c_grey)) .rejectArray(); newInput(11, nodeValue_Vec3("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.") + newInput(12, nodeValue_Bool("Flip UV", self, true, "Flip UV axis, can be use to fix some texture mapping error.")) .rejectArray(); newInput(13, nodeValue_Vec3("Object rotation", self, [ 0, 0, 180 ])); newInput(14, nodeValue_Vec3("Object position", self, [ 0, 0, 0 ])); - inputs[15] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + newInput(15, nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ])) .rejectArray(); - inputs[16] = nodeValue_Float("Field of view", self, 60) + newInput(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) + newInput(17, nodeValue_Bool("Scale view with dimension", self, true)) input_display_list = [ ["Output", false], 2, 17, diff --git a/scripts/__node_3d_plane/__node_3d_plane.gml b/scripts/__node_3d_plane/__node_3d_plane.gml index 0340f3a4a..98eb8391e 100644 --- a/scripts/__node_3d_plane/__node_3d_plane.gml +++ b/scripts/__node_3d_plane/__node_3d_plane.gml @@ -4,14 +4,14 @@ function __Node_3D_Plane(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) + newInput(1, nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ])) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); newInput(2, nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ])); newInput(3, nodeValue_Vec2("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" ]) + newInput(4, nodeValue_Enum_Scroll("Output dimension", self, OUTPUT_SCALING.same_as_input, [ "Same as input", "Constant", "Relative to input" ])) .rejectArray(); newInput(5, nodeValue_Vec2("Constant dimension", self, DEF_SURF)); @@ -20,17 +20,17 @@ function __Node_3D_Plane(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(7, nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ])); - inputs[8] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + newInput(8, nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ])) .rejectArray(); - inputs[9] = nodeValue_Float("Field of view", self, 60) + newInput(9, nodeValue_Float("Field of view", self, 60)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); newInput(10, nodeValue_Vec2("Texture scale", self, [ 1, 1 ])); newInput(11, nodeValue_Vec2("Texture shift", self, [ 0, 0 ])); - inputs[12] = nodeValue_Int("Subdiviion", self, 1) + newInput(12, nodeValue_Int("Subdiviion", self, 1)) newInput(13, nodeValue_Enum_Button("Normal axis", self, 2, [ "X", "Y", "Z" ])); 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 412c638e9..d5e1bc72b 100644 --- a/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml +++ b/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml @@ -4,7 +4,7 @@ function __Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) + newInput(1, nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ])) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); newInput(2, nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ])); @@ -15,10 +15,10 @@ function __Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(5, nodeValue_Rotation("Light direction", self, 0)); - inputs[6] = nodeValue_Float("Light height", self, 0.5) + newInput(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) + newInput(7, nodeValue_Float("Light intensity", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(8, nodeValue_Color("Light color", self, c_white)); @@ -28,10 +28,10 @@ function __Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(11, nodeValue_Vec3("Object position", self, [ 0, 0, 0 ])); - inputs[12] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + newInput(12, nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ])) .rejectArray(); - inputs[13] = nodeValue_Float("Field of view", self, 60) + newInput(13, nodeValue_Float("Field of view", self, 60)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); newInput(14, nodeValue_Int("Sides", self, 16)); @@ -40,7 +40,7 @@ function __Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(16, nodeValue_Surface("Textures side", self)); - inputs[17] = nodeValue_Bool("Scale view with dimension", self, true) + newInput(17, nodeValue_Bool("Scale view with dimension", self, true)) input_display_list = [ ["Output", false], 0, 17, 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 b7214d728..07a413c6b 100644 --- a/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml +++ b/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml @@ -7,7 +7,7 @@ function __Node_3D_Cube(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(1, nodeValue_Dimension(self)); - inputs[2] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) + newInput(2, nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ])) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); newInput(3, nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ])); @@ -27,10 +27,10 @@ function __Node_3D_Cube(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(13, nodeValue_Rotation("Light direction", self, 0)); - inputs[14] = nodeValue_Float("Light height", self, 0.5) + newInput(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) + newInput(15, nodeValue_Float("Light intensity", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(16, nodeValue_Color("Light color", self, c_white)); @@ -41,13 +41,13 @@ function __Node_3D_Cube(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(19, nodeValue_Vec3("Object position", self, [ 0, 0, 0 ])); - inputs[20] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + newInput(20, nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ])) .rejectArray(); - inputs[21] = nodeValue_Float("Field of view", self, 60) + newInput(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) + newInput(22, nodeValue_Bool("Scale view with dimension", self, true)) input_display_list = [ ["Output", false], 1, 22, 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 13cd2573f..5285619d1 100644 --- a/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml +++ b/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml @@ -9,7 +9,7 @@ function __Node_3D_Cylinder(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr newInput(2, nodeValue_Dimension(self)); - inputs[3] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) + newInput(3, nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ])) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); newInput(4, nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ])); @@ -24,10 +24,10 @@ function __Node_3D_Cylinder(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr newInput(10, nodeValue_Rotation("Light direction", self, 0)); - inputs[11] = nodeValue_Float("Light height", self, 0.5) + newInput(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) + newInput(12, nodeValue_Float("Light intensity", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(13, nodeValue_Color("Light color", self, c_white)); @@ -37,16 +37,16 @@ function __Node_3D_Cylinder(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr newInput(16, nodeValue_Vec3("Object position", self, [ 0, 0, 0 ])); - inputs[17] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + newInput(17, nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ])) .rejectArray(); - inputs[18] = nodeValue_Float("Field of view", self, 60) + newInput(18, nodeValue_Float("Field of view", self, 60)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); - inputs[19] = nodeValue_Float("Taper", self, 1) + newInput(19, nodeValue_Float("Taper", self, 1)) .setDisplay(VALUE_DISPLAY.slider); - inputs[20] = nodeValue_Bool("Scale view with dimension", self, true) + newInput(20, nodeValue_Bool("Scale view with dimension", self, true)) input_display_list = [ ["Output", false], 2, 20, 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 45340910b..30273ccf5 100644 --- a/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml +++ b/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml @@ -3,12 +3,12 @@ function __Node_3D_Sphere(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou batch_output = false; dimension_index = 1; - inputs[0] = nodeValue_Vec2("Subdivisions", self, [8, 4]) + newInput(0, nodeValue_Vec2("Subdivisions", self, [8, 4])) .setTooltip("Amount of polygon in X and Y axis."); newInput(1, nodeValue_Dimension(self)); - inputs[2] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) + newInput(2, nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ])) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); newInput(3, nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ])); @@ -21,10 +21,10 @@ function __Node_3D_Sphere(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(7, nodeValue_Rotation("Light direction", self, 0)); - inputs[8] = nodeValue_Float("Light height", self, 0.5) + newInput(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) + newInput(9, nodeValue_Float("Light intensity", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(10, nodeValue_Color("Light color", self, c_white)); @@ -34,13 +34,13 @@ function __Node_3D_Sphere(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(13, nodeValue_Vec3("Object position", self, [ 0, 0, 0 ])); - inputs[14] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + newInput(14, nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ])) .rejectArray(); - inputs[15] = nodeValue_Float("Field of view", self, 60) + newInput(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) + newInput(16, nodeValue_Bool("Scale view with dimension", self, true)) input_display_list = [ ["Output", false], 1, 16, diff --git a/scripts/__node_3d_render/__node_3d_render.gml b/scripts/__node_3d_render/__node_3d_render.gml index a5588be5d..d2279c1d0 100644 --- a/scripts/__node_3d_render/__node_3d_render.gml +++ b/scripts/__node_3d_render/__node_3d_render.gml @@ -3,39 +3,39 @@ // newInput(2, nodeValue_Dimension(self)); -// inputs[3] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) +// newInput(3, nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ])) // .setUnitRef( function() { return getInputData(2); }, VALUE_UNIT.reference); // newInput(4, nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ])); // newInput(5, nodeValue_Vec2("Render scale", self, [ 1, 1 ])); -// inputs[6] = nodeValue_Float("Light direction", self, 0) +// newInput(6, nodeValue_Float("Light direction", self, 0)) // .setDisplay(VALUE_DISPLAY.rotation) // .rejectArray(); -// inputs[7] = nodeValue_Float("Light height", self, 0.5) +// newInput(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) +// newInput(8, nodeValue_Float("Light intensity", self, 1)) // .setDisplay(VALUE_DISPLAY.slider) // .rejectArray(); -// inputs[9] = nodeValue_Color("Light color", self, c_white) +// newInput(9, nodeValue_Color("Light color", self, c_white)) // .rejectArray(); -// inputs[10] = nodeValue_Color("Ambient color", self, c_grey) +// newInput(10, nodeValue_Color("Ambient color", self, c_grey)) // .rejectArray(); -// inputs[15] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) +// newInput(15, nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ])) // .rejectArray(); -// inputs[16] = nodeValue_Float("Field of view", self, 60) +// newInput(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) +// newInput(17, nodeValue_Bool("Scale view with dimension", self, true)) // input_display_list = [ // ["Output", false], 2, 17, diff --git a/scripts/__node_3d_repeat/__node_3d_repeat.gml b/scripts/__node_3d_repeat/__node_3d_repeat.gml index dedcc255e..153733525 100644 --- a/scripts/__node_3d_repeat/__node_3d_repeat.gml +++ b/scripts/__node_3d_repeat/__node_3d_repeat.gml @@ -9,24 +9,24 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constru newInput(3, nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ])); - inputs[4] = nodeValue_Vec3("Render position", self, [ 0.5, 0.5 ]) + newInput(4, nodeValue_Vec3("Render position", self, [ 0.5, 0.5 ])) .setUnitRef( function() { return getInputData(0); }, VALUE_UNIT.reference); newInput(5, nodeValue_Vec2("Render scale", self, [ 1, 1 ])); newInput(6, nodeValue_Rotation("Light direction", self, 0)); - inputs[7] = nodeValue_Float("Light height", self, 0.5) + newInput(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) + newInput(8, nodeValue_Float("Light intensity", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(9, nodeValue_Color("Light color", self, c_white)); newInput(10, nodeValue_Color("Ambient color", self, c_grey)); - inputs[11] = nodeValue("3D object", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3object, noone) + newInput(11, nodeValue("3D object", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3object, noone)) .setVisible(true, true); newInput(12, nodeValue_Int("Repeat", self, 1, "Amount of copies to be generated.")); @@ -37,7 +37,7 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constru newInput(15, nodeValue_Vec3("Repeat scale", self, [ 1, 1, 1 ])); - inputs[16] = nodeValue_Enum_Button("Repeat pattern", self, 0, [ "Linear", "Circular" ]) + newInput(16, nodeValue_Enum_Button("Repeat pattern", self, 0, [ "Linear", "Circular" ])) .rejectArray(); newInput(17, nodeValue_Enum_Button("Axis", self, 0, [ "x", "y", "z" ])); @@ -46,13 +46,13 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constru newInput(19, nodeValue_Rotation_Range("Rotation", self, [ 0, 360 ])); - inputs[20] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) + newInput(20, nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ])) .rejectArray(); - inputs[21] = nodeValue_Float("Field of view", self, 60) + newInput(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) + newInput(22, nodeValue_Bool("Scale view with dimension", self, true)) input_display_list = [ 11, ["Output", false], 0, 22, diff --git a/scripts/__node_3d_transform/__node_3d_transform.gml b/scripts/__node_3d_transform/__node_3d_transform.gml index 47f778f45..628ad76e8 100644 --- a/scripts/__node_3d_transform/__node_3d_transform.gml +++ b/scripts/__node_3d_transform/__node_3d_transform.gml @@ -10,33 +10,33 @@ function __Node_3D_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _g newInput(3, nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ])); - inputs[4] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) + newInput(4, nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ])) .setUnitRef( function() { return getInputData(2); }, VALUE_UNIT.reference); newInput(5, nodeValue_Vec2("Render scale", self, [ 1, 1 ])); newInput(6, nodeValue_Rotation("Light direction", self, 0)); - inputs[7] = nodeValue_Float("Light height", self, 0.5) + newInput(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) + newInput(8, nodeValue_Float("Light intensity", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(9, nodeValue_Color("Light color", self, c_white)); newInput(10, nodeValue_Color("Ambient color", self, c_grey)); - inputs[11] = nodeValue("3D object", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3object, noone) + newInput(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" ]) + newInput(12, nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ])) .rejectArray(); - inputs[13] = nodeValue_Float("Field of view", self, 60) + newInput(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) + newInput(14, nodeValue_Bool("Scale view with dimension", self, true)) input_display_list = [ 11, ["Output", false], 0, 14, diff --git a/scripts/__node_VFX_effector/__node_VFX_effector.gml b/scripts/__node_VFX_effector/__node_VFX_effector.gml index 3c8d99207..298c12f38 100644 --- a/scripts/__node_VFX_effector/__node_VFX_effector.gml +++ b/scripts/__node_VFX_effector/__node_VFX_effector.gml @@ -20,31 +20,31 @@ 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 ) + newInput(0, nodeValue_Particle("Particles", self, -1 )) .setVisible(true, true); - inputs[1] = nodeValue_Area("Area", self, DEF_AREA) + newInput(1, nodeValue_Area("Area", self, DEF_AREA)) .rejectArray(); - inputs[2] = nodeValue("Falloff", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01 ) + newInput(2, nodeValue("Falloff", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01 )) .rejectArray(); - inputs[3] = nodeValue_Float("Falloff distance", self, 4 ) + newInput(3, nodeValue_Float("Falloff distance", self, 4 )) .rejectArray(); - inputs[4] = nodeValue_Vec2("Effect Vector", self, [ -1, 0 ] ) + newInput(4, nodeValue_Vec2("Effect Vector", self, [ -1, 0 ] )) .rejectArray(); - inputs[5] = nodeValue_Float("Strength", self, 1 ) + newInput(5, nodeValue_Float("Strength", self, 1 )) .rejectArray(); - inputs[6] = nodeValue_Rotation_Range("Rotate particle", self, [ 0, 0 ] ) + newInput(6, nodeValue_Rotation_Range("Rotate particle", self, [ 0, 0 ] )) .rejectArray(); - inputs[7] = nodeValue_Vec2_Range("Scale particle", self, [ 0, 0, 0, 0 ] , { linked : true }) + newInput(7, nodeValue_Vec2_Range("Scale particle", self, [ 0, 0, 0, 0 ] , { linked : true })) .rejectArray(); - inputs[8] = nodeValue_Int("Seed", self, seed_random(6)) + newInput(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(); diff --git a/scripts/__node_custom/__node_custom.gml b/scripts/__node_custom/__node_custom.gml index 6bf43a21a..285bbea99 100644 --- a/scripts/__node_custom/__node_custom.gml +++ b/scripts/__node_custom/__node_custom.gml @@ -49,7 +49,7 @@ function Node_Custom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co 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) + newInput(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; diff --git a/scripts/_node_VFX_spawner/_node_VFX_spawner.gml b/scripts/_node_VFX_spawner/_node_VFX_spawner.gml index 0ae3b542b..88ae0b4d7 100644 --- a/scripts/_node_VFX_spawner/_node_VFX_spawner.gml +++ b/scripts/_node_VFX_spawner/_node_VFX_spawner.gml @@ -6,7 +6,7 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co newInput(1, nodeValue_Int("Spawn delay", self, 4, "Frames delay between each particle spawn." )); - inputs[2] = nodeValue_Range("Spawn amount", self, [ 2, 2 ] , { linked : true }) + newInput(2, nodeValue_Range("Spawn amount", self, [ 2, 2 ] , { linked : true })) .setTooltip("Amount of particle spawn in that frame."); newInput(3, nodeValue_Area("Spawn area", self, DEF_AREA )); @@ -47,20 +47,20 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co newInput(21, nodeValue_Bool("Loop", self, true )); - inputs[22] = nodeValue_Enum_Scroll("Surface array", self, 0, [ "Random", "Order", "Animation", "Scale" ]) + newInput(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 }) + newInput(23, nodeValue_Range("Animation speed", self, [ 1, 1 ] , { linked : true })) .setVisible(false); newInput(24, nodeValue_Enum_Button("Scatter", self, 1, [ "Uniform", "Random" ])); - inputs[25] = nodeValue_Int("Boundary data", self, []) + newInput(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" ]) + newInput(26, nodeValue_Enum_Button("On animation end", self, ANIM_END_ACTION.loop, [ "Loop", "Ping pong", "Destroy" ])) .setVisible(false); newInput(27, nodeValue_Bool("Spawn", self, true)); @@ -69,12 +69,12 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co newInput(29, nodeValue_Bool("Directed from center", self, false, "Make particle move away from the spawn center.")); - inputs[30] = nodeValue_Surface("Distribution map", self) + newInput(30, nodeValue_Surface("Distribution map", self)) - inputs[31] = nodeValue_Surface("Atlas", self, []) + newInput(31, nodeValue_Surface("Atlas", self, [])) .setArrayDepth(1); - inputs[32] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) }); newInput(33, nodeValue_Rotation("Gravity direction", self, -90)); @@ -89,10 +89,10 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co newInput(38, nodeValue_Float("Ground offset", self, 0 )); - inputs[39] = nodeValue_Float("Bounce amount", self, 0.5 ) + newInput(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." ) + newInput(40, nodeValue_Float("Bounce friction", self, 0.1, "Apply horizontal friction once particle stop bouncing." )) .setDisplay(VALUE_DISPLAY.slider); newInput(41, nodeValue_Vec2("Position wiggle", self, [ 0, 0 ] , { label: [ "Amplitude", "Period" ], linkable: false, per_line: true })); @@ -101,7 +101,7 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co newInput(43, nodeValue_Vec2("Scale wiggle", self, [ 0, 0 ] , { label: [ "Amplitude", "Period" ], linkable: false, per_line: true })); - inputs[44] = nodeValue_Trigger("Spawn", self, false ) + newInput(44, nodeValue_Trigger("Spawn", self, false )) .setDisplay(VALUE_DISPLAY.button, { name: "Trigger" }); newInput(45, nodeValue_Bool("Follow Path", self, false )); @@ -110,7 +110,7 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co newInput(47, nodeValue("Path Deviation", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 )); - inputs[48] = nodeValue_Trigger("Reset Seed", self, false ) + newInput(48, nodeValue_Trigger("Reset Seed", self, false )) .setDisplay(VALUE_DISPLAY.button, { name: "Trigger" }) newInput(49, nodeValue_Bool("Stretch Animation", self, false )); diff --git a/scripts/_node_strand_affector/_node_strand_affector.gml b/scripts/_node_strand_affector/_node_strand_affector.gml index 1eace7e53..eaa6629b1 100644 --- a/scripts/_node_strand_affector/_node_strand_affector.gml +++ b/scripts/_node_strand_affector/_node_strand_affector.gml @@ -40,7 +40,7 @@ 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) + newInput(0, nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone)) .setVisible(true, true); newInput(1, nodeValue_Enum_Scroll("Shape", self, 0, [ "Point", "Band" ])); @@ -51,7 +51,7 @@ function _Node_Strand_Affector(_x, _y, _group = noone) : Node(_x, _y, _group) co newInput(4, nodeValue_Rotation("Direction", self, 0)); - inputs[5] = nodeValue_Float("Falloff", self, 0.2) + newInput(5, nodeValue_Float("Falloff", self, 0.2)) .setDisplay(VALUE_DISPLAY.slider); outputs[0] = nodeValue_Output("Strand", self, VALUE_TYPE.strands, noone); diff --git a/scripts/mask_function/mask_function.gml b/scripts/mask_function/mask_function.gml index 778b9c9c7..1b72d6c1e 100644 --- a/scripts/mask_function/mask_function.gml +++ b/scripts/mask_function/mask_function.gml @@ -3,7 +3,7 @@ function __init_mask_modifier(_mask_index) { #region newInput(_ind + 0, nodeValue_Bool("Invert mask", self, false)); - inputs[_ind + 1] = nodeValue_Float("Mask feather", self, 0) + newInput(_ind + 1, nodeValue_Float("Mask feather", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 32, 0.1] }); __mask_index = _mask_index; 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 87f9ac4e8..11feafcdd 100644 --- a/scripts/nodd_mk_delay_machine/nodd_mk_delay_machine.gml +++ b/scripts/nodd_mk_delay_machine/nodd_mk_delay_machine.gml @@ -16,7 +16,7 @@ function Node_MK_Delay_Machine(_x, _y, _group = noone) : Node(_x, _y, _group) co newInput(5, nodeValue_Enum_Scroll("Palette Select", self, 0, [ "Loop", "Pingpong", "Random" ])); - inputs[6] = nodeValue_Int("Seed", self, seed_random(6)) + newInput(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); diff --git a/scripts/node_2d_light/node_2d_light.gml b/scripts/node_2d_light/node_2d_light.gml index 337e3c945..ac84cf8ab 100644 --- a/scripts/node_2d_light/node_2d_light.gml +++ b/scripts/node_2d_light/node_2d_light.gml @@ -22,12 +22,12 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) new scrollItem("Line asymmetric", s_node_2d_light_shape, 2), new scrollItem("Spot", s_node_2d_light_shape, 3), ]); - inputs[2] = nodeValue_Vec2("Center", self, [ 16, 16 ]) + newInput(2, nodeValue_Vec2("Center", self, [ 16, 16 ])) .setUnitRef(function(index) { return getDimension(index); }); newInput(3, nodeValue_Float("Range", self, 16)); - inputs[4] = nodeValue_Float("Intensity", self, 1) + newInput(4, nodeValue_Float("Intensity", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(5, nodeValue_Color("Color", self, c_white)); @@ -36,13 +36,13 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(7, nodeValue_Vec2("Finish", self, [ 32, 16 ])); - inputs[8] = nodeValue_Int("Sweep", self, 15) + newInput(8, nodeValue_Int("Sweep", self, 15)) .setDisplay(VALUE_DISPLAY.slider, { range: [-80, 80, 0.1] }); - inputs[9] = nodeValue_Int("Sweep end", self, 0) + newInput(9, nodeValue_Int("Sweep end", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [-80, 80, 0.1] }); - inputs[10] = nodeValue_Int("Banding", self, 0) + newInput(10, nodeValue_Int("Banding", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.1] }); inputs[11] = nodeValue_Enum_Scroll("Attenuation", self, 0, @@ -51,12 +51,12 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) new scrollItem("Linear", s_node_curve, 2), ]) .setTooltip("Control how light fade out over distance."); - inputs[12] = nodeValue_Int("Radial banding", self, 0) + newInput(12, nodeValue_Int("Radial banding", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.1] }); newInput(13, nodeValue_Rotation("Radial start", self, 0)); - inputs[14] = nodeValue_Float("Radial band ratio", self, 0.5) + newInput(14, nodeValue_Float("Radial band ratio", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider); newInput(15, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_3d_camera/node_3d_camera.gml b/scripts/node_3d_camera/node_3d_camera.gml index 41dfc5008..3dfa739f5 100644 --- a/scripts/node_3d_camera/node_3d_camera.gml +++ b/scripts/node_3d_camera/node_3d_camera.gml @@ -18,7 +18,7 @@ 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 ) + newInput(in_d3d + 0, nodeValue_Int("FOV", self, 60 )) .setDisplay(VALUE_DISPLAY.slider, { range: [ 10, 90, 0.1 ] }); newInput(in_d3d + 1, nodeValue_Vec2("Clipping Distance", self, [ 1, 10 ] )); @@ -27,7 +27,7 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) newInput(in_d3d + 3, nodeValue_Enum_Button("Projection", self, 1 , [ "Perspective", "Orthographic" ])); - inputs[in_d3d + 4] = nodeValue_D3Scene("Scene", self, noone ) + newInput(in_d3d + 4, nodeValue_D3Scene("Scene", self, noone )) .setVisible(true, true); newInput(in_d3d + 5, nodeValue_Color("Ambient Light", self, c_dkgrey )); @@ -36,7 +36,7 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) newInput(in_d3d + 7, nodeValue_Enum_Button("Backface Culling", self, 2 , [ "None", "CW", "CCW" ])); - inputs[in_d3d + 8] = nodeValue_Float("Orthographic Scale", self, 0.5 ) + newInput(in_d3d + 8, nodeValue_Float("Orthographic Scale", self, 0.5 )) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0.01, 4, 0.01 ] }); newInput(in_d3d + 9, nodeValue_Enum_Scroll("Postioning Mode", self, 2, [ "Position + Rotation", "Position + Lookat", "Lookat + Rotation" ] )); @@ -47,7 +47,7 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) newInput(in_d3d + 12, nodeValue_Rotation("Horizontal Angle", self, 45 )); - inputs[in_d3d + 13] = nodeValue_Float("Vertical Angle", self, 30 ) + newInput(in_d3d + 13, nodeValue_Float("Vertical Angle", self, 30 )) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 0.1] }); newInput(in_d3d + 14, nodeValue_Float("Distance", self, 4 )); @@ -62,10 +62,10 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) newInput(in_d3d + 19, nodeValue_Float("AO Bias", self, 0.05 )); - inputs[in_d3d + 20] = nodeValue_Float("AO Strength", self, 1. ) + newInput(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 ) + newInput(in_d3d + 21, nodeValue_Int("Round Normal", self, 0 )) .setWindows(); newInput(in_d3d + 22, nodeValue_Enum_Button("Blend mode", self, 0 , [ "Normal", "Additive" ])); 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 671c024ee..edb5c2cd0 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) + newInput(in_cam + 0, nodeValue_Rotation("L1 H angle", self, 30)) .setName("Horizontal angle"); - inputs[in_cam + 1] = nodeValue_Float("L1 V angle", self, 45 ) + newInput(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 ) + newInput(in_cam + 2, nodeValue_Color("L1 Color", self, c_white )) .setName("Color") - inputs[in_cam + 3] = nodeValue_Float("L1 Intensity", self, 1 ) + newInput(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) + newInput(in_cam + 4, nodeValue_Rotation("L2 H angle", self, -45)) .setName("Horizontal angle"); - inputs[in_cam + 5] = nodeValue_Float("L2 V angle", self, 45 ) + newInput(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 ) + newInput(in_cam + 6, nodeValue_Color("L2 Color", self, c_white )) .setName("Color") - inputs[in_cam + 7] = nodeValue_Float("L2 Intensity", self, 0.25 ) + newInput(in_cam + 7, nodeValue_Float("L2 Intensity", self, 0.25 )) .setName("Intensity") .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_3d_instancer/node_3d_instancer.gml b/scripts/node_3d_instancer/node_3d_instancer.gml index 48c426a08..0c694d8f1 100644 --- a/scripts/node_3d_instancer/node_3d_instancer.gml +++ b/scripts/node_3d_instancer/node_3d_instancer.gml @@ -3,7 +3,7 @@ function Node_3D_Instancer(_x, _y, _group = noone) : Node_3D_Modifier(_x, _y, _g newInput(in_mesh + 0, nodeValue_Int("Amounts", self, 1)); - inputs[in_mesh + 1] = nodeValue_Vec3("Positions", self, [ 0, 0, 0 ]) + newInput(in_mesh + 1, nodeValue_Vec3("Positions", self, [ 0, 0, 0 ])) .setArrayDepth(1); static processData = function(_output, _data, _output_index, _array_index = 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 d042d9080..d8764f4c3 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) + newInput(in_light + 0, nodeValue_Float("Radius", self, 4)) - inputs[in_light + 1] = nodeValue_Bool("Cast Shadow", self, false) + newInput(in_light + 1, nodeValue_Bool("Cast Shadow", self, false)) .setWindows(); - inputs[in_light + 2] = nodeValue_Int("Shadow Map Size", self, 1024) + newInput(in_light + 2, nodeValue_Int("Shadow Map Size", self, 1024)) .setWindows(); - inputs[in_light + 3] = nodeValue_Float("Shadow Bias", self, .001) + newInput(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 bb1dcaf35..9e853a3e8 100644 --- a/scripts/node_3d_material/node_3d_material.gml +++ b/scripts/node_3d_material/node_3d_material.gml @@ -2,13 +2,13 @@ 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) + newInput(0, nodeValue_Surface("Texture", self)) .setVisible(true, true); - inputs[1] = nodeValue_Float("Diffuse", self, 1 ) + newInput(1, nodeValue_Float("Diffuse", self, 1 )) .setDisplay(VALUE_DISPLAY.slider); - inputs[2] = nodeValue_Float("Specular", self, 0 ) + newInput(2, nodeValue_Float("Specular", self, 0 )) .setDisplay(VALUE_DISPLAY.slider); newInput(3, nodeValue_Float("Shininess", self, 1 )); @@ -17,10 +17,10 @@ function Node_3D_Material(_x, _y, _group = noone) : Node_3D(_x, _y, _group) cons newInput(5, nodeValue_Surface("Normal Map", self)); - inputs[6] = nodeValue_Float("Normal Strength", self, 1 ) + newInput(6, nodeValue_Float("Normal Strength", self, 1 )) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); - inputs[7] = nodeValue_Float("Roughness", self, 1 ) + newInput(7, nodeValue_Float("Roughness", self, 1 )) .setDisplay(VALUE_DISPLAY.slider); newInput(8, nodeValue_Bool("Anti aliasing", self, false )); 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 81ecd893c..d08de7a2c 100644 --- a/scripts/node_3d_mesh_cone/node_3d_mesh_cone.gml +++ b/scripts/node_3d_mesh_cone/node_3d_mesh_cone.gml @@ -3,13 +3,13 @@ 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 ) + newInput(in_mesh + 0, nodeValue_Int("Side", self, 8 )) .setValidator(VV_min(3)); - inputs[in_mesh + 1] = nodeValue_D3Material("Material Bottom", self, new __d3dMaterial()) + newInput(in_mesh + 1, nodeValue_D3Material("Material Bottom", self, new __d3dMaterial())) .setVisible(true, true); - inputs[in_mesh + 2] = nodeValue_D3Material("Material Side", self, new __d3dMaterial()) + newInput(in_mesh + 2, nodeValue_D3Material("Material Side", self, new __d3dMaterial())) .setVisible(true, true); newInput(in_mesh + 3, nodeValue_Bool("Smooth Side", self, false )); 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 c738ce5f7..4831b9d88 100644 --- a/scripts/node_3d_mesh_cube/node_3d_mesh_cube.gml +++ b/scripts/node_3d_mesh_cube/node_3d_mesh_cube.gml @@ -4,22 +4,22 @@ function Node_3D_Mesh_Cube(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group newInput(in_mesh + 0, nodeValue_Bool("Material per side", self, false )); - inputs[in_mesh + 1] = nodeValue_D3Material("Material", self, new __d3dMaterial()) + newInput(in_mesh + 1, nodeValue_D3Material("Material", self, new __d3dMaterial())) .setVisible(true, true); - inputs[in_mesh + 2] = nodeValue_D3Material("Material Bottom", self, new __d3dMaterial()) + newInput(in_mesh + 2, nodeValue_D3Material("Material Bottom", self, new __d3dMaterial())) .setVisible(true, true); - inputs[in_mesh + 3] = nodeValue_D3Material("Material Left", self, new __d3dMaterial()) + newInput(in_mesh + 3, nodeValue_D3Material("Material Left", self, new __d3dMaterial())) .setVisible(true, true); - inputs[in_mesh + 4] = nodeValue_D3Material("Material Right", self, new __d3dMaterial()) + newInput(in_mesh + 4, nodeValue_D3Material("Material Right", self, new __d3dMaterial())) .setVisible(true, true); - inputs[in_mesh + 5] = nodeValue_D3Material("Material Back", self, new __d3dMaterial()) + newInput(in_mesh + 5, nodeValue_D3Material("Material Back", self, new __d3dMaterial())) .setVisible(true, true); - inputs[in_mesh + 6] = nodeValue_D3Material("Material Front", self, new __d3dMaterial()) + newInput(in_mesh + 6, nodeValue_D3Material("Material Front", self, new __d3dMaterial())) .setVisible(true, true); input_display_list = [ 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 739b4a2d5..df8be0d0d 100644 --- a/scripts/node_3d_mesh_cylinder/node_3d_mesh_cylinder.gml +++ b/scripts/node_3d_mesh_cylinder/node_3d_mesh_cylinder.gml @@ -3,16 +3,16 @@ 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 ) + newInput(in_mesh + 0, nodeValue_Int("Side", self, 8 )) .setValidator(VV_min(3)); - inputs[in_mesh + 1] = nodeValue_D3Material("Material Top", self, new __d3dMaterial()) + newInput(in_mesh + 1, nodeValue_D3Material("Material Top", self, new __d3dMaterial())) .setVisible(true, true); - inputs[in_mesh + 2] = nodeValue_D3Material("Material Bottom", self, new __d3dMaterial()) + newInput(in_mesh + 2, nodeValue_D3Material("Material Bottom", self, new __d3dMaterial())) .setVisible(true, true); - inputs[in_mesh + 3] = nodeValue_D3Material("Material Side", self, new __d3dMaterial()) + newInput(in_mesh + 3, nodeValue_D3Material("Material Side", self, new __d3dMaterial())) .setVisible(true, true); newInput(in_mesh + 4, nodeValue_Bool("Smooth Side", self, false )); 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 3474a0313..99d5ce459 100644 --- a/scripts/node_3d_mesh_export/node_3d_mesh_export.gml +++ b/scripts/node_3d_mesh_export/node_3d_mesh_export.gml @@ -1,10 +1,10 @@ function Node_3D_Mesh_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Mesh Export"; - inputs[0] = nodeValue_D3Mesh("Mesh", self, noone) + newInput(0, nodeValue_D3Mesh("Mesh", self, noone)) .setVisible(true, true); - inputs[1] = nodeValue_Path("Paths", self, "") + newInput(1, nodeValue_Path("Paths", self, "")) .setDisplay(VALUE_DISPLAY.path_save, { filter: "Obj (.obj)|*.obj" }) .setVisible(true); 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 87612d181..ad3836515 100644 --- a/scripts/node_3d_mesh_extrude/node_3d_mesh_extrude.gml +++ b/scripts/node_3d_mesh_extrude/node_3d_mesh_extrude.gml @@ -3,18 +3,18 @@ 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()) + newInput(in_mesh + 0, nodeValue_D3Material("Front Surface", self, new __d3dMaterial())) .setVisible(true, true); newInput(in_mesh + 1, nodeValue_Surface("Front Height", self)); - inputs[in_mesh + 2] = nodeValue_Bool("Smooth", self, false) + newInput(in_mesh + 2, nodeValue_Bool("Smooth", self, false)) newInput(in_mesh + 3, nodeValue_Bool("Always update", self, false)); newInput(in_mesh + 4, nodeValue_Bool("Double Side", self, false)); - inputs[in_mesh + 5] = nodeValue_D3Material("Back Surface", self, new __d3dMaterial()) + newInput(in_mesh + 5, nodeValue_D3Material("Back Surface", self, new __d3dMaterial())) .setVisible(true, true); newInput(in_mesh + 6, nodeValue_Surface("Back Height", self)); 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 2e2ee1fbc..be9e672ce 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_Path("File Path", self, "" ) + newInput(in_mesh + 0, nodeValue_Path("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.") + newInput(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) + newInput(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" ]) + newInput(in_mesh + 3, nodeValue_Enum_Scroll("Axis", self, 0, [ "XYZ", "XZ-Y", "X-ZY" ])) .rejectArray(); input_display_list = [ @@ -73,7 +73,7 @@ function Node_3D_Mesh_Obj(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group) static createNewInput = function(index = -1) { #region if(index == -1) index = array_length(inputs); - inputs[index] = nodeValue_D3Material("Material", self, new __d3dMaterial()) + newInput(index, nodeValue_D3Material("Material", self, new __d3dMaterial())) .setVisible(true, true); } #endregion 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 a7ec8901e..425bb677d 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,26 +3,26 @@ 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 ) + newInput(in_mesh + 0, nodeValue_PathNode("Path", self, noone )) .setVisible(true, true); - inputs[in_mesh + 1] = nodeValue_Int("Side", self, 8 ) + newInput(in_mesh + 1, nodeValue_Int("Side", self, 8 )) .setValidator(VV_min(2)); - inputs[in_mesh + 2] = nodeValue_D3Material("Material Side", self, new __d3dMaterial()) + newInput(in_mesh + 2, nodeValue_D3Material("Material Side", self, new __d3dMaterial())) .setVisible(true, true); - inputs[in_mesh + 3] = nodeValue_D3Material("Material Cap", self, new __d3dMaterial()) + newInput(in_mesh + 3, nodeValue_D3Material("Material Cap", self, new __d3dMaterial())) .setVisible(true, true); newInput(in_mesh + 4, nodeValue_Bool("Smooth", self, false )); newInput(in_mesh + 5, nodeValue_Bool("End caps", self, true )); - inputs[in_mesh + 6] = nodeValue_Int("Subdivision", self, 8 ) + newInput(in_mesh + 6, nodeValue_Int("Subdivision", self, 8 )) .setValidator(VV_min(2)); - inputs[in_mesh + 7] = nodeValue_Float("Radius", self, 0.25 ) + newInput(in_mesh + 7, nodeValue_Float("Radius", self, 0.25 )) .setDisplay(VALUE_DISPLAY.slider); newInput(in_mesh + 8, nodeValue("Radius Over Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 )); 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 fb9b0cd88..c8adf7173 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()) + newInput(in_mesh + 0, nodeValue_D3Material("Material", self, new __d3dMaterial())) .setVisible(true, true); newInput(in_mesh + 1, nodeValue_Enum_Button("Normal", self, 2 , [ "X", "Y", "Z" ])); - inputs[in_mesh + 2] = nodeValue_Bool("Both side", self, false ) + newInput(in_mesh + 2, nodeValue_Bool("Both side", self, false )) .rejectArray(); - inputs[in_mesh + 3] = nodeValue_D3Material("Back Material", self, new __d3dMaterial()) + newInput(in_mesh + 3, nodeValue_D3Material("Back Material", self, new __d3dMaterial())) input_display_list = [ __d3d_input_list_mesh, in_mesh + 1, 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 131109f2c..1c678084d 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,10 +3,10 @@ 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 ) + newInput(in_mesh + 0, nodeValue_Int("Subdivision", self, 1 )) .setValidator(VV_min(0)); - inputs[in_mesh + 1] = nodeValue_D3Material("Material", self, new __d3dMaterial()) + newInput(in_mesh + 1, nodeValue_D3Material("Material", self, new __d3dMaterial())) .setVisible(true, true); newInput(in_mesh + 2, nodeValue_Bool("Smooth Normal", self, false )); 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 528b3b509..16503bbcc 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,13 +3,13 @@ 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 ) + newInput(in_mesh + 0, nodeValue_Int("Horizontal Slices", self, 8 )) .setValidator(VV_min(2)); - inputs[in_mesh + 1] = nodeValue_Int("Vertical Slices", self, 16 ) + newInput(in_mesh + 1, nodeValue_Int("Vertical Slices", self, 16 )) .setValidator(VV_min(3)); - inputs[in_mesh + 2] = nodeValue_D3Material("Material", self, new __d3dMaterial()) + newInput(in_mesh + 2, nodeValue_D3Material("Material", self, new __d3dMaterial())) .setVisible(true, true); newInput(in_mesh + 3, nodeValue_Bool("Smooth Normal", self, false )); 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 aed1570c1..28730728d 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,7 +1,7 @@ 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) + newInput(0, nodeValue_D3Mesh("Mesh", self, noone)) .setVisible(true, true); newInput(1, nodeValue_Vec2("Output Dimension", self, [ 16, 16 ])); 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 059a18f5b..3f67de98b 100644 --- a/scripts/node_3d_mesh_terrain/node_3d_mesh_terrain.gml +++ b/scripts/node_3d_mesh_terrain/node_3d_mesh_terrain.gml @@ -3,7 +3,7 @@ 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()) + newInput(in_mesh + 0, nodeValue_D3Material("Material", self, new __d3dMaterial())) .setVisible(true, true); newInput(in_mesh + 1, nodeValue_Enum_Button("Input type", self, 0 , [ "Surface", "Array" ])); @@ -12,7 +12,7 @@ function Node_3D_Mesh_Terrain(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _gr newInput(in_mesh + 3, nodeValue_Int("Subdivision", self, 4 )); - inputs[in_mesh + 4] = nodeValue_Float("Height array", self, [] ) + newInput(in_mesh + 4, nodeValue_Float("Height array", self, [] )) .setArrayDepth(2); newInput(in_mesh + 5, nodeValue_Bool("Smooth", self, false )); 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 42e5a2d39..764c85a50 100644 --- a/scripts/node_3d_point_affector/node_3d_point_affector.gml +++ b/scripts/node_3d_point_affector/node_3d_point_affector.gml @@ -5,7 +5,7 @@ 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_Vec3("Points", self, [ 0, 0, 0 ]) + newInput(in_d3d + 0, nodeValue_Vec3("Points", self, [ 0, 0, 0 ])) .setVisible(true, true); newInput(in_d3d + 1, nodeValue_Vec3("Initial value", self, [ 0, 0, 0 ])); diff --git a/scripts/node_3d_repeat/node_3d_repeat.gml b/scripts/node_3d_repeat/node_3d_repeat.gml index ff00ddd78..7f48ded77 100644 --- a/scripts/node_3d_repeat/node_3d_repeat.gml +++ b/scripts/node_3d_repeat/node_3d_repeat.gml @@ -1,11 +1,11 @@ function Node_3D_Repeat(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constructor { name = "3D Repeat"; - inputs[0] = nodeValue_D3Mesh("Objects", self, noone) + newInput(0, nodeValue_D3Mesh("Objects", self, noone)) .setArrayDepth(1) .setVisible(true, true); - inputs[1] = nodeValue_Enum_Button("Object Mode", self, 0 , [ "Duplicate", "Array" ] ) + newInput(1, nodeValue_Enum_Button("Object Mode", self, 0 , [ "Duplicate", "Array" ] )) .rejectArray(); newInput(2, nodeValue_Int("Amount", self, 1 )); @@ -22,16 +22,16 @@ function Node_3D_Repeat(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr newInput(8, nodeValue_Vec3("Shift Scale", self, [ 0, 0, 0 ] )); - inputs[9] = nodeValue_Float("Positions", self, [] ) + newInput(9, nodeValue_Float("Positions", self, [] )) .setArrayDepth(2); - inputs[10] = nodeValue_Float("Rotations", self, [] ) + newInput(10, nodeValue_Float("Rotations", self, [] )) .setArrayDepth(2); - inputs[11] = nodeValue_Float("Scales", self, [] ) + newInput(11, nodeValue_Float("Scales", self, [] )) .setArrayDepth(2); - inputs[12] = nodeValue_Bool("Use Instance", self, true ) + newInput(12, nodeValue_Bool("Use Instance", self, true )) outputs[0] = nodeValue_Output("Scene", self, VALUE_TYPE.d3Scene, noone); 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 b89da0e0a..8e8ba668c 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) + newInput(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 c5d867df5..4e0b4853d 100644 --- a/scripts/node_3d_scene/node_3d_scene.gml +++ b/scripts/node_3d_scene/node_3d_scene.gml @@ -7,7 +7,7 @@ function Node_3D_Scene(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constru static createNewInput = function() { var index = array_length(inputs); - inputs[index] = nodeValue_D3Mesh("Object", self, noone) + newInput(index, nodeValue_D3Mesh("Object", self, noone)) .setVisible(true, true); return inputs[index]; 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 d6e45effa..7f01eb7e4 100644 --- a/scripts/node_3d_set_material/node_3d_set_material.gml +++ b/scripts/node_3d_set_material/node_3d_set_material.gml @@ -1,11 +1,11 @@ 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()) + newInput(in_mesh + 0, nodeValue_D3Material("Materials", self, new __d3dMaterial())) .setVisible(true, true) .setArrayDepth(1); - inputs[in_mesh + 1] = nodeValue_Bool("Single material", self, true) + newInput(in_mesh + 1, nodeValue_Bool("Single material", self, true)) static preGetInputs = function() { #region var _sing = inputs[in_mesh + 1].getValue(); diff --git a/scripts/node_3d_transform/node_3d_transform.gml b/scripts/node_3d_transform/node_3d_transform.gml index 9e7ecddc4..52b000919 100644 --- a/scripts/node_3d_transform/node_3d_transform.gml +++ b/scripts/node_3d_transform/node_3d_transform.gml @@ -1,7 +1,7 @@ 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) + newInput(in_d3d + 0, nodeValue_D3Mesh("Mesh", self, noone)) .setVisible(true, true); outputs[0] = nodeValue_Output("Mesh", self, VALUE_TYPE.d3Mesh, noone); diff --git a/scripts/node_3d_transform_image/node_3d_mesh_plane.gml b/scripts/node_3d_transform_image/node_3d_mesh_plane.gml index 77f3f9ea9..2f9104534 100644 --- a/scripts/node_3d_transform_image/node_3d_mesh_plane.gml +++ b/scripts/node_3d_transform_image/node_3d_mesh_plane.gml @@ -3,14 +3,14 @@ function Node_3D_Mesh_Plane(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _grou object_class = __3dPlane; - inputs[| in_mesh + 0] = nodeValue("Material", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3Material, noone ) + newInput(| in_mesh + 0, nodeValue("Material", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3Material, noone )) .setVisible(true, true); newInput(| in_mesh + 1, nodeValue_Enum_Button("Normal", self, 2 , [ "X", "Y", "Z" ])); - inputs[| in_mesh + 2] = nodeValue_Bool("Both side", self, false ) + newInput(| in_mesh + 2, nodeValue_Bool("Both side", self, false )) - inputs[| in_mesh + 3] = nodeValue("Back Material", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3Material, noone ) + newInput(| in_mesh + 3, nodeValue("Back Material", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3Material, noone )) input_display_list = [ __d3d_input_list_mesh, in_mesh + 1, 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 5828c2bdd..f8c95eb03 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) + newInput(in_mesh + 0, nodeValue_Surface("Surface", self)) .setVisible(true, true); input_display_list = [ 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 9a7b17e45..f7ba7c03f 100644 --- a/scripts/node_3d_transform_scene/node_3d_transform_scene.gml +++ b/scripts/node_3d_transform_scene/node_3d_transform_scene.gml @@ -1,16 +1,16 @@ 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) + newInput(0, nodeValue_D3Scene("Scene", self, noone)) .setVisible(true, true); - inputs[1] = nodeValue_Float("Position", self, []) + newInput(1, nodeValue_Float("Position", self, [])) .setArrayDepth(2); - inputs[2] = nodeValue_Float("Rotation", self, []) + newInput(2, nodeValue_Float("Rotation", self, [])) .setArrayDepth(2); - inputs[3] = nodeValue_Float("Scale", self, []) + newInput(3, nodeValue_Float("Scale", self, [])) .setArrayDepth(2); newInput(4, nodeValue_Enum_Scroll("Positioning type", self, 0, [ "Additive", "Override" ])); 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 760d12505..8adfd20d1 100644 --- a/scripts/node_3d_uv_remap/node_3d_uv_remap.gml +++ b/scripts/node_3d_uv_remap/node_3d_uv_remap.gml @@ -2,13 +2,13 @@ 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) + newInput(in_d3d + 0, nodeValue_D3Mesh("Mesh", self, noone)) .setVisible(true, true); - inputs[in_d3d + 1] = nodeValue_Int("Target subobject", self, -1) + newInput(in_d3d + 1, nodeValue_Int("Target subobject", self, -1)) .setArrayDepth(1); - inputs[in_d3d + 2] = nodeValue_Int("Bake UV", self, 0) + newInput(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); diff --git a/scripts/node_3dsurf/node_3dsurf.gml b/scripts/node_3dsurf/node_3dsurf.gml index 161a78307..1f84e0b8e 100644 --- a/scripts/node_3dsurf/node_3dsurf.gml +++ b/scripts/node_3dsurf/node_3dsurf.gml @@ -3,12 +3,12 @@ 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) + newInput(0, nodeValue_D3Scene("Scene", self, noone)) .setVisible(true, true); newInput(1, nodeValue_Vec2("Base Dimension", self, DEF_SURF)); - inputs[2] = nodeValue_Float("Vertical Angle", self, 45 ) + newInput(2, nodeValue_Float("Vertical Angle", self, 45 )) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 0.1] }); newInput(3, nodeValue_Float("Distance", self, 4 )); diff --git a/scripts/node_9slice/node_9slice.gml b/scripts/node_9slice/node_9slice.gml index c8eb2555d..1bb416259 100644 --- a/scripts/node_9slice/node_9slice.gml +++ b/scripts/node_9slice/node_9slice.gml @@ -5,7 +5,7 @@ function Node_9Slice(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co newInput(1, nodeValue_Dimension(self)); - inputs[2] = nodeValue_Padding("Splice", self, [ 0, 0, 0, 0 ]) + newInput(2, nodeValue_Padding("Splice", self, [ 0, 0, 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); newInput(3, nodeValue_Enum_Scroll("Filling modes", self, 0, [ "Scale", "Repeat" ])); diff --git a/scripts/node_FFT/node_FFT.gml b/scripts/node_FFT/node_FFT.gml index 4d7f3cf63..7c3f6be34 100644 --- a/scripts/node_FFT/node_FFT.gml +++ b/scripts/node_FFT/node_FFT.gml @@ -2,7 +2,7 @@ function Node_FFT(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const name = "FFT"; setDimension(96, 72); - inputs[0] = nodeValue_Float("Data", self, []) + newInput(0, nodeValue_Float("Data", self, [])) .setArrayDepth(1) .setVisible(true, true); 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 8201f49b2..2073fdfc3 100644 --- a/scripts/node_FLIP_add_rigidbody/node_FLIP_add_rigidbody.gml +++ b/scripts/node_FLIP_add_rigidbody/node_FLIP_add_rigidbody.gml @@ -6,10 +6,10 @@ function Node_FLIP_Add_Rigidbody(_x, _y, _group = noone) : Node(_x, _y, _group) manual_ungroupable = false; - inputs[0] = nodeValue_Fdomain("Domain", self, noone ) + newInput(0, nodeValue_Fdomain("Domain", self, noone )) .setVisible(true, true); - inputs[1] = nodeValue("Objects", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, [] ) + newInput(1, nodeValue("Objects", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, [] )) .setVisible(true, true); input_display_list = [ 0, 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 455731263..4aad6351b 100644 --- a/scripts/node_FLIP_apply_force/node_FLIP_apply_force.gml +++ b/scripts/node_FLIP_apply_force/node_FLIP_apply_force.gml @@ -22,10 +22,10 @@ function Node_FLIP_Apply_Force(_x, _y, _group = noone) : Node(_x, _y, _group) co manual_ungroupable = false; - inputs[0] = nodeValue_Fdomain("Domain", self, noone ) + newInput(0, nodeValue_Fdomain("Domain", self, noone )) .setVisible(true, true); - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ] ) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ] )) .setUnitRef(function(index) { return getDimension(); }); inputs[2] = nodeValue_Float("Radius", self, 4 ) @@ -35,7 +35,7 @@ function Node_FLIP_Apply_Force(_x, _y, _group = noone) : Node(_x, _y, _group) co newInput(4, nodeValue_Vec2("Size", self, [ 4, 4 ] )); - inputs[5] = nodeValue_Surface("Texture", self) + newInput(5, nodeValue_Surface("Texture", self)) input_display_list = [ 0, ["Collider", false], 3, 2, 4, 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 41bc6cd2a..50b011c7b 100644 --- a/scripts/node_FLIP_apply_velocity/node_FLIP_apply_velocity.gml +++ b/scripts/node_FLIP_apply_velocity/node_FLIP_apply_velocity.gml @@ -6,10 +6,10 @@ function Node_FLIP_Apply_Velocity(_x, _y, _group = noone) : Node(_x, _y, _group) manual_ungroupable = false; - inputs[0] = nodeValue_Fdomain("Domain", self, noone ) + newInput(0, nodeValue_Fdomain("Domain", self, noone )) .setVisible(true, true); - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ] ) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ] )) .setUnitRef(function(index) { return getDimension(); }); inputs[2] = nodeValue_Float("Radius", self, 4 ) diff --git a/scripts/node_FLIP_destroy/node_FLIP_destroy.gml b/scripts/node_FLIP_destroy/node_FLIP_destroy.gml index f45127127..2b1ff0920 100644 --- a/scripts/node_FLIP_destroy/node_FLIP_destroy.gml +++ b/scripts/node_FLIP_destroy/node_FLIP_destroy.gml @@ -6,10 +6,10 @@ function Node_FLIP_Destroy(_x, _y, _group = noone) : Node(_x, _y, _group) constr manual_ungroupable = false; - inputs[0] = nodeValue_Fdomain("Domain", self, noone ) + newInput(0, nodeValue_Fdomain("Domain", self, noone )) .setVisible(true, true); - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ] ) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ] )) .setUnitRef(function(index) { return getDimension(); }); newInput(2, nodeValue_Enum_Scroll("Shape", self, 0 , [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Rectangle", s_node_shape_rectangle, 0), ])); @@ -19,7 +19,7 @@ function Node_FLIP_Destroy(_x, _y, _group = noone) : Node(_x, _y, _group) constr newInput(4, nodeValue_Vec2("Size", self, [ 4, 4 ] )); - inputs[5] = nodeValue_Float("Ratio", self, 1 ) + newInput(5, nodeValue_Float("Ratio", self, 1 )) .setDisplay(VALUE_DISPLAY.slider); outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.fdomain, noone ); diff --git a/scripts/node_FLIP_domain/node_FLIP_domain.gml b/scripts/node_FLIP_domain/node_FLIP_domain.gml index 5dd9db002..40ac81320 100644 --- a/scripts/node_FLIP_domain/node_FLIP_domain.gml +++ b/scripts/node_FLIP_domain/node_FLIP_domain.gml @@ -13,14 +13,14 @@ function Node_FLIP_Domain(_x, _y, _group = noone) : Node(_x, _y, _group) constru newInput(2, nodeValue_Int("Particle Density", self, 10)); - inputs[3] = nodeValue_Float("FLIP Ratio", self, 0.8) + newInput(3, nodeValue_Float("FLIP Ratio", self, 0.8)) .setDisplay(VALUE_DISPLAY.slider); newInput(4, nodeValue_Float("Resolve accelerator", self, 1.5)); newInput(5, nodeValue_Int("Iteration", self, 8)); - inputs[6] = nodeValue_Float("Damping", self, 0.8) + newInput(6, nodeValue_Float("Damping", self, 0.8)) .setDisplay(VALUE_DISPLAY.slider); newInput(7, nodeValue_Float("Gravity", self, 5)); @@ -29,13 +29,13 @@ function Node_FLIP_Domain(_x, _y, _group = noone) : Node(_x, _y, _group) constru newInput(9, nodeValue_Toggle("Wall", self, 0b1111, { data: [ "T", "B", "L", "R" ] })); - inputs[10] = nodeValue_Float("Viscosity", self, 0.) + newInput(10, nodeValue_Float("Viscosity", self, 0.)) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); - inputs[11] = nodeValue_Float("Friction", self, 0.) + newInput(11, nodeValue_Float("Friction", self, 0.)) .setDisplay(VALUE_DISPLAY.slider); - inputs[12] = nodeValue_Float("Wall Elasticity", self, 0.) + newInput(12, nodeValue_Float("Wall Elasticity", self, 0.)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); newInput(13, nodeValue_Rotation("Gravity Direction", self, 0)); diff --git a/scripts/node_FLIP_render/node_FLIP_render.gml b/scripts/node_FLIP_render/node_FLIP_render.gml index 704d45e21..8595a2280 100644 --- a/scripts/node_FLIP_render/node_FLIP_render.gml +++ b/scripts/node_FLIP_render/node_FLIP_render.gml @@ -5,10 +5,10 @@ function Node_FLIP_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constru manual_ungroupable = false; - inputs[0] = nodeValue_Fdomain("Domain", self, noone) + newInput(0, nodeValue_Fdomain("Domain", self, noone)) .setVisible(true, true); - inputs[1] = nodeValue_Float("Merge threshold", self, 0.75) + newInput(1, nodeValue_Float("Merge threshold", self, 0.75)) .setDisplay(VALUE_DISPLAY.slider); newInput(2, nodeValue_Range("Lifespan", self, [ 0, 0 ], { linked : true })); diff --git a/scripts/node_FLIP_repel/node_FLIP_repel.gml b/scripts/node_FLIP_repel/node_FLIP_repel.gml index be8999e93..d712b3a74 100644 --- a/scripts/node_FLIP_repel/node_FLIP_repel.gml +++ b/scripts/node_FLIP_repel/node_FLIP_repel.gml @@ -6,15 +6,15 @@ function Node_FLIP_Repel(_x, _y, _group = noone) : Node(_x, _y, _group) construc manual_ungroupable = false; - inputs[0] = nodeValue_Fdomain("Domain", self, noone ) + newInput(0, nodeValue_Fdomain("Domain", self, noone )) .setVisible(true, true); - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ] ) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ] )) .setUnitRef(function(index) { return getDimension(); }); newInput(2, nodeValue_Float("Radius", self, 4 )); - inputs[3] = nodeValue_Float("Strength", self, 4 ) + newInput(3, nodeValue_Float("Strength", self, 4 )) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 16, 0.1 ] }); input_display_list = [ 0, diff --git a/scripts/node_FLIP_spawner/node_FLIP_spawner.gml b/scripts/node_FLIP_spawner/node_FLIP_spawner.gml index f587e44c4..e7d9fbaed 100644 --- a/scripts/node_FLIP_spawner/node_FLIP_spawner.gml +++ b/scripts/node_FLIP_spawner/node_FLIP_spawner.gml @@ -6,12 +6,12 @@ function Node_FLIP_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group) constr manual_ungroupable = false; - inputs[0] = nodeValue_Fdomain("Domain", self, noone ) + newInput(0, nodeValue_Fdomain("Domain", self, noone )) .setVisible(true, true); newInput(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_Vec2("Spawn Position", self, [ 0.5, 0.25 ] ) + newInput(2, nodeValue_Vec2("Spawn Position", self, [ 0.5, 0.25 ] )) .setUnitRef(function(index) { return getDimension(); }, VALUE_UNIT.reference); newInput(3, nodeValue_Enum_Button("Spawn Type", self, 0 , [ "Stream", "Splash" ])); @@ -27,7 +27,7 @@ function Node_FLIP_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group) constr 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)) + newInput(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) }); newInput(10, nodeValue_Rotation_Random("Spawn Direction", self, [ 0, 45, 135, 0, 0 ] )); 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 904480999..d1e719040 100644 --- a/scripts/node_FLIP_to_VFX/node_FLIP_to_VFX.gml +++ b/scripts/node_FLIP_to_VFX/node_FLIP_to_VFX.gml @@ -6,7 +6,7 @@ function Node_FLIP_to_VFX(_x, _y, _group = noone) : Node(_x, _y, _group) constru manual_ungroupable = false; - inputs[0] = nodeValue_Fdomain("Domain", self, noone) + newInput(0, nodeValue_Fdomain("Domain", self, noone)) .setVisible(true, true); outputs[0] = nodeValue_Output("Particles", self, VALUE_TYPE.particle, [] ); diff --git a/scripts/node_FLIP_update/node_FLIP_update.gml b/scripts/node_FLIP_update/node_FLIP_update.gml index 4f3997820..8e17c1c4d 100644 --- a/scripts/node_FLIP_update/node_FLIP_update.gml +++ b/scripts/node_FLIP_update/node_FLIP_update.gml @@ -6,7 +6,7 @@ function Node_FLIP_Update(_x, _y, _group = noone) : Node(_x, _y, _group) constru manual_ungroupable = false; - inputs[0] = nodeValue_Fdomain("Domain", self, noone) + newInput(0, nodeValue_Fdomain("Domain", self, noone)) .setVisible(true, true); newInput(1, nodeValue_Bool("Update", self, true)); diff --git a/scripts/node_FLIP_vortex/node_FLIP_vortex.gml b/scripts/node_FLIP_vortex/node_FLIP_vortex.gml index 8c94b2485..c36c315cd 100644 --- a/scripts/node_FLIP_vortex/node_FLIP_vortex.gml +++ b/scripts/node_FLIP_vortex/node_FLIP_vortex.gml @@ -6,18 +6,18 @@ function Node_FLIP_Vortex(_x, _y, _group = noone) : Node(_x, _y, _group) constru manual_ungroupable = false; - inputs[0] = nodeValue_Fdomain("Domain", self, noone ) + newInput(0, nodeValue_Fdomain("Domain", self, noone )) .setVisible(true, true); - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ] ) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ] )) .setUnitRef(function(index) { return getDimension(); }); newInput(2, nodeValue_Float("Radius", self, 4 )); - inputs[3] = nodeValue_Float("Strength", self, 4 ) + newInput(3, nodeValue_Float("Strength", self, 4 )) .setDisplay(VALUE_DISPLAY.slider, { range: [ -8, 8, 0.01 ] }); - inputs[4] = nodeValue_Float("Attraction", self, 0 ) + newInput(4, nodeValue_Float("Attraction", self, 0 )) .setDisplay(VALUE_DISPLAY.slider, { range: [ -8, 8, 0.01 ] }); input_display_list = [ 0, diff --git a/scripts/node_FLIP_wall/node_FLIP_wall.gml b/scripts/node_FLIP_wall/node_FLIP_wall.gml index b93c20625..7fc46b809 100644 --- a/scripts/node_FLIP_wall/node_FLIP_wall.gml +++ b/scripts/node_FLIP_wall/node_FLIP_wall.gml @@ -6,7 +6,7 @@ function Node_FLIP_Wall(_x, _y, _group = noone) : Node(_x, _y, _group) construct manual_ungroupable = false; - inputs[0] = nodeValue_Fdomain("Domain", self, noone ) + newInput(0, nodeValue_Fdomain("Domain", self, noone )) .setVisible(true, true); newInput(1, nodeValue_Area("Area", self, DEF_AREA , { useShape : false })); diff --git a/scripts/node_FXAA/node_FXAA.gml b/scripts/node_FXAA/node_FXAA.gml index 9c62778cf..f8ca49912 100644 --- a/scripts/node_FXAA/node_FXAA.gml +++ b/scripts/node_FXAA/node_FXAA.gml @@ -5,10 +5,10 @@ function Node_FXAA(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons newInput(1, nodeValue_Bool("Active", self, true)); - inputs[2] = nodeValue_Float("Distance", self, 0.5) + newInput(2, nodeValue_Float("Distance", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider); - inputs[3] = nodeValue_Float("Mix", self, 1) + newInput(3, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); active_index = 1; diff --git a/scripts/node_PCX_equation/node_PCX_equation.gml b/scripts/node_PCX_equation/node_PCX_equation.gml index e69b76d4d..453250ea4 100644 --- a/scripts/node_PCX_equation/node_PCX_equation.gml +++ b/scripts/node_PCX_equation/node_PCX_equation.gml @@ -50,10 +50,10 @@ function Node_PCX_Equation(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) co static createNewInput = function() { var index = array_length(inputs); - inputs[index + 0] = nodeValue_Text("Argument name", self, "" ) + newInput(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 ) + newInput(index + 1, nodeValue("Argument value", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone )) .setVisible(true, true); inputs[index + 1].editWidget.interactable = false; diff --git a/scripts/node_VCT/node_VCT.gml b/scripts/node_VCT/node_VCT.gml index f3314874d..5d2c0042f 100644 --- a/scripts/node_VCT/node_VCT.gml +++ b/scripts/node_VCT/node_VCT.gml @@ -4,7 +4,7 @@ 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) + newInput(0, nodeValue_Int("Editor", self, 0)) .setDisplay(VALUE_DISPLAY.button, { name: "Editor", onClick: function() { vct.createDialog(); } }); @@ -22,7 +22,7 @@ function Node_VCT(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const var _var = vct[$ key]; - inputs[index] = nodeValue(name, self, JUNCTION_CONNECT.input, _var.type, 0) + newInput(index, nodeValue(name, self, JUNCTION_CONNECT.input, _var.type, 0)) .setDisplay(_var.disp, _var.disp_data); inputs[index].display_data.key = key; diff --git a/scripts/node_VFX_group/node_VFX_group.gml b/scripts/node_VFX_group/node_VFX_group.gml index c5fc40d3f..623083e85 100644 --- a/scripts/node_VFX_group/node_VFX_group.gml +++ b/scripts/node_VFX_group/node_VFX_group.gml @@ -15,7 +15,7 @@ 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 ) + newInput(0, nodeValue_Bool("Loop", self, true )) .rejectArray(); custom_input_index = array_length(inputs); 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 42e2a827b..6d9d09090 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 ) + newInput(0, nodeValue_Bool("Loop", self, true )) .rejectArray(); is_simulation = true; diff --git a/scripts/node_VFX_override/node_VFX_override.gml b/scripts/node_VFX_override/node_VFX_override.gml index d0af77dce..9ca3ce2e2 100644 --- a/scripts/node_VFX_override/node_VFX_override.gml +++ b/scripts/node_VFX_override/node_VFX_override.gml @@ -7,7 +7,7 @@ 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 ) + newInput(0, nodeValue_Particle("Particles", self, -1 )) .setVisible(true, true); newInput(1, nodeValue_Float("Positions", self, noone )); @@ -20,7 +20,7 @@ function Node_VFX_Override(_x, _y, _group = noone) : Node(_x, _y, _group) constr newInput(5, nodeValue_Float("Alpha", self, noone )); - inputs[6] = nodeValue_Surface("Surface", self) + newInput(6, nodeValue_Surface("Surface", self)) .setVisible(true, false); outputs[0] = nodeValue_Output("Particles", self, VALUE_TYPE.particle, -1 ); diff --git a/scripts/node_VFX_renderer/node_VFX_renderer.gml b/scripts/node_VFX_renderer/node_VFX_renderer.gml index 75f7911f0..1579fa9d8 100644 --- a/scripts/node_VFX_renderer/node_VFX_renderer.gml +++ b/scripts/node_VFX_renderer/node_VFX_renderer.gml @@ -8,13 +8,13 @@ function Node_VFX_Renderer(_x, _y, _group = noone) : Node(_x, _y, _group) constr newInput(0, nodeValue_Vec2("Output dimension", self, DEF_SURF )); - inputs[1] = nodeValue_Bool("Round position", self, true, "Round position to the closest integer value to avoid jittering.") + newInput(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" ]) + newInput(2, nodeValue_Enum_Button("Render Type", self, PARTICLE_RENDER_TYPE.surface , [ "Surface", "Line" ])) .rejectArray(); - inputs[3] = nodeValue_Int("Line life", self, 4 ) + newInput(3, nodeValue_Int("Line life", self, 4 )) .rejectArray(); input_display_list = [ @@ -28,10 +28,10 @@ function Node_VFX_Renderer(_x, _y, _group = noone) : Node(_x, _y, _group) constr static createNewInput = function() { var index = array_length(inputs); - inputs[index + 0] = nodeValue_Enum_Scroll("Blend mode", self, 0 , [ "Normal", "Alpha", "Additive" ]) + newInput(index + 0, nodeValue_Enum_Scroll("Blend mode", self, 0 , [ "Normal", "Alpha", "Additive" ])) .rejectArray(); - inputs[index + 1] = nodeValue_Particle("Particles", self, noone ) + newInput(index + 1, nodeValue_Particle("Particles", self, noone )) .setVisible(true, true); array_push(input_display_list, ["Particle", false], index + 0, index + 1); 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 ce5bc7e91..cf82f6c4f 100644 --- a/scripts/node_VFX_renderer_output/node_VFX_renderer_output.gml +++ b/scripts/node_VFX_renderer_output/node_VFX_renderer_output.gml @@ -9,13 +9,13 @@ function Node_VFX_Renderer_Output(_x, _y, _group = noone) : Node_Group_Output(_x newInput(0, nodeValue_Vec2("Output dimension", self, DEF_SURF)); - inputs[1] = nodeValue_Bool("Round position", self, true, "Round position to the closest integer value to avoid jittering.") + newInput(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" ]) + newInput(2, nodeValue_Enum_Button("Render Type", self, PARTICLE_RENDER_TYPE.surface , [ "Surface", "Line" ])) .rejectArray(); - inputs[3] = nodeValue_Int("Line life", self, 4 ) + newInput(3, nodeValue_Int("Line life", self, 4 )) .rejectArray(); input_display_list = [ @@ -34,10 +34,10 @@ function Node_VFX_Renderer_Output(_x, _y, _group = noone) : Node_Group_Output(_x static createNewInput = function() { var index = array_length(inputs); - inputs[index + 0] = nodeValue_Enum_Scroll("Blend mode", self, 0 , [ "Normal", "Alpha", "Additive" ]) + newInput(index + 0, nodeValue_Enum_Scroll("Blend mode", self, 0 , [ "Normal", "Alpha", "Additive" ])) .rejectArray(); - inputs[index + 1] = nodeValue_Particle("Particles", self, noone ) + newInput(index + 1, nodeValue_Particle("Particles", self, noone )) .setVisible(true, true); array_push(input_display_list, ["Particle", false], index + 0, index + 1); diff --git a/scripts/node_VFX_spawner/node_VFX_spawner.gml b/scripts/node_VFX_spawner/node_VFX_spawner.gml index 899a8ee85..8e083bef1 100644 --- a/scripts/node_VFX_spawner/node_VFX_spawner.gml +++ b/scripts/node_VFX_spawner/node_VFX_spawner.gml @@ -12,7 +12,7 @@ function Node_VFX_Spawner(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y inputs[21].setVisible(false, false); - inputs[input_len + 0] = nodeValue("Spawn trigger", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, false) + newInput(input_len + 0, nodeValue("Spawn trigger", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, false)) .setVisible(true, true); newInput(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.")); diff --git a/scripts/node_VFX_trail/node_VFX_trail.gml b/scripts/node_VFX_trail/node_VFX_trail.gml index b3a55fed8..8aeaa7d55 100644 --- a/scripts/node_VFX_trail/node_VFX_trail.gml +++ b/scripts/node_VFX_trail/node_VFX_trail.gml @@ -10,7 +10,7 @@ function Node_VFX_Trail(_x, _y, _group = noone) : Node(_x, _y, _group) construct lineLength = []; lineData = []; - inputs[0] = nodeValue_Particle("Particles", self, -1 ) + newInput(0, nodeValue_Particle("Particles", self, -1 )) .setVisible(true, true); newInput(1, nodeValue_Int("Life", self, 4 )); diff --git a/scripts/node_VFX_triangulate/node_VFX_triangulate.gml b/scripts/node_VFX_triangulate/node_VFX_triangulate.gml index be4c9176d..ed7b6952f 100644 --- a/scripts/node_VFX_triangulate/node_VFX_triangulate.gml +++ b/scripts/node_VFX_triangulate/node_VFX_triangulate.gml @@ -16,7 +16,7 @@ function Node_VFX_Triangulate(_x, _y, _group = noone) : Node(_x, _y, _group) con newInput(0, nodeValue_Vec2("Output dimension", self, DEF_SURF )); - inputs[1] = nodeValue_Particle("Particles", self, -1 ) + newInput(1, nodeValue_Particle("Particles", self, -1 )) .setVisible(true, true); newInput(2, nodeValue_Float("Thickness", self, 1 )); diff --git a/scripts/node_VFX_variable/node_VFX_variable.gml b/scripts/node_VFX_variable/node_VFX_variable.gml index 253232020..b346877b0 100644 --- a/scripts/node_VFX_variable/node_VFX_variable.gml +++ b/scripts/node_VFX_variable/node_VFX_variable.gml @@ -8,7 +8,7 @@ function Node_VFX_Variable(_x, _y, _group = noone) : Node(_x, _y, _group) constr manual_ungroupable = false; - inputs[0] = nodeValue_Particle("Particles", self, -1 ) + newInput(0, nodeValue_Particle("Particles", self, -1 )) .setVisible(true, true); input_display_list = [ 0 ]; diff --git a/scripts/node_active_canvas/node_active_canvas.gml b/scripts/node_active_canvas/node_active_canvas.gml index f539e05a4..a07a71421 100644 --- a/scripts/node_active_canvas/node_active_canvas.gml +++ b/scripts/node_active_canvas/node_active_canvas.gml @@ -13,7 +13,7 @@ function Node_Active_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) const newInput(5, nodeValue_Color("Color", self, c_white )); - inputs[6] = nodeValue_Float("Alpha", self, 1 ) + newInput(6, nodeValue_Float("Alpha", self, 1 )) .setDisplay(VALUE_DISPLAY.slider); newInput(7, nodeValue_Bool("Active", self, true )); diff --git a/scripts/node_alpha_cutoff/node_alpha_cutoff.gml b/scripts/node_alpha_cutoff/node_alpha_cutoff.gml index 393a26e5e..ca887a60a 100644 --- a/scripts/node_alpha_cutoff/node_alpha_cutoff.gml +++ b/scripts/node_alpha_cutoff/node_alpha_cutoff.gml @@ -3,12 +3,12 @@ function Node_Alpha_Cutoff(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(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.") + newInput(1, nodeValue_Float("Minimum", self, 0.2, "Any pixel with less alpha (more transparent) than this will be removed.")) .setDisplay(VALUE_DISPLAY.slider); newInput(2, nodeValue_Surface("Mask", self)); - inputs[3] = nodeValue_Float("Mix", self, 1) + newInput(3, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(4, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_anim_curve/node_anim_curve.gml b/scripts/node_anim_curve/node_anim_curve.gml index b81e77431..48418e176 100644 --- a/scripts/node_anim_curve/node_anim_curve.gml +++ b/scripts/node_anim_curve/node_anim_curve.gml @@ -5,7 +5,7 @@ function Node_Anim_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group setDimension(96, 48); newInput(0, nodeValue("Curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01)); - inputs[1] = nodeValue_Float("Progress", self, 0) + newInput(1, nodeValue_Float("Progress", self, 0)) .setDisplay(VALUE_DISPLAY.slider); newInput(2, nodeValue_Float("Minimum", self, 0)); diff --git a/scripts/node_area/node_area.gml b/scripts/node_area/node_area.gml index 36139e5ec..d3d7e30d0 100644 --- a/scripts/node_area/node_area.gml +++ b/scripts/node_area/node_area.gml @@ -3,10 +3,10 @@ function Node_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons color = COLORS.node_blend_number; setDimension(96, 48); - inputs[0] = nodeValue_Vec2("Position", self, [ 0, 0 ] ) + newInput(0, nodeValue_Vec2("Position", self, [ 0, 0 ] )) .setVisible(true, true); - inputs[1] = nodeValue_Vec2("Span", self, [ 16, 16 ] ) + newInput(1, nodeValue_Vec2("Span", self, [ 16, 16 ] )) .setVisible(true, true); inputs[2] = nodeValue_Enum_Scroll("Shape", self, AREA_SHAPE.rectangle, [ diff --git a/scripts/node_armature_bind/node_armature_bind.gml b/scripts/node_armature_bind/node_armature_bind.gml index e19fd4e43..5838f7083 100644 --- a/scripts/node_armature_bind/node_armature_bind.gml +++ b/scripts/node_armature_bind/node_armature_bind.gml @@ -14,17 +14,17 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Armature("Armature", self, noone) + newInput(1, nodeValue_Armature("Armature", self, noone)) .setVisible(true, true) .rejectArray(); - inputs[2] = nodeValue_Struct("Bind data", self, noone) + newInput(2, nodeValue_Struct("Bind data", self, noone)) .setVisible(true, true) .setArrayDepth(1); newInput(3, nodeValue_Vec2("Bone transform", self, [ 0, 0 ])); - inputs[4] = nodeValue_Float("Bone scale", self, 1) + newInput(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); @@ -400,7 +400,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr 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 ] ) + newInput(index + 1, nodeValue_Float("Transform", self, [ 0, 0, 0, 1, 1 ] )) .setDisplay(VALUE_DISPLAY.transform); newInput(index + 2, nodeValue_Bool("Inherit Rotation", self, true )); newInput(index + 3, nodeValue_Bool("Apply Bone Rotation", self, false )); diff --git a/scripts/node_armature_path/node_armature_path.gml b/scripts/node_armature_path/node_armature_path.gml index ec1bfdd70..920923316 100644 --- a/scripts/node_armature_path/node_armature_path.gml +++ b/scripts/node_armature_path/node_armature_path.gml @@ -2,7 +2,7 @@ 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) + newInput(0, nodeValue_Armature("Armature", self, noone)) .setVisible(true, true) .rejectArray(); diff --git a/scripts/node_armature_pose/node_armature_pose.gml b/scripts/node_armature_pose/node_armature_pose.gml index 9191a4d15..31855d6d3 100644 --- a/scripts/node_armature_pose/node_armature_pose.gml +++ b/scripts/node_armature_pose/node_armature_pose.gml @@ -2,7 +2,7 @@ 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) + newInput(0, nodeValue_Armature("Armature", self, noone)) .setVisible(true, true); input_display_list = [ 0, @@ -27,7 +27,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const static createNewInput = function(bone = noone) { var index = array_length(inputs); - inputs[index] = nodeValue(bone != noone? bone.name : "bone", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 1 ] ) + newInput(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; diff --git a/scripts/node_armature_sample/node_armature_sample.gml b/scripts/node_armature_sample/node_armature_sample.gml index e5bc0da34..76f785247 100644 --- a/scripts/node_armature_sample/node_armature_sample.gml +++ b/scripts/node_armature_sample/node_armature_sample.gml @@ -2,13 +2,13 @@ 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) + newInput(0, nodeValue_Armature("Armature", self, noone)) .setVisible(true, true) .rejectArray(); newInput(1, nodeValue_Text("Bone name", self, "")); - inputs[2] = nodeValue_Float("Sample point", self, 0) + newInput(2, nodeValue_Float("Sample point", self, 0)) .setDisplay(VALUE_DISPLAY.slider); outputs[0] = nodeValue_Output("Position", self, VALUE_TYPE.integer, [ 0, 0 ]) diff --git a/scripts/node_array/node_array.gml b/scripts/node_array/node_array.gml index 7e363b135..de1a9f981 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 }) + newInput(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." ) + newInput(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) { @@ -36,7 +36,7 @@ function Node_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var index = array_length(inputs); var _typ = getType(); - inputs[index] = nodeValue("Input", self, JUNCTION_CONNECT.input, _typ, -1 ) + newInput(index, nodeValue("Input", self, JUNCTION_CONNECT.input, _typ, -1 )) .setVisible(true, true); array_push(input_display_list, index); diff --git a/scripts/node_array_add/node_array_add.gml b/scripts/node_array_add/node_array_add.gml index 92ed429de..973788554 100644 --- a/scripts/node_array_add/node_array_add.gml +++ b/scripts/node_array_add/node_array_add.gml @@ -2,10 +2,10 @@ 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) + newInput(0, nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)) .setVisible(true, true); - inputs[1] = nodeValue_Bool("Spread array", self, false ) + newInput(1, nodeValue_Bool("Spread array", self, false )) .rejectArray(); outputs[0] = nodeValue_Output("Output", self, VALUE_TYPE.integer, 0); @@ -15,7 +15,7 @@ function Node_Array_Add(_x, _y, _group = noone) : Node(_x, _y, _group) construct static createNewInput = function() { var index = array_length(inputs); - inputs[index] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 ) + newInput(index, nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 )) .setVisible(true, true); array_push(input_display_list, index); diff --git a/scripts/node_array_composite/node_array_composite.gml b/scripts/node_array_composite/node_array_composite.gml index ed94e1107..e439e7937 100644 --- a/scripts/node_array_composite/node_array_composite.gml +++ b/scripts/node_array_composite/node_array_composite.gml @@ -2,11 +2,11 @@ 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, []) + newInput(0, nodeValue_Float("Array", self, [])) .setArrayDepth(1) .setVisible(true, true); - inputs[1] = nodeValue_Float("Compose", self, []) + newInput(1, nodeValue_Float("Compose", self, [])) .setArrayDepth(1) .setVisible(true, true); diff --git a/scripts/node_array_convolute/node_array_convolute.gml b/scripts/node_array_convolute/node_array_convolute.gml index 85a9467db..37d0a2d53 100644 --- a/scripts/node_array_convolute/node_array_convolute.gml +++ b/scripts/node_array_convolute/node_array_convolute.gml @@ -2,11 +2,11 @@ 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) + newInput(0, nodeValue_Float("Array", self, 0)) .setArrayDepth(1) .setVisible(true, true); - inputs[1] = nodeValue_Float("Kernel", self, []) + newInput(1, nodeValue_Float("Kernel", self, [])) .setArrayDepth(1) .setVisible(true, true); diff --git a/scripts/node_array_copy/node_array_copy.gml b/scripts/node_array_copy/node_array_copy.gml index b5dc61893..cb232847a 100644 --- a/scripts/node_array_copy/node_array_copy.gml +++ b/scripts/node_array_copy/node_array_copy.gml @@ -2,7 +2,7 @@ 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) + newInput(0, nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)) .setArrayDepth(1) .setVisible(true, true); 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 60fe89e62..796e0096f 100644 --- a/scripts/node_array_csv_parse/node_array_csv_parse.gml +++ b/scripts/node_array_csv_parse/node_array_csv_parse.gml @@ -2,7 +2,7 @@ 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) + newInput(0, nodeValue_Text("CSV string", self, 0)) .setVisible(true, true); newInput(1, nodeValue_Int("Skip line", self, 0)); diff --git a/scripts/node_array_find/node_array_find.gml b/scripts/node_array_find/node_array_find.gml index 68cbc8464..a8dbd4225 100644 --- a/scripts/node_array_find/node_array_find.gml +++ b/scripts/node_array_find/node_array_find.gml @@ -2,10 +2,10 @@ 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) + newInput(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) + newInput(1, nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)) .setVisible(true, true) .rejectArray(); diff --git a/scripts/node_array_get/node_array_get.gml b/scripts/node_array_get/node_array_get.gml index 345fb5903..03371d27c 100644 --- a/scripts/node_array_get/node_array_get.gml +++ b/scripts/node_array_get/node_array_get.gml @@ -2,13 +2,13 @@ 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) + newInput(0, nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)) .setVisible(true, true); - inputs[1] = nodeValue_Int("Index", self, 0) + newInput(1, nodeValue_Int("Index", self, 0)) .setVisible(true, true); - inputs[2] = nodeValue_Enum_Scroll("Overflow", self, 0, [ "Clamp", "Loop", "Ping Pong" ]) + newInput(2, nodeValue_Enum_Scroll("Overflow", self, 0, [ "Clamp", "Loop", "Ping Pong" ])) .rejectArray(); outputs[0] = nodeValue_Output("Value", self, VALUE_TYPE.any, 0); diff --git a/scripts/node_array_insert/node_array_insert.gml b/scripts/node_array_insert/node_array_insert.gml index 32d724163..0a3f0becd 100644 --- a/scripts/node_array_insert/node_array_insert.gml +++ b/scripts/node_array_insert/node_array_insert.gml @@ -2,15 +2,15 @@ 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) + newInput(0, nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)) .setVisible(true, true); newInput(1, nodeValue_Int("Index", self, 0)); - inputs[2] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + newInput(2, nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)) .setVisible(true, true); - inputs[3] = nodeValue_Bool("Spread array", self, false ) + newInput(3, nodeValue_Bool("Spread array", self, false )) .rejectArray(); outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0); diff --git a/scripts/node_array_length/node_array_length.gml b/scripts/node_array_length/node_array_length.gml index 5a11cddca..450f31b06 100644 --- a/scripts/node_array_length/node_array_length.gml +++ b/scripts/node_array_length/node_array_length.gml @@ -2,7 +2,7 @@ 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) + newInput(0, nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)) .setVisible(true, true); outputs[0] = nodeValue_Output("Size", self, VALUE_TYPE.integer, 0); diff --git a/scripts/node_array_pin/node_array_pin.gml b/scripts/node_array_pin/node_array_pin.gml index 790926f95..eda5c6869 100644 --- a/scripts/node_array_pin/node_array_pin.gml +++ b/scripts/node_array_pin/node_array_pin.gml @@ -17,7 +17,7 @@ function Node_Array_Pin(_x, _y, _group = noone) : Node(_x, _y, _group) construct static createNewInput = function() { var index = array_length(inputs); - inputs[index] = nodeValue("Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 ) + newInput(index, nodeValue("Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 )) .setVisible(true, true); return inputs[index]; diff --git a/scripts/node_array_range/node_array_range.gml b/scripts/node_array_range/node_array_range.gml index beee92e6e..388f1bdf8 100644 --- a/scripts/node_array_range/node_array_range.gml +++ b/scripts/node_array_range/node_array_range.gml @@ -2,13 +2,13 @@ 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) + newInput(0, nodeValue_Float("Start", self, 0)) .rejectArray(); - inputs[1] = nodeValue_Float("End", self, 10) + newInput(1, nodeValue_Float("End", self, 10)) .rejectArray(); - inputs[2] = nodeValue_Float("Step", self, 1) + newInput(2, nodeValue_Float("Step", self, 1)) .rejectArray(); outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.float, []); diff --git a/scripts/node_array_rearrange/node_array_rearrange.gml b/scripts/node_array_rearrange/node_array_rearrange.gml index e6cec9dd3..c7e3c1c16 100644 --- a/scripts/node_array_rearrange/node_array_rearrange.gml +++ b/scripts/node_array_rearrange/node_array_rearrange.gml @@ -4,11 +4,11 @@ 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) + newInput(0, nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)) .setArrayDepth(1) .setVisible(true, true); - inputs[1] = nodeValue_Int("Orders", self, []) + newInput(1, nodeValue_Int("Orders", self, [])) .setArrayDepth(1); outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0) diff --git a/scripts/node_array_remove/node_array_remove.gml b/scripts/node_array_remove/node_array_remove.gml index ac637c1fa..43234b323 100644 --- a/scripts/node_array_remove/node_array_remove.gml +++ b/scripts/node_array_remove/node_array_remove.gml @@ -2,18 +2,18 @@ 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) + newInput(0, nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)) .setVisible(true, true); - inputs[1] = nodeValue_Enum_Button("Type", self, 0, [ "Index", "Value" ]) + newInput(1, nodeValue_Enum_Button("Type", self, 0, [ "Index", "Value" ])) .rejectArray(); newInput(2, nodeValue_Int("Index", self, 0)); - inputs[3] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + newInput(3, nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)) .setVisible(true, true); - inputs[4] = nodeValue_Bool("Spread array", self, false ) + newInput(4, nodeValue_Bool("Spread array", self, false )) .rejectArray(); outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0); diff --git a/scripts/node_array_reverse/node_array_reverse.gml b/scripts/node_array_reverse/node_array_reverse.gml index fcf560e3b..74d98f016 100644 --- a/scripts/node_array_reverse/node_array_reverse.gml +++ b/scripts/node_array_reverse/node_array_reverse.gml @@ -2,7 +2,7 @@ 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) + newInput(0, nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)) .setVisible(true, true); outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0); diff --git a/scripts/node_array_sample/node_array_sample.gml b/scripts/node_array_sample/node_array_sample.gml index f02c7ed06..103abe11a 100644 --- a/scripts/node_array_sample/node_array_sample.gml +++ b/scripts/node_array_sample/node_array_sample.gml @@ -2,11 +2,11 @@ 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, []) + newInput(0, nodeValue_Float("Array", self, [])) .setArrayDepth(1) .setVisible(true, true); - inputs[1] = nodeValue_Float("Step", self, 1) + newInput(1, nodeValue_Float("Step", self, 1)) .setVisible(true, true); outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.float, 0) diff --git a/scripts/node_array_set/node_array_set.gml b/scripts/node_array_set/node_array_set.gml index e3836ccac..e58292a64 100644 --- a/scripts/node_array_set/node_array_set.gml +++ b/scripts/node_array_set/node_array_set.gml @@ -2,12 +2,12 @@ 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) + newInput(0, nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)) .setVisible(true, true); newInput(1, nodeValue_Int("Index", self, 0)); - inputs[2] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + newInput(2, nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)) .setVisible(true, true); outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0); diff --git a/scripts/node_array_shift/node_array_shift.gml b/scripts/node_array_shift/node_array_shift.gml index b044c80b9..2666ea04b 100644 --- a/scripts/node_array_shift/node_array_shift.gml +++ b/scripts/node_array_shift/node_array_shift.gml @@ -2,11 +2,11 @@ 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) + newInput(0, nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)) .setArrayDepth(99) .setVisible(true, true); - inputs[1] = nodeValue_Int("Shift", self, 0) + newInput(1, nodeValue_Int("Shift", self, 0)) outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0); diff --git a/scripts/node_array_shuffle/node_array_shuffle.gml b/scripts/node_array_shuffle/node_array_shuffle.gml index d6ff3bda8..bb2bd0b86 100644 --- a/scripts/node_array_shuffle/node_array_shuffle.gml +++ b/scripts/node_array_shuffle/node_array_shuffle.gml @@ -3,10 +3,10 @@ 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, []) + newInput(0, nodeValue("Array in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, [])) .setVisible(true, true); - inputs[1] = nodeValue_Int("Seed", self, seed_random(6)) + newInput(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(); diff --git a/scripts/node_array_sort/node_array_sort.gml b/scripts/node_array_sort/node_array_sort.gml index b1975a9d2..19e1746e8 100644 --- a/scripts/node_array_sort/node_array_sort.gml +++ b/scripts/node_array_sort/node_array_sort.gml @@ -3,10 +3,10 @@ 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, []) + newInput(0, nodeValue("Array in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, [])) .setVisible(true, true); - inputs[1] = nodeValue_Enum_Button("Order", self, 0, [ "Ascending", "Descending" ]) + newInput(1, nodeValue_Enum_Button("Order", self, 0, [ "Ascending", "Descending" ])) .rejectArray(); outputs[0] = nodeValue_Output("Sorted array", self, VALUE_TYPE.any, []); diff --git a/scripts/node_array_split/node_array_split.gml b/scripts/node_array_split/node_array_split.gml index 784678431..c033d0c48 100644 --- a/scripts/node_array_split/node_array_split.gml +++ b/scripts/node_array_split/node_array_split.gml @@ -4,7 +4,7 @@ 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, []) + newInput(0, nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, [])) .setVisible(true, true); outputs[0] = nodeValue_Output("val 0", self, VALUE_TYPE.any, 0); diff --git a/scripts/node_array_zip/node_array_zip.gml b/scripts/node_array_zip/node_array_zip.gml index 592604bc7..69f15e790 100644 --- a/scripts/node_array_zip/node_array_zip.gml +++ b/scripts/node_array_zip/node_array_zip.gml @@ -2,7 +2,7 @@ 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) + newInput(0, nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)) .setVisible(true, true); outputs[0] = nodeValue_Output("Output", self, VALUE_TYPE.integer, 0); @@ -10,7 +10,7 @@ function Node_Array_Zip(_x, _y, _group = noone) : Node(_x, _y, _group) construct static createNewInput = function() { var index = array_length(inputs); - inputs[index] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 ) + newInput(index, nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 )) .setVisible(true, true); return inputs[index]; 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 9334d2cff..4a08db0f0 100644 --- a/scripts/node_ase_file_read/node_ase_file_read.gml +++ b/scripts/node_ase_file_read/node_ase_file_read.gml @@ -29,10 +29,10 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const w = 128; - inputs[0] = nodeValue_Path("Path", self, "") + newInput(0, nodeValue_Path("Path", self, "")) .setDisplay(VALUE_DISPLAY.path_load, { filter: "Aseprite file|*.ase;*.aseprite" }); - inputs[1] = nodeValue_Trigger("Generate layers", self, false ) + newInput(1, nodeValue_Trigger("Generate layers", self, false )) .setDisplay(VALUE_DISPLAY.button, { name: "Generate", UI : true, onClick: function() { refreshLayers(); } }); newInput(2, nodeValue_Text("Current tag", self, "")); diff --git a/scripts/node_ase_layer/node_ase_layer.gml b/scripts/node_ase_layer/node_ase_layer.gml index 009be6882..b65854a77 100644 --- a/scripts/node_ase_layer/node_ase_layer.gml +++ b/scripts/node_ase_layer/node_ase_layer.gml @@ -1,11 +1,11 @@ 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) + newInput(0, nodeValue("ASE data", self, JUNCTION_CONNECT.input, VALUE_TYPE.object, noone)) .setVisible(false, true) .rejectArray(); - inputs[1] = nodeValue_Bool("Crop Output", self, false) + newInput(1, nodeValue_Bool("Crop Output", self, false)) .rejectArray(); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_atlas_draw/node_atlas_draw.gml b/scripts/node_atlas_draw/node_atlas_draw.gml index 2c449a480..e97381f78 100644 --- a/scripts/node_atlas_draw/node_atlas_draw.gml +++ b/scripts/node_atlas_draw/node_atlas_draw.gml @@ -4,7 +4,7 @@ function Node_Atlas_Draw(_x, _y, _group = noone) : Node(_x, _y, _group) construc newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Surface("Atlas", self) + newInput(1, nodeValue_Surface("Atlas", self)) .setVisible(true, true); outputs[0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_atlas_get/node_atlas_get.gml b/scripts/node_atlas_get/node_atlas_get.gml index 9c0c5c571..97d23fd1b 100644 --- a/scripts/node_atlas_get/node_atlas_get.gml +++ b/scripts/node_atlas_get/node_atlas_get.gml @@ -2,7 +2,7 @@ function Node_Atlas_Get(_x, _y, _group = noone) : Node(_x, _y, _group) construct name = "Atlas Get"; previewable = true; - inputs[0] = nodeValue_Surface("Atlas", self) + newInput(0, nodeValue_Surface("Atlas", self)) .setVisible(true, true); outputs[0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, []) diff --git a/scripts/node_atlas_set/node_atlas_set.gml b/scripts/node_atlas_set/node_atlas_set.gml index 02c18cba9..189e779fa 100644 --- a/scripts/node_atlas_set/node_atlas_set.gml +++ b/scripts/node_atlas_set/node_atlas_set.gml @@ -2,7 +2,7 @@ function Node_Atlas_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construct name = "Atlas Set"; previewable = true; - inputs[0] = nodeValue_Surface("Atlas", self) + newInput(0, nodeValue_Surface("Atlas", self)) .setVisible(true, true); newInput(1, nodeValue_Surface("Surface", self)); 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 685cc91a0..2c0ffb02e 100644 --- a/scripts/node_atlas_to_struct/node_atlas_to_struct.gml +++ b/scripts/node_atlas_to_struct/node_atlas_to_struct.gml @@ -2,7 +2,7 @@ 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) + newInput(0, nodeValue_Surface("Atlas", self)) .setVisible(true, true); outputs[0] = nodeValue_Output("Struct", self, VALUE_TYPE.struct, []) diff --git a/scripts/node_audio_loudness/node_audio_loudness.gml b/scripts/node_audio_loudness/node_audio_loudness.gml index 071f00590..0695ace34 100644 --- a/scripts/node_audio_loudness/node_audio_loudness.gml +++ b/scripts/node_audio_loudness/node_audio_loudness.gml @@ -2,7 +2,7 @@ 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, []) + newInput(0, nodeValue_Float("Audio Data", self, [])) .setArrayDepth(1) .setVisible(true, true); diff --git a/scripts/node_audio_window/node_audio_window.gml b/scripts/node_audio_window/node_audio_window.gml index 112c8bb28..30d8f4149 100644 --- a/scripts/node_audio_window/node_audio_window.gml +++ b/scripts/node_audio_window/node_audio_window.gml @@ -1,12 +1,12 @@ function Node_Audio_Window(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Audio Window"; - inputs[0] = nodeValue_AudioBit("Audio data", self, noone) + newInput(0, nodeValue_AudioBit("Audio data", self, noone)) .setVisible(true, true); newInput(1, nodeValue_Int("Width", self, 4096, "Amount of bits to extract.")); - inputs[2] = nodeValue_Float("Location", self, 0) + newInput(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; diff --git a/scripts/node_average/node_average.gml b/scripts/node_average/node_average.gml index 91db817c7..9e3112c31 100644 --- a/scripts/node_average/node_average.gml +++ b/scripts/node_average/node_average.gml @@ -5,7 +5,7 @@ function Node_Average(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c newInput(1, nodeValue_Surface("Mask", self)); - inputs[2] = nodeValue_Float("Mix", self, 1) + newInput(2, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(3, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_base_convert/node_base_convert.gml b/scripts/node_base_convert/node_base_convert.gml index d3715a586..e38d21f3b 100644 --- a/scripts/node_base_convert/node_base_convert.gml +++ b/scripts/node_base_convert/node_base_convert.gml @@ -4,7 +4,7 @@ function Node_Base_Convert(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro setDimension(96, 48); - inputs[0] = nodeValue_Text("Value", self, "") + newInput(0, nodeValue_Text("Value", self, "")) .setVisible(true, true); newInput(1, nodeValue_Int("Base from", self, 10)); diff --git a/scripts/node_bend/node_bend.gml b/scripts/node_bend/node_bend.gml index 9a19d1d18..70f28861d 100644 --- a/scripts/node_bend/node_bend.gml +++ b/scripts/node_bend/node_bend.gml @@ -11,7 +11,7 @@ function Node_Bend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons newInput(3, nodeValue_Enum_Button("Axis", self, 0, [ "x", "y" ])); - inputs[4] = nodeValue_Float("Amount", self, 0.25) + newInput(4, nodeValue_Float("Amount", self, 0.25)) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); newInput(5, nodeValue_Float("Scale", self, 1)); diff --git a/scripts/node_bevel/node_bevel.gml b/scripts/node_bevel/node_bevel.gml index 7f26d36ba..de417e3c8 100644 --- a/scripts/node_bevel/node_bevel.gml +++ b/scripts/node_bevel/node_bevel.gml @@ -3,7 +3,7 @@ function Node_Bevel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Int("Height", self, 4) + newInput(1, nodeValue_Int("Height", self, 4)) .setMappable(11); newInput(2, nodeValue_Vec2("Shift", self, [ 0, 0 ])); @@ -16,13 +16,13 @@ function Node_Bevel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con newInput(5, nodeValue_Surface("Mask", self)); - inputs[6] = nodeValue_Float("Mix", self, 1) + newInput(6, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(7, nodeValue_Bool("Active", self, true)); active_index = 7; - inputs[8] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + newInput(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 diff --git a/scripts/node_blend/node_blend.gml b/scripts/node_blend/node_blend.gml index 5f51ee7e8..5fe89ca9c 100644 --- a/scripts/node_blend/node_blend.gml +++ b/scripts/node_blend/node_blend.gml @@ -39,14 +39,14 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con newInput(2, nodeValue_Enum_Scroll("Blend mode", self, 0, BLEND_TYPES )); - inputs[3] = nodeValue_Float("Opacity", self, 1) + newInput(3, nodeValue_Float("Opacity", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(4, nodeValue_Surface("Mask", self)); newInput(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" ]) + newInput(6, nodeValue_Enum_Scroll("Output dimension", self, 0, [ "Background", "Forground", "Mask", "Maximum", "Constant" ])) .rejectArray(); newInput(7, nodeValue_Vec2("Constant dimension", self, DEF_SURF)); @@ -64,7 +64,7 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con newInput(12, nodeValue_Bool("Invert mask", self, false)); - inputs[13] = nodeValue_Float("Mask feather", self, 1) + newInput(13, nodeValue_Float("Mask feather", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); newInput(14, nodeValue_Vec2("Position", self, [ 0.5, 0.5 ])); diff --git a/scripts/node_blend_edge/node_blend_edge.gml b/scripts/node_blend_edge/node_blend_edge.gml index cdab539eb..a7fd69c17 100644 --- a/scripts/node_blend_edge/node_blend_edge.gml +++ b/scripts/node_blend_edge/node_blend_edge.gml @@ -3,7 +3,7 @@ function Node_Blend_Edge(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("Width", self, 0.1) + newInput(1, nodeValue_Float("Width", self, 0.1)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(5); @@ -16,15 +16,15 @@ function Node_Blend_Edge(_x, _y, _group = noone) : Node_Processor(_x, _y, _group ///////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[5] = nodeValue_Surface("Width map", self) + newInput(5, nodeValue_Surface("Width map", self)) .setVisible(false, false); ///////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[6] = nodeValue_Float("Blending", self, 1) + newInput(6, nodeValue_Float("Blending", self, 1)) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Float("Smoothness", self, 0) + newInput(7, nodeValue_Float("Smoothness", self, 0)) .setDisplay(VALUE_DISPLAY.slider); input_display_list = [ 3, 4, diff --git a/scripts/node_blobify/node_blobify.gml b/scripts/node_blobify/node_blobify.gml index 8f6e2c904..c00450a44 100644 --- a/scripts/node_blobify/node_blobify.gml +++ b/scripts/node_blobify/node_blobify.gml @@ -5,10 +5,10 @@ function Node_Blobify(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c newInput(1, nodeValue_Bool("Active", self, true)); - inputs[2] = nodeValue_Int("Radius", self, 3) + newInput(2, nodeValue_Int("Radius", self, 3)) .setValidator(VV_min(0)); - inputs[3] = nodeValue_Float("Threshold", self, 0.5) + newInput(3, nodeValue_Float("Threshold", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider); active_index = 1; diff --git a/scripts/node_bloom/node_bloom.gml b/scripts/node_bloom/node_bloom.gml index de085b3a1..1851c961d 100644 --- a/scripts/node_bloom/node_bloom.gml +++ b/scripts/node_bloom/node_bloom.gml @@ -2,20 +2,20 @@ function Node_Bloom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con name = "Bloom"; newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("Size", self, 3, "Bloom blur radius.") + newInput(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.") + newInput(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.") + newInput(3, nodeValue_Float("Strength", self, .25, "Blend intensity.")) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] }); newInput(4, nodeValue_Surface("Bloom mask", self)); newInput(5, nodeValue_Surface("Mask", self)); - inputs[6] = nodeValue_Float("Mix", self, 1) + newInput(6, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(7, nodeValue_Bool("Active", self, true)); @@ -25,14 +25,14 @@ function Node_Bloom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con __init_mask_modifier(5); // inputs 9, 10 - inputs[11] = nodeValue_Float("Aspect Ratio", self, 1) + newInput(11, nodeValue_Float("Aspect Ratio", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(12, nodeValue_Rotation("Direction", self, 0)); newInput(13, nodeValue_Enum_Scroll("Types", self, 0, [ "Gaussian", "Zoom" ])); - inputs[14] = nodeValue_Vec2("Zoom Origin", self, [ 0.5, 0.5 ]) + newInput(14, nodeValue_Vec2("Zoom Origin", self, [ 0.5, 0.5 ])) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); input_display_list = [ 7, 8, diff --git a/scripts/node_blur/node_blur.gml b/scripts/node_blur/node_blur.gml index a845c81da..95f4e5d2b 100644 --- a/scripts/node_blur/node_blur.gml +++ b/scripts/node_blur/node_blur.gml @@ -2,10 +2,10 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons name = "Blur"; newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Int("Size", self, 3) + newInput(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" ]) + newInput(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."); newInput(3, nodeValue_Bool("Override color", self, false, "Replace all color while keeping the alpha. Used to\nfix grey outline when bluring transparent pixel.")); @@ -14,7 +14,7 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons newInput(5, nodeValue_Surface("Mask", self)); - inputs[6] = nodeValue_Float("Mix", self, 1) + newInput(6, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(7, nodeValue_Bool("Active", self, true)); @@ -26,7 +26,7 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons newInput(11, nodeValue_Bool("Gamma Correction", self, false)); - inputs[12] = nodeValue_Float("Aspect Ratio", self, 1) + newInput(12, nodeValue_Float("Aspect Ratio", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(13, nodeValue_Rotation("Direction", self, 0)); diff --git a/scripts/node_blur_bokeh/node_blur_bokeh.gml b/scripts/node_blur_bokeh/node_blur_bokeh.gml index 54659d6de..c95897151 100644 --- a/scripts/node_blur_bokeh/node_blur_bokeh.gml +++ b/scripts/node_blur_bokeh/node_blur_bokeh.gml @@ -3,13 +3,13 @@ function Node_Blur_Bokeh(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("Strength", self, 0.2) + newInput(1, nodeValue_Float("Strength", self, 0.2)) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.01] }) .setMappable(8); newInput(2, nodeValue_Surface("Mask", self)); - inputs[3] = nodeValue_Float("Mix", self, 1) + newInput(3, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(4, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_blur_contrast/node_blur_contrast.gml b/scripts/node_blur_contrast/node_blur_contrast.gml index 61bceecca..488f79963 100644 --- a/scripts/node_blur_contrast/node_blur_contrast.gml +++ b/scripts/node_blur_contrast/node_blur_contrast.gml @@ -3,15 +3,15 @@ function Node_Blur_Contrast(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("Size", self, 3) + newInput(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.") + newInput(2, nodeValue_Float("Threshold", self, 0.2, "Brightness different to be blur together.")) .setDisplay(VALUE_DISPLAY.slider); newInput(3, nodeValue_Surface("Mask", self)); - inputs[4] = nodeValue_Float("Mix", self, 1) + newInput(4, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(5, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_blur_directional/node_blur_directional.gml b/scripts/node_blur_directional/node_blur_directional.gml index 0ef71b57d..99f14f33e 100644 --- a/scripts/node_blur_directional/node_blur_directional.gml +++ b/scripts/node_blur_directional/node_blur_directional.gml @@ -3,16 +3,16 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y, newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("Strength", self, 0.2) + newInput(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) + newInput(2, nodeValue_Rotation("Direction", self, 0)) .setMappable(10); newInput(3, nodeValue_Surface("Mask", self)); - inputs[4] = nodeValue_Float("Mix", self, 1) + newInput(4, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(5, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_blur_path/node_blur_path.gml b/scripts/node_blur_path/node_blur_path.gml index 34a491f67..8fad4bd2b 100644 --- a/scripts/node_blur_path/node_blur_path.gml +++ b/scripts/node_blur_path/node_blur_path.gml @@ -2,14 +2,14 @@ function Node_Blur_Path(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) name = "Path Blur"; newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_PathNode("Blur Path", self, noone) + newInput(1, nodeValue_PathNode("Blur Path", self, noone)) .setVisible(true, true); newInput(2, nodeValue_Int("Resolution", self, 32)); newInput(3, nodeValue_Surface("Mask", self)); - inputs[4] = nodeValue_Float("Mix", self, 1) + newInput(4, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(5, nodeValue_Bool("Active", self, true)); @@ -25,7 +25,7 @@ function Node_Blur_Path(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(11, nodeValue_Slider_Range("Range", self, [ 0, 1 ])); - inputs[12] = nodeValue_Float("Path Origin", self, 0) + newInput(12, nodeValue_Float("Path Origin", self, 0)) .setDisplay(VALUE_DISPLAY.slider); input_display_list = [ 5, 6, diff --git a/scripts/node_blur_radial/node_blur_radial.gml b/scripts/node_blur_radial/node_blur_radial.gml index 9061ab86b..b30402718 100644 --- a/scripts/node_blur_radial/node_blur_radial.gml +++ b/scripts/node_blur_radial/node_blur_radial.gml @@ -3,18 +3,18 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Rotation("Strength", self, 45) + newInput(1, nodeValue_Rotation("Strength", self, 45)) .setMappable(10); - inputs[2] = nodeValue_Vec2("Center", self, [ 0.5, 0.5 ]) + newInput(2, nodeValue_Vec2("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" ]) + newInput(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."); newInput(4, nodeValue_Surface("Mask", self)); - inputs[5] = nodeValue_Float("Mix", self, 1) + newInput(5, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(6, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_blur_shape/node_blur_shape.gml b/scripts/node_blur_shape/node_blur_shape.gml index ecf6a369b..9f42425c0 100644 --- a/scripts/node_blur_shape/node_blur_shape.gml +++ b/scripts/node_blur_shape/node_blur_shape.gml @@ -8,7 +8,7 @@ function Node_Blur_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(3, nodeValue_Surface("Mask", self)); - inputs[4] = nodeValue_Float("Mix", self, 1) + newInput(4, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(5, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_blur_simple/node_blur_simple.gml b/scripts/node_blur_simple/node_blur_simple.gml index 22ba9a36b..7127edeb4 100644 --- a/scripts/node_blur_simple/node_blur_simple.gml +++ b/scripts/node_blur_simple/node_blur_simple.gml @@ -2,10 +2,10 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou name = "Non-Uniform Blur"; newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("Size", self, 3) + newInput(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" ]) + newInput(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."); newInput(3, nodeValue_Surface("Blur mask", self)); @@ -16,7 +16,7 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(6, nodeValue_Surface("Mask", self)); - inputs[7] = nodeValue_Float("Mix", self, 1) + newInput(7, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(8, nodeValue_Bool("Active", self, true)); @@ -26,7 +26,7 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou __init_mask_modifier(6); // inputs 10, 11, - inputs[12] = nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ])) + newInput(12, nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ]))) .setMappable(13); newInput(13, nodeValueMap("Gradient map", self)); diff --git a/scripts/node_blur_slope/node_blur_slope.gml b/scripts/node_blur_slope/node_blur_slope.gml index a18c541ee..5ca0e015e 100644 --- a/scripts/node_blur_slope/node_blur_slope.gml +++ b/scripts/node_blur_slope/node_blur_slope.gml @@ -3,7 +3,7 @@ function Node_Blur_Slope(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("Strength", self, 4) + newInput(1, nodeValue_Float("Strength", self, 4)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 32, 0.1 ] }) .setMappable(9); @@ -11,7 +11,7 @@ function Node_Blur_Slope(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(3, nodeValue_Surface("Mask", self)); - inputs[4] = nodeValue_Float("Mix", self, 1) + newInput(4, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(5, nodeValue_Bool("Active", self, true)); @@ -27,7 +27,7 @@ function Node_Blur_Slope(_x, _y, _group = noone) : Node_Processor(_x, _y, _group ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[10] = nodeValue_Float("Step", self, 0.1) + newInput(10, nodeValue_Float("Step", self, 0.1)) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 1, 0.01] }); newInput(11, nodeValue_Bool("Gamma Correction", self, false)); diff --git a/scripts/node_blur_zoom/node_blur_zoom.gml b/scripts/node_blur_zoom/node_blur_zoom.gml index b24cc666e..780ef957a 100644 --- a/scripts/node_blur_zoom/node_blur_zoom.gml +++ b/scripts/node_blur_zoom/node_blur_zoom.gml @@ -3,13 +3,13 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("Strength", self, 0.2) + newInput(1, nodeValue_Float("Strength", self, 0.2)) .setMappable(12); - inputs[2] = nodeValue_Vec2("Center", self, [ 0.5, 0.5 ]) + newInput(2, nodeValue_Vec2("Center", self, [ 0.5, 0.5 ])) .setUnitRef(function(index) { return getDimension(index); }); - inputs[3] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + newInput(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."); newInput(4, nodeValue_Enum_Scroll("Zoom mode", self, 1, [ "Start", "Middle", "End" ])); @@ -18,7 +18,7 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(6, nodeValue_Surface("Mask", self)); - inputs[7] = nodeValue_Float("Mix", self, 1) + newInput(7, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(8, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_boolean/node_boolean.gml b/scripts/node_boolean/node_boolean.gml index 75ebc316e..6574261c5 100644 --- a/scripts/node_boolean/node_boolean.gml +++ b/scripts/node_boolean/node_boolean.gml @@ -8,7 +8,7 @@ function Node_Boolean(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c wd_checkBox = new checkBox( function() { inputs[0].setValue(!getInputData(0)); } ); - inputs[0] = nodeValue_Bool("Value", self, false) + newInput(0, nodeValue_Bool("Value", self, false)) .setVisible(true, true); newInput(1, nodeValue_Bool("Hide Background", self, false)); diff --git a/scripts/node_box_pattern/node_box_pattern.gml b/scripts/node_box_pattern/node_box_pattern.gml index 49b60f4ff..a1c860529 100644 --- a/scripts/node_box_pattern/node_box_pattern.gml +++ b/scripts/node_box_pattern/node_box_pattern.gml @@ -3,14 +3,14 @@ function Node_Box_Pattern(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Float("Scale", self, 2) + newInput(1, nodeValue_Float("Scale", self, 2)) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }) .setMappable(6); - inputs[2] = nodeValue_Rotation("Angle", self, 0) + newInput(2, nodeValue_Rotation("Angle", self, 0)) .setMappable(7); - inputs[3] = nodeValue_Vec2("Position", self, [0, 0] ) + newInput(3, nodeValue_Vec2("Position", self, [0, 0] )) .setUnitRef(function(index) { return getDimension(index); }); newInput(4, nodeValue_Color("Color 1", self, c_white)); @@ -27,7 +27,7 @@ function Node_Box_Pattern(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(8, nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ])); - inputs[9] = nodeValue_Float("Width", self, 0.25) + newInput(9, nodeValue_Float("Width", self, 0.25)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(10); @@ -35,7 +35,7 @@ function Node_Box_Pattern(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(11, nodeValue_Enum_Button("Pattern", self, 0, [ "Cross", "Xor" ])); - inputs[12] = nodeValue_Int("Iteration", self, 4) + newInput(12, nodeValue_Int("Iteration", self, 4)) outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_brush_linear/node_brush_linear.gml b/scripts/node_brush_linear/node_brush_linear.gml index 56917b8fa..1e69215a0 100644 --- a/scripts/node_brush_linear/node_brush_linear.gml +++ b/scripts/node_brush_linear/node_brush_linear.gml @@ -6,23 +6,23 @@ function Node_Brush_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(1, nodeValue_Bool("Active", self, true)); active_index = 1; - inputs[2] = nodeValue_Int("Iteration", self, 10) + newInput(2, nodeValue_Int("Iteration", self, 10)) .setValidator(VV_min(1)); - inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) }) newInput(4, nodeValue_Float("Length", self, 10)); - inputs[5] = nodeValue_Float("Attenuation", self, 0.99) + newInput(5, nodeValue_Float("Attenuation", self, 0.99)) .setDisplay(VALUE_DISPLAY.slider); - inputs[6] = nodeValue_Float("Circulation", self, 0.8) + newInput(6, nodeValue_Float("Circulation", self, 0.8)) .setDisplay(VALUE_DISPLAY.slider); newInput(7, nodeValue_Surface("Mask", self)); - inputs[8] = nodeValue_Float("Mix", self, 1) + newInput(8, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(9, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); diff --git a/scripts/node_bw/node_bw.gml b/scripts/node_bw/node_bw.gml index f16523fe7..5f135cae3 100644 --- a/scripts/node_bw/node_bw.gml +++ b/scripts/node_bw/node_bw.gml @@ -3,17 +3,17 @@ function Node_BW(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("Brightness", self, 0) + newInput(1, nodeValue_Float("Brightness", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01] }) .setMappable(9); - inputs[2] = nodeValue_Float("Contrast", self, 1) + newInput(2, nodeValue_Float("Contrast", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 4, 0.01] }) .setMappable(10); newInput(3, nodeValue_Surface("Mask", self)); - inputs[4] = nodeValue_Float("Mix", self, 1) + newInput(4, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(5, nodeValue_Bool("Active", self, true)); 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 9a355065e..301c9fd9a 100644 --- a/scripts/node_byte_file_read/node_byte_file_read.gml +++ b/scripts/node_byte_file_read/node_byte_file_read.gml @@ -4,7 +4,7 @@ function Node_Byte_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons w = 128; - inputs[0] = nodeValue_Path("Path", self, "") + newInput(0, nodeValue_Path("Path", self, "")) .setDisplay(VALUE_DISPLAY.path_load, { filter: "any file|*" }) .rejectArray(); 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 f9bfffd02..8aa3991c6 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_Path("Path", self, "") + newInput(0, nodeValue_Path("Path", self, "")) .setDisplay(VALUE_DISPLAY.path_save, { filter: "any file|*" }) .rejectArray(); - inputs[1] = nodeValue_Buffer("Content", self, noone) + newInput(1, nodeValue_Buffer("Content", self, noone)) .setVisible(true, true); static writeFile = function() { diff --git a/scripts/node_camera/node_camera.gml b/scripts/node_camera/node_camera.gml index a5394280f..c6ce6e833 100644 --- a/scripts/node_camera/node_camera.gml +++ b/scripts/node_camera/node_camera.gml @@ -5,7 +5,7 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co onSurfaceSize = function() { return surface_get_dimension(getInputData(0)); }; newInput(0, nodeValue_Area("Focus area", self, DEF_AREA, { onSurfaceSize, useShape : false })); - inputs[1] = nodeValue_Float("Zoom", self, 1) + newInput(1, nodeValue_Float("Zoom", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0.01, 4, 0.01 ] }); newInput(2, nodeValue_Bool("Depth of Field", self, false)); @@ -38,7 +38,7 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co newInput(index + 1, nodeValue_Enum_Button($"Positioning {_s}", self, false, [ "Space", "Camera" ])); - inputs[index + 2] = nodeValue_Vec2($"Position {_s}", self, [ 0, 0 ] ) + newInput(index + 2, nodeValue_Vec2($"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), diff --git a/scripts/node_canvas/node_canvas.gml b/scripts/node_canvas/node_canvas.gml index ab6e6d45a..084387a1f 100644 --- a/scripts/node_canvas/node_canvas.gml +++ b/scripts/node_canvas/node_canvas.gml @@ -6,29 +6,29 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor newInput( 0, nodeValue_Dimension(self)); newInput( 1, nodeValue_Color("Color", self, c_white )); - inputs[ 2] = nodeValue_Int("Brush size", self, 1 ) + newInput( 2, nodeValue_Int("Brush size", self, 1 )) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] }); - inputs[ 3] = nodeValue_Float("Fill threshold", self, 0.) + newInput( 3, nodeValue_Float("Fill threshold", self, 0.)) .setDisplay(VALUE_DISPLAY.slider); newInput( 4, nodeValue_Enum_Scroll("Fill type", self, 0, ["4 connect", "8 connect", "Entire canvas"])); newInput( 5, nodeValue_Bool("Draw preview overlay", self, true)); - inputs[ 6] = nodeValue_Surface("Brush", self) + newInput( 6, nodeValue_Surface("Brush", self)) .setVisible(true, false); newInput( 7, nodeValue_Int("Surface amount", self, 1)); newInput( 8, nodeValue_Surface("Background", self)); - inputs[ 9] = nodeValue_Float("Background alpha", self, 1.) + newInput( 9, nodeValue_Float("Background alpha", self, 1.)) .setDisplay(VALUE_DISPLAY.slider); newInput(10, nodeValue_Bool("Render background", self, true)); - inputs[11] = nodeValue_Float("Alpha", self, 1 ) + newInput(11, nodeValue_Float("Alpha", self, 1 )) .setDisplay(VALUE_DISPLAY.slider); newInput(12, nodeValue_Bool("Frames animation", self, true )); diff --git a/scripts/node_caustic/node_caustic.gml b/scripts/node_caustic/node_caustic.gml index f206bc77e..882e186ea 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_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); newInput(2, nodeValue_Vec2("Scale", self, [ 4, 4 ])); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) + newInput(4, nodeValue_Float("Progress", self, 0)) addShaderProp(SHADER_UNIFORM.float, "progress"); - inputs[5] = nodeValue_Float("Detail", self, 1.24) + newInput(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 10037ce04..f9d20135a 100644 --- a/scripts/node_cellular/node_cellular.gml +++ b/scripts/node_cellular/node_cellular.gml @@ -3,33 +3,33 @@ function Node_Cellular(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Vec2("Position", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2]) + newInput(1, nodeValue_Vec2("Position", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2])) .setUnitRef(function(index) { return getDimension(index); }); - inputs[2] = nodeValue_Float("Scale", self, 4) + newInput(2, nodeValue_Float("Scale", self, 4)) .setMappable(11); - inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) }); newInput(4, nodeValue_Enum_Scroll("Type", self, 0, [ "Point", "Edge", "Cell", "Crystal" ])); - inputs[5] = nodeValue_Float("Contrast", self, 1) + newInput(5, nodeValue_Float("Contrast", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 4, 0.01] }); newInput(6, nodeValue_Enum_Button("Pattern", self, 0, [ "Tiled", "Uniform", "Radial" ])); - inputs[7] = nodeValue_Float("Middle", self, 0.5) + newInput(7, nodeValue_Float("Middle", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider, { range: [0., 1., 0.01] }); - inputs[8] = nodeValue_Float("Radial scale", self, 2) + newInput(8, nodeValue_Float("Radial scale", self, 2)) .setDisplay(VALUE_DISPLAY.slider, { range: [1., 10., 0.01] }); - inputs[9] = nodeValue_Float("Radial shatter", self, 0) + newInput(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) + newInput(10, nodeValue_Bool("Colored", self, false)) ////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_checker/node_checker.gml b/scripts/node_checker/node_checker.gml index 781454f4b..35f9bea44 100644 --- a/scripts/node_checker/node_checker.gml +++ b/scripts/node_checker/node_checker.gml @@ -3,14 +3,14 @@ function Node_Checker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Float("Amount", self, 2) + newInput(1, nodeValue_Float("Amount", self, 2)) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }) .setMappable(6); - inputs[2] = nodeValue_Rotation("Angle", self, 0) + newInput(2, nodeValue_Rotation("Angle", self, 0)) .setMappable(7); - inputs[3] = nodeValue_Vec2("Position", self, [0, 0] ) + newInput(3, nodeValue_Vec2("Position", self, [0, 0] )) .setUnitRef(function(index) { return getDimension(index); }); newInput(4, nodeValue_Color("Color 1", self, c_white)); diff --git a/scripts/node_chromatic_aberration/node_chromatic_aberration.gml b/scripts/node_chromatic_aberration/node_chromatic_aberration.gml index bd8b4058f..5ac9ffecb 100644 --- a/scripts/node_chromatic_aberration/node_chromatic_aberration.gml +++ b/scripts/node_chromatic_aberration/node_chromatic_aberration.gml @@ -3,10 +3,10 @@ function Node_Chromatic_Aberration(_x, _y, _group = noone) : Node_Processor(_x, newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Vec2("Center", self, [ 0.5, 0.5 ]) + newInput(1, nodeValue_Vec2("Center", self, [ 0.5, 0.5 ])) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[2] = nodeValue_Float("Strength", self, 1) + newInput(2, nodeValue_Float("Strength", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [-16, 16, 0.01] }) .setMappable(4); diff --git a/scripts/node_color_adjust/node_color_adjust.gml b/scripts/node_color_adjust/node_color_adjust.gml index 96d075c75..0cca50046 100644 --- a/scripts/node_color_adjust/node_color_adjust.gml +++ b/scripts/node_color_adjust/node_color_adjust.gml @@ -4,39 +4,39 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("Brightness", self, 0) + newInput(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) + newInput(2, nodeValue_Float("Contrast", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(19); - inputs[3] = nodeValue_Float("Hue", self, 0) + newInput(3, nodeValue_Float("Hue", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }) .setMappable(20); - inputs[4] = nodeValue_Float("Saturation", self, 0) + newInput(4, nodeValue_Float("Saturation", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }) .setMappable(21); - inputs[5] = nodeValue_Float("Value", self, 0) + newInput(5, nodeValue_Float("Value", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }) .setMappable(22); newInput(6, nodeValue_Color("Blend", self, cola(c_white))); - inputs[7] = nodeValue_Float("Blend amount", self, 0) + newInput(7, nodeValue_Float("Blend amount", self, 0)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(23); newInput(8, nodeValue_Surface("Mask", self)); - inputs[9] = nodeValue_Float("Alpha", self, 1) + newInput(9, nodeValue_Float("Alpha", self, 1)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(24); - inputs[10] = nodeValue_Float("Exposure", self, 1) + newInput(10, nodeValue_Float("Exposure", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }) .setMappable(25); @@ -45,7 +45,7 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(12, nodeValue_Enum_Button("Input Type", self, 0, [ "Surface", "Color" ])); - inputs[13] = nodeValue_Palette("Color", self, array_clone(DEF_PALETTE)) + newInput(13, nodeValue_Palette("Color", self, array_clone(DEF_PALETTE))) .setVisible(true, true); newInput(14, nodeValue_Enum_Scroll("Blend mode", self, 0, BLEND_TYPES)); @@ -54,33 +54,33 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(16, nodeValue_Bool("Invert mask", self, false)); - inputs[17] = nodeValue_Float("Mask feather", self, 1) + newInput(17, nodeValue_Float("Mask feather", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); //////////////////////////////////////////////////////////////////////////////////////// - inputs[18] = nodeValue_Surface("Brightness map", self) + newInput(18, nodeValue_Surface("Brightness map", self)) .setVisible(false, false); - inputs[19] = nodeValue_Surface("Contrast map", self) + newInput(19, nodeValue_Surface("Contrast map", self)) .setVisible(false, false); - inputs[20] = nodeValue_Surface("Hue map", self) + newInput(20, nodeValue_Surface("Hue map", self)) .setVisible(false, false); - inputs[21] = nodeValue_Surface("Saturation map", self) + newInput(21, nodeValue_Surface("Saturation map", self)) .setVisible(false, false); - inputs[22] = nodeValue_Surface("Value map", self) + newInput(22, nodeValue_Surface("Value map", self)) .setVisible(false, false); - inputs[23] = nodeValue_Surface("Blend map", self) + newInput(23, nodeValue_Surface("Blend map", self)) .setVisible(false, false); - inputs[24] = nodeValue_Surface("Alpha map", self) + newInput(24, nodeValue_Surface("Alpha map", self)) .setVisible(false, false); - inputs[25] = nodeValue_Surface("Exposure map", self) + newInput(25, nodeValue_Surface("Exposure map", self)) .setVisible(false, false); //////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_color_data/node_color_data.gml b/scripts/node_color_data/node_color_data.gml index 5bd0966f6..0e8c825b6 100644 --- a/scripts/node_color_data/node_color_data.gml +++ b/scripts/node_color_data/node_color_data.gml @@ -3,7 +3,7 @@ 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) + newInput(0, nodeValue_Color("Color", self, c_white)) .setVisible(true, true); newInput(1, nodeValue_Bool("Normalize", self, true)); diff --git a/scripts/node_color_hsv/node_color_hsv.gml b/scripts/node_color_hsv/node_color_hsv.gml index 1b3653f9e..aac5a6031 100644 --- a/scripts/node_color_hsv/node_color_hsv.gml +++ b/scripts/node_color_hsv/node_color_hsv.gml @@ -2,21 +2,21 @@ 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) + newInput(0, nodeValue_Float("Hue", self, 1)) .setDisplay(VALUE_DISPLAY.slider) .setVisible(true, true); - inputs[1] = nodeValue_Float("Saturation", self, 1) + newInput(1, nodeValue_Float("Saturation", self, 1)) .setDisplay(VALUE_DISPLAY.slider) .setVisible(true, true); - inputs[2] = nodeValue_Float("Value", self, 1) + newInput(2, nodeValue_Float("Value", self, 1)) .setDisplay(VALUE_DISPLAY.slider) .setVisible(true, true); newInput(3, nodeValue_Bool("Normalized", self, 1)); - inputs[4] = nodeValue_Float("Alpha", self, 1) + newInput(4, nodeValue_Float("Alpha", self, 1)) .setDisplay(VALUE_DISPLAY.slider); outputs[0] = nodeValue_Output("Color", self, VALUE_TYPE.color, c_white); diff --git a/scripts/node_color_mix/node_color_mix.gml b/scripts/node_color_mix/node_color_mix.gml index 678fe141d..4c248085a 100644 --- a/scripts/node_color_mix/node_color_mix.gml +++ b/scripts/node_color_mix/node_color_mix.gml @@ -6,7 +6,7 @@ function Node_Color_Mix(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(1, nodeValue_Color("Color to", self, c_white)); - inputs[2] = nodeValue_Float("Mix", self, 0.5) + newInput(2, nodeValue_Float("Mix", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider); newInput(3, nodeValue_Enum_Button("Color space", self, 0, [ "RGB", "HSV", "OKLAB" ])); diff --git a/scripts/node_color_remove/node_color_remove.gml b/scripts/node_color_remove/node_color_remove.gml index a2d6cd8a9..40d526cb6 100644 --- a/scripts/node_color_remove/node_color_remove.gml +++ b/scripts/node_color_remove/node_color_remove.gml @@ -5,13 +5,13 @@ function Node_Color_Remove(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(1, nodeValue_Palette("Colors", self, array_clone(DEF_PALETTE))); - inputs[2] = nodeValue_Float("Threshold", self, 0.1) + newInput(2, nodeValue_Float("Threshold", self, 0.1)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(10); newInput(3, nodeValue_Surface("Mask", self)); - inputs[4] = nodeValue_Float("Mix", self, 1) + newInput(4, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(5, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_color_replace/node_color_replace.gml b/scripts/node_color_replace/node_color_replace.gml index 1cfcf1572..e44cb3ba6 100644 --- a/scripts/node_color_replace/node_color_replace.gml +++ b/scripts/node_color_replace/node_color_replace.gml @@ -6,7 +6,7 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr newInput(2, nodeValue_Palette("Palette to", self, array_clone(DEF_PALETTE), "Palette to be replaced to.")); - inputs[3] = nodeValue_Float("Threshold", self, 0.1) + newInput(3, nodeValue_Float("Threshold", self, 0.1)) .setDisplay(VALUE_DISPLAY.slider); newInput(4, nodeValue_Bool("Set others to black", self, false, "Set pixel that doesn't match any color in 'palette from' to black.")); @@ -17,7 +17,7 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr newInput(7, nodeValue_Surface("Mask", self)); - inputs[8] = nodeValue_Float("Mix", self, 1) + newInput(8, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(9, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_color_rgb/node_color_rgb.gml b/scripts/node_color_rgb/node_color_rgb.gml index 8ed5c64a0..cb79d40d9 100644 --- a/scripts/node_color_rgb/node_color_rgb.gml +++ b/scripts/node_color_rgb/node_color_rgb.gml @@ -3,21 +3,21 @@ function Node_Color_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) setDimension(96, 48); - inputs[0] = nodeValue_Float("Red", self, 1) + newInput(0, nodeValue_Float("Red", self, 1)) .setDisplay(VALUE_DISPLAY.slider) .setVisible(true, true); - inputs[1] = nodeValue_Float("Green", self, 1) + newInput(1, nodeValue_Float("Green", self, 1)) .setDisplay(VALUE_DISPLAY.slider) .setVisible(true, true); - inputs[2] = nodeValue_Float("Blue", self, 1) + newInput(2, nodeValue_Float("Blue", self, 1)) .setDisplay(VALUE_DISPLAY.slider) .setVisible(true, true); newInput(3, nodeValue_Bool("Normalized", self, 1)); - inputs[4] = nodeValue_Float("Alpha", self, 1) + newInput(4, nodeValue_Float("Alpha", self, 1)) .setDisplay(VALUE_DISPLAY.slider); outputs[0] = nodeValue_Output("Color", self, VALUE_TYPE.color, c_white); diff --git a/scripts/node_colorize/node_colorize.gml b/scripts/node_colorize/node_colorize.gml index b5122e853..1791494b0 100644 --- a/scripts/node_colorize/node_colorize.gml +++ b/scripts/node_colorize/node_colorize.gml @@ -3,16 +3,16 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ])) + newInput(1, nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ]))) .setMappable(11); - inputs[2] = nodeValue_Float("Gradient shift", self, 0) + newInput(2, nodeValue_Float("Gradient shift", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, .01 ] }) .setMappable(10); newInput(3, nodeValue_Surface("Mask", self)); - inputs[4] = nodeValue_Float("Mix", self, 1) + newInput(4, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(5, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_colors_replace/node_colors_replace.gml b/scripts/node_colors_replace/node_colors_replace.gml index 5cc541672..9bf3a4fbc 100644 --- a/scripts/node_colors_replace/node_colors_replace.gml +++ b/scripts/node_colors_replace/node_colors_replace.gml @@ -4,15 +4,15 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g newInput(0, nodeValue_Surface("Surface in", self)); newInput(1, nodeValue_Palette("Palette from", self, [])); - inputs[2] = nodeValue_Palette("Palette to", self, []) + newInput(2, nodeValue_Palette("Palette to", self, [])) .setVisible(false, false); - inputs[3] = nodeValue_Float("Threshold", self, 0.1) + newInput(3, nodeValue_Float("Threshold", self, 0.1)) .setDisplay(VALUE_DISPLAY.slider); newInput(4, nodeValue_Surface("Mask", self)); - inputs[5] = nodeValue_Float("Mix", self, 1) + newInput(5, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(6, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_combine_hsv/node_combine_hsv.gml b/scripts/node_combine_hsv/node_combine_hsv.gml index 061c03fe1..497d64b8a 100644 --- a/scripts/node_combine_hsv/node_combine_hsv.gml +++ b/scripts/node_combine_hsv/node_combine_hsv.gml @@ -8,7 +8,7 @@ function Node_Combine_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(4, nodeValue_Bool("Array Input", self, false)); - inputs[5] = nodeValue_Surface("HSV Array", self, []) + newInput(5, nodeValue_Surface("HSV Array", self, [])) .setArrayDepth(1); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_combine_rgb/node_combine_rgb.gml b/scripts/node_combine_rgb/node_combine_rgb.gml index 334751acd..34cf728f7 100644 --- a/scripts/node_combine_rgb/node_combine_rgb.gml +++ b/scripts/node_combine_rgb/node_combine_rgb.gml @@ -9,7 +9,7 @@ function Node_Combine_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(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.") + newInput(5, nodeValue_Float("Base value", self, 0, "Set value to the unconnected color channels.")) .setDisplay(VALUE_DISPLAY.slider) .setMappable(6); @@ -21,7 +21,7 @@ function Node_Combine_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(7, nodeValue_Bool("Array Input", self, false)); - inputs[8] = nodeValue_Surface("RGBA Array", self, []) + newInput(8, nodeValue_Surface("RGBA Array", self, [])) .setArrayDepth(1); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_compare/node_compare.gml b/scripts/node_compare/node_compare.gml index 977da6063..14a4269af 100644 --- a/scripts/node_compare/node_compare.gml +++ b/scripts/node_compare/node_compare.gml @@ -40,10 +40,10 @@ function Node_Compare(_x, _y, _group = noone) : Node(_x, _y, _group) constructor 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) + newInput(1, nodeValue_Float("a", self, 0)) .setVisible(true, true); - inputs[2] = nodeValue_Float("b", self, 0) + newInput(2, nodeValue_Float("b", self, 0)) .setVisible(true, true); outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.boolean, false); diff --git a/scripts/node_composite/node_composite.gml b/scripts/node_composite/node_composite.gml index 87795ecbf..702bdb3fa 100644 --- a/scripts/node_composite/node_composite.gml +++ b/scripts/node_composite/node_composite.gml @@ -17,7 +17,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(1, nodeValue_Enum_Scroll("Output dimension", self, COMPOSE_OUTPUT_SCALING.first, [ "First surface", "Largest surface", "Constant" ])); - inputs[2] = nodeValue_Dimension(self) + newInput(2, nodeValue_Dimension(self)) .setVisible(false); attribute_surface_depth(); @@ -415,7 +415,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(index + 0, nodeValue_Surface($"Surface {_s}", self, noone)); inputs[index + 0].hover_effect = 0; - inputs[index + 1] = nodeValue_Vec2($"Position {_s}", self, [ 0, 0 ] ) + newInput(index + 1, nodeValue_Vec2($"Position {_s}", self, [ 0, 0 ] )) .setUnitRef(function(index) { return [ overlay_w, overlay_h ]; }); newInput(index + 2, nodeValue_Rotation($"Rotation {_s}", self, 0)); @@ -424,7 +424,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(index + 4, nodeValue_Enum_Scroll($"Blend {_s}", self, 0, BLEND_TYPES )); - inputs[index + 5] = nodeValue_Float($"Opacity {_s}", self, 1) + newInput(index + 5, nodeValue_Float($"Opacity {_s}", self, 1)) .setDisplay(VALUE_DISPLAY.slider); for( var i = 0; i < data_length; i++ ) { diff --git a/scripts/node_condition/node_condition.gml b/scripts/node_condition/node_condition.gml index 062ae1600..74793564d 100644 --- a/scripts/node_condition/node_condition.gml +++ b/scripts/node_condition/node_condition.gml @@ -3,7 +3,7 @@ function Node_Condition(_x, _y, _group = noone) : Node(_x, _y, _group) construct setDimension(96, 48); - inputs[0] = nodeValue_Float("Check value", self, 0 ) + newInput(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), @@ -14,19 +14,19 @@ 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 ) + newInput(2, nodeValue_Float("Compare to", self, 0 )) .rejectArray(); - inputs[3] = nodeValue("True", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 ) + newInput(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 ) + newInput(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" ]) + newInput(5, nodeValue_Enum_Scroll("Eval mode", self, 0 , ["Boolean", "Number compare", "Text compare" ])) .rejectArray(); - inputs[6] = nodeValue_Bool("Boolean", self, false ) + newInput(6, nodeValue_Bool("Boolean", self, false )) .setVisible(true, true) .rejectArray(); diff --git a/scripts/node_convolution/node_convolution.gml b/scripts/node_convolution/node_convolution.gml index 69bc93efb..5bbdf25ac 100644 --- a/scripts/node_convolution/node_convolution.gml +++ b/scripts/node_convolution/node_convolution.gml @@ -3,15 +3,15 @@ function Node_Convolution(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("Kernel", self, array_create(9)) + newInput(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" ]) + newInput(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."); newInput(3, nodeValue_Surface("Mask", self)); - inputs[4] = nodeValue_Float("Mix", self, 1) + newInput(4, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(5, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_corner/node_corner.gml b/scripts/node_corner/node_corner.gml index 81f71a258..92c833c83 100644 --- a/scripts/node_corner/node_corner.gml +++ b/scripts/node_corner/node_corner.gml @@ -3,12 +3,12 @@ function Node_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("Radius", self, 2) + newInput(1, nodeValue_Float("Radius", self, 2)) .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 0.1] }); newInput(2, nodeValue_Surface("Mask", self)); - inputs[3] = nodeValue_Float("Mix", self, 1) + newInput(3, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(4, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_crop/node_crop.gml b/scripts/node_crop/node_crop.gml index dfbc7208d..0c45b810a 100644 --- a/scripts/node_crop/node_crop.gml +++ b/scripts/node_crop/node_crop.gml @@ -4,7 +4,7 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Padding("Crop", self, [ 0, 0, 0, 0 ]) + newInput(1, nodeValue_Padding("Crop", self, [ 0, 0, 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); newInput(2, nodeValue_Bool("Active", self, true)); @@ -14,7 +14,7 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons newInput(4, nodeValue_Vec2("Ratio", self, [ 1, 1 ])); - inputs[5] = nodeValue_Vec2("Center", self, [ .5, .5 ]) + newInput(5, nodeValue_Vec2("Center", self, [ .5, .5 ])) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); newInput(6, nodeValue_Float("Width", self, 8 )); diff --git a/scripts/node_crop_content/node_crop_content.gml b/scripts/node_crop_content/node_crop_content.gml index 6e82c7445..d60b2ab17 100644 --- a/scripts/node_crop_content/node_crop_content.gml +++ b/scripts/node_crop_content/node_crop_content.gml @@ -5,7 +5,7 @@ function Node_Crop_Content(_x, _y, _group = noone) : Node(_x, _y, _group) constr newInput(1, nodeValue_Bool("Active", self, true)); - inputs[2] = nodeValue_Enum_Scroll("Array Sizing", self, 1, [ "Largest, same size", "Independent" ]) + newInput(2, nodeValue_Enum_Scroll("Array Sizing", self, 1, [ "Largest, same size", "Independent" ])) .setTooltip("Cropping mode for dealing with image array."); newInput(3, nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ], "Add padding back after crop.")); diff --git a/scripts/node_cross_section/node_cross_section.gml b/scripts/node_cross_section/node_cross_section.gml index ff9837ec2..df864c46d 100644 --- a/scripts/node_cross_section/node_cross_section.gml +++ b/scripts/node_cross_section/node_cross_section.gml @@ -5,7 +5,7 @@ function Node_Cross_Section(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr newInput(1, nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ])); - inputs[2] = nodeValue_Float("Position", self, 0 ) + newInput(2, nodeValue_Float("Position", self, 0 )) .setDisplay(VALUE_DISPLAY.slider); newInput(3, nodeValue_Bool("Anti Aliasing", self, false )); 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 879e6138d..d6e2002a0 100644 --- a/scripts/node_csv_file_read/node_csv_file_read.gml +++ b/scripts/node_csv_file_read/node_csv_file_read.gml @@ -29,11 +29,11 @@ function Node_CSV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const w = 128; - inputs[0] = nodeValue_Path("Path", self, "") + newInput(0, nodeValue_Path("Path", self, "")) .setDisplay(VALUE_DISPLAY.path_load, { filter: "CSV file|*.csv" }) .rejectArray(); - inputs[1] = nodeValue_Bool("Convert to number", self, false) + newInput(1, nodeValue_Bool("Convert to number", self, false)) .rejectArray(); outputs[0] = nodeValue_Output("Content", self, VALUE_TYPE.text, ""); 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 d99a166d1..744f47ef8 100644 --- a/scripts/node_csv_file_write/node_csv_file_write.gml +++ b/scripts/node_csv_file_write/node_csv_file_write.gml @@ -14,11 +14,11 @@ function Node_CSV_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) cons w = 128; - inputs[0] = nodeValue_Path("Path", self, "") + newInput(0, nodeValue_Path("Path", self, "")) .setDisplay(VALUE_DISPLAY.path_save, { filter: "csv file|*.csv" }) .rejectArray(); - inputs[1] = nodeValue("Content", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, "") + newInput(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 8429a7961..53de9a1b3 100644 --- a/scripts/node_curve/node_curve.gml +++ b/scripts/node_curve/node_curve.gml @@ -13,7 +13,7 @@ function Node_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con newInput(5, nodeValue_Surface("Mask", self)); - inputs[6] = nodeValue_Float("Mix", self, 1) + newInput(6, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(7, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_curve_hsv/node_curve_hsv.gml b/scripts/node_curve_hsv/node_curve_hsv.gml index 095d51d4f..fa916bb72 100644 --- a/scripts/node_curve_hsv/node_curve_hsv.gml +++ b/scripts/node_curve_hsv/node_curve_hsv.gml @@ -11,7 +11,7 @@ function Node_Curve_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(4, nodeValue_Surface("Mask", self)); - inputs[5] = nodeValue_Float("Mix", self, 1) + newInput(5, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(6, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_de_corner/node_de_corner.gml b/scripts/node_de_corner/node_de_corner.gml index f77f70f7b..2d2351c38 100644 --- a/scripts/node_de_corner/node_de_corner.gml +++ b/scripts/node_de_corner/node_de_corner.gml @@ -6,16 +6,16 @@ function Node_De_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(1, nodeValue_Bool("Active", self, true)); active_index = 1; - inputs[2] = nodeValue_Float("Tolerance", self, 0) + newInput(2, nodeValue_Float("Tolerance", self, 0)) .setDisplay(VALUE_DISPLAY.slider); - inputs[3] = nodeValue_Int("Iteration", self, 2) + newInput(3, nodeValue_Int("Iteration", self, 2)) newInput(4, nodeValue_Enum_Button("Type", self, 0, [ "Double", "Diagonal" ])); newInput(5, nodeValue_Surface("Mask", self)); - inputs[6] = nodeValue_Float("Mix", self, 1) + newInput(6, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); __init_mask_modifier(5); // inputs 7, 8, diff --git a/scripts/node_de_stray/node_de_stray.gml b/scripts/node_de_stray/node_de_stray.gml index 863926641..62cfe4cc9 100644 --- a/scripts/node_de_stray/node_de_stray.gml +++ b/scripts/node_de_stray/node_de_stray.gml @@ -3,19 +3,19 @@ function Node_De_Stray(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("Tolerance", self, 0) + newInput(1, nodeValue_Float("Tolerance", self, 0)) .setDisplay(VALUE_DISPLAY.slider); newInput(2, nodeValue_Bool("Active", self, true)); active_index = 2; - inputs[3] = nodeValue_Int("Iteration", self, 2) + newInput(3, nodeValue_Int("Iteration", self, 2)) newInput(4, nodeValue_Enum_Button("Strictness", self, 0, [ "Low", "High", "Stray-only" ])); newInput(5, nodeValue_Surface("Mask", self)); - inputs[6] = nodeValue_Float("Mix", self, 1) + newInput(6, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); __init_mask_modifier(5); // inputs 7, 8, diff --git a/scripts/node_diffuse/node_diffuse.gml b/scripts/node_diffuse/node_diffuse.gml index 2e4e2232c..5643f8c7f 100644 --- a/scripts/node_diffuse/node_diffuse.gml +++ b/scripts/node_diffuse/node_diffuse.gml @@ -3,27 +3,27 @@ function Node_Diffuse(_x, _y, _group = noone) : Node(_x, _y, _group) constructor newInput(0, nodeValue_Surface("Density field", self)); - inputs[1] = nodeValue_Float("Dissipation", self, 0.05) + newInput(1, nodeValue_Float("Dissipation", self, 0.05)) .setDisplay(VALUE_DISPLAY.slider, { range: [ -0.2, 0.2, 0.001] }); newInput(2, nodeValue_Float("Scale", self, 1)); newInput(3, nodeValue_Float("Randomness", self, 1)); - inputs[4] = nodeValue_Float("Flow rate", self, 0.5) + newInput(4, nodeValue_Float("Flow rate", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 1, 0.01] }); newInput(5, nodeValue_Slider_Range("Threshold", self, [ 0.5, 0.7 ])); - inputs[6] = nodeValue_Int("Seed", self, seed_random(6)) + newInput(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) }); newInput(7, nodeValue_Surface("External", self)); - inputs[8] = nodeValue_Float("External Strength", self, 0.1) + newInput(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) + newInput(9, nodeValue_Int("Detail", self, 1)) newInput(10, nodeValue_Enum_Scroll("External Type", self, 0, [ "Point", "Vector" ])); diff --git a/scripts/node_dilate/node_dilate.gml b/scripts/node_dilate/node_dilate.gml index 63e1b2b23..3fb67b6da 100644 --- a/scripts/node_dilate/node_dilate.gml +++ b/scripts/node_dilate/node_dilate.gml @@ -3,22 +3,22 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Vec2("Center", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Center", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); - inputs[2] = nodeValue_Float("Strength", self, 1) + newInput(2, nodeValue_Float("Strength", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [-3, 3, 0.01] }) .setMappable(11); - inputs[3] = nodeValue_Float("Radius", self, 16) + newInput(3, nodeValue_Float("Radius", self, 16)) .setMappable(12); - inputs[4] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + newInput(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."); newInput(5, nodeValue_Surface("Mask", self)); - inputs[6] = nodeValue_Float("Mix", self, 1) + newInput(6, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(7, nodeValue_Bool("Active", self, true)); @@ -30,10 +30,10 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co ////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[11] = nodeValue_Surface("Strength map", self) + newInput(11, nodeValue_Surface("Strength map", self)) .setVisible(false, false); - inputs[12] = nodeValue_Surface("Radius map", self) + newInput(12, nodeValue_Surface("Radius map", self)) .setVisible(false, false); ////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_directory_search/node_directory_search.gml b/scripts/node_directory_search/node_directory_search.gml index 8bf433c52..3e767774d 100644 --- a/scripts/node_directory_search/node_directory_search.gml +++ b/scripts/node_directory_search/node_directory_search.gml @@ -26,14 +26,14 @@ function Node_Directory_Search(_x, _y, _group = noone) : Node(_x, _y, _group) co name = "Directory Search"; color = COLORS.node_blend_input; - inputs[0] = nodeValue_Path("Path", self, "") + newInput(0, nodeValue_Path("Path", self, "")) .setDisplay(VALUE_DISPLAY.path_load, { filter: "dir" }); newInput(1, nodeValue_Text("Extensions", self, ".png")); newInput(2, nodeValue_Enum_Scroll("Type", self, 0, [ "Surface", "Text" ])); - inputs[3] = nodeValue_Bool("Recursive", self, false) + newInput(3, nodeValue_Bool("Recursive", self, false)) outputs[0] = nodeValue_Output("Outputs", self, VALUE_TYPE.surface, []) .setVisible(true, true); diff --git a/scripts/node_displace/node_displace.gml b/scripts/node_displace/node_displace.gml index 817b375cd..6b1167214 100644 --- a/scripts/node_displace/node_displace.gml +++ b/scripts/node_displace/node_displace.gml @@ -5,17 +5,17 @@ function Node_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(1, nodeValue_Surface("Displace map", self)); - inputs[2] = nodeValue_Vec2("Position", self, [ 1, 0 ] ) + newInput(2, nodeValue_Vec2("Position", self, [ 1, 0 ] )) .setTooltip("Vector to displace pixel by.") .setUnitRef(function(index) { return getDimension(index); }); - inputs[3] = nodeValue_Float("Strength", self, 1) + newInput(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'.") + newInput(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" ]) + newInput(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. @@ -25,12 +25,12 @@ function Node_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) 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" ]) + newInput(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."); newInput(8, nodeValue_Surface("Mask", self)); - inputs[9] = nodeValue_Float("Mix", self, 1) + newInput(9, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(10, nodeValue_Bool("Active", self, true)); @@ -44,7 +44,7 @@ If set, then strength value control how many times the effect applies on itself. //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[15] = nodeValue_Surface("Strength map", self) + newInput(15, nodeValue_Surface("Strength map", self)) .setVisible(false, false); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_display_image/node_display_image.gml b/scripts/node_display_image/node_display_image.gml index 86e065462..d8f2c05d6 100644 --- a/scripts/node_display_image/node_display_image.gml +++ b/scripts/node_display_image/node_display_image.gml @@ -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_Path("Path", self, "") + newInput(0, nodeValue_Path("Path", self, "")) .setVisible(false) .setDisplay(VALUE_DISPLAY.path_load, { filter: "image|*.png;*.jpg" }) .rejectArray(); - inputs[1] = nodeValue_Vec2("Position", self, [ x, y ]) + newInput(1, nodeValue_Vec2("Position", self, [ x, y ])) .rejectArray(); - inputs[2] = nodeValue_Vec2("Scale", self, [ 1, 1 ]) + newInput(2, nodeValue_Vec2("Scale", self, [ 1, 1 ])) .rejectArray(); - inputs[3] = nodeValue_Bool("Smooth transform", self, true) + newInput(3, nodeValue_Bool("Smooth transform", self, true)) .rejectArray(); input_display_list = [ 0, diff --git a/scripts/node_display_text/node_display_text.gml b/scripts/node_display_text/node_display_text.gml index 20fd517a5..aef8c1605 100644 --- a/scripts/node_display_text/node_display_text.gml +++ b/scripts/node_display_text/node_display_text.gml @@ -17,25 +17,25 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr ta_editor = new textArea(TEXTBOX_INPUT.text, function(val) { inputs[1].setValue(val); }) - inputs[0] = nodeValue_Color("Color", self, c_white ) + newInput(0, nodeValue_Color("Color", self, c_white )) .rejectArray(); newInput(1, nodeValue_Text("Text", self, "Text")); - inputs[2] = nodeValue_Enum_Scroll("Style", self, 2, [ "Header", "Sub header", "Normal" ]) + newInput(2, nodeValue_Enum_Scroll("Style", self, 2, [ "Header", "Sub header", "Normal" ])) .rejectArray(); - inputs[3] = nodeValue_Float("Alpha", self, 0.75) + newInput(3, nodeValue_Float("Alpha", self, 0.75)) .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); - inputs[4] = nodeValue_Float("Line width", self, -1) + newInput(4, nodeValue_Float("Line width", self, -1)) .rejectArray(); - inputs[5] = nodeValue_Vec2("Position", self, [ x, y ]) + newInput(5, nodeValue_Vec2("Position", self, [ x, y ])) .rejectArray(); - inputs[6] = nodeValue_Float("Line height", self, 0) + newInput(6, nodeValue_Float("Line height", self, 0)) .rejectArray(); input_display_list = [1, diff --git a/scripts/node_dither/node_dither.gml b/scripts/node_dither/node_dither.gml index 1d00d29d7..2d2fd5e6b 100644 --- a/scripts/node_dither/node_dither.gml +++ b/scripts/node_dither/node_dither.gml @@ -22,10 +22,10 @@ function Node_Dither(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co newInput(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) + newInput(3, nodeValue_Surface("Dither map", self)) .setVisible(false); - inputs[4] = nodeValue_Float("Contrast", self, 1) + newInput(4, nodeValue_Float("Contrast", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 5, 0.1] }); newInput(5, nodeValue_Surface("Contrast map", self)); @@ -34,7 +34,7 @@ function Node_Dither(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co newInput(7, nodeValue_Surface("Mask", self)); - inputs[8] = nodeValue_Float("Mix", self, 1) + newInput(8, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(9, nodeValue_Bool("Active", self, true)); @@ -44,12 +44,12 @@ function Node_Dither(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co __init_mask_modifier(7); // inputs 11, 12, - inputs[13] = nodeValue_Int("Seed", self, seed_random(6)) + newInput(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) }); newInput(14, nodeValue_Bool("Use palette", self, true)); - inputs[15] = nodeValue_Int("Steps", self, 4) + newInput(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); diff --git a/scripts/node_dll/node_dll.gml b/scripts/node_dll/node_dll.gml index 69ae899c0..17e5c7da0 100644 --- a/scripts/node_dll/node_dll.gml +++ b/scripts/node_dll/node_dll.gml @@ -2,7 +2,7 @@ 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, "") + newInput(0, nodeValue_Text("DLL File", self, "")) .setDisplay(VALUE_DISPLAY.path_load, { filter: "Dynamic-link library (.dll)|*.dll" }) .setVisible(true, false); @@ -47,7 +47,7 @@ function Node_DLL(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { newInput(index + 0, nodeValue_Enum_Button("Parameter type", self, 0, [ "Number", "Buffer" ])); - inputs[index + 1] = nodeValue_Float("Parameter value", self, 0 ) + newInput(index + 1, nodeValue_Float("Parameter value", self, 0 )) .setVisible(true, true); array_push(input_display_list, index + 0, index + 1); diff --git a/scripts/node_edge_detect/node_edge_detect.gml b/scripts/node_edge_detect/node_edge_detect.gml index ef25bdb1e..4b7110275 100644 --- a/scripts/node_edge_detect/node_edge_detect.gml +++ b/scripts/node_edge_detect/node_edge_detect.gml @@ -10,12 +10,12 @@ function Node_Edge_Detect(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(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" ]) + newInput(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."); newInput(3, nodeValue_Surface("Mask", self)); - inputs[4] = nodeValue_Float("Mix", self, 1) + newInput(4, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(5, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_edge_shade/node_edge_shade.gml b/scripts/node_edge_shade/node_edge_shade.gml index a1d177de5..dee146b12 100644 --- a/scripts/node_edge_shade/node_edge_shade.gml +++ b/scripts/node_edge_shade/node_edge_shade.gml @@ -6,7 +6,7 @@ function Node_Edge_Shade(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(1, nodeValue_Bool("Active", self, true)); active_index = 1; - inputs[2] = nodeValue_Gradient("Colors", self, new gradientObject( [ cola(c_black), cola(c_white) ] )) + newInput(2, nodeValue_Gradient("Colors", self, new gradientObject( [ cola(c_black), cola(c_white) ] ))) .setMappable(3); ////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_equation/node_equation.gml b/scripts/node_equation/node_equation.gml index 5fdcb9894..62b9315f3 100644 --- a/scripts/node_equation/node_equation.gml +++ b/scripts/node_equation/node_equation.gml @@ -104,10 +104,10 @@ function Node_Equation(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static createNewInput = function() { var index = array_length(inputs); - inputs[index + 0] = nodeValue_Text("Argument name", self, "" ) + newInput(index + 0, nodeValue_Text("Argument name", self, "" )) .setDisplay(VALUE_DISPLAY.text_box); - inputs[index + 1] = nodeValue_Float("Argument value", self, 0 ) + newInput(index + 1, nodeValue_Float("Argument value", self, 0 )) .setVisible(true, true); return inputs[index + 0]; diff --git a/scripts/node_erode/node_erode.gml b/scripts/node_erode/node_erode.gml index 7f5740f49..48b541420 100644 --- a/scripts/node_erode/node_erode.gml +++ b/scripts/node_erode/node_erode.gml @@ -3,7 +3,7 @@ function Node_Erode(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Int("Width", self, 1) + newInput(1, nodeValue_Int("Width", self, 1)) .setValidator(VV_min(0)) .setMappable(10); @@ -13,7 +13,7 @@ function Node_Erode(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con newInput(4, nodeValue_Surface("Mask", self)); - inputs[5] = nodeValue_Float("Mix", self, 1) + newInput(5, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(6, nodeValue_Bool("Active", self, true)); @@ -25,7 +25,7 @@ function Node_Erode(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con ///////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[10] = nodeValue_Surface("Width map", self) + newInput(10, nodeValue_Surface("Width map", self)) .setVisible(false, false); ///////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_export/node_export.gml b/scripts/node_export/node_export.gml index c09826075..bed8d5413 100644 --- a/scripts/node_export/node_export.gml +++ b/scripts/node_export/node_export.gml @@ -48,11 +48,11 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor newInput(0, nodeValue_Surface("Surface", self)); - inputs[1] = nodeValue_Path("Paths", self, "") + newInput(1, nodeValue_Path("Paths", self, "")) .setDisplay(VALUE_DISPLAY.path_save, _format_still) .setVisible(true); - inputs[2] = nodeValue_Text("Template", self, "%d%n") + newInput(2, nodeValue_Text("Template", self, "%d%n")) .rejectArray(); inputs[2].editWidget.format = TEXT_AREA_FORMAT.path_template; inputs[2].editWidget.auto_update = true; @@ -60,34 +60,34 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor 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 }) + newInput(3, nodeValue_Enum_Scroll("Type", self, 0, { data: format_single, update_hover: false })) .rejectArray(); newInput(4, nodeValue_Int("Template guides", self, 0)); - inputs[5] = nodeValue_Bool("Loop", self, true) + newInput(5, nodeValue_Bool("Loop", self, true)) .setVisible(false) .rejectArray(); - inputs[6] = nodeValue_Bool("Frame optimization", self, false) + newInput(6, nodeValue_Bool("Frame optimization", self, false)) .setVisible(false) .rejectArray(); - inputs[7] = nodeValue_Float("Color merge", self, 0.02) + newInput(7, nodeValue_Float("Color merge", self, 0.02)) .setDisplay(VALUE_DISPLAY.slider) .setVisible(false) .rejectArray(); - inputs[8] = nodeValue_Int("Framerate", self, 30) + newInput(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 }) + newInput(9, nodeValue_Enum_Scroll("Format", self, 0, { data: format_image, update_hover: false })) .rejectArray(); - inputs[10] = nodeValue_Float("Quality", self, 23) + newInput(10, nodeValue_Float("Quality", self, 23)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 100, 0.1 ] }) .rejectArray(); @@ -100,10 +100,10 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor newInput(14, nodeValue_Int("Frame step", self, 1)); - inputs[15] = nodeValue_Bool("Custom Range", self, false) + newInput(15, nodeValue_Bool("Custom Range", self, false)) .rejectArray(); - inputs[16] = nodeValue_Bool("Export on Save", self, false) + newInput(16, nodeValue_Bool("Export on Save", self, false)) outputs[0] = nodeValue_Output("Preview", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_feedback_output/node_feedback_output.gml b/scripts/node_feedback_output/node_feedback_output.gml index d5fccd9e6..08d9cad8f 100644 --- a/scripts/node_feedback_output/node_feedback_output.gml +++ b/scripts/node_feedback_output/node_feedback_output.gml @@ -4,7 +4,7 @@ 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) + newInput(1, nodeValue("Feedback loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, -1)) .setVisible(true, true); cache_value = -1; diff --git a/scripts/node_find_pixel/node_find_pixel.gml b/scripts/node_find_pixel/node_find_pixel.gml index 7b892e1a3..2952602e4 100644 --- a/scripts/node_find_pixel/node_find_pixel.gml +++ b/scripts/node_find_pixel/node_find_pixel.gml @@ -6,14 +6,14 @@ function Node_Find_Pixel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(1, nodeValue_Color("Search color", self, c_black)); - inputs[2] = nodeValue_Float("Tolerance", self, 0) + newInput(2, nodeValue_Float("Tolerance", self, 0)) .setDisplay(VALUE_DISPLAY.slider); newInput(3, nodeValue_Bool("Find all", self, false)); newInput(4, nodeValue_Bool("Include alpha", self, false)); - inputs[5] = nodeValue_Float("Alpha tolerance", self, 0.2) + newInput(5, nodeValue_Float("Alpha tolerance", self, 0.2)) .setDisplay(VALUE_DISPLAY.slider); // newInput(6, nodeValue_Enum_Button("Axis", self, 1, [ "X", "Y" ])); diff --git a/scripts/node_flood_fill/node_flood_fill.gml b/scripts/node_flood_fill/node_flood_fill.gml index 60653281c..320da647c 100644 --- a/scripts/node_flood_fill/node_flood_fill.gml +++ b/scripts/node_flood_fill/node_flood_fill.gml @@ -5,7 +5,7 @@ function Node_Flood_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(1, nodeValue_Surface("Mask", self)); - inputs[2] = nodeValue_Float("Mix", self, 1) + newInput(2, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(3, nodeValue_Bool("Active", self, true)); @@ -15,7 +15,7 @@ function Node_Flood_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(5, nodeValue_Color("Colors", self, cola(c_black) )); - inputs[6] = nodeValue_Float("Threshold", self, 0.1) + newInput(6, nodeValue_Float("Threshold", self, 0.1)) .setDisplay(VALUE_DISPLAY.slider); newInput(7, nodeValue_Bool("Diagonal", self, false)); diff --git a/scripts/node_flow_noise/node_flow_noise.gml b/scripts/node_flow_noise/node_flow_noise.gml index bf0c0209f..4188ba658 100644 --- a/scripts/node_flow_noise/node_flow_noise.gml +++ b/scripts/node_flow_noise/node_flow_noise.gml @@ -2,14 +2,14 @@ function Node_Flow_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, name = "Flow Noise"; shader = sh_noise_flow; - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); newInput(2, nodeValue_Vec2("Scale", self, [ 2, 2 ])); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[3] = nodeValue_Float("Progress", self, 0) + newInput(3, nodeValue_Float("Progress", self, 0)) addShaderProp(SHADER_UNIFORM.float, "progress"); newInput(4, nodeValue_Slider_Range("Detail", self, [ 1, 8 ], { range: [ 1, 16, 0.1 ] })); diff --git a/scripts/node_fn_math/node_fn_math.gml b/scripts/node_fn_math/node_fn_math.gml index 52a011387..2f36034b5 100644 --- a/scripts/node_fn_math/node_fn_math.gml +++ b/scripts/node_fn_math/node_fn_math.gml @@ -4,10 +4,10 @@ function Node_Fn_Math(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) construc newInput(inl + 0, nodeValue_Enum_Scroll("Operation", self, 2 , [ "Add", "Minus", "Multiply" ] )); - inputs[inl + 1] = nodeValue_Float("Value 1", self, 0 ) + newInput(inl + 1, nodeValue_Float("Value 1", self, 0 )) .setVisible(true, true); - inputs[inl + 2] = nodeValue_Float("Value 2", self, 0 ) + newInput(inl + 2, nodeValue_Float("Value 2", self, 0 )) .setVisible(true, true); array_append(input_display_list, [ diff --git a/scripts/node_fn_smoothstep/node_fn_smoothstep.gml b/scripts/node_fn_smoothstep/node_fn_smoothstep.gml index c791fb845..697766fdc 100644 --- a/scripts/node_fn_smoothstep/node_fn_smoothstep.gml +++ b/scripts/node_fn_smoothstep/node_fn_smoothstep.gml @@ -2,7 +2,7 @@ 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 ) + newInput(inl + 0, nodeValue_Float("Value", self, 0 )) .setVisible(true, true); newInput(inl + 1, nodeValue_Enum_Scroll("Type", self, 0 , [ "Cubic poly", "Quadratic rat", "Cubic rat", "Cosine" ] )); 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 c2669da5a..d7533b704 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 ) + newInput(inl + 0, nodeValue_Float("Pattern", self, 0 )) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 3, 0.01] }); newInput(inl + 1, nodeValue_Vec2("Range", self, [ 0, 1 ])); - inputs[inl + 2] = nodeValue_Float("Frequency", self, 2 ) + newInput(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 42a1bfbdc..f9d09d68d 100644 --- a/scripts/node_fn_wiggler/node_fn_wiggler.gml +++ b/scripts/node_fn_wiggler/node_fn_wiggler.gml @@ -3,10 +3,10 @@ function Node_Wiggler(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) construc newInput(inl + 0, nodeValue_Vec2("Range", self, [ 0, 1 ])); - inputs[inl + 1] = nodeValue_Int("Frequency", self, 4 ) + newInput(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)) + newInput(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) }); newInput(inl + 3, nodeValue_Toggle("Clip", self, 0b11 , { data : [ "Start", "End" ] })); diff --git a/scripts/node_fold_noise/node_fold_noise.gml b/scripts/node_fold_noise/node_fold_noise.gml index 47778e7ce..d1c0c7907 100644 --- a/scripts/node_fold_noise/node_fold_noise.gml +++ b/scripts/node_fold_noise/node_fold_noise.gml @@ -2,21 +2,21 @@ function Node_Fold_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, name = "Fold Noise"; shader = sh_noise_fold; - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); newInput(2, nodeValue_Vec2("Scale", self, [ 2, 2 ])); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[3] = nodeValue_Int("Iteration", self, 2) + newInput(3, nodeValue_Int("Iteration", self, 2)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 6, 0.1] }); addShaderProp(SHADER_UNIFORM.integer, "iteration"); newInput(4, nodeValue_Float("Stretch", self, 2)); addShaderProp(SHADER_UNIFORM.float, "stretch"); - inputs[5] = nodeValue_Float("Amplitude", self, 1.3) + newInput(5, nodeValue_Float("Amplitude", self, 1.3)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] }); addShaderProp(SHADER_UNIFORM.float, "amplitude"); diff --git a/scripts/node_frame/node_frame.gml b/scripts/node_frame/node_frame.gml index d3db77e7c..04457346f 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_Vec2("Size", self, [ 240, 160 ] ) + newInput(0, nodeValue_Vec2("Size", self, [ 240, 160 ] )) .rejectArray(); - inputs[1] = nodeValue_Color("Color", self, cola(c_white) ) + newInput(1, nodeValue_Color("Color", self, cola(c_white) )) .rejectArray(); - inputs[2] = nodeValue_Float("Alpha", self, 0.75 ) + newInput(2, nodeValue_Float("Alpha", self, 0.75 )) .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); - inputs[3] = nodeValue_Float("Label size", self, global.__FRAME_LABEL_SCALE ) + newInput(3, nodeValue_Float("Label size", self, global.__FRAME_LABEL_SCALE )) .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); - inputs[4] = nodeValue_Float("Blend label", self, 0 ) + newInput(4, nodeValue_Float("Blend label", self, 0 )) .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); diff --git a/scripts/node_gabor_noise/node_gabor_noise.gml b/scripts/node_gabor_noise/node_gabor_noise.gml index 07ccd8af0..1062cb410 100644 --- a/scripts/node_gabor_noise/node_gabor_noise.gml +++ b/scripts/node_gabor_noise/node_gabor_noise.gml @@ -2,24 +2,24 @@ function Node_Gabor_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y name = "Gabor Noise"; shader = sh_noise_gabor; - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[2] = nodeValue_Vec2("Scale", self, [ 4, 4 ]) + newInput(2, nodeValue_Vec2("Scale", self, [ 4, 4 ])) .setMappable(8); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) + newInput(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) + newInput(5, nodeValue_Float("Sharpness", self, 4)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 5, 0.01 ] }) .setMappable(10); addShaderProp(SHADER_UNIFORM.float, "sharpness"); @@ -27,7 +27,7 @@ function Node_Gabor_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y newInput(6, nodeValue_Vec2("Augment", self, [ 11, 31 ])); addShaderProp(SHADER_UNIFORM.float, "augment"); - inputs[7] = nodeValue_Rotation("Phase", self, 0) + newInput(7, nodeValue_Rotation("Phase", self, 0)) .setMappable(11); addShaderProp(SHADER_UNIFORM.float, "rotation"); diff --git a/scripts/node_glow/node_glow.gml b/scripts/node_glow/node_glow.gml index 26b6f9521..cb919a367 100644 --- a/scripts/node_glow/node_glow.gml +++ b/scripts/node_glow/node_glow.gml @@ -3,20 +3,20 @@ function Node_Glow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("Border", self, 0) + newInput(1, nodeValue_Float("Border", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 4, 0.1] }); - inputs[2] = nodeValue_Float("Size", self, 3) + newInput(2, nodeValue_Float("Size", self, 3)) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); - inputs[3] = nodeValue_Float("Strength", self, 1) + newInput(3, nodeValue_Float("Strength", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ]}); newInput(4, nodeValue_Color("Color", self, c_white)); newInput(5, nodeValue_Surface("Mask", self)); - inputs[6] = nodeValue_Float("Mix", self, 1) + newInput(6, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(7, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_gradient/node_gradient.gml b/scripts/node_gradient/node_gradient.gml index c4a7ecce2..4b0abcb76 100644 --- a/scripts/node_gradient/node_gradient.gml +++ b/scripts/node_gradient/node_gradient.gml @@ -3,31 +3,31 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ])) + newInput(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), new scrollItem("Circular", s_node_gradient_type, 1), new scrollItem("Radial", s_node_gradient_type, 2) ]); - inputs[3] = nodeValue_Rotation("Angle", self, 0) + newInput(3, nodeValue_Rotation("Angle", self, 0)) .setMappable(10); - inputs[4] = nodeValue_Float("Radius", self, .5) + newInput(4, nodeValue_Float("Radius", self, .5)) .setMappable(11); - inputs[5] = nodeValue_Float("Shift", self, 0) + newInput(5, nodeValue_Float("Shift", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [-2, 2, 0.01] }) .setMappable(12); - inputs[6] = nodeValue_Vec2("Center", self, [ 0.5, 0.5 ]) + newInput(6, nodeValue_Vec2("Center", self, [ 0.5, 0.5 ])) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); newInput(7, nodeValue_Enum_Button("Loop", self, 0, [ "None", "Loop", "Pingpong" ])); newInput(8, nodeValue_Surface("Mask", self)); - inputs[9] = nodeValue_Float("Scale", self, 1) + newInput(9, nodeValue_Float("Scale", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 2, 0.01] }) .setMappable(13); diff --git a/scripts/node_gradient_extract/node_gradient_extract.gml b/scripts/node_gradient_extract/node_gradient_extract.gml index e9b4c9931..0a5cf51d6 100644 --- a/scripts/node_gradient_extract/node_gradient_extract.gml +++ b/scripts/node_gradient_extract/node_gradient_extract.gml @@ -3,7 +3,7 @@ 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))) + newInput(0, nodeValue_Gradient("Gradient", self, new gradientObject(cola(c_white)))) .setVisible(true, true); outputs[0] = nodeValue_Output("Colors", self, VALUE_TYPE.color, [] ) diff --git a/scripts/node_gradient_out/node_gradient_out.gml b/scripts/node_gradient_out/node_gradient_out.gml index cdd0b20c4..8dadfc9eb 100644 --- a/scripts/node_gradient_out/node_gradient_out.gml +++ b/scripts/node_gradient_out/node_gradient_out.gml @@ -5,7 +5,7 @@ function Node_Gradient_Out(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(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.") + newInput(1, nodeValue_Float("Sample", self, 0, "Position to sample a color from the gradient.")) .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); diff --git a/scripts/node_gradient_palette/node_gradient_palette.gml b/scripts/node_gradient_palette/node_gradient_palette.gml index fd16d7505..4788d8ed4 100644 --- a/scripts/node_gradient_palette/node_gradient_palette.gml +++ b/scripts/node_gradient_palette/node_gradient_palette.gml @@ -2,12 +2,12 @@ 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)) + newInput(0, nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE))) .setVisible(true, true); newInput(1, nodeValue_Bool("Custom positions", self, false)); - inputs[2] = nodeValue_Float("Positions", self, [], "Array of number indicating color position (0 - 1).") + newInput(2, nodeValue_Float("Positions", self, [], "Array of number indicating color position (0 - 1).")) .setVisible(true, true); inputs[2].array_depth = 1; diff --git a/scripts/node_gradient_points/node_gradient_points.gml b/scripts/node_gradient_points/node_gradient_points.gml index a20e78cd5..d2d6c6ea5 100644 --- a/scripts/node_gradient_points/node_gradient_points.gml +++ b/scripts/node_gradient_points/node_gradient_points.gml @@ -3,19 +3,19 @@ function Node_Gradient_Points(_x, _y, _group = noone) : Node_Processor(_x, _y, _ newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Vec2("Center 1", self, [ 0, 0 ] ) + newInput(1, nodeValue_Vec2("Center 1", self, [ 0, 0 ] )) .setUnitRef(function(index) { return getDimension(index); }); newInput(2, nodeValue_Color("Color 1", self, c_white )); - inputs[3] = nodeValue_Vec2("Center 2", self, [ DEF_SURF_W, 0 ] ) + newInput(3, nodeValue_Vec2("Center 2", self, [ DEF_SURF_W, 0 ] )) .setUnitRef(function(index) { return getDimension(index); }); newInput(4, nodeValue_Color("Color 2", self, c_white )); - inputs[5] = nodeValue_Vec2("Center 3", self, [ 0, DEF_SURF_H ] ) + newInput(5, nodeValue_Vec2("Center 3", self, [ 0, DEF_SURF_H ] )) .setUnitRef(function(index) { return getDimension(index); }); newInput(6, nodeValue_Color("Color 3", self, c_white )); - inputs[7] = nodeValue_Vec2("Center 4", self, DEF_SURF , { useGlobal : false }) + newInput(7, nodeValue_Vec2("Center 4", self, DEF_SURF , { useGlobal : false })) .setUnitRef(function(index) { return getDimension(index); }); newInput(8, nodeValue_Color("Color 4", self, c_white )); @@ -23,19 +23,19 @@ function Node_Gradient_Points(_x, _y, _group = noone) : Node_Processor(_x, _y, _ newInput(10, nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE))); - inputs[11] = nodeValue_Float("Falloff 1", self, 6 ) + newInput(11, nodeValue_Float("Falloff 1", self, 6 )) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 0.1 ] }); - inputs[12] = nodeValue_Float("Falloff 2", self, 6 ) + newInput(12, nodeValue_Float("Falloff 2", self, 6 )) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 0.1 ] }); - inputs[13] = nodeValue_Float("Falloff 3", self, 6 ) + newInput(13, nodeValue_Float("Falloff 3", self, 6 )) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 0.1 ] }); - inputs[14] = nodeValue_Float("Falloff 4", self, 6 ) + newInput(14, nodeValue_Float("Falloff 4", self, 6 )) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 0.1 ] }); - inputs[15] = nodeValue_Bool("Normalize weight", self, false ) + newInput(15, nodeValue_Bool("Normalize weight", self, false )) outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); 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 21a124620..6062e33ee 100644 --- a/scripts/node_gradient_replace_color/node_gradient_replace_color.gml +++ b/scripts/node_gradient_replace_color/node_gradient_replace_color.gml @@ -2,14 +2,14 @@ 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))) + newInput(0, nodeValue_Gradient("Gradient", self, new gradientObject(cola(c_white)))) .setVisible(true, true); newInput(1, nodeValue_Palette("Color from", self, array_clone(DEF_PALETTE))); newInput(2, nodeValue_Palette("Color to", self, array_clone(DEF_PALETTE))); - inputs[3] = nodeValue_Float("Threshold", self, 0.1) + newInput(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)) ); diff --git a/scripts/node_gradient_shift/node_gradient_shift.gml b/scripts/node_gradient_shift/node_gradient_shift.gml index 8df81d7db..fbad65f07 100644 --- a/scripts/node_gradient_shift/node_gradient_shift.gml +++ b/scripts/node_gradient_shift/node_gradient_shift.gml @@ -2,15 +2,15 @@ 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))) + newInput(0, nodeValue_Gradient("Gradient", self, new gradientObject(cola(c_white)))) .setVisible(true, true); - inputs[1] = nodeValue_Float("Shift", self, 0) + newInput(1, nodeValue_Float("Shift", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[2] = nodeValue_Bool("Wrap", self, false) + newInput(2, nodeValue_Bool("Wrap", self, false)) - inputs[3] = nodeValue_Float("Scale", self, 1) + newInput(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)) ); diff --git a/scripts/node_grain/node_grain.gml b/scripts/node_grain/node_grain.gml index 838e8d083..6e8e39e30 100644 --- a/scripts/node_grain/node_grain.gml +++ b/scripts/node_grain/node_grain.gml @@ -5,7 +5,7 @@ function Node_Grain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con newInput(1, nodeValue_Surface("Mask", self)); - inputs[2] = nodeValue_Float("Mix", self, 1) + newInput(2, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(3, nodeValue_Bool("Active", self, true)); @@ -15,30 +15,30 @@ function Node_Grain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con __init_mask_modifier(1); // inputs 5, 6 - inputs[7] = nodeValue_Float("Brightness", self, 0) + newInput(7, nodeValue_Float("Brightness", self, 0)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(8); newInput(8, nodeValueMap("Brightness map", self)); - inputs[9] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) + newInput(10, nodeValue_Float("Red", self, 0)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(11); newInput(11, nodeValueMap("Red map", self)); - inputs[12] = nodeValue_Float("Green", self, 0) + newInput(12, nodeValue_Float("Green", self, 0)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(13); newInput(13, nodeValueMap("Green map", self)); - inputs[14] = nodeValue_Float("Blue", self, 0) + newInput(14, nodeValue_Float("Blue", self, 0)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(15); @@ -46,19 +46,19 @@ function Node_Grain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[16] = nodeValue_Float("Hue", self, 0) + newInput(16, nodeValue_Float("Hue", self, 0)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(17); newInput(17, nodeValueMap("Hue map", self)); - inputs[18] = nodeValue_Float("Saturation", self, 0) + newInput(18, nodeValue_Float("Saturation", self, 0)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(19); newInput(19, nodeValueMap("Saturation map", self)); - inputs[20] = nodeValue_Float("Value", self, 0) + newInput(20, nodeValue_Float("Value", self, 0)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(21); @@ -66,11 +66,11 @@ function Node_Grain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[22] = nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Additive", "Multiply", "Screen", "Overlay" ]) + newInput(22, nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Additive", "Multiply", "Screen", "Overlay" ])) - inputs[23] = nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Additive", "Multiply", "Screen" ]) + newInput(23, nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Additive", "Multiply", "Screen" ])) - inputs[24] = nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Additive", "Multiply", "Screen" ]) + newInput(24, nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Additive", "Multiply", "Screen" ])) input_display_list = [ 3, 4, 9, ["Surfaces", true], 0, 1, 2, 5, 6, diff --git a/scripts/node_graph_preview/node_graph_preview.gml b/scripts/node_graph_preview/node_graph_preview.gml index 214f5d530..f20f976d8 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) + newInput(0, nodeValue_Surface("Surface", self)) .rejectArray(); - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .rejectArray(); - inputs[2] = nodeValue_Float("Scale", self, 1) + newInput(2, nodeValue_Float("Scale", self, 1)) .rejectArray(); - inputs[3] = nodeValue_Bool("Sticky", self, true) + newInput(3, nodeValue_Bool("Sticky", self, true)) .rejectArray(); - inputs[4] = nodeValue_Float("Alpha", self, 0.5) + newInput(4, nodeValue_Float("Alpha", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); diff --git a/scripts/node_greyscale/node_greyscale.gml b/scripts/node_greyscale/node_greyscale.gml index 16e73abb3..9c8b1e90b 100644 --- a/scripts/node_greyscale/node_greyscale.gml +++ b/scripts/node_greyscale/node_greyscale.gml @@ -3,17 +3,17 @@ function Node_Greyscale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("Brightness", self, 0) + newInput(1, nodeValue_Float("Brightness", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01] }) .setMappable(9); - inputs[2] = nodeValue_Float("Contrast", self, 1) + newInput(2, nodeValue_Float("Contrast", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 4, 0.01] }) .setMappable(10); newInput(3, nodeValue_Surface("Mask", self)); - inputs[4] = nodeValue_Float("Mix", self, 1) + newInput(4, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(5, nodeValue_Bool("Active", self, true)); @@ -23,10 +23,10 @@ function Node_Greyscale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) __init_mask_modifier(3); // inputs 7, 8 - inputs[9] = nodeValue_Surface("Brightness map", self) + newInput(9, nodeValue_Surface("Brightness map", self)) .setVisible(false, false); - inputs[10] = nodeValue_Surface("Contrast map", self) + newInput(10, nodeValue_Surface("Contrast map", self)) .setVisible(false, false); input_display_list = [ 5, 6, diff --git a/scripts/node_grid/node_grid.gml b/scripts/node_grid/node_grid.gml index 0509ee595..a075a8654 100644 --- a/scripts/node_grid/node_grid.gml +++ b/scripts/node_grid/node_grid.gml @@ -3,27 +3,27 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); - inputs[2] = nodeValue_Vec2("Grid Size", self, [ 8, 8 ]) + newInput(2, nodeValue_Vec2("Grid Size", self, [ 8, 8 ])) .setMappable(13); - inputs[3] = nodeValue_Float("Gap", self, 0.2) + newInput(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) + newInput(4, nodeValue_Rotation("Angle", self, 0)) .setMappable(15); - inputs[5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) + newInput(5, nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white)))) .setMappable(20); newInput(6, nodeValue_Color("Gap color", self, c_black)); newInput(7, nodeValue_Surface("Texture", self)); - inputs[8] = nodeValue_Float("Shift", self, 0) + newInput(8, nodeValue_Float("Shift", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [-0.5, 0.5, 0.01] }) .setMappable(16); @@ -31,7 +31,7 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons newInput(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)) + newInput(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) }); newInput(12, nodeValue_Bool("Anti aliasing", self, false)); @@ -48,14 +48,14 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons newInput(18, nodeValue_Int("Truchet seed", self, seed_random())); - inputs[19] = nodeValue_Float("Flip horizontal", self, 0.5) + newInput(19, nodeValue_Float("Flip horizontal", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider); newInput(20, nodeValueMap("Gradient map", self)); newInput(21, nodeValueGradientRange("Gradient map range", self, inputs[5])); - inputs[22] = nodeValue_Float("Flip vertical", self, 0.5) + newInput(22, nodeValue_Float("Flip vertical", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider); newInput(23, nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ])); diff --git a/scripts/node_grid_hex/node_grid_hex.gml b/scripts/node_grid_hex/node_grid_hex.gml index 249db4767..2d1f387dd 100644 --- a/scripts/node_grid_hex/node_grid_hex.gml +++ b/scripts/node_grid_hex/node_grid_hex.gml @@ -3,27 +3,27 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); - inputs[2] = nodeValue_Vec2("Scale", self, [ 2, 2 ]) + newInput(2, nodeValue_Vec2("Scale", self, [ 2, 2 ])) .setMappable(11); - inputs[3] = nodeValue_Rotation("Angle", self, 0) + newInput(3, nodeValue_Rotation("Angle", self, 0)) .setMappable(12); - inputs[4] = nodeValue_Float("Gap", self, 0.1) + newInput(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))) + newInput(5, nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white)))) .setMappable(17); newInput(6, nodeValue_Color("Gap color", self, c_black)); newInput(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)) + newInput(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) }); newInput(9, nodeValue_Surface("Texture", self)); @@ -44,7 +44,7 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(15, nodeValue_Int("Truchet seed", self, seed_random())); - inputs[16] = nodeValue_Float("Truchet threshold", self, 0.5) + newInput(16, nodeValue_Float("Truchet threshold", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider) ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_grid_noise/node_grid_noise.gml b/scripts/node_grid_noise/node_grid_noise.gml index d6511f541..d28537ea5 100644 --- a/scripts/node_grid_noise/node_grid_noise.gml +++ b/scripts/node_grid_noise/node_grid_noise.gml @@ -3,15 +3,15 @@ function Node_Grid_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); newInput(2, nodeValue_Vec2("Scale", self, [ 8, 8 ])); - inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) + newInput(4, nodeValue_Float("Shift", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [-0.5, 0.5, 0.01] }); newInput(5, nodeValue_Surface("Texture sample", self)); diff --git a/scripts/node_grid_pentagonal/node_grid_pentagonal.gml b/scripts/node_grid_pentagonal/node_grid_pentagonal.gml index be2c51a3b..dae18cfcd 100644 --- a/scripts/node_grid_pentagonal/node_grid_pentagonal.gml +++ b/scripts/node_grid_pentagonal/node_grid_pentagonal.gml @@ -3,20 +3,20 @@ function Node_Grid_Pentagonal(_x, _y, _group = noone) : Node_Processor(_x, _y, _ newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); - inputs[2] = nodeValue_Vec2("Scale", self, [ 4, 4 ]) + newInput(2, nodeValue_Vec2("Scale", self, [ 4, 4 ])) .setMappable(11); - inputs[3] = nodeValue_Float("Gap", self, 0.1) + newInput(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) + newInput(4, nodeValue_Rotation("Angle", self, 0)) .setMappable(13); - inputs[5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) + newInput(5, nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white)))) .setMappable(14); newInput(6, nodeValue_Color("Gap color", self, c_black)); @@ -25,7 +25,7 @@ function Node_Grid_Pentagonal(_x, _y, _group = noone) : Node_Processor(_x, _y, _ newInput(8, nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"])); - inputs[9] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) }); newInput(10, nodeValue_Bool("Anti aliasing", self, false)); diff --git a/scripts/node_grid_tri/node_grid_tri.gml b/scripts/node_grid_tri/node_grid_tri.gml index ac88604fa..f67298815 100644 --- a/scripts/node_grid_tri/node_grid_tri.gml +++ b/scripts/node_grid_tri/node_grid_tri.gml @@ -3,20 +3,20 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); - inputs[2] = nodeValue_Vec2("Scale", self, [ 2, 2 ]) + newInput(2, nodeValue_Vec2("Scale", self, [ 2, 2 ])) .setMappable(11); - inputs[3] = nodeValue_Float("Gap", self, 0.1) + newInput(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) + newInput(4, nodeValue_Rotation("Angle", self, 0)) .setMappable(13); - inputs[5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) + newInput(5, nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white)))) .setMappable(17); newInput(6, nodeValue_Color("Gap color", self, c_black)); @@ -25,7 +25,7 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(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)) + newInput(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) }); newInput(10, nodeValue_Bool("Anti aliasing", self, false)); @@ -44,7 +44,7 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(15, nodeValue_Int("Truchet seed", self, seed_random())); - inputs[16] = nodeValue_Float("Truchet threshold", self, 0.5) + newInput(16, nodeValue_Float("Truchet threshold", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider) ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_group_input/node_group_input.gml b/scripts/node_group_input/node_group_input.gml index 5279bd112..6739d636d 100644 --- a/scripts/node_group_input/node_group_input.gml +++ b/scripts/node_group_input/node_group_input.gml @@ -80,25 +80,25 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru newInput(0, nodeValue_Enum_Scroll("Display type", self, 0, { data: GROUP_IO_DISPLAY[11], update_hover: false })); - inputs[1] = nodeValue_Range("Range", self, [ 0, 1 ]) + newInput(1, nodeValue_Range("Range", self, [ 0, 1 ])) .setVisible(false); newInput(2, nodeValue_Enum_Scroll("Input type", self, 11, { data: GROUP_IO_TYPE_NAME, update_hover: false })); - inputs[3] = nodeValue_Text("Enum label", self, "") + newInput(3, nodeValue_Text("Enum label", self, "")) .setVisible(false); - inputs[4] = nodeValue_Enum_Button("Vector size", self, 0, [ "2", "3", "4" ]) + newInput(4, nodeValue_Enum_Button("Vector size", self, 0, [ "2", "3", "4" ])) .setVisible(false); newInput(5, nodeValue_Int("Order", self, 0)); newInput(6, nodeValue_Bool("Display preview gizmo", self, true)); - inputs[7] = nodeValue_Float("Step", self, 0.01) + newInput(7, nodeValue_Float("Step", self, 0.01)) .setVisible(false); - inputs[8] = nodeValue_Text("Button Label", self, "Trigger") + newInput(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), diff --git a/scripts/node_group_output/node_group_output.gml b/scripts/node_group_output/node_group_output.gml index f27cd9723..b0ecf1243 100644 --- a/scripts/node_group_output/node_group_output.gml +++ b/scripts/node_group_output/node_group_output.gml @@ -7,7 +7,7 @@ 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) + newInput(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); } diff --git a/scripts/node_group_thumbnail/node_group_thumbnail.gml b/scripts/node_group_thumbnail/node_group_thumbnail.gml index a3860ca60..77ad0e4e9 100644 --- a/scripts/node_group_thumbnail/node_group_thumbnail.gml +++ b/scripts/node_group_thumbnail/node_group_thumbnail.gml @@ -3,7 +3,7 @@ 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) + newInput(0, nodeValue_Surface("Input", self)) .setVisible(true, true); outputs[0] = nodeValue_Surface("Output", self) diff --git a/scripts/node_herringbone_tile/node_herringbone_tile.gml b/scripts/node_herringbone_tile/node_herringbone_tile.gml index f71adaed4..4a9c8f7b1 100644 --- a/scripts/node_herringbone_tile/node_herringbone_tile.gml +++ b/scripts/node_herringbone_tile/node_herringbone_tile.gml @@ -3,27 +3,27 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); - inputs[2] = nodeValue_Vec2("Scale", self, [ 4, 4 ]) + newInput(2, nodeValue_Vec2("Scale", self, [ 4, 4 ])) .setMappable(11); - inputs[3] = nodeValue_Rotation("Angle", self, 0) + newInput(3, nodeValue_Rotation("Angle", self, 0)) .setMappable(12); - inputs[4] = nodeValue_Float("Gap", self, 0.25) + newInput(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))) + newInput(5, nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white)))) .setMappable(18); newInput(6, nodeValue_Color("Gap color", self, c_black)); newInput(7, nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"])); - inputs[8] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) }); newInput(9, nodeValue_Surface("Texture", self)); @@ -44,7 +44,7 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, newInput(15, nodeValue_Int("Truchet seed", self, seed_random())); - inputs[16] = nodeValue_Float("Truchet threshold", self, 0.5) + newInput(16, nodeValue_Float("Truchet threshold", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider) newInput(17, nodeValue_Float("Tile length", self, 2)); diff --git a/scripts/node_hlsl/node_hlsl.gml b/scripts/node_hlsl/node_hlsl.gml index bfab99306..0babcf75e 100644 --- a/scripts/node_hlsl/node_hlsl.gml +++ b/scripts/node_hlsl/node_hlsl.gml @@ -20,7 +20,7 @@ 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, @"") + newInput(0, nodeValue_Text("Vertex", self, @"")) .setDisplay(VALUE_DISPLAY.codeHLSL) .rejectArray(); @@ -41,7 +41,7 @@ output.color = surfaceColor;") newInput(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("Argument value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) + newInput(index + 2, nodeValue("Argument value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 )) .setVisible(true, true); inputs[index + 2].editWidget.interactable = false; } diff --git a/scripts/node_honey_noise/node_honey_noise.gml b/scripts/node_honey_noise/node_honey_noise.gml index a42030636..faedbcbe3 100644 --- a/scripts/node_honey_noise/node_honey_noise.gml +++ b/scripts/node_honey_noise/node_honey_noise.gml @@ -2,7 +2,7 @@ function Node_Honeycomb_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x name = "Honeycomb Noise"; shader = sh_noise_honey; - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); @@ -15,7 +15,7 @@ function Node_Honeycomb_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x newInput(4, nodeValue_Enum_Button("Mode", self, 0, [ "Hexagon", "Star" ])); addShaderProp(SHADER_UNIFORM.integer, "mode"); - inputs[5] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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"); diff --git a/scripts/node_http_request/node_http_request.gml b/scripts/node_http_request/node_http_request.gml index d3e0305ce..601a347c9 100644 --- a/scripts/node_http_request/node_http_request.gml +++ b/scripts/node_http_request/node_http_request.gml @@ -6,7 +6,7 @@ function Node_HTTP_request(_x, _y, _group = noone) : Node(_x, _y, _group) constr newInput(1, nodeValue_Enum_Scroll("Type", self, 0, [ "Get", "Post" ])); - inputs[2] = nodeValue_Text("Content", self, "") + newInput(2, nodeValue_Text("Content", self, "")) outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.text, ""); diff --git a/scripts/node_image/node_image.gml b/scripts/node_image/node_image.gml index 082a7d6ea..76a717596 100644 --- a/scripts/node_image/node_image.gml +++ b/scripts/node_image/node_image.gml @@ -26,7 +26,7 @@ function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Image"; color = COLORS.node_blend_input; - inputs[0] = nodeValue_Path("Path", self, "") + newInput(0, nodeValue_Path("Path", self, "")) .setDisplay(VALUE_DISPLAY.path_load, { filter: "image|*.png;*.jpg" }); newInput(1, nodeValue_Padding("Padding", self, [0, 0, 0, 0])); diff --git a/scripts/node_image_animated/node_image_animated.gml b/scripts/node_image_animated/node_image_animated.gml index 4752fef0f..1eedb1953 100644 --- a/scripts/node_image_animated/node_image_animated.gml +++ b/scripts/node_image_animated/node_image_animated.gml @@ -38,22 +38,22 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons update_on_frame = true; - inputs[0] = nodeValue_Path("Path", self, []) + newInput(0, nodeValue_Path("Path", self, [])) .setDisplay(VALUE_DISPLAY.path_array, { filter: ["image|*.png;*.jpg", ""] }); - inputs[1] = nodeValue_Padding("Padding", self, [0, 0, 0, 0]) + newInput(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.") + newInput(2, nodeValue_Bool("Stretch frame", self, false, "Stretch animation speed to match project length.")) .rejectArray(); - inputs[3] = nodeValue_Float("Animation speed", self, 1) + newInput(3, nodeValue_Float("Animation speed", self, 1)) .rejectArray(); - inputs[4] = nodeValue_Enum_Scroll("Loop modes", self, 0, ["Loop", "Ping pong", "Hold last frame", "Hide"]) + newInput(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 ) + newInput(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); @@ -63,7 +63,7 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons newInput(7, nodeValue_Int("Frame", self, 0)); - inputs[8] = nodeValue_Enum_Scroll("Canvas size", self, 2, [ "First", "Minimum", "Maximum" ]) + newInput(8, nodeValue_Enum_Scroll("Canvas size", self, 2, [ "First", "Minimum", "Maximum" ])) .rejectArray(); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_image_gif/node_image_gif.gml b/scripts/node_image_gif/node_image_gif.gml index 35a9c9660..0ac8a0497 100644 --- a/scripts/node_image_gif/node_image_gif.gml +++ b/scripts/node_image_gif/node_image_gif.gml @@ -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_Path("Path", self, "") + newInput(0, nodeValue_Path("Path", self, "")) .setDisplay(VALUE_DISPLAY.path_load, { filter: "Animated gif|*.gif" }); - inputs[1] = nodeValue_Trigger("Set animation length to gif", self, false ) + newInput(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; @@ -42,7 +42,7 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct newInput(2, nodeValue_Bool("Output as array", self, false)); - inputs[3] = nodeValue_Enum_Scroll("Loop modes", self, 0, ["Loop", "Ping pong", "Hold last frame", "Hide"]) + newInput(3, nodeValue_Enum_Scroll("Loop modes", self, 0, ["Loop", "Ping pong", "Hold last frame", "Hide"])) .rejectArray(); newInput(4, nodeValue_Int("Start frame", self, 0)); diff --git a/scripts/node_image_grid/node_image_grid.gml b/scripts/node_image_grid/node_image_grid.gml index 3a14371aa..b61680a8a 100644 --- a/scripts/node_image_grid/node_image_grid.gml +++ b/scripts/node_image_grid/node_image_grid.gml @@ -5,14 +5,14 @@ function Node_Image_Grid(_x, _y, _group = noone) : Node(_x, _y, _group) construc new scrollItem("Vertical", s_node_alignment, 1) ]) .rejectArray(); - inputs[1] = nodeValue_Int("Column", self, 4) + newInput(1, nodeValue_Int("Column", self, 4)) .setValidator(VV_min(1)) .rejectArray(); - inputs[2] = nodeValue_Vec2("Spacing", self, [ 0, 0 ]) + newInput(2, nodeValue_Vec2("Spacing", self, [ 0, 0 ])) .rejectArray(); - inputs[3] = nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ]) + newInput(3, nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ])) .rejectArray(); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); @@ -23,7 +23,7 @@ function Node_Image_Grid(_x, _y, _group = noone) : Node(_x, _y, _group) construc static createNewInput = function() { var index = array_length(inputs); - inputs[index] = nodeValue_Surface("Input", self) + newInput(index, nodeValue_Surface("Input", self)) .setVisible(true, true); return inputs[index]; diff --git a/scripts/node_image_sequence/node_image_sequence.gml b/scripts/node_image_sequence/node_image_sequence.gml index 9731af7f2..a0f8dc32a 100644 --- a/scripts/node_image_sequence/node_image_sequence.gml +++ b/scripts/node_image_sequence/node_image_sequence.gml @@ -39,16 +39,16 @@ function Node_Image_Sequence(_x, _y, _group = noone) : Node(_x, _y, _group) cons spr = []; color = COLORS.node_blend_input; - inputs[0] = nodeValue_Path("Paths", self, []) + newInput(0, nodeValue_Path("Paths", self, [])) .setDisplay(VALUE_DISPLAY.path_array, { filter: ["image|*.png;*.jpg", ""] }); - inputs[1] = nodeValue_Padding("Padding", self, [0, 0, 0, 0]) + newInput(1, nodeValue_Padding("Padding", self, [0, 0, 0, 0])) .rejectArray(); - inputs[2] = nodeValue_Enum_Scroll("Canvas size", self, 0, [ "Individual", "Minimum", "Maximum" ]) + newInput(2, nodeValue_Enum_Scroll("Canvas size", self, 0, [ "Individual", "Minimum", "Maximum" ])) .rejectArray(); - inputs[3] = nodeValue_Enum_Scroll("Sizing method", self, 0, [ "Padding / Crop", "Scale" ]) + newInput(3, nodeValue_Enum_Scroll("Sizing method", self, 0, [ "Padding / Crop", "Scale" ])) .rejectArray(); input_display_list = [ diff --git a/scripts/node_image_sheet/node_image_sheet.gml b/scripts/node_image_sheet/node_image_sheet.gml index 4780a5600..e2e943c32 100644 --- a/scripts/node_image_sheet/node_image_sheet.gml +++ b/scripts/node_image_sheet/node_image_sheet.gml @@ -21,7 +21,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru 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.") + newInput(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; @@ -43,7 +43,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru doUpdate(); } }); #endregion - inputs[11] = nodeValue_Trigger("Sync animation", self, false ) + newInput(11, nodeValue_Trigger("Sync animation", self, false )) .setDisplay(VALUE_DISPLAY.button, { name: "Sync frames", UI : true, onClick: function() { var _atl = outputs[1].getValue(); var _spd = getInputData(8); @@ -54,7 +54,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru newInput(13, nodeValue_Enum_Scroll("Filtered Pixel", self, 0, [ "Transparent", "Color" ])); - inputs[14] = nodeValue_Color("Filtered Color", self, c_black) + newInput(14, nodeValue_Color("Filtered Color", self, c_black)) input_display_list = [ ["Sprite", false], 0, 1, 6, diff --git a/scripts/node_interlaced/node_interlaced.gml b/scripts/node_interlaced/node_interlaced.gml index 971438abe..d2509723f 100644 --- a/scripts/node_interlaced/node_interlaced.gml +++ b/scripts/node_interlaced/node_interlaced.gml @@ -8,7 +8,7 @@ function Node_Interlaced(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(2, nodeValue_Surface("Mask", self)); - inputs[3] = nodeValue_Float("Mix", self, 1) + newInput(3, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(4, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); diff --git a/scripts/node_interpret_number/node_interpret_number.gml b/scripts/node_interpret_number/node_interpret_number.gml index 308c25886..d08caa57a 100644 --- a/scripts/node_interpret_number/node_interpret_number.gml +++ b/scripts/node_interpret_number/node_interpret_number.gml @@ -2,7 +2,7 @@ function Node_Interpret_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, name = "Interpret Number"; dimension_index = -1; - inputs[0] = nodeValue_Float("Number", self, [] ) + newInput(0, nodeValue_Float("Number", self, [] )) .setVisible(true, true) .setArrayDepth(1); @@ -10,7 +10,7 @@ function Node_Interpret_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, newInput(2, nodeValue_Range("Range", self, [ 0, 1 ] )); - inputs[3] = nodeValue_Gradient("Gradient", self, new gradientObject(cola(c_white))) + newInput(3, nodeValue_Gradient("Gradient", self, new gradientObject(cola(c_white)))) .setMappable(4); ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_invert/node_invert.gml b/scripts/node_invert/node_invert.gml index c4be5ecdd..2095b5296 100644 --- a/scripts/node_invert/node_invert.gml +++ b/scripts/node_invert/node_invert.gml @@ -5,7 +5,7 @@ function Node_Invert(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co newInput(1, nodeValue_Surface("Mask", self)); - inputs[2] = nodeValue_Float("Mix", self, 1) + newInput(2, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(3, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_isosurf/node_isosurf.gml b/scripts/node_isosurf/node_isosurf.gml index acdd610c0..1f03ca3d9 100644 --- a/scripts/node_isosurf/node_isosurf.gml +++ b/scripts/node_isosurf/node_isosurf.gml @@ -1,20 +1,20 @@ function Node_IsoSurf(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "IsoSurf"; - inputs[0] = nodeValue_Int("Direction", self, 4) + newInput(0, nodeValue_Int("Direction", self, 4)) .setValidator(VV_min(1)); - inputs[1] = nodeValue_Surface("Surfaces", self) + newInput(1, nodeValue_Surface("Surfaces", self)) .setVisible(true, true) .setArrayDepth(1); newInput(2, nodeValue_Rotation("Angle Shift", self, 0)); - inputs[3] = nodeValue_Float("Angle Split", self, [ 0 * 90, 1 * 90, 2 * 90, 3 * 90 ]) + newInput(3, nodeValue_Float("Angle Split", self, [ 0 * 90, 1 * 90, 2 * 90, 3 * 90 ])) .setArrayDynamic() .setArrayDepth(1); - inputs[4] = nodeValue_Vector("Offsets", self, []) + newInput(4, nodeValue_Vector("Offsets", self, [])) .setArrayDepth(1); outputs[0] = nodeValue_Output("IsoSurf", self, VALUE_TYPE.dynaSurface, noone); diff --git a/scripts/node_iterate/node_iterate.gml b/scripts/node_iterate/node_iterate.gml index ede9d6762..551dbb7bd 100644 --- a/scripts/node_iterate/node_iterate.gml +++ b/scripts/node_iterate/node_iterate.gml @@ -1,7 +1,7 @@ function Node_Iterate(_x, _y, _group = noone) : Node_Iterator(_x, _y, _group) constructor { name = "Loop"; - inputs[0] = nodeValue_Int("Repeat", self, 1 ) + newInput(0, nodeValue_Int("Repeat", self, 1 )) .uncache(); custom_input_index = array_length(inputs); diff --git a/scripts/node_iterate_each/node_iterate_each.gml b/scripts/node_iterate_each/node_iterate_each.gml index e96f8f419..75c8e7887 100644 --- a/scripts/node_iterate_each/node_iterate_each.gml +++ b/scripts/node_iterate_each/node_iterate_each.gml @@ -1,7 +1,7 @@ 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, [] ) + newInput(0, nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, [] )) .setVisible(true, true); outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, [] ); diff --git a/scripts/node_iterate_filter/node_iterate_filter.gml b/scripts/node_iterate_filter/node_iterate_filter.gml index 9ff7dfaf3..26bb155ae 100644 --- a/scripts/node_iterate_filter/node_iterate_filter.gml +++ b/scripts/node_iterate_filter/node_iterate_filter.gml @@ -1,7 +1,7 @@ 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, [] ) + newInput(0, nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, [] )) .setVisible(true, true); outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, noone ); diff --git a/scripts/node_iterate_inline/node_iterate_inline.gml b/scripts/node_iterate_inline/node_iterate_inline.gml index 03d4bfd83..46d227aa9 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 ) + newInput(0, nodeValue_Int("Repeat", self, 1 )) .uncache(); managedRenderOrder = true; diff --git a/scripts/node_iterate_sort/node_iterate_sort.gml b/scripts/node_iterate_sort/node_iterate_sort.gml index ca91d4d1f..faf6107e1 100644 --- a/scripts/node_iterate_sort/node_iterate_sort.gml +++ b/scripts/node_iterate_sort/node_iterate_sort.gml @@ -6,7 +6,7 @@ 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, [] ) + newInput(0, nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, [] )) .setVisible(true, true); outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, noone ); 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 7755f16f0..8206ca536 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,7 +8,7 @@ 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, [] ) + newInput(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 ); 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 775d11d50..217c3e5f4 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,7 +8,7 @@ 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 ) + newInput(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, [] ); 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 ba72680e0..b24dd6aab 100644 --- a/scripts/node_iterator_each_output/node_iterator_each_output.gml +++ b/scripts/node_iterator_each_output/node_iterator_each_output.gml @@ -5,7 +5,7 @@ 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 ) + newInput(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 ) 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 52dc967a0..7e4338977 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,7 +8,7 @@ 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, [] ) + newInput(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 ); 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 dec7e8e14..cf4379fc5 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,10 +8,10 @@ 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 ) + newInput(0, nodeValue("Value out", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0 )) .setVisible(true, true); - inputs[1] = nodeValue_Bool("Filter result", self, false ) + newInput(1, nodeValue_Bool("Filter result", self, false )) .setVisible(true, true); outputs[0] = nodeValue_Output("Array out", self, VALUE_TYPE.any, [] ); 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 2ecd48d7b..6f00634bf 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 ) + newInput(0, nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, false )) .setVisible(true, true); - inputs[1] = nodeValue_Bool("Result", self, false ) + newInput(1, nodeValue_Bool("Result", self, false )) .setVisible(true, true); static getNextNodes = function() { diff --git a/scripts/node_iterator_output/node_iterator_output.gml b/scripts/node_iterator_output/node_iterator_output.gml index dc0bd54a3..38c9d0ece 100644 --- a/scripts/node_iterator_output/node_iterator_output.gml +++ b/scripts/node_iterator_output/node_iterator_output.gml @@ -16,7 +16,7 @@ function Node_Iterator_Output(_x, _y, _group = noone) : Node_Group_Output(_x, _y return true; } - inputs[1] = nodeValue("Loop exit", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, -1) + newInput(1, nodeValue("Loop exit", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, -1)) .uncache() .setVisible(true, true); 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 41fd6837e..c53b296ef 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,7 +8,7 @@ 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, [] ) + newInput(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 ); 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 1a48f7f79..5cc4dbd8e 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,7 +8,7 @@ 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 ) + newInput(0, nodeValue_Bool("Swap", self, false )) .setVisible(true, true); outputs[0] = nodeValue_Output("Array out", self, VALUE_TYPE.any, [] ); 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 4f031538b..cabcaf5b4 100644 --- a/scripts/node_iterator_sort_input/node_iterator_sort_input.gml +++ b/scripts/node_iterator_sort_input/node_iterator_sort_input.gml @@ -4,7 +4,7 @@ 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 ) + newInput(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 ); 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 b198d7615..6deeeef77 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 ) + newInput(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 efa1a64f9..18563ebb3 100644 --- a/scripts/node_jpeg/node_jpeg.gml +++ b/scripts/node_jpeg/node_jpeg.gml @@ -6,17 +6,17 @@ function Node_JPEG(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons newInput(1, nodeValue_Bool("Active", self, true)); active_index = 1; - inputs[2] = nodeValue_Int("Patch Size", self, 8) + newInput(2, nodeValue_Int("Patch Size", self, 8)) .setValidator(VV_min(1)); newInput(3, nodeValue_Float("Compression", self, 10)); - inputs[4] = nodeValue_Int("Reconstruction", self, 8) + newInput(4, nodeValue_Int("Reconstruction", self, 8)) .setValidator(VV_min(0)); newInput(5, nodeValue_Surface("Mask", self)); - inputs[6] = nodeValue_Float("Mix", self, 1) + newInput(6, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(7, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); @@ -27,9 +27,9 @@ function Node_JPEG(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons newInput(11, nodeValue_Rotation("Phase", self, 0)); - inputs[12] = nodeValue_Bool("Deconstruct Only", self, false) + newInput(12, nodeValue_Bool("Deconstruct Only", self, false)) - inputs[13] = nodeValue_Bool("Reconstruct All", self, false) + newInput(13, nodeValue_Bool("Reconstruct All", self, false)) outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); 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 ef485c6c1..624bd4333 100644 --- a/scripts/node_json_file_read/node_json_file_read.gml +++ b/scripts/node_json_file_read/node_json_file_read.gml @@ -29,7 +29,7 @@ function Node_Json_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons w = 128; - inputs[0] = nodeValue_Path("Path", self, "") + newInput(0, nodeValue_Path("Path", self, "")) .setDisplay(VALUE_DISPLAY.path_load, { filter: "JSON file|*.json" }) .rejectArray(); 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 01576bd85..99a59f84b 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_Path("Path", self, "") + newInput(0, nodeValue_Path("Path", self, "")) .setDisplay(VALUE_DISPLAY.path_save, { filter: "json file|*.json" }) .rejectArray(); - inputs[1] = nodeValue_Struct("Struct", self, {}) + newInput(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 81c7484b7..2b8b63540 100644 --- a/scripts/node_kuwahara/node_kuwahara.gml +++ b/scripts/node_kuwahara/node_kuwahara.gml @@ -6,12 +6,12 @@ function Node_Kuwahara(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(1, nodeValue_Bool("Active", self, true)); active_index = 1; - inputs[2] = nodeValue_Int("Radius", self, 2) + newInput(2, nodeValue_Int("Radius", self, 2)) .setValidator(VV_min(1)); newInput(3, nodeValue_Surface("Mask", self)); - inputs[4] = nodeValue_Float("Mix", self, 1) + newInput(4, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(5, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_level/node_level.gml b/scripts/node_level/node_level.gml index 68a661589..646932c8e 100644 --- a/scripts/node_level/node_level.gml +++ b/scripts/node_level/node_level.gml @@ -15,7 +15,7 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con newInput(6, nodeValue_Surface("Mask", self)); - inputs[7] = nodeValue_Float("Mix", self, 1) + newInput(7, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(8, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_level_selector/node_level_selector.gml b/scripts/node_level_selector/node_level_selector.gml index 39442fc24..b984f489d 100644 --- a/scripts/node_level_selector/node_level_selector.gml +++ b/scripts/node_level_selector/node_level_selector.gml @@ -3,17 +3,17 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("Midpoint", self, 0) + newInput(1, nodeValue_Float("Midpoint", self, 0)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(9); - inputs[2] = nodeValue_Float("Range", self, 0.1) + newInput(2, nodeValue_Float("Range", self, 0.1)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(10); newInput(3, nodeValue_Surface("Mask", self)); - inputs[4] = nodeValue_Float("Mix", self, 1) + newInput(4, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(5, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_line/node_line.gml b/scripts/node_line/node_line.gml index 06ec99ca3..26e64a1fc 100644 --- a/scripts/node_line/node_line.gml +++ b/scripts/node_line/node_line.gml @@ -5,22 +5,22 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons newInput(1, nodeValue_Bool("Background", self, false)); - inputs[2] = nodeValue_Int("Segment", self, 1) + newInput(2, nodeValue_Int("Segment", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] }); newInput(3, nodeValue_Vec2("Width", self, [ 2, 2 ])); - inputs[4] = nodeValue_Float("Wiggle", self, 0) + newInput(4, nodeValue_Float("Wiggle", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.01] }); newInput(5, nodeValue_Float("Random seed", self, 0)); newInput(6, nodeValue_Rotation("Rotation", self, 0)); - inputs[7] = nodeValue_PathNode("Path", self, noone, "Draw line along path.") + newInput(7, nodeValue_PathNode("Path", self, noone, "Draw line along path.")) .setVisible(true, true); - inputs[8] = nodeValue_Slider_Range("Range", self, [0, 1]) + newInput(8, nodeValue_Slider_Range("Range", self, [0, 1])) .setTooltip("Range of the path to draw."); newInput(9, nodeValue_Float("Shift", self, 0)); @@ -33,7 +33,7 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons newInput(13, nodeValue_Bool("Round cap", self, false)); - inputs[14] = nodeValue_Int("Round segment", self, 4) + newInput(14, nodeValue_Int("Round segment", self, 4)) .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 0.1] }); newInput(15, nodeValue_Bool("Span color over path", self, false, "Apply the full 'color over length' to the trimmed path.")); @@ -62,14 +62,14 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons newInput(27, nodeValue_Enum_Scroll("Data Type", self, 1, [ "None", "Path", "Segments" ])); - inputs[28] = nodeValue_Vector("Segments", self, [[]]) + newInput(28, nodeValue_Vector("Segments", self, [[]])) .setArrayDepth(2); newInput(29, nodeValue_Bool("Scale texture to length", self, true )); newInput(30, nodeValue_Bool("Use Path Bounding box", self, false )); - inputs[31] = nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ]) + newInput(31, nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ])) input_display_list = [ ["Output", true], 0, 1, 30, 31, diff --git a/scripts/node_local_analyze/node_local_analyze.gml b/scripts/node_local_analyze/node_local_analyze.gml index e8f3e2831..4eb462528 100644 --- a/scripts/node_local_analyze/node_local_analyze.gml +++ b/scripts/node_local_analyze/node_local_analyze.gml @@ -5,10 +5,10 @@ function Node_Local_Analyze(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr newInput(1, nodeValue_Enum_Scroll("Algorithm", self, 0, [ "Average (Blur)", "Maximum", "Minimum" ])); - inputs[2] = nodeValue_Float("Size", self, 1) + newInput(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" ]) + newInput(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), @@ -17,7 +17,7 @@ function Node_Local_Analyze(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr newInput(5, nodeValue_Surface("Mask", self)); - inputs[6] = nodeValue_Float("Mix", self, 1) + newInput(6, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(7, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_logic/node_logic.gml b/scripts/node_logic/node_logic.gml index 50759f6ba..ceef0e3e0 100644 --- a/scripts/node_logic/node_logic.gml +++ b/scripts/node_logic/node_logic.gml @@ -46,7 +46,7 @@ function Node_Logic(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var index = array_length(inputs); var jname = chr(ord("a") + index - 1); - inputs[index] = nodeValue_Bool(jname, self, false ) + newInput(index, nodeValue_Bool(jname, self, false )) .setVisible(true, true); return inputs[index]; diff --git a/scripts/node_lovify/node_lovify.gml b/scripts/node_lovify/node_lovify.gml index 4fa5080ad..7d831d634 100644 --- a/scripts/node_lovify/node_lovify.gml +++ b/scripts/node_lovify/node_lovify.gml @@ -4,13 +4,13 @@ function Node_Lovify(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Int("Seed", self, seed_random(6)) + newInput(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 ) + newInput(2, nodeValue_Float("Density", self, 0.5 )) .setDisplay(VALUE_DISPLAY.slider); - inputs[3] = nodeValue_Float("Distribution", self, 0.1 ) + newInput(3, nodeValue_Float("Distribution", self, 0.1 )) .setDisplay(VALUE_DISPLAY.slider); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_lua_compute/node_lua_compute.gml b/scripts/node_lua_compute/node_lua_compute.gml index 80be96c7a..62f83a040 100644 --- a/scripts/node_lua_compute/node_lua_compute.gml +++ b/scripts/node_lua_compute/node_lua_compute.gml @@ -6,13 +6,13 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru newInput(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) + newInput(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) + newInput(3, nodeValue("Execution thread", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, noone)) .setVisible(false, true); - inputs[4] = nodeValue_Bool("Execute on frame", self, true) + newInput(4, nodeValue_Bool("Execute on frame", self, true)) outputs[0] = nodeValue_Output("Execution thread", self, VALUE_TYPE.node, noone ); diff --git a/scripts/node_lua_global/node_lua_global.gml b/scripts/node_lua_global/node_lua_global.gml index 752a9d8e2..38f8d38ef 100644 --- a/scripts/node_lua_global/node_lua_global.gml +++ b/scripts/node_lua_global/node_lua_global.gml @@ -2,12 +2,12 @@ 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) + newInput(0, nodeValue_Text("Lua code", self, "", o_dialog_lua_reference)) .setDisplay(VALUE_DISPLAY.codeLUA); newInput(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) + newInput(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 ); diff --git a/scripts/node_lua_surface/node_lua_surface.gml b/scripts/node_lua_surface/node_lua_surface.gml index 7c69d6e24..19274b7ad 100644 --- a/scripts/node_lua_surface/node_lua_surface.gml +++ b/scripts/node_lua_surface/node_lua_surface.gml @@ -7,13 +7,13 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru newInput(1, nodeValue_Vec2("Output dimension", self, DEF_SURF)); - inputs[2] = nodeValue_Text("Lua code", self, "", o_dialog_lua_reference) + newInput(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) + newInput(3, nodeValue("Execution thread", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, noone)) .setVisible(false, true); - inputs[4] = nodeValue_Bool("Execute on frame", self, true) + newInput(4, nodeValue_Bool("Execute on frame", self, true)) outputs[0] = nodeValue_Output("Execution thread", self, VALUE_TYPE.node, noone ); diff --git a/scripts/node_math/node_math.gml b/scripts/node_math/node_math.gml index 0a5613b0f..467f9826d 100644 --- a/scripts/node_math/node_math.gml +++ b/scripts/node_math/node_math.gml @@ -84,10 +84,10 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { /*10 - 20*/ "Floor", "Ceil", "Round", "Lerp", "Abs", "Clamp", "Snap" ]) .rejectArray(); - inputs[1] = nodeValue_Float("a", self, 0) + newInput(1, nodeValue_Float("a", self, 0)) .setVisible(true, true); - inputs[2] = nodeValue_Float("b", self, 0) + newInput(2, nodeValue_Float("b", self, 0)) .setVisible(true, true); newInput(3, nodeValue_Bool("Degree angle", self, true)); 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 384d85d4f..b4dddc3f1 100644 --- a/scripts/node_mesh_create_path/node_mesh_create_path.gml +++ b/scripts/node_mesh_create_path/node_mesh_create_path.gml @@ -3,7 +3,7 @@ function Node_Mesh_Create_Path(_x, _y, _group = noone) : Node(_x, _y, _group) co setDimension(96, 48); - inputs[0] = nodeValue_PathNode("Path", self, noone) + newInput(0, nodeValue_PathNode("Path", self, noone)) .setVisible(true, true); newInput(1, nodeValue_Int("Sample", self, 8)); 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 4afb2ad66..a32a2a5e9 100644 --- a/scripts/node_mesh_to_path/node_mesh_to_path.gml +++ b/scripts/node_mesh_to_path/node_mesh_to_path.gml @@ -3,7 +3,7 @@ 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) + newInput(0, nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone)) .setVisible(true, true); outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, noone); diff --git a/scripts/node_mesh_transform/node_mesh_transform.gml b/scripts/node_mesh_transform/node_mesh_transform.gml index f1ee31509..c9cfdc17b 100644 --- a/scripts/node_mesh_transform/node_mesh_transform.gml +++ b/scripts/node_mesh_transform/node_mesh_transform.gml @@ -2,7 +2,7 @@ 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) + newInput(0, nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone)) .setVisible(true, true); newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])); diff --git a/scripts/node_mesh_warp/node_mesh_warp.gml b/scripts/node_mesh_warp/node_mesh_warp.gml index c540439a8..cc466b085 100644 --- a/scripts/node_mesh_warp/node_mesh_warp.gml +++ b/scripts/node_mesh_warp/node_mesh_warp.gml @@ -156,13 +156,13 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Int("Sample", self, 8, "Amount of grid subdivision. Higher number means more grid, detail.") + newInput(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) + newInput(2, nodeValue_Float("Spring Force", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider); - inputs[3] = nodeValue_Trigger("Mesh", self, false ) + newInput(3, nodeValue_Trigger("Mesh", self, false )) .setDisplay(VALUE_DISPLAY.button, { name: "Generate", UI : true, onClick: function() { Mesh_setTriangle(); } }); newInput(4, nodeValue_Bool("Diagonal Link", self, false, "Include diagonal link to prevent drastic grid deformation.")); @@ -170,7 +170,7 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(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.") + newInput(6, nodeValue_Float("Link Strength", self, 0, "Link length preservation, setting it to 1 will prevent any stretching, contraction.")) .setDisplay(VALUE_DISPLAY.slider); newInput(7, nodeValue_Bool("Full Mesh", self, false)); @@ -178,7 +178,7 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) 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)) + newInput(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) }); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -197,7 +197,7 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) function createControl() { #region var index = array_length(inputs); - inputs[index] = nodeValue_Float("Control point", self, [ PUPPET_FORCE_MODE.move, 16, 16, 8, 0, 8, 8 ]) + newInput(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); diff --git a/scripts/node_midi_in/node_midi_in.gml b/scripts/node_midi_in/node_midi_in.gml index 2c9ca866f..c8e2f1286 100644 --- a/scripts/node_midi_in/node_midi_in.gml +++ b/scripts/node_midi_in/node_midi_in.gml @@ -13,7 +13,7 @@ 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 }) + newInput(0, nodeValue_Enum_Scroll("Input", self, 0, { data: _miniNames, update_hover: false })) .rejectArray(); outputs[0] = nodeValue_Output("Raw Message", self, VALUE_TYPE.float, []); diff --git a/scripts/node_mirror/node_mirror.gml b/scripts/node_mirror/node_mirror.gml index ab45d4425..698addf1e 100644 --- a/scripts/node_mirror/node_mirror.gml +++ b/scripts/node_mirror/node_mirror.gml @@ -4,7 +4,7 @@ function Node_Mirror(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Vec2("Position", self, [ 0.5, 0.5 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0.5, 0.5 ])) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); newInput(2, nodeValue_Rotation("Angle", self, 0)); diff --git a/scripts/node_mk_blinker/node_mk_blinker.gml b/scripts/node_mk_blinker/node_mk_blinker.gml index 245dfd4a1..5727f7538 100644 --- a/scripts/node_mk_blinker/node_mk_blinker.gml +++ b/scripts/node_mk_blinker/node_mk_blinker.gml @@ -6,10 +6,10 @@ function Node_MK_Blinker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(1, nodeValue_Surface("Mask", self)); - inputs[2] = nodeValue_Int("Seed", self, seed_random(6)) + newInput(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) + newInput(3, nodeValue_Float("Amount", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider); newInput(4, nodeValue_Palette("Target Colors", self, [ c_black ] )); @@ -19,15 +19,15 @@ function Node_MK_Blinker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(6, nodeValue_Bool("Active", self, true)); active_index = 6; - inputs[7] = nodeValue_Float("Tolerance", self, 0.1 ) + newInput(7, nodeValue_Float("Tolerance", self, 0.1 )) .setDisplay(VALUE_DISPLAY.slider); newInput(8, nodeValue_Bool("Glow", self, false)); - inputs[9] = nodeValue_Float("Size", self, 4 ) + newInput(9, nodeValue_Float("Size", self, 4 )) .setDisplay(VALUE_DISPLAY.slider, { range : [ 1, 8, 0.1 ] }); - inputs[10] = nodeValue_Float("Strength", self, 0.5 ) + newInput(10, nodeValue_Float("Strength", self, 0.5 )) .setDisplay(VALUE_DISPLAY.slider); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_mk_brownian/node_mk_brownian.gml b/scripts/node_mk_brownian/node_mk_brownian.gml index 9b339076b..dc1dbb050 100644 --- a/scripts/node_mk_brownian/node_mk_brownian.gml +++ b/scripts/node_mk_brownian/node_mk_brownian.gml @@ -18,7 +18,7 @@ function Node_MK_Brownian(_x, _y, _group = noone) : Node(_x, _y, _group) constru newInput(7, nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11)); - inputs[8] = nodeValue_Int("Seed", self, seed_random(6)) + newInput(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) }); newInput(9, nodeValue_Range("Angular speed", self, [ -45, 45 ])); diff --git a/scripts/node_mk_fall/node_mk_fall.gml b/scripts/node_mk_fall/node_mk_fall.gml index 5528a5e03..b6d5962dd 100644 --- a/scripts/node_mk_fall/node_mk_fall.gml +++ b/scripts/node_mk_fall/node_mk_fall.gml @@ -6,7 +6,7 @@ function Node_MK_Fall(_x, _y, _group = noone) : Node(_x, _y, _group) constructor newInput(1, nodeValue_Dimension(self)); - inputs[2] = nodeValue_Int("Seed", self, seed_random(6)) + newInput(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) }); newInput(3, nodeValue_Area("Area", self, DEF_AREA)); @@ -29,7 +29,7 @@ function Node_MK_Fall(_x, _y, _group = noone) : Node(_x, _y, _group) constructor newInput(12, nodeValue_Vec2("Wind", self, [ 0, 0 ])); - inputs[13] = nodeValue_Gradient("Color", self, new gradientObject(cola(c_white))) + newInput(13, nodeValue_Gradient("Color", self, new gradientObject(cola(c_white)))) newInput(14, nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11)); @@ -41,7 +41,7 @@ function Node_MK_Fall(_x, _y, _group = noone) : Node(_x, _y, _group) constructor newInput(18, nodeValue_Bool("Twist", self, false)); - inputs[19] = nodeValue_Float("Twist Rate", self, 0.1) + newInput(19, nodeValue_Float("Twist Rate", self, 0.1)) .setDisplay(VALUE_DISPLAY.slider); newInput(20, nodeValue_Range("Twist Speed", self, [ 5, 10 ])); @@ -50,7 +50,7 @@ function Node_MK_Fall(_x, _y, _group = noone) : Node(_x, _y, _group) constructor newInput(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) + newInput(23, nodeValue_Float("Twist Radius", self, 0.7)) .setDisplay(VALUE_DISPLAY.slider); outputs[0] = nodeValue_Output("Output", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_mk_flag/node_mk_flag.gml b/scripts/node_mk_flag/node_mk_flag.gml index 98acde27b..5c54a76db 100644 --- a/scripts/node_mk_flag/node_mk_flag.gml +++ b/scripts/node_mk_flag/node_mk_flag.gml @@ -14,22 +14,22 @@ function Node_MK_Flag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c newInput(5, nodeValue_Float("Wind speed", self, 2)); - inputs[6] = nodeValue_Float("Wave width", self, 1) + newInput(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) + newInput(7, nodeValue_Float("Wave size", self, 0.2)) .setDisplay(VALUE_DISPLAY.slider); - inputs[8] = nodeValue_Float("Phase", self, 0.1) + newInput(8, nodeValue_Float("Phase", self, 0.1)) .setDisplay(VALUE_DISPLAY.slider); - inputs[9] = nodeValue_Float("Clip", self, 0.2) + newInput(9, nodeValue_Float("Clip", self, 0.2)) .setDisplay(VALUE_DISPLAY.slider); - inputs[10] = nodeValue_Float("Shadow", self, 0.2) + newInput(10, nodeValue_Float("Shadow", self, 0.2)) .setDisplay(VALUE_DISPLAY.slider); - inputs[11] = nodeValue_Float("Shadow threshold", self, 0) + newInput(11, nodeValue_Float("Shadow threshold", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [-0.1, 0.1, 0.001] }); newInput(12, nodeValue_Bool("Invert shadow", self, 0)); diff --git a/scripts/node_mk_flare/node_mk_flare.gml b/scripts/node_mk_flare/node_mk_flare.gml index 5d1184312..0f5636369 100644 --- a/scripts/node_mk_flare/node_mk_flare.gml +++ b/scripts/node_mk_flare/node_mk_flare.gml @@ -27,14 +27,14 @@ function Node_MK_Flare(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(0, nodeValue_Surface("Background", self)); - inputs[1] = nodeValue_Vec2("Origin", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Origin", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); newInput(2, nodeValue_Dimension(self)); - inputs[3] = nodeValue_Float("Scale", self, 1) + newInput(3, nodeValue_Float("Scale", self, 1)) - inputs[4] = nodeValue_Float("Alpha", self, 1) + newInput(4, nodeValue_Float("Alpha", self, 1)) .setDisplay(VALUE_DISPLAY.slider); inputs[5] = nodeValue_Struct("Flares", self, [ @@ -55,7 +55,7 @@ function Node_MK_Flare(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setArrayDepth(1) .setArrayDynamic(); - inputs[6] = nodeValue_Vec2("Focus", self, [ 0.5, 0.5 ]) + newInput(6, nodeValue_Vec2("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); diff --git a/scripts/node_mk_fracture/node_mk_fracture.gml b/scripts/node_mk_fracture/node_mk_fracture.gml index c6d0f23dc..8c34061a9 100644 --- a/scripts/node_mk_fracture/node_mk_fracture.gml +++ b/scripts/node_mk_fracture/node_mk_fracture.gml @@ -5,22 +5,22 @@ function Node_MK_Fracture(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(1, nodeValue_Vec2("Subdivision", self, [ 4, 4 ])); - inputs[2] = nodeValue_Float("Progress", self, 0.5) + newInput(2, nodeValue_Float("Progress", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(3); newInput(3, nodeValueMap("Progress map", self)); - inputs[4] = nodeValue_Vec2("Movement", self, [ 0, 0 ]) + newInput(4, nodeValue_Vec2("Movement", self, [ 0, 0 ])) .setMappable(9, true); - inputs[5] = nodeValue_Rotation("Rotation", self, 180) + newInput(5, nodeValue_Rotation("Rotation", self, 180)) .setMappable(10); - inputs[6] = nodeValue_Float("Scale", self, 0.) + newInput(6, nodeValue_Float("Scale", self, 0.)) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Float("Alpha", self, 1.) + newInput(7, nodeValue_Float("Alpha", self, 1.)) .setDisplay(VALUE_DISPLAY.slider); newInput(8, nodeValue_Float("Gravity", self, 0.)); @@ -29,10 +29,10 @@ function Node_MK_Fracture(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(10, nodeValueMap("Rotation map", self)); - inputs[11] = nodeValue_Float("Brick Shift", self, 0.) + newInput(11, nodeValue_Float("Brick Shift", self, 0.)) .setDisplay(VALUE_DISPLAY.slider); - inputs[12] = nodeValue_Float("Skew", self, 0.) + newInput(12, nodeValue_Float("Skew", self, 0.)) .setDisplay(VALUE_DISPLAY.slider, { range : [ -1, 1, 0.01 ] }); newInput(13, nodeValue_Enum_Button("Brick Axis", self, 0, [ "X", "Y" ])); diff --git a/scripts/node_mk_gridballs/node_mk_gridballs.gml b/scripts/node_mk_gridballs/node_mk_gridballs.gml index bfea9fc85..616c8bf4d 100644 --- a/scripts/node_mk_gridballs/node_mk_gridballs.gml +++ b/scripts/node_mk_gridballs/node_mk_gridballs.gml @@ -11,10 +11,10 @@ function Node_MK_GridBalls(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(4, nodeValue_Float("Scatter", self, 0)); - inputs[5] = nodeValue_Int("Seed", self, seed_random(6)) + newInput(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) + newInput(6, nodeValue_Float("Shading", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider); newInput(7, nodeValue_Rotation("Scatter direction", self, 0)); @@ -25,17 +25,17 @@ function Node_MK_GridBalls(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(10, nodeValue_Rotation("Stretch direction", self, 0)); - inputs[11] = nodeValue_Float("Stretch shift", self, 0) + newInput(11, nodeValue_Float("Stretch shift", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); - inputs[12] = nodeValue_Float("Roundness", self, 1) + newInput(12, nodeValue_Float("Roundness", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(13, nodeValue_Float("Twist", self, 0)); newInput(14, nodeValue_Rotation("Twist axis", self, 0)); - inputs[15] = nodeValue_Float("Twist shift", self, 0) + newInput(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, diff --git a/scripts/node_mk_gridflip/node_mk_gridflip.gml b/scripts/node_mk_gridflip/node_mk_gridflip.gml index ca88bc8c7..6ed5ccdc9 100644 --- a/scripts/node_mk_gridflip/node_mk_gridflip.gml +++ b/scripts/node_mk_gridflip/node_mk_gridflip.gml @@ -7,7 +7,7 @@ function Node_MK_GridFlip(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(2, nodeValue_Vec2("Amount", self, [ 4, 4 ])); - inputs[3] = nodeValue_Int("Seed", self, seed_random(6)) + newInput(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) }); newInput(4, nodeValue_Surface("Surface back", self)); @@ -20,7 +20,7 @@ function Node_MK_GridFlip(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(8, nodeValue_Rotation("Sweep direction", self, 0)); - inputs[9] = nodeValue_Float("Sweep shift", self, 0) + newInput(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), diff --git a/scripts/node_mk_rain/node_mk_rain.gml b/scripts/node_mk_rain/node_mk_rain.gml index eaefc121e..a592190b5 100644 --- a/scripts/node_mk_rain/node_mk_rain.gml +++ b/scripts/node_mk_rain/node_mk_rain.gml @@ -18,7 +18,7 @@ function Node_MK_Rain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c newInput(7, nodeValue_Range("Velocity", self, [ 1, 2 ])); - inputs[8] = nodeValue_Int("Seed", self, seed_random(6)) + newInput(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), @@ -35,7 +35,7 @@ function Node_MK_Rain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c newInput(14, nodeValue_Bool("Limited lifespan", self, false)); - inputs[15] = nodeValue_Slider_Range("Lifespan", self, [ 0, 1 ]) + newInput(15, nodeValue_Slider_Range("Lifespan", self, [ 0, 1 ])) .setTooltip("Lifespan of a droplet as a ratio of the entire animation."); newInput(16, nodeValue("Alpha over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11)); diff --git a/scripts/node_mk_saber/node_mk_saber.gml b/scripts/node_mk_saber/node_mk_saber.gml index 33d79fb46..547120006 100644 --- a/scripts/node_mk_saber/node_mk_saber.gml +++ b/scripts/node_mk_saber/node_mk_saber.gml @@ -7,9 +7,9 @@ function Node_MK_Saber(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(2, nodeValue_Vec2("Point 2", self, [ 16, 16 ])); - inputs[3] = nodeValue_Int("Thickness", self, 2) + newInput(3, nodeValue_Int("Thickness", self, 2)) - inputs[4] = nodeValue_Gradient("Color", self, new gradientObject(cola(c_white))) + newInput(4, nodeValue_Gradient("Color", self, new gradientObject(cola(c_white)))) newInput(5, nodeValue_Int("Trace", self, 0)); @@ -17,12 +17,12 @@ function Node_MK_Saber(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(7, nodeValue_Int("Gradient step", self, 1)); - inputs[8] = nodeValue_Float("Glow intensity", self, 0) + newInput(8, nodeValue_Float("Glow intensity", self, 0)) .setDisplay(VALUE_DISPLAY.slider); newInput(9, nodeValue_Int("Glow radius", self, 0)); - inputs[10] = nodeValue_Surface("Trace texture", self) + newInput(10, nodeValue_Surface("Trace texture", self)) .setVisible(true, true); input_display_list = [ new Inspector_Sprite(s_MKFX), 0, diff --git a/scripts/node_mk_sparkle/node_mk_sparkle.gml b/scripts/node_mk_sparkle/node_mk_sparkle.gml index aaeb91986..513970da1 100644 --- a/scripts/node_mk_sparkle/node_mk_sparkle.gml +++ b/scripts/node_mk_sparkle/node_mk_sparkle.gml @@ -162,7 +162,7 @@ function __Node_MK_Sparkle(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(3, nodeValue_Float("Speed", self, 1)); - inputs[4] = nodeValue_Int("Loop", self, []) + newInput(4, nodeValue_Int("Loop", self, [])) .setArrayDepth(1) .setArrayDynamic(); diff --git a/scripts/node_mk_tile/node_mk_tile.gml b/scripts/node_mk_tile/node_mk_tile.gml index aaffebeb1..49d66d59c 100644 --- a/scripts/node_mk_tile/node_mk_tile.gml +++ b/scripts/node_mk_tile/node_mk_tile.gml @@ -27,7 +27,7 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c newInput(13, nodeValue_Enum_Button("Edge transform", self, 0, [ "Flip", "Rotate" ] )); - inputs[14] = nodeValue_Bool("Sort array by bit", self, true) + newInput(14, nodeValue_Bool("Sort array by bit", self, true)) input_display_list = [ new Inspector_Sprite(s_MKFX), ["Surfaces", true], 0, 1, diff --git a/scripts/node_morph_surface/node_morph_surface.gml b/scripts/node_morph_surface/node_morph_surface.gml index 3ae779c1f..031dcde70 100644 --- a/scripts/node_morph_surface/node_morph_surface.gml +++ b/scripts/node_morph_surface/node_morph_surface.gml @@ -5,10 +5,10 @@ function Node_Morph_Surface(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr newInput(1, nodeValue_Surface("Surface to", self)); - inputs[2] = nodeValue_Float("Morph amount", self, 0) + newInput(2, nodeValue_Float("Morph amount", self, 0)) .setDisplay(VALUE_DISPLAY.slider); - inputs[3] = nodeValue_Float("Threshold", self, 0.5) + newInput(3, nodeValue_Float("Threshold", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_move_point/node_move_point.gml b/scripts/node_move_point/node_move_point.gml index 02527b219..10c04ca76 100644 --- a/scripts/node_move_point/node_move_point.gml +++ b/scripts/node_move_point/node_move_point.gml @@ -4,7 +4,7 @@ function Node_Move_Point(_x, _y, _group = noone) : Node_Processor(_x, _y, _group setDimension(96, 48); - inputs[0] = nodeValue_Vec2("Point", self, [ 0, 0, ]) + newInput(0, nodeValue_Vec2("Point", self, [ 0, 0, ])) .setVisible(true, true); newInput(1, nodeValue_Enum_Scroll("Mode", self, 0, [ "XY Shift", "Direction + Distance" ])); diff --git a/scripts/node_noise/node_noise.gml b/scripts/node_noise/node_noise.gml index 9c7a08377..74c7abc87 100644 --- a/scripts/node_noise/node_noise.gml +++ b/scripts/node_noise/node_noise.gml @@ -3,7 +3,7 @@ function Node_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) }); newInput(2, nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ])); diff --git a/scripts/node_noise_aniso/node_noise_aniso.gml b/scripts/node_noise_aniso/node_noise_aniso.gml index 45b2accb8..72673f963 100644 --- a/scripts/node_noise_aniso/node_noise_aniso.gml +++ b/scripts/node_noise_aniso/node_noise_aniso.gml @@ -3,19 +3,19 @@ function Node_Noise_Aniso(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Float("X Amount", self, 2) + newInput(1, nodeValue_Float("X Amount", self, 2)) .setMappable(6); - inputs[2] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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_Vec2("Position", self, [ 0, 0 ]) + newInput(3, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); - inputs[4] = nodeValue_Rotation("Rotation", self, 0) + newInput(4, nodeValue_Rotation("Rotation", self, 0)) .setMappable(8); - inputs[5] = nodeValue_Float("Y Amount", self, 16) + newInput(5, nodeValue_Float("Y Amount", self, 16)) .setMappable(7); ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -28,7 +28,7 @@ function Node_Noise_Aniso(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[9] = nodeValue_Enum_Scroll("Render mode", self, 0, [ "Blend", "Waterfall" ] ) + newInput(9, nodeValue_Enum_Scroll("Render mode", self, 0, [ "Blend", "Waterfall" ] )) input_display_list = [ ["Output", false], 0, diff --git a/scripts/node_noise_bubble/node_noise_bubble.gml b/scripts/node_noise_bubble/node_noise_bubble.gml index 23049c3a2..5e62e3306 100644 --- a/scripts/node_noise_bubble/node_noise_bubble.gml +++ b/scripts/node_noise_bubble/node_noise_bubble.gml @@ -2,18 +2,18 @@ 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 ) + newInput(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)) + newInput(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"); newInput(3, nodeValue_Slider_Range("Scale", self, [ 0.5, 0.8 ] )); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[4] = nodeValue_Float("Thickness", self, 0 ) + newInput(4, nodeValue_Float("Thickness", self, 0 )) .setDisplay(VALUE_DISPLAY.slider); addShaderProp(SHADER_UNIFORM.float, "thickness"); diff --git a/scripts/node_noise_cristal/node_noise_cristal.gml b/scripts/node_noise_cristal/node_noise_cristal.gml index 9d62586da..20b347d3c 100644 --- a/scripts/node_noise_cristal/node_noise_cristal.gml +++ b/scripts/node_noise_cristal/node_noise_cristal.gml @@ -8,7 +8,7 @@ function Node_Noise_Cristal(_x, _y, _group = noone) : Node_Shader_Generator(_x, newInput(2, nodeValue_Vec2("Scale", self, [ 1, 1 ] )); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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"); @@ -18,7 +18,7 @@ function Node_Noise_Cristal(_x, _y, _group = noone) : Node_Shader_Generator(_x, newInput(5, nodeValue_Color("Color", self, c_white )); addShaderProp(SHADER_UNIFORM.color, "color"); - inputs[6] = nodeValue_Float("Gamma", self, 1 ) + newInput(6, nodeValue_Float("Gamma", self, 1 )) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); addShaderProp(SHADER_UNIFORM.float, "gamma"); diff --git a/scripts/node_noise_fbm/node_noise_fbm.gml b/scripts/node_noise_fbm/node_noise_fbm.gml index 3ff2c4483..b36bcd0e5 100644 --- a/scripts/node_noise_fbm/node_noise_fbm.gml +++ b/scripts/node_noise_fbm/node_noise_fbm.gml @@ -3,7 +3,7 @@ function Node_Noise_FBM(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) }); newInput(2, nodeValue_Vec2("Position", self, [ 0, 0 ])); diff --git a/scripts/node_noise_hex/node_noise_hex.gml b/scripts/node_noise_hex/node_noise_hex.gml index 34a0908e8..69fa4c27c 100644 --- a/scripts/node_noise_hex/node_noise_hex.gml +++ b/scripts/node_noise_hex/node_noise_hex.gml @@ -13,7 +13,7 @@ function Node_Noise_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) }); newInput(2, nodeValue_Vec2("Position", self, [ 0, 0] )); diff --git a/scripts/node_noise_simplex/node_noise_simplex.gml b/scripts/node_noise_simplex/node_noise_simplex.gml index a5f3928ae..d2b3e17be 100644 --- a/scripts/node_noise_simplex/node_noise_simplex.gml +++ b/scripts/node_noise_simplex/node_noise_simplex.gml @@ -5,10 +5,10 @@ function Node_Noise_Simplex(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr newInput(1, nodeValue_Vec3("Position", self, [ 0, 0, 0 ] )); - inputs[2] = nodeValue_Vec2("Scale", self, [ 1, 1 ] ) + newInput(2, nodeValue_Vec2("Scale", self, [ 1, 1 ] )) .setMappable(8); - inputs[3] = nodeValue_Int("Iteration", self, 1 ) + newInput(3, nodeValue_Int("Iteration", self, 1 )) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }) .setMappable(9); diff --git a/scripts/node_noise_strand/node_noise_strand.gml b/scripts/node_noise_strand/node_noise_strand.gml index bc55a7387..d59ab797d 100644 --- a/scripts/node_noise_strand/node_noise_strand.gml +++ b/scripts/node_noise_strand/node_noise_strand.gml @@ -2,19 +2,19 @@ function Node_Noise_Strand(_x, _y, _group = noone) : Node_Shader_Generator(_x, _ name = "Strand Noise"; shader = sh_noise_strand; - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[2] = nodeValue_Float("Density", self, 0.5 ) + newInput(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)) + newInput(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 ) + newInput(4, nodeValue_Float("Slope", self, 0.5 )) .setDisplay(VALUE_DISPLAY.slider); addShaderProp(SHADER_UNIFORM.float, "slope"); @@ -24,7 +24,7 @@ function Node_Noise_Strand(_x, _y, _group = noone) : Node_Shader_Generator(_x, _ newInput(6, nodeValue_Float("Curve scale", self, 1 )); addShaderProp(SHADER_UNIFORM.float, "curveDetail"); - inputs[7] = nodeValue_Float("Thickness", self, 0 ) + newInput(7, nodeValue_Float("Thickness", self, 0 )) .setDisplay(VALUE_DISPLAY.slider); addShaderProp(SHADER_UNIFORM.float, "thickness"); diff --git a/scripts/node_noise_tri/node_noise_tri.gml b/scripts/node_noise_tri/node_noise_tri.gml index d4efc60a8..ece19710b 100644 --- a/scripts/node_noise_tri/node_noise_tri.gml +++ b/scripts/node_noise_tri/node_noise_tri.gml @@ -13,7 +13,7 @@ function Node_Noise_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) }); newInput(2, nodeValue_Vec2("Position", self, [ 0, 0] )); diff --git a/scripts/node_normal/node_normal.gml b/scripts/node_normal/node_normal.gml index d007b8f5d..4f49cc8c1 100644 --- a/scripts/node_normal/node_normal.gml +++ b/scripts/node_normal/node_normal.gml @@ -5,7 +5,7 @@ function Node_Normal(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co newInput(1, nodeValue_Float("Height", self, 1)); - inputs[2] = nodeValue_Float("Smooth", self, 0, "Include diagonal pixel in normal calculation, which leads to smoother output.") + newInput(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] }); newInput(3, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_normal_light/node_normal_light.gml b/scripts/node_normal_light/node_normal_light.gml index 0a27a4028..cdfabd5a4 100644 --- a/scripts/node_normal_light/node_normal_light.gml +++ b/scripts/node_normal_light/node_normal_light.gml @@ -9,7 +9,7 @@ function Node_Normal_Light(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(3, nodeValue_Color("Ambient", self, c_black)); - inputs[4] = nodeValue_Vec2("Light position", self, [ 0, 0 ]) + newInput(4, nodeValue_Vec2("Light position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); newInput(5, nodeValue_Float("Light range", self, 16)); diff --git a/scripts/node_number/node_number.gml b/scripts/node_number/node_number.gml index 28f95ef4f..42a77d6ac 100644 --- a/scripts/node_number/node_number.gml +++ b/scripts/node_number/node_number.gml @@ -19,7 +19,7 @@ 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) + newInput(0, nodeValue_Float("Value", self, 0)) .setVisible(true, true); newInput(1, nodeValue_Bool("Integer", self, false)); diff --git a/scripts/node_offset/node_offset.gml b/scripts/node_offset/node_offset.gml index a96ff9391..6e20d110c 100644 --- a/scripts/node_offset/node_offset.gml +++ b/scripts/node_offset/node_offset.gml @@ -3,10 +3,10 @@ function Node_Offset(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("X Offset", self, 0.5) + newInput(1, nodeValue_Float("X Offset", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider); - inputs[2] = nodeValue_Float("Y Offset", self, 0.5) + newInput(2, nodeValue_Float("Y Offset", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider); newInput(3, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_onion_skin/node_onion_skin.gml b/scripts/node_onion_skin/node_onion_skin.gml index 0d28b1877..ee748d8b3 100644 --- a/scripts/node_onion_skin/node_onion_skin.gml +++ b/scripts/node_onion_skin/node_onion_skin.gml @@ -7,16 +7,16 @@ function Node_Onion_Skin(_x, _y, _group = noone) : Node(_x, _y, _group) construc newInput(1, nodeValue_Slider_Range("Range", self, [-1, 1], { range: [ -16, 16, 0.1 ] })); - inputs[2] = nodeValue_Float("Alpha", self, 0.5) + newInput(2, nodeValue_Float("Alpha", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider); - inputs[3] = nodeValue_Color("Color pre", self, c_red) + newInput(3, nodeValue_Color("Color pre", self, c_red)) - inputs[4] = nodeValue_Color("Color post", self, c_blue) + newInput(4, nodeValue_Color("Color post", self, c_blue)) - inputs[5] = nodeValue_Int("Step", self, 1) + newInput(5, nodeValue_Int("Step", self, 1)) - inputs[6] = nodeValue_Bool("On top", self, true, "Render current frame on top of all frames.") + newInput(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); diff --git a/scripts/node_outline/node_outline.gml b/scripts/node_outline/node_outline.gml index b69052ad0..3a73cdb32 100644 --- a/scripts/node_outline/node_outline.gml +++ b/scripts/node_outline/node_outline.gml @@ -14,7 +14,7 @@ function Node_Outline(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Int("Width", self, 0) + newInput(1, nodeValue_Int("Width", self, 0)) .setDisplay(VALUE_DISPLAY._default, { front_button : filter_button }) .setValidator(VV_min(0)) .setMappable(15); @@ -23,7 +23,7 @@ function Node_Outline(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c newInput(3, nodeValue_Bool("Blend", self, 0, "Blend outline color with the original color.")); - inputs[4] = nodeValue_Float("Blend alpha", self, 1) + newInput(4, nodeValue_Float("Blend alpha", self, 1)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(16); @@ -31,15 +31,15 @@ function Node_Outline(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c newInput(6, nodeValue_Bool("Anti aliasing", self, 0)); - inputs[7] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + newInput(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.") + newInput(8, nodeValue_Int("Start", self, 0, "Shift outline inside, outside the shape.")) .setMappable(17); newInput(9, nodeValue_Surface("Mask", self)); - inputs[10] = nodeValue_Float("Mix", self, 1) + newInput(10, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(11, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_padding/node_padding.gml b/scripts/node_padding/node_padding.gml index ee9dd372f..aa5e590bf 100644 --- a/scripts/node_padding/node_padding.gml +++ b/scripts/node_padding/node_padding.gml @@ -4,7 +4,7 @@ function Node_Padding(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Padding("Padding", self, [0, 0, 0, 0]) + newInput(1, nodeValue_Padding("Padding", self, [0, 0, 0, 0])) .setUnitRef(function(index) { return getDimension(index); }); newInput(2, nodeValue_Enum_Scroll("Fill method", self, 0, [ "Empty", "Solid" ])); @@ -16,7 +16,7 @@ function Node_Padding(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c newInput(5, nodeValue_Enum_Button("Pad mode", self, 0, [ "Pad out", "Pad to size" ])); - inputs[6] = nodeValue_Vec2("Target dimension", self, DEF_SURF) + newInput(6, nodeValue_Vec2("Target dimension", self, DEF_SURF)) newInput(7, nodeValue_Enum_Button("Horizontal alignment", self, 0 , [ THEME.inspector_surface_halign, THEME.inspector_surface_halign, THEME.inspector_surface_halign])); diff --git a/scripts/node_palette_extract/node_palette_extract.gml b/scripts/node_palette_extract/node_palette_extract.gml index aca0f646d..536d731d2 100644 --- a/scripts/node_palette_extract/node_palette_extract.gml +++ b/scripts/node_palette_extract/node_palette_extract.gml @@ -4,17 +4,17 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _ newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Int("Max colors", self, 5, "Amount of color in a palette.") + newInput(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.") + newInput(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 }) + newInput(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 }) + newInput(4, nodeValue_Enum_Scroll("Color Space", self, 1, { data: [ "RGB", "HSV" ], update_hover: false })) .rejectArray(); outputs[0] = nodeValue_Output("Palette", self, VALUE_TYPE.color, [ ]) diff --git a/scripts/node_palette_replace/node_palette_replace.gml b/scripts/node_palette_replace/node_palette_replace.gml index 83e19f738..01e945521 100644 --- a/scripts/node_palette_replace/node_palette_replace.gml +++ b/scripts/node_palette_replace/node_palette_replace.gml @@ -2,14 +2,14 @@ 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)) + newInput(0, nodeValue_Palette("Palette in", self, array_clone(DEF_PALETTE))) .setVisible(true, true); newInput(1, nodeValue_Palette("Palette from", self, array_clone(DEF_PALETTE))); newInput(2, nodeValue_Palette("Palette to", self, array_clone(DEF_PALETTE))); - inputs[3] = nodeValue_Float("Threshold", self, 0.1) + newInput(3, nodeValue_Float("Threshold", self, 0.1)) .setDisplay(VALUE_DISPLAY.slider); input_display_list = [ 0, diff --git a/scripts/node_palette_shift/node_palette_shift.gml b/scripts/node_palette_shift/node_palette_shift.gml index 43b03555f..07be8570e 100644 --- a/scripts/node_palette_shift/node_palette_shift.gml +++ b/scripts/node_palette_shift/node_palette_shift.gml @@ -5,12 +5,12 @@ function Node_Palette_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr newInput(1, nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE))); - inputs[2] = nodeValue_Int("Shift", self, 0) + newInput(2, nodeValue_Int("Shift", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.1] }); newInput(3, nodeValue_Surface("Mask", self)); - inputs[4] = nodeValue_Float("Mix", self, 1) + newInput(4, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(5, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_palette_sort/node_palette_sort.gml b/scripts/node_palette_sort/node_palette_sort.gml index 92ec2542d..b311cb115 100644 --- a/scripts/node_palette_sort/node_palette_sort.gml +++ b/scripts/node_palette_sort/node_palette_sort.gml @@ -2,10 +2,10 @@ 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)) + newInput(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" ]) + newInput(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(); newInput(2, nodeValue_Bool("Reverse", self, false)); diff --git a/scripts/node_path/node_path.gml b/scripts/node_path/node_path.gml index f1ce13394..95809b1db 100644 --- a/scripts/node_path/node_path.gml +++ b/scripts/node_path/node_path.gml @@ -15,16 +15,16 @@ 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.") + newInput(0, nodeValue_Float("Path progress", self, 0, "Sample position from path.")) .setDisplay(VALUE_DISPLAY.slider); - inputs[1] = nodeValue_Bool("Loop", self, false) + newInput(1, nodeValue_Bool("Loop", self, false)) .rejectArray(); - inputs[2] = nodeValue_Enum_Scroll("Progress mode", self, 0, ["Entire line", "Segment"]) + newInput(2, nodeValue_Enum_Scroll("Progress mode", self, 0, ["Entire line", "Segment"])) .rejectArray(); - inputs[3] = nodeValue_Bool("Round anchor", self, false) + newInput(3, nodeValue_Bool("Round anchor", self, false)) .rejectArray(); outputs[0] = nodeValue_Output("Position out", self, VALUE_TYPE.float, [ 0, 0 ]) diff --git a/scripts/node_path_3d/node_path_3d.gml b/scripts/node_path_3d/node_path_3d.gml index f0a2e95d1..8e74bcfc7 100644 --- a/scripts/node_path_3d/node_path_3d.gml +++ b/scripts/node_path_3d/node_path_3d.gml @@ -19,16 +19,16 @@ 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.") + newInput(0, nodeValue_Float("Path progress", self, 0, "Sample position from path.")) .setDisplay(VALUE_DISPLAY.slider); - inputs[1] = nodeValue_Bool("Loop", self, false) + newInput(1, nodeValue_Bool("Loop", self, false)) .rejectArray(); - inputs[2] = nodeValue_Enum_Scroll("Progress mode", self, 0, ["Entire line", "Segment"]) + newInput(2, nodeValue_Enum_Scroll("Progress mode", self, 0, ["Entire line", "Segment"])) .rejectArray(); - inputs[3] = nodeValue_Bool("Round anchor", self, false) + newInput(3, nodeValue_Bool("Round anchor", self, false)) .rejectArray(); outputs[0] = nodeValue_Output("Position out", self, VALUE_TYPE.float, [ 0, 0 ]) diff --git a/scripts/node_path_anchor/node_path_anchor.gml b/scripts/node_path_anchor/node_path_anchor.gml index 662d804db..3bdcf1bb1 100644 --- a/scripts/node_path_anchor/node_path_anchor.gml +++ b/scripts/node_path_anchor/node_path_anchor.gml @@ -3,7 +3,7 @@ function Node_Path_Anchor(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou color = COLORS.node_blend_number; setDimension(96, 48); - inputs[0] = nodeValue_Vec2("Postion", self, [ 0, 0 ] ) + newInput(0, nodeValue_Vec2("Postion", self, [ 0, 0 ] )) .setVisible(true, true); newInput(1, nodeValue_Vec2("Control point 1", self, [ -16, 0 ] )); diff --git a/scripts/node_path_array/node_path_array.gml b/scripts/node_path_array/node_path_array.gml index 7f0da4fc1..7c28e26e8 100644 --- a/scripts/node_path_array/node_path_array.gml +++ b/scripts/node_path_array/node_path_array.gml @@ -9,7 +9,7 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc static createNewInput = function() { var index = array_length(inputs); - inputs[index] = nodeValue_PathNode("Path", self, noone ) + newInput(index, nodeValue_PathNode("Path", self, noone )) .setVisible(true, true); return inputs[index]; diff --git a/scripts/node_path_bake/node_path_bake.gml b/scripts/node_path_bake/node_path_bake.gml index 585b54ff7..1418292f4 100644 --- a/scripts/node_path_bake/node_path_bake.gml +++ b/scripts/node_path_bake/node_path_bake.gml @@ -2,7 +2,7 @@ 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) + newInput(0, nodeValue_PathNode("Path", self, noone)) .setVisible(true, true); newInput(1, nodeValue_Float("Segment length", self, 1)); diff --git a/scripts/node_path_blend/node_path_blend.gml b/scripts/node_path_blend/node_path_blend.gml index 90d815af4..0cb3d2544 100644 --- a/scripts/node_path_blend/node_path_blend.gml +++ b/scripts/node_path_blend/node_path_blend.gml @@ -3,15 +3,15 @@ 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) + newInput(0, nodeValue_PathNode("Path 1", self, noone)) .setVisible(true, true) .rejectArray(); - inputs[1] = nodeValue_PathNode("Path 2", self, noone) + newInput(1, nodeValue_PathNode("Path 2", self, noone)) .setVisible(true, true) .rejectArray(); - inputs[2] = nodeValue_Float("Ratio", self, 0) + newInput(2, nodeValue_Float("Ratio", self, 0)) .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); diff --git a/scripts/node_path_bridge/node_path_bridge.gml b/scripts/node_path_bridge/node_path_bridge.gml index 26ab46810..ba35dc72d 100644 --- a/scripts/node_path_bridge/node_path_bridge.gml +++ b/scripts/node_path_bridge/node_path_bridge.gml @@ -2,14 +2,14 @@ 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) + newInput(0, nodeValue_PathNode("Path", self, noone)) .setVisible(true, true) .rejectArray(); - inputs[1] = nodeValue_Int("Amount", self, 4) + newInput(1, nodeValue_Int("Amount", self, 4)) .rejectArray(); - inputs[2] = nodeValue_Bool("Smooth", self, false) + newInput(2, nodeValue_Bool("Smooth", self, false)) .rejectArray(); outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); diff --git a/scripts/node_path_builder/node_path_builder.gml b/scripts/node_path_builder/node_path_builder.gml index e01b69ab3..f73b733c0 100644 --- a/scripts/node_path_builder/node_path_builder.gml +++ b/scripts/node_path_builder/node_path_builder.gml @@ -17,7 +17,7 @@ function Node_Path_Builder(_x, _y, _group = noone) : Node(_x, _y, _group) constr lines = []; #endregion - inputs[0] = nodeValue_Float("Point array", self, []) + newInput(0, nodeValue_Float("Point array", self, [])) .setVisible(true, true) .setArrayDepth(2); 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 1a18d0ce2..bdef6e16b 100644 --- a/scripts/node_path_l_system/node_path_l_system.gml +++ b/scripts/node_path_l_system/node_path_l_system.gml @@ -28,7 +28,7 @@ function Node_Path_L_System(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr newInput(6, nodeValue_Rotation("Starting Angle", self, 90)); - inputs[7] = nodeValue_Int("Seed", self, seed_random(6)) + newInput(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() { diff --git a/scripts/node_path_map/node_path_map.gml b/scripts/node_path_map/node_path_map.gml index cf2e28cc8..59c9b90f6 100644 --- a/scripts/node_path_map/node_path_map.gml +++ b/scripts/node_path_map/node_path_map.gml @@ -1,7 +1,7 @@ function Node_Path_Map(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Map Path"; - inputs[0] = nodeValue_PathNode("Path", self, noone) + newInput(0, nodeValue_PathNode("Path", self, noone)) .setVisible(true, true) .rejectArray(); @@ -9,7 +9,7 @@ function Node_Path_Map(_x, _y, _group = noone) : Node(_x, _y, _group) constructo newInput(2, nodeValue_Surface("Texture", self)); - inputs[3] = nodeValue_Int("Subdivision", self, 16) + newInput(3, nodeValue_Int("Subdivision", self, 16)) .setValidator(VV_min(2)) .rejectArray(); 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 cd239404e..607671315 100644 --- a/scripts/node_path_map_area/node_path_map_area.gml +++ b/scripts/node_path_map_area/node_path_map_area.gml @@ -2,7 +2,7 @@ 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) + newInput(0, nodeValue_PathNode("Path", self, noone)) .setVisible(true, true); newInput(1, nodeValue_Area("Area", self, DEF_AREA, { useShape : false })); diff --git a/scripts/node_path_profile/node_path_profile.gml b/scripts/node_path_profile/node_path_profile.gml index 9a002cad9..3861599e9 100644 --- a/scripts/node_path_profile/node_path_profile.gml +++ b/scripts/node_path_profile/node_path_profile.gml @@ -3,7 +3,7 @@ function Node_Path_Profile(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_PathNode("Path", self, noone ) + newInput(1, nodeValue_PathNode("Path", self, noone )) .setVisible(true, true); newInput(2, nodeValue_Int("Resolution", self, 64 )); diff --git a/scripts/node_path_reverse/node_path_reverse.gml b/scripts/node_path_reverse/node_path_reverse.gml index b49b8a297..d12fa8619 100644 --- a/scripts/node_path_reverse/node_path_reverse.gml +++ b/scripts/node_path_reverse/node_path_reverse.gml @@ -2,7 +2,7 @@ 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) + newInput(0, nodeValue_PathNode("Path", self, noone)) .setVisible(true, true); outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); diff --git a/scripts/node_path_sample/node_path_sample.gml b/scripts/node_path_sample/node_path_sample.gml index 4b99fecfb..c9bd5f8ff 100644 --- a/scripts/node_path_sample/node_path_sample.gml +++ b/scripts/node_path_sample/node_path_sample.gml @@ -3,7 +3,7 @@ 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) + newInput(0, nodeValue_PathNode("Path", self, noone)) .setVisible(true, true); newInput(1, nodeValue_Float("Ratio", self, 0)); diff --git a/scripts/node_path_scatter/node_path_scatter.gml b/scripts/node_path_scatter/node_path_scatter.gml index d390368f7..3ce00dd52 100644 --- a/scripts/node_path_scatter/node_path_scatter.gml +++ b/scripts/node_path_scatter/node_path_scatter.gml @@ -2,10 +2,10 @@ 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) + newInput(0, nodeValue_PathNode("Base Path", self, noone)) .setVisible(true, true); - inputs[1] = nodeValue_PathNode("Scatter Path", self, noone) + newInput(1, nodeValue_PathNode("Scatter Path", self, noone)) .setVisible(true, true); newInput(2, nodeValue_Slider_Range("Range", self, [ 0, 1 ])); @@ -14,7 +14,7 @@ function Node_Path_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(4, nodeValue_Slider_Range("Scale", self, [ 0.5, 1 ])); - inputs[5] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) }); newInput(6, nodeValue("Scale over Length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11)); @@ -25,7 +25,7 @@ function Node_Path_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(9, nodeValue("Trim over Length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11)); - inputs[10] = nodeValue_Float("Range", self, 1) + newInput(10, nodeValue_Float("Range", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(11, nodeValue_Bool("Flip if Negative", self, false )); 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 0c84e54cf..30b27efc1 100644 --- a/scripts/node_path_separate_folder/node_path_separate_folder.gml +++ b/scripts/node_path_separate_folder/node_path_separate_folder.gml @@ -3,7 +3,7 @@ function Node_Path_Separate_Folder(_x, _y, _group = noone) : Node_Processor(_x, setDimension(96, 48); - inputs[0] = nodeValue_Path("Path", self, "") + newInput(0, nodeValue_Path("Path", self, "")) .setVisible(true, true); newInput(1, nodeValue_Bool("Keep extension", self, true)); diff --git a/scripts/node_path_shift/node_path_shift.gml b/scripts/node_path_shift/node_path_shift.gml index eaf5d71ee..9f227cf40 100644 --- a/scripts/node_path_shift/node_path_shift.gml +++ b/scripts/node_path_shift/node_path_shift.gml @@ -2,7 +2,7 @@ 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) + newInput(0, nodeValue_PathNode("Path", self, noone)) .setVisible(true, true); newInput(1, nodeValue_Float("Distance", self, 0)); diff --git a/scripts/node_path_smooth/node_path_smooth.gml b/scripts/node_path_smooth/node_path_smooth.gml index f6411f3b8..ec27fbaef 100644 --- a/scripts/node_path_smooth/node_path_smooth.gml +++ b/scripts/node_path_smooth/node_path_smooth.gml @@ -2,13 +2,13 @@ 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) + newInput(0, nodeValue_Bool("Loop", self, false)) .rejectArray(); - inputs[1] = nodeValue_Bool("Round anchor", self, false) + newInput(1, nodeValue_Bool("Round anchor", self, false)) .rejectArray(); - inputs[2] = nodeValue_Float("Smoothness", self, 3) + newInput(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); diff --git a/scripts/node_path_transform/node_path_transform.gml b/scripts/node_path_transform/node_path_transform.gml index 7a586957e..20874e996 100644 --- a/scripts/node_path_transform/node_path_transform.gml +++ b/scripts/node_path_transform/node_path_transform.gml @@ -2,7 +2,7 @@ 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) + newInput(0, nodeValue_PathNode("Path", self, noone)) .setVisible(true, true); newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])); diff --git a/scripts/node_path_trim/node_path_trim.gml b/scripts/node_path_trim/node_path_trim.gml index 2a1ca419f..3a6cc36f4 100644 --- a/scripts/node_path_trim/node_path_trim.gml +++ b/scripts/node_path_trim/node_path_trim.gml @@ -2,7 +2,7 @@ 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) + newInput(0, nodeValue_PathNode("Path", self, noone)) .setVisible(true, true); newInput(1, nodeValue_Slider_Range("Range", self, [ 0, 1 ])); diff --git a/scripts/node_path_wave/node_path_wave.gml b/scripts/node_path_wave/node_path_wave.gml index b5a494746..f1af46a28 100644 --- a/scripts/node_path_wave/node_path_wave.gml +++ b/scripts/node_path_wave/node_path_wave.gml @@ -2,7 +2,7 @@ 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) + newInput(0, nodeValue_PathNode("Path", self, noone)) .setVisible(true, true); newInput(1, nodeValue_Range("Frequency", self, [ 4, 4 ], { linked : true })); @@ -13,7 +13,7 @@ function Node_Path_Wave(_x, _y, _group = noone) : Node(_x, _y, _group) construct newInput(4, nodeValue_Bool("Smooth", self, false)); - inputs[5] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) }); newInput(6, nodeValue_Bool("Wiggle", self, false)); diff --git a/scripts/node_pb_box/node_pb_box.gml b/scripts/node_pb_box/node_pb_box.gml index 764e28c3b..43623f744 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 ) + newInput(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 32be87e38..616a95649 100644 --- a/scripts/node_pb_box_contract/node_pb_box_contract.gml +++ b/scripts/node_pb_box_contract/node_pb_box_contract.gml @@ -2,15 +2,15 @@ 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 ) + newInput(1, nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone )) .setVisible(true, true); newInput(2, nodeValue_Enum_Scroll("Type", self, 0 , [ "Ratio", "Fix" ])); - inputs[3] = nodeValue_Float("Ratio", self, 0.5 ) + newInput(3, nodeValue_Float("Ratio", self, 0.5 )) .setDisplay(VALUE_DISPLAY.slider); - inputs[4] = nodeValue_Int("Fix Width", self, 8 ) + newInput(4, nodeValue_Int("Fix Width", self, 8 )) newInput(5, nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ])); 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 50356e145..1805f45da 100644 --- a/scripts/node_pb_box_divide/node_pb_box_divide.gml +++ b/scripts/node_pb_box_divide/node_pb_box_divide.gml @@ -2,7 +2,7 @@ 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 ) + newInput(1, nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone )) .setVisible(true, true); newInput(2, nodeValue_Int("Amount", self, 2 )); @@ -11,7 +11,7 @@ function Node_PB_Box_Divide(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group newInput(4, nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ])); - inputs[5] = nodeValue_Bool("Mirror", self, 0 ) + newInput(5, nodeValue_Bool("Mirror", self, 0 )) newInput(6, nodeValue_Enum_Button("Spacing", self, 0 , [ "Space Between", "Space Around", "Begin", "End" ])); 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 c494145fc..c15d5d0e6 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,14 +1,14 @@ 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 ) + newInput(1, nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone )) .setVisible(true, true); newInput(2, nodeValue_Vec2("Amount", self, [ 2, 2 ] )); newInput(3, nodeValue_Int("Spacing", self, 1 )); - inputs[4] = nodeValue_Bool("Mirror", self, 0 ) + newInput(4, nodeValue_Bool("Mirror", self, 0 )) outputs[0] = nodeValue_Output("pBox", self, VALUE_TYPE.pbBox, [ noone ] ); 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 01adddad3..c7eef78f2 100644 --- a/scripts/node_pb_box_inset/node_pb_box_inset.gml +++ b/scripts/node_pb_box_inset/node_pb_box_inset.gml @@ -2,23 +2,23 @@ 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 ) + newInput(1, nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone )) .setVisible(true, true); newInput(2, nodeValue_Padding("Inset", self, [ 2, 2, 2, 2 ] )); newInput(3, nodeValue_Enum_Scroll("Type", self, 0 , [ "Padding", "Ratio" ])); - inputs[4] = nodeValue_Float("Width", self, 0.5 ) + newInput(4, nodeValue_Float("Width", self, 0.5 )) .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_Float("Height", self, 0.5 ) + newInput(5, nodeValue_Float("Height", self, 0.5 )) .setDisplay(VALUE_DISPLAY.slider); - inputs[6] = nodeValue_Float("Horizontal alignment", self, 0.5 ) + newInput(6, nodeValue_Float("Horizontal alignment", self, 0.5 )) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Float("Vertical alignment", self, 0.5 ) + newInput(7, nodeValue_Float("Vertical alignment", self, 0.5 )) .setDisplay(VALUE_DISPLAY.slider); outputs[0] = nodeValue_Output("pBox Inset", self, VALUE_TYPE.pbBox, noone ); 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 0b8b82472..6cf1a9998 100644 --- a/scripts/node_pb_box_mirror/node_pb_box_mirror.gml +++ b/scripts/node_pb_box_mirror/node_pb_box_mirror.gml @@ -1,7 +1,7 @@ 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 ) + newInput(1, nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone )) .setVisible(true, true); newInput(2, nodeValue_Bool("Horizontal", self, false )); 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 d35587d8e..61dbd17cb 100644 --- a/scripts/node_pb_box_split/node_pb_box_split.gml +++ b/scripts/node_pb_box_split/node_pb_box_split.gml @@ -2,19 +2,19 @@ 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 ) + newInput(1, nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone )) .setVisible(true, true); newInput(2, nodeValue_Enum_Scroll("Type", self, 0 , [ "Ratio", "Fix Left", "Fix Right" ])); - inputs[3] = nodeValue_Float("Ratio", self, 0.5 ) + newInput(3, nodeValue_Float("Ratio", self, 0.5 )) .setDisplay(VALUE_DISPLAY.slider); - inputs[4] = nodeValue_Int("Fix width", self, 8 ) + newInput(4, nodeValue_Int("Fix width", self, 8 )) newInput(5, nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ])); - inputs[6] = nodeValue_Bool("Mirror", self, 0 ) + newInput(6, nodeValue_Bool("Mirror", self, 0 )) outputs[0] = nodeValue_Output("pBox Left", self, VALUE_TYPE.pbBox, noone ); 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 058ef617c..4e741f48b 100644 --- a/scripts/node_pb_box_transform/node_pb_box_transform.gml +++ b/scripts/node_pb_box_transform/node_pb_box_transform.gml @@ -1,7 +1,7 @@ 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 ) + newInput(1, nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone )) .setVisible(true, true); newInput(2, nodeValue_Vec2("Translate", self, [ 0, 0 ] )); diff --git a/scripts/node_pb_draw/node_pb_draw.gml b/scripts/node_pb_draw/node_pb_draw.gml index 3553e3ef5..b311faa34 100644 --- a/scripts/node_pb_draw/node_pb_draw.gml +++ b/scripts/node_pb_draw/node_pb_draw.gml @@ -1,7 +1,7 @@ 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 ) + newInput(0, nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone )) .setVisible(true, true); newInput(1, nodeValue_Color("Color", self, c_white )); 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 54ac9313b..478b50e1f 100644 --- a/scripts/node_pb_draw_angle/node_pb_draw_angle.gml +++ b/scripts/node_pb_draw_angle/node_pb_draw_angle.gml @@ -3,7 +3,7 @@ function Node_PB_Draw_Angle(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _grou newInput(3, nodeValue_Enum_Button("Side", self, 0 , array_create(4, THEME.obj_angle) )); - inputs[4] = nodeValue_Bool("Round", self, false ) + newInput(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 53bcaf76d..e45ae0282 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 ) + newInput(3, nodeValue_Float("Top", self, 0.5 )) .setDisplay(VALUE_DISPLAY.slider); - inputs[4] = nodeValue_Float("Bottom", self, 1 ) + newInput(4, nodeValue_Float("Bottom", self, 1 )) .setDisplay(VALUE_DISPLAY.slider); input_display_list = [ 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 5f2e7a1d1..f823de75d 100644 --- a/scripts/node_pb_draw_line/node_pb_draw_line.gml +++ b/scripts/node_pb_draw_line/node_pb_draw_line.gml @@ -3,7 +3,7 @@ function Node_PB_Draw_Line(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group newInput(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 ) + newInput(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 86c7de633..7f8635ac4 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 @@ -5,7 +5,7 @@ function Node_PB_Draw_Round_Rectangle(_x, _y, _group = noone) : Node_PB_Draw(_x, newInput(4, nodeValue_Int("Corner Radius", self, 1 )); - inputs[5] = nodeValue_Corner("Corner Radius", self, [ 1, 1, 1, 1 ] ) + newInput(5, nodeValue_Corner("Corner Radius", self, [ 1, 1, 1, 1 ] )) .setArrayDepth(1); newInput(6, nodeValue_Bool("Relative", self, false )); 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 3e8765eac..15e474852 100644 --- a/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml +++ b/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml @@ -6,13 +6,13 @@ function Node_PB_Draw_Trapezoid(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _ newInput(4, nodeValue_Enum_Scroll("Type", self, 0 , [ "Symmetric", "Independent" ])); - inputs[5] = nodeValue_Float("Bevel", self, 0.5 ) + newInput(5, nodeValue_Float("Bevel", self, 0.5 )) .setDisplay(VALUE_DISPLAY.slider); - inputs[6] = nodeValue_Float("Bevel 1", self, 0.5 ) + newInput(6, nodeValue_Float("Bevel 1", self, 0.5 )) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Float("Bevel 2", self, 0.5 ) + newInput(7, nodeValue_Float("Bevel 2", self, 0.5 )) .setDisplay(VALUE_DISPLAY.slider); newInput(8, nodeValue_Bool("Invert", self, false )); diff --git a/scripts/node_pb_fx/node_pb_fx.gml b/scripts/node_pb_fx/node_pb_fx.gml index 86f12d13b..f5f6ece21 100644 --- a/scripts/node_pb_fx/node_pb_fx.gml +++ b/scripts/node_pb_fx/node_pb_fx.gml @@ -2,7 +2,7 @@ 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) + newInput(0, nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone)) .setVisible(true, true); outputs[0] = nodeValue_Output("pBox", self, VALUE_TYPE.pbBox, 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 4eedee7c7..d4d8f8f4c 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 ) + newInput(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 c3e272911..9361f1519 100644 --- a/scripts/node_pb_fx_brick/node_pb_fx_brick.gml +++ b/scripts/node_pb_fx_brick/node_pb_fx_brick.gml @@ -9,10 +9,10 @@ function Node_PB_Fx_Brick(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) c newInput(4, nodeValue_Color("Color", self, c_white )); - inputs[5] = nodeValue_Float("Dissolve", self, 0. ) + newInput(5, nodeValue_Float("Dissolve", self, 0. )) .setDisplay(VALUE_DISPLAY.slider) - inputs[6] = nodeValue_Int("Detail", self, 1 ) + newInput(6, nodeValue_Int("Detail", self, 1 )) newInput(7, nodeValue_Vec2("Dissolve Scale", self, [ 4, 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 ffc0e2f21..3e171ccb0 100644 --- a/scripts/node_pb_fx_hash/node_pb_fx_hash.gml +++ b/scripts/node_pb_fx_hash/node_pb_fx_hash.gml @@ -7,10 +7,10 @@ function Node_PB_Fx_Hash(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) co newInput(3, nodeValue_Bool("Invert", self, false )); - inputs[4] = nodeValue_Float("Dissolve", self, 0. ) + newInput(4, nodeValue_Float("Dissolve", self, 0. )) .setDisplay(VALUE_DISPLAY.slider) - inputs[5] = nodeValue_Int("Detail", self, 1 ) + newInput(5, nodeValue_Int("Detail", self, 1 )) newInput(6, nodeValue_Vec2("Dissolve Scale", self, [ 4, 4 ] )); 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 46d3cdd37..af0b1a056 100644 --- a/scripts/node_pb_fx_highlight/node_pb_fx_highlight.gml +++ b/scripts/node_pb_fx_highlight/node_pb_fx_highlight.gml @@ -1,19 +1,19 @@ 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) ) + newInput(1, nodeValue_Int("Highlight Area", self, array_create(9) )) .setDisplay(VALUE_DISPLAY.matrix, { size: 3 }); newInput(2, nodeValue_Color("Light Color", self, c_white )); newInput(3, nodeValue_Color("Shadow Color", self, c_black )); - inputs[4] = nodeValue_Float("Roughness", self, 0 ) + newInput(4, nodeValue_Float("Roughness", self, 0 )) .setDisplay(VALUE_DISPLAY.slider); newInput(5, nodeValue_Float("Roughness Scale", self, 1 )); - inputs[6] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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; 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 6f64c1bf4..880ff75d1 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) + newInput(1, nodeValue_Surface("Surface", self)) .setVisible(true, true); input_display_list = [ 0, 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 c1b807820..149227e7f 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 ) + newInput(1, nodeValue_Int("Amount", self, 4 )) .setVisible(true, true); input_display_list = [ 0, 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 cc86502fe..9644e8c35 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) + newInput(1, nodeValue_Surface("Surface", self)) .setVisible(true, true); input_display_list = [ 0, diff --git a/scripts/node_perlin/node_perlin.gml b/scripts/node_perlin/node_perlin.gml index 46f32b89a..379f894b4 100644 --- a/scripts/node_perlin/node_perlin.gml +++ b/scripts/node_perlin/node_perlin.gml @@ -3,17 +3,17 @@ function Node_Perlin(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); - inputs[2] = nodeValue_Vec2("Scale", self, [ 5, 5 ]) + newInput(2, nodeValue_Vec2("Scale", self, [ 5, 5 ])) .setMappable(10); newInput(3, nodeValue_Int("Iteration", self, 4)); newInput(4, nodeValue_Bool("Tile", self, true)); - inputs[5] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) }); newInput(6, nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ])); diff --git a/scripts/node_perlin_extra/node_perlin_extra.gml b/scripts/node_perlin_extra/node_perlin_extra.gml index 93fb540bd..2ca81449a 100644 --- a/scripts/node_perlin_extra/node_perlin_extra.gml +++ b/scripts/node_perlin_extra/node_perlin_extra.gml @@ -2,11 +2,11 @@ function Node_Perlin_Extra(_x, _y, _group = noone) : Node_Shader_Generator(_x, _ name = "Extra Perlins"; shader = sh_perlin_extra; - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[2] = nodeValue_Vec2("Scale", self, [ 4, 4 ]) + newInput(2, nodeValue_Vec2("Scale", self, [ 4, 4 ])) .setMappable(13); addShaderProp(SHADER_UNIFORM.float, "scale"); @@ -16,7 +16,7 @@ function Node_Perlin_Extra(_x, _y, _group = noone) : Node_Shader_Generator(_x, _ newInput(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)) + newInput(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"); @@ -35,12 +35,12 @@ function Node_Perlin_Extra(_x, _y, _group = noone) : Node_Shader_Generator(_x, _ newInput(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) + newInput(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) + newInput(12, nodeValue_Float("Parameter B", self, 1)) .setMappable(15); addShaderProp(SHADER_UNIFORM.float, "paramB"); diff --git a/scripts/node_perlin_smear/node_perlin_smear.gml b/scripts/node_perlin_smear/node_perlin_smear.gml index e41c8c3ef..8ca8d9141 100644 --- a/scripts/node_perlin_smear/node_perlin_smear.gml +++ b/scripts/node_perlin_smear/node_perlin_smear.gml @@ -3,14 +3,14 @@ function Node_Perlin_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); newInput(2, nodeValue_Vec2("Scale", self, [ 4, 6 ])); newInput(3, nodeValue_Int("Iteration", self, 3)); - inputs[4] = nodeValue_Float("Brightness", self, 0.5) + newInput(4, nodeValue_Float("Brightness", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider); newInput(5, nodeValue_Rotation("Rotation", self, 0)); diff --git a/scripts/node_pin/node_pin.gml b/scripts/node_pin/node_pin.gml index 42a3a2635..6bfa1d2e9 100644 --- a/scripts/node_pin/node_pin.gml +++ b/scripts/node_pin/node_pin.gml @@ -13,7 +13,7 @@ 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 ) + newInput(0, nodeValue("In", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0 )) .setVisible(true, true); outputs[0] = nodeValue_Output("Out", self, VALUE_TYPE.any, 0); diff --git a/scripts/node_pixel_cloud/node_pixel_cloud.gml b/scripts/node_pixel_cloud/node_pixel_cloud.gml index 3de589616..f5e077c01 100644 --- a/scripts/node_pixel_cloud/node_pixel_cloud.gml +++ b/scripts/node_pixel_cloud/node_pixel_cloud.gml @@ -3,22 +3,22 @@ function Node_Pixel_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Int("Seed", self, seed_random(6)) + newInput(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) + newInput(2, nodeValue_Float("Strength", self, 0.1)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] }); newInput(3, nodeValue_Surface("Strength map", self)); - inputs[4] = nodeValue_Gradient("Color over lifetime", self, new gradientObject(cola(c_white))) + newInput(4, nodeValue_Gradient("Color over lifetime", self, new gradientObject(cola(c_white)))) .setMappable(9); newInput(5, nodeValue_Float("Distance", self, 1)); newInput(6, nodeValue("Alpha over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11)); - inputs[7] = nodeValue_Float("Random blending", self, 0.1) + newInput(7, nodeValue_Float("Random blending", self, 0.1)) .setDisplay(VALUE_DISPLAY.slider); newInput(8, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_pixel_sampler/node_pixel_sampler.gml b/scripts/node_pixel_sampler/node_pixel_sampler.gml index 032853571..11cdc2f4a 100644 --- a/scripts/node_pixel_sampler/node_pixel_sampler.gml +++ b/scripts/node_pixel_sampler/node_pixel_sampler.gml @@ -7,10 +7,10 @@ function Node_Pixel_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr newInput(2, nodeValue_Enum_Button("Match Mode", self, 0 , [ "Brightness", "RGB", "Hue" ])); - inputs[3] = nodeValue_Surface("Surfaces", self, [ noone ]) + newInput(3, nodeValue_Surface("Surfaces", self, [ noone ])) .setArrayDepth(1); - inputs[4] = nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ])) + newInput(4, nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ]))) .setMappable(5); newInput(5, nodeValueMap("Gradient map", self)); @@ -19,7 +19,7 @@ function Node_Pixel_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr newInput(7, nodeValue_Enum_Scroll("Color Blending", self, 0 , [ "None", "Multiply" ])); - inputs[8] = nodeValue_Float("Blending Intensity", self, 1 ) + newInput(8, nodeValue_Float("Blending Intensity", self, 1 )) .setDisplay(VALUE_DISPLAY.slider); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_pixel_sort/node_pixel_sort.gml b/scripts/node_pixel_sort/node_pixel_sort.gml index 1c5fd17e2..61618fe4a 100644 --- a/scripts/node_pixel_sort/node_pixel_sort.gml +++ b/scripts/node_pixel_sort/node_pixel_sort.gml @@ -11,15 +11,15 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(1, nodeValue_Int("Iteration", self, 2)); - inputs[2] = nodeValue_Float("Threshold", self, 0.1) + newInput(2, nodeValue_Float("Threshold", self, 0.1)) .setDisplay(VALUE_DISPLAY.slider); - inputs[3] = nodeValue_Int("Direction", self, 0) + newInput(3, nodeValue_Int("Direction", self, 0)) .setDisplay(VALUE_DISPLAY.rotation, { step: 90 }); newInput(4, nodeValue_Surface("Mask", self)); - inputs[5] = nodeValue_Float("Mix", self, 1) + newInput(5, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(6, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_plot_linear/node_plot_linear.gml b/scripts/node_plot_linear/node_plot_linear.gml index 10a3f7165..ed239a012 100644 --- a/scripts/node_plot_linear/node_plot_linear.gml +++ b/scripts/node_plot_linear/node_plot_linear.gml @@ -21,7 +21,7 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Float("Data", self, []) + newInput(1, nodeValue_Float("Data", self, [])) .setArrayDepth(1) .setVisible(true, true); @@ -48,7 +48,7 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(12, nodeValue_Float("Value Offset", self, 0)); - inputs[13] = nodeValue_Gradient("Color Over Sample", self, new gradientObject(cola(c_white))) + newInput(13, nodeValue_Gradient("Color Over Sample", self, new gradientObject(cola(c_white)))) .setMappable(27); newInput(14, nodeValue_Enum_Scroll("Trim mode", self, 0, [ "Range", "Window" ])); @@ -63,17 +63,17 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(19, nodeValue_Bool("Rounded Bar", self, false)); - inputs[20] = nodeValue_PathNode("Path", self, noone) + newInput(20, nodeValue_PathNode("Path", self, noone)) .setVisible(true, true); newInput(21, nodeValue_Bool("Flip Value", self, false)); newInput(22, nodeValue_Bool("Loop", self, false)); - inputs[23] = nodeValue_Float("Smooth", self, 0) + newInput(23, nodeValue_Float("Smooth", self, 0)) .setDisplay(VALUE_DISPLAY.slider); - inputs[24] = nodeValue_Gradient("Color Over Value", self, new gradientObject(cola(c_white))) + newInput(24, nodeValue_Gradient("Color Over Value", self, new gradientObject(cola(c_white)))) .setMappable(29); newInput(25, nodeValue_Range("Value range", self, [ 0, 1 ] )); diff --git a/scripts/node_polar/node_polar.gml b/scripts/node_polar/node_polar.gml index e733f93c8..5f1e51b36 100644 --- a/scripts/node_polar/node_polar.gml +++ b/scripts/node_polar/node_polar.gml @@ -5,7 +5,7 @@ function Node_Polar(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con newInput(1, nodeValue_Surface("Mask", self)); - inputs[2] = nodeValue_Float("Mix", self, 1) + newInput(2, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(3, nodeValue_Bool("Active", self, true)); @@ -13,9 +13,9 @@ function Node_Polar(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con newInput(4, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); - inputs[5] = nodeValue_Bool("Invert", self, false) + newInput(5, nodeValue_Bool("Invert", self, false)) - inputs[6] = nodeValue_Float("Blend", self, 1) + newInput(6, nodeValue_Float("Blend", self, 1)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(11); @@ -25,7 +25,7 @@ function Node_Polar(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con new scrollItem("Inverse Square", s_node_curve, 1), new scrollItem("Logarithm", s_node_curve, 3), ]); - inputs[10] = nodeValue_Bool("Swap", self, false) + newInput(10, nodeValue_Bool("Swap", self, false)) ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_posterize/node_posterize.gml b/scripts/node_posterize/node_posterize.gml index d8a22dbcf..f4f23d068 100644 --- a/scripts/node_posterize/node_posterize.gml +++ b/scripts/node_posterize/node_posterize.gml @@ -7,10 +7,10 @@ function Node_Posterize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(2, nodeValue_Bool("Use palette", self, true)); - inputs[3] = nodeValue_Int("Steps", self, 4) + newInput(3, nodeValue_Int("Steps", self, 4)) .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 0.1] }); - inputs[4] = nodeValue_Float("Gamma", self, 1) + newInput(4, nodeValue_Float("Gamma", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 2, 0.01] }) .setMappable(7); diff --git a/scripts/node_pytagorean_tile/node_pytagorean_tile.gml b/scripts/node_pytagorean_tile/node_pytagorean_tile.gml index 79d216282..7ada8c825 100644 --- a/scripts/node_pytagorean_tile/node_pytagorean_tile.gml +++ b/scripts/node_pytagorean_tile/node_pytagorean_tile.gml @@ -3,16 +3,16 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _ newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); - inputs[2] = nodeValue_Vec2("Scale", self, [ 1, 1 ]) + newInput(2, nodeValue_Vec2("Scale", self, [ 1, 1 ])) .setMappable(11); - inputs[3] = nodeValue_Rotation("Rotation", self, 0) + newInput(3, nodeValue_Rotation("Rotation", self, 0)) .setMappable(12); - inputs[4] = nodeValue_Float("Gap", self, 0.25) + newInput(4, nodeValue_Float("Gap", self, 0.25)) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) .setMappable(13); @@ -23,7 +23,7 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _ newInput(7, nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"])); - inputs[8] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) }); newInput(9, nodeValue_Surface("Texture", self)); @@ -44,7 +44,7 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _ newInput(15, nodeValue_Int("Truchet seed", self, seed_random())); - inputs[16] = nodeValue_Float("Truchet threshold", self, 0.5) + newInput(16, nodeValue_Float("Truchet threshold", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider) newInput(17, nodeValue_Rotation("Phase", self, 90)); diff --git a/scripts/node_quasicrystal/node_quasicrystal.gml b/scripts/node_quasicrystal/node_quasicrystal.gml index ce05bc231..24389ae42 100644 --- a/scripts/node_quasicrystal/node_quasicrystal.gml +++ b/scripts/node_quasicrystal/node_quasicrystal.gml @@ -3,14 +3,14 @@ function Node_Quasicrystal(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Float("Scale", self, 16) + newInput(1, nodeValue_Float("Scale", self, 16)) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 64, 0.1] }) .setMappable(6); - inputs[2] = nodeValue_Rotation("Angle", self, 0) + newInput(2, nodeValue_Rotation("Angle", self, 0)) .setMappable(7); - inputs[3] = nodeValue_Vec2("Position", self, [ 0, 0 ] ) + newInput(3, nodeValue_Vec2("Position", self, [ 0, 0 ] )) .setUnitRef(function(index) { return getDimension(index); }); newInput(4, nodeValue_Color("Color 1", self, c_white)); @@ -25,7 +25,7 @@ function Node_Quasicrystal(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[8] = nodeValue_Float("Phase", self, 0) + newInput(8, nodeValue_Float("Phase", self, 0)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(8); diff --git a/scripts/node_random_shape/node_random_shape.gml b/scripts/node_random_shape/node_random_shape.gml index e9e15e205..ef93c82aa 100644 --- a/scripts/node_random_shape/node_random_shape.gml +++ b/scripts/node_random_shape/node_random_shape.gml @@ -3,7 +3,7 @@ function Node_Random_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Int("Seed", self, seed_random(6)) + newInput(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); diff --git a/scripts/node_random_tile/node_random_tile.gml b/scripts/node_random_tile/node_random_tile.gml index e071cdc4d..7ec6317d1 100644 --- a/scripts/node_random_tile/node_random_tile.gml +++ b/scripts/node_random_tile/node_random_tile.gml @@ -3,27 +3,27 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); - inputs[2] = nodeValue_Vec2("Scale", self, [ 2, 2 ]) + newInput(2, nodeValue_Vec2("Scale", self, [ 2, 2 ])) .setMappable(11); - inputs[3] = nodeValue_Rotation("Angle", self, 0) + newInput(3, nodeValue_Rotation("Angle", self, 0)) .setMappable(12); - inputs[4] = nodeValue_Float("Gap", self, 0.1) + newInput(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))) + newInput(5, nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white)))) .setMappable(17); newInput(6, nodeValue_Color("Gap color", self, c_black)); newInput(7, nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"])); - inputs[8] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) }); newInput(9, nodeValue_Surface("Texture", self)); @@ -44,7 +44,7 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(15, nodeValue_Int("Truchet seed", self, seed_random())); - inputs[16] = nodeValue_Float("Truchet threshold", self, 0.5) + newInput(16, nodeValue_Float("Truchet threshold", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider) ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_rate_remap/node_rate_remap.gml b/scripts/node_rate_remap/node_rate_remap.gml index 17d919762..52cc90ea0 100644 --- a/scripts/node_rate_remap/node_rate_remap.gml +++ b/scripts/node_rate_remap/node_rate_remap.gml @@ -4,7 +4,7 @@ function Node_Rate_Remap(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(0, nodeValue_Surface("Surface", self)); - inputs[1] = nodeValue_Float("Framerate", self, 10) + newInput(1, nodeValue_Float("Framerate", self, 10)) .setValidator(VV_min(1)); newInput(2, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_rd/node_rd.gml b/scripts/node_rd/node_rd.gml index fe922e646..984dd30bb 100644 --- a/scripts/node_rd/node_rd.gml +++ b/scripts/node_rd/node_rd.gml @@ -3,24 +3,24 @@ function Node_RD(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { newInput(0, nodeValue_Surface("Seed", self)); - inputs[1] = nodeValue_Float("Kill rate", self, 0.058) + newInput(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) + newInput(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) + newInput(3, nodeValue_Float("Timestep", self, 1)) .setMappable(10); newInput(4, nodeValue_Int("Iteration", self, 16)); - inputs[5] = nodeValue_Float("Diffusion A", self, 1.) + newInput(5, nodeValue_Float("Diffusion A", self, 1.)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(11); - inputs[6] = nodeValue_Float("Diffusion B", self, .2) + newInput(6, nodeValue_Float("Diffusion B", self, .2)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(12); @@ -28,24 +28,24 @@ function Node_RD(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { ////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[8] = nodeValue_Surface("Kill map", self) + newInput(8, nodeValue_Surface("Kill map", self)) .setVisible(false, false); - inputs[9] = nodeValue_Surface("Feed map", self) + newInput(9, nodeValue_Surface("Feed map", self)) .setVisible(false, false); - inputs[10] = nodeValue_Surface("Time map", self) + newInput(10, nodeValue_Surface("Time map", self)) .setVisible(false, false); - inputs[11] = nodeValue_Surface("DfA map", self) + newInput(11, nodeValue_Surface("DfA map", self)) .setVisible(false, false); - inputs[12] = nodeValue_Surface("DfB map", self) + newInput(12, nodeValue_Surface("DfB map", self)) .setVisible(false, false); ////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[13] = nodeValue_Float("Diffusion", self, 1.) + newInput(13, nodeValue_Float("Diffusion", self, 1.)) .setDisplay(VALUE_DISPLAY.slider) outputs[0] = nodeValue_Output("Reacted", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_region_fill/node_region_fill.gml b/scripts/node_region_fill/node_region_fill.gml index 8a31d2c65..cae645882 100644 --- a/scripts/node_region_fill/node_region_fill.gml +++ b/scripts/node_region_fill/node_region_fill.gml @@ -9,7 +9,7 @@ function Node_Region_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(3, nodeValue_Bool("Fill", self, true)); - inputs[4] = nodeValue_Int("Seed", self, seed_random(6)) + newInput(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) }); newInput(5, nodeValue_Color("Target Color", self, c_white)); 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 57d37a06f..bfd656583 100644 --- a/scripts/node_render_sprite_sheet/node_render_sprite_sheet.gml +++ b/scripts/node_render_sprite_sheet/node_render_sprite_sheet.gml @@ -17,10 +17,10 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) newInput(0, nodeValue_Surface("Sprites", self)); - inputs[1] = nodeValue_Enum_Scroll("Sprite set", self, 0, [ "Animation", "Sprite array" ]) + newInput(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.") + newInput(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), @@ -28,17 +28,17 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) new scrollItem("Grid", s_node_alignment, 2), ]) .rejectArray(); - inputs[4] = nodeValue_Int("Grid column", self, 4) + newInput(4, nodeValue_Int("Grid column", self, 4)) .rejectArray(); - inputs[5] = nodeValue_Enum_Button("Alignment", self, 0, [ "First", "Middle", "Last" ]) + newInput(5, nodeValue_Enum_Button("Alignment", self, 0, [ "First", "Middle", "Last" ])) .rejectArray(); newInput(6, nodeValue_Int("Spacing", self, 0)); - inputs[7] = nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ]) + newInput(7, nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ])) - inputs[8] = nodeValue_Slider_Range("Range", self, [ 0, 0 ]) + newInput(8, nodeValue_Slider_Range("Range", self, [ 0, 0 ])) .setTooltip("Starting/ending frames, set end to 0 to default to last frame.") newInput(9, nodeValue_Vec2("Spacing", self, [ 0, 0 ])); diff --git a/scripts/node_repeat/node_repeat.gml b/scripts/node_repeat/node_repeat.gml index 70311d01d..b1b61a8e7 100644 --- a/scripts/node_repeat/node_repeat.gml +++ b/scripts/node_repeat/node_repeat.gml @@ -24,14 +24,14 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co newInput(1, nodeValue_Dimension(self)); - inputs[2] = nodeValue_Int("Amount", self, 2) + newInput(2, nodeValue_Int("Amount", self, 2)) .rejectArray(); 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_Vec2("Shift position", self, [ DEF_SURF_W / 2, 0 ]) + newInput(4, nodeValue_Vec2("Shift position", self, [ DEF_SURF_W / 2, 0 ])) .setUnitRef(function() { return getDimension(); }); newInput(5, nodeValue_Rotation_Range("Repeat rotation", self, [0, 0])); @@ -42,39 +42,39 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co newInput(8, nodeValue_Float("Radius", self, 1)); - inputs[9] = nodeValue_Vec2("Start position", self, [0, 0]) + newInput(9, nodeValue_Vec2("Start position", self, [0, 0])) .setUnitRef(function(index) { return getInputData(1); }); newInput(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." ) + newInput(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]) + newInput(12, nodeValue_Slider_Range("Path range", self, [0, 1])) .setTooltip("Range of the path to follow."); newInput(13, nodeValue_Float("Path shift", self, 0)); - inputs[14] = nodeValue_Gradient("Color over copy", self, new gradientObject(cola(c_white))) + newInput(14, nodeValue_Gradient("Color over copy", self, new gradientObject(cola(c_white)))) .setMappable(30); newInput(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" ]) + newInput(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)) + newInput(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) }); newInput(18, nodeValue_Int("Column", self, 4)); - inputs[19] = nodeValue_Vec2("Column shift", self, [0, DEF_SURF_H / 2]) + newInput(19, nodeValue_Vec2("Column shift", self, [0, DEF_SURF_H / 2])) .setUnitRef(function() { return getDimension(); }); - inputs[20] = nodeValue_Float("Animator midpoint", self, 0.5) + newInput(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) + newInput(21, nodeValue_Float("Animator range", self, 0.1)) .setDisplay(VALUE_DISPLAY.slider); newInput(22, nodeValue_Vec2("Animator position", self, [ 0, 0 ])); @@ -85,15 +85,15 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co newInput(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" ]) + newInput(26, nodeValue_Enum_Button("Stack", self, 0, [ "None", "X", "Y" ])) .setTooltip("Place each copy next to each other, taking surface dimension into account."); newInput(27, nodeValue_Color("Animator blend", self, cola(c_white))); - inputs[28] = nodeValue_Float("Animator alpha", self, 1) + newInput(28, nodeValue_Float("Animator alpha", self, 1)) .setDisplay(VALUE_DISPLAY.slider); - inputs[29] = nodeValue_Bool("Animator", self, false) + newInput(29, nodeValue_Bool("Animator", self, false)) ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_repeat_texture/node_repeat_texture.gml b/scripts/node_repeat_texture/node_repeat_texture.gml index 738d9975f..40d73e82c 100644 --- a/scripts/node_repeat_texture/node_repeat_texture.gml +++ b/scripts/node_repeat_texture/node_repeat_texture.gml @@ -8,7 +8,7 @@ function Node_Repeat_Texture(_x, _y, _group = noone) : Node_Processor(_x, _y, _g newInput(2, nodeValue_Enum_Scroll("Type", self, 1, [ "Tile", "Scatter", "Cell" ])); - inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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); diff --git a/scripts/node_rigid_activate/node_rigid_activate.gml b/scripts/node_rigid_activate/node_rigid_activate.gml index 514dcdc60..9199f6ded 100644 --- a/scripts/node_rigid_activate/node_rigid_activate.gml +++ b/scripts/node_rigid_activate/node_rigid_activate.gml @@ -6,10 +6,10 @@ 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) + newInput(0, nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone)) .setVisible(true, true); - inputs[1] = nodeValue_Bool("Physics activated", self, true) + newInput(1, nodeValue_Bool("Physics activated", self, true)) .rejectArray(); outputs[0] = nodeValue_Output("Object", self, VALUE_TYPE.rigid, noone); 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 f300924b5..2c8f49ccd 100644 --- a/scripts/node_rigid_force_apply/node_rigid_force_apply.gml +++ b/scripts/node_rigid_force_apply/node_rigid_force_apply.gml @@ -6,32 +6,32 @@ 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) + newInput(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" ]) + newInput(1, nodeValue_Enum_Scroll("Force type", self, 0, [ "Constant", "Impulse", "Torque", "Explode" ])) .rejectArray(); - inputs[2] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(2, nodeValue_Vec2("Position", self, [ 0, 0 ])) .rejectArray(); - inputs[3] = nodeValue_Float("Torque", self, 0) + newInput(3, nodeValue_Float("Torque", self, 0)) .rejectArray(); - inputs[4] = nodeValue_Int("Apply frame", self, 0, "Frame index to apply force.") + newInput(4, nodeValue_Int("Apply frame", self, 0, "Frame index to apply force.")) .rejectArray(); - inputs[5] = nodeValue_Vec2("Force", self, [ 0.1, 0 ]) + newInput(5, nodeValue_Vec2("Force", self, [ 0.1, 0 ])) .rejectArray(); - inputs[6] = nodeValue_Enum_Button("Scope", self, 0, [ "Global", "Local" ]) + newInput(6, nodeValue_Enum_Button("Scope", self, 0, [ "Global", "Local" ])) .rejectArray(); - inputs[7] = nodeValue_Float("Strength", self, 1) + newInput(7, nodeValue_Float("Strength", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.01] }) .rejectArray(); - inputs[8] = nodeValue_Float("Range", self, 8) + newInput(8, nodeValue_Float("Range", self, 8)) .rejectArray(); outputs[0] = nodeValue_Output("Object", self, VALUE_TYPE.rigid, noone); diff --git a/scripts/node_rigid_object/node_rigid_object.gml b/scripts/node_rigid_object/node_rigid_object.gml index acf6b685e..60aafba31 100644 --- a/scripts/node_rigid_object/node_rigid_object.gml +++ b/scripts/node_rigid_object/node_rigid_object.gml @@ -15,53 +15,53 @@ 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) + newInput(0, nodeValue_Bool("Affect by force", self, true)) .rejectArray() .setAnimable(false); - inputs[1] = nodeValue_Float("Weight", self, 0.5) + newInput(1, nodeValue_Float("Weight", self, 0.5)) .rejectArray() .setAnimable(false); - inputs[2] = nodeValue_Float("Contact friction", self, 0.2) + newInput(2, nodeValue_Float("Contact friction", self, 0.2)) .rejectArray() .setAnimable(false); - inputs[3] = nodeValue_Float("Air resistance", self, 0.2) + newInput(3, nodeValue_Float("Air resistance", self, 0.2)) .rejectArray() .setAnimable(false); - inputs[4] = nodeValue_Float("Rotation resistance", self, 0.2) + newInput(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) ]) + newInput(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) + newInput(6, nodeValue_Surface("Texture", self)) .setAnimable(false); - inputs[7] = nodeValue_Vec2("Start position", self, [ 16, 16 ]) + newInput(7, nodeValue_Vec2("Start position", self, [ 16, 16 ])) .setAnimable(false); - inputs[8] = nodeValue_Bool("Spawn", self, true, "Make object spawn when start.") + newInput(8, nodeValue_Bool("Spawn", self, true, "Make object spawn when start.")) .rejectArray() .setAnimable(false); - inputs[9] = nodeValue_Trigger("Generate mesh", self, false ) + newInput(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) + newInput(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) + newInput(11, nodeValue_Bool("Add pixel collider", self, true)) .rejectArray() .setAnimable(false); - inputs[12] = nodeValue_Int("Collision group", self, 1) + newInput(12, nodeValue_Int("Collision group", self, 1)) .rejectArray() outputs[0] = nodeValue_Output("Object", self, VALUE_TYPE.rigid, object); 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 c60fd6c1f..f5e33ac10 100644 --- a/scripts/node_rigid_object_spawner/node_rigid_object_spawner.gml +++ b/scripts/node_rigid_object_spawner/node_rigid_object_spawner.gml @@ -8,28 +8,28 @@ 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) + newInput(0, nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone)) .setVisible(true, true); - inputs[1] = nodeValue_Area("Spawn area", self, DEF_AREA) + newInput(1, nodeValue_Area("Spawn area", self, DEF_AREA)) .rejectArray(); - inputs[2] = nodeValue_Enum_Button("Spawn type", self, 0, [ "Stream", "Burst" ]) + newInput(2, nodeValue_Enum_Button("Spawn type", self, 0, [ "Stream", "Burst" ])) .rejectArray(); - inputs[3] = nodeValue_Int("Spawn delay", self, 4) + newInput(3, nodeValue_Int("Spawn delay", self, 4)) .rejectArray(); - inputs[4] = nodeValue_Int("Spawn amount", self, 1) + newInput(4, nodeValue_Int("Spawn amount", self, 1)) .rejectArray(); - inputs[5] = nodeValue_Int("Spawn frame", self, 0) + newInput(5, nodeValue_Int("Spawn frame", self, 0)) .rejectArray(); - inputs[6] = nodeValue_Bool("Spawn", self, true) + newInput(6, nodeValue_Bool("Spawn", self, true)) .rejectArray(); - inputs[7] = nodeValue_Int("Seed", self, seed_random(6)) + newInput(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); diff --git a/scripts/node_rigid_override/node_rigid_override.gml b/scripts/node_rigid_override/node_rigid_override.gml index af54669b6..1b6d8033e 100644 --- a/scripts/node_rigid_override/node_rigid_override.gml +++ b/scripts/node_rigid_override/node_rigid_override.gml @@ -7,7 +7,7 @@ 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 ) + newInput(0, nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone )) .setVisible(true, true); newInput(1, nodeValue_Vec2("Positions", self, [0, 0] )); diff --git a/scripts/node_rigid_render/node_rigid_render.gml b/scripts/node_rigid_render/node_rigid_render.gml index 1082197ee..b5742bc8f 100644 --- a/scripts/node_rigid_render/node_rigid_render.gml +++ b/scripts/node_rigid_render/node_rigid_render.gml @@ -10,7 +10,7 @@ function Node_Rigid_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constr newInput(0, nodeValue_Vec2("Render dimension", self, DEF_SURF)); - inputs[1] = nodeValue_Bool("Round position", self, false) + newInput(1, nodeValue_Bool("Round position", self, false)) outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); @@ -30,7 +30,7 @@ function Node_Rigid_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constr static createNewInput = function() { var index = array_length(inputs); - inputs[index] = nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone ) + newInput(index, nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone )) .setVisible(true, true); return inputs[index]; 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 1641c14bb..d9f6abd29 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_Vec2("Render dimension", self, DEF_SURF) + newInput(0, nodeValue_Vec2("Render dimension", self, DEF_SURF)) .rejectArray(); - inputs[1] = nodeValue_Bool("Round position", self, false) + newInput(1, nodeValue_Bool("Round position", self, false)) attribute_surface_depth(); @@ -23,7 +23,7 @@ function Node_Rigid_Render_Output(_x, _y, _group = noone) : Node_Group_Output(_x static createNewInput = function() { var index = array_length(inputs); - inputs[index] = nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone ) + newInput(index, nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone )) .setVisible(true, true); return inputs[index]; diff --git a/scripts/node_rigid_variable/node_rigid_variable.gml b/scripts/node_rigid_variable/node_rigid_variable.gml index d7a100cdf..5a57dfdfa 100644 --- a/scripts/node_rigid_variable/node_rigid_variable.gml +++ b/scripts/node_rigid_variable/node_rigid_variable.gml @@ -8,7 +8,7 @@ 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 ) + newInput(0, nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone )) .setVisible(true, true); input_display_list = [ 0 ]; diff --git a/scripts/node_rm_cloud/node_rm_cloud.gml b/scripts/node_rm_cloud/node_rm_cloud.gml index 4dbd1aa41..78f28ae20 100644 --- a/scripts/node_rm_cloud/node_rm_cloud.gml +++ b/scripts/node_rm_cloud/node_rm_cloud.gml @@ -7,32 +7,32 @@ function Node_RM_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(2, nodeValue_Vec3("Rotation", self, [ 0, 0, 0 ])); - inputs[3] = nodeValue_Float("Scale", self, 1) + newInput(3, nodeValue_Float("Scale", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); - inputs[4] = nodeValue_Float("FOV", self, 30) + newInput(4, nodeValue_Float("FOV", self, 30)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }); newInput(5, nodeValue_Vec2("View Range", self, [ 0, 6 ])); - inputs[6] = nodeValue_Float("Density", self, 0.5) + newInput(6, nodeValue_Float("Density", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider); newInput(7, nodeValue_Int("Detail", self, 8)); - inputs[8] = nodeValue_Float("Threshold", self, 0.4) + newInput(8, nodeValue_Float("Threshold", self, 0.4)) .setDisplay(VALUE_DISPLAY.slider); newInput(9, nodeValue_Float("Detail Scaling", self, 2.)); - inputs[10] = nodeValue_Float("Detail Attenuation", self, 0.5) + newInput(10, nodeValue_Float("Detail Attenuation", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider); newInput(11, nodeValue_Enum_Scroll("Shape", self, 0, [ "Volume", "Plane" ])); - inputs[12] = nodeValue_Bool("Use Fog", self, 0) + newInput(12, nodeValue_Bool("Use Fog", self, 0)) - inputs[13] = nodeValue_Gradient("Colors", self, new gradientObject([ cola(c_black), cola(c_white) ])) + newInput(13, nodeValue_Gradient("Colors", self, new gradientObject([ cola(c_black), cola(c_white) ]))) outputs[0] = nodeValue_Output("Surface Out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_rm_combine/node_rm_combine.gml b/scripts/node_rm_combine/node_rm_combine.gml index 47969d597..f13b6e7a1 100644 --- a/scripts/node_rm_combine/node_rm_combine.gml +++ b/scripts/node_rm_combine/node_rm_combine.gml @@ -7,21 +7,21 @@ function Node_RM_Combine(_x, _y, _group = noone) : Node_RM(_x, _y, _group) const newInput(1, nodeValue_Enum_Button("Projection", self, 0, [ "Perspective", "Orthographic" ])); - inputs[2] = nodeValue_Float("FOV", self, 30) + newInput(2, nodeValue_Float("FOV", self, 30)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }); - inputs[3] = nodeValue_Float("Ortho Scale", self, 5.) + newInput(3, nodeValue_Float("Ortho Scale", self, 5.)) newInput(4, nodeValue_Vec2("View Range", self, [ 3, 6 ])); - inputs[5] = nodeValue_Float("Depth", self, 0) + newInput(5, nodeValue_Float("Depth", self, 0)) .setDisplay(VALUE_DISPLAY.slider); newInput(6, nodeValue_Bool("Draw BG", self, false)); newInput(7, nodeValue_Color("Background", self, c_black)); - inputs[8] = nodeValue_Float("Ambient Level", self, 0.2) + newInput(8, nodeValue_Float("Ambient Level", self, 0.2)) .setDisplay(VALUE_DISPLAY.slider); newInput(9, nodeValue_Vec3("Light Position", self, [ -.4, -.5, 1 ])); @@ -30,22 +30,22 @@ function Node_RM_Combine(_x, _y, _group = noone) : Node_RM(_x, _y, _group) const newInput(11, nodeValue_Vec3("Camera Rotation", self, [ 30, 45, 0 ])); - inputs[12] = nodeValue_Float("Camera Scale", self, 1) + newInput(12, nodeValue_Float("Camera Scale", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[13] = nodeValue_SDF("Shape 1", self, {}) + newInput(13, nodeValue_SDF("Shape 1", self, {})) .setVisible(true, true); - inputs[14] = nodeValue_SDF("Shape 2", self, {}) + newInput(14, nodeValue_SDF("Shape 2", self, {})) .setVisible(true, true); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// newInput(15, nodeValue_Enum_Scroll("Type", self, 0, [ "Place", "Union", "Subtract", "Intersect" ])); - inputs[16] = nodeValue_Float("Merge", self, 0.1) + newInput(16, nodeValue_Float("Merge", self, 0.1)) .setDisplay(VALUE_DISPLAY.slider); newInput(17, nodeValue_Bool("Render", self, true)); diff --git a/scripts/node_rm_primitive/node_rm_primitive.gml b/scripts/node_rm_primitive/node_rm_primitive.gml index e37194881..f96dc884e 100644 --- a/scripts/node_rm_primitive/node_rm_primitive.gml +++ b/scripts/node_rm_primitive/node_rm_primitive.gml @@ -24,32 +24,32 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con newInput(3, nodeValue_Vec3("Rotation", self, [ 0, 0, 0 ])); - inputs[4] = nodeValue_Float("Scale", self, 1) + newInput(4, nodeValue_Float("Scale", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); - inputs[5] = nodeValue_Float("FOV", self, 30) + newInput(5, nodeValue_Float("FOV", self, 30)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }); newInput(6, nodeValue_Vec2("View Range", self, [ 3, 6 ])); - inputs[7] = nodeValue_Float("Depth", self, 0) + newInput(7, nodeValue_Float("Depth", self, 0)) .setDisplay(VALUE_DISPLAY.slider); newInput(8, nodeValue_Vec3("Light Position", self, [ -.4, -.5, 1 ])); newInput(9, nodeValue_Color("Base Color", self, c_white)); - inputs[10] = nodeValue_Float("Ambient Level", self, 0.2) + newInput(10, nodeValue_Float("Ambient Level", self, 0.2)) .setDisplay(VALUE_DISPLAY.slider); newInput(11, nodeValue_Vec3("Elongate", self, [ 0, 0, 0 ])); - inputs[12] = nodeValue_Float("Rounded", self, 0.) + newInput(12, nodeValue_Float("Rounded", self, 0.)) .setDisplay(VALUE_DISPLAY.slider); newInput(13, nodeValue_Enum_Button("Projection", self, 0, [ "Perspective", "Orthographic" ])); - inputs[14] = nodeValue_Float("Ortho Scale", self, 1.) + newInput(14, nodeValue_Float("Ortho Scale", self, 1.)) newInput(15, nodeValue_Vec3("Wave Amplitude", self, [ 4, 4, 4 ])); @@ -59,7 +59,7 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con newInput(18, nodeValue_Enum_Button("Twist Axis", self, 0, [ "X", "Y", "Z" ])); - inputs[19] = nodeValue_Float("Twist Amount", self, 0) + newInput(19, nodeValue_Float("Twist Amount", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 8, 0.1 ] }); newInput(20, nodeValue_Vec3("Tile Distance", self, [ 1, 1, 1 ])); @@ -68,23 +68,23 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con newInput(21, nodeValue_Vec3("Size", self, [ 1, 1, 1 ])); - inputs[22] = nodeValue_Float("Radius", self, .7) + newInput(22, nodeValue_Float("Radius", self, .7)) .setDisplay(VALUE_DISPLAY.slider); - inputs[23] = nodeValue_Float("Thickness", self, .2) + newInput(23, nodeValue_Float("Thickness", self, .2)) .setDisplay(VALUE_DISPLAY.slider); - inputs[24] = nodeValue_Float("Crop", self, 0.) + newInput(24, nodeValue_Float("Crop", self, 0.)) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); newInput(25, nodeValue_Rotation("Angle", self, 30)); - inputs[26] = nodeValue_Float("Height", self, .5) + newInput(26, nodeValue_Float("Height", self, .5)) .setDisplay(VALUE_DISPLAY.slider); newInput(27, nodeValue_Slider_Range("Radius Range", self, [ .7, .1 ])); - inputs[28] = nodeValue_Float("Uniform Size", self, 1) + newInput(28, nodeValue_Float("Uniform Size", self, 1)) .setDisplay(VALUE_DISPLAY.slider); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -99,17 +99,17 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con newInput(32, nodeValue_Bool("Volumetric", self, false)); - inputs[33] = nodeValue_Float("Density", self, 0.3) + newInput(33, nodeValue_Float("Density", self, 0.3)) .setDisplay(VALUE_DISPLAY.slider); newInput(34, nodeValue_Surface("Environment", self)); - inputs[35] = nodeValue_Float("Reflective", self, 0.) + newInput(35, nodeValue_Float("Reflective", self, 0.)) .setDisplay(VALUE_DISPLAY.slider); newInput(36, nodeValue_Surface("Texture", self)); - inputs[37] = nodeValue_Float("Triplanar Smoothing", self, 1.) + newInput(37, nodeValue_Float("Triplanar Smoothing", self, 1.)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 10, 0.1 ] }); newInput(38, nodeValue_Float("Texture Scale", self, 1.)); @@ -124,7 +124,7 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con newInput(42, nodeValue_Vec3("Camera Rotation", self, [ 30, 45, 0 ])); - inputs[43] = nodeValue_Float("Camera Scale", self, 1) + newInput(43, nodeValue_Float("Camera Scale", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); newInput(44, nodeValue_Bool("Render", self, true)); diff --git a/scripts/node_rm_render/node_rm_render.gml b/scripts/node_rm_render/node_rm_render.gml index ef0b0d155..6c3b2d988 100644 --- a/scripts/node_rm_render/node_rm_render.gml +++ b/scripts/node_rm_render/node_rm_render.gml @@ -7,21 +7,21 @@ function Node_RM_Render(_x, _y, _group = noone) : Node_RM(_x, _y, _group) constr newInput(1, nodeValue_Enum_Button("Projection", self, 0, [ "Perspective", "Orthographic" ])); - inputs[2] = nodeValue_Float("FOV", self, 30) + newInput(2, nodeValue_Float("FOV", self, 30)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }); - inputs[3] = nodeValue_Float("Ortho Scale", self, 5.) + newInput(3, nodeValue_Float("Ortho Scale", self, 5.)) newInput(4, nodeValue_Vec2("View Range", self, [ 3, 6 ])); - inputs[5] = nodeValue_Float("Depth", self, 0) + newInput(5, nodeValue_Float("Depth", self, 0)) .setDisplay(VALUE_DISPLAY.slider); newInput(6, nodeValue_Bool("Draw BG", self, false)); newInput(7, nodeValue_Color("Background", self, c_black)); - inputs[8] = nodeValue_Float("Ambient Level", self, 0.2) + newInput(8, nodeValue_Float("Ambient Level", self, 0.2)) .setDisplay(VALUE_DISPLAY.slider); newInput(9, nodeValue_Vec3("Light Position", self, [ -.4, -.5, 1 ])); @@ -30,12 +30,12 @@ function Node_RM_Render(_x, _y, _group = noone) : Node_RM(_x, _y, _group) constr newInput(11, nodeValue_Vec3("Camera Rotation", self, [ 30, 45, 0 ])); - inputs[12] = nodeValue_Float("Camera Scale", self, 1) + newInput(12, nodeValue_Float("Camera Scale", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[13] = nodeValue_SDF("SDF Object", self, {}) + newInput(13, nodeValue_SDF("SDF Object", self, {})) .setVisible(true, true); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_rm_terrain/node_rm_terrain.gml b/scripts/node_rm_terrain/node_rm_terrain.gml index 9b8b36bd3..eeeb00da1 100644 --- a/scripts/node_rm_terrain/node_rm_terrain.gml +++ b/scripts/node_rm_terrain/node_rm_terrain.gml @@ -9,23 +9,23 @@ function Node_RM_Terrain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(3, nodeValue_Vec3("Rotation", self, [ 30, 45, 0 ])); - inputs[4] = nodeValue_Float("Scale", self, 1) + newInput(4, nodeValue_Float("Scale", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); - inputs[5] = nodeValue_Float("FOV", self, 30) + newInput(5, nodeValue_Float("FOV", self, 30)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }); newInput(6, nodeValue_Vec2("View Range", self, [ 0, 6 ])); - inputs[7] = nodeValue_Float("BG Bleed", self, 1) + newInput(7, nodeValue_Float("BG Bleed", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(8, nodeValue_Color("Ambient", self, c_white)); - inputs[9] = nodeValue_Float("Height", self, 1) + newInput(9, nodeValue_Float("Height", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); - inputs[10] = nodeValue_Bool("Tile", self, true) + newInput(10, nodeValue_Bool("Tile", self, true)) newInput(11, nodeValue_Surface("Texture", self)); @@ -35,7 +35,7 @@ function Node_RM_Terrain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(14, nodeValue_Vec3("Sun Position", self, [ .5, 1, .5 ])); - inputs[15] = nodeValue_Float("Shadow", self, 0.2) + newInput(15, nodeValue_Float("Shadow", self, 0.2)) .setDisplay(VALUE_DISPLAY.slider); outputs[0] = nodeValue_Output("Surface Out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_sampler/node_sampler.gml b/scripts/node_sampler/node_sampler.gml index 93473a034..14db9f3f9 100644 --- a/scripts/node_sampler/node_sampler.gml +++ b/scripts/node_sampler/node_sampler.gml @@ -4,10 +4,10 @@ function Node_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("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.") + newInput(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] }); newInput(3, nodeValue_Bool("Alpha", self, false)); diff --git a/scripts/node_scale_algo/node_scale_algo.gml b/scripts/node_scale_algo/node_scale_algo.gml index 49b343372..74d4a8682 100644 --- a/scripts/node_scale_algo/node_scale_algo.gml +++ b/scripts/node_scale_algo/node_scale_algo.gml @@ -20,7 +20,7 @@ function Node_Scale_Algo(_x, _y, _group = noone) : Node_Processor(_x, _y, _group newInput(1, nodeValue_Enum_Scroll("Algorithm", self, 0, [ "Scale2x", "Scale3x", "CleanEdge" ])); - inputs[2] = nodeValue_Float("Tolerance", self, 0) + newInput(2, nodeValue_Float("Tolerance", self, 0)) .setDisplay(VALUE_DISPLAY.slider); newInput(3, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_scatter/node_scatter.gml b/scripts/node_scatter/node_scatter.gml index 63c3dcf7d..01a24fbdd 100644 --- a/scripts/node_scatter/node_scatter.gml +++ b/scripts/node_scatter/node_scatter.gml @@ -16,7 +16,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c newInput(1, nodeValue_Dimension(self)); - inputs[2] = nodeValue_Int("Amount", self, 8) + newInput(2, nodeValue_Int("Amount", self, 8)) .setValidator(VV_min(0)); newInput(3, nodeValue_Vec2_Range("Scale", self, [ 1, 1, 1, 1 ] , { linked : true })); @@ -24,7 +24,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c newInput(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 }) + newInput(5, nodeValue_Area("Area", self, DEF_AREA_REF, { onSurfaceSize })) .setUnitRef(onSurfaceSize, VALUE_UNIT.reference); newInput(6, nodeValue_Enum_Scroll("Distribution", self, 5, [ "Area", "Border", "Map", "Direct Data", "Path", "Full image + Tile" ])); @@ -35,10 +35,10 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c newInput(9, nodeValue_Enum_Button("Scatter", self, 1, [ "Uniform", "Random" ])); - inputs[10] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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))) + newInput(11, nodeValue_Gradient("Random blend", self, new gradientObject(cola(c_white)))) .setMappable(28); newInput(12, nodeValue_Slider_Range("Alpha", self, [ 1, 1 ])); @@ -55,7 +55,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c newInput(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.") + newInput(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" ] }); newInput(18, nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Normal", "Add", "Max" ])); @@ -64,14 +64,14 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c newInput(20, nodeValue_Bool("Rotate along path", self, true)); - inputs[21] = nodeValue_Float("Path Shift", self, 0) + newInput(21, nodeValue_Float("Path Shift", self, 0)) .setDisplay(VALUE_DISPLAY.slider); newInput(22, nodeValue_Float("Scatter Distance", self, 0)); newInput(23, nodeValue_Bool("Sort Y", self, false)); - inputs[24] = nodeValue_Int("Array indices", self, []) + newInput(24, nodeValue_Int("Array indices", self, [])) .setArrayDepth(1); newInput(25, nodeValue_Surface("Array texture", self)); @@ -102,7 +102,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c newInput(36, nodeValue_Vec2("Shift position", self, [ 0, 0 ])); - inputs[37] = nodeValue_Bool("Exact", self, false) + newInput(37, nodeValue_Bool("Exact", self, false)) newInput(38, nodeValue_Enum_Button("Spacing", self, 0, [ "After", "Between", "Around" ])); diff --git a/scripts/node_scatter_points/node_area.gml b/scripts/node_scatter_points/node_area.gml index ce6764dad..f41407867 100644 --- a/scripts/node_scatter_points/node_area.gml +++ b/scripts/node_scatter_points/node_area.gml @@ -6,12 +6,12 @@ function Node_Area(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constru w = 96; - inputs[| 0] = nodeValue_vector(0, "Postion", self, [ 0, 0 ] ) + newInput(| 0, nodeValue_vector(0, "Postion", self, [ 0, 0 ] )) .setVisible(true, true); - inputs[| 1] = nodeValue_vector(1, "Size", self, [ 16, 16 ] ) + newInput(| 1, nodeValue_vector(1, "Size", self, [ 16, 16 ] )) .setVisible(true, true); - inputs[| 2] = nodeValue(2, "Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, AREA_SHAPE.rectangle ) + newInput(| 2, nodeValue(2, "Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, AREA_SHAPE.rectangle )) .setDisplay(VALUE_DISPLAY.enum_scroll, ["Rectangle", "Elipse"]); outputs[| 0] = nodeValue_Output(0, "Area", self, VALUE_TYPE.float, [ 0, 0, 0, 0, AREA_SHAPE.rectangle ]) diff --git a/scripts/node_scatter_points/node_scatter_points.gml b/scripts/node_scatter_points/node_scatter_points.gml index 87c02effe..67892db04 100644 --- a/scripts/node_scatter_points/node_scatter_points.gml +++ b/scripts/node_scatter_points/node_scatter_points.gml @@ -5,22 +5,22 @@ 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 } ) + newInput(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" ]) + newInput(1, nodeValue_Enum_Button("Point distribution", self, 0, [ "Area", "Border", "Map" ])) .rejectArray(); - inputs[2] = nodeValue_Enum_Button("Scatter", self, 1, [ "Uniform", "Random" ]) + newInput(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.") + newInput(3, nodeValue_Int("Point amount", self, 2, "Amount of particle spawn in that frame.")) .rejectArray(); - inputs[4] = nodeValue_Surface("Distribution map", self) + newInput(4, nodeValue_Surface("Distribution map", self)) .rejectArray(); - inputs[5] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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(); diff --git a/scripts/node_sdf/node_sdf.gml b/scripts/node_sdf/node_sdf.gml index 510de2373..5f932373a 100644 --- a/scripts/node_sdf/node_sdf.gml +++ b/scripts/node_sdf/node_sdf.gml @@ -15,7 +15,7 @@ function Node_SDF(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const newInput(2, nodeValue_Enum_Button("Side", self, 2, [ "Inside", "Outside", "Both" ])); - inputs[3] = nodeValue_Float("Max distance", self, 1) + newInput(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); diff --git a/scripts/node_segment_filter/node_segment_filter.gml b/scripts/node_segment_filter/node_segment_filter.gml index 987379f5e..1b48ef06e 100644 --- a/scripts/node_segment_filter/node_segment_filter.gml +++ b/scripts/node_segment_filter/node_segment_filter.gml @@ -3,7 +3,7 @@ function Node_Segment_Filter(_x, _y, _group = noone) : Node(_x, _y, _group) cons setDimension(96, 48); - inputs[0] = nodeValue_Vector("Segments", self, [[]]) + newInput(0, nodeValue_Vector("Segments", self, [[]])) .setVisible(true, true) .setArrayDepth(1); diff --git a/scripts/node_seperate_shape/node_seperate_shape.gml b/scripts/node_seperate_shape/node_seperate_shape.gml index 3b5d009b1..f3cac612f 100644 --- a/scripts/node_seperate_shape/node_seperate_shape.gml +++ b/scripts/node_seperate_shape/node_seperate_shape.gml @@ -1,23 +1,23 @@ function Node_Seperate_Shape(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Separate Shape"; - inputs[0] = nodeValue_Surface("Surface in", self) + newInput(0, nodeValue_Surface("Surface in", self)) .rejectArray(); - inputs[1] = nodeValue_Float("Tolerance", self, 0.2) + newInput(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) + newInput(2, nodeValue_Bool("Override color", self, false)) .rejectArray(); - inputs[3] = nodeValue_Color("Color", self, c_white) + newInput(3, nodeValue_Color("Color", self, c_white)) .rejectArray(); - inputs[4] = nodeValue_Bool("Ignore blank", self, true, "Skip empty and black shape.") + newInput(4, nodeValue_Bool("Ignore blank", self, true, "Skip empty and black shape.")) .rejectArray(); - inputs[5] = nodeValue_Enum_Button("Mode", self, 0 , [ "Greyscale", "Alpha" ] ) + newInput(5, nodeValue_Enum_Button("Mode", self, 0 , [ "Greyscale", "Alpha" ] )) outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_sequence_anim/node_sequence_anim.gml b/scripts/node_sequence_anim/node_sequence_anim.gml index e57e8e627..79a4b0044 100644 --- a/scripts/node_sequence_anim/node_sequence_anim.gml +++ b/scripts/node_sequence_anim/node_sequence_anim.gml @@ -3,13 +3,13 @@ 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, []) + newInput(0, nodeValue_Surface("Surface in", self, [])) .setArrayDepth(1); - inputs[1] = nodeValue_Float("Speed", self, 1) + newInput(1, nodeValue_Float("Speed", self, 1)) .rejectArray(); - inputs[2] = nodeValue_Int("Sequence", self, []) + newInput(2, nodeValue_Int("Sequence", self, [])) .setVisible(true, true) .setArrayDepth(1); diff --git a/scripts/node_shadow/node_shadow.gml b/scripts/node_shadow/node_shadow.gml index e838d255d..61fc81c89 100644 --- a/scripts/node_shadow/node_shadow.gml +++ b/scripts/node_shadow/node_shadow.gml @@ -4,21 +4,21 @@ function Node_Shadow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co newInput(0, nodeValue_Surface("Surface in", self)); newInput(1, nodeValue_Color("Color", self, c_black)); - inputs[2] = nodeValue_Float("Strength", self, .5) + newInput(2, nodeValue_Float("Strength", self, .5)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] }); - inputs[3] = nodeValue_Vec2("Shift", self, [ 4, 4 ]) + newInput(3, nodeValue_Vec2("Shift", self, [ 4, 4 ])) .setUnitRef(function(index) { return getDimension(index); }); - inputs[4] = nodeValue_Float("Grow", self, 3) + newInput(4, nodeValue_Float("Grow", self, 3)) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.1] }); - inputs[5] = nodeValue_Float("Blur", self, 3) + newInput(5, nodeValue_Float("Blur", self, 3)) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); newInput(6, nodeValue_Surface("Mask", self)); - inputs[7] = nodeValue_Float("Mix", self, 1) + newInput(7, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(8, nodeValue_Bool("Active", self, true)); @@ -28,7 +28,7 @@ function Node_Shadow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co newInput(11, nodeValue_Enum_Scroll("Positioning", self, 0, [ "Shift", "Light" ])); - inputs[12] = nodeValue_Vec2("Light Position", self, [ 0, 0 ]) + newInput(12, nodeValue_Vec2("Light Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_shadow_cast/node_shadow_cast.gml b/scripts/node_shadow_cast/node_shadow_cast.gml index 244981a14..3959e31ab 100644 --- a/scripts/node_shadow_cast/node_shadow_cast.gml +++ b/scripts/node_shadow_cast/node_shadow_cast.gml @@ -6,7 +6,7 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(1, nodeValue_Surface("Solid", self)); - inputs[2] = nodeValue_Vec2("Light Position", self, [ 0, 0 ]) + newInput(2, nodeValue_Vec2("Light Position", self, [ 0, 0 ])) .setUnitRef(function(index) { var _surf = getInputData(0); if(is_array(_surf) && array_length(_surf) == 0) @@ -21,10 +21,10 @@ 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) + newInput(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) + newInput(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), @@ -40,13 +40,13 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(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) + newInput(11, nodeValue_Float("BG threshold", self, 0.1)) .setDisplay(VALUE_DISPLAY.slider); - inputs[12] = nodeValue_Float("Light intensity", self, 1) + newInput(12, nodeValue_Float("Light intensity", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 2, 0.01] }); - inputs[13] = nodeValue_Int("Banding", self, 0) + newInput(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), @@ -54,10 +54,10 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou new scrollItem("Linear", s_node_curve, 2), ]) .setTooltip("Control how light fade out over distance."); - inputs[15] = nodeValue_Int("Ambient occlusion", self, 0) + newInput(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) + newInput(16, nodeValue_Float("Ambient occlusion strength", self, 0.1)) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }); newInput(17, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_shape/node_shape.gml b/scripts/node_shape/node_shape.gml index dab5e3f14..7916e4bb0 100644 --- a/scripts/node_shape/node_shape.gml +++ b/scripts/node_shape/node_shape.gml @@ -54,13 +54,13 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con newInput(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 }) + newInput(3, nodeValue_Area("Position", self, DEF_AREA_REF, { onSurfaceSize, useShape : false })) .setUnitRef(onSurfaceSize, VALUE_UNIT.reference); - inputs[4] = nodeValue_Int("Sides", self, 3) + newInput(4, nodeValue_Int("Sides", self, 3)) .setVisible(false); - inputs[5] = nodeValue_Float("Inner radius", self, 0.5) + newInput(5, nodeValue_Float("Inner radius", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider) .setVisible(false); @@ -70,7 +70,7 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con newInput(8, nodeValue_Rotation_Range("Angle range", self, [ 0, 180 ])); - inputs[9] = nodeValue_Float("Corner radius", self, 0) + newInput(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; @@ -81,19 +81,19 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con newInput(12, nodeValue_Bool("Height", self, false)); - inputs[13] = nodeValue_Float("Start radius", self, 0.1) + newInput(13, nodeValue_Float("Start radius", self, 0.1)) .setDisplay(VALUE_DISPLAY.slider) .setVisible(false); - inputs[14] = nodeValue_PathNode("Shape path", self, noone) + newInput(14, nodeValue_PathNode("Shape path", self, noone)) .setVisible(true, true); - inputs[15] = nodeValue_Enum_Scroll("Positioning Mode", self, 0, [ "Area", "Center + Scale", "Full Image" ]) + newInput(15, nodeValue_Enum_Scroll("Positioning Mode", self, 0, [ "Area", "Center + Scale", "Full Image" ])) - inputs[16] = nodeValue_Vec2("Center", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ] ) + newInput(16, nodeValue_Vec2("Center", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ] )) .setUnitRef(onSurfaceSize); - inputs[17] = nodeValue_Vec2("Half Size", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ] ) + newInput(17, nodeValue_Vec2("Half Size", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ] )) .setUnitRef(onSurfaceSize); newInput(18, nodeValue_Bool("Tile", self, false)); @@ -104,7 +104,7 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con newInput(21, nodeValue_Slider_Range("Angles", self, [ 0.5, 1.0 ])); - inputs[22] = nodeValue_Float("Skew", self, 0.5 ) + newInput(22, nodeValue_Float("Skew", self, 0.5 )) .setDisplay(VALUE_DISPLAY.slider); newInput(23, nodeValue_Slider_Range("Arrow Sizes", self, [ 0.2, 0.3 ] )); diff --git a/scripts/node_shape_map/node_shape_map.gml b/scripts/node_shape_map/node_shape_map.gml index 5158abdb6..334b0fe80 100644 --- a/scripts/node_shape_map/node_shape_map.gml +++ b/scripts/node_shape_map/node_shape_map.gml @@ -15,7 +15,7 @@ function Node_Shape_Map(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(5, nodeValue_Int("Sides", self, 4)); - inputs[6] = nodeValue_Float("Scale", self, 1) + newInput(6, nodeValue_Float("Scale", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); newInput(7, nodeValue_Rotation("Angle", self, 0)); diff --git a/scripts/node_shape_polygon/node_shape_polygon.gml b/scripts/node_shape_polygon/node_shape_polygon.gml index 78b37d304..9e626a75a 100644 --- a/scripts/node_shape_polygon/node_shape_polygon.gml +++ b/scripts/node_shape_polygon/node_shape_polygon.gml @@ -16,37 +16,37 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr newInput(4, nodeValue_Enum_Scroll("Shape", self, 0, shapesArray)); - inputs[5] = nodeValue_Vec2("Position", self, [ 0.5, 0.5 ]) + newInput(5, nodeValue_Vec2("Position", self, [ 0.5, 0.5 ])) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); newInput(6, nodeValue_Rotation("Rotation", self, 0)); - inputs[7] = nodeValue_Vec2("Scale", self, [ 0.5, 0.5 ]) + newInput(7, nodeValue_Vec2("Scale", self, [ 0.5, 0.5 ])) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[8] = nodeValue_Int("Sides", self, 16) + newInput(8, nodeValue_Int("Sides", self, 16)) .setDisplay(VALUE_DISPLAY.slider, { range: [2, 64, 0.1] }); - inputs[9] = nodeValue_Float("Inner radius", self, 0.5) + newInput(9, nodeValue_Float("Inner radius", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider); - inputs[10] = nodeValue_Float("Radius", self, 0.5) + newInput(10, nodeValue_Float("Radius", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider); - inputs[11] = nodeValue_Int("Teeth", self, 6) + newInput(11, nodeValue_Int("Teeth", self, 6)) .setDisplay(VALUE_DISPLAY.slider, { range: [3, 16, 0.1] }); - inputs[12] = nodeValue_Float("Teeth height", self, 0.2) + newInput(12, nodeValue_Float("Teeth height", self, 0.2)) .setDisplay(VALUE_DISPLAY.slider); - inputs[13] = nodeValue_Float("Teeth taper", self, 0) + newInput(13, nodeValue_Float("Teeth taper", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [-0.5, 0.5, 0.01] }); newInput(14, nodeValue_Rotation_Range("Angle range", self, [ 0, 360 ])); newInput(15, nodeValue_Bool("Round cap", self, false)); - inputs[16] = nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone) + newInput(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); diff --git a/scripts/node_shard_noise/node_shard_noise.gml b/scripts/node_shard_noise/node_shard_noise.gml index 4e0d043d5..650586ab2 100644 --- a/scripts/node_shard_noise/node_shard_noise.gml +++ b/scripts/node_shard_noise/node_shard_noise.gml @@ -2,24 +2,24 @@ function Node_Shard_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y name = "Shard Noise"; shader = sh_noise_shard; - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[2] = nodeValue_Vec2("Scale", self, [ 4, 4 ]) + newInput(2, nodeValue_Vec2("Scale", self, [ 4, 4 ])) .setMappable(6); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) + newInput(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) + newInput(5, nodeValue_Float("Progress", self, 0)) .setMappable(8); addShaderProp(SHADER_UNIFORM.float, "progress") diff --git a/scripts/node_skew/node_skew.gml b/scripts/node_skew/node_skew.gml index e01700975..571c5bc5c 100644 --- a/scripts/node_skew/node_skew.gml +++ b/scripts/node_skew/node_skew.gml @@ -4,22 +4,20 @@ function Node_Skew(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[0] = nodeValue_Surface("Surface in", self); inputs[1] = nodeValue_Enum_Button("Axis", self, 0, ["x", "y"]); - inputs[2] = nodeValue_Float("Strength", self, 0) + newInput(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[4] = nodeValue_Vec2("Center", self, [0, 0] , { side_button : button(function() { centerAnchor(); }) - .setIcon(THEME.anchor) - .setTooltip(__txt("Set to center")) }); + newInput(4, nodeValue_Vec2("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" ]) + newInput(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[7] = nodeValue_Float("Mix", self, 1) + newInput(7, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); inputs[8] = nodeValue_Bool("Active", self, true); diff --git a/scripts/node_smear/node_smear.gml b/scripts/node_smear/node_smear.gml index 9cf2b1ae6..2cc9d0000 100644 --- a/scripts/node_smear/node_smear.gml +++ b/scripts/node_smear/node_smear.gml @@ -3,16 +3,16 @@ function Node_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("Strength", self, 0.2) + newInput(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) + newInput(2, nodeValue_Rotation("Direction", self, 0)) .setMappable(10); newInput(3, nodeValue_Surface("Mask", self)); - inputs[4] = nodeValue_Float("Mix", self, 1) + newInput(4, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(5, nodeValue_Bool("Active", self, true)); @@ -34,7 +34,7 @@ function Node_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con newInput(12, nodeValue_Enum_Button("Modulate strength", self, 0, [ "Distance", "Color", "None" ])); - inputs[13] = nodeValue_Int("Spread", self, 0) + newInput(13, nodeValue_Int("Spread", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range : [ 0, 30, 1 ] }); newInput(14, nodeValue_Bool("Invert", self, false)); diff --git a/scripts/node_smoke_add/node_smoke_add.gml b/scripts/node_smoke_add/node_smoke_add.gml index 0e487eb14..0a31c367c 100644 --- a/scripts/node_smoke_add/node_smoke_add.gml +++ b/scripts/node_smoke_add/node_smoke_add.gml @@ -6,7 +6,7 @@ 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) + newInput(0, nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone)) .setVisible(true, true); newInput(1, nodeValue_Surface("Fluid brush", self)); @@ -15,10 +15,10 @@ function Node_Smoke_Add(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) con newInput(3, nodeValue_Bool("Active", self, true)); - inputs[4] = nodeValue_Float("Inherit velocity", self, 0) + newInput(4, nodeValue_Float("Inherit velocity", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); - inputs[5] = nodeValue_Float("Density", self, 1) + newInput(5, nodeValue_Float("Density", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(6, nodeValue_Int("Expand velocity mask", self, 0)); 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 796c56715..92b88635d 100644 --- a/scripts/node_smoke_add_collider/node_smoke_add_collider.gml +++ b/scripts/node_smoke_add_collider/node_smoke_add_collider.gml @@ -5,7 +5,7 @@ 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) + newInput(0, nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone)) .setVisible(true, true); newInput(1, nodeValue_Surface("Collider", self)); 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 380d055e2..80324c884 100644 --- a/scripts/node_smoke_apply_velocity/node_smoke_apply_velocity.gml +++ b/scripts/node_smoke_apply_velocity/node_smoke_apply_velocity.gml @@ -4,7 +4,7 @@ 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) + newInput(0, nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone)) .setVisible(true, true); newInput(1, nodeValue_Surface("Brush", self)); diff --git a/scripts/node_smoke_domain/node_smoke_domain.gml b/scripts/node_smoke_domain/node_smoke_domain.gml index ee91b9bb2..644e285c1 100644 --- a/scripts/node_smoke_domain/node_smoke_domain.gml +++ b/scripts/node_smoke_domain/node_smoke_domain.gml @@ -11,25 +11,25 @@ function Node_Smoke_Domain(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) newInput(2, nodeValue_Enum_Button("Material dissipation type", self, 1, [ "Multiply", "Subtract" ])); - inputs[3] = nodeValue_Float("Material dissipation", self, 0.02) + newInput(3, nodeValue_Float("Material dissipation", self, 0.02)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.01 ] }); newInput(4, nodeValue_Enum_Button("Velocity dissipation type", self, 1, [ "Multiply", "Subtract" ])); - inputs[5] = nodeValue_Float("Velocity dissipation", self, 0.00) + newInput(5, nodeValue_Float("Velocity dissipation", self, 0.00)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.01 ] }); newInput(6, nodeValue_Vec2("Acceleration", self, [ 0, 0 ])); newInput(7, nodeValue_Vec2("Material intertia", self, [ 1, -0.2 ])); - inputs[8] = nodeValue_Float("Initial pressure", self, 0.75) + newInput(8, nodeValue_Float("Initial pressure", self, 0.75)) .setDisplay(VALUE_DISPLAY.slider); - inputs[9] = nodeValue_Float("Material Maccormack weight", self, 1) + newInput(9, nodeValue_Float("Material Maccormack weight", self, 1)) .setDisplay(VALUE_DISPLAY.slider); - inputs[10] = nodeValue_Float("Velocity Maccormack weight", self, 0) + newInput(10, nodeValue_Float("Velocity Maccormack weight", self, 0)) .setDisplay(VALUE_DISPLAY.slider); newInput(11, nodeValue_Bool("Wrap", self, false)); 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 1f265090d..c7563a007 100644 --- a/scripts/node_smoke_domain_queue/node_smoke_domain_queue.gml +++ b/scripts/node_smoke_domain_queue/node_smoke_domain_queue.gml @@ -9,7 +9,7 @@ function Node_Smoke_Domain_Queue(_x, _y, _group = noone) : Node_Smoke(_x, _y, _g static createNewInput = function() { var index = array_length(inputs); - inputs[index] = nodeValue("Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone ) + newInput(index, nodeValue("Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone )) .setVisible(true, true); return inputs[index]; diff --git a/scripts/node_smoke_group/node_smoke_group.gml b/scripts/node_smoke_group/node_smoke_group.gml index ce2f7f788..24d1bb364 100644 --- a/scripts/node_smoke_group/node_smoke_group.gml +++ b/scripts/node_smoke_group/node_smoke_group.gml @@ -18,25 +18,25 @@ function Node_Smoke_Group(_x, _y, _group = noone) : Node_Collection(_x, _y, _gro newInput(2, nodeValue_Enum_Button("Material dissipation type", self, 1, [ "Multiply", "Subtract" ])); - inputs[3] = nodeValue_Float("Material dissipation", self, 0.02) + newInput(3, nodeValue_Float("Material dissipation", self, 0.02)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.01 ] }); newInput(4, nodeValue_Enum_Button("Velocity dissipation type", self, 1, [ "Multiply", "Subtract" ])); - inputs[5] = nodeValue_Float("Velocity dissipation", self, 0.00) + newInput(5, nodeValue_Float("Velocity dissipation", self, 0.00)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.01 ] }); newInput(6, nodeValue_Vec2("Acceleration", self, [ 0, 0 ])); newInput(7, nodeValue_Vec2("Material intertia", self, [ 1, -0.2 ])); - inputs[8] = nodeValue_Float("Initial pressure", self, 0.75) + newInput(8, nodeValue_Float("Initial pressure", self, 0.75)) .setDisplay(VALUE_DISPLAY.slider); - inputs[9] = nodeValue_Float("Material Maccormack weight", self, 1) + newInput(9, nodeValue_Float("Material Maccormack weight", self, 1)) .setDisplay(VALUE_DISPLAY.slider); - inputs[10] = nodeValue_Float("Velocity Maccormack weight", self, 0) + newInput(10, nodeValue_Float("Velocity Maccormack weight", self, 0)) .setDisplay(VALUE_DISPLAY.slider); newInput(11, nodeValue_Bool("Wrap", self, false)); diff --git a/scripts/node_smoke_render/node_smoke_render.gml b/scripts/node_smoke_render/node_smoke_render.gml index 212688f3c..f4220caf2 100644 --- a/scripts/node_smoke_render/node_smoke_render.gml +++ b/scripts/node_smoke_render/node_smoke_render.gml @@ -6,7 +6,7 @@ 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) + newInput(0, nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone)) .setVisible(true, true); newInput(1, nodeValue_Dimension(self)); 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 d32394ab9..45d36e2ac 100644 --- a/scripts/node_smoke_render_output/node_smoke_render_output.gml +++ b/scripts/node_smoke_render_output/node_smoke_render_output.gml @@ -8,7 +8,7 @@ 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) + newInput(0, nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone)) .setVisible(true, true); newInput(1, nodeValue_Dimension(self)); diff --git a/scripts/node_smoke_repulse/node_smoke_repulse.gml b/scripts/node_smoke_repulse/node_smoke_repulse.gml index 86656ea0e..66827c492 100644 --- a/scripts/node_smoke_repulse/node_smoke_repulse.gml +++ b/scripts/node_smoke_repulse/node_smoke_repulse.gml @@ -4,14 +4,14 @@ 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) + newInput(0, nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone)) .setVisible(true, true); newInput(1, nodeValue_Vec2("Position", self, [0, 0])); newInput(2, nodeValue_Float("Radius", self, 8)); - inputs[3] = nodeValue_Float("Strength", self, 0.10) + newInput(3, nodeValue_Float("Strength", self, 0.10)) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); newInput(4, nodeValue_Enum_Button("Mode", self, 0, [ "Override", "Add" ])); diff --git a/scripts/node_smoke_turbulence/node_smoke_turbulence.gml b/scripts/node_smoke_turbulence/node_smoke_turbulence.gml index 3d12efb96..9417fd089 100644 --- a/scripts/node_smoke_turbulence/node_smoke_turbulence.gml +++ b/scripts/node_smoke_turbulence/node_smoke_turbulence.gml @@ -4,18 +4,18 @@ 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) + newInput(0, nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone)) .setVisible(true, true); newInput(1, nodeValue_Area("Effect area", self, DEF_AREA, { useShape : false })); - inputs[2] = nodeValue_Float("Strength", self, 0.10) + newInput(2, nodeValue_Float("Strength", self, 0.10)) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[3] = nodeValue_Float("Scale", self, 4) + newInput(3, nodeValue_Float("Scale", self, 4)) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.01] }); - inputs[4] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) }); newInput(5, nodeValue_Enum_Button("Mode", self, 0, [ "Override", "Add" ])); diff --git a/scripts/node_smoke_update/node_smoke_update.gml b/scripts/node_smoke_update/node_smoke_update.gml index efe4e3e06..a8da8089b 100644 --- a/scripts/node_smoke_update/node_smoke_update.gml +++ b/scripts/node_smoke_update/node_smoke_update.gml @@ -6,7 +6,7 @@ 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) + newInput(0, nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone)) .setVisible(true, true); newInput(1, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_smoke_vortex/node_smoke_vortex.gml b/scripts/node_smoke_vortex/node_smoke_vortex.gml index 0f087ef9b..44f4ac424 100644 --- a/scripts/node_smoke_vortex/node_smoke_vortex.gml +++ b/scripts/node_smoke_vortex/node_smoke_vortex.gml @@ -4,17 +4,17 @@ 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) + newInput(0, nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone)) .setVisible(true, true); newInput(1, nodeValue_Vec2("Position", self, [0, 0])); newInput(2, nodeValue_Float("Radius", self, 8)); - inputs[3] = nodeValue_Float("Strength", self, 0.10) + newInput(3, nodeValue_Float("Strength", self, 0.10)) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[4] = nodeValue_Float("Attraction", self, 0) + newInput(4, nodeValue_Float("Attraction", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); newInput(5, nodeValue_Enum_Button("Mode", self, 0, [ "Override", "Add" ])); diff --git a/scripts/node_spherize/node_spherize.gml b/scripts/node_spherize/node_spherize.gml index b2da6c011..d27a913d1 100644 --- a/scripts/node_spherize/node_spherize.gml +++ b/scripts/node_spherize/node_spherize.gml @@ -3,23 +3,23 @@ function Node_Spherize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Vec2("Center", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ]) + newInput(1, nodeValue_Vec2("Center", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ])) .setUnitRef(function(index) { return getDimension(index); }); - inputs[2] = nodeValue_Float("Strength", self, 1) + newInput(2, nodeValue_Float("Strength", self, 1)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(11); - inputs[3] = nodeValue_Float("Radius", self, 0.2) + newInput(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" ]) + newInput(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."); newInput(5, nodeValue_Surface("Mask", self)); - inputs[6] = nodeValue_Float("Mix", self, 1) + newInput(6, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(7, nodeValue_Bool("Active", self, true)); @@ -31,15 +31,15 @@ function Node_Spherize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[11] = nodeValue_Surface("Strength map", self) + newInput(11, nodeValue_Surface("Strength map", self)) .setVisible(false, false); - inputs[12] = nodeValue_Surface("Radius map", self) + newInput(12, nodeValue_Surface("Radius map", self)) .setVisible(false, false); ////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[13] = nodeValue_Float("Trim edge", self, 0) + newInput(13, nodeValue_Float("Trim edge", self, 0)) .setDisplay(VALUE_DISPLAY.slider) outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_sprite_stack/node_sprite_stack.gml b/scripts/node_sprite_stack/node_sprite_stack.gml index 5807169bd..1cedffb8b 100644 --- a/scripts/node_sprite_stack/node_sprite_stack.gml +++ b/scripts/node_sprite_stack/node_sprite_stack.gml @@ -10,14 +10,14 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(3, nodeValue_Vec2("Stack shift", self, [ 0, 1 ] )); - inputs[4] = nodeValue_Vec2("Position", self, [ 0, 0 ] ) + newInput(4, nodeValue_Vec2("Position", self, [ 0, 0 ] )) .setUnitRef(function(index) { return getDimension(index); }); newInput(5, nodeValue_Rotation("Rotation", self, 0)); newInput(6, nodeValue_Color("Stack blend", self, c_white )); - inputs[7] = nodeValue_Float("Alpha end", self, 1, "Alpha value for the last copy." ) + newInput(7, nodeValue_Float("Alpha end", self, 1, "Alpha value for the last copy." )) .setDisplay(VALUE_DISPLAY.slider); newInput(8, nodeValue_Bool("Move base", self, false, "Make each copy move the original image." )); @@ -26,10 +26,10 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro newInput(10, nodeValue_Color("Highlight color", self, c_white)); - inputs[11] = nodeValue_Float("Highlight alpha", self, 1) + newInput(11, nodeValue_Float("Highlight alpha", self, 1)) .setDisplay(VALUE_DISPLAY.slider); - inputs[12] = nodeValue_Float("Array process", self, 1) + newInput(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); diff --git a/scripts/node_stack/node_stack.gml b/scripts/node_stack/node_stack.gml index 15dda4e2d..2d2e74bc8 100644 --- a/scripts/node_stack/node_stack.gml +++ b/scripts/node_stack/node_stack.gml @@ -6,13 +6,13 @@ function Node_Stack(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { new scrollItem("On top", s_node_alignment, 3), ]) .rejectArray(); - inputs[1] = nodeValue_Enum_Button("Align", self, 1, [ "Start", "Middle", "End"]) + newInput(1, nodeValue_Enum_Button("Align", self, 1, [ "Start", "Middle", "End"])) .rejectArray(); - inputs[2] = nodeValue_Int("Spacing", self, 0) + newInput(2, nodeValue_Int("Spacing", self, 0)) .rejectArray(); - inputs[3] = nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ]) + newInput(3, nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ])) .rejectArray(); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); @@ -23,7 +23,7 @@ function Node_Stack(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static createNewInput = function() { var index = array_length(inputs); - inputs[index] = nodeValue_Surface("Input", self) + newInput(index, nodeValue_Surface("Input", self)) .setVisible(true, true); return inputs[index]; diff --git a/scripts/node_statistic/node_statistic.gml b/scripts/node_statistic/node_statistic.gml index 6622e2af6..95bdd642a 100644 --- a/scripts/node_statistic/node_statistic.gml +++ b/scripts/node_statistic/node_statistic.gml @@ -30,12 +30,12 @@ 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" ]) + newInput(0, nodeValue_Enum_Scroll("Type", self, 0, [ "Sum", "Mean", "Median", "Max", "Min" ])) .rejectArray(); static createNewInput = function() { var index = array_length(inputs); - inputs[index] = nodeValue_Float("Input", self, -1 ) + newInput(index, nodeValue_Float("Input", self, -1 )) .setVisible(false, true); return inputs[index]; diff --git a/scripts/node_strand_break/node_strand_break.gml b/scripts/node_strand_break/node_strand_break.gml index fe68df55c..6b45fa656 100644 --- a/scripts/node_strand_break/node_strand_break.gml +++ b/scripts/node_strand_break/node_strand_break.gml @@ -6,10 +6,10 @@ 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) + newInput(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)) + newInput(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, diff --git a/scripts/node_strand_collision/node_strand_collision.gml b/scripts/node_strand_collision/node_strand_collision.gml index ef6a19140..35074099e 100644 --- a/scripts/node_strand_collision/node_strand_collision.gml +++ b/scripts/node_strand_collision/node_strand_collision.gml @@ -6,10 +6,10 @@ 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) + newInput(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) + newInput(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); diff --git a/scripts/node_strand_create/node_strand_create.gml b/scripts/node_strand_create/node_strand_create.gml index bd316dcc6..35681ee60 100644 --- a/scripts/node_strand_create/node_strand_create.gml +++ b/scripts/node_strand_create/node_strand_create.gml @@ -15,7 +15,7 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const newInput(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.") + newInput(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); newInput(5, nodeValue_PathNode("Path", self, noone)); @@ -24,25 +24,25 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const newInput(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.") + newInput(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.") + newInput(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)) + newInput(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) }); newInput(11, nodeValue_Float("Curl frequency", self, 0)); - inputs[12] = nodeValue_Float("Curliness", self, 1) + newInput(12, nodeValue_Float("Curliness", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(13, nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone)); newInput(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.") + newInput(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) @@ -52,7 +52,7 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const newInput(16, nodeValue_Bool("View fix hair", self, false)); - inputs[17] = nodeValue_Vec2("Root strength", self, [-1, -1]) + newInput(17, nodeValue_Vec2("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); 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 451a9878a..27d48df86 100644 --- a/scripts/node_strand_force_apply/node_strand_force_apply.gml +++ b/scripts/node_strand_force_apply/node_strand_force_apply.gml @@ -6,12 +6,12 @@ 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) + newInput(input_fix_len + 0, nodeValue_Float("Strength", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 5, 0.01 ] }); newInput(input_fix_len + 1, nodeValue_Float("Turbulence", self, 0)); - inputs[input_fix_len + 2] = nodeValue_Int("Seed", self, seed_random(6)) + newInput(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) }); newInput(input_fix_len + 3, nodeValue_Float("Turbulence frequency", self, 0.5)); diff --git a/scripts/node_strand_gravity/node_strand_gravity.gml b/scripts/node_strand_gravity/node_strand_gravity.gml index 3e9db3d4d..cb9c8c6c7 100644 --- a/scripts/node_strand_gravity/node_strand_gravity.gml +++ b/scripts/node_strand_gravity/node_strand_gravity.gml @@ -6,7 +6,7 @@ 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) + newInput(0, nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone)) .setVisible(true, true); newInput(1, nodeValue_Float("Gravity", self, 1)); 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 c3409c5d0..1f9553d50 100644 --- a/scripts/node_strand_length_adjust/node_strand_length_adjust.gml +++ b/scripts/node_strand_length_adjust/node_strand_length_adjust.gml @@ -8,7 +8,7 @@ function Node_Strand_Length_Adjust(_x, _y, _group = noone) : _Node_Strand_Affect newInput(input_fix_len + 0, nodeValue_Enum_Button("Type", self, 0, [ "Increase", "Decrease" ])); - inputs[input_fix_len + 1] = nodeValue_Float("Strength", self, 0.1) + newInput(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 93db5c7de..8adc52109 100644 --- a/scripts/node_strand_render/node_strand_render.gml +++ b/scripts/node_strand_render/node_strand_render.gml @@ -8,7 +8,7 @@ function Node_Strand_Render(_x, _y, _group = noone) : Node(_x, _y, _group) const newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone) + newInput(1, nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone)) .setVisible(true, true); newInput(2, nodeValue_Range("Thickness", self, [ 1, 1 ], { linked : true })); @@ -19,7 +19,7 @@ function Node_Strand_Render(_x, _y, _group = noone) : Node(_x, _y, _group) const newInput(5, nodeValue_Gradient("Color over length", self, new gradientObject(cola(c_white)))); - inputs[6] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) }); newInput(7, nodeValue_Float("Child", self, 0, "Render extra strands between the real strands.")); 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 6d0daa218..eec9dae62 100644 --- a/scripts/node_strand_render_texture/node_strand_render_texture.gml +++ b/scripts/node_strand_render_texture/node_strand_render_texture.gml @@ -8,7 +8,7 @@ function Node_Strand_Render_Texture(_x, _y, _group = noone) : Node(_x, _y, _grou newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone) + newInput(1, nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone)) .setVisible(true, true); newInput(2, nodeValue_Range("Thickness", self, [ 8, 8 ], { linked : true })); @@ -17,7 +17,7 @@ function Node_Strand_Render_Texture(_x, _y, _group = noone) : Node(_x, _y, _grou newInput(4, nodeValue_Surface("Texture", self)); - inputs[5] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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); diff --git a/scripts/node_strand_update/node_strand_update.gml b/scripts/node_strand_update/node_strand_update.gml index 707d96ef2..d66188a4f 100644 --- a/scripts/node_strand_update/node_strand_update.gml +++ b/scripts/node_strand_update/node_strand_update.gml @@ -6,10 +6,10 @@ 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) + newInput(0, nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone)) .setVisible(true, true); - inputs[1] = nodeValue_Int("Step", self, 4) + newInput(1, nodeValue_Int("Step", self, 4)) outputs[0] = nodeValue_Output("Strand", self, VALUE_TYPE.strands, noone); 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 bc6e8b8ed..2fc9b29ca 100644 --- a/scripts/node_string_get_char/node_string_get_char.gml +++ b/scripts/node_string_get_char/node_string_get_char.gml @@ -2,7 +2,7 @@ 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, "") + newInput(0, nodeValue_Text("Text", self, "")) .setVisible(true, true); newInput(1, nodeValue_Int("Index", self, 1)); diff --git a/scripts/node_string_join/node_string_join.gml b/scripts/node_string_join/node_string_join.gml index 787709e1a..9e4dad7ec 100644 --- a/scripts/node_string_join/node_string_join.gml +++ b/scripts/node_string_join/node_string_join.gml @@ -3,10 +3,10 @@ function Node_String_Join(_x, _y, _group = noone) : Node(_x, _y, _group) constru setDimension(96, 48); - inputs[0] = nodeValue_Text("Text array", self, []) + newInput(0, nodeValue_Text("Text array", self, [])) .setVisible(true, true); - inputs[1] = nodeValue_Text("Divider", self, "") + newInput(1, nodeValue_Text("Divider", self, "")) .rejectArray(); inputs[1].editWidget.format = TEXT_AREA_FORMAT.delimiter; diff --git a/scripts/node_string_length/node_string_length.gml b/scripts/node_string_length/node_string_length.gml index 30b24cae9..251d4ff64 100644 --- a/scripts/node_string_length/node_string_length.gml +++ b/scripts/node_string_length/node_string_length.gml @@ -3,7 +3,7 @@ function Node_String_Length(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr setDimension(96, 48); - inputs[0] = nodeValue_Text("Text", self, "") + newInput(0, nodeValue_Text("Text", self, "")) .setVisible(true, true); newInput(1, nodeValue_Enum_Scroll("Mode", self, 0, ["Character", "Word"])); diff --git a/scripts/node_string_merge/node_string_merge.gml b/scripts/node_string_merge/node_string_merge.gml index 07b3152bf..2ebbc3854 100644 --- a/scripts/node_string_merge/node_string_merge.gml +++ b/scripts/node_string_merge/node_string_merge.gml @@ -8,7 +8,7 @@ function Node_String_Merge(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro static createNewInput = function() { var index = array_length(inputs); - inputs[index] = nodeValue_Text("Text", self, "" ) + newInput(index, nodeValue_Text("Text", self, "" )) .setVisible(true, true); return inputs[index]; 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 cc85ece86..c6a48eae7 100644 --- a/scripts/node_string_regex_match/node_string_regex_match.gml +++ b/scripts/node_string_regex_match/node_string_regex_match.gml @@ -3,7 +3,7 @@ function Node_String_Regex_Match(_x, _y, _group = noone) : Node_Processor(_x, _y setDimension(96, 48); - inputs[0] = nodeValue_Text("Text", self, "") + newInput(0, nodeValue_Text("Text", self, "")) .setVisible(true, true); newInput(1, nodeValue_Text("Regex", self, "")); 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 4197159e8..74a93750a 100644 --- a/scripts/node_string_regex_replace/node_string_regex_replace.gml +++ b/scripts/node_string_regex_replace/node_string_regex_replace.gml @@ -3,7 +3,7 @@ function Node_String_Regex_Replace(_x, _y, _group = noone) : Node_Processor(_x, setDimension(96, 48); - inputs[0] = nodeValue_Text("Text", self, "") + newInput(0, nodeValue_Text("Text", self, "")) .setVisible(true, true); newInput(1, nodeValue_Text("Regex", self, "")); 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 db0ca401d..fe2775ffa 100644 --- a/scripts/node_string_regex_search/node_string_regex_search.gml +++ b/scripts/node_string_regex_search/node_string_regex_search.gml @@ -3,7 +3,7 @@ function Node_String_Regex_Search(_x, _y, _group = noone) : Node_Processor(_x, _ setDimension(96, 48); - inputs[0] = nodeValue_Text("Text", self, "") + newInput(0, nodeValue_Text("Text", self, "")) .setVisible(true, true); newInput(1, nodeValue_Text("Regex", self, "")); diff --git a/scripts/node_string_split/node_string_split.gml b/scripts/node_string_split/node_string_split.gml index f885e533f..117bce425 100644 --- a/scripts/node_string_split/node_string_split.gml +++ b/scripts/node_string_split/node_string_split.gml @@ -2,7 +2,7 @@ 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, "") + newInput(0, nodeValue_Text("Text", self, "")) .setVisible(true, true); newInput(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; diff --git a/scripts/node_string_trim/node_string_trim.gml b/scripts/node_string_trim/node_string_trim.gml index 91d7d6fbf..c3f1adbb5 100644 --- a/scripts/node_string_trim/node_string_trim.gml +++ b/scripts/node_string_trim/node_string_trim.gml @@ -3,7 +3,7 @@ function Node_String_Trim(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou setDimension(96, 48); - inputs[0] = nodeValue_Text("Text", self, "") + newInput(0, nodeValue_Text("Text", self, "")) .setVisible(true, true); newInput(1, nodeValue_Int("Head", self, 0)); @@ -12,7 +12,7 @@ function Node_String_Trim(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(3, nodeValue_Enum_Scroll("Trim", self, 0, ["Character", "Word"])); - inputs[4] = nodeValue_Enum_Scroll("Mode", self, 0, ["Counter", "Progress"]) + newInput(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, ""); diff --git a/scripts/node_stripe/node_stripe.gml b/scripts/node_stripe/node_stripe.gml index 918a65cc4..f3d8532ab 100644 --- a/scripts/node_stripe/node_stripe.gml +++ b/scripts/node_stripe/node_stripe.gml @@ -3,32 +3,32 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Float("Amount", self, 1) + newInput(1, nodeValue_Float("Amount", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }) .setMappable(11); - inputs[2] = nodeValue_Rotation("Angle", self, 0) + newInput(2, nodeValue_Rotation("Angle", self, 0)) .setMappable(12); newInput(3, nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ])); - inputs[4] = nodeValue_Vec2("Position", self, [ 0, 0 ] ) + newInput(4, nodeValue_Vec2("Position", self, [ 0, 0 ] )) .setUnitRef(function(index) { return getDimension(index); }); - inputs[5] = nodeValue_Float("Random", self, 0) + newInput(5, nodeValue_Float("Random", self, 0)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(13); newInput(6, nodeValue_Enum_Button("Coloring", self, 0, [ "Alternate", "Palette", "Random" ])); - inputs[7] = nodeValue_Gradient("Colors", self, new gradientObject(cola(c_white))) + newInput(7, nodeValue_Gradient("Colors", self, new gradientObject(cola(c_white)))) .setMappable(15); newInput(8, nodeValue_Color("Color 1", self, c_white)); newInput(9, nodeValue_Color("Color 2", self, c_black)); - inputs[10] = nodeValue_Float("Strip ratio", self, 0.5) + newInput(10, nodeValue_Float("Strip ratio", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(14); @@ -48,7 +48,7 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[17] = nodeValue_Float("Progress", self, 0.5) + newInput(17, nodeValue_Float("Progress", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider); newInput(18, nodeValue_Palette("Colors", self, [ c_black, c_white ] )); diff --git a/scripts/node_struct_get/node_struct_get.gml b/scripts/node_struct_get/node_struct_get.gml index 86aa05ec0..51c168d85 100644 --- a/scripts/node_struct_get/node_struct_get.gml +++ b/scripts/node_struct_get/node_struct_get.gml @@ -3,7 +3,7 @@ function Node_Struct_Get(_x, _y, _group = noone) : Node(_x, _y, _group) construc setDimension(96, 48); - inputs[0] = nodeValue_Struct("Struct", self, {}) + newInput(0, nodeValue_Struct("Struct", self, {})) .setVisible(true, true); newInput(1, nodeValue_Text("Key", self, "")); 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 3a5dc26e8..5935ece23 100644 --- a/scripts/node_struct_json_parse/node_struct_json_parse.gml +++ b/scripts/node_struct_json_parse/node_struct_json_parse.gml @@ -2,7 +2,7 @@ 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) + newInput(0, nodeValue_Text("JSON string", self, 0)) .setVisible(true, true); outputs[0] = nodeValue_Output("Struct", self, VALUE_TYPE.struct, {} ); diff --git a/scripts/node_struct_set/node_struct_set.gml b/scripts/node_struct_set/node_struct_set.gml index f3538d339..2ebd8e35d 100644 --- a/scripts/node_struct_set/node_struct_set.gml +++ b/scripts/node_struct_set/node_struct_set.gml @@ -3,7 +3,7 @@ function Node_Struct_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construc setDimension(96, 48); - inputs[0] = nodeValue_Struct("Struct", self, {}) + newInput(0, nodeValue_Struct("Struct", self, {})) .setVisible(true, true); newInput(1, nodeValue_Text("Key", self, "")); 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 9335fc037..8d5d6c3f9 100644 --- a/scripts/node_surface_from_buffer/node_surface_from_buffer.gml +++ b/scripts/node_surface_from_buffer/node_surface_from_buffer.gml @@ -1,7 +1,7 @@ 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) + newInput(0, nodeValue_Buffer("Buffer", self, noone)) .setVisible(true, true); outputs[0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_surface_replace/node_surface_replace.gml b/scripts/node_surface_replace/node_surface_replace.gml index 4213daa85..af4ebdeca 100644 --- a/scripts/node_surface_replace/node_surface_replace.gml +++ b/scripts/node_surface_replace/node_surface_replace.gml @@ -3,28 +3,28 @@ function Node_Surface_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _ newInput(0, nodeValue_Surface("Base Image", self)); - inputs[1] = nodeValue_Surface("Target Image", self) + newInput(1, nodeValue_Surface("Target Image", self)) .setArrayDepth(1); - inputs[2] = nodeValue_Surface("Replacement Image", self) + newInput(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." ) + newInput(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); newInput(4, nodeValue_Bool("Draw Base Image", self, true )); newInput(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." ) + newInput(6, nodeValue_Float("Pixel Threshold", self, 0.1, "How many pixel need to me matched to replace with replacement image." )) .setDisplay(VALUE_DISPLAY.slider); newInput(7, nodeValue_Enum_Scroll("Array mode", self, 0, { data: [ "Match index", "Randomized" ], update_hover: false })); - inputs[8] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) + newInput(9, nodeValue_Bool("Replace Empty", self, false)) outputs[0] = nodeValue_Output("Surface Out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_svg/node_svg.gml b/scripts/node_svg/node_svg.gml index b8387b8d8..b6e3f0026 100644 --- a/scripts/node_svg/node_svg.gml +++ b/scripts/node_svg/node_svg.gml @@ -11,7 +11,7 @@ function Node_SVG(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "SVG"; color = COLORS.node_blend_input; - inputs[0] = nodeValue_Path("Path", self, "") + newInput(0, nodeValue_Path("Path", self, "")) .setDisplay(VALUE_DISPLAY.path_load, { filter: "Scalable Vector Graphics|*.svg" }); newInput(1, nodeValue_Float("Scale", self, 1)); diff --git a/scripts/node_switch/node_switch.gml b/scripts/node_switch/node_switch.gml index 735991f6a..fc7990222 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, "" ) + newInput(0, nodeValue_Text("Index", self, "" )) .setVisible(true, true) .rejectArray(); - inputs[1] = nodeValue("Default value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0 ) + newInput(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 diff --git a/scripts/node_text/node_text.gml b/scripts/node_text/node_text.gml index 0db116187..95975de07 100644 --- a/scripts/node_text/node_text.gml +++ b/scripts/node_text/node_text.gml @@ -2,10 +2,10 @@ 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, "") + newInput(0, nodeValue_Text("Text", self, "")) .setVisible(true, true); - inputs[1] = nodeValue_Text("Font", self, "") + newInput(1, nodeValue_Text("Font", self, "")) .setDisplay(VALUE_DISPLAY.path_font); newInput(2, nodeValue_Int("Size", self, 16)); @@ -16,7 +16,7 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons newInput(5, nodeValue_Color("Color", self, c_white)); - inputs[6] = nodeValue_Vec2("Fixed dimension", self, DEF_SURF ) + newInput(6, nodeValue_Vec2("Fixed dimension", self, DEF_SURF )) .setVisible(true, false); newInput(7, nodeValue_Enum_Button("Horizontal alignment", self, 0 , [ THEME.inspector_text_halign, THEME.inspector_text_halign, THEME.inspector_text_halign])); @@ -31,7 +31,7 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons newInput(12, nodeValue_Float("Line height", self, 0)); - inputs[13] = nodeValue_PathNode("Path", self, noone) + newInput(13, nodeValue_PathNode("Path", self, noone)) .setVisible(true, true); newInput(14, nodeValue_Float("Path shift", self, 0)); @@ -50,7 +50,7 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons newInput(21, nodeValue_Rotation("Wave phase", self, 0)); - inputs[22] = nodeValue_Float("Wave shape", self, 0) + newInput(22, nodeValue_Float("Wave shape", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 3, 0.01 ] }); newInput(23, nodeValue_Bool("Typewriter", self, false)); 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 1510ea8f0..2d2e76755 100644 --- a/scripts/node_text_file_read/node_text_file_read.gml +++ b/scripts/node_text_file_read/node_text_file_read.gml @@ -29,7 +29,7 @@ function Node_Text_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons w = 128; - inputs[0] = nodeValue_Path("Path", self, "") + newInput(0, nodeValue_Path("Path", self, "")) .setDisplay(VALUE_DISPLAY.path_load, { filter: "any file|*" }) .rejectArray(); 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 41b5cf018..bf115d214 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_Path("Path", self, "") + newInput(0, nodeValue_Path("Path", self, "")) .setDisplay(VALUE_DISPLAY.path_save, { filter: "text file|*.txt" }) .rejectArray(); - inputs[1] = nodeValue_Text("Content", self, "") + newInput(1, nodeValue_Text("Content", self, "")) .setVisible(true, true); static writeFile = function() { diff --git a/scripts/node_threshold/node_threshold.gml b/scripts/node_threshold/node_threshold.gml index f8e5ca242..e1ff2f762 100644 --- a/scripts/node_threshold/node_threshold.gml +++ b/scripts/node_threshold/node_threshold.gml @@ -5,16 +5,16 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(1, nodeValue_Bool("Brightness", self, false)); - inputs[2] = nodeValue_Float("Brightness Threshold", self, 0.5) + newInput(2, nodeValue_Float("Brightness Threshold", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(13); - inputs[3] = nodeValue_Float("Brightness Smoothness", self, 0) + newInput(3, nodeValue_Float("Brightness Smoothness", self, 0)) .setDisplay(VALUE_DISPLAY.slider); newInput(4, nodeValue_Surface("Mask", self)); - inputs[5] = nodeValue_Float("Mix", self, 1) + newInput(5, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(6, nodeValue_Bool("Active", self, true)); @@ -22,11 +22,11 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(7, nodeValue_Bool("Alpha", self, false)); - inputs[8] = nodeValue_Float("Alpha Threshold", self, 0.5) + newInput(8, nodeValue_Float("Alpha Threshold", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider) .setMappable(14); - inputs[9] = nodeValue_Float("Alpha Smoothness", self, 0) + newInput(9, nodeValue_Float("Alpha Smoothness", self, 0)) .setDisplay(VALUE_DISPLAY.slider); newInput(10, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); diff --git a/scripts/node_tile_random/node_tile_random.gml b/scripts/node_tile_random/node_tile_random.gml index 7f4fbba45..f11a7c997 100644 --- a/scripts/node_tile_random/node_tile_random.gml +++ b/scripts/node_tile_random/node_tile_random.gml @@ -6,7 +6,7 @@ function Node_Tile_Random(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(1, nodeValue_Dimension(self)); - inputs[2] = nodeValue_Float("Randomness", self, 0.5) + newInput(2, nodeValue_Float("Randomness", self, 0.5)) .setDisplay(VALUE_DISPLAY.slider); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_time_remap/node_time_remap.gml b/scripts/node_time_remap/node_time_remap.gml index e7b76ccd9..f88e11b14 100644 --- a/scripts/node_time_remap/node_time_remap.gml +++ b/scripts/node_time_remap/node_time_remap.gml @@ -8,16 +8,16 @@ 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) + newInput(0, nodeValue_Surface("Surface in", self)) .rejectArray(); - inputs[1] = nodeValue_Surface("Map", self) + newInput(1, nodeValue_Surface("Map", self)) .rejectArray(); - inputs[2] = nodeValue_Int("Max life", self, 3) + newInput(2, nodeValue_Int("Max life", self, 3)) .rejectArray(); - inputs[3] = nodeValue_Bool("Loop", self, false) + newInput(3, nodeValue_Bool("Loop", self, false)) outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_to_number/node_to_number.gml b/scripts/node_to_number/node_to_number.gml index a4574c709..4b7d23837 100644 --- a/scripts/node_to_number/node_to_number.gml +++ b/scripts/node_to_number/node_to_number.gml @@ -4,7 +4,7 @@ function Node_To_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) setDimension(96, 48); - inputs[0] = nodeValue_Text("Text", self, "") + newInput(0, nodeValue_Text("Text", self, "")) .setVisible(true, true); outputs[0] = nodeValue_Output("Number", self, VALUE_TYPE.float, 0); diff --git a/scripts/node_to_text/node_to_text.gml b/scripts/node_to_text/node_to_text.gml index 1cca86658..4c5d4f237 100644 --- a/scripts/node_to_text/node_to_text.gml +++ b/scripts/node_to_text/node_to_text.gml @@ -3,7 +3,7 @@ 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) + newInput(0, nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)) .setVisible(true, true); outputs[0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); diff --git a/scripts/node_tonemap_ace/node_tonemap_ace.gml b/scripts/node_tonemap_ace/node_tonemap_ace.gml index e652580bd..a3ca2fa20 100644 --- a/scripts/node_tonemap_ace/node_tonemap_ace.gml +++ b/scripts/node_tonemap_ace/node_tonemap_ace.gml @@ -5,7 +5,7 @@ function Node_Tonemap_ACE(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(1, nodeValue_Surface("Mask", self)); - inputs[2] = nodeValue_Float("Mix", self, 1) + newInput(2, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(3, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_transform/node_transform.gml b/scripts/node_transform/node_transform.gml index 531e9bee4..afc253a6f 100644 --- a/scripts/node_transform/node_transform.gml +++ b/scripts/node_transform/node_transform.gml @@ -10,13 +10,13 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Vec2("Output dimension", self, [ 1, 1 ]) + newInput(1, nodeValue_Vec2("Output dimension", self, [ 1, 1 ])) .setVisible(false); - inputs[2] = nodeValue_Vec2("Position", self, [ 0.5, 0.5 ]) + newInput(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 ]) + newInput(3, nodeValue_Vec2("Anchor", self, [ 0.5, 0.5 ])) .setDisplay(VALUE_DISPLAY.vector, { side_button : new buttonAnchor(function(ind) { switch(ind) { @@ -43,7 +43,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(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.") + newInput(8, nodeValue_Float("Rotate by velocity", self, 0, "Make the surface rotates to follow its movement.")) .setDisplay(VALUE_DISPLAY.slider); newInput(9, nodeValue_Enum_Scroll("Output dimension type", self, OUTPUT_SCALING.same_as_input, [ "Same as input", "Constant", "Relative to input", "Transformed" ])); @@ -57,7 +57,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(13, nodeValue_Int("Echo amount", self, 8)); - inputs[14] = nodeValue_Float("Alpha", self, 1) + newInput(14, nodeValue_Float("Alpha", self, 1)) .setDisplay(VALUE_DISPLAY.slider); input_display_list = [ 11, 0, diff --git a/scripts/node_transform_array/node_transform_array.gml b/scripts/node_transform_array/node_transform_array.gml index 0f8aec7da..1753918db 100644 --- a/scripts/node_transform_array/node_transform_array.gml +++ b/scripts/node_transform_array/node_transform_array.gml @@ -4,13 +4,13 @@ function Node_Transform_Array(_x, _y, _group = noone) : Node_Processor(_x, _y, _ setDimension(96, 48); - inputs[0] = nodeValue_Vec2("Postion", self, [ 0, 0 ] ) + newInput(0, nodeValue_Vec2("Postion", self, [ 0, 0 ] )) .setVisible(true, true); - inputs[1] = nodeValue_Rotation("Rotation", self, 0) + newInput(1, nodeValue_Rotation("Rotation", self, 0)) .setVisible(true, true); - inputs[2] = nodeValue_Vec2("Scale", self, [ 1, 1 ] ) + newInput(2, nodeValue_Vec2("Scale", self, [ 1, 1 ] )) .setVisible(true, true); outputs[0] = nodeValue_Output("Transform", self, VALUE_TYPE.float, [ 0, 0, 0, 1, 1 ]) diff --git a/scripts/node_trigger/node_trigger.gml b/scripts/node_trigger/node_trigger.gml index 593a64df6..fd202d4ac 100644 --- a/scripts/node_trigger/node_trigger.gml +++ b/scripts/node_trigger/node_trigger.gml @@ -2,7 +2,7 @@ function Node_Trigger(_x, _y, _group = noone) : Node(_x, _y, _group) constructor name = "Trigger"; setDimension(96, 56); - inputs[0] = nodeValue_Trigger("Trigger", self, false ) + newInput(0, nodeValue_Trigger("Trigger", self, false )) .setDisplay(VALUE_DISPLAY.button, { name: "Trigger" }); outputs[0] = nodeValue_Output("Trigger", self, VALUE_TYPE.trigger, false ); diff --git a/scripts/node_tunnel_in/node_tunnel_in.gml b/scripts/node_tunnel_in/node_tunnel_in.gml index 1ed785daa..4f3862003 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 ) + newInput(0, nodeValue_Text("Name", self, tname )) .rejectArray(); - inputs[1] = nodeValue("Value in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, noone ) + newInput(1, nodeValue("Value in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, noone )) .setVisible(true, true); error_notification = noone; diff --git a/scripts/node_tunnel_out/node_tunnel_out.gml b/scripts/node_tunnel_out/node_tunnel_out.gml index 8601c71d6..3d532b479 100644 --- a/scripts/node_tunnel_out/node_tunnel_out.gml +++ b/scripts/node_tunnel_out/node_tunnel_out.gml @@ -18,7 +18,7 @@ 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 ) + newInput(0, nodeValue_Text("Name", self, tname )) .setDisplay(VALUE_DISPLAY.text_tunnel) .rejectArray(); diff --git a/scripts/node_twirl/node_twirl.gml b/scripts/node_twirl/node_twirl.gml index e406dd229..f0fb5b743 100644 --- a/scripts/node_twirl/node_twirl.gml +++ b/scripts/node_twirl/node_twirl.gml @@ -3,22 +3,22 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Vec2("Center", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Center", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); - inputs[2] = nodeValue_Float("Strength", self, 3) + newInput(2, nodeValue_Float("Strength", self, 3)) .setDisplay(VALUE_DISPLAY.slider, { range: [-10, 10, 0.01] }) .setMappable(11); inputs[3] = nodeValue_Float("Radius", self, 16) .setMappable(12); - inputs[4] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + newInput(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."); newInput(5, nodeValue_Surface("Mask", self)); - inputs[6] = nodeValue_Float("Mix", self, 1) + newInput(6, nodeValue_Float("Mix", self, 1)) .setDisplay(VALUE_DISPLAY.slider); newInput(7, nodeValue_Bool("Active", self, true)); @@ -30,10 +30,10 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con //////////////////////////////////////////////////////////////////////////////////////////// - inputs[11] = nodeValue_Surface("Strength map", self) + newInput(11, nodeValue_Surface("Strength map", self)) .setVisible(false, false); - inputs[12] = nodeValue_Surface("Radius map", self) + newInput(12, nodeValue_Surface("Radius map", self)) .setVisible(false, false); //////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_vector2/node_vector2.gml b/scripts/node_vector2/node_vector2.gml index 5eb68ce93..bd925b960 100644 --- a/scripts/node_vector2/node_vector2.gml +++ b/scripts/node_vector2/node_vector2.gml @@ -4,10 +4,10 @@ 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) + newInput(0, nodeValue_Float("x", self, 0)) .setVisible(true, true); - inputs[1] = nodeValue_Float("y", self, 0) + newInput(1, nodeValue_Float("y", self, 0)) .setVisible(true, true); newInput(2, nodeValue_Bool("Integer", self, false)); diff --git a/scripts/node_vector3/node_vector3.gml b/scripts/node_vector3/node_vector3.gml index 85c305ff0..75b908025 100644 --- a/scripts/node_vector3/node_vector3.gml +++ b/scripts/node_vector3/node_vector3.gml @@ -3,13 +3,13 @@ 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) + newInput(0, nodeValue_Float("x", self, 0)) .setVisible(true, true); - inputs[1] = nodeValue_Float("y", self, 0) + newInput(1, nodeValue_Float("y", self, 0)) .setVisible(true, true); - inputs[2] = nodeValue_Float("z", self, 0) + newInput(2, nodeValue_Float("z", self, 0)) .setVisible(true, true); newInput(3, nodeValue_Bool("Integer", self, false)); diff --git a/scripts/node_vector4/node_vector4.gml b/scripts/node_vector4/node_vector4.gml index f56c31624..e2bb06dfb 100644 --- a/scripts/node_vector4/node_vector4.gml +++ b/scripts/node_vector4/node_vector4.gml @@ -3,16 +3,16 @@ 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) + newInput(0, nodeValue_Float("x", self, 0)) .setVisible(true, true); - inputs[1] = nodeValue_Float("y", self, 0) + newInput(1, nodeValue_Float("y", self, 0)) .setVisible(true, true); - inputs[2] = nodeValue_Float("z", self, 0) + newInput(2, nodeValue_Float("z", self, 0)) .setVisible(true, true); - inputs[3] = nodeValue_Float("w", self, 0) + newInput(3, nodeValue_Float("w", self, 0)) .setVisible(true, true); newInput(4, nodeValue_Bool("Integer", self, false)); 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 2854fb161..88524648a 100644 --- a/scripts/node_vector_cross_2D/node_vector_cross_2D.gml +++ b/scripts/node_vector_cross_2D/node_vector_cross_2D.gml @@ -4,10 +4,10 @@ function Node_Vector_Cross_2D(_x, _y, _group = noone) : Node_Processor(_x, _y, _ setDimension(96, 48); - inputs[0] = nodeValue_Vec2("Point 1", self, [ 0, 0 ]) + newInput(0, nodeValue_Vec2("Point 1", self, [ 0, 0 ])) .setVisible(true, true); - inputs[1] = nodeValue_Vec2("Point 2", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Point 2", self, [ 0, 0 ])) .setVisible(true, true); outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.float, 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 32adaa156..f45856e73 100644 --- a/scripts/node_vector_cross_3D/node_vector_cross_3D.gml +++ b/scripts/node_vector_cross_3D/node_vector_cross_3D.gml @@ -4,10 +4,10 @@ function Node_Vector_Cross_3D(_x, _y, _group = noone) : Node_Processor(_x, _y, _ setDimension(96, 48); - inputs[0] = nodeValue_Vec3("Point 1", self, [ 0, 0, 0 ]) + newInput(0, nodeValue_Vec3("Point 1", self, [ 0, 0, 0 ])) .setVisible(true, true); - inputs[1] = nodeValue_Vec3("Point 2", self, [ 0, 0, 0 ]) + newInput(1, nodeValue_Vec3("Point 2", self, [ 0, 0, 0 ])) .setVisible(true, true); outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.float, [ 0, 0, 0 ] ) diff --git a/scripts/node_vector_dot/node_vector_dot.gml b/scripts/node_vector_dot/node_vector_dot.gml index e2c00011c..d2f6b42a2 100644 --- a/scripts/node_vector_dot/node_vector_dot.gml +++ b/scripts/node_vector_dot/node_vector_dot.gml @@ -3,10 +3,10 @@ function Node_Vector_Dot(_x, _y, _group = noone) : Node_Processor(_x, _y, _group color = COLORS.node_blend_number; setDimension(96, 48); - inputs[0] = nodeValue_Vec2("Point 1", self, [ 0, 0 ]) + newInput(0, nodeValue_Vec2("Point 1", self, [ 0, 0 ])) .setVisible(true, true); - inputs[1] = nodeValue_Vec2("Point 2", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Point 2", self, [ 0, 0 ])) .setVisible(true, true); outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.float, 0 ); diff --git a/scripts/node_vector_magnitude/node_vector_magnitude.gml b/scripts/node_vector_magnitude/node_vector_magnitude.gml index 6a130df69..cb624e317 100644 --- a/scripts/node_vector_magnitude/node_vector_magnitude.gml +++ b/scripts/node_vector_magnitude/node_vector_magnitude.gml @@ -3,7 +3,7 @@ function Node_Vector_Magnitude(_x, _y, _group = noone) : Node_Processor(_x, _y, color = COLORS.node_blend_number; setDimension(96, 48); - inputs[0] = nodeValue("Vector", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, []) + newInput(0, nodeValue("Vector", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [])) .setArrayDepth(1) .setVisible(true, true); diff --git a/scripts/node_vector_split/node_vector_split.gml b/scripts/node_vector_split/node_vector_split.gml index 35f3526ab..ad0dbf7d0 100644 --- a/scripts/node_vector_split/node_vector_split.gml +++ b/scripts/node_vector_split/node_vector_split.gml @@ -7,7 +7,7 @@ function Node_Vector_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro draw_padding = 4; - inputs[0] = nodeValue_Vec4("Vector", self, [ 0, 0, 0, 0 ]) + newInput(0, nodeValue_Vec4("Vector", self, [ 0, 0, 0, 0 ])) .setArrayDynamic() .setVisible(true, true); diff --git a/scripts/node_vector_swizzle/node_vector_swizzle.gml b/scripts/node_vector_swizzle/node_vector_swizzle.gml index a46650e4b..f7b040984 100644 --- a/scripts/node_vector_swizzle/node_vector_swizzle.gml +++ b/scripts/node_vector_swizzle/node_vector_swizzle.gml @@ -3,7 +3,7 @@ function Node_Vector_Swizzle(_x, _y, _group = noone) : Node_Processor(_x, _y, _g color = COLORS.node_blend_number; setDimension(96, 48); - inputs[0] = nodeValue("Vector", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, []) + newInput(0, nodeValue("Vector", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [])) .setArrayDepth(1) .setVisible(true, true); diff --git a/scripts/node_vignette/node_vignette.gml b/scripts/node_vignette/node_vignette.gml index 67e6acc7f..bc38e5fad 100644 --- a/scripts/node_vignette/node_vignette.gml +++ b/scripts/node_vignette/node_vignette.gml @@ -8,13 +8,13 @@ function Node_Vignette(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(2, nodeValue_Float("Exposure", self, 15)); - inputs[3] = nodeValue_Float("Strength", self, 1) + newInput(3, nodeValue_Float("Strength", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); - inputs[4] = nodeValue_Float("Exponent", self, 0.25) + newInput(4, nodeValue_Float("Exponent", self, 0.25)) .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_Float("Roundness", self, 0) + newInput(5, nodeValue_Float("Roundness", self, 0)) .setDisplay(VALUE_DISPLAY.slider); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_voronoi_extra/node_voronoi_extra.gml b/scripts/node_voronoi_extra/node_voronoi_extra.gml index 4a970e33f..a47737ba6 100644 --- a/scripts/node_voronoi_extra/node_voronoi_extra.gml +++ b/scripts/node_voronoi_extra/node_voronoi_extra.gml @@ -2,24 +2,24 @@ function Node_Voronoi_Extra(_x, _y, _group = noone) : Node_Shader_Generator(_x, name = "Extra Voronoi"; shader = sh_voronoi_extra; - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); newInput(2, nodeValue_Vec2("Scale", self, [ 4, 4 ])); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) + newInput(4, nodeValue_Float("Progress", self, 0)) addShaderProp(SHADER_UNIFORM.float, "progress"); newInput(5, nodeValue_Enum_Scroll("Mode", self, 0, [ "Block", "Triangle" ])); addShaderProp(SHADER_UNIFORM.integer, "mode"); - inputs[6] = nodeValue_Float("Parameter A", self, 0) + newInput(6, nodeValue_Float("Parameter A", self, 0)) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); addShaderProp(SHADER_UNIFORM.float, "paramA"); diff --git a/scripts/node_warp/node_warp.gml b/scripts/node_warp/node_warp.gml index ba6120398..e79226f2e 100644 --- a/scripts/node_warp/node_warp.gml +++ b/scripts/node_warp/node_warp.gml @@ -3,16 +3,16 @@ function Node_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Vec2("Top left", self, [ 0, 0 ] ) + newInput(1, nodeValue_Vec2("Top left", self, [ 0, 0 ] )) .setUnitRef(function(index) { return getDimension(index); }); - inputs[2] = nodeValue_Vec2("Top right", self, [ DEF_SURF_W, 0 ] ) + newInput(2, nodeValue_Vec2("Top right", self, [ DEF_SURF_W, 0 ] )) .setUnitRef(function(index) { return getDimension(index); }); - inputs[3] = nodeValue_Vec2("Bottom left", self, [ 0, DEF_SURF_H ] ) + newInput(3, nodeValue_Vec2("Bottom left", self, [ 0, DEF_SURF_H ] )) .setUnitRef(function(index) { return getDimension(index); }); - inputs[4] = nodeValue_Vec2("Bottom right", self, DEF_SURF ) + newInput(4, nodeValue_Vec2("Bottom right", self, DEF_SURF )) .setUnitRef(function(index) { return getDimension(index); }); newInput(5, nodeValue_Bool("Active", self, true)); 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 e725075a4..077f0b805 100644 --- a/scripts/node_wav_file_read/node_wav_file_read.gml +++ b/scripts/node_wav_file_read/node_wav_file_read.gml @@ -27,11 +27,11 @@ 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_Path("Path", self, "") + newInput(0, nodeValue_Path("Path", self, "")) .setDisplay(VALUE_DISPLAY.path_load, { filter: "audio|*.wav" }) .rejectArray(); - inputs[1] = nodeValue_Trigger("Sync length", self, false ) + newInput(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)); 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 c13e2448e..b6a141b51 100644 --- a/scripts/node_wav_file_write/node_wav_file_write.gml +++ b/scripts/node_wav_file_write/node_wav_file_write.gml @@ -3,12 +3,12 @@ function Node_WAV_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) cons color = COLORS.node_blend_input; setDimension(, 72); - inputs[0] = nodeValue_Path("Path", self, "") + newInput(0, nodeValue_Path("Path", self, "")) .setDisplay(VALUE_DISPLAY.path_save, { filter: "audio file|*.wav" }) .rejectArray() .setVisible(true); - inputs[1] = nodeValue_Float("Audio Data", self, [[]]) + newInput(1, nodeValue_Float("Audio Data", self, [[]])) .setArrayDepth(1) .setVisible(true, true); @@ -16,7 +16,7 @@ function Node_WAV_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) cons newInput(3, nodeValue_Enum_Scroll("Bit Depth", self, 0, [ "8 bit positive", "16 bit integer" ])); - inputs[4] = nodeValue_Bool("Remap Data", self, false) + newInput(4, nodeValue_Bool("Remap Data", self, false)) newInput(5, nodeValue_Vec2("Data Range", self, [ 0, 1 ])); diff --git a/scripts/node_wavelet_noise/node_wavelet_noise.gml b/scripts/node_wavelet_noise/node_wavelet_noise.gml index bb70cec20..5d638db0f 100644 --- a/scripts/node_wavelet_noise/node_wavelet_noise.gml +++ b/scripts/node_wavelet_noise/node_wavelet_noise.gml @@ -2,23 +2,23 @@ function Node_Wavelet_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, name = "Wavelet Noise"; shader = sh_noise_wavelet; - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])) .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[2] = nodeValue_Vec2("Scale", self, [ 4, 4 ]) + newInput(2, nodeValue_Vec2("Scale", self, [ 4, 4 ])) .setMappable(6); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) + newInput(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) + newInput(4, nodeValue_Float("Progress", self, 0)) .setMappable(7) addShaderProp(SHADER_UNIFORM.float, "progress"); - inputs[5] = nodeValue_Float("Detail", self, 1.24) + newInput(5, nodeValue_Float("Detail", self, 1.24)) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }) .setMappable(8); addShaderProp(SHADER_UNIFORM.float, "detail"); diff --git a/scripts/node_websocket_sender/node_websocket_sender.gml b/scripts/node_websocket_sender/node_websocket_sender.gml index 431968461..b41c711fe 100644 --- a/scripts/node_websocket_sender/node_websocket_sender.gml +++ b/scripts/node_websocket_sender/node_websocket_sender.gml @@ -9,7 +9,7 @@ function Node_Websocket_Sender(_x, _y, _group = noone) : Node(_x, _y, _group) co newInput(3, nodeValue_Surface("Surface", self)); - inputs[4] = nodeValue_Path("Path", self, "") + newInput(4, nodeValue_Path("Path", self, "")) .setDisplay(VALUE_DISPLAY.path_load) .nonValidate(); diff --git a/scripts/node_widget_test/node_widget_test.gml b/scripts/node_widget_test/node_widget_test.gml index 82fb4b04a..3beb259a0 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) + newInput( 0, nodeValue("textBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY._default)) + newInput( 1, nodeValue("rangeBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0]) .setDisplay(VALUE_DISPLAY.range)) + newInput( 2, nodeValue("vectorBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0]) .setDisplay(VALUE_DISPLAY.vector)) + newInput( 3, nodeValue("vectorRangeBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0, 0, 0]) .setDisplay(VALUE_DISPLAY.vector_range)) + newInput( 4, nodeValue("rotator", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.rotation)) + newInput( 5, nodeValue("rotatorRange", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0]) .setDisplay(VALUE_DISPLAY.rotation_range)) + newInput( 6, nodeValue_Float("rotatorRandom", self, [0, 0, 0, 0, 0]) .setDisplay(VALUE_DISPLAY.rotation_random)) + newInput( 7, nodeValue("slider", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider)) + newInput( 8, nodeValue("sliderRange", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.slider_range)) + newInput( 9, nodeValue("areaBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, DEF_AREA) .setDisplay(VALUE_DISPLAY.area)) + newInput(10, nodeValue("paddingBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.padding)) + newInput(11, nodeValue("cornerBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.corner)) + newInput(12, nodeValue("controlPointBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.puppet_control)) + newInput(13, nodeValue("scrollBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Choice 1", "Choice 2" ])) + newInput(14, nodeValue("buttonGroup", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.enum_button, [ "Choice 1", "Choice 2" ])) + newInput(15, nodeValue("matrixGrid", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, array_create(9)) .setDisplay(VALUE_DISPLAY.matrix, { size: 3 })) + newInput(16, nodeValue("transformBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.transform)) + newInput(17, nodeValue("transformBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.transform)) + newInput(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) + newInput(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) + newInput(20, nodeValue_Color("buttonColor", self, 0) .setDisplay(VALUE_DISPLAY._default)) + newInput(21, nodeValue_Palette("buttonPalette", self, array_clone(DEF_PALETTE)) .setDisplay(VALUE_DISPLAY.palette)) + newInput(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) + newInput(23, nodeValue("pathArrayBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, []) .setDisplay(VALUE_DISPLAY.path_array, { filter: [ "image|*.png;*.jpg", "" ] })) + newInput(24, nodeValue("pathLoad", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") .setDisplay(VALUE_DISPLAY.path_load)) + newInput(25, nodeValue("pathSave", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") .setDisplay(VALUE_DISPLAY.path_save)) + newInput(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) + newInput(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" ] }) + newInput(28, nodeValue_Text("textArea", self, "") .setDisplay(VALUE_DISPLAY._default)) + newInput(29, nodeValue_Text("textBox", self, "") .setDisplay(VALUE_DISPLAY.text_box)) + newInput(30, nodeValue_Text("textArea", self, "") .setDisplay(VALUE_DISPLAY.codeLUA)) + newInput(31, nodeValue_Text("textArea", self, "") .setDisplay(VALUE_DISPLAY.codeHLSL)) + newInput(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) + newInput(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 f7f4bff0c..da85327cd 100644 --- a/scripts/node_wrap_area/node_wrap_area.gml +++ b/scripts/node_wrap_area/node_wrap_area.gml @@ -4,7 +4,7 @@ function Node_Wrap_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) newInput(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 }) + newInput(1, nodeValue_Area("Area", self, DEF_AREA_REF, { onSurfaceSize, useShape : false })) .setUnitRef(onSurfaceSize, VALUE_UNIT.reference); newInput(2, nodeValue_Bool("Active", self, true)); diff --git a/scripts/node_wrap_perspective/node_wrap_perspective.gml b/scripts/node_wrap_perspective/node_wrap_perspective.gml index 16f09c724..440700bb8 100644 --- a/scripts/node_wrap_perspective/node_wrap_perspective.gml +++ b/scripts/node_wrap_perspective/node_wrap_perspective.gml @@ -6,28 +6,28 @@ function Node_Warp_Perspective(_x, _y, _group = noone) : Node_Processor(_x, _y, newInput(1, nodeValue_Bool("Active", self, true)); active_index = 1; - inputs[2] = nodeValue_Vec2("Top left", self, [ 0, 0 ] ) + newInput(2, nodeValue_Vec2("Top left", self, [ 0, 0 ] )) .setUnitRef(function(index) { return getDimension(index); }); - inputs[3] = nodeValue_Vec2("Top right", self, [ DEF_SURF_W, 0 ] ) + newInput(3, nodeValue_Vec2("Top right", self, [ DEF_SURF_W, 0 ] )) .setUnitRef(function(index) { return getDimension(index); }); - inputs[4] = nodeValue_Vec2("Bottom left", self, [ 0, DEF_SURF_H ] ) + newInput(4, nodeValue_Vec2("Bottom left", self, [ 0, DEF_SURF_H ] )) .setUnitRef(function(index) { return getDimension(index); }); - inputs[5] = nodeValue_Vec2("Bottom right", self, DEF_SURF ) + newInput(5, nodeValue_Vec2("Bottom right", self, DEF_SURF )) .setUnitRef(function(index) { return getDimension(index); }); - inputs[6] = nodeValue_Vec2("Top left", self, [ 0, 0 ] ) + newInput(6, nodeValue_Vec2("Top left", self, [ 0, 0 ] )) .setUnitRef(function(index) { return getDimension(index); }); - inputs[7] = nodeValue_Vec2("Top right", self, [ DEF_SURF_W, 0 ] ) + newInput(7, nodeValue_Vec2("Top right", self, [ DEF_SURF_W, 0 ] )) .setUnitRef(function(index) { return getDimension(index); }); - inputs[8] = nodeValue_Vec2("Bottom left", self, [ 0, DEF_SURF_H ] ) + newInput(8, nodeValue_Vec2("Bottom left", self, [ 0, DEF_SURF_H ] )) .setUnitRef(function(index) { return getDimension(index); }); - inputs[9] = nodeValue_Vec2("Bottom right", self, DEF_SURF ) + newInput(9, nodeValue_Vec2("Bottom right", self, DEF_SURF )) .setUnitRef(function(index) { return getDimension(index); }); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); 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 caf2ac46f..649816701 100644 --- a/scripts/node_xml_file_read/node_xml_file_read.gml +++ b/scripts/node_xml_file_read/node_xml_file_read.gml @@ -29,7 +29,7 @@ function Node_XML_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const w = 128; - inputs[0] = nodeValue_Path("Path", self, "") + newInput(0, nodeValue_Path("Path", self, "")) .setDisplay(VALUE_DISPLAY.path_load, { filter: "XML file|*.xml" }) .rejectArray(); 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 1662ef917..e223cfef6 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_Path("Path", self, "") + newInput(0, nodeValue_Path("Path", self, "")) .setDisplay(VALUE_DISPLAY.path_save, { filter: "xml file|*.xml" }) .rejectArray(); - inputs[1] = nodeValue_Struct("Struct", self, {}) + newInput(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 52d65df96..c7e66dd1f 100644 --- a/scripts/node_zigzag/node_zigzag.gml +++ b/scripts/node_zigzag/node_zigzag.gml @@ -3,11 +3,11 @@ function Node_Zigzag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Int("Amount", self, 1) + newInput(1, nodeValue_Int("Amount", self, 1)) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }) .setMappable(6); - inputs[2] = nodeValue_Vec2("Position", self, [0, 0] ) + newInput(2, nodeValue_Vec2("Position", self, [0, 0] )) .setUnitRef(function(index) { return getDimension(index); }); newInput(3, nodeValue_Color("Color 1", self, c_white)); @@ -24,7 +24,7 @@ function Node_Zigzag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co ////////////////////////////////////////////////////////////////////////////////// - inputs[8] = nodeValue_Rotation("Angle", self, 0) + newInput(8, nodeValue_Rotation("Angle", self, 0)) .setMappable(7); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone);