diff --git a/scripts/__node_value_object/__node_value_object.gml b/scripts/__node_value_object/__node_value_object.gml index eb764bf50..d3e21b2d2 100644 --- a/scripts/__node_value_object/__node_value_object.gml +++ b/scripts/__node_value_object/__node_value_object.gml @@ -9,7 +9,7 @@ function __NodeValue_Object_Generic(_name, _node, _type, _value, _tooltip = "") static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; return val; } diff --git a/scripts/node_feedback_input/node_feedback_input.gml b/scripts/node_feedback_input/node_feedback_input.gml index 4defd508e..78c1f38e4 100644 --- a/scripts/node_feedback_input/node_feedback_input.gml +++ b/scripts/node_feedback_input/node_feedback_input.gml @@ -4,17 +4,18 @@ function Node_Feedback_Input(_x, _y, _group = noone) : Node_Group_Input(_x, _y, is_group_io = true; setDimension(96, 32 + 24 * 2); + feedbackOut = noone; + outputs[0].getValueDefault = method(outputs[0], outputs[0].getValueRecursive); //Get value from outside loop outputs[0].getValueRecursive = function(arr, _time) { - var _node_output = noone; - for( var i = 0; i < array_length(outputs[1].value_to); i++ ) { - var vt = outputs[1].value_to[i]; - if(vt.value_from == outputs[1]) - _node_output = vt; - } + if(!is(feedbackOut, NodeValue)) return; - if(CURRENT_FRAME > 0 && _node_output != noone && _node_output.node.cache_value != noone) { //use cache from output - arr[@ 0] = _node_output.node.cache_value; + var _vto = feedbackOut.getJunctionTo(); + var _jout = array_safe_get(_vto, 0, noone); + if(_jout == noone) return; + + if(CURRENT_FRAME > 0 && _jout.node.cache_value != noone) { //use cache from output + arr[@ 0] = _jout.node.cache_value; arr[@ 1] = inParent; return; } @@ -23,4 +24,5 @@ function Node_Feedback_Input(_x, _y, _group = noone) : Node_Group_Input(_x, _y, } newOutput(1, nodeValue_Output("Feedback loop", self, VALUE_TYPE.node, 0).nonForward()); + feedbackOut = outputs[1]; } \ No newline at end of file diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index f88a1bc51..9b10920fc 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -1206,7 +1206,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; var typ = nod.type; var dis = nod.display_type; diff --git a/scripts/node_value_area/node_value_area.gml b/scripts/node_value_area/node_value_area.gml index 87cf71418..2ca451678 100644 --- a/scripts/node_value_area/node_value_area.gml +++ b/scripts/node_value_area/node_value_area.gml @@ -70,7 +70,7 @@ function __NodeValue_Area(_name, _node, _value, _data = {}) : NodeValue(_name, _ static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; return valueProcess(val, nod, applyUnit, arrIndex); } diff --git a/scripts/node_value_bool/node_value_bool.gml b/scripts/node_value_bool/node_value_bool.gml index 597816bb3..47967411c 100644 --- a/scripts/node_value_bool/node_value_bool.gml +++ b/scripts/node_value_bool/node_value_bool.gml @@ -4,12 +4,12 @@ function __NodeValue_Bool(_name, _node, _value, _tooltip = "") : NodeValue(_name /////============== GET ============= + function toBool(a) { return is_array(a)? array_map(a, function(v) /*=>*/ {return toBool(v)}) : bool(a) }; + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; - - return is_array(val)? array_map(val, function(v) /*=>*/ {return bool(v)}) : bool(val); + return toBool(val); } static __getAnimValue = function(_time = CURRENT_FRAME) { diff --git a/scripts/node_value_color/node_value_color.gml b/scripts/node_value_color/node_value_color.gml index 937dea259..4bedeaf90 100644 --- a/scripts/node_value_color/node_value_color.gml +++ b/scripts/node_value_color/node_value_color.gml @@ -7,7 +7,7 @@ function __NodeValue_Color(_name, _node, _value, _tooltip = "") : NodeValue(_nam static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; return val; } diff --git a/scripts/node_value_curve/node_value_curve.gml b/scripts/node_value_curve/node_value_curve.gml index 23702dde6..ea9d6210d 100644 --- a/scripts/node_value_curve/node_value_curve.gml +++ b/scripts/node_value_curve/node_value_curve.gml @@ -7,7 +7,7 @@ function __NodeValue_Curve(_name, _node, _value) : NodeValue(_name, _node, CONNE static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; return val; } diff --git a/scripts/node_value_d3_material/node_value_d3_material.gml b/scripts/node_value_d3_material/node_value_d3_material.gml index 414147d6c..f874744ab 100644 --- a/scripts/node_value_d3_material/node_value_d3_material.gml +++ b/scripts/node_value_d3_material/node_value_d3_material.gml @@ -11,7 +11,7 @@ function __NodeValue_D3Material(_name, _node, _value, _tooltip = "") : NodeValue static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; var typ = nod.type; var dis = nod.display_type; diff --git a/scripts/node_value_dimension/node_value_dimension.gml b/scripts/node_value_dimension/node_value_dimension.gml index 25bee5374..d72e48f39 100644 --- a/scripts/node_value_dimension/node_value_dimension.gml +++ b/scripts/node_value_dimension/node_value_dimension.gml @@ -15,7 +15,7 @@ function __NodeValue_Dimension(_node, value) : NodeValue("Dimension", _node, CON static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; var typ = nod.type; if(typ != VALUE_TYPE.surface) { diff --git a/scripts/node_value_enum_button/node_value_enum_button.gml b/scripts/node_value_enum_button/node_value_enum_button.gml index 52a93b066..2173a6362 100644 --- a/scripts/node_value_enum_button/node_value_enum_button.gml +++ b/scripts/node_value_enum_button/node_value_enum_button.gml @@ -8,7 +8,7 @@ function __NodeValue_Enum_Button(_name, _node, _value, _data) : NodeValue(_name, static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; return val; } diff --git a/scripts/node_value_enum_scroll/node_value_enum_scroll.gml b/scripts/node_value_enum_scroll/node_value_enum_scroll.gml index 2befe8e63..7e3fd9381 100644 --- a/scripts/node_value_enum_scroll/node_value_enum_scroll.gml +++ b/scripts/node_value_enum_scroll/node_value_enum_scroll.gml @@ -8,7 +8,7 @@ function __NodeValue_Enum_Scroll(_name, _node, _value, _data) : NodeValue(_name, static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; return val; } diff --git a/scripts/node_value_float/node_value_float.gml b/scripts/node_value_float/node_value_float.gml index 5127ab0dd..2f22bd403 100644 --- a/scripts/node_value_float/node_value_float.gml +++ b/scripts/node_value_float/node_value_float.gml @@ -12,7 +12,7 @@ function __NodeValue_Float(_name, _node, _value, _tooltip = "") : NodeValue(_nam static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; var typ = nod.type; var dis = nod.display_type; diff --git a/scripts/node_value_gradient/node_value_gradient.gml b/scripts/node_value_gradient/node_value_gradient.gml index 859c1541a..4a88c7e60 100644 --- a/scripts/node_value_gradient/node_value_gradient.gml +++ b/scripts/node_value_gradient/node_value_gradient.gml @@ -7,7 +7,7 @@ function __NodeValue_Gradient(_name, _node, _value, _tooltip = "") : NodeValue(_ static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; if(is_instanceof(val, gradientObject)) return val; if(nod.type != VALUE_TYPE.color) return val; diff --git a/scripts/node_value_int/node_value_int.gml b/scripts/node_value_int/node_value_int.gml index 8b57137ee..57bdc2b73 100644 --- a/scripts/node_value_int/node_value_int.gml +++ b/scripts/node_value_int/node_value_int.gml @@ -13,7 +13,7 @@ function __NodeValue_Int(_name, _node, _value, _tooltip = "") : NodeValue(_name, static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; var typ = nod.type; var dis = nod.display_type; diff --git a/scripts/node_value_padding/node_value_padding.gml b/scripts/node_value_padding/node_value_padding.gml index 73018380c..383cab60f 100644 --- a/scripts/node_value_padding/node_value_padding.gml +++ b/scripts/node_value_padding/node_value_padding.gml @@ -18,7 +18,7 @@ function __NodeValue_Padding(_name, _node, _value, _tooltip = "") : NodeValue(_n static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; var _d = array_get_depth(val); __nod = nod; diff --git a/scripts/node_value_palette/node_value_palette.gml b/scripts/node_value_palette/node_value_palette.gml index 965b636eb..ec74b345c 100644 --- a/scripts/node_value_palette/node_value_palette.gml +++ b/scripts/node_value_palette/node_value_palette.gml @@ -9,7 +9,7 @@ function __NodeValue_Palette(_name, _node, _value, _tooltip = "") : NodeValue(_n static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; if(!is_array(val)) val = [ val ]; return val; diff --git a/scripts/node_value_quarterion/node_value_quarterion.gml b/scripts/node_value_quarterion/node_value_quarterion.gml index 0d55f03b5..315c04ba8 100644 --- a/scripts/node_value_quarterion/node_value_quarterion.gml +++ b/scripts/node_value_quarterion/node_value_quarterion.gml @@ -8,7 +8,7 @@ function __NodeValue_Quaternion(_name, _node, _value, _tooltip = "") : __NodeVal static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; var typ = nod.type; var dis = nod.display_type; diff --git a/scripts/node_value_rotation/node_value_rotation.gml b/scripts/node_value_rotation/node_value_rotation.gml index 4a1b12e00..cc14913a6 100644 --- a/scripts/node_value_rotation/node_value_rotation.gml +++ b/scripts/node_value_rotation/node_value_rotation.gml @@ -8,7 +8,7 @@ function __NodeValue_Rotation(_name, _node, _value, _tooltip = "") : NodeValue(_ static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; var typ = nod.type; if(typ == VALUE_TYPE.text) val = toNumber(val); diff --git a/scripts/node_value_rotation_random/node_value_rotation_random.gml b/scripts/node_value_rotation_random/node_value_rotation_random.gml index 28691d1e0..fca106aac 100644 --- a/scripts/node_value_rotation_random/node_value_rotation_random.gml +++ b/scripts/node_value_rotation_random/node_value_rotation_random.gml @@ -9,7 +9,7 @@ function __NodeValue_Rotation_Random(_name, _node, _value, _tooltip = "") : __No static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; if(!is_array(val)) return [ 0, val, val, 0, 0 ]; if(array_length(val) == 2) return [ 0, val[0], val[1], 0, 0 ]; diff --git a/scripts/node_value_surface/node_value_surface.gml b/scripts/node_value_surface/node_value_surface.gml index 45d607773..204d097de 100644 --- a/scripts/node_value_surface/node_value_surface.gml +++ b/scripts/node_value_surface/node_value_surface.gml @@ -9,7 +9,7 @@ function __NodeValue_Surface(_name, _node, _value, _tooltip = "") : NodeValue(_n static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; draw_junction_index = VALUE_TYPE.surface; if(is_instanceof(val, SurfaceAtlas) || (array_valid(val) && is_instanceof(val[0], SurfaceAtlas))) diff --git a/scripts/node_value_text/node_value_text.gml b/scripts/node_value_text/node_value_text.gml index 67eb38bf7..2abbbcae8 100644 --- a/scripts/node_value_text/node_value_text.gml +++ b/scripts/node_value_text/node_value_text.gml @@ -7,7 +7,7 @@ function __NodeValue_Text(_name, _node, _value, _tooltip = "") : NodeValue(_name static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; return val; } diff --git a/scripts/node_value_trigger/node_value_trigger.gml b/scripts/node_value_trigger/node_value_trigger.gml index 87b6dee9b..78b272cd8 100644 --- a/scripts/node_value_trigger/node_value_trigger.gml +++ b/scripts/node_value_trigger/node_value_trigger.gml @@ -7,7 +7,7 @@ function __NodeValue_Trigger(_name, _node, _value, _tooltip = "") : NodeValue(_n static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; return val; } diff --git a/scripts/node_value_vec2/node_value_vec2.gml b/scripts/node_value_vec2/node_value_vec2.gml index b4f3fdf36..a1d61a105 100644 --- a/scripts/node_value_vec2/node_value_vec2.gml +++ b/scripts/node_value_vec2/node_value_vec2.gml @@ -19,7 +19,7 @@ function __NodeValue_Vec2(_name, _node, _value, _data = {}) : NodeValue(_name, _ static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; - var nod = __curr_get_val[1]; + var nod = __curr_get_val[1]; if(!is(nod, Node)) return val; var typ = nod.type; if(typ != VALUE_TYPE.surface) { diff --git a/scripts/panel_test/panel_test.gml b/scripts/panel_test/panel_test.gml index 69b596240..6ca91b17d 100644 --- a/scripts/panel_test/panel_test.gml +++ b/scripts/panel_test/panel_test.gml @@ -136,7 +136,7 @@ function Panel_Test() : PanelContent() constructor { cc = merge_color(COLORS._main_value_negative, c_white, 0.5); tx = ui(16); - if(hv && _f.tooltip != -1) TOOLTIP = _f.tooltip; + if(hv) TOOLTIP = _f[$ "tooltip"] ?? ""; break; case 0 : @@ -397,5 +397,5 @@ function Panel_Test() : PanelContent() constructor { } } - setTestDir("D:/Project/MakhamDev/LTS-PixelComposer/TEST/Tester"); + setTestDir("D:/Project/MakhamDev/LTS-PixelComposer/TEST/Others"); } \ No newline at end of file