diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index 7134e5a07..3bf613f10 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -185,7 +185,6 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { input_hash_raw = ""; inputs_amount = 0; - inputs_index = []; in_cache_len = 0; inputDisplayList = []; @@ -660,7 +659,6 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { inputs[i].visible_in_list = false; inputs_amount = getInputJunctionAmount(); - inputs_index = []; for( var i = 0; i < inputs_amount; i++ ) { var _input = getInputJunctionIndex(i); @@ -669,13 +667,11 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { var _inp = inputs[_input]; if(!is_struct(_inp) || !is_instanceof(_inp, NodeValue)) continue; - array_push(inputs_index, _input); _inp.visible_in_list = true; } - inputs_amount = array_length(inputs_index); outputs_index = array_create_ext(getOutputJunctionAmount(), function(index) { return getOutputJunctionIndex(index); }); - } //run_in(1, () => { updateIO() }); + } static setHeight = function() { @@ -781,6 +777,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { } else { var amo = input_display_list == -1? array_length(inputs) : array_length(input_display_list); + // print($"Amo = {amo}"); for(var i = 0; i < amo; i++) { var ind = getInputJunctionIndex(i); @@ -788,11 +785,16 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { var jun = array_safe_get(inputs, ind, noone); if(jun == noone || is_undefined(jun)) continue; + + // print($"{i}: {jun.isVisible()}"); + // print($" {jun.visible_manual}, {jun.visible}, {jun.index}, {jun.visible_in_list}"); + if(!jun.isVisible()) continue; array_push(inputDisplayList, jun); } + // print($"{inputDisplayList}\n"); } if(auto_input && dummy_input) array_push(inputDisplayList, dummy_input); diff --git a/scripts/node_image/node_image.gml b/scripts/node_image/node_image.gml index db4ddf628..7b19cb253 100644 --- a/scripts/node_image/node_image.gml +++ b/scripts/node_image/node_image.gml @@ -27,7 +27,8 @@ function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { color = COLORS.node_blend_input; newInput(0, nodeValue_Path("Path", self, "")) - .setDisplay(VALUE_DISPLAY.path_load, { filter: "image|*.png;*.jpg" }); + .setDisplay(VALUE_DISPLAY.path_load, { filter: "image|*.png;*.jpg" }) + .rejectArray(); newInput(1, nodeValue_Padding("Padding", self, [0, 0, 0, 0])); @@ -98,6 +99,7 @@ function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static step = function() { var path = path_get(getInputData(0)); + if(is_array(path)) return; if(!file_exists_empty(path)) return; if(attributes.file_checker && file_get_modify_s(path) > edit_time) { @@ -111,6 +113,8 @@ function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var path = path_get(getInputData(0)); var pad = getInputData(1); + if(is_array(path)) return; + outputs[1].setValue(path); updatePaths(path); diff --git a/scripts/node_lua_compute/node_lua_compute.gml b/scripts/node_lua_compute/node_lua_compute.gml index a4a9154f8..2651fd17d 100644 --- a/scripts/node_lua_compute/node_lua_compute.gml +++ b/scripts/node_lua_compute/node_lua_compute.gml @@ -66,7 +66,7 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru array_resize(input_display_list, input_display_len); for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { - if(getInputDataForce(i) != "") { + if(inputs[i].getValue() != "") { array_push(_in, inputs[i + 0]); array_push(_in, inputs[i + 1]); array_push(_in, inputs[i + 2]); @@ -90,6 +90,7 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru refreshInputType(); createNewInput(); + refreshNodeDisplay(); } static refreshInputType = function() { diff --git a/scripts/node_lua_surface/node_lua_surface.gml b/scripts/node_lua_surface/node_lua_surface.gml index bc3547bbd..e0fd72f3a 100644 --- a/scripts/node_lua_surface/node_lua_surface.gml +++ b/scripts/node_lua_surface/node_lua_surface.gml @@ -69,7 +69,7 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru array_resize(input_display_list, input_display_len); for( var i = input_fix_len; i < array_length(inputs); i += data_length ) { - if(getInputDataForce(i) != "") { + if(inputs[i].getValue() != "") { array_push(_in, inputs[i + 0]); array_push(_in, inputs[i + 1]); array_push(_in, inputs[i + 2]); @@ -94,6 +94,7 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru refreshInputType(); createNewInput(); + refreshNodeDisplay(); } static refreshInputType = function() { diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index ccc124c1b..08442efff 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -544,8 +544,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru if(value_from) return true; if(visible_manual != 0) return visible_manual == 1; if(!visible) return false; - - if(index == -1) return true; + if(index == -1) return true; return visible_in_list; }