From 8eff3f78f6de1e46e33dc051ee451fed9f1637ef Mon Sep 17 00:00:00 2001 From: Tanasart Date: Fri, 20 Dec 2024 10:52:20 +0700 Subject: [PATCH] Creating, connecting nodes now won't refresh the entire graph. (I'm pretty sure there's a reason I make it do that, but we'll see.) --- objects/o_main/Step_1.gml | 2 +- scripts/node_data/node_data.gml | 2 +- scripts/node_value/node_value.gml | 2 +- scripts/render_data/render_data.gml | 7 ++++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/objects/o_main/Step_1.gml b/objects/o_main/Step_1.gml index 4547287b8..00ecb1b03 100644 --- a/objects/o_main/Step_1.gml +++ b/objects/o_main/Step_1.gml @@ -132,7 +132,7 @@ _FILE_DROPPED = false; DEF_SURFACE_RESET(); if(!PROJECT.safeMode && UPDATE_RENDER_ORDER) { - ResetAllNodesRender(); + // ResetAllNodesRender(); NodeTopoSort(); } diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index b4a68122b..a968cc8e4 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -74,7 +74,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { if(!LOCALE_DEF || TESTING) renamed = true; }); - RENDER_ALL_REORDER + RENDER_PARTIAL_REORDER } #region ---- display ---- diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index b3a0f845a..514f78a1e 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -1744,7 +1744,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru PROJECT.modified = true; } - RENDER_ALL_REORDER + RENDER_PARTIAL_REORDER if(onSetFrom != noone) onSetFrom(_valueFrom); if(_valueFrom.onSetTo != noone) _valueFrom.onSetTo(self); diff --git a/scripts/render_data/render_data.gml b/scripts/render_data/render_data.gml index fded4f990..c8d460d67 100644 --- a/scripts/render_data/render_data.gml +++ b/scripts/render_data/render_data.gml @@ -10,9 +10,10 @@ enum RENDER_TYPE { LIVE_UPDATE = false; UPDATE_RENDER_ORDER = false; - #macro RENDER_ALL_REORDER UPDATE_RENDER_ORDER = true; UPDATE |= RENDER_TYPE.full; - #macro RENDER_ALL UPDATE |= RENDER_TYPE.full; - #macro RENDER_PARTIAL UPDATE |= RENDER_TYPE.partial; + #macro RENDER_ALL UPDATE |= RENDER_TYPE.full; + #macro RENDER_ALL_REORDER UPDATE_RENDER_ORDER = true; UPDATE |= RENDER_TYPE.full; + #macro RENDER_PARTIAL UPDATE |= RENDER_TYPE.partial; + #macro RENDER_PARTIAL_REORDER UPDATE_RENDER_ORDER = true; UPDATE |= RENDER_TYPE.partial; global.getvalue_hit = 0; #endregion