Add channel selector to several filter nodes

This commit is contained in:
Tanasart 2023-11-09 10:02:41 +07:00
parent 1f6eab6a69
commit 320ba73b40
51 changed files with 256 additions and 77 deletions

View file

@ -494,6 +494,7 @@
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_youtube.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_youtube.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphics x2.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphics x2.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_area_strip2.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_area_strip2.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_channel.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_corner.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_corner.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_direction.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_direction.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_draw_line.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_draw_line.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",},

Binary file not shown.

View file

@ -11,6 +11,9 @@
#endregion #endregion
#region window #region window
window_set_min_width(960);
window_set_min_height(600);
if(OS == os_windows) { if(OS == os_windows) {
gameframe_init(); gameframe_init();
gameframe_set_cursor = false; gameframe_set_cursor = false;

View file

@ -361,7 +361,7 @@
[ "window_set_fullscreen", window_set_fullscreen ], [ "window_set_fullscreen", window_set_fullscreen ],
[ "window_set_position", window_set_position ], [ "window_set_position", window_set_position ],
[ "window_set_size", window_set_size ], [ "window_set_size", window_set_size ],
[ "window_set_rectangle", window_set_rectangle ], [ "gameframe_drag_set_rect", gameframe_drag_set_rect ],
[ "window_set_cursor", window_set_cursor ], [ "window_set_cursor", window_set_cursor ],
[ "window_set_min_width", window_set_min_width ], [ "window_set_min_width", window_set_min_width ],
[ "window_set_max_width", window_set_max_width ], [ "window_set_max_width", window_set_max_width ],

View file

@ -9,6 +9,7 @@
#macro ANIMATION_STATIC !(PROJECT.animator.is_playing || PROJECT.animator.frame_progress) #macro ANIMATION_STATIC !(PROJECT.animator.is_playing || PROJECT.animator.frame_progress)
#macro IS_PLAYING PROJECT.animator.is_playing #macro IS_PLAYING PROJECT.animator.is_playing
#macro CURRENT_FRAME PROJECT.animator.current_frame #macro CURRENT_FRAME PROJECT.animator.current_frame
#macro LAST_FRAME (CURRENT_FRAME == TOTAL_FRAMES - 1)
#macro TOTAL_FRAMES PROJECT.animator.frames_total #macro TOTAL_FRAMES PROJECT.animator.frames_total
#macro RENDERING PROJECT.animator.rendering #macro RENDERING PROJECT.animator.rendering
#macro IS_RENDERING array_length(PROJECT.animator.rendering) #macro IS_RENDERING array_length(PROJECT.animator.rendering)

View file

@ -569,7 +569,7 @@ function gameframe_tools_rect_get_window_rect(_this1) {
function gameframe_tools_rect_set_window_rect(_this1) { function gameframe_tools_rect_set_window_rect(_this1) {
// gameframe_tools_rect_set_window_rect(this:tools_GfRectImpl) // gameframe_tools_rect_set_window_rect(this:tools_GfRectImpl)
window_set_rectangle(_this1[0/* x */], _this1[1/* y */], _this1[2/* width */], _this1[3/* height */]); gameframe_drag_set_rect(_this1[0/* x */], _this1[1/* y */], _this1[2/* width */], _this1[3/* height */]);
} }
function gameframe_tools_rect_equals(_this1, _o) { function gameframe_tools_rect_equals(_this1, _o) {
@ -959,7 +959,7 @@ function gameframe_drag_stop() {
function gameframe_drag_set_rect(_x, _y, _w, _h) { function gameframe_drag_set_rect(_x, _y, _w, _h) {
// gameframe_drag_set_rect(x:int, y:int, w:int, h:int) // gameframe_drag_set_rect(x:int, y:int, w:int, h:int)
window_set_rectangle(_x, _y, _w, _h); window_set_rectangle(_x, _y, max(960, _w), max(600, _h));
} }
function gameframe_drag_update() { function gameframe_drag_update() {
@ -985,34 +985,34 @@ function gameframe_drag_update() {
var __y = gameframe_drag_my - gameframe_drag_top; var __y = gameframe_drag_my - gameframe_drag_top;
if (gameframe_drag_mx - gameframe_drag_left < (gameframe_drag_right - gameframe_drag_left) / 2) __x = min(gameframe_drag_mx - gameframe_drag_left, (gameframe_restoreRect_hx[2/* width */] >> 1)); else __x = max(gameframe_restoreRect_hx[2/* width */] + gameframe_drag_mx - gameframe_drag_right, (gameframe_restoreRect_hx[2/* width */] >> 1)); if (gameframe_drag_mx - gameframe_drag_left < (gameframe_drag_right - gameframe_drag_left) / 2) __x = min(gameframe_drag_mx - gameframe_drag_left, (gameframe_restoreRect_hx[2/* width */] >> 1)); else __x = max(gameframe_restoreRect_hx[2/* width */] + gameframe_drag_mx - gameframe_drag_right, (gameframe_restoreRect_hx[2/* width */] >> 1));
gameframe_isMaximized_hx = false; gameframe_isMaximized_hx = false;
window_set_rectangle(__mx - __x, __my - __y, gameframe_restoreRect_hx[2/* width */], gameframe_restoreRect_hx[3/* height */]); gameframe_drag_set_rect(__mx - __x, __my - __y, gameframe_restoreRect_hx[2/* width */], gameframe_restoreRect_hx[3/* height */]);
gameframe_drag_start(16); gameframe_drag_start(16);
} }
break; break;
case 1: case 1:
var __x = __mx - (gameframe_drag_mx - gameframe_drag_left); var __x = __mx - (gameframe_drag_mx - gameframe_drag_left);
window_set_rectangle(__x, gameframe_drag_top, gameframe_drag_right - __x, gameframe_drag_bottom - gameframe_drag_top); gameframe_drag_set_rect(__x, gameframe_drag_top, gameframe_drag_right - __x, gameframe_drag_bottom - gameframe_drag_top);
break; break;
case 2: case 2:
var __y = __my - (gameframe_drag_my - gameframe_drag_top); var __y = __my - (gameframe_drag_my - gameframe_drag_top);
window_set_rectangle(gameframe_drag_left, __y, gameframe_drag_right - gameframe_drag_left, gameframe_drag_bottom - __y); gameframe_drag_set_rect(gameframe_drag_left, __y, gameframe_drag_right - gameframe_drag_left, gameframe_drag_bottom - __y);
break; break;
case 4: window_set_rectangle(gameframe_drag_left, gameframe_drag_top, gameframe_drag_right - gameframe_drag_left - gameframe_drag_mx + __mx, gameframe_drag_bottom - gameframe_drag_top); break; case 4: gameframe_drag_set_rect(gameframe_drag_left, gameframe_drag_top, gameframe_drag_right - gameframe_drag_left - gameframe_drag_mx + __mx, gameframe_drag_bottom - gameframe_drag_top); break;
case 8: window_set_rectangle(gameframe_drag_left, gameframe_drag_top, gameframe_drag_right - gameframe_drag_left, gameframe_drag_bottom - gameframe_drag_top - gameframe_drag_my + __my); break; case 8: gameframe_drag_set_rect(gameframe_drag_left, gameframe_drag_top, gameframe_drag_right - gameframe_drag_left, gameframe_drag_bottom - gameframe_drag_top - gameframe_drag_my + __my); break;
case 3: case 3:
var __x = __mx - (gameframe_drag_mx - gameframe_drag_left); var __x = __mx - (gameframe_drag_mx - gameframe_drag_left);
var __y = __my - (gameframe_drag_my - gameframe_drag_top); var __y = __my - (gameframe_drag_my - gameframe_drag_top);
window_set_rectangle(__x, __y, gameframe_drag_right - __x, gameframe_drag_bottom - __y); gameframe_drag_set_rect(__x, __y, gameframe_drag_right - __x, gameframe_drag_bottom - __y);
break; break;
case 9: case 9:
var __x = __mx - (gameframe_drag_mx - gameframe_drag_left); var __x = __mx - (gameframe_drag_mx - gameframe_drag_left);
window_set_rectangle(__x, gameframe_drag_top, gameframe_drag_right - __x, gameframe_drag_bottom - gameframe_drag_top - gameframe_drag_my + __my); gameframe_drag_set_rect(__x, gameframe_drag_top, gameframe_drag_right - __x, gameframe_drag_bottom - gameframe_drag_top - gameframe_drag_my + __my);
break; break;
case 6: case 6:
var __y = __my - (gameframe_drag_my - gameframe_drag_top); var __y = __my - (gameframe_drag_my - gameframe_drag_top);
window_set_rectangle(gameframe_drag_left, __y, gameframe_drag_right - gameframe_drag_left - gameframe_drag_mx + __mx, gameframe_drag_bottom - __y); gameframe_drag_set_rect(gameframe_drag_left, __y, gameframe_drag_right - gameframe_drag_left - gameframe_drag_mx + __mx, gameframe_drag_bottom - __y);
break; break;
case 12: window_set_rectangle(gameframe_drag_left, gameframe_drag_top, gameframe_drag_right - gameframe_drag_left - gameframe_drag_mx + __mx, gameframe_drag_bottom - gameframe_drag_top - gameframe_drag_my + __my); break; case 12: gameframe_drag_set_rect(gameframe_drag_left, gameframe_drag_top, gameframe_drag_right - gameframe_drag_left - gameframe_drag_mx + __mx, gameframe_drag_bottom - gameframe_drag_top - gameframe_drag_my + __my); break;
} }
} }

View file

@ -41,7 +41,7 @@ function mac_window_maximize() {
room_height = _h; room_height = _h;
display_set_gui_size(_w, _h); display_set_gui_size(_w, _h);
window_set_rectangle(0, 0, _w, _h); gameframe_drag_set_rect(0, 0, _w, _h);
display_refresh(); display_refresh();
} }
@ -51,8 +51,6 @@ function mac_window_minimize() {
__win_is_maximized = false; __win_is_maximized = false;
window_set_position(__win_min_x, __win_min_y); gameframe_drag_set_rect(__win_min_x, __win_min_y, __win_min_w, __win_min_h);
window_set_size(__win_min_w, __win_min_h);
display_refresh(); display_refresh();
} }

View file

@ -9,16 +9,30 @@ function mac_window_step() {
window_set_position(__win_drag_sx + (_mx - __win_drag_mx), __win_drag_sy + (_my - __win_drag_my)); window_set_position(__win_drag_sx + (_mx - __win_drag_mx), __win_drag_sy + (_my - __win_drag_my));
else { else {
if((__win_is_dragging & WINDOW_DRAG_MODE.resize_n) != 0) { if((__win_is_dragging & WINDOW_DRAG_MODE.resize_n) != 0) {
window_set_size(__win_drag_sw, __win_drag_sh - (_my - __win_drag_my)); gameframe_drag_set_rect(
window_set_position(__win_drag_sx, __win_drag_sy + (_my - __win_drag_my)); __win_drag_sx,
__win_drag_sy + (_my - __win_drag_my),
__win_drag_sw,
__win_drag_sh - (_my - __win_drag_my)
);
} else if((__win_is_dragging & WINDOW_DRAG_MODE.resize_s) != 0) } else if((__win_is_dragging & WINDOW_DRAG_MODE.resize_s) != 0)
window_set_size(__win_drag_sw, __win_drag_sh + (_my - __win_drag_my)); window_set_size(
max(960, __win_drag_sw),
max(600, __win_drag_sh + (_my - __win_drag_my))
);
if((__win_is_dragging & WINDOW_DRAG_MODE.resize_w) != 0) { if((__win_is_dragging & WINDOW_DRAG_MODE.resize_w) != 0) {
window_set_size(__win_drag_sw - (_mx - __win_drag_mx), __win_drag_sh); gameframe_drag_set_rect(
window_set_position(__win_drag_sx + (_mx - __win_drag_mx), __win_drag_sy); __win_drag_sx + (_mx - __win_drag_mx),
__win_drag_sy,
__win_drag_sw - (_mx - __win_drag_mx),
__win_drag_sh
);
} else if((__win_is_dragging & WINDOW_DRAG_MODE.resize_e) != 0) } else if((__win_is_dragging & WINDOW_DRAG_MODE.resize_e) != 0)
window_set_size(__win_drag_sw + (_mx - __win_drag_mx), __win_drag_sh); window_set_size(
max(960, __win_drag_sw + (_mx - __win_drag_mx)),
max(600, __win_drag_sh)
);
} }
if(mouse_release(mb_left)) if(mouse_release(mb_left))

View file

@ -21,3 +21,27 @@ function mask_apply(original, edited, mask, mix = 1) {
surface_free(edited); surface_free(edited);
return _s; return _s;
} }
function channel_apply(original, edited, channel) {
if(channel == 0b1111) return edited;
var _f = surface_get_format(edited);
var _s = surface_create_size(original, _f);
surface_set_target(_s);
DRAW_CLEAR
BLEND_ADD
gpu_set_colorwriteenable(!(channel & 0b0001), !(channel & 0b0010), !(channel & 0b0100), !(channel & 0b1000));
draw_surface_safe(original);
gpu_set_colorwriteenable(channel & 0b0001, channel & 0b0010, channel & 0b0100, channel & 0b1000);
draw_surface_safe(edited);
gpu_set_colorwriteenable(1, 1, 1, 1);
BLEND_NORMAL
surface_reset_target();
surface_free(edited);
return _s;
}

View file

@ -216,6 +216,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
var widH = breakLine? editBoxH : 0; var widH = breakLine? editBoxH : 0;
var mbRight = true; var mbRight = true;
var wid = jun.editWidget;
if(jun.expUse) { #region expression editor if(jun.expUse) { #region expression editor
var expValid = jun.expTree != noone && jun.expTree.validate(); var expValid = jun.expTree != noone && jun.expTree.validate();
@ -229,14 +230,14 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
var wd_h = jun.express_edit.draw(editBoxX, editBoxY, editBoxW, editBoxH, jun.expression, _m); var wd_h = jun.express_edit.draw(editBoxX, editBoxY, editBoxW, editBoxH, jun.expression, _m);
widH = wd_h - (TEXTBOX_HEIGHT * !breakLine); widH = wd_h - (TEXTBOX_HEIGHT * !breakLine);
#endregion #endregion
} else if(jun.editWidget && jun.display_type != VALUE_DISPLAY.none) { #region edit widget } else if(wid && jun.display_type != VALUE_DISPLAY.none) { #region edit widget
jun.editWidget.setFocusHover(_focus, _hover); wid.setFocusHover(_focus, _hover);
if(jun.connect_type == JUNCTION_CONNECT.input) { if(jun.connect_type == JUNCTION_CONNECT.input) {
jun.editWidget.setInteract(!jun.hasJunctionFrom()); wid.setInteract(!jun.hasJunctionFrom());
if(_focus) jun.editWidget.register(_scrollPane); if(_focus) wid.register(_scrollPane);
} else { } else {
jun.editWidget.setInteract(false); wid.setInteract(false);
} }
var _show = jun.showValue(); var _show = jun.showValue();
@ -272,7 +273,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
break; break;
} }
var _widH = jun.editWidget.drawParam(param) ?? 0; var _widH = wid.drawParam(param) ?? 0;
widH = _widH - (TEXTBOX_HEIGHT * !breakLine); widH = _widH - (TEXTBOX_HEIGHT * !breakLine);
#endregion #endregion
} else if(jun.display_type == VALUE_DISPLAY.label) { #region label } else if(jun.display_type == VALUE_DISPLAY.label) { #region label

View file

@ -14,7 +14,10 @@ function Node_Average(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
inputs[| 3] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 3] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 3; active_index = 3;
input_display_list = [ 3, inputs[| 4] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
input_display_list = [ 3, 4,
["Surfaces", false], 0, 1, 2, ["Surfaces", false], 0, 1, 2,
] ]
@ -75,6 +78,7 @@ function Node_Average(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
surface_reset_target(); surface_reset_target();
_outSurf = mask_apply(_data[0], _outSurf, _data[1], _data[2]); _outSurf = mask_apply(_data[0], _outSurf, _data[1], _data[2]);
_outSurf = channel_apply(_data[0], _outSurf, _data[4]);
colors[_array_index] = cc; colors[_array_index] = cc;
return _outSurf; return _outSurf;

View file

@ -28,7 +28,10 @@ function Node_Bloom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 7; active_index = 7;
input_display_list = [ 7, inputs[| 8] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
input_display_list = [ 7, 8,
["Surfaces", true], 0, 5, 6, ["Surfaces", true], 0, 5, 6,
["Bloom", false], 1, 2, 3, 4, ["Bloom", false], 1, 2, 3, 4,
] ]
@ -81,6 +84,7 @@ function Node_Bloom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
surface_reset_target(); surface_reset_target();
_outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]); _outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]);
_outSurf = channel_apply(_data[0], _outSurf, _data[8]);
return _outSurf; return _outSurf;
} }

