From ceca4e83d9dd65e177bea61d0bb66125630294c3 Mon Sep 17 00:00:00 2001 From: Tanasart Date: Tue, 28 Jan 2025 12:34:26 +0700 Subject: [PATCH] Fix loading project does not load latest previewing node. --- datafiles/data/Nodes/Internal.zip | Bin 9099746 -> 9099746 bytes objects/project_loader/Step_0.gml | 6 +++++- scripts/node_particle/node_particle.gml | 6 ++++-- scripts/node_shape/node_shape.gml | 7 ++++--- scripts/project_data/project_data.gml | 14 +++++++------- 5 files changed, 20 insertions(+), 13 deletions(-) diff --git a/datafiles/data/Nodes/Internal.zip b/datafiles/data/Nodes/Internal.zip index 4d6542dc4603f9d71d6d12beff44666623a826e5..54c00c634d26c8f832d617af42c7ba8fc95b37a3 100644 GIT binary patch delta 1278 zcmYk)Sxi({90u?fXB@ep;#ScarBD}C9QTbyz`1q9B5s`p9dU165mZ#_RzB|Zp0tLS zdQyg@zT31WZ89-Ng#jK+Fs5;c4>EnQPbN*8=u;EZ`2FXOEhN8u`7ig}lexV7^^WT$ zUB`#W!5FyU##neT4!JOphkT631WZH$CSfwBU@E5JBTPpjW?&|~@L?8aqX-|P7$x`w zb1)b4FdwB@fQ49uGAxE4ORyBnupBF}605KpYp@pUP>u>zq6+I#jT+Qq0|LL9fnbg+ zs$YdnuWkyOAZ>SsNn)-qK@pRs}Ox|)o;=C<$cKTQ>H)b@N^eJtm zO|+S|&{nFWZS)z{({^g09ki2n(Qev9pHq-R6s8C@(q7s}QQA*Ubbt=hAv#P)=qMed zFX&4;PABLjoubophMMUtwNNXaqw{ou+UO!(qRZ4yU(pr1O4sN*-Jq|jBVjaR^VuAC zRPP=_xn$Q6)-V%~hj7m$jrL)b>ANWuNRdoATmPm|A$7$t)-z*VqRvG7u=U0*gXS03 za!G#I65afd<DZBZ=In*OHrPx%k{J!$*&ybGZ0 z(a~?OlYH232P8A^C>n5%$rSsuMaO`1tAT8~2b~K91~VrlxctLU@=KPtDW6`|qWn@E zX;GV)iJx0krAr!rT~OPyTU#ZqHdQD2tWDKt=e|VsMfJE?Dx+I%kgV@k0ZDJ1XaCZz v=1Rdk`}FH>HD7*iPHH8iac(j*!$)yv=tsN`2$>$;7&OO9aWrTymb?-)7fL<|nu{dg22G#jUl9)fvtyH6*M>|(I+2jMMDov& zGr^r6{WxUiOOt08OIC*2^o7mwnPP$Dk+3;mGH=-O=u{Hp^u4fiCZFcf-q*;{uSRxq zZIz=7BhCzO>bY>b)6jJz8ah_cY2?+_jCM`_M1DM-H!hK<{2g(gmOeXmD4G*B>P`BJ z*3$;sNSi1?HME(wP%UkxI@(6tX$S43UGy~tDMVq4P(AIYZ>WLxP$PXydubo-rvr45 z4$)!yj=rZO^aK4!KhaTYqGQxdE%Y<}LdU6@+yCJhQO$!d-a_j+bhN69=lSq zpw}*w+|_GWNS+zs(9K@ENQz{yT`oB>VOM=vY)Uwb+{wv=T_`I&d$nY4pIw?suin>Z zPnV*j&t4;Wx6k%Vrk_#R?;MjZ_GF5Ve&<&Gnamz=F5n+XpAhHprEBu?OIwv!uWVL6 zDGoHN4b1rUW>xNz#>?Ysb7m?aX|<{v$w#fKHnZ-HSDsM!XUa=7y3{(!+Aign^u&1f wjV?7u3f|eP|LaooGAq@R4KZgjy?8I?Ec&{+&DE`nWrBtIetZ0Ux7uFuKlF0v761SM diff --git a/objects/project_loader/Step_0.gml b/objects/project_loader/Step_0.gml index 152d3b49d..fefbb62cf 100644 --- a/objects/project_loader/Step_0.gml +++ b/objects/project_loader/Step_0.gml @@ -172,7 +172,11 @@ switch(load_process) { LoadPanelStruct(content.layout.panel); array_remove(STATS_PROGRESS, load_noti); + PROJECT.postDeserialize(content); + instance_destroy(); - run_in(1, function() /*=>*/ { PANEL_GRAPH.draw_refresh = true; }); + run_in(1, function() /*=>*/ { + PANEL_GRAPH.draw_refresh = true; + }); } \ No newline at end of file diff --git a/scripts/node_particle/node_particle.gml b/scripts/node_particle/node_particle.gml index 4c02a26d6..8b757c78e 100644 --- a/scripts/node_particle/node_particle.gml +++ b/scripts/node_particle/node_particle.gml @@ -93,10 +93,12 @@ function Node_Particle(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y, _ if(IS_FIRST_FRAME) { reset(); - if(IS_PLAYING) reLoop(); + // if(IS_PLAYING) + reLoop(); } - if(IS_PLAYING) runVFX(frame); + // if(IS_PLAYING) + runVFX(frame); } function render(_time = CURRENT_FRAME) { diff --git a/scripts/node_shape/node_shape.gml b/scripts/node_shape/node_shape.gml index f6866a8de..10af52c62 100644 --- a/scripts/node_shape/node_shape.gml +++ b/scripts/node_shape/node_shape.gml @@ -578,10 +578,11 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con static postDeserialize = function() { if(CLONING) return; - if(array_length(load_map.inputs) <= 15) - load_map.inputs[15] = { raw_value : { d : 0 } }; - if(LOADING_VERSION < 1_18_01_0) { + + if(array_length(load_map.inputs) <= 15) + load_map.inputs[15] = { raw_value : { d : 0 } }; + if(array_length(load_map.inputs) >= 23) { var _dat = load_map.inputs[23].raw_value; for( var i = 0, n = array_length(_dat); i < n; i++ ) diff --git a/scripts/project_data/project_data.gml b/scripts/project_data/project_data.gml index 9b0a2f695..e84d1cc2a 100644 --- a/scripts/project_data/project_data.gml +++ b/scripts/project_data/project_data.gml @@ -315,9 +315,15 @@ function Project() constructor { if(struct_has(_map, "addon")) { var _addon = _map.addon; addons = _addon; - struct_foreach(_addon, function(_name, _value) { addonLoad(_name, false); }); + struct_foreach(_addon, function(_name, _value) /*=>*/ { addonLoad(_name, false); }); } + bind_gamemaker = Binder_Gamemaker(attributes.bind_gamemaker_path); + if(bind_gamemaker == noone) attributes.bind_gamemaker_path = ""; + } + + static postDeserialize = function(_map) { + previewNode = struct_try_get(_map, "previewNode", noone); if(PANEL_PREVIEW && previewNode != "") { var _node = nodeMap[? previewNode]; @@ -330,12 +336,6 @@ function Project() constructor { if(_node) PANEL_INSPECTOR.setInspecting(_node); } - bind_gamemaker = Binder_Gamemaker(attributes.bind_gamemaker_path); - if(bind_gamemaker == noone) attributes.bind_gamemaker_path = ""; - } - - static postDeserialize = function() { - } }