diff --git a/PixelComposer.yyp b/PixelComposer.yyp index 9c9c875c4..97585e9bc 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -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":"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_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_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",}, diff --git a/datafiles/data/themes/default.zip b/datafiles/data/themes/default.zip index ac9ddd50a..3ab3b20fd 100644 Binary files a/datafiles/data/themes/default.zip and b/datafiles/data/themes/default.zip differ diff --git a/objects/o_main/Create_0.gml b/objects/o_main/Create_0.gml index 7ed9b8db2..ec81df14a 100644 --- a/objects/o_main/Create_0.gml +++ b/objects/o_main/Create_0.gml @@ -11,6 +11,9 @@ #endregion #region window + window_set_min_width(960); + window_set_min_height(600); + if(OS == os_windows) { gameframe_init(); gameframe_set_cursor = false; diff --git a/scripts/addon_lua_function/addon_lua_function.gml b/scripts/addon_lua_function/addon_lua_function.gml index c5dff7227..5468fe78c 100644 --- a/scripts/addon_lua_function/addon_lua_function.gml +++ b/scripts/addon_lua_function/addon_lua_function.gml @@ -361,7 +361,7 @@ [ "window_set_fullscreen", window_set_fullscreen ], [ "window_set_position", window_set_position ], [ "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_min_width", window_set_min_width ], [ "window_set_max_width", window_set_max_width ], diff --git a/scripts/animation_controller/animation_controller.gml b/scripts/animation_controller/animation_controller.gml index b6408884f..fb2cafaa5 100644 --- a/scripts/animation_controller/animation_controller.gml +++ b/scripts/animation_controller/animation_controller.gml @@ -9,6 +9,7 @@ #macro ANIMATION_STATIC !(PROJECT.animator.is_playing || PROJECT.animator.frame_progress) #macro IS_PLAYING PROJECT.animator.is_playing #macro CURRENT_FRAME PROJECT.animator.current_frame + #macro LAST_FRAME (CURRENT_FRAME == TOTAL_FRAMES - 1) #macro TOTAL_FRAMES PROJECT.animator.frames_total #macro RENDERING PROJECT.animator.rendering #macro IS_RENDERING array_length(PROJECT.animator.rendering) diff --git a/scripts/gameframe/gameframe.gml b/scripts/gameframe/gameframe.gml index 5b0b3fa4a..5f8b1e97f 100644 --- a/scripts/gameframe/gameframe.gml +++ b/scripts/gameframe/gameframe.gml @@ -569,7 +569,7 @@ function gameframe_tools_rect_get_window_rect(_this1) { function gameframe_tools_rect_set_window_rect(_this1) { // 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) { @@ -959,7 +959,7 @@ function gameframe_drag_stop() { function gameframe_drag_set_rect(_x, _y, _w, _h) { // 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() { @@ -985,34 +985,34 @@ function gameframe_drag_update() { 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)); 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); } break; case 1: 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; case 2: 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; - 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 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 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: 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: var __x = __mx - (gameframe_drag_mx - gameframe_drag_left); 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; case 9: 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; case 6: 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; - 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; } } diff --git a/scripts/mac_window_init/mac_window_init.gml b/scripts/mac_window_init/mac_window_init.gml index 3e49758a4..32ea01d8f 100644 --- a/scripts/mac_window_init/mac_window_init.gml +++ b/scripts/mac_window_init/mac_window_init.gml @@ -41,7 +41,7 @@ function mac_window_maximize() { room_height = _h; display_set_gui_size(_w, _h); - window_set_rectangle(0, 0, _w, _h); + gameframe_drag_set_rect(0, 0, _w, _h); display_refresh(); } @@ -51,8 +51,6 @@ function mac_window_minimize() { __win_is_maximized = false; - window_set_position(__win_min_x, __win_min_y); - window_set_size(__win_min_w, __win_min_h); - + gameframe_drag_set_rect(__win_min_x, __win_min_y, __win_min_w, __win_min_h); display_refresh(); } \ No newline at end of file diff --git a/scripts/mac_window_step/mac_window_step.gml b/scripts/mac_window_step/mac_window_step.gml index 79ff7e12b..757718983 100644 --- a/scripts/mac_window_step/mac_window_step.gml +++ b/scripts/mac_window_step/mac_window_step.gml @@ -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)); else { if((__win_is_dragging & WINDOW_DRAG_MODE.resize_n) != 0) { - window_set_size(__win_drag_sw, __win_drag_sh - (_my - __win_drag_my)); - window_set_position(__win_drag_sx, __win_drag_sy + (_my - __win_drag_my)); + gameframe_drag_set_rect( + __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) - 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) { - window_set_size(__win_drag_sw - (_mx - __win_drag_mx), __win_drag_sh); - window_set_position(__win_drag_sx + (_mx - __win_drag_mx), __win_drag_sy); + gameframe_drag_set_rect( + __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) - 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)) diff --git a/scripts/mask_function/mask_function.gml b/scripts/mask_function/mask_function.gml index edcf283d1..0bd8a2587 100644 --- a/scripts/mask_function/mask_function.gml +++ b/scripts/mask_function/mask_function.gml @@ -18,6 +18,30 @@ function mask_apply(original, edited, mask, mix = 1) { shader_reset(); surface_reset_target(); + surface_free(edited); + 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; } \ No newline at end of file diff --git a/scripts/nodeValue_drawer/nodeValue_drawer.gml b/scripts/nodeValue_drawer/nodeValue_drawer.gml index ac5732c21..9d8da6e44 100644 --- a/scripts/nodeValue_drawer/nodeValue_drawer.gml +++ b/scripts/nodeValue_drawer/nodeValue_drawer.gml @@ -216,6 +216,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc var widH = breakLine? editBoxH : 0; var mbRight = true; + var wid = jun.editWidget; if(jun.expUse) { #region expression editor 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); widH = wd_h - (TEXTBOX_HEIGHT * !breakLine); #endregion - } else if(jun.editWidget && jun.display_type != VALUE_DISPLAY.none) { #region edit widget - jun.editWidget.setFocusHover(_focus, _hover); + } else if(wid && jun.display_type != VALUE_DISPLAY.none) { #region edit widget + wid.setFocusHover(_focus, _hover); if(jun.connect_type == JUNCTION_CONNECT.input) { - jun.editWidget.setInteract(!jun.hasJunctionFrom()); - if(_focus) jun.editWidget.register(_scrollPane); + wid.setInteract(!jun.hasJunctionFrom()); + if(_focus) wid.register(_scrollPane); } else { - jun.editWidget.setInteract(false); + wid.setInteract(false); } var _show = jun.showValue(); @@ -272,7 +273,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc break; } - var _widH = jun.editWidget.drawParam(param) ?? 0; + var _widH = wid.drawParam(param) ?? 0; widH = _widH - (TEXTBOX_HEIGHT * !breakLine); #endregion } else if(jun.display_type == VALUE_DISPLAY.label) { #region label diff --git a/scripts/node_average/node_average.gml b/scripts/node_average/node_average.gml index 2fc9e2d7a..a91a7d306 100644 --- a/scripts/node_average/node_average.gml +++ b/scripts/node_average/node_average.gml @@ -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); 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, ] @@ -75,6 +78,7 @@ function Node_Average(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c surface_reset_target(); _outSurf = mask_apply(_data[0], _outSurf, _data[1], _data[2]); + _outSurf = channel_apply(_data[0], _outSurf, _data[4]); colors[_array_index] = cc; return _outSurf; diff --git a/scripts/node_bloom/node_bloom.gml b/scripts/node_bloom/node_bloom.gml index 87fb5a671..97167141f 100644 --- a/scripts/node_bloom/node_bloom.gml +++ b/scripts/node_bloom/node_bloom.gml @@ -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); 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, ["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(); _outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]); + _outSurf = channel_apply(_data[0], _outSurf, _data[8]); return _outSurf; } diff --git a/scripts/node_blur/node_blur.gml b/scripts/node_blur/node_blur.gml index 73c2a0b46..f45a8a1b9 100644 --- a/scripts/node_blur/node_blur.gml +++ b/scripts/node_blur/node_blur.gml @@ -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); 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); - input_display_list = [ 7, + input_display_list = [ 7, 8, ["Surfaces", true], 0, 5, 6, ["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(); _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); + _outSurf = channel_apply(_data[0], _outSurf, _data[8]); return _outSurf; } #endregion diff --git a/scripts/node_blur_bokeh/node_blur_bokeh.gml b/scripts/node_blur_bokeh/node_blur_bokeh.gml index 20ddf98f5..46d40b9a0 100644 --- a/scripts/node_blur_bokeh/node_blur_bokeh.gml +++ b/scripts/node_blur_bokeh/node_blur_bokeh.gml @@ -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); 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, ["Blur", false], 1, ] @@ -46,6 +49,7 @@ function Node_Blur_Bokeh(_x, _y, _group = noone) : Node_Processor(_x, _y, _group surface_reset_target(); _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); + _outSurf = channel_apply(_data[0], _outSurf, _data[5]); return _outSurf; } #endregion diff --git a/scripts/node_blur_contrast/node_blur_contrast.gml b/scripts/node_blur_contrast/node_blur_contrast.gml index 97787bfbc..26e8e4610 100644 --- a/scripts/node_blur_contrast/node_blur_contrast.gml +++ b/scripts/node_blur_contrast/node_blur_contrast.gml @@ -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); 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, ["Blur", false], 1, 2, ] @@ -70,6 +73,7 @@ function Node_Blur_Contrast(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr surface_reset_target(); _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); + _outSurf = channel_apply(_data[0], _outSurf, _data[6]); return _outSurf; } #endregion diff --git a/scripts/node_blur_directional/node_blur_directional.gml b/scripts/node_blur_directional/node_blur_directional.gml index f88662d56..446d8fc26 100644 --- a/scripts/node_blur_directional/node_blur_directional.gml +++ b/scripts/node_blur_directional/node_blur_directional.gml @@ -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); 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, ["Blur", false], 1, 2, ] @@ -55,6 +58,7 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y, surface_reset_shader(); _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); + _outSurf = channel_apply(_data[0], _outSurf, _data[6]); return _outSurf; } #endregion diff --git a/scripts/node_blur_radial/node_blur_radial.gml b/scripts/node_blur_radial/node_blur_radial.gml index e46f80a2c..604172169 100644 --- a/scripts/node_blur_radial/node_blur_radial.gml +++ b/scripts/node_blur_radial/node_blur_radial.gml @@ -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); 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); - input_display_list = [ 6, + input_display_list = [ 6, 7, ["Surfaces", true], 0, 4, 5, ["Blur", false], 1, 2, ]; @@ -61,6 +64,7 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou surface_reset_shader(); _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); + _outSurf = channel_apply(_data[0], _outSurf, _data[7]); return _outSurf; } diff --git a/scripts/node_blur_simple/node_blur_simple.gml b/scripts/node_blur_simple/node_blur_simple.gml index 8fde079c1..809f77fb7 100644 --- a/scripts/node_blur_simple/node_blur_simple.gml +++ b/scripts/node_blur_simple/node_blur_simple.gml @@ -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); 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, ["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(); _outSurf = mask_apply(_data[0], _outSurf, _msk, _mix); + _outSurf = channel_apply(_data[0], _outSurf, _data[9]); return _outSurf; } #endregion diff --git a/scripts/node_blur_zoom/node_blur_zoom.gml b/scripts/node_blur_zoom/node_blur_zoom.gml index ef23e7479..6f6c10885 100644 --- a/scripts/node_blur_zoom/node_blur_zoom.gml +++ b/scripts/node_blur_zoom/node_blur_zoom.gml @@ -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); 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); - input_display_list = [ 8, + input_display_list = [ 8, 9, ["Surfaces", true], 0, 6, 7, ["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(); _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); + _outSurf = channel_apply(_data[0], _outSurf, _data[9]); return _outSurf; } #endregion diff --git a/scripts/node_bw/node_bw.gml b/scripts/node_bw/node_bw.gml index e7c26d354..51bd5d04a 100644 --- a/scripts/node_bw/node_bw.gml +++ b/scripts/node_bw/node_bw.gml @@ -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); 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, ["BW", false], 1, 2, ] @@ -47,6 +50,7 @@ function Node_BW(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr surface_reset_target(); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); + _outSurf = channel_apply(_data[0], _outSurf, _data[6]); return _outSurf; } #endregion diff --git a/scripts/node_cache_base/node_cache_base.gml b/scripts/node_cache_base/node_cache_base.gml index a7e485b48..00c0dc1f3 100644 --- a/scripts/node_cache_base/node_cache_base.gml +++ b/scripts/node_cache_base/node_cache_base.gml @@ -47,7 +47,7 @@ function __Node_Cache(_x, _y, _group = noone) : Node(_x, _y, _group) constructor static disableNodeGroup = function() { #region 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++ ) cache_group_members[i].renderActive = false; } #endregion diff --git a/scripts/node_color_palette_replacement/node_color_palette_replacement.gml b/scripts/node_color_palette_replacement/node_color_palette_replacement.gml index 4a2b558d4..bc2b8b327 100644 --- a/scripts/node_color_palette_replacement/node_color_palette_replacement.gml +++ b/scripts/node_color_palette_replacement/node_color_palette_replacement.gml @@ -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); 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, ["Palette", false], 1, 2, ["Comparison", false], 3, 5, @@ -98,6 +101,7 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr surface_reset_target(); if(!in) _outSurf = mask_apply(_data[0], _outSurf, _data[7], _data[8]); + _outSurf = channel_apply(_data[0], _outSurf, _data[10]); return _outSurf; } #endregion diff --git a/scripts/node_color_remove/node_color_remove.gml b/scripts/node_color_remove/node_color_remove.gml index 50f636940..f2c7fa9f7 100644 --- a/scripts/node_color_remove/node_color_remove.gml +++ b/scripts/node_color_remove/node_color_remove.gml @@ -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."); - 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, ["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(); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); + _outSurf = channel_apply(_data[0], _outSurf, _data[7]); return _outSurf; } #endregion diff --git a/scripts/node_colorize/node_colorize.gml b/scripts/node_colorize/node_colorize.gml index 05003f27c..d32947f97 100644 --- a/scripts/node_colorize/node_colorize.gml +++ b/scripts/node_colorize/node_colorize.gml @@ -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); - 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, ["Colorize", false], 1, 2, 6, ] @@ -63,6 +66,7 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) surface_reset_target(); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); + _outSurf = channel_apply(_data[0], _outSurf, _data[7]); return _outSurf; } #endregion diff --git a/scripts/node_convolution/node_convolution.gml b/scripts/node_convolution/node_convolution.gml index b55859563..98912d63d 100644 --- a/scripts/node_convolution/node_convolution.gml +++ b/scripts/node_convolution/node_convolution.gml @@ -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); 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); - input_display_list = [ 5, + input_display_list = [ 5, 6, ["Surfaces", true], 0, 3, 4, ["Kernel", false], 1, ]; @@ -51,6 +54,7 @@ function Node_Convolution(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou surface_reset_target(); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); + _outSurf = channel_apply(_data[0], _outSurf, _data[6]); return _outSurf; } diff --git a/scripts/node_corner/node_corner.gml b/scripts/node_corner/node_corner.gml index bbc37f28c..705a00e1b 100644 --- a/scripts/node_corner/node_corner.gml +++ b/scripts/node_corner/node_corner.gml @@ -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); 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, ["Corner", false], 1, ] @@ -63,6 +66,7 @@ function Node_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co surface_free(temp); _outSurf = mask_apply(_data[0], _outSurf, _data[2], _data[3]); + _outSurf = channel_apply(_data[0], _outSurf, _data[5]); return _outSurf; } diff --git a/scripts/node_curve/node_curve.gml b/scripts/node_curve/node_curve.gml index 7dd05ed64..c9fc099e1 100644 --- a/scripts/node_curve/node_curve.gml +++ b/scripts/node_curve/node_curve.gml @@ -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); 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); - input_display_list = [ 7, + input_display_list = [ 7, 8, ["Surfaces", true], 0, 5, 6, ["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(); _outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]); + _outSurf = channel_apply(_data[0], _outSurf, _data[8]); return _outSurf; } #endregion diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index d90aa2007..126f22a0d 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -592,11 +592,13 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x onValueUpdate(index); if(cache_group) cache_group.enableNodeGroup(); + if(is_dynamic_input) setHeight(); } #endregion static valueFromUpdate = function(index) { #region onValueFromUpdate(index); if(cache_group) cache_group.enableNodeGroup(); + if(is_dynamic_input) setHeight(); } #endregion static onValueUpdate = function(index = 0) {} diff --git a/scripts/node_dilate/node_dilate.gml b/scripts/node_dilate/node_dilate.gml index 283479699..b55d6da1e 100644 --- a/scripts/node_dilate/node_dilate.gml +++ b/scripts/node_dilate/node_dilate.gml @@ -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); 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); - input_display_list = [ 7, + input_display_list = [ 7, 8, ["Surfaces", true], 0, 5, 6, ["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(); _outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]); + _outSurf = channel_apply(_data[0], _outSurf, _data[8]); return _outSurf; } #endregion diff --git a/scripts/node_displacement/node_displacement.gml b/scripts/node_displacement/node_displacement.gml index 841586cde..2bb430bf3 100644 --- a/scripts/node_displacement/node_displacement.gml +++ b/scripts/node_displacement/node_displacement.gml @@ -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) .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, ["Displace", false], 1, 3, 4, ["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(); _outSurf = mask_apply(_data[0], _outSurf, _data[8], _data[9]); + _outSurf = channel_apply(_data[0], _outSurf, _data[12]); return _outSurf; } #endregion diff --git a/scripts/node_dither/node_dither.gml b/scripts/node_dither/node_dither.gml index dc8c18c52..6740860d7 100644 --- a/scripts/node_dither/node_dither.gml +++ b/scripts/node_dither/node_dither.gml @@ -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); 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); - input_display_list = [ 9, + input_display_list = [ 9, 10, ["Surfaces", true], 0, 7, 8, ["Pattern", false], 2, 3, ["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(); _outSurf = mask_apply(_data[0], _outSurf, _data[7], _data[8]); + _outSurf = channel_apply(_data[0], _outSurf, _data[10]); return _outSurf; } diff --git a/scripts/node_edge_detect/node_edge_detect.gml b/scripts/node_edge_detect/node_edge_detect.gml index 54c330aa2..8d977e714 100644 --- a/scripts/node_edge_detect/node_edge_detect.gml +++ b/scripts/node_edge_detect/node_edge_detect.gml @@ -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); 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); - input_display_list = [ 5, + input_display_list = [ 5, 6, ["Surfaces", true], 0, 3, 4, ["Edge detect", false], 1, ]; @@ -51,6 +54,7 @@ function Node_Edge_Detect(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou surface_reset_target(); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); + _outSurf = channel_apply(_data[0], _outSurf, _data[6]); return _outSurf; } diff --git a/scripts/node_erode/node_erode.gml b/scripts/node_erode/node_erode.gml index bb10f8999..be7e7dd7b 100644 --- a/scripts/node_erode/node_erode.gml +++ b/scripts/node_erode/node_erode.gml @@ -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); 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, ["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(); _outSurf = mask_apply(_data[0], _outSurf, _data[4], _data[5]); + _outSurf = channel_apply(_data[0], _outSurf, _data[7]); return _outSurf; } diff --git a/scripts/node_export/node_export.gml b/scripts/node_export/node_export.gml index 4d574afaa..857f99650 100644 --- a/scripts/node_export/node_export.gml +++ b/scripts/node_export/node_export.gml @@ -769,7 +769,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor export(); - if(CURRENT_FRAME == TOTAL_FRAMES - 1) { + if(LAST_FRAME) { if(anim == NODE_EXPORT_FORMAT.sequence) array_remove(RENDERING, node_id); else if(anim == NODE_EXPORT_FORMAT.animation) diff --git a/scripts/node_feedback_output/node_feedback_output.gml b/scripts/node_feedback_output/node_feedback_output.gml index d91482576..bd1b77e55 100644 --- a/scripts/node_feedback_output/node_feedback_output.gml +++ b/scripts/node_feedback_output/node_feedback_output.gml @@ -13,7 +13,7 @@ function Node_Feedback_Output(_x, _y, _group = noone) : Node_Group_Output(_x, _y static update = function(frame = CURRENT_FRAME) { if(inputs[| 0].isLeaf()) return; - if(CURRENT_FRAME == TOTAL_FRAMES - 1) { + if(LAST_FRAME) { cache_value = noone; return; } diff --git a/scripts/node_greyscale/node_greyscale.gml b/scripts/node_greyscale/node_greyscale.gml index 02ffc31be..18cfd17d7 100644 --- a/scripts/node_greyscale/node_greyscale.gml +++ b/scripts/node_greyscale/node_greyscale.gml @@ -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); 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, ["Greyscale", false], 1, 2, ] @@ -47,6 +50,7 @@ function Node_Greyscale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) surface_reset_target(); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); + _outSurf = channel_apply(_data[0], _outSurf, _data[6]); return _outSurf; } #endregion diff --git a/scripts/node_invert/node_invert.gml b/scripts/node_invert/node_invert.gml index 57b650ad2..840dddeca 100644 --- a/scripts/node_invert/node_invert.gml +++ b/scripts/node_invert/node_invert.gml @@ -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); 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, ] @@ -32,6 +35,7 @@ function Node_Invert(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co surface_reset_target(); _outSurf = mask_apply(_data[0], _outSurf, _data[1], _data[2]); + _outSurf = channel_apply(_data[0], _outSurf, _data[4]); return _outSurf; } #endregion diff --git a/scripts/node_level/node_level.gml b/scripts/node_level/node_level.gml index 7c216b1a4..e27a5c66f 100644 --- a/scripts/node_level/node_level.gml +++ b/scripts/node_level/node_level.gml @@ -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); 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); attribute_surface_depth(); @@ -75,7 +78,7 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con return _h; }); #endregion - input_display_list = [ 8, + input_display_list = [ 8, 9, level_renderer, ["Surfaces", true], 0, 6, 7, ["Level", false], 1, @@ -131,6 +134,7 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con surface_reset_target(); _outSurf = mask_apply(_data[0], _outSurf, _data[6], _data[7]); + _outSurf = channel_apply(_data[0], _outSurf, _data[9]); return _outSurf; } #endregion diff --git a/scripts/node_level_selector/node_level_selector.gml b/scripts/node_level_selector/node_level_selector.gml index e846487ab..c353fd64f 100644 --- a/scripts/node_level_selector/node_level_selector.gml +++ b/scripts/node_level_selector/node_level_selector.gml @@ -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); 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); attribute_surface_depth(); @@ -60,7 +63,7 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g return _h; }); #endregion - input_display_list = [ 5, + input_display_list = [ 5, 6, level_renderer, ["Surfaces", true], 0, 3, 4, ["Level", false], 1, 2, @@ -99,6 +102,7 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g surface_reset_target(); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); + _outSurf = channel_apply(_data[0], _outSurf, _data[6]); return _outSurf; } #endregion diff --git a/scripts/node_local_analyze/node_local_analyze.gml b/scripts/node_local_analyze/node_local_analyze.gml index cbcfcc326..c25fca7e1 100644 --- a/scripts/node_local_analyze/node_local_analyze.gml +++ b/scripts/node_local_analyze/node_local_analyze.gml @@ -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); 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); - input_display_list = [ 7, + input_display_list = [ 7, 8, ["Surfaces", true], 0, 5, 6, ["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(); _outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]); + _outSurf = channel_apply(_data[0], _outSurf, _data[8]); return _outSurf; } diff --git a/scripts/node_palette_shift/node_palette_shift.gml b/scripts/node_palette_shift/node_palette_shift.gml index 1bd597bbf..444727a2b 100644 --- a/scripts/node_palette_shift/node_palette_shift.gml +++ b/scripts/node_palette_shift/node_palette_shift.gml @@ -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); 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, ["Palette", false], 1, 2 ] @@ -46,6 +49,7 @@ function Node_Palette_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr surface_reset_shader(); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); + _outSurf = channel_apply(_data[0], _outSurf, _data[6]); return _outSurf; } #endregion diff --git a/scripts/node_pixel_sort/node_pixel_sort.gml b/scripts/node_pixel_sort/node_pixel_sort.gml index cb6539760..33ba0aec3 100644 --- a/scripts/node_pixel_sort/node_pixel_sort.gml +++ b/scripts/node_pixel_sort/node_pixel_sort.gml @@ -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); 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, ["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]); _outSurf = mask_apply(_data[0], _outSurf, _data[4], _data[5]); + _outSurf = channel_apply(_data[0], _outSurf, _data[7]); return _outSurf; } #endregion diff --git a/scripts/node_polar/node_polar.gml b/scripts/node_polar/node_polar.gml index 4d73a1e25..b8402e25d 100644 --- a/scripts/node_polar/node_polar.gml +++ b/scripts/node_polar/node_polar.gml @@ -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); 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); - input_display_list = [ 3, + input_display_list = [ 3, 4, ["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(); _outSurf = mask_apply(_data[0], _outSurf, _data[1], _data[2]); + _outSurf = channel_apply(_data[0], _outSurf, _data[4]); return _outSurf; } diff --git a/scripts/node_render_sprite_sheet/node_render_sprite_sheet.gml b/scripts/node_render_sprite_sheet/node_render_sprite_sheet.gml index 5776de249..7460250c2 100644 --- a/scripts/node_render_sprite_sheet/node_render_sprite_sheet.gml +++ b/scripts/node_render_sprite_sheet/node_render_sprite_sheet.gml @@ -87,7 +87,9 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) if(grup != SPRITE_ANIM_GROUP.animation) { initRender(); 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 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); outputs[| 1].setValue(_atl); + + if(LAST_FRAME) + array_remove(RENDERING, node_id); } #endregion 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(); } + + array_push(RENDERING, node_id); } #endregion static initRender = function() { #region diff --git a/scripts/node_skew/node_skew.gml b/scripts/node_skew/node_skew.gml index 676c2d77b..59531a446 100644 --- a/scripts/node_skew/node_skew.gml +++ b/scripts/node_skew/node_skew.gml @@ -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); 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, ["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(); _outSurf = mask_apply(_data[0], _outSurf, _data[6], _data[7]); + _outSurf = channel_apply(_data[0], _outSurf, _data[9]); return _outSurf; } diff --git a/scripts/node_threshold/node_threshold.gml b/scripts/node_threshold/node_threshold.gml index e2892f8ae..38ae941d9 100644 --- a/scripts/node_threshold/node_threshold.gml +++ b/scripts/node_threshold/node_threshold.gml @@ -5,10 +5,10 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 1] = nodeValue("Brightness", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 2] = nodeValue("Brightness Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) + inputs[| 2] = nodeValue("Brightness Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue("Brightness Smoothness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) + inputs[| 3] = nodeValue("Brightness Smoothness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider); inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); @@ -21,15 +21,18 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 7] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 8] = nodeValue("Alpha Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) + inputs[| 8] = nodeValue("Alpha Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider); - 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); + 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); - input_display_list = [ 6, + input_display_list = [ 6, 10, ["Surfaces", true], 0, 4, 5, ["Threshold", false], 1, 2, 3, 7, 8, 9, ]; @@ -56,9 +59,9 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var _alphaSmooth = _data[9]; surface_set_shader(_outSurf, sh_threshold); - shader_set_i("bright", _bright ); - shader_set_f("brightThreshold", _brightThreshold ); - shader_set_f("brightSmooth", _brightSmooth ); + shader_set_i("bright", _bright ); + shader_set_f("brightThreshold", _brightThreshold); + shader_set_f("brightSmooth", _brightSmooth ); shader_set_i("alpha", _alpha ); shader_set_f("alphaThreshold", _alphaThreshold ); @@ -68,6 +71,7 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) surface_reset_shader(); _outSurf = mask_apply(_data[0], _outSurf, _data[4], _data[5]); + _outSurf = channel_apply(_data[0], _outSurf, _data[10]); return _outSurf; } #endregion diff --git a/scripts/node_twirl/node_twirl.gml b/scripts/node_twirl/node_twirl.gml index 1ed325f29..336abd32c 100644 --- a/scripts/node_twirl/node_twirl.gml +++ b/scripts/node_twirl/node_twirl.gml @@ -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); 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); - input_display_list = [ 7, + input_display_list = [ 7, 8, ["Surfaces", true], 0, 5, 6, ["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(); _outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]); + _outSurf = channel_apply(_data[0], _outSurf, _data[8]); return _outSurf; } #endregion diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index 3cd39058b..382f29114 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -2264,7 +2264,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru break; } } #endregion - + static isVisible = function() { #region if(!node.active) return false; diff --git a/scripts/node_widget_test/node_widget_test.gml b/scripts/node_widget_test/node_widget_test.gml index 528792623..f2675c90e 100644 --- a/scripts/node_widget_test/node_widget_test.gml +++ b/scripts/node_widget_test/node_widget_test.gml @@ -45,7 +45,7 @@ function Node_Widget_Test(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 32] = nodeValue("textArrayBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, []) .setDisplay(VALUE_DISPLAY.text_array, { data: [ "Choice 1", "Choice 2" ] }) inputs[| 33] = nodeValue("surfaceBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) .setDisplay(VALUE_DISPLAY._default) - + input_display_list = [ ["Number", false], 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ["Boolean", false], 19, diff --git a/scripts/preferences/preferences.gml b/scripts/preferences/preferences.gml index 55a8cc674..45c124d82 100644 --- a/scripts/preferences/preferences.gml +++ b/scripts/preferences/preferences.gml @@ -156,8 +156,8 @@ map.key = save_l; PREFERENCES.window_maximize = gameframe_is_maximized(); - PREFERENCES.window_width = WIN_W; - PREFERENCES.window_height = WIN_H; + PREFERENCES.window_width = max(960, WIN_W); + PREFERENCES.window_height = max(600, WIN_H); map.preferences = PREFERENCES; diff --git a/scripts/toggleGroup/toggleGroup.gml b/scripts/toggleGroup/toggleGroup.gml index bd16efc5a..9726e0b7b 100644 --- a/scripts/toggleGroup/toggleGroup.gml +++ b/scripts/toggleGroup/toggleGroup.gml @@ -33,7 +33,7 @@ function toggleGroup(_data, _onClick) : widget() constructor { h = _h; value = _data; - if(!is_array(_data)) return 0; + if(is_array(_data)) return 0; var amo = array_length(data); var ww = _w / amo;