View file

@ -20,9 +20,12 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 7; active_index = 7;
inputs[| 8] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
input_display_list = [ 7, input_display_list = [ 7, 8,
["Surfaces", true], 0, 5, 6, ["Surfaces", true], 0, 5, 6,
["Blur", false], 1, 3, 4, ["Blur", false], 1, 3, 4,
]; ];
@ -49,6 +52,7 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
surface_reset_target(); surface_reset_target();
_outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix);
_outSurf = channel_apply(_data[0], _outSurf, _data[8]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -18,7 +18,10 @@ function Node_Blur_Bokeh(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
inputs[| 4] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 4] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 4; active_index = 4;
input_display_list = [ 4, inputs[| 5] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
input_display_list = [ 4, 5,
["Surfaces", true], 0, 2, 3, ["Surfaces", true], 0, 2, 3,
["Blur", false], 1, ["Blur", false], 1,
] ]
@ -46,6 +49,7 @@ function Node_Blur_Bokeh(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
surface_reset_target(); surface_reset_target();
_outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix);
_outSurf = channel_apply(_data[0], _outSurf, _data[5]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -23,7 +23,10 @@ function Node_Blur_Contrast(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 5; active_index = 5;
input_display_list = [ 5, inputs[| 6] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
input_display_list = [ 5, 6,
["Surfaces", true], 0, 3, 4, ["Surfaces", true], 0, 3, 4,
["Blur", false], 1, 2, ["Blur", false], 1, 2,
] ]
@ -70,6 +73,7 @@ function Node_Blur_Contrast(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
surface_reset_target(); surface_reset_target();
_outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix);
_outSurf = channel_apply(_data[0], _outSurf, _data[6]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -17,7 +17,10 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y,
inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 5; active_index = 5;
input_display_list = [ 5, inputs[| 6] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
input_display_list = [ 5, 6,
["Surfaces", true], 0, 3, 4, ["Surfaces", true], 0, 3, 4,
["Blur", false], 1, 2, ["Blur", false], 1, 2,
] ]
@ -55,6 +58,7 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y,
surface_reset_shader(); surface_reset_shader();
_outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix);
_outSurf = channel_apply(_data[0], _outSurf, _data[6]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -21,9 +21,12 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
inputs[| 6] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 6] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 6; active_index = 6;
inputs[| 7] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
input_display_list = [ 6, input_display_list = [ 6, 7,
["Surfaces", true], 0, 4, 5, ["Surfaces", true], 0, 4, 5,
["Blur", false], 1, 2, ["Blur", false], 1, 2,
]; ];
@ -61,6 +64,7 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
surface_reset_shader(); surface_reset_shader();
_outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix);
_outSurf = channel_apply(_data[0], _outSurf, _data[7]);
return _outSurf; return _outSurf;
} }

