[ASE Tag] Fix incorrect output frame.

This commit is contained in:
Tanasart 2025-02-25 09:04:13 +07:00
parent 7294007d17
commit 418284c870
19 changed files with 74 additions and 54 deletions

View file

@ -1298,6 +1298,7 @@
{"$GMIncludedFile":"","%Name":"dice_5.png","CopyToMask":-1,"filePath":"datafiles/data/Welcome files/Getting started","name":"dice_5.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"dice_6.png","CopyToMask":-1,"filePath":"datafiles/data/Welcome files/Getting started","name":"dice_6.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"driver_dialog.png","CopyToMask":-1,"filePath":"datafiles/data/Welcome files/Getting started","name":"driver_dialog.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"log_temp.txt","CopyToMask":-1,"filePath":"datafiles/data/Welcome files/Getting started","name":"log_temp.txt","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"multi file dialog.png","CopyToMask":-1,"filePath":"datafiles/data/Welcome files/Getting started","name":"multi file dialog.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"node_clutter.png","CopyToMask":-1,"filePath":"datafiles/data/Welcome files/Getting started","name":"node_clutter.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"tile_0044.png","CopyToMask":-1,"filePath":"datafiles/data/Welcome files/Getting started","name":"tile_0044.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,2 @@
[MESSAGE] 2025/2/24 09:50:08 > session begin
[MESSAGE] 2025/2/24 09:50:22 > session begin

View file

@ -646,5 +646,17 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co
for( var i = _tlen; i < input_len; i++ )
array_insert(load_map.inputs, i, noone);
var _attr_curv = attributes.parameter_curves;
var _keys = variable_struct_get_names(_attr_curv);
for( var i = 0, n = array_length(_keys); i < n; i++ ) {
var _val = _attr_curv[$ _keys[i]];
var _insert = CURVE_PADD - (array_length(_val) % 6);
repeat(_insert) array_insert(_val, 2, 0);
_attr_curv[$ _keys[i]] = _val;
}
}
}

View file

@ -191,7 +191,9 @@ function buttonTextIconInstant(active, spr, _x, _y, _w, _h, _m, _act, _hvr, _tip
draw_set_text(f_p1, fa_left, fa_center, active? COLORS._main_icon_light : COLORS._main_icon);
var bxc = _x + _w / 2 - (string_width(_icon_label) + ui(64)) / 2;
var byc = _y + _h / 2;
if(_icon) draw_sprite_ui(_icon, 0, bxc + ui(24), byc, 1, 1, 0, _icon_blend, _icon_alpha * (0.5 + 0.5 * active));
draw_text_add(bxc + ui(48), byc, _icon_label);
return _b;

View file

@ -39,7 +39,7 @@ function FileObject(_path) constructor {
thumbnail_data = -1;
thumbnail = noone;
static getName = function() { return name; }
static getName = function() /*=>*/ {return name};
static getThumbnail = function() {
if(thumbnail != noone && is_surface(thumbnail)) return thumbnail; // Thumbnail loaded
@ -242,7 +242,7 @@ function DirectoryObject(_path) constructor {
if(icon_blend != undefined) _spr_bld = icon_blend;
var _spr_sca = (hg - ui(5)) / 24;
draw_sprite_ui_uniform(icon, _spr_ind, _x + ui(16), _y + hg / 2 - 1, _spr_sca, _spr_bld);
draw_sprite_uniform(icon, _spr_ind, _x + ui(16), _y + hg / 2 - 1, _spr_sca, _spr_bld);
gpu_set_texfilter(false);
draw_set_text(font, fa_left, fa_center, path == parent.context.path? COLORS._main_text_accent : COLORS._main_text_inner);

View file

@ -2,34 +2,34 @@
#macro __draw_sprite_ext draw_sprite_ext
function draw_sprite_ext_override(spr, ind, _x, _y, xscale = 1, yscale = 1, rot = 0, color = c_white, alpha = 1) {
INLINE __draw_sprite_ext(spr, ind, round(_x), round(_y), xscale, yscale, rot, color, alpha);
__draw_sprite_ext(spr, ind, round(_x), round(_y), xscale, yscale, rot, color, alpha);
}
#macro draw_sprite_stretched_ext draw_sprite_stretched_ext_override
#macro __draw_sprite_stretched_ext draw_sprite_stretched_ext
function draw_sprite_stretched_ext_override(spr, ind, _x, _y, w = 1, h = 1, color = c_white, alpha = 1) {
INLINE __draw_sprite_stretched_ext(spr, ind, round(_x), round(_y), round(w), round(h), color, alpha);
__draw_sprite_stretched_ext(spr, ind, round(_x), round(_y), round(w), round(h), color, alpha);
}
function draw_sprite_stretched_add(spr, ind, _x, _y, w = 1, h = 1, color = c_white, alpha = 1) {
INLINE BLEND_ADD __draw_sprite_stretched_ext(spr, ind, round(_x), round(_y), round(w), round(h), color, alpha); BLEND_NORMAL
BLEND_ADD __draw_sprite_stretched_ext(spr, ind, round(_x), round(_y), round(w), round(h), color, alpha); BLEND_NORMAL
}
#macro draw_sprite_stretched draw_sprite_stretched_override
#macro __draw_sprite_stretched draw_sprite_stretched
function draw_sprite_stretched_override(spr, ind, _x, _y, w = 1, h = 1) {
INLINE __draw_sprite_stretched(spr, ind, round(_x), round(_y), round(w), round(h));
__draw_sprite_stretched(spr, ind, round(_x), round(_y), round(w), round(h));
}
function draw_sprite_ext_add(spr, ind, _x, _y, xscale = 1, yscale = 1, rot = 0, color = c_white, alpha = 1) {
INLINE BLEND_ADD __draw_sprite_ext(spr, ind, round(_x), round(_y), xscale, yscale, rot, color, alpha); BLEND_NORMAL
BLEND_ADD __draw_sprite_ext(spr, ind, round(_x), round(_y), xscale, yscale, rot, color, alpha); BLEND_NORMAL
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function draw_sprite_stretched_points(spr, ind, _x0, _y0, _x1, _y1, color = c_white, alpha = 1) {
INLINE
var _xs = min(_x0, _x1);
var _ys = min(_y0, _y1);
var _w = max(_x0, _x1) - _xs;
@ -39,8 +39,6 @@ function draw_sprite_stretched_points(spr, ind, _x0, _y0, _x1, _y1, color = c_wh
}
function draw_sprite_stretched_points_clamp(spr, ind, _x0, _y0, _x1, _y1, color = c_white, alpha = 1, _min = 12) {
INLINE
var _xs = min(_x0, _x1);
var _ys = min(_y0, _y1);
var _w = max(_min, max(_x0, _x1) - _xs);
@ -50,13 +48,11 @@ function draw_sprite_stretched_points_clamp(spr, ind, _x0, _y0, _x1, _y1, color
}
function draw_sprite_bbox(spr, ind, _bbox) {
INLINE
if(_bbox == noone) return;
__draw_sprite_stretched(spr, ind, _bbox.x0, _bbox.y0, _bbox.w, _bbox.h);
}
function draw_sprite_bbox_uniform(spr, ind, _bbox, _col = c_white, _alp = 1) {
INLINE
if(_bbox == noone) return;
var _sw = sprite_get_width(spr);
var _sh = sprite_get_height(spr);
@ -69,19 +65,20 @@ function draw_sprite_bbox_uniform(spr, ind, _bbox, _col = c_white, _alp = 1) {
}
function draw_sprite_uniform(spr, ind, _x, _y, scale, color = c_white, alpha = 1) {
INLINE draw_sprite_ext(spr, ind, _x, _y, scale, scale, 0, color, alpha);
draw_sprite_ext(spr, ind, _x, _y, scale, scale, 0, color, alpha);
}
function draw_sprite_ui(spr, ind, _x, _y, xscale = 1, yscale = 1, rot = 0, color = c_white, alpha = 1) {
INLINE draw_sprite_ext(spr, ind, _x, _y, xscale * UI_SCALE, yscale * UI_SCALE, rot, color, alpha);
gpu_set_tex_filter(true);
draw_sprite_ext(spr, ind, _x, _y, xscale * UI_SCALE, yscale * UI_SCALE, rot, color, alpha);
gpu_set_tex_filter(false);
}
function draw_sprite_ui_uniform(spr, ind, _x, _y, scale = 1, color = c_white, alpha = 1, rot = 0) {
INLINE draw_sprite_ui(spr, ind, _x, _y, scale, scale, rot, color, alpha);
draw_sprite_ui(spr, ind, _x, _y, scale, scale, rot, color, alpha);
}
function draw_sprite_colored(spr, ind, _x, _y, scale = 1, rot = 0, color = COLORS._main_accent) {
INLINE
var num = sprite_get_number(spr);
draw_sprite_ui(spr, ind, _x, _y, scale, scale, rot, c_white);

View file

@ -43,8 +43,8 @@
LATEST_VERSION = 1_18_00_0;
VERSION = 1_18_09_0;
SAVE_VERSION = 1_18_09_1;
VERSION_STRING = MAC? "1.18.003m" : "1.18.9";
BUILD_NUMBER = 118090;
VERSION_STRING = MAC? "1.18.003m" : "1.18.9.1";
BUILD_NUMBER = 118091;
PREF_VERSION = 1_17_1;
var _vsp = string_split(VERSION_STRING, ".");

View file

@ -65,18 +65,18 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
layer_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) {
var _vis = attributes.layer_visible;
var _amo = array_length(layers);
var hh = 24;
var _h = hh * _amo + 16;
var hh = ui(24);
var _h = hh * _amo + ui(16);
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _y, _w, _h, COLORS.node_composite_bg_blend, 1);
for( var i = 0, n = array_length(layers); i < n; i++ ) {
var _yy = _y + 8 + i * hh;
var _bx = _x + 24;
var _yy = _y + ui(8) + i * hh;
var _bx = _x + ui(24);
var _layer = layers[i];
if(_layer.type == 0) {
var vis = array_safe_get_fast(_vis, i, true);
if(point_in_circle(_m[0], _m[1], _bx, _yy + hh / 2, 12)) {
if(point_in_circle(_m[0], _m[1], _bx, _yy + hh / 2, ui(12))) {
draw_sprite_ui_uniform(THEME.junc_visible, vis, _bx, _yy + hh / 2, 1, c_white);
if(mouse_press(mb_left, _focus))
@ -93,7 +93,7 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
draw_sprite_ui_uniform(THEME.folder_16, 0, _bx, _yy + hh / 2, 1, COLORS._main_icon);
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
draw_text_add(_bx + 16, _yy + hh / 2, _layer.name);
draw_text_add(_bx + ui(16), _yy + hh / 2, _layer.name);
}
return _h;
@ -105,7 +105,7 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
var abx = ui(24);
var by = _y;
var hh = 32;
var hh = ui(32);
var _h = hh * amo + ui(8);
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, by, _w, _h, COLORS.node_composite_bg_blend, 1);
@ -127,23 +127,26 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
var _tgy = _yy + ui(2);
var _tgh = hh - ui(4);
var _x1 = _x + ui(8);
var _tw = _w - ui(16);
if(tag[$ "Name"] == current_tag) {
draw_sprite_stretched_ext(THEME.ui_panel, 0, _x + 8, _tgy, _w - 16, _tgh, cc, 0.5);
draw_sprite_stretched_ext(THEME.ui_panel, 0, _x1, _tgy, _tw, _tgh, cc, 0.5);
draw_sprite_stretched_ext(THEME.ui_panel, 0, _x + 8, _tgy, (_w - 16) * prog, _tgh, cc, 0.85);
draw_sprite_stretched_add(THEME.ui_panel, 1, _x + 8, _tgy, (_w - 16) * prog, _tgh, c_white, 0.1);
draw_sprite_stretched_ext(THEME.ui_panel, 0, _x1, _tgy, _tw * prog, _tgh, cc, 0.85);
draw_sprite_stretched_add(THEME.ui_panel, 1, _x1, _tgy, _tw * prog, _tgh, c_white, 0.1);
txt = $"{progFr}/{rn}";
} else {
draw_sprite_stretched_ext(THEME.ui_panel, 0, _x + 8, _tgy, 10, _tgh, cc, 0.85);
draw_sprite_stretched_add(THEME.ui_panel, 1, _x + 8, _tgy, 10, _tgh, c_white, 0.1);
draw_sprite_stretched_ext(THEME.ui_panel, 0, _x1, _tgy, ui(10), _tgh, cc, 0.85);
draw_sprite_stretched_add(THEME.ui_panel, 1, _x1, _tgy, ui(10), _tgh, c_white, 0.1);
txt = $"{rn}";
}
if(_hover && point_in_rectangle(_m[0], _m[1], _x + 8, _yy, _x + _w - 8, _yy + hh)) {
draw_sprite_stretched_add(THEME.ui_panel, 0, _x + 8, _tgy, _w - 16, _tgh, c_white, 0.1);
if(_hover && point_in_rectangle(_m[0], _m[1], _x1, _yy, _x + _w - ui(8), _yy + hh)) {
draw_sprite_stretched_add(THEME.ui_panel, 0, _x1, _tgy, _tw, _tgh, c_white, 0.1);
if(mouse_press(mb_left, _focus))
inputs[2].setValue(current_tag == _tagName? "" : _tagName);
@ -151,11 +154,11 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
draw_set_alpha(1);
draw_text_add(_x + 28, _yy + hh / 2, tag[$ "Name"]);
draw_text_add(_x + ui(28), _yy + hh / 2, tag[$ "Name"]);
draw_set_halign(fa_right);
draw_set_alpha(0.4);
draw_text_add(_x + _w - 20, _yy + hh / 2, txt);
draw_text_add(_x + _w - ui(20), _yy + hh / 2, txt);
draw_set_alpha(1);
}

View file

@ -13,22 +13,22 @@ function Node_ASE_Tag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
tag_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) {
if(ase_data == noone) {
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _y, _w, 28, COLORS.node_composite_bg_blend, 1);
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _y, _w, ui(28), COLORS.node_composite_bg_blend, 1);
draw_set_text(f_p3, fa_center, fa_center, COLORS._main_text_sub);
draw_text_add(_x + _w / 2, _y + 14, "No data");
return 32;
draw_text_add(_x + _w / 2, _y + ui(14), "No data");
return ui(32);
}
var _tag = getSingleValue(1);
var _amo = array_length(ase_data.tags);
var hh = 24;
var _h = hh * _amo + 16;
var hh = ui(24);
var _h = hh * _amo + ui(16);
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _y, _w, _h, COLORS.node_composite_bg_blend, 1);
for( var i = 0, n = array_length(ase_data.tags); i < n; i++ ) {
var _bx = _x + 24;
var _yy = _y + 8 + i * hh;
var _bx = _x + ui(24);
var _yy = _y + ui(8) + i * hh;
var tag = ase_data.tags[i];
var tName = tag[$ "Name"];
@ -49,7 +49,7 @@ function Node_ASE_Tag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
cc = COLORS._main_text_accent;
draw_set_text(f_p2, fa_left, fa_center, cc);
draw_text_add(_bx + 16, _yy + hh / 2, tName);
draw_text_add(_bx + ui(16), _yy + hh / 2, tName);
}
return _h;
@ -92,7 +92,7 @@ function Node_ASE_Tag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
var st = tag[$ "Frame start"];
var ed = tag[$ "Frame end"];
var fr = st + CURRENT_FRAME % (ed - st);
var fr = st + CURRENT_FRAME % (ed - st + 1);
var bg = 0;
for( var i = 0, n = array_length(_ase.layers); i < n; i++ ) {

View file

@ -125,6 +125,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
badgePreview = 0;
badgeInspect = 0;
is_selecting = false;
active_drawing = false;
active_draw_index = -1;
active_draw_anchor = false;
@ -2224,9 +2225,9 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
var xx = x * _s + _x + w * _s;
var yy = y * _s + _y;
if(badgePreview > 0) { draw_sprite_ext(THEME.node_state, is_3D? 3 : 0, xx, yy, badgePreview, badgePreview, 0, c_white, 1); xx -= 28 * badgePreview; }
if(badgeInspect > 0) { draw_sprite_ext(THEME.node_state, 1, xx, yy, badgeInspect, badgeInspect, 0, c_white, 1); xx -= 28 * badgeInspect; }
if(isTool) { draw_sprite_ext(THEME.node_state, 2, xx, yy, 1, 1, 0, c_white, 1); xx -= 28 * 2; }
if(badgePreview > 0) { draw_sprite_ext(THEME.node_state, is_3D? 3 : 0, xx, yy, badgePreview, badgePreview, 0, c_white, 1); xx -= 28 * badgePreview; }
if(badgeInspect > 0) { draw_sprite_ext(THEME.node_state, 1, xx, yy, badgeInspect, badgeInspect, 0, c_white, 1); xx -= 28 * badgeInspect; }
if(isTool) { draw_sprite_ext(THEME.node_state, 2, xx, yy, 1, 1, 0, c_white, 1); xx -= 28 * 2; }
} else {
var xx = _x + _s * (x + w - 10);

View file

@ -719,7 +719,7 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor {
}
if(prop.type == VALUE_TYPE.curve) {
var _pd = array_length(value) % 6;
var _pd = array_length(_val) % 6;
if(LOADING_VERSION < 1_18_09_1 && _pd == 0)
array_insert(_val, 0, /**/ 0, 1, 0, 0, 0, 0);

View file

@ -33,7 +33,7 @@ function Node_Stagger(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
var _ovfl = _data[4];
var _time = CURRENT_FRAME;
if(_time == -1) return _output;
if(_time < 0) return _output;
var _aind = _array_index;
var _stps = floor(process_amount / _step);

View file

@ -1289,6 +1289,8 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
frame_hovering = noone;
var _node_active = nodes_list;
array_foreach(_node_active, function(_n) /*=>*/ { _n.is_selecting = false; });
if(display_parameter.show_control) _node_active = array_filter(nodes_list, function(_n) /*=>*/ {return _n.active});
else _node_active = array_filter(nodes_list, function(_n) /*=>*/ {return _n.active && !_n.is_controller});
@ -1543,7 +1545,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
printIf(log, $"Node selection time: {get_timer() - t}"); t = get_timer();
// draw active
array_foreach(nodes_selecting, function(_n) /*=>*/ { _n.drawActive(__gr_x, __gr_y, __gr_s, instanceof(_n) == FOCUS_STR); });
array_foreach(nodes_selecting, function(_n) /*=>*/ { _n.drawActive(__gr_x, __gr_y, __gr_s, instanceof(_n) == FOCUS_STR); _n.is_selecting = true; });
if(nodes_select_anchor) nodes_select_anchor.active_draw_anchor = true;
printIf(log, $"Draw active: {get_timer() - t}"); t = get_timer();

View file

@ -279,7 +279,7 @@ function Panel_Menu() : PanelContent() constructor {
menu_help_steam = array_clone(menu_help);
array_push(menu_help_steam, -1,
menuItem(__txtx("panel_menu_steam_workshop", "Steam Workshop"), function() /*=>*/ { steam_activate_overlay_browser("https://steamcommunity.com/app/2299510/workshop/"); }, THEME.steam) );
menuItem(__txtx("panel_menu_steam_workshop", "Steam Workshop"), function() /*=>*/ {return steam_activate_overlay_browser("https://steamcommunity.com/app/2299510/workshop/")}, THEME.steam) );
function onFocusBegin() { PANEL_MENU = self; }
@ -341,7 +341,7 @@ function Panel_Menu() : PanelContent() constructor {
} else {
var bx = ui(20);
var by = h - ui(20);
draw_sprite_ui_uniform(THEME.icon_24, 0, bx, by, 1, c_white);
if(pHOVER && point_in_rectangle(mx, my, bx - ui(16), by - ui(16), bx + ui(16), by + ui(16))) {
_draggable = false;

View file

@ -24,7 +24,7 @@ function _sprite_load_from_struct(str, theme, key) {
var s = sprite_add(path, numb, false, true, sx, sy);
if(s < 0) { log_message("THEME", $"Load sprite {path} failed."); return 0; }
if(!struct_has(str, "slice")) return s;
var slice = sprite_nineslice_create();

View file

@ -47,7 +47,7 @@ function timelineItemNode(node) : timelineItem() constructor {
self.node = node;
static drawLabel = function(_item, _x, _y, _w, _msx, _msy, hover, focus, itHover, fdHover, nameType, alpha = 1) {
var _sel = node.active_drawing;
var _sel = node.is_selecting;
var lx = _x + _item.depth * ui(12) + ui(2);
var lw = _w - _item.depth * ui(12) - ui(4);