mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-25 06:26:42 +01:00
[Tunnel out] Fix junction color not update properly.
This commit is contained in:
parent
6dedae85df
commit
9259b43b28
4 changed files with 17 additions and 11 deletions
|
@ -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(array_length(inputs_data[i]) == 0) continue;
|
||||||
if(!inputs[i].isArray(inputs_data[i])) 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]));
|
process_amount = max(process_amount, array_length(inputs_data[i][0]));
|
||||||
} else
|
} else
|
||||||
process_amount = max(process_amount, array_length(inputs_data[i]));
|
process_amount = max(process_amount, array_length(inputs_data[i]));
|
||||||
|
|
|
@ -53,7 +53,7 @@ function valueKey(_time, _value, _anim = noone, _in = 0, _ot = 0) constructor {
|
||||||
return noone;
|
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");
|
noti_warning("Type incompatible");
|
||||||
return noone;
|
return noone;
|
||||||
}
|
}
|
||||||
|
@ -376,7 +376,7 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor {
|
||||||
}
|
}
|
||||||
|
|
||||||
static processTypeDefault = function() {
|
static processTypeDefault = function() {
|
||||||
if(!sep_axis && typeArray(prop.display_type)) return [];
|
if(!sep_axis && typeArray(prop)) return [];
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -421,7 +421,7 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor {
|
||||||
if(PROJECT.attributes.strict) return processValue(_val);
|
if(PROJECT.attributes.strict) return processValue(_val);
|
||||||
var _res = _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++)
|
for(var i = 0; i < array_length(_val); i++)
|
||||||
_res[i] = processValue(_val[i]);
|
_res[i] = processValue(_val[i]);
|
||||||
} else
|
} else
|
||||||
|
@ -604,7 +604,7 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor {
|
||||||
} else if(is_struct(val) && struct_has(val, "serialize")) {
|
} else if(is_struct(val) && struct_has(val, "serialize")) {
|
||||||
val = 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 = [];
|
var __v = [];
|
||||||
for(var j = 0; j < array_length(val); j++) {
|
for(var j = 0; j < array_length(val); j++) {
|
||||||
if(is_struct(val[j]) && struct_has(val[j], "serialize"))
|
if(is_struct(val[j]) && struct_has(val[j], "serialize"))
|
||||||
|
@ -695,7 +695,7 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor {
|
||||||
} else
|
} else
|
||||||
_val = LOADING_VERSION < 11640 && !is_int64(_val)? cola(_val) : int64(_val);
|
_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 = [];
|
_val = [];
|
||||||
|
|
||||||
if(is_array(value)) {
|
if(is_array(value)) {
|
||||||
|
|
|
@ -122,8 +122,6 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
dyna_depo = ds_list_create();
|
dyna_depo = ds_list_create();
|
||||||
value_tag = "";
|
value_tag = "";
|
||||||
|
|
||||||
type_array = 0;
|
|
||||||
|
|
||||||
is_modified = false;
|
is_modified = false;
|
||||||
cache_value = [ false, false, undefined, undefined ];
|
cache_value = [ false, false, undefined, undefined ];
|
||||||
cache_array = [ false, false ];
|
cache_array = [ false, false ];
|
||||||
|
@ -204,6 +202,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
display_attribute = noone;
|
display_attribute = noone;
|
||||||
|
|
||||||
popup_dialog = noone;
|
popup_dialog = noone;
|
||||||
|
type_array = typeArray(self);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ---- graph ----
|
#region ---- graph ----
|
||||||
|
@ -302,6 +301,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
|
|
||||||
type = _type;
|
type = _type;
|
||||||
draw_junction_index = type;
|
draw_junction_index = type;
|
||||||
|
updateColor();
|
||||||
|
|
||||||
if(bypass_junc) bypass_junc.setType(_type);
|
if(bypass_junc) bypass_junc.setType(_type);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -546,7 +547,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
static setDisplay = function(_type = VALUE_DISPLAY._default, _data = {}) {
|
static setDisplay = function(_type = VALUE_DISPLAY._default, _data = {}) {
|
||||||
display_type = _type;
|
display_type = _type;
|
||||||
display_data = _data;
|
display_data = _data;
|
||||||
type_array = typeArray(display_type);
|
type_array = typeArray(self);
|
||||||
resetDisplay();
|
resetDisplay();
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
|
|
@ -407,10 +407,15 @@ function typeNumeric(type) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function typeArray(_type) {
|
function typeArray(_value) {
|
||||||
INLINE
|
INLINE
|
||||||
|
|
||||||
switch(_type) {
|
switch(_value.type) {
|
||||||
|
case VALUE_TYPE.curve :
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch(_value.display_type) {
|
||||||
case VALUE_DISPLAY.range :
|
case VALUE_DISPLAY.range :
|
||||||
case VALUE_DISPLAY.vector_range :
|
case VALUE_DISPLAY.vector_range :
|
||||||
case VALUE_DISPLAY.rotation_range :
|
case VALUE_DISPLAY.rotation_range :
|
||||||
|
|
Loading…
Reference in a new issue