View file

@ -32,7 +32,10 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
inputs[| 8] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 8] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 8; active_index = 8;
input_display_list = [ 8, inputs[| 9] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
input_display_list = [ 8, 9,
["Surfaces", true], 0, 6, 7, ["Surfaces", true], 0, 6, 7,
["Blur", false], 1, 3, 4, 5, ["Blur", false], 1, 3, 4, 5,
]; ];
@ -77,6 +80,7 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
surface_reset_target(); surface_reset_target();
_outSurf = mask_apply(_data[0], _outSurf, _msk, _mix); _outSurf = mask_apply(_data[0], _outSurf, _msk, _mix);
_outSurf = channel_apply(_data[0], _outSurf, _data[9]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -25,9 +25,12 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
inputs[| 8] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 8] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 8; active_index = 8;
inputs[| 9] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
input_display_list = [ 8, input_display_list = [ 8, 9,
["Surfaces", true], 0, 6, 7, ["Surfaces", true], 0, 6, 7,
["Blur", false], 1, 2, 4, 5 ["Blur", false], 1, 2, 4, 5
]; ];
@ -70,6 +73,7 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
surface_reset_shader(); surface_reset_shader();
_outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix);
_outSurf = channel_apply(_data[0], _outSurf, _data[9]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -21,7 +21,10 @@ function Node_BW(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr
inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 5; active_index = 5;
input_display_list = [ 5, inputs[| 6] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
input_display_list = [ 5, 6,
["Surfaces", true], 0, 3, 4, ["Surfaces", true], 0, 3, 4,
["BW", false], 1, 2, ["BW", false], 1, 2,
] ]
@ -47,6 +50,7 @@ function Node_BW(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr
surface_reset_target(); surface_reset_target();
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
_outSurf = channel_apply(_data[0], _outSurf, _data[6]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -47,7 +47,7 @@ function __Node_Cache(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
static disableNodeGroup = function() { #region static disableNodeGroup = function() { #region
if(LOADING || APPENDING) return; if(LOADING || APPENDING) return;
if(IS_PLAYING && CURRENT_FRAME == TOTAL_FRAMES - 1) if(IS_PLAYING && LAST_FRAME)
for( var i = 0, n = array_length(cache_group_members); i < n; i++ ) for( var i = 0, n = array_length(cache_group_members); i < n; i++ )
cache_group_members[i].renderActive = false; cache_group_members[i].renderActive = false;
} #endregion } #endregion

View file

@ -37,7 +37,10 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
inputs[| 9] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 9] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 9; active_index = 9;
input_display_list = [ 9, inputs[| 10] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
input_display_list = [ 9, 10,
["Surfaces", true], 0, 7, 8, ["Surfaces", true], 0, 7, 8,
["Palette", false], 1, 2, ["Palette", false], 1, 2,
["Comparison", false], 3, 5, ["Comparison", false], 3, 5,
@ -98,6 +101,7 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
surface_reset_target(); surface_reset_target();
if(!in) _outSurf = mask_apply(_data[0], _outSurf, _data[7], _data[8]); if(!in) _outSurf = mask_apply(_data[0], _outSurf, _data[7], _data[8]);
_outSurf = channel_apply(_data[0], _outSurf, _data[10]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -26,7 +26,10 @@ function Node_Color_Remove(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
inputs[| 6] = nodeValue("Invert", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Keep the selected colors and remove the rest."); inputs[| 6] = nodeValue("Invert", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Keep the selected colors and remove the rest.");
input_display_list = [ 5, inputs[| 7] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
input_display_list = [ 5, 7,
["Surfaces", true], 0, 3, 4, ["Surfaces", true], 0, 3, 4,
["Remove", false], 1, 2, 6, ["Remove", false], 1, 2, 6,
] ]
@ -61,6 +64,7 @@ function Node_Color_Remove(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
surface_reset_target(); surface_reset_target();
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
_outSurf = channel_apply(_data[0], _outSurf, _data[7]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -26,7 +26,10 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
inputs[| 6] = nodeValue("Multiply alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 6] = nodeValue("Multiply alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
input_display_list = [ 5, inputs[| 7] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
input_display_list = [ 5, 7,
["Surfaces", true], 0, 3, 4, ["Surfaces", true], 0, 3, 4,
["Colorize", false], 1, 2, 6, ["Colorize", false], 1, 2, 6,
] ]
@ -63,6 +66,7 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
surface_reset_target(); surface_reset_target();
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
_outSurf = channel_apply(_data[0], _outSurf, _data[7]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -22,9 +22,12 @@ function Node_Convolution(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 5; active_index = 5;
inputs[| 6] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
input_display_list = [ 5, input_display_list = [ 5, 6,
["Surfaces", true], 0, 3, 4, ["Surfaces", true], 0, 3, 4,
["Kernel", false], 1, ["Kernel", false], 1,
]; ];
@ -51,6 +54,7 @@ function Node_Convolution(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
surface_reset_target(); surface_reset_target();
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
_outSurf = channel_apply(_data[0], _outSurf, _data[6]);
return _outSurf; return _outSurf;
} }

View file

@ -20,7 +20,10 @@ function Node_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
inputs[| 4] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 4] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 4; active_index = 4;
input_display_list = [ 4, inputs[| 5] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
input_display_list = [ 4, 5,
["Surfaces", true], 0, 2, 3, ["Surfaces", true], 0, 2, 3,
["Corner", false], 1, ["Corner", false], 1,
] ]
@ -63,6 +66,7 @@ function Node_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
surface_free(temp); surface_free(temp);
_outSurf = mask_apply(_data[0], _outSurf, _data[2], _data[3]); _outSurf = mask_apply(_data[0], _outSurf, _data[2], _data[3]);
_outSurf = channel_apply(_data[0], _outSurf, _data[5]);
return _outSurf; return _outSurf;
} }

View file

@ -32,9 +32,12 @@ function Node_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 7; active_index = 7;
inputs[| 8] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
input_display_list = [ 7, input_display_list = [ 7, 8,
["Surfaces", true], 0, 5, 6, ["Surfaces", true], 0, 5, 6,
["Curve", false], 1, 2, 3, 4, ["Curve", false], 1, 2, 3, 4,
]; ];
@ -68,6 +71,7 @@ function Node_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
surface_reset_target(); surface_reset_target();
_outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]); _outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]);
_outSurf = channel_apply(_data[0], _outSurf, _data[8]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -592,11 +592,13 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
onValueUpdate(index); onValueUpdate(index);
if(cache_group) cache_group.enableNodeGroup(); if(cache_group) cache_group.enableNodeGroup();
if(is_dynamic_input) setHeight();
} #endregion } #endregion
static valueFromUpdate = function(index) { #region static valueFromUpdate = function(index) { #region
onValueFromUpdate(index); onValueFromUpdate(index);
if(cache_group) cache_group.enableNodeGroup(); if(cache_group) cache_group.enableNodeGroup();
if(is_dynamic_input) setHeight();
} #endregion } #endregion
static onValueUpdate = function(index = 0) {} static onValueUpdate = function(index = 0) {}

View file

@ -30,9 +30,12 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 7; active_index = 7;
inputs[| 8] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
input_display_list = [ 7, input_display_list = [ 7, 8,
["Surfaces", true], 0, 5, 6, ["Surfaces", true], 0, 5, 6,
["Dilate", false], 1, 2, 3, ["Dilate", false], 1, 2, 3,
]; ];
@ -68,6 +71,7 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
surface_reset_shader(); surface_reset_shader();
_outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]); _outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]);
_outSurf = channel_apply(_data[0], _outSurf, _data[8]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -37,7 +37,10 @@ If set, then strength value control how many times the effect applies on itself.
inputs[| 11] = nodeValue("Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) inputs[| 11] = nodeValue("Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Overwrite", "Min", "Max" ]); .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Overwrite", "Min", "Max" ]);
input_display_list = [ 10, inputs[| 12] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
input_display_list = [ 10, 12,
["Surfaces", true], 0, 8, 9, ["Surfaces", true], 0, 8, 9,
["Displace", false], 1, 3, 4, ["Displace", false], 1, 3, 4,
["Color", false], 5, 2, ["Color", false], 5, 2,
@ -81,6 +84,7 @@ If set, then strength value control how many times the effect applies on itself.
surface_reset_shader(); surface_reset_shader();
_outSurf = mask_apply(_data[0], _outSurf, _data[8], _data[9]); _outSurf = mask_apply(_data[0], _outSurf, _data[8], _data[9]);
_outSurf = channel_apply(_data[0], _outSurf, _data[12]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -42,9 +42,12 @@ function Node_Dither(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
inputs[| 9] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 9] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 9; active_index = 9;
inputs[| 10] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
input_display_list = [ 9, input_display_list = [ 9, 10,
["Surfaces", true], 0, 7, 8, ["Surfaces", true], 0, 7, 8,
["Pattern", false], 2, 3, ["Pattern", false], 2, 3,
["Dither", false], 6, 1, 4, 5 ["Dither", false], 6, 1, 4, 5
@ -140,6 +143,7 @@ function Node_Dither(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
surface_reset_target(); surface_reset_target();
_outSurf = mask_apply(_data[0], _outSurf, _data[7], _data[8]); _outSurf = mask_apply(_data[0], _outSurf, _data[7], _data[8]);
_outSurf = channel_apply(_data[0], _outSurf, _data[10]);
return _outSurf; return _outSurf;
} }

View file

@ -22,9 +22,12 @@ function Node_Edge_Detect(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 5; active_index = 5;
inputs[| 6] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
input_display_list = [ 5, input_display_list = [ 5, 6,
["Surfaces", true], 0, 3, 4, ["Surfaces", true], 0, 3, 4,
["Edge detect", false], 1, ["Edge detect", false], 1,
]; ];
@ -51,6 +54,7 @@ function Node_Edge_Detect(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
surface_reset_target(); surface_reset_target();
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
_outSurf = channel_apply(_data[0], _outSurf, _data[6]);
return _outSurf; return _outSurf;
} }

View file

@ -23,7 +23,10 @@ function Node_Erode(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
inputs[| 6] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 6] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 6; active_index = 6;
input_display_list = [ 6, inputs[| 7] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
input_display_list = [ 6, 7,
["Surfaces", true], 0, 4, 5, ["Surfaces", true], 0, 4, 5,
["Erode", false], 1, 2, 3, ["Erode", false], 1, 2, 3,
] ]
@ -51,6 +54,7 @@ function Node_Erode(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
surface_reset_target(); surface_reset_target();
_outSurf = mask_apply(_data[0], _outSurf, _data[4], _data[5]); _outSurf = mask_apply(_data[0], _outSurf, _data[4], _data[5]);
_outSurf = channel_apply(_data[0], _outSurf, _data[7]);
return _outSurf; return _outSurf;
} }

View file

@ -769,7 +769,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
export(); export();
if(CURRENT_FRAME == TOTAL_FRAMES - 1) { if(LAST_FRAME) {
if(anim == NODE_EXPORT_FORMAT.sequence) if(anim == NODE_EXPORT_FORMAT.sequence)
array_remove(RENDERING, node_id); array_remove(RENDERING, node_id);
else if(anim == NODE_EXPORT_FORMAT.animation) else if(anim == NODE_EXPORT_FORMAT.animation)

View file

@ -13,7 +13,7 @@ function Node_Feedback_Output(_x, _y, _group = noone) : Node_Group_Output(_x, _y
static update = function(frame = CURRENT_FRAME) { static update = function(frame = CURRENT_FRAME) {
if(inputs[| 0].isLeaf()) return; if(inputs[| 0].isLeaf()) return;
if(CURRENT_FRAME == TOTAL_FRAMES - 1) { if(LAST_FRAME) {
cache_value = noone; cache_value = noone;
return; return;
} }

View file

@ -21,7 +21,10 @@ function Node_Greyscale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 5; active_index = 5;
input_display_list = [ 5, inputs[| 6] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
input_display_list = [ 5, 6,
["Surfaces", true], 0, 3, 4, ["Surfaces", true], 0, 3, 4,
["Greyscale", false], 1, 2, ["Greyscale", false], 1, 2,
] ]
@ -47,6 +50,7 @@ function Node_Greyscale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
surface_reset_target(); surface_reset_target();
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
_outSurf = channel_apply(_data[0], _outSurf, _data[6]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -11,7 +11,10 @@ function Node_Invert(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
inputs[| 3] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 3] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 3; active_index = 3;
input_display_list = [ 3, inputs[| 4] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
input_display_list = [ 3, 4,
["Surfaces", true], 0, 1, 2, ["Surfaces", true], 0, 1, 2,
] ]
@ -32,6 +35,7 @@ function Node_Invert(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
surface_reset_target(); surface_reset_target();
_outSurf = mask_apply(_data[0], _outSurf, _data[1], _data[2]); _outSurf = mask_apply(_data[0], _outSurf, _data[1], _data[2]);
_outSurf = channel_apply(_data[0], _outSurf, _data[4]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -38,6 +38,9 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
inputs[| 8] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 8] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 8; active_index = 8;
inputs[| 9] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
attribute_surface_depth(); attribute_surface_depth();
@ -75,7 +78,7 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
return _h; return _h;
}); #endregion }); #endregion
input_display_list = [ 8, input_display_list = [ 8, 9,
level_renderer, level_renderer,
["Surfaces", true], 0, 6, 7, ["Surfaces", true], 0, 6, 7,
["Level", false], 1, ["Level", false], 1,
@ -131,6 +134,7 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
surface_reset_target(); surface_reset_target();
_outSurf = mask_apply(_data[0], _outSurf, _data[6], _data[7]); _outSurf = mask_apply(_data[0], _outSurf, _data[6], _data[7]);
_outSurf = channel_apply(_data[0], _outSurf, _data[9]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -21,6 +21,9 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 5; active_index = 5;
inputs[| 6] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
attribute_surface_depth(); attribute_surface_depth();
@ -60,7 +63,7 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
return _h; return _h;
}); #endregion }); #endregion
input_display_list = [ 5, input_display_list = [ 5, 6,
level_renderer, level_renderer,
["Surfaces", true], 0, 3, 4, ["Surfaces", true], 0, 3, 4,
["Level", false], 1, 2, ["Level", false], 1, 2,
@ -99,6 +102,7 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
surface_reset_target(); surface_reset_target();
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
_outSurf = channel_apply(_data[0], _outSurf, _data[6]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -30,9 +30,12 @@ function Node_Local_Analyze(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 7; active_index = 7;
inputs[| 8] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
input_display_list = [ 7, input_display_list = [ 7, 8,
["Surfaces", true], 0, 5, 6, ["Surfaces", true], 0, 5, 6,
["Effect", false], 1, 2, 4, ["Effect", false], 1, 2, 4,
]; ];
@ -63,6 +66,7 @@ function Node_Local_Analyze(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
surface_reset_target(); surface_reset_target();
_outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]); _outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]);
_outSurf = channel_apply(_data[0], _outSurf, _data[8]);
return _outSurf; return _outSurf;
} }

View file

@ -17,7 +17,10 @@ function Node_Palette_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 5; active_index = 5;
input_display_list = [ 5, inputs[| 6] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
input_display_list = [ 5, 6,
["Surfaces", true], 0, 3, 4, ["Surfaces", true], 0, 3, 4,
["Palette", false], 1, 2 ["Palette", false], 1, 2
] ]
@ -46,6 +49,7 @@ function Node_Palette_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
surface_reset_shader(); surface_reset_shader();
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
_outSurf = channel_apply(_data[0], _outSurf, _data[6]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -25,7 +25,10 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
inputs[| 6] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 6] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 6; active_index = 6;
input_display_list = [ 6, inputs[| 7] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
input_display_list = [ 6, 7,
["Surfaces", true], 0, 4, 5, ["Surfaces", true], 0, 4, 5,
["Pixel sort", false], 1, 2, 3, ["Pixel sort", false], 1, 2, 3,
] ]
@ -87,6 +90,7 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
surface_free(pp[1]); surface_free(pp[1]);
_outSurf = mask_apply(_data[0], _outSurf, _data[4], _data[5]); _outSurf = mask_apply(_data[0], _outSurf, _data[4], _data[5]);
_outSurf = channel_apply(_data[0], _outSurf, _data[7]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -11,9 +11,12 @@ function Node_Polar(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
inputs[| 3] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 3] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 3; active_index = 3;
inputs[| 4] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
input_display_list = [ 3, input_display_list = [ 3, 4,
["Surfaces", false], 0, 1, 2, ["Surfaces", false], 0, 1, 2,
] ]
@ -27,6 +30,7 @@ function Node_Polar(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
surface_reset_shader(); surface_reset_shader();
_outSurf = mask_apply(_data[0], _outSurf, _data[1], _data[2]); _outSurf = mask_apply(_data[0], _outSurf, _data[1], _data[2]);
_outSurf = channel_apply(_data[0], _outSurf, _data[4]);
return _outSurf; return _outSurf;
} }

View file

@ -87,7 +87,9 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group)
if(grup != SPRITE_ANIM_GROUP.animation) { if(grup != SPRITE_ANIM_GROUP.animation) {
initRender(); initRender();
return; return;
} else if(IS_RENDERING && PROJECT.animator.frame_progress && CURRENT_FRAME == 0 && !refreshSurface) { }
if(IS_RENDERING && PROJECT.animator.frame_progress && CURRENT_FRAME == 0 && !refreshSurface) {
var skip = getInputData(2); var skip = getInputData(2);
var arr = is_array(inpt); var arr = is_array(inpt);
@ -247,6 +249,9 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group)
if(drawn) array_safe_set(anim_drawn, CURRENT_FRAME, true); if(drawn) array_safe_set(anim_drawn, CURRENT_FRAME, true);
outputs[| 1].setValue(_atl); outputs[| 1].setValue(_atl);
if(LAST_FRAME)
array_remove(RENDERING, node_id);
} #endregion } #endregion
static onInspector1Update = function(updateAll = true) { #region static onInspector1Update = function(updateAll = true) { #region
@ -261,6 +266,8 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group)
node.initRender(); node.initRender();
} }
array_push(RENDERING, node_id);
} #endregion } #endregion
static initRender = function() { #region static initRender = function() { #region

View file

@ -26,7 +26,10 @@ function Node_Skew(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
inputs[| 8] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 8] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 8; active_index = 8;
input_display_list = [ 8, inputs[| 9] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
input_display_list = [ 8, 9,
["Surfaces", true], 0, 6, 7, ["Surfaces", true], 0, 6, 7,
["Skew", false], 1, 2, 4, ["Skew", false], 1, 2, 4,
] ]
@ -67,6 +70,7 @@ function Node_Skew(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
surface_reset_shader(); surface_reset_shader();
_outSurf = mask_apply(_data[0], _outSurf, _data[6], _data[7]); _outSurf = mask_apply(_data[0], _outSurf, _data[6], _data[7]);
_outSurf = channel_apply(_data[0], _outSurf, _data[9]);
return _outSurf; return _outSurf;
} }

View file

@ -27,9 +27,12 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
inputs[| 9] = nodeValue("Alpha Smoothness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) inputs[| 9] = nodeValue("Alpha Smoothness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
.setDisplay(VALUE_DISPLAY.slider); .setDisplay(VALUE_DISPLAY.slider);
inputs[| 10] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
input_display_list = [ 6, input_display_list = [ 6, 10,
["Surfaces", true], 0, 4, 5, ["Surfaces", true], 0, 4, 5,
["Threshold", false], 1, 2, 3, 7, 8, 9, ["Threshold", false], 1, 2, 3, 7, 8, 9,
]; ];
@ -68,6 +71,7 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
surface_reset_shader(); surface_reset_shader();
_outSurf = mask_apply(_data[0], _outSurf, _data[4], _data[5]); _outSurf = mask_apply(_data[0], _outSurf, _data[4], _data[5]);
_outSurf = channel_apply(_data[0], _outSurf, _data[10]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -30,9 +30,12 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 7; active_index = 7;
inputs[| 8] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
input_display_list = [ 7, input_display_list = [ 7, 8,
["Surfaces", true], 0, 5, 6, ["Surfaces", true], 0, 5, 6,
["Twirl", false], 1, 2, 3, ["Twirl", false], 1, 2, 3,
]; ];
@ -67,6 +70,7 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
surface_reset_shader(); surface_reset_shader();
_outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]); _outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]);
_outSurf = channel_apply(_data[0], _outSurf, _data[8]);
return _outSurf; return _outSurf;
} #endregion } #endregion

View file

@ -156,8 +156,8 @@
map.key = save_l; map.key = save_l;
PREFERENCES.window_maximize = gameframe_is_maximized(); PREFERENCES.window_maximize = gameframe_is_maximized();
PREFERENCES.window_width = WIN_W; PREFERENCES.window_width = max(960, WIN_W);
PREFERENCES.window_height = WIN_H; PREFERENCES.window_height = max(600, WIN_H);
map.preferences = PREFERENCES; map.preferences = PREFERENCES;

View file

@ -33,7 +33,7 @@ function toggleGroup(_data, _onClick) : widget() constructor {
h = _h; h = _h;
value = _data; value = _data;
if(!is_array(_data)) return 0; if(is_array(_data)) return 0;
var amo = array_length(data); var amo = array_length(data);
var ww = _w / amo; var ww = _w / amo;