diff --git a/datafiles/Sample Projects/Broken heart.pxc b/datafiles/Sample Projects/Broken heart.pxc index 5d0d727c1..a230e9dad 100644 --- a/datafiles/Sample Projects/Broken heart.pxc +++ b/datafiles/Sample Projects/Broken heart.pxc @@ -1,380 +1 @@ -{ - "nodes": [{ - "group": -1.0, - "x": 0.0, - "id": 2.0, - "inputs": [{ - "from node": 1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, 0.0] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": 0.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, [20.0, 20.0]] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, [10.0, 19.0]], - [5.0, [10.0, 26.351923465728759765625]] - ], - "anim": 1.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, [1.0, 1.0]] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, 1.0] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, 0.0], - [2.0, 18.0] - ], - "anim": 1.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, [1.0, 1.0]] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, 0.0] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, 0.0] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0, - "inter_post": 2, - "raw value": [ - [0.0, 1.0] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }], - "attri": {}, - "type": "Node_Transform", - "y": 160.0, - "name": "Transform" - }, { - "group": -1.0, - "x": 160.0, - "id": 3.0, - "inputs": [{ - "from node": 2.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, 0.0] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": 0.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, [10.0, 10.0]] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, -90.0] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }], - "attri": {}, - "type": "Node_Mirror", - "y": 160.0, - "name": "Mirror" - }, { - "group": -1.0, - "x": -160.0, - "id": 1.0, - "inputs": [{ - "from node": 0.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, 0.0] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": 0.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, [8.7804878048780494737002300098538, 0.0, 0.0, 0.0]] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }], - "attri": {}, - "type": "Node_Crop", - "y": 160.0, - "name": "Crop" - }, { - "group": -1.0, - "x": 320.0, - "id": 4.0, - "inputs": [{ - "from node": 3.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, 0.0] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": 0.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, 0.0] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, 1.0] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, 0.0] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, 0.0] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, 0.0] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, 16777215.0] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, 0.0] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, 0.0] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [1.0, 1.0], - [5.0, 0.0] - ], - "anim": 1.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }], - "attri": {}, - "type": "Node_Color_adjust", - "y": 160.0, - "name": "Color adjust" - }, { - "group": -1.0, - "x": -320.0, - "id": 0.0, - "inputs": [{ - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, "tile_0044.png"] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }, { - "from node": -1.0, - "curve_type": 0, - "on end": 0.0, - "inter_post": 2, - "raw value": [ - [0.0, [0.0, 0.0, 0.0, 0.0]] - ], - "anim": 0.0, - "inter_type": 0, - "inter_curv": [0.0, 0.0, 1.0, 1.0], - "from index": -1.0 - }], - "attri": {}, - "type": "Node_Image", - "y": 160.0, - "name": "tile_0044" - }], - "version": 68.0, - "animator": { - "framerate": 15.0, - "frames_total": 5.0 - } -} \ No newline at end of file +{ "nodes": [ { "group": -1.0, "x": -64.0, "id": 2.0, "inputs": [ { "from node": 1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, 0.0, 0.0, 0.0 ] ], "anim": 0.0, "visible": true, "from index": 0.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, [ 20.0, 20.0 ], 0.0, 0.0 ] ], "anim": 0.0, "visible": true, "from index": -1.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, [ 10.0, 19.0 ], 0.0, 0.0 ], [ 5.0, [ 10.0, 26.351923465728759765625 ], 0.0, 0.0 ] ], "anim": 1.0, "visible": false, "from index": -1.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, [ 1.0, 1.0 ], 0.0, 0.0 ] ], "anim": 0.0, "visible": false, "from index": -1.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, 1.0, 0.0, 0.0 ] ], "anim": 0.0, "visible": false, "from index": -1.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, 0.0, 0.0, 0.0 ], [ 2.0, 18.0, 0.0, 0.0 ] ], "anim": 1.0, "visible": false, "from index": -1.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, [ 1.0, 1.0 ], 0.0, 0.0 ] ], "anim": 0.0, "visible": false, "from index": -1.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, 0.0, 0.0, 0.0 ] ], "anim": 0.0, "visible": false, "from index": -1.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, 0.0, 0.0, 0.0 ] ], "anim": 0.0, "visible": false, "from index": -1.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, 1.0, 0.0, 0.0 ] ], "anim": 0.0, "visible": false, "from index": -1.0 }, { "from node": -1.0, "on end": 0, "data": [ ], "raw value": [ [ 0.0, true, 0.0, 0.0 ] ], "anim": false, "visible": false, "from index": -1.0 }, { "from node": -1.0, "on end": 0, "data": [ ], "raw value": [ [ 0.0, false, 0.0, 0.0 ] ], "anim": false, "visible": false, "from index": -1.0 } ], "attri": { }, "type": "Node_Transform", "y": -64.0, "name": "Transform" }, { "group": -1.0, "x": 96.0, "id": 3.0, "inputs": [ { "from node": 2.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, 0.0, 0.0, 0.0 ] ], "anim": 0.0, "visible": true, "from index": 0.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, [ 10.0, 10.0 ], 0.0, 0.0 ] ], "anim": 0.0, "visible": false, "from index": -1.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, -90.0, 0.0, 0.0 ] ], "anim": 0.0, "visible": false, "from index": -1.0 } ], "attri": { }, "type": "Node_Mirror", "y": -64.0, "name": "Mirror" }, { "group": -1.0, "x": -224.0, "id": 1.0, "inputs": [ { "from node": 0.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, 0.0, 0.0, 0.0 ] ], "anim": 0.0, "visible": true, "from index": 0.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, [ 8.7804878048780494737002300098538, 0.0, 0.0, 0.0 ], 0.0, 0.0 ] ], "anim": 0.0, "visible": false, "from index": -1.0 } ], "attri": { }, "type": "Node_Crop", "y": -64.0, "name": "Crop" }, { "group": -1.0, "x": 256.0, "id": 4.0, "inputs": [ { "from node": 3.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, 0.0, 0.0, 0.0 ] ], "anim": 0.0, "visible": true, "from index": 0.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, 0.0, 0.0, 0.0 ] ], "anim": 0.0, "visible": false, "from index": -1.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, 0.0, 0.0, 0.0 ] ], "anim": 0.0, "visible": false, "from index": -1.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, 0.0, 0.0, 0.0 ] ], "anim": 0.0, "visible": false, "from index": -1.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, 0.0, 0.0, 0.0 ] ], "anim": 0.0, "visible": false, "from index": -1.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, 0.0, 0.0, 0.0 ] ], "anim": 0.0, "visible": false, "from index": -1.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, 16777215.0, 0.0, 0.0 ] ], "anim": 0.0, "visible": false, "from index": -1.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, 0.0, 0.0, 0.0 ] ], "anim": 0.0, "visible": false, "from index": -1.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, 0.0, 0.0, 0.0 ] ], "anim": 0.0, "visible": true, "from index": -1.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 1.0, 1.0, 0.0, 0.0 ], [ 5.0, 0.0, 0.0, 0.0 ] ], "anim": 1.0, "visible": false, "from index": -1.0 } ], "attri": { }, "type": "Node_Color_adjust", "y": -64.0, "name": "Color adjust" }, { "group": -1.0, "x": -384.0, "id": 0.0, "inputs": [ { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, "tile_0044.png", 0.0, 0.0 ] ], "anim": 0.0, "visible": false, "from index": -1.0 }, { "from node": -1.0, "on end": 0.0, "data": [ ], "raw value": [ [ 0.0, [ 0.0, 0.0, 0.0, 0.0 ], 0.0, 0.0 ] ], "anim": 0.0, "visible": false, "from index": -1.0 } ], "attri": { }, "type": "Node_Image", "y": -64.0, "name": "tile_0044" } ], "version": 82.0, "animator": { "framerate": 15.0, "frames_total": 5.0 } } \ No newline at end of file diff --git a/scripts/save_function/save_function.gml b/scripts/save_function/save_function.gml index 46a8c1f6b..604b10883 100644 --- a/scripts/save_function/save_function.gml +++ b/scripts/save_function/save_function.gml @@ -4,7 +4,7 @@ function NEW() { room_restart(); gc_collect(); - CURRENT_PATH = ""; + setPath(""); } function clearNodes() { @@ -46,17 +46,22 @@ function save_serialize() { } function SET_PATH(path) { - if(READONLY) - window_set_caption("[READ ONLY] " + filename_name(path) + " - Pixel Composer"); - else { - var index = ds_list_find_index(RECENT_FILES, path); - if(CURRENT_PATH != path) { - if(index != -1) - ds_list_delete(RECENT_FILES, index); - ds_list_insert(RECENT_FILES, 0, path); - RECENT_SAVE(); + if(path == "") { + READONLY = false; + window_set_caption("Pixel Composer"); + } else { + if(READONLY) + window_set_caption("[READ ONLY] " + filename_name(path) + " - Pixel Composer"); + else { + var index = ds_list_find_index(RECENT_FILES, path); + if(CURRENT_PATH != path) { + if(index != -1) + ds_list_delete(RECENT_FILES, index); + ds_list_insert(RECENT_FILES, 0, path); + RECENT_SAVE(); + } + window_set_caption(filename_name(path) + " - Pixel Composer"); } - window_set_caption(filename_name(path) + " - Pixel Composer"); } CURRENT_PATH = path;