2023-06-01 10:32:21 +02:00
|
|
|
function Node_Iterate(_x, _y, _group = noone) : Node_Iterator(_x, _y, _group) constructor {
|
2022-01-25 04:05:30 +01:00
|
|
|
name = "Loop";
|
2022-11-18 03:20:31 +01:00
|
|
|
color = COLORS.node_blend_loop;
|
|
|
|
icon = THEME.loop;
|
2022-01-23 04:08:16 +01:00
|
|
|
|
2023-06-01 10:32:21 +02:00
|
|
|
reset_all_child = true;
|
2023-02-19 13:49:20 +01:00
|
|
|
combine_render_time = false;
|
2022-01-23 04:08:16 +01:00
|
|
|
iterated = 0;
|
|
|
|
|
2023-07-25 20:12:40 +02:00
|
|
|
inputs[| 0] = nodeValue("Repeat", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1 )
|
|
|
|
.uncache();
|
2022-01-23 04:08:16 +01:00
|
|
|
|
2023-01-25 06:49:00 +01:00
|
|
|
custom_input_index = ds_list_size(inputs);
|
2022-01-25 10:58:11 +01:00
|
|
|
loop_start_time = 0;
|
2022-12-13 09:20:36 +01:00
|
|
|
ALWAYS_FULL = true;
|
2022-01-23 04:08:16 +01:00
|
|
|
|
2023-01-17 08:11:55 +01:00
|
|
|
if(!LOADING && !APPENDING && !CLONING) {
|
2022-12-13 09:20:36 +01:00
|
|
|
var input = nodeBuild("Node_Iterator_Input", -256, -32, self);
|
|
|
|
var output = nodeBuild("Node_Iterator_Output", 256, -32, self);
|
2022-12-12 09:08:03 +01:00
|
|
|
|
2023-01-25 06:49:00 +01:00
|
|
|
input.inputs[| 2].setValue(4);
|
2022-12-13 09:20:36 +01:00
|
|
|
output.inputs[| 2].setFrom(input.outputs[| 1]);
|
|
|
|
}
|
|
|
|
|
2023-10-02 08:57:44 +02:00
|
|
|
static getIterationCount = function() { return getInputData(0); }
|
2023-03-08 14:59:54 +01:00
|
|
|
|
|
|
|
PATCH_STATIC
|
2022-01-23 04:08:16 +01:00
|
|
|
}
|