diff --git a/Pixels Composer.yyp b/Pixels Composer.yyp index b3d42a737..a5313c542 100644 --- a/Pixels Composer.yyp +++ b/Pixels Composer.yyp @@ -276,12 +276,12 @@ {"id":{"name":"areaBox","path":"scripts/areaBox/areaBox.yy",},"order":1,}, {"id":{"name":"s_node_noise_aniso","path":"sprites/s_node_noise_aniso/s_node_noise_aniso.yy",},"order":39,}, {"id":{"name":"node_particle","path":"scripts/node_particle/node_particle.yy",},"order":0,}, - {"id":{"name":"append","path":"scripts/append/append.yy",},"order":1,}, + {"id":{"name":"append_function","path":"scripts/append_function/append_function.yy",},"order":1,}, {"id":{"name":"s_node_particle_effector","path":"sprites/s_node_particle_effector/s_node_particle_effector.yy",},"order":37,}, {"id":{"name":"s_dialog_active","path":"sprites/s_dialog_active/s_dialog_active.yy",},"order":0,}, {"id":{"name":"obj_reader","path":"scripts/obj_reader/obj_reader.yy",},"order":2,}, {"id":{"name":"sh_invert","path":"shaders/sh_invert/sh_invert.yy",},"order":30,}, - {"id":{"name":"save","path":"scripts/save/save.yy",},"order":0,}, + {"id":{"name":"save_function","path":"scripts/save_function/save_function.yy",},"order":0,}, {"id":{"name":"node_perlin_smear","path":"scripts/node_perlin_smear/node_perlin_smear.yy",},"order":10,}, {"id":{"name":"node_alpha_cutoff","path":"scripts/node_alpha_cutoff/node_alpha_cutoff.yy",},"order":37,}, {"id":{"name":"sh_channel_R","path":"shaders/sh_channel_R/sh_channel_R.yy",},"order":12,}, @@ -519,7 +519,7 @@ {"id":{"name":"sample_projects","path":"scripts/sample_projects/sample_projects.yy",},"order":6,}, {"id":{"name":"s_path_tools_add","path":"sprites/s_path_tools_add/s_path_tools_add.yy",},"order":4,}, {"id":{"name":"s_ui_scrollbar","path":"sprites/s_ui_scrollbar/s_ui_scrollbar.yy",},"order":3,}, - {"id":{"name":"load","path":"scripts/load/load.yy",},"order":2,}, + {"id":{"name":"load_function","path":"scripts/load_function/load_function.yy",},"order":2,}, {"id":{"name":"ds_map","path":"scripts/ds_map/ds_map.yy",},"order":0,}, {"id":{"name":"sh_atlas","path":"shaders/sh_atlas/sh_atlas.yy",},"order":31,}, {"id":{"name":"node_scale","path":"scripts/node_scale/node_scale.yy",},"order":9,}, diff --git a/scripts/append/append.gml b/scripts/append_function/append_function.gml similarity index 73% rename from scripts/append/append.gml rename to scripts/append_function/append_function.gml index 87c3b96e8..c93073180 100644 --- a/scripts/append/append.gml +++ b/scripts/append_function/append_function.gml @@ -61,29 +61,29 @@ function APPEND(_path) { appended_list[| i].postConnect(); } - for(var i = 0; i < ds_list_size(appended_list); i++) { - appended_list[| i].doUpdate(); - } + //for(var i = 0; i < ds_list_size(appended_list); i++) { + // appended_list[| i].doUpdate(); + //} ds_list_destroy(appended_list); - renderAll(); + //renderAll(); - if(!ds_queue_empty(CONNECTION_CONFLICT)) { - var pass = 0; + //if(!ds_queue_empty(CONNECTION_CONFLICT)) { + // var pass = 0; - while(++pass < 2 && !ds_queue_empty(CONNECTION_CONFLICT)) { - var size = ds_queue_size(CONNECTION_CONFLICT); - log_message("LOAD", "[Connect] " + string(size) + " Connection conflict(s) detected ( pass: " + string(pass) + " )"); - repeat(size) { - ds_queue_dequeue(CONNECTION_CONFLICT).connect(); - } - renderAll(); - } + // while(++pass < 2 && !ds_queue_empty(CONNECTION_CONFLICT)) { + // var size = ds_queue_size(CONNECTION_CONFLICT); + // log_message("LOAD", "[Connect] " + string(size) + " Connection conflict(s) detected ( pass: " + string(pass) + " )"); + // repeat(size) { + // ds_queue_dequeue(CONNECTION_CONFLICT).connect(); + // } + // renderAll(); + // } - if(!ds_queue_empty(CONNECTION_CONFLICT)) - PANEL_MENU.addNotiExtra("Some connection(s) is unsolved. This may caused by render node not being update properly, or image path is broken."); - } + // if(!ds_queue_empty(CONNECTION_CONFLICT)) + // PANEL_MENU.addNotiExtra("Some connection(s) is unsolved. This may caused by render node not being update properly, or image path is broken."); + //} APPENDING = false; PANEL_ANIMATION.updatePropertyList(); diff --git a/scripts/save/save.yy b/scripts/append_function/append_function.yy similarity index 87% rename from scripts/save/save.yy rename to scripts/append_function/append_function.yy index 8f7c46cf5..5089972a1 100644 --- a/scripts/save/save.yy +++ b/scripts/append_function/append_function.yy @@ -6,7 +6,7 @@ "path": "folders/functions/save load.yy", }, "resourceVersion": "1.0", - "name": "save", + "name": "append_function", "tags": [], "resourceType": "GMScript", } \ No newline at end of file diff --git a/scripts/debug/debug.gml b/scripts/debug/debug.gml index 593c1804d..dc75cadb9 100644 --- a/scripts/debug/debug.gml +++ b/scripts/debug/debug.gml @@ -43,7 +43,9 @@ exception_unhandled_handler(function(ex) { var tt = "\n-------------------------- OH NO --------------------------\n\n"; tt += ex.longMessage; tt += "\n---------------------------- :( ----------------------------\n"; + tt += "\nError message saved to clipboard"; tt += "\n\nVisit crash log from " + string(DIRECTORY + "log.txt") + " for more information"; show_error(tt, true); + clipboard_set_text(tt); return 0; }); \ No newline at end of file diff --git a/scripts/load/load.gml b/scripts/load_function/load_function.gml similarity index 100% rename from scripts/load/load.gml rename to scripts/load_function/load_function.gml diff --git a/scripts/append/append.yy b/scripts/load_function/load_function.yy similarity index 88% rename from scripts/append/append.yy rename to scripts/load_function/load_function.yy index 3586f3bd0..d026a7da1 100644 --- a/scripts/append/append.yy +++ b/scripts/load_function/load_function.yy @@ -6,7 +6,7 @@ "path": "folders/functions/save load.yy", }, "resourceVersion": "1.0", - "name": "append", + "name": "load_function", "tags": [], "resourceType": "GMScript", } \ No newline at end of file diff --git a/scripts/node_collection/node_collection.gml b/scripts/node_collection/node_collection.gml index adbf5c3dc..23f1ec3b7 100644 --- a/scripts/node_collection/node_collection.gml +++ b/scripts/node_collection/node_collection.gml @@ -84,4 +84,10 @@ function Node_Collection(_x, _y) : Node(_x, _y) constructor { ds_priority_destroy(ar); } + + static onDestroy = function() { + for( var i = 0; i < ds_list_size(nodes); i++ ) { + nodes[| i].destroy(); + } + } } \ No newline at end of file diff --git a/scripts/node_colorize/node_colorize.gml b/scripts/node_colorize/node_colorize.gml index 21634a3c6..2127e71a9 100644 --- a/scripts/node_colorize/node_colorize.gml +++ b/scripts/node_colorize/node_colorize.gml @@ -53,7 +53,7 @@ function Node_Colorize(_x, _y) : Node_Processor(_x, _y) constructor { shader_reset(); BLEND_NORMAL - surface_reset_target(); + surface_reset_target(); return _outSurf; } diff --git a/scripts/node_dither/node_dither.gml b/scripts/node_dither/node_dither.gml index 08f6a5384..1e57dc41a 100644 --- a/scripts/node_dither/node_dither.gml +++ b/scripts/node_dither/node_dither.gml @@ -113,7 +113,7 @@ function Node_Dither(_x, _y) : Node_Processor(_x, _y) constructor { draw_surface_safe(_data[0], 0, 0); shader_reset(); - BLEND_NORMAL + BLEND_NORMAL surface_reset_target(); return _outSurf; diff --git a/scripts/node_group_input/node_group_input.gml b/scripts/node_group_input/node_group_input.gml index 3810e0317..b7f41b70a 100644 --- a/scripts/node_group_input/node_group_input.gml +++ b/scripts/node_group_input/node_group_input.gml @@ -40,8 +40,8 @@ function Node_Group_Input(_x, _y, _group) : Node(_x, _y) constructor { inputs[| 5] = nodeValue(5, "Order", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0); input_display_list = [ - ["Data", false], 2, 4, - ["Display", false], 5, 0, 1, 3 + ["Display", false], 5, + ["Data", false], 2, 0, 4, 1, 3, ]; outputs[| 0] = nodeValue(0, "Value", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, 0); @@ -119,6 +119,7 @@ function Node_Group_Input(_x, _y, _group) : Node(_x, _y) constructor { case VALUE_DISPLAY.palette : if(!is_array(_val)) inParent.value = new animValue([c_black], inParent); + inParent.setDisplay(_dtype); break; default : diff --git a/scripts/node_normal_light/node_normal_light.gml b/scripts/node_normal_light/node_normal_light.gml index f460717f8..f4dc3d703 100644 --- a/scripts/node_normal_light/node_normal_light.gml +++ b/scripts/node_normal_light/node_normal_light.gml @@ -62,7 +62,7 @@ function Node_Normal_Light(_x, _y) : Node_Processor(_x, _y) constructor { surface_set_target(_outSurf); draw_clear_alpha(0, 0); - BLEND_ADD + BLEND_ADD shader_set(sh_normal_light); texture_set_stage(uniform_map, surface_get_texture(_map)); diff --git a/scripts/node_outline/node_outline.gml b/scripts/node_outline/node_outline.gml index 6ad0fb08f..c51707073 100644 --- a/scripts/node_outline/node_outline.gml +++ b/scripts/node_outline/node_outline.gml @@ -68,7 +68,7 @@ function Node_Outline(_x, _y) : Node_Processor(_x, _y) constructor { BLEND_NORMAL surface_reset_target(); - return _outSurf; + return _outSurf; } static step = function() { diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index 3bbcc53a0..8e98d0929 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -236,8 +236,8 @@ function NodeValue(_index, _name, _node, _connect, _type, _value, _tag = VALUE_T if(display_data != -1) editWidget.extras = display_data; break; case VALUE_DISPLAY.rotation : - editWidget = new rotator(function(val, save) { - setValue(val, save); + editWidget = new rotator(function(val, _save) { + setValue(val, _save); } ); break; case VALUE_DISPLAY.rotation_range : diff --git a/scripts/panel_collection/panel_collection.gml b/scripts/panel_collection/panel_collection.gml index f4c0f6644..6441f7c97 100644 --- a/scripts/panel_collection/panel_collection.gml +++ b/scripts/panel_collection/panel_collection.gml @@ -26,7 +26,7 @@ function Panel_Collection(_panel) : PanelContent(_panel) constructor { var grid_space = 12; var nodes = content_list; var node_count = ds_list_size(nodes); - var col = floor(content_w / (grid_width + grid_space)); + var col = max(1, floor(content_w / (grid_width + grid_space))); var row = ceil(node_count / col); var hh = grid_space; var yy = _y + grid_space; diff --git a/scripts/save/save.gml b/scripts/save_function/save_function.gml similarity index 100% rename from scripts/save/save.gml rename to scripts/save_function/save_function.gml diff --git a/scripts/load/load.yy b/scripts/save_function/save_function.yy similarity index 88% rename from scripts/load/load.yy rename to scripts/save_function/save_function.yy index 3cb8223d9..50ea7d1f8 100644 --- a/scripts/load/load.yy +++ b/scripts/save_function/save_function.yy @@ -6,7 +6,7 @@ "path": "folders/functions/save load.yy", }, "resourceVersion": "1.0", - "name": "load", + "name": "save_function", "tags": [], "resourceType": "GMScript", } \ No newline at end of file