diff --git a/scripts/gradients_function/gradients_function.gml b/scripts/gradients_function/gradients_function.gml index 3f8446ea7..ffb9d191a 100644 --- a/scripts/gradients_function/gradients_function.gml +++ b/scripts/gradients_function/gradients_function.gml @@ -337,7 +337,8 @@ function shader_set_gradient(gradient, surface, range, junc) { var t = shader_set_surface("gradient_map", surface); gpu_set_tex_filter_ext(t, true); - gradient.shader_submit(); + if(is_instanceof(gradient, gradientObject)) + gradient.shader_submit(); } function evaluate_gradient_map(_x, gradient, surface, range, junc, fast = false) { diff --git a/scripts/node_application_in/node_application_in.gml b/scripts/node_application_in/node_application_in.gml index 75026f2c7..bcb8529c1 100644 --- a/scripts/node_application_in/node_application_in.gml +++ b/scripts/node_application_in/node_application_in.gml @@ -6,11 +6,11 @@ function Node_Application_In(_x, _y, _group = noone) : Node(_x, _y, _group) cons APP_SURF_OVERRIDE = true; - static step = function() { #region + static step = function() { LIVE_UPDATE = true; - } #endregion + } - static update = function() { #region + static update = function() { var s = inputs[0].getValue(); if(!is_surface(s)) return; @@ -20,5 +20,5 @@ function Node_Application_In(_x, _y, _group = noone) : Node(_x, _y, _group) cons draw_surface_stretched(s, 0, 0, WIN_W, WIN_H); BLEND_NORMAL surface_reset_target(); - } #endregion + } } \ No newline at end of file diff --git a/scripts/node_application_out/node_application_out.gml b/scripts/node_application_out/node_application_out.gml index 3ccc1217e..80cdb03dc 100644 --- a/scripts/node_application_out/node_application_out.gml +++ b/scripts/node_application_out/node_application_out.gml @@ -12,11 +12,11 @@ function Node_Application_Out(_x, _y, _group = noone) : Node(_x, _y, _group) con APP_SURF_OVERRIDE = true; - static step = function() { #region + static step = function() { LIVE_UPDATE = true; - } #endregion + } - static update = function() { #region + static update = function() { outputs[0].setValue(PRE_APP_SURF); - } #endregion + } } \ No newline at end of file diff --git a/scripts/node_atlas_draw/node_atlas_draw.gml b/scripts/node_atlas_draw/node_atlas_draw.gml index 83d28ea15..5a7bcc49a 100644 --- a/scripts/node_atlas_draw/node_atlas_draw.gml +++ b/scripts/node_atlas_draw/node_atlas_draw.gml @@ -18,8 +18,7 @@ function Node_Atlas_Draw(_x, _y, _group = noone) : Node(_x, _y, _group) construc if(atl == noone) return; if(is_array(atl) && array_length(atl) == 0) return; - if(!is_array(atl)) - atl = [ atl ]; + if(!is_array(atl)) atl = [ atl ]; var outSurf = outputs[0].getValue(); outSurf = surface_verify(outSurf, dim[0], dim[1]); @@ -27,8 +26,11 @@ function Node_Atlas_Draw(_x, _y, _group = noone) : Node(_x, _y, _group) construc surface_set_shader(outSurf,,, BLEND.alpha); for( var i = 0, n = array_length(atl); i < n; i++ ) { - shader_set_interpolation(atl[i].getSurface()) - atl[i].draw(); + var _a = atl[i]; + if(!is_instanceof(_a, Atlas)) continue; + + shader_set_interpolation(_a.getSurface()) + _a.draw(); } surface_reset_shader(); } diff --git a/scripts/node_feedback_inline/node_feedback_inline.gml b/scripts/node_feedback_inline/node_feedback_inline.gml index 5a40f0f8d..3625265a1 100644 --- a/scripts/node_feedback_inline/node_feedback_inline.gml +++ b/scripts/node_feedback_inline/node_feedback_inline.gml @@ -70,11 +70,9 @@ function Node_Feedback_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) con if(!junc_in || !junc_out) return noone; if(!junc_in.node.active || !junc_out.node.active) return noone; - params.dashed = true; - params.loop = true; + params.dashed = true; params.loop = true; drawJuncConnection(junc_out, junc_in, params); - params.dashed = false; - params.loop = false; + params.dashed = false; params.loop = false; return noone; } diff --git a/scripts/node_iterate_inline/node_iterate_inline.gml b/scripts/node_iterate_inline/node_iterate_inline.gml index ff8112162..7c90c48ac 100644 --- a/scripts/node_iterate_inline/node_iterate_inline.gml +++ b/scripts/node_iterate_inline/node_iterate_inline.gml @@ -92,7 +92,10 @@ function Node_Iterate_Inline(_x, _y, _group = noone) : Node_Collection_Inline(_x if(!junc_in || !junc_out) return noone; if(!junc_in.node.active || !junc_out.node.active) return noone; + params.dashed = true; params.loop = true; drawJuncConnection(junc_out, junc_in, params); + params.dashed = false; params.loop = false; + return 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 f62b849ee..5d52e3024 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 @@ -17,7 +17,7 @@ function Node_Iterator_Each_Inline_Input(_x, _y, _group = noone) : Node(_x, _y, array_push(arr, loop); } - static update = function() { #region + static update = function() { if(!is_instanceof(loop, Node_Iterate_Each_Inline)) return; var _typ = inputs[0].value_from == noone? VALUE_TYPE.any : inputs[0].value_from.type; @@ -30,5 +30,5 @@ function Node_Iterator_Each_Inline_Input(_x, _y, _group = noone) : Node(_x, _y, if(!is_array(val)) return; outputs[0].setValue(array_safe_get_fast(val, itr)); - } #endregion + } } \ No newline at end of file diff --git a/scripts/node_noise_aniso/node_noise_aniso.gml b/scripts/node_noise_aniso/node_noise_aniso.gml index f88bf89b0..ca7558b0a 100644 --- a/scripts/node_noise_aniso/node_noise_aniso.gml +++ b/scripts/node_noise_aniso/node_noise_aniso.gml @@ -30,10 +30,13 @@ function Node_Noise_Aniso(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou newInput(9, nodeValue_Enum_Scroll("Render mode", self, 0, [ "Blend", "Waterfall" ] )) + newInput(10, nodeValue_Float("Color 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) }); + input_display_list = [ ["Output", false], 0, ["Noise", false], 2, 1, 6, 5, 7, 3, 4, 8, - ["Render", false], 9, + ["Render", false], 9, 10, ]; newOutput(0, nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone)); @@ -47,27 +50,31 @@ function Node_Noise_Aniso(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou return _hov; } - static step = function() { #region + static step = function() { inputs[1].mappableStep(); inputs[4].mappableStep(); inputs[5].mappableStep(); - } #endregion + } static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _pos = _data[3]; + var _mod = _data[9]; + + inputs[10].setVisible(_mod == 0); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); surface_set_shader(_outSurf, sh_ani_noise); shader_set_f("position", _pos[0] / _dim[0], _pos[1] / _dim[1]); shader_set_f("seed", _data[2]); + shader_set_f("colrSeed", _data[10]); shader_set_f_map("noiseX", _data[1], _data[6], inputs[1]); shader_set_f_map("noiseY", _data[5], _data[7], inputs[5]); shader_set_f_map("angle", _data[4], _data[8], inputs[4]); - shader_set_i("mode", _data[9]); + shader_set_i("mode", _mod); draw_sprite_stretched(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1]); surface_reset_shader(); diff --git a/scripts/node_processor/node_processor.gml b/scripts/node_processor/node_processor.gml index 346036c77..67db1e68f 100644 --- a/scripts/node_processor/node_processor.gml +++ b/scripts/node_processor/node_processor.gml @@ -65,9 +65,12 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct static getDimension = function(arr = 0) { if(dimension_index == -1) return [ 1, 1 ]; + var _ip = array_safe_get(inputs, dimension_index, noone); + if(_ip == noone) return [ 1, 1 ]; + var _in = getSingleValue(dimension_index, arr); - if(inputs[dimension_index].type == VALUE_TYPE.surface && is_surface(_in)) { + if(_ip.type == VALUE_TYPE.surface && is_surface(_in)) { var ww = surface_get_width_safe(_in); var hh = surface_get_height_safe(_in); return [ww, hh]; diff --git a/scripts/node_registry/node_registry.gml b/scripts/node_registry/node_registry.gml index 26b8b386a..41a2782bc 100644 --- a/scripts/node_registry/node_registry.gml +++ b/scripts/node_registry/node_registry.gml @@ -18,6 +18,7 @@ function NodeObject(_name, _spr, _node, _create, tooltip = "", tags = []) constr show_in_global = true; is_patreon_extra = false; + testable = true; _fn = registerFunctionLite("New node", _name, function(_node) { PANEL_GRAPH.createNodeHotkey(_node); }, [ _node ]); _fn.spr = _spr; @@ -72,10 +73,13 @@ function NodeObject(_name, _spr, _node, _create, tooltip = "", tags = []) constr if(IS_CMD) return self; show_in_recent = false; + testable = false; variable_struct_remove(FUNCTIONS, _fn.fnName); return self; } + static notTest = function() { testable = false; return self; } + static hideGlobal = function() { INLINE if(IS_CMD) return self; @@ -539,7 +543,7 @@ function __initNodes() { addNodeObject(input, "Websocket Receiver", s_node_websocket_receive, "Node_Websocket_Receiver", [1, Node_Websocket_Receiver],, "Create websocket server to receive data from the network.").setVersion(1145); addNodeObject(input, "Websocket Sender", s_node_websocket_send, "Node_Websocket_Sender", [1, Node_Websocket_Sender],, "Create websocket server to send data to the network.").setVersion(1145); addNodeObject(input, "Spout Sender", s_node_spout, "Node_Spout_Send", [1, Node_Spout_Send],, "Send surface through Spout.").setVersion(11600); - addNodeObject(input, "MIDI In", s_node_midi, "Node_MIDI_In", [1, Node_MIDI_In],, "Receive MIDI message.").setVersion(11630); + addNodeObject(input, "MIDI In", s_node_midi, "Node_MIDI_In", [1, Node_MIDI_In],, "Receive MIDI message.").setVersion(11630).notTest(); addNodeObject(input, "HTTP", s_node_http, "Node_HTTP_request", [1, Node_HTTP_request],, "Request data from the internet.").setVersion(11780); #endregion @@ -1082,9 +1086,9 @@ function __initNodes() { addNodeObject(node, "Argument", s_node_argument, "Node_Argument", [1, Node_Argument]).setVersion(11660); addNodeObject(node, "Terminal trigger", s_node_terminal_trigger, "Node_Terminal_Trigger", [1, Node_Terminal_Trigger]).setVersion(11660); addNodeObject(node, "Execute Shell", s_node_shell_excecute, "Node_Shell", [1, Node_Shell], ["terminal", "execute", "run"], "Execute shell script.").setVersion(11530); - addNodeObject(node, "Monitor Capture", s_node_monitor_capture, "Node_Monitor_Capture", [1, Node_Monitor_Capture]); - addNodeObject(node, "GUI In", s_node_gui_in, "Node_Application_In", [1, Node_Application_In]); - addNodeObject(node, "GUI Out", s_node_gui_out, "Node_Application_Out", [1, Node_Application_Out]); + addNodeObject(node, "Monitor Capture", s_node_monitor_capture, "Node_Monitor_Capture", [1, Node_Monitor_Capture]).notTest(); + addNodeObject(node, "GUI In", s_node_gui_in, "Node_Application_In", [1, Node_Application_In]).notTest(); + addNodeObject(node, "GUI Out", s_node_gui_out, "Node_Application_Out", [1, Node_Application_Out]).notTest(); // addNodeObject(node, "DLL", s_node_gui_out, "Node_DLL", [1, Node_DLL]).setVersion(11750); #endregion diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index aea7e51eb..e75afb52f 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -2384,7 +2384,6 @@ function drawJuncConnection(from, to, params) { to.draw_line_shift_hover = false; var downDirection = to.type == VALUE_TYPE.action || from.type == VALUE_TYPE.action; - // if(downDirection) print($"{to} : {from}"); #endregion #region +++++ CHECK HOVER +++++ diff --git a/scripts/panel_collection/panel_collection.gml b/scripts/panel_collection/panel_collection.gml index ec3c9e896..c487e4edf 100644 --- a/scripts/panel_collection/panel_collection.gml +++ b/scripts/panel_collection/panel_collection.gml @@ -297,7 +297,7 @@ function Panel_Collection() : PanelContent() constructor { } if(_node.path == updated_path && updated_prog > 0) - draw_sprite_stretched_ext(THEME.node_bg, 0, _boxx, yy, grid_size, grid_size, COLORS._main_value_positive, updated_prog); + draw_sprite_stretched_ext(THEME.node_bg, 1, _boxx, yy, grid_size, grid_size, COLORS._main_value_positive, updated_prog * 2); if(variable_struct_exists(_node, "getSpr")) _node.getSpr(); diff --git a/scripts/render_data/render_data.gml b/scripts/render_data/render_data.gml index f88fe5af2..5de9239ba 100644 --- a/scripts/render_data/render_data.gml +++ b/scripts/render_data/render_data.gml @@ -238,8 +238,12 @@ function Render(partial = false, runAction = false) { #region var nextNodes = rendering.getNextNodes(); for( var i = 0, n = array_length(nextNodes); i < n; i++ ) { - if(nextNodes[i].isRenderable()) - RENDER_QUEUE.enqueue(nextNodes[i]); + var nextNode = nextNodes[i]; + + if(!is_instanceof(nextNode, __Node_Base)) continue; + if(!nextNode.isRenderable()) continue; + + RENDER_QUEUE.enqueue(nextNode); } if(runAction && rendering.hasInspector1Update()) diff --git a/scripts/testing_script/testing_script.gml b/scripts/testing_script/testing_script.gml index 912c7b4fb..090b57b71 100644 --- a/scripts/testing_script/testing_script.gml +++ b/scripts/testing_script/testing_script.gml @@ -133,7 +133,12 @@ function __test_load_all_nodes() { if(index > inded) break; if(index > indst) { var node = ALL_NODES[? k]; + k = ds_map_find_next(ALL_NODES, k); + + if(!node.testable) continue; + print($"==== Building {node.node} ===="); + var b = node.build(xx, yy); if(++ind > col) { @@ -153,7 +158,6 @@ function __test_load_all_nodes() { } index++; - k = ds_map_find_next(ALL_NODES, k); } LOADING = false; } diff --git a/scripts/textArea/textArea.gml b/scripts/textArea/textArea.gml index 11707629e..46cf26802 100644 --- a/scripts/textArea/textArea.gml +++ b/scripts/textArea/textArea.gml @@ -410,8 +410,11 @@ function textArea(_input, _onModify) : textInput(_input, _onModify) constructor clipboard_set_text(string_copy(_input_text, minc + 1, maxc - minc)); } } else { - if(key_mod_press(CTRL) && keyboard_check_pressed(ord("V"))) - KEYBOARD_STRING = clipboard_get_text(); + if(key_mod_press(CTRL) && keyboard_check_pressed(ord("V"))) { + var _ctxt = clipboard_get_text(); + _ctxt = string_replace_all(_ctxt, "\t", " "); + KEYBOARD_STRING = _ctxt; + } if(keyboard_check_pressed(vk_escape)) { } else if(keyboard_check_pressed(vk_tab)) { diff --git a/scripts/textBox/textBox.gml b/scripts/textBox/textBox.gml index a9ed1cd9b..18d7f6f15 100644 --- a/scripts/textBox/textBox.gml +++ b/scripts/textBox/textBox.gml @@ -207,7 +207,9 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor { } } else { if(key_mod_press(CTRL) && keyboard_check_pressed(ord("V"))) { - KEYBOARD_STRING = clipboard_get_text(); + var _ctxt = clipboard_get_text(); + _ctxt = string_replace_all(_ctxt, "\t", " "); + KEYBOARD_STRING = _ctxt; edited = true; } diff --git a/shaders/sh_ani_noise/sh_ani_noise.fsh b/shaders/sh_ani_noise/sh_ani_noise.fsh index f785149c3..62edbc4e2 100644 --- a/shaders/sh_ani_noise/sh_ani_noise.fsh +++ b/shaders/sh_ani_noise/sh_ani_noise.fsh @@ -2,6 +2,7 @@ varying vec2 v_vTexcoord; varying vec4 v_vColour; uniform float seed; +uniform float colrSeed; uniform vec2 position; uniform int mode; @@ -17,9 +18,9 @@ uniform vec2 angle; uniform int angleUseSurf; uniform sampler2D angleSurf; -float random1D (in vec2 st, float _seed) { return fract(sin(dot(st.xy, vec2(12.9898, 78.233)) * mod(_seed + 453.456, 32.156) * 12.588) * 43758.5453123); } +float random1D (in vec2 st, float _seed) { return fract(sin(dot(st.xy, vec2(12.9898, 78.233)) * mod(_seed + 453.456, 100.) * 12.588) * 43758.5453123); } -float random (in vec2 st) { return mix(random1D(st, floor(seed)), random1D(st, floor(seed) + 1.), fract(seed)); } +float random (in vec2 st, float _seed) { return mix(random1D(st, floor(_seed)), random1D(st, floor(_seed) + 1.), fract(_seed)); } void main() { #region params @@ -46,17 +47,18 @@ void main() { vec2 pos = (v_vTexcoord - position) * mat2(cos(ang), - sin(ang), sin(ang), cos(ang)); float yy = floor(pos.y * nsy); - float xx = (pos.x + random1D(vec2(yy), floor(seed))) * nsx; + float xx = (pos.x + random(vec2(1., yy), seed)) * nsx; float x0 = floor(xx); float x1 = floor(xx) + 1.; float prog = xx - x0; if(mode == 0) { - float noise0 = random(vec2(x0, yy)); // point before - float noise1 = random(vec2(x1, yy)); // point after + float noise0 = random(vec2(x0, yy), colrSeed); // point before + float noise1 = random(vec2(x1, yy), colrSeed); // point after gl_FragColor = vec4(vec3(mix(noise0, noise1, prog)), 1.); + } else if(mode == 1) { gl_FragColor = vec4(vec3(prog), 1.); }