mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-02-03 00:35:14 +01:00
Cache, group IO ordering fix
This commit is contained in:
parent
b7918574b9
commit
9245b35c1f
17 changed files with 74 additions and 79 deletions
|
@ -1342,7 +1342,7 @@
|
||||||
{"name":"node_counter","order":1,"path":"scripts/node_counter/node_counter.yy",},
|
{"name":"node_counter","order":1,"path":"scripts/node_counter/node_counter.yy",},
|
||||||
{"name":"s_node_shape_polygon","order":25,"path":"sprites/s_node_shape_polygon/s_node_shape_polygon.yy",},
|
{"name":"s_node_shape_polygon","order":25,"path":"sprites/s_node_shape_polygon/s_node_shape_polygon.yy",},
|
||||||
{"name":"s_node_pb_fx_interesct","order":6,"path":"sprites/s_node_pb_fx_interesct/s_node_pb_fx_interesct.yy",},
|
{"name":"s_node_pb_fx_interesct","order":6,"path":"sprites/s_node_pb_fx_interesct/s_node_pb_fx_interesct.yy",},
|
||||||
{"name":"node_path_eval","order":4,"path":"scripts/node_path_eval/node_path_eval.yy",},
|
{"name":"node_path_sample","order":4,"path":"scripts/node_path_sample/node_path_sample.yy",},
|
||||||
{"name":"sh_3d_depth","order":6,"path":"shaders/sh_3d_depth/sh_3d_depth.yy",},
|
{"name":"sh_3d_depth","order":6,"path":"shaders/sh_3d_depth/sh_3d_depth.yy",},
|
||||||
{"name":"__node_3d_displace","order":1,"path":"scripts/__node_3d_displace/__node_3d_displace.yy",},
|
{"name":"__node_3d_displace","order":1,"path":"scripts/__node_3d_displace/__node_3d_displace.yy",},
|
||||||
{"name":"node_vector_dot","order":9,"path":"scripts/node_vector_dot/node_vector_dot.yy",},
|
{"name":"node_vector_dot","order":9,"path":"scripts/node_vector_dot/node_vector_dot.yy",},
|
||||||
|
|
|
@ -2054,7 +2054,7 @@
|
||||||
{"id":{"name":"s_node_shape_polygon","path":"sprites/s_node_shape_polygon/s_node_shape_polygon.yy",},},
|
{"id":{"name":"s_node_shape_polygon","path":"sprites/s_node_shape_polygon/s_node_shape_polygon.yy",},},
|
||||||
{"id":{"name":"sh_color_picker_hue","path":"shaders/sh_color_picker_hue/sh_color_picker_hue.yy",},},
|
{"id":{"name":"sh_color_picker_hue","path":"shaders/sh_color_picker_hue/sh_color_picker_hue.yy",},},
|
||||||
{"id":{"name":"s_node_pb_fx_interesct","path":"sprites/s_node_pb_fx_interesct/s_node_pb_fx_interesct.yy",},},
|
{"id":{"name":"s_node_pb_fx_interesct","path":"sprites/s_node_pb_fx_interesct/s_node_pb_fx_interesct.yy",},},
|
||||||
{"id":{"name":"node_path_eval","path":"scripts/node_path_eval/node_path_eval.yy",},},
|
{"id":{"name":"node_path_sample","path":"scripts/node_path_sample/node_path_sample.yy",},},
|
||||||
{"id":{"name":"sh_3d_depth","path":"shaders/sh_3d_depth/sh_3d_depth.yy",},},
|
{"id":{"name":"sh_3d_depth","path":"shaders/sh_3d_depth/sh_3d_depth.yy",},},
|
||||||
{"id":{"name":"__node_3d_displace","path":"scripts/__node_3d_displace/__node_3d_displace.yy",},},
|
{"id":{"name":"__node_3d_displace","path":"scripts/__node_3d_displace/__node_3d_displace.yy",},},
|
||||||
{"id":{"name":"node_vector_dot","path":"scripts/node_vector_dot/node_vector_dot.yy",},},
|
{"id":{"name":"node_vector_dot","path":"scripts/node_vector_dot/node_vector_dot.yy",},},
|
||||||
|
|
|
@ -219,7 +219,7 @@ function array_shape(arr, first = true, isSurface = false) {
|
||||||
return (first? "" : " x ") + dim;
|
return (first? "" : " x ") + dim;
|
||||||
}
|
}
|
||||||
|
|
||||||
function array_depth(arr) {
|
function array_get_depth(arr) {
|
||||||
gml_pragma("forceinline");
|
gml_pragma("forceinline");
|
||||||
|
|
||||||
if(!is_array(arr)) return 0;
|
if(!is_array(arr)) return 0;
|
||||||
|
@ -237,7 +237,7 @@ function array_depth(arr) {
|
||||||
function array_spread(arr, _arr = [], _minDepth = 0) {
|
function array_spread(arr, _arr = [], _minDepth = 0) {
|
||||||
gml_pragma("forceinline");
|
gml_pragma("forceinline");
|
||||||
|
|
||||||
if(array_depth(arr) == _minDepth) {
|
if(array_get_depth(arr) == _minDepth) {
|
||||||
array_push(_arr, arr);
|
array_push(_arr, arr);
|
||||||
return _arr;
|
return _arr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,12 +35,9 @@ function Node_VFX_Renderer_Output(_x, _y, _group = noone) : Node_Group_Output(_x
|
||||||
.setVisible(true, true);
|
.setVisible(true, true);
|
||||||
} if(!LOADING && !APPENDING) createNewInput(); #endregion
|
} if(!LOADING && !APPENDING) createNewInput(); #endregion
|
||||||
|
|
||||||
static createOutput = function(override_order = true) { #region
|
static createOutput = function() { #region
|
||||||
if(group == noone) return;
|
if(group == noone) return;
|
||||||
if(!is_struct(group)) return;
|
if(!is_struct(group)) return;
|
||||||
|
|
||||||
if(override_order)
|
|
||||||
attributes.input_priority = ds_list_size(group.outputs);
|
|
||||||
|
|
||||||
if(!is_undefined(outParent))
|
if(!is_undefined(outParent))
|
||||||
ds_list_remove(group.outputs, outParent);
|
ds_list_remove(group.outputs, outParent);
|
||||||
|
|
|
@ -11,9 +11,12 @@ function Node_Array_Length(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
||||||
|
|
||||||
outputs[| 0] = nodeValue("Size", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, 0);
|
outputs[| 0] = nodeValue("Size", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, 0);
|
||||||
|
|
||||||
static update = function(frame = CURRENT_FRAME) {
|
static step = function() { #region
|
||||||
var _arr = getInputData(0);
|
|
||||||
inputs[| 0].setType(inputs[| 0].isLeaf()? VALUE_TYPE.any : inputs[| 0].value_from.type);
|
inputs[| 0].setType(inputs[| 0].isLeaf()? VALUE_TYPE.any : inputs[| 0].value_from.type);
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
static update = function(frame = CURRENT_FRAME) { #region
|
||||||
|
var _arr = getInputData(0);
|
||||||
|
|
||||||
if(!is_array(_arr) || array_length(_arr) == 0) {
|
if(!is_array(_arr) || array_length(_arr) == 0) {
|
||||||
outputs[| 0].setValue(0);
|
outputs[| 0].setValue(0);
|
||||||
|
@ -21,14 +24,14 @@ function Node_Array_Length(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
||||||
}
|
}
|
||||||
|
|
||||||
outputs[| 0].setValue(array_length(_arr));
|
outputs[| 0].setValue(array_length(_arr));
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region
|
||||||
draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text);
|
draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text);
|
||||||
var str = string(outputs[| 0].getValue());
|
var str = string(outputs[| 0].getValue());
|
||||||
|
|
||||||
var bbox = drawGetBbox(xx, yy, _s);
|
var bbox = drawGetBbox(xx, yy, _s);
|
||||||
var ss = string_scale(str, bbox.w, bbox.h);
|
var ss = string_scale(str, bbox.w, bbox.h);
|
||||||
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
|
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
|
||||||
}
|
} #endregion
|
||||||
}
|
}
|
|
@ -13,17 +13,16 @@ function Node_Array_Zip(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||||
|
|
||||||
setIsDynamicInput(1);
|
setIsDynamicInput(1);
|
||||||
|
|
||||||
static createNewInput = function() {
|
static createNewInput = function() { #region
|
||||||
var index = ds_list_size(inputs);
|
var index = ds_list_size(inputs);
|
||||||
|
|
||||||
inputs[| index] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 )
|
inputs[| index] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 )
|
||||||
.setVisible(true, true);
|
.setVisible(true, true);
|
||||||
|
|
||||||
return inputs[| index];
|
return inputs[| index];
|
||||||
}
|
} if(!LOADING && !APPENDING) createNewInput(); #endregion
|
||||||
if(!LOADING && !APPENDING) createNewInput();
|
|
||||||
|
|
||||||
static refreshDynamicInput = function() {
|
static refreshDynamicInput = function() { #region
|
||||||
var _l = ds_list_create();
|
var _l = ds_list_create();
|
||||||
|
|
||||||
for( var i = 0; i < ds_list_size(inputs); i++ ) {
|
for( var i = 0; i < ds_list_size(inputs); i++ ) {
|
||||||
|
@ -40,33 +39,36 @@ function Node_Array_Zip(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||||
inputs = _l;
|
inputs = _l;
|
||||||
|
|
||||||
createNewInput();
|
createNewInput();
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static onValueFromUpdate = function(index) {
|
static onValueFromUpdate = function(index) { #region
|
||||||
if(LOADING || APPENDING) return;
|
if(LOADING || APPENDING) return;
|
||||||
|
|
||||||
refreshDynamicInput();
|
refreshDynamicInput();
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static update = function(frame = CURRENT_FRAME) {
|
static step = function() { #region
|
||||||
var _arr = getInputData(0);
|
|
||||||
|
|
||||||
if(inputs[| 0].isLeaf()) {
|
if(inputs[| 0].isLeaf()) {
|
||||||
inputs[| 0].setType(VALUE_TYPE.any);
|
inputs[| 0].setType(VALUE_TYPE.any);
|
||||||
outputs[| 0].setType(VALUE_TYPE.any);
|
outputs[| 0].setType(VALUE_TYPE.any);
|
||||||
return;
|
} else {
|
||||||
|
inputs[| 0].setType(inputs[| 0].value_from.type);
|
||||||
|
outputs[| 0].setType(inputs[| 0].value_from.type);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!is_array(_arr)) return;
|
for( var i = 0; i < ds_list_size(inputs) - 1; i += data_length )
|
||||||
var _type = inputs[| 0].value_from.type;
|
inputs[| i].setType(inputs[| i].isLeaf()? VALUE_TYPE.any : inputs[| i].value_from.type);
|
||||||
inputs[| 0].setType(_type);
|
} #endregion
|
||||||
outputs[| 0].setType(_type);
|
|
||||||
|
static update = function(frame = CURRENT_FRAME) { #region
|
||||||
|
var _arr = getInputData(0);
|
||||||
|
|
||||||
|
if(!is_array(_arr)) return;
|
||||||
var len = 1;
|
var len = 1;
|
||||||
var val = [];
|
var val = [];
|
||||||
for( var i = 0; i < ds_list_size(inputs) - 1; i += data_length ) {
|
for( var i = 0; i < ds_list_size(inputs) - 1; i += data_length ) {
|
||||||
val[i] = getInputData(i);
|
val[i] = getInputData(i);
|
||||||
inputs[| i].setType(inputs[| i].isLeaf()? inputs[| i].value_from.type : VALUE_TYPE.any);
|
|
||||||
if(!is_array(val[i])) {
|
if(!is_array(val[i])) {
|
||||||
val[i] = [ val[i] ];
|
val[i] = [ val[i] ];
|
||||||
continue;
|
continue;
|
||||||
|
@ -82,10 +84,10 @@ function Node_Array_Zip(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||||
}
|
}
|
||||||
|
|
||||||
outputs[| 0].setValue(_out);
|
outputs[| 0].setValue(_out);
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region
|
||||||
var bbox = drawGetBbox(xx, yy, _s);
|
var bbox = drawGetBbox(xx, yy, _s);
|
||||||
draw_sprite_fit(s_node_array_zip, 0, bbox.xc, bbox.yc, bbox.w, bbox.h);
|
draw_sprite_fit(s_node_array_zip, 0, bbox.xc, bbox.yc, bbox.w, bbox.h);
|
||||||
}
|
} #endregion
|
||||||
}
|
}
|
|
@ -18,9 +18,9 @@ function Node_Cache(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
insp2UpdateTooltip = "Clear cache";
|
insp2UpdateTooltip = "Clear cache";
|
||||||
insp2UpdateIcon = [ THEME.cache, 0, COLORS._main_icon ];
|
insp2UpdateIcon = [ THEME.cache, 0, COLORS._main_icon ];
|
||||||
|
|
||||||
static onInspector2Update = function() { clearCache(); }
|
static onInspector2Update = function() { clearCache(true); }
|
||||||
|
|
||||||
static step = function() {
|
static step = function() { #region
|
||||||
if(cache_loading) {
|
if(cache_loading) {
|
||||||
cached_output[cache_loading_progress] = __surface_array_deserialize(cache_content[cache_loading_progress]);
|
cached_output[cache_loading_progress] = __surface_array_deserialize(cache_content[cache_loading_progress]);
|
||||||
cache_result[cache_loading_progress] = true;
|
cache_result[cache_loading_progress] = true;
|
||||||
|
@ -31,29 +31,29 @@ function Node_Cache(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static update = function() {
|
static update = function() { #region
|
||||||
if(recoverCache()) return;
|
if(recoverCache()) return;
|
||||||
if(!inputs[| 0].value_from) return;
|
if(!inputs[| 0].value_from) return;
|
||||||
|
|
||||||
var _surf = getInputData(0);
|
var _surf = getInputData(0);
|
||||||
cacheCurrentFrame(_surf);
|
cacheCurrentFrame(_surf);
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region
|
||||||
if(cache_loading)
|
if(cache_loading)
|
||||||
draw_sprite_ui(THEME.loading, 0, xx + w * _s / 2, yy + h * _s / 2, _s, _s, current_time / 2, COLORS._main_icon, 1);
|
draw_sprite_ui(THEME.loading, 0, xx + w * _s / 2, yy + h * _s / 2, _s, _s, current_time / 2, COLORS._main_icon, 1);
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static doSerialize = function(_map) {
|
static doSerialize = function(_map) { #region
|
||||||
_map.cache = surface_array_serialize(cached_output);
|
_map.cache = surface_array_serialize(cached_output);
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static postDeserialize = function() {
|
static postDeserialize = function() { #region
|
||||||
if(!struct_has(load_map, "cache")) return;
|
if(!struct_has(load_map, "cache")) return;
|
||||||
cache_content = json_try_parse(load_map.cache);
|
cache_content = json_try_parse(load_map.cache);
|
||||||
cache_loading_progress = 0;
|
cache_loading_progress = 0;
|
||||||
cache_loading = true;
|
cache_loading = true;
|
||||||
}
|
} #endregion
|
||||||
}
|
}
|
|
@ -396,15 +396,16 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc
|
||||||
var _or = 0;
|
var _or = 0;
|
||||||
var _ors = [];
|
var _ors = [];
|
||||||
|
|
||||||
for( var i = custom_input_index; i < ds_list_size(list); i++ ) {
|
for( var i = 0, n = ds_list_size(nodes); i < n; i++ ) {
|
||||||
var _in = list[| i];
|
var _n = nodes[| i];
|
||||||
array_push(_ors, _in.from.attributes.input_priority);
|
if(!struct_has(_n.attributes, "input_priority")) continue;
|
||||||
|
|
||||||
|
array_push(_ors, _n.attributes.input_priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
array_sort(_ors, true);
|
array_sort(_ors, true);
|
||||||
for( var i = 0, n = array_length(_ors); i < n; i++ )
|
for( var i = 0, n = array_length(_ors); i < n; i++ )
|
||||||
if(_or == _ors[i]) _or++;
|
if(_or == _ors[i]) _or++;
|
||||||
|
|
||||||
return _or;
|
return _or;
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
|
|
|
@ -1356,12 +1356,14 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
return true;
|
return true;
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static clearCache = function() { #region
|
static clearCache = function(_force = false) { #region
|
||||||
clearInputCache();
|
clearInputCache();
|
||||||
|
|
||||||
if(!clearCacheOnChange) return;
|
if(!_force) {
|
||||||
if(!use_cache) return;
|
if(!use_cache) return;
|
||||||
if(!isRenderActive()) return;
|
if(!clearCacheOnChange) return;
|
||||||
|
if(!isRenderActive()) return;
|
||||||
|
}
|
||||||
|
|
||||||
if(array_length(cached_output) != TOTAL_FRAMES)
|
if(array_length(cached_output) != TOTAL_FRAMES)
|
||||||
array_resize(cached_output, TOTAL_FRAMES);
|
array_resize(cached_output, TOTAL_FRAMES);
|
||||||
|
|
|
@ -12,12 +12,9 @@ function Node_DynaSurf_In(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
|
|
||||||
outputs[| 0] = nodeValue("Value", self, JUNCTION_CONNECT.output, VALUE_TYPE.PCXnode, noone);
|
outputs[| 0] = nodeValue("Value", self, JUNCTION_CONNECT.output, VALUE_TYPE.PCXnode, noone);
|
||||||
|
|
||||||
static createInput = function(override_order = true) { #region
|
static createInput = function() { #region
|
||||||
if(group == noone || !is_struct(group)) return noone;
|
if(group == noone || !is_struct(group)) return noone;
|
||||||
|
|
||||||
if(override_order)
|
|
||||||
attributes.input_priority = ds_list_size(group.inputs);
|
|
||||||
|
|
||||||
if(!is_undefined(inParent))
|
if(!is_undefined(inParent))
|
||||||
ds_list_remove(group.inputs, inParent);
|
ds_list_remove(group.inputs, inParent);
|
||||||
|
|
||||||
|
|
|
@ -35,12 +35,9 @@ function Node_Fluid_Render_Output(_x, _y, _group = noone) : Node_Group_Output(_x
|
||||||
|
|
||||||
static onInspector2Update = function() { clearCache(); }
|
static onInspector2Update = function() { clearCache(); }
|
||||||
|
|
||||||
static createOutput = function(override_order = true) { #region
|
static createOutput = function() { #region
|
||||||
if(group == noone) return;
|
if(group == noone) return;
|
||||||
if(!is_struct(group)) return;
|
if(!is_struct(group)) return;
|
||||||
|
|
||||||
if(override_order)
|
|
||||||
attributes.input_priority = ds_list_size(group.outputs);
|
|
||||||
|
|
||||||
if(!is_undefined(outParent))
|
if(!is_undefined(outParent))
|
||||||
ds_list_remove(group.outputs, outParent);
|
ds_list_remove(group.outputs, outParent);
|
||||||
|
|
|
@ -254,12 +254,9 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
}
|
}
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static createInput = function(override_order = true) { #region
|
static createInput = function() { #region
|
||||||
if(group == noone || !is_struct(group)) return noone;
|
if(group == noone || !is_struct(group)) return noone;
|
||||||
|
|
||||||
if(override_order)
|
|
||||||
attributes.input_priority = ds_list_size(group.inputs);
|
|
||||||
|
|
||||||
if(!is_undefined(inParent))
|
if(!is_undefined(inParent))
|
||||||
ds_list_remove(group.inputs, inParent);
|
ds_list_remove(group.inputs, inParent);
|
||||||
|
|
||||||
|
|
|
@ -65,13 +65,10 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
||||||
return nodes;
|
return nodes;
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static createOutput = function(override_order = true) { #region
|
static createOutput = function() { #region
|
||||||
if(group == noone) return;
|
if(group == noone) return;
|
||||||
if(!is_struct(group)) return;
|
if(!is_struct(group)) return;
|
||||||
|
|
||||||
if(override_order)
|
|
||||||
attributes.input_priority = ds_list_size(group.outputs);
|
|
||||||
|
|
||||||
if(!is_undefined(outParent))
|
if(!is_undefined(outParent))
|
||||||
ds_list_remove(group.outputs, outParent);
|
ds_list_remove(group.outputs, outParent);
|
||||||
|
|
||||||
|
@ -142,4 +139,10 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
||||||
static onLoadGroup = function() { #region
|
static onLoadGroup = function() { #region
|
||||||
if(group == noone) nodeDelete(self);
|
if(group == noone) nodeDelete(self);
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
|
//static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region
|
||||||
|
// var bbox = drawGetBbox(xx, yy, _s);
|
||||||
|
// draw_set_text(f_h5, fa_center, fa_center, c_white);
|
||||||
|
// draw_text(bbox.xc, bbox.yc, attributes.input_priority);
|
||||||
|
//} #endregion
|
||||||
}
|
}
|
|
@ -22,8 +22,9 @@ function Node_Path_Sample(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
||||||
var _rat = _data[1];
|
var _rat = _data[1];
|
||||||
var _mod = _data[2];
|
var _mod = _data[2];
|
||||||
|
|
||||||
if(_path == noone) return [ 0, 0 ];
|
if(_path == noone) return [ 0, 0 ];
|
||||||
if(!struct_has(_path, "getPointRatio")) return [ 0, 0 ];
|
if(!struct_has(_path, "getPointRatio")) return [ 0, 0 ];
|
||||||
|
if(!is_real(_rat)) return [ 0, 0 ];
|
||||||
var inv = false;
|
var inv = false;
|
||||||
|
|
||||||
switch(_mod) {
|
switch(_mod) {
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"resourceType": "GMScript",
|
"resourceType": "GMScript",
|
||||||
"resourceVersion": "1.0",
|
"resourceVersion": "1.0",
|
||||||
"name": "node_path_eval",
|
"name": "node_path_sample",
|
||||||
"isCompatibility": false,
|
"isCompatibility": false,
|
||||||
"isDnD": false,
|
"isDnD": false,
|
||||||
"parent": {
|
"parent": {
|
|
@ -37,12 +37,9 @@ function Node_Rigid_Render_Output(_x, _y, _group = noone) : Node_Group_Output(_x
|
||||||
.setVisible(true, true);
|
.setVisible(true, true);
|
||||||
} if(!LOADING && !APPENDING) createNewInput(); #endregion
|
} if(!LOADING && !APPENDING) createNewInput(); #endregion
|
||||||
|
|
||||||
static createOutput = function(override_order = true) { #region
|
static createOutput = function() { #region
|
||||||
if(group == noone) return;
|
if(group == noone) return;
|
||||||
if(!is_struct(group)) return;
|
if(!is_struct(group)) return;
|
||||||
|
|
||||||
if(override_order)
|
|
||||||
attributes.input_priority = ds_list_size(group.outputs);
|
|
||||||
|
|
||||||
if(!is_undefined(outParent))
|
if(!is_undefined(outParent))
|
||||||
ds_list_remove(group.outputs, outParent);
|
ds_list_remove(group.outputs, outParent);
|
||||||
|
|
|
@ -1618,8 +1618,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
|
|
||||||
static isArray = function(val = undefined) { #region
|
static isArray = function(val = undefined) { #region
|
||||||
if(val == undefined) {
|
if(val == undefined) {
|
||||||
if(cache_array[0])
|
if(cache_array[0]) return cache_array[1];
|
||||||
return cache_array[1];
|
|
||||||
val = getValue();
|
val = getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1650,8 +1649,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static arrayLength = function(val = undefined) { #region
|
static arrayLength = function(val = undefined) { #region
|
||||||
if(val == undefined)
|
if(val == undefined) val = getValue();
|
||||||
val = getValue();
|
|
||||||
|
|
||||||
if(!isArray(val))
|
if(!isArray(val))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue