diff --git a/scripts/__node_value_processor/__node_value_processor.gml b/scripts/__node_value_processor/__node_value_processor.gml index 603f3ca0d..65ded9b27 100644 --- a/scripts/__node_value_processor/__node_value_processor.gml +++ b/scripts/__node_value_processor/__node_value_processor.gml @@ -56,7 +56,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct if(array_length(inputs_data[i]) == 0) continue; if(!inputs[i].isArray(inputs_data[i])) continue; - if(typeArray(inputs[i].display_type)) { + if(typeArray(inputs[i])) { process_amount = max(process_amount, array_length(inputs_data[i][0])); } else process_amount = max(process_amount, array_length(inputs_data[i])); diff --git a/scripts/node_keyframe/node_keyframe.gml b/scripts/node_keyframe/node_keyframe.gml index 6b5eb7f18..0794a9148 100644 --- a/scripts/node_keyframe/node_keyframe.gml +++ b/scripts/node_keyframe/node_keyframe.gml @@ -53,7 +53,7 @@ function valueKey(_time, _value, _anim = noone, _in = 0, _ot = 0) constructor { return noone; } - if(typeArray(self.anim.prop.display_type) != typeArray(anim.prop.display_type)) { + if(typeArray(self.anim.prop) != typeArray(anim.prop)) { noti_warning("Type incompatible"); return noone; } @@ -376,7 +376,7 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor { } static processTypeDefault = function() { - if(!sep_axis && typeArray(prop.display_type)) return []; + if(!sep_axis && typeArray(prop)) return []; return 0; } @@ -421,7 +421,7 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor { if(PROJECT.attributes.strict) return processValue(_val); var _res = _val; - if(!sep_axis && typeArray(prop.display_type) && is_array(_val)) { + if(!sep_axis && typeArray(prop) && is_array(_val)) { for(var i = 0; i < array_length(_val); i++) _res[i] = processValue(_val[i]); } else @@ -604,7 +604,7 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor { } else if(is_struct(val) && struct_has(val, "serialize")) { val = val.serialize(); - } else if(!sep_axis && typeArray(prop.display_type) && is_array(val)) { + } else if(!sep_axis && typeArray(prop) && is_array(val)) { var __v = []; for(var j = 0; j < array_length(val); j++) { if(is_struct(val[j]) && struct_has(val[j], "serialize")) @@ -695,7 +695,7 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor { } else _val = LOADING_VERSION < 11640 && !is_int64(_val)? cola(_val) : int64(_val); - } else if(!sep_axis && typeArray(prop.display_type)) { + } else if(!sep_axis && typeArray(prop)) { _val = []; if(is_array(value)) { diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index 63c644a50..4e36e88bd 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -122,8 +122,6 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru dyna_depo = ds_list_create(); value_tag = ""; - type_array = 0; - is_modified = false; cache_value = [ false, false, undefined, undefined ]; cache_array = [ false, false ]; @@ -204,6 +202,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru display_attribute = noone; popup_dialog = noone; + type_array = typeArray(self); #endregion #region ---- graph ---- @@ -302,6 +301,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru type = _type; draw_junction_index = type; + updateColor(); + if(bypass_junc) bypass_junc.setType(_type); return true; @@ -546,7 +547,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru static setDisplay = function(_type = VALUE_DISPLAY._default, _data = {}) { display_type = _type; display_data = _data; - type_array = typeArray(display_type); + type_array = typeArray(self); resetDisplay(); return self; diff --git a/scripts/node_value_types/node_value_types.gml b/scripts/node_value_types/node_value_types.gml index 60c974575..2b52de710 100644 --- a/scripts/node_value_types/node_value_types.gml +++ b/scripts/node_value_types/node_value_types.gml @@ -407,10 +407,15 @@ function typeNumeric(type) { return false; } -function typeArray(_type) { +function typeArray(_value) { INLINE - switch(_type) { + switch(_value.type) { + case VALUE_TYPE.curve : + return 1; + } + + switch(_value.display_type) { case VALUE_DISPLAY.range : case VALUE_DISPLAY.vector_range : case VALUE_DISPLAY.rotation_range :