- Fix node deletion not merge all connections.

This commit is contained in:
Tanasart 2024-07-23 15:51:13 +07:00
parent 20c89a5d3d
commit 2e314c343f
17 changed files with 31 additions and 26 deletions

View file

@ -38,7 +38,7 @@
LATEST_VERSION = 11700;
VERSION = 11770;
SAVE_VERSION = 11700;
VERSION_STRING = "1.17.8.006";
VERSION_STRING = "1.17.8";
BUILD_NUMBER = 11770;
globalvar HOTKEYS, HOTKEY_CONTEXT;

View file

@ -2359,22 +2359,27 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
PANEL_PREVIEW.removeNodePreview(self);
var val_from_map = {};
for( var i = 0; i < ds_list_size(inputs); i++ ) {
var _i = inputs[| i];
if(_i.value_from == noone) continue;
val_from_map[$ _i.type] = _i.value_from;
}
for(var i = 0; i < ds_list_size(outputs); i++) {
var jun = outputs[| i];
for(var j = 0; j < array_length(jun.value_to); j++) {
for(var j = array_length(jun.value_to) - 1; j >= 0; j--) {
var _vt = jun.value_to[j];
if(_vt.value_from == noone) break;
if(_vt.value_from.node != self) break;
if(_merge) {
for( var k = 0; k < ds_list_size(inputs); k++ ) {
if(inputs[| k].value_from == noone) continue;
if(_vt.setFrom(inputs[| k].value_from)) break;
}
} else {
if(_vt.value_from == noone || _vt.value_from.node != self)
continue;
if(_merge && struct_has(val_from_map, _vt.type))
_vt.setFrom(val_from_map[$ _vt.type]);
else
_vt.removeFrom(false);
}
}
jun.value_to = [];

View file

@ -158,7 +158,7 @@ function shader_set_color(uniform, col, alpha = 1) {
shader_set_f(uniform, colToVec4(col, alpha));
}
function shader_set_palette(pal, pal_uni = "palette", amo_uni = "paletteAmount", max_length = 128) {
function shader_set_palette(pal, pal_uni = "palette", amo_uni = "paletteAmount", max_length = 1024) {
INLINE
shader_set_i(amo_uni, min(max_length, array_length(pal)));

View file

@ -1,5 +1,5 @@
{
"$GMScript":"v1",
"$GMScript":"",
"%Name":"shader_functions",
"isCompatibility":false,
"isDnD":false,

View file

@ -5,7 +5,7 @@ uniform float tolerance;
uniform int useMask;
uniform sampler2D mask;
#define PALETTE_LIMIT 128
#define PALETTE_LIMIT 1024
uniform vec4 colorTarget[PALETTE_LIMIT];
uniform int colorTargetAmount;

View file

@ -4,7 +4,7 @@ varying vec4 v_vColour;
uniform float seed;
uniform float ratio;
#define PALETTE_LIMIT 128
#define PALETTE_LIMIT 1024
uniform int usePalette;
uniform vec4 palette[PALETTE_LIMIT];

View file

@ -5,7 +5,7 @@ varying vec2 v_vTexcoord;
varying vec4 v_vColour;
uniform float hue;
#define PALETTE_LIMIT 128
#define PALETTE_LIMIT 1024
uniform int usePalette;
uniform vec4 palette[PALETTE_LIMIT];

View file

@ -4,7 +4,7 @@
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
#define PALETTE_LIMIT 128
#define PALETTE_LIMIT 1024
uniform float sat;
uniform float value;

View file

@ -4,7 +4,7 @@
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
#define PALETTE_LIMIT 128
#define PALETTE_LIMIT 1024
uniform float hue;
uniform float sat;

View file

@ -4,7 +4,7 @@
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
#define PALETTE_LIMIT 128
#define PALETTE_LIMIT 1024
uniform float value;

View file

@ -1,4 +1,4 @@
#define PALETTE_LIMIT 128
#define PALETTE_LIMIT 1024
varying vec2 v_vTexcoord;
varying vec4 v_vColour;

View file

@ -1,4 +1,4 @@
#define PALETTE_LIMIT 128
#define PALETTE_LIMIT 1024
varying vec2 v_vTexcoord;
varying vec4 v_vColour;

View file

@ -15,7 +15,7 @@ uniform int useConMap;
uniform float ditherSize;
uniform float dither[64];
uniform vec2 dimension;
uniform vec4 palette[32];
uniform vec4 palette[1024];
uniform int keys;
uniform float seed;

View file

@ -1,4 +1,4 @@
#define PALETTE_LIMIT 128
#define PALETTE_LIMIT 1024
varying vec2 v_vTexcoord;
varying vec4 v_vColour;

View file

@ -1,4 +1,4 @@
#define PALETTE_LIMIT 128
#define PALETTE_LIMIT 1024
varying vec2 v_vTexcoord;
varying vec4 v_vColour;

View file

@ -1,7 +1,7 @@
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
#define PALETTE_LIMIT 128
#define PALETTE_LIMIT 1024
uniform vec4 palette[PALETTE_LIMIT];
uniform int keys;

View file

@ -2,7 +2,7 @@ varying vec2 v_vTexcoord;
varying vec4 v_vColour;
#define PI 3.14159265359
#define PALETTE_LIMIT 128
#define PALETTE_LIMIT 1024
uniform float seed;
uniform vec2 dimension;