From 1466694a778e36f46431f04284d982cf818a8d28 Mon Sep 17 00:00:00 2001 From: Tanasart Date: Thu, 2 Nov 2023 08:36:49 +0700 Subject: [PATCH] Remove active bar, graph color based on context color. --- scripts/node_collection/node_collection.gml | 7 ++--- scripts/node_data/node_data.gml | 2 +- scripts/panel_animation/panel_animation.gml | 35 --------------------- scripts/panel_graph/panel_graph.gml | 2 +- 4 files changed, 4 insertions(+), 42 deletions(-) diff --git a/scripts/node_collection/node_collection.gml b/scripts/node_collection/node_collection.gml index b7ec35ec5..f663bafd7 100644 --- a/scripts/node_collection/node_collection.gml +++ b/scripts/node_collection/node_collection.gml @@ -584,18 +584,15 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc } #endregion static attributeSerialize = function() { #region - var att = {}; + var att = variable_clone(attributes); att.separator = json_stringify(attributes.separator); - att.w = attributes.w; - att.h = attributes.h; return att; } #endregion static attributeDeserialize = function(attr) { #region + attributes = attr; if(struct_has(attr, "separator")) attributes.separator = json_parse(attr.separator); - attributes.w = struct_try_get(attr, "w", 128); - attributes.h = struct_try_get(attr, "h", 128); } #endregion } \ No newline at end of file diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index 1bc1ba8da..239a522f2 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -140,7 +140,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x #endregion #region --- attributes ---- - attributes = { + attributes = { update_graph: true, show_update_trigger: false, color: -1, diff --git a/scripts/panel_animation/panel_animation.gml b/scripts/panel_animation/panel_animation.gml index 954702886..bd75ee7bf 100644 --- a/scripts/panel_animation/panel_animation.gml +++ b/scripts/panel_animation/panel_animation.gml @@ -1611,41 +1611,6 @@ function Panel_Animation() : PanelContent() constructor { var _node = _cont.node; - if(_node.active_index > -1) { #region draw active region - var active_inp = _node.inputs[| _node.active_index]; - var node_y = _cont.y + ui(2); - - var ot = 0, ov = true; - var x0 = 0, x1 = 0; - - for( var j = 0; j < ds_list_size(active_inp.animator.values); j++ ) { - var k = active_inp.animator.values[| j]; - - var t = k.time; - var v = k.value; - - if(t > ot && ov) { - x0 = (ot + 1) * ui(timeline_scale) + timeline_shift; - x1 = ( t + 1) * ui(timeline_scale) + timeline_shift; - var aa = 0.25; - - draw_sprite_stretched_ext(THEME.timeline_dopesheet_bg, 0, x0, node_y - ui(4), x1 - x0, ui(8), _node.dopesheet_color, aa); - } - - ot = t; - ov = v; - } - - t = TOTAL_FRAMES - 1; - if(t > ot && ov) { - x0 = (ot + 1) * ui(timeline_scale) + timeline_shift; - x1 = ( t + 1) * ui(timeline_scale) + timeline_shift; - var aa = 0.25; - - draw_sprite_stretched_ext(THEME.timeline_dopesheet_bg, 0, x0, node_y - ui(4), x1 - x0, ui(8), _node.dopesheet_color, aa); - } - } #endregion - if(_cont.item.show) for( var j = 0, m = array_length(_cont.props); j < m; j++ ) { var prop = _cont.props[j]; diff --git a/scripts/panel_graph/panel_graph.gml b/scripts/panel_graph/panel_graph.gml index f19d19583..e69ed8833 100644 --- a/scripts/panel_graph/panel_graph.gml +++ b/scripts/panel_graph/panel_graph.gml @@ -1556,7 +1556,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { dragGraph(); var context = getCurrentContext(); - bg_color = context == noone? COLORS.panel_bg_clear : merge_color(COLORS.panel_bg_clear, context.color, 0.05); + bg_color = context == noone? COLORS.panel_bg_clear : merge_color(COLORS.panel_bg_clear, context.getColor(), 0.05); draw_clear(bg_color); drawGrid();