diff --git a/PixelComposer.resource_order b/PixelComposer.resource_order index c6bf83474..b21e9d524 100644 --- a/PixelComposer.resource_order +++ b/PixelComposer.resource_order @@ -71,6 +71,7 @@ {"name":"importers","order":7,"path":"folders/functions/importers.yy",}, {"name":"inputs","order":8,"path":"folders/functions/inputs.yy",}, {"name":"lua","order":24,"path":"folders/functions/lua.yy",}, + {"name":"math","order":43,"path":"folders/functions/math.yy",}, {"name":"migration","order":1,"path":"folders/functions/migration.yy",}, {"name":"nodes","order":32,"path":"folders/functions/nodes.yy",}, {"name":"packing","order":30,"path":"folders/functions/packing.yy",}, @@ -245,7 +246,6 @@ {"name":"button","order":34,"path":"folders/widgets/button.yy",}, {"name":"rotator","order":35,"path":"folders/widgets/rotator.yy",}, {"name":"text","order":36,"path":"folders/widgets/text.yy",}, - {"name":"math","order":43,"path":"folders/functions/math.yy",}, ], "ResourceOrderSettings": [ {"name":"s_node_corner","order":16,"path":"sprites/s_node_corner/s_node_corner.yy",}, diff --git a/PixelComposer.yyp b/PixelComposer.yyp index 73663e16b..7946d51ee 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -95,6 +95,7 @@ {"resourceType":"GMFolder","resourceVersion":"1.0","name":"importers","folderPath":"folders/functions/importers.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"inputs","folderPath":"folders/functions/inputs.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"lua","folderPath":"folders/functions/lua.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"math","folderPath":"folders/functions/math.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"migration","folderPath":"folders/functions/migration.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"nodes","folderPath":"folders/functions/nodes.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"packing","folderPath":"folders/functions/packing.yy",}, @@ -280,7 +281,6 @@ {"resourceType":"GMFolder","resourceVersion":"1.0","name":"button","folderPath":"folders/widgets/button.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"rotator","folderPath":"folders/widgets/rotator.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"text","folderPath":"folders/widgets/text.yy",}, - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"math","folderPath":"folders/functions/math.yy",}, ], "IncludedFiles": [ {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"ApolloHelp.html","ConfigValues":{"Itch":{"CopyToMask":"0",},},"CopyToMask":-1,"filePath":"datafiles",}, diff --git a/scripts/append_function/append_function.gml b/scripts/append_function/append_function.gml index 321c28ecb..5223e0d55 100644 --- a/scripts/append_function/append_function.gml +++ b/scripts/append_function/append_function.gml @@ -21,8 +21,8 @@ function __APPEND_MAP(_map, context = PANEL_GRAPH.getCurrentContext()) { #region if(struct_has(_map, "version")) { var _v = _map.version; PROJECT.version = _v; - if(_v != SAVE_VERSION) { - var warn = "File version mismatch : loading file version " + string(_v) + " to Pixel Composer " + string(SAVE_VERSION); + if(floor(_v) != floor(SAVE_VERSION)) { + var warn = $"File version mismatch : loading file version {_v} to Pixel Composer {SAVE_VERSION}"; log_warning("FILE", warn) } } diff --git a/scripts/controlPointBox/controlPointBox.gml b/scripts/controlPointBox/controlPointBox.gml index 54a9766c1..2e6496f89 100644 --- a/scripts/controlPointBox/controlPointBox.gml +++ b/scripts/controlPointBox/controlPointBox.gml @@ -116,8 +116,8 @@ function controlPointBox(_onModify) : widget() constructor { tbW.draw(_x + lw, yy, _w - lw, TEXTBOX_HEIGHT, _wid, _m); yy += TEXTBOX_HEIGHT + ui(8); - rot.draw(_x + _w / 2, yy, _w, _fy, _m); - yy += ui(94 + 8); + var _rh = rot.draw(_x, yy, _w, _fy, _m); + yy += _rh + ui(8); break; } diff --git a/scripts/globals/globals.gml b/scripts/globals/globals.gml index f40fc9cf3..3dc604768 100644 --- a/scripts/globals/globals.gml +++ b/scripts/globals/globals.gml @@ -25,10 +25,10 @@ globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER, LATEST_VERSION; LATEST_VERSION = 11500; - VERSION = 11588; + VERSION = 11589; SAVE_VERSION = 11600.1; - VERSION_STRING = "1.16rc8"; - BUILD_NUMBER = 11588; + VERSION_STRING = "1.16rc9"; + BUILD_NUMBER = 11589; globalvar APPEND_MAP; APPEND_MAP = ds_map_create(); diff --git a/scripts/load_function/load_function.gml b/scripts/load_function/load_function.gml index 4c844645c..92c20d1b0 100644 --- a/scripts/load_function/load_function.gml +++ b/scripts/load_function/load_function.gml @@ -88,7 +88,7 @@ function __LOAD_PATH(path, readonly = false, override = false) { #region if(struct_has(_load_content, "version")) { var _v = _load_content.version; PROJECT.version = _v; - if(_v != SAVE_VERSION) { + if(floor(_v) != floor(SAVE_VERSION)) { var warn = $"File version mismatch : loading file version {_v} to Pixel Composer {SAVE_VERSION}"; log_warning("LOAD", warn); } diff --git a/scripts/meta_data/meta_data.gml b/scripts/meta_data/meta_data.gml index e28f3df2c..c5e5e27ae 100644 --- a/scripts/meta_data/meta_data.gml +++ b/scripts/meta_data/meta_data.gml @@ -99,7 +99,7 @@ function MetaDataManager() constructor { var _own = author_steam_id == STEAM_USER_ID; var _ont = "Your creation"; var _aut = $"{__txt("By")} {author}"; - var _ver = version < SAVE_VERSION? __txtx("meta_old_version", "Created on an older version") : __txtx("meta_new_version", "Created on a newer version"); + var _ver = floor(version) < floor(SAVE_VERSION)? __txtx("meta_old_version", "Created on an older version") : __txtx("meta_new_version", "Created on a newer version"); draw_set_font(f_h5); _h += string_height_ext(name, -1, ww) - ui(4); @@ -127,7 +127,7 @@ function MetaDataManager() constructor { _w = max(_w, string_width_ext(alias, -1, ww)); } - if(version != SAVE_VERSION) { + if(floor(version) != floor(SAVE_VERSION)) { draw_set_font(f_p2); _h += ui(8); _h += string_height_ext(_ver, -1, ww); @@ -198,7 +198,7 @@ function MetaDataManager() constructor { ty += string_height_ext(alias, -1, _w); } - if(version != SAVE_VERSION) { + if(floor(version) != floor(SAVE_VERSION)) { ty += ui(8); draw_set_text(f_p2, fa_left, fa_top, COLORS._main_accent); draw_text_line(mx + _pd, ty, _ver, -1, _w); diff --git a/scripts/node_canvas/node_canvas.gml b/scripts/node_canvas/node_canvas.gml index d24793344..5456b5e05 100644 --- a/scripts/node_canvas/node_canvas.gml +++ b/scripts/node_canvas/node_canvas.gml @@ -641,6 +641,8 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } #endregion static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + if(instance_exists(o_dialog_color_selector)) return; + mouse_cur_x = round((_mx - _x) / _s - 0.5); mouse_cur_y = round((_my - _y) / _s - 0.5); diff --git a/scripts/node_chromatic_aberration/node_chromatic_aberration.gml b/scripts/node_chromatic_aberration/node_chromatic_aberration.gml index cc5cc006f..2fa026de3 100644 --- a/scripts/node_chromatic_aberration/node_chromatic_aberration.gml +++ b/scripts/node_chromatic_aberration/node_chromatic_aberration.gml @@ -20,6 +20,11 @@ function Node_Chromatic_Aberration(_x, _y, _group = noone) : Node_Processor(_x, outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); + input_display_list = [ 3, + ["Surface", false], 0, + ["Effect", false], 1, 2, + ] + attribute_surface_depth(); attribute_interpolation(); diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index c59545140..c68db3802 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -324,7 +324,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x var _hi = ui(junction_draw_pad_y); var _ho = ui(junction_draw_pad_y); - var _prev_surf = previewable && (preview_channel < ds_list_size(outputs) && outputs[| preview_channel].type == VALUE_TYPE.surface); + var _prev_surf = previewable && preview_draw && (preview_channel < ds_list_size(outputs) && outputs[| preview_channel].type == VALUE_TYPE.surface); for( var i = 0; i < ds_list_size(inputs); i++ ) { var _inp = inputs[| i]; diff --git a/scripts/node_image_splice_sheet/node_image_splice_sheet.gml b/scripts/node_image_splice_sheet/node_image_splice_sheet.gml index eece8b25d..b6ea6f3b3 100644 --- a/scripts/node_image_splice_sheet/node_image_splice_sheet.gml +++ b/scripts/node_image_splice_sheet/node_image_splice_sheet.gml @@ -20,7 +20,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru .setDisplay(VALUE_DISPLAY.padding); inputs[| 7] = nodeValue("Output", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Animation", "Array"]); + .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Animation", "Array" ]); inputs[| 8] = nodeValue("Animation speed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1); @@ -143,7 +143,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru if(_amo < 256) { for(var i = _amo - 1; i >= 0; i--) { - if(!array_safe_get(sprite_valid, i, true)) + if(!array_safe_get(sprite_valid, i, false)) continue; var _f = sprite_pos[i]; @@ -211,7 +211,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru var _xx = value_snap(round(drag_sx + (_mx - drag_mx) / _s), _snx); var _yy = value_snap(round(drag_sy + (_my - drag_my) / _s), _sny); - var off = [_xx, _yy]; + var off = [ _xx, _yy ]; curr_off = off; if(mouse_release(mb_left)) { @@ -236,7 +236,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru } } else if(drag_type == 3) { var _col = floor((abs(_mx - drag_mx) / _s - _spc[0]) / (__dim[0] + _spc[0])); - curr_amo[0] = _col; + curr_amo = [ _col, curr_amo[1] ]; if(mouse_release(mb_left)) { drag_type = 0; @@ -244,7 +244,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru } } else if(drag_type == 4) { var _row = floor((abs(_my - drag_my) / _s - _spc[1]) / (__dim[1] + _spc[1])); - curr_amo[1] = _row; + curr_amo = [ curr_amo[0], _row ]; if(mouse_release(mb_left)) { drag_type = 0; @@ -330,7 +330,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru surface_set_shader(temp_surface[0], sh_slice_spritesheet_empty_scan); shader_set_dim("dimension", _inSurf); - shader_set_f("paddingStart", _pad[2], _pad[1]); + shader_set_f("paddingStart", _off[0], _off[1]); shader_set_f("spacing", surf_space[0], surf_space[1]); shader_set_f("spriteDim", _dim[0], _dim[1]); shader_set_color("color", _flcl); @@ -381,7 +381,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru continue; } - var empPx = surface_get_pixel(temp_surface[0], _spr_pos[0], _spr_pos[1]); + var empPx = surface_get_pixel_ext(temp_surface[0], _spr_pos[0], _spr_pos[1]); var empty = empPx == 0.; if(!empty) { @@ -410,10 +410,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru var _out = getInputData(7); if(_out == 1) { - outputs[| 0].setValue(surf_array); update_on_frame = false; - - //outputs[| 0].setValue(temp_surface[0]); return; } diff --git a/scripts/node_keyframe/node_keyframe.gml b/scripts/node_keyframe/node_keyframe.gml index b8bd794ff..00fdd2b99 100644 --- a/scripts/node_keyframe/node_keyframe.gml +++ b/scripts/node_keyframe/node_keyframe.gml @@ -281,7 +281,7 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor { var _keyIndex; if(_time >= _len) _keyIndex = 999_999; - else if(_time < _len) _keyIndex = 0; + else if(_time <= 0) _keyIndex = 0; else _keyIndex = key_map[_time]; if(_keyIndex == -1) { #region Before first key @@ -317,7 +317,7 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor { return lerpValue(from, to, _lrp); } - return processType(values[| ds_list_size(values) - 1].value); //First frame + return processType(values[| ds_list_size(values) - 1].value); //Last frame } #endregion #region In between diff --git a/scripts/node_number/node_number.gml b/scripts/node_number/node_number.gml index fc3d03fc4..4b2135ab7 100644 --- a/scripts/node_number/node_number.gml +++ b/scripts/node_number/node_number.gml @@ -93,11 +93,15 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co } #endregion static processData = function(_output, _data, _output_index, _array_index = 0) { #region - var _res = _data[1]? round(_data[0]) : _data[0]; - if(!is_numeric(_res)) _res = real(_res); + var _dat = _data[0]; + var _int = _data[1]; - display_output = _res; - return _res; + if(is_array(_dat)) return _dat; + if(!is_numeric(_dat)) _dat = real(_dat); + if(_int) _dat = round(_dat); + + display_output = _dat; + return _dat; } #endregion static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region diff --git a/scripts/node_pixel_sort/node_pixel_sort.gml b/scripts/node_pixel_sort/node_pixel_sort.gml index b4faea136..f241f32f2 100644 --- a/scripts/node_pixel_sort/node_pixel_sort.gml +++ b/scripts/node_pixel_sort/node_pixel_sort.gml @@ -50,7 +50,15 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group var _tr = _data[2]; var _dr = floor(_data[3] / 90) % 4; if(_dr < 0) _dr = 4 + _dr; - if(_it <= 0) return _outSurf; + if(_it <= 0) { + surface_set_target(_outSurf); + BLEND_OVERRIDE; + draw_surface_safe(_in, 0, 0); + BLEND_NORMAL; + surface_reset_target(); + + return _outSurf; + } var sw = surface_get_width_safe(_outSurf); var sh = surface_get_height_safe(_outSurf); diff --git a/scripts/node_registry/node_registry.gml b/scripts/node_registry/node_registry.gml index eabbbfb28..f9267dac0 100644 --- a/scripts/node_registry/node_registry.gml +++ b/scripts/node_registry/node_registry.gml @@ -235,7 +235,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio NODE_PAGE_DEFAULT = ds_list_size(NODE_CATEGORY); ADD_NODE_PAGE = NODE_PAGE_DEFAULT; - + var fav = ds_list_create(); addNodeCatagory("Favourites", fav); diff --git a/scripts/node_time_remap/node_time_remap.gml b/scripts/node_time_remap/node_time_remap.gml index a45eb2906..55d8ce78c 100644 --- a/scripts/node_time_remap/node_time_remap.gml +++ b/scripts/node_time_remap/node_time_remap.gml @@ -1,6 +1,7 @@ function Node_Time_Remap(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { - name = "Time Remap"; + name = "Time Remap"; use_cache = CACHE_USE.manual; + update_on_frame = true; shader = sh_time_remap; uniform_map = shader_get_sampler_index(shader, "map"); diff --git a/scripts/panel_collection/panel_collection.gml b/scripts/panel_collection/panel_collection.gml index 2098bf2cb..3388fa609 100644 --- a/scripts/panel_collection/panel_collection.gml +++ b/scripts/panel_collection/panel_collection.gml @@ -154,7 +154,7 @@ function Panel_Collection() : PanelContent() constructor { var node_list = ds_list_size(nodes); var node_count = node_list + array_length(steamNode); - var frame = current_time * PREFERENCES.collection_preview_speed / 3000; + var frame = PREFERENCES.collection_animated? current_time * PREFERENCES.collection_preview_speed / 3000 : 0; var _cw = contentPane.surface_w; var _hover = pHOVER && contentPane.hover; var hh = 0; @@ -240,7 +240,7 @@ function Panel_Collection() : PanelContent() constructor { draw_sprite_ui_uniform(THEME.steam_creator, 0, _boxx + grid_size - ui(8), yy + ui(12), 1, COLORS._main_icon_dark, 1); } - if(meta.version != SAVE_VERSION) { + if(floor(meta.version) != floor(SAVE_VERSION)) { draw_set_color(COLORS._main_accent); draw_circle_prec(_boxx + grid_size - ui(8), yy + grid_size - ui(8), 3, false); } diff --git a/scripts/preferences/preferences.gml b/scripts/preferences/preferences.gml index 350c424d3..56bd8a258 100644 --- a/scripts/preferences/preferences.gml +++ b/scripts/preferences/preferences.gml @@ -46,7 +46,6 @@ PREFERENCES.node_show_render_status = false; PREFERENCES.node_show_time = true; - PREFERENCES.collection_preview_speed = 60; PREFERENCES.expand_hover = false; PREFERENCES.graph_zoom_smoooth = 4; @@ -89,6 +88,10 @@ PREFERENCES.gifski_path = "%APP%/gifski/"; PREFERENCES.ffmpeg_path = "%APP%/ffmpeg/"; + PREFERENCES.collection_animated = true; + PREFERENCES.collection_preview_speed = 60; + PREFERENCES.collection_scale = 1; + PREFERENCES_DEF = variable_clone(PREFERENCES); #endregion diff --git a/scripts/rotator/rotator.gml b/scripts/rotator/rotator.gml index ee59e8396..dfe1f41cc 100644 --- a/scripts/rotator/rotator.gml +++ b/scripts/rotator/rotator.gml @@ -94,9 +94,11 @@ function rotator(_onModify, _step = -1) : widget() constructor { var amo = 1; if(key_mod_press(CTRL)) amo *= 10; if(key_mod_press(ALT)) amo /= 10; - - if(mouse_wheel_down()) onModify(_data + amo * SCROLL_SPEED); - if(mouse_wheel_up()) onModify(_data - amo * SCROLL_SPEED); + + if(key_mod_press(SHIFT)) { + if(mouse_wheel_down()) onModify(_data + amo * SCROLL_SPEED); + if(mouse_wheel_up()) onModify(_data - amo * SCROLL_SPEED); + } } else { draw_sprite(spr_knob, 0, px, py); } diff --git a/shaders/sh_slice_spritesheet_empty_scan/sh_slice_spritesheet_empty_scan.fsh b/shaders/sh_slice_spritesheet_empty_scan/sh_slice_spritesheet_empty_scan.fsh index 0ccbe00b7..4290d82de 100644 --- a/shaders/sh_slice_spritesheet_empty_scan/sh_slice_spritesheet_empty_scan.fsh +++ b/shaders/sh_slice_spritesheet_empty_scan/sh_slice_spritesheet_empty_scan.fsh @@ -22,7 +22,7 @@ void main() { vec2 tx = (cls + vec2(i, j)) / dimension; vec4 col = texture2D( gm_BaseTexture, tx ); - if((empty == 1 && col.a != 0.) || (empty == 0 && col != color)) { + if((empty == 0 && col != color) || (empty == 1 && col.a != 0.)) { gl_FragColor = col; return; }