diff --git a/PixelComposer.resource_order b/PixelComposer.resource_order index 9fcdde31d..ccaedfd63 100644 --- a/PixelComposer.resource_order +++ b/PixelComposer.resource_order @@ -285,6 +285,7 @@ {"name":"s_button_hide_fill","order":4,"path":"sprites/s_button_hide_fill/s_button_hide_fill.yy",}, {"name":"_f_code","order":9,"path":"fonts/_f_code/_f_code.yy",}, {"name":"sh_combine_rgb","order":40,"path":"shaders/sh_combine_rgb/sh_combine_rgb.yy",}, + {"name":"node_armature_to_path","order":4,"path":"scripts/node_armature_to_path/node_armature_to_path.yy",}, {"name":"s_node_strandSim","order":3,"path":"sprites/s_node_strandSim/s_node_strandSim.yy",}, {"name":"o_dialog_panel","order":13,"path":"objects/o_dialog_panel/o_dialog_panel.yy",}, {"name":"s_node_vfx","order":9,"path":"sprites/s_node_vfx/s_node_vfx.yy",}, @@ -634,6 +635,7 @@ {"name":"node_blur_simple","order":4,"path":"scripts/node_blur_simple/node_blur_simple.yy",}, {"name":"node_feedback_input","order":1,"path":"scripts/node_feedback_input/node_feedback_input.yy",}, {"name":"s_node_base_conversion","order":10,"path":"sprites/s_node_base_conversion/s_node_base_conversion.yy",}, + {"name":"node_transform_array","order":15,"path":"scripts/node_transform_array/node_transform_array.yy",}, {"name":"s_node_loop_array","order":23,"path":"sprites/s_node_loop_array/s_node_loop_array.yy",}, {"name":"s_node_iterator_amount","order":26,"path":"sprites/s_node_iterator_amount/s_node_iterator_amount.yy",}, {"name":"sh_color_adjust","order":6,"path":"shaders/sh_color_adjust/sh_color_adjust.yy",}, @@ -671,6 +673,7 @@ {"name":"sh_posterize","order":19,"path":"shaders/sh_posterize/sh_posterize.yy",}, {"name":"s_node_mirror","order":3,"path":"sprites/s_node_mirror/s_node_mirror.yy",}, {"name":"s_node_blur_simple","order":43,"path":"sprites/s_node_blur_simple/s_node_blur_simple.yy",}, + {"name":"theme_definition","order":14,"path":"scripts/theme_definition/theme_definition.yy",}, {"name":"node_VFX_spawner","order":1,"path":"scripts/node_VFX_spawner/node_VFX_spawner.yy",}, {"name":"_draw_defines","order":21,"path":"scripts/_draw_defines/_draw_defines.yy",}, {"name":"sh_color_replace","order":8,"path":"shaders/sh_color_replace/sh_color_replace.yy",}, @@ -818,6 +821,7 @@ {"name":"s_node_twirl","order":41,"path":"sprites/s_node_twirl/s_node_twirl.yy",}, {"name":"sh_2d_light","order":28,"path":"shaders/sh_2d_light/sh_2d_light.yy",}, {"name":"node_image_animated","order":2,"path":"scripts/node_image_animated/node_image_animated.yy",}, + {"name":"s_node_transform_array","order":17,"path":"sprites/s_node_transform_array/s_node_transform_array.yy",}, {"name":"node_palette_extract","order":7,"path":"scripts/node_palette_extract/node_palette_extract.yy",}, {"name":"s_node_solid","order":15,"path":"sprites/s_node_solid/s_node_solid.yy",}, {"name":"s_node_fluidSim_vortex","order":8,"path":"sprites/s_node_fluidSim_vortex/s_node_fluidSim_vortex.yy",}, @@ -1112,7 +1116,7 @@ {"name":"s_node_unicode","order":8,"path":"sprites/s_node_unicode/s_node_unicode.yy",}, {"name":"s_node_color_from_hsv","order":4,"path":"sprites/s_node_color_from_hsv/s_node_color_from_hsv.yy",}, {"name":"fd_rectangle_get_material_type","order":14,"path":"scripts/fd_rectangle_get_material_type/fd_rectangle_get_material_type.yy",}, - {"name":"node_area","order":5,"path":"scripts/node_area/node_area.yy",}, + {"name":"node_area","order":14,"path":"scripts/node_area/node_area.yy",}, {"name":"s_node_posterize","order":33,"path":"sprites/s_node_posterize/s_node_posterize.yy",}, {"name":"s_node_struct_get","order":1,"path":"sprites/s_node_struct_get/s_node_struct_get.yy",}, {"name":"s_node_vfx_vortex","order":4,"path":"sprites/s_node_vfx_vortex/s_node_vfx_vortex.yy",}, @@ -1289,6 +1293,7 @@ {"name":"fd_rectangle_get_material_width","order":15,"path":"scripts/fd_rectangle_get_material_width/fd_rectangle_get_material_width.yy",}, {"name":"font_sprite_loader","order":10,"path":"scripts/font_sprite_loader/font_sprite_loader.yy",}, {"name":"s_node_noise_aniso","order":9,"path":"sprites/s_node_noise_aniso/s_node_noise_aniso.yy",}, + {"name":"s_node_armature_path","order":17,"path":"sprites/s_node_armature_path/s_node_armature_path.yy",}, {"name":"s_node_gradient_palette","order":16,"path":"sprites/s_node_gradient_palette/s_node_gradient_palette.yy",}, {"name":"node_array_shuffle","order":22,"path":"scripts/node_array_shuffle/node_array_shuffle.yy",}, {"name":"panel_node_data_gen","order":9,"path":"scripts/panel_node_data_gen/panel_node_data_gen.yy",}, diff --git a/PixelComposer.yyp b/PixelComposer.yyp index 12b781642..61e6eecf1 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -441,6 +441,7 @@ {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphic.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_key_display_mouse_strip6.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"anchor_arrow.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/preview",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"anchor_bone_stick.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/preview",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"anchor_selector.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/preview",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphics x2.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/preview",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_anchor_rotate.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/preview",}, @@ -624,7 +625,7 @@ "isEcma": false, "LibraryEmitters": [], "MetaData": { - "IDEVersion": "2023.4.0.84", + "IDEVersion": "2023.6.0.89", }, "resources": [ {"id":{"name":"s_node_corner","path":"sprites/s_node_corner/s_node_corner.yy",},}, @@ -766,6 +767,7 @@ {"id":{"name":"s_button_hide_fill","path":"sprites/s_button_hide_fill/s_button_hide_fill.yy",},}, {"id":{"name":"_f_code","path":"fonts/_f_code/_f_code.yy",},}, {"id":{"name":"sh_combine_rgb","path":"shaders/sh_combine_rgb/sh_combine_rgb.yy",},}, + {"id":{"name":"node_armature_to_path","path":"scripts/node_armature_to_path/node_armature_to_path.yy",},}, {"id":{"name":"s_node_strandSim","path":"sprites/s_node_strandSim/s_node_strandSim.yy",},}, {"id":{"name":"object_get_depth","path":"scripts/object_get_depth/object_get_depth.yy",},}, {"id":{"name":"o_dialog_panel","path":"objects/o_dialog_panel/o_dialog_panel.yy",},}, @@ -1171,6 +1173,7 @@ {"id":{"name":"o_dialog_add_multiple_images","path":"objects/o_dialog_add_multiple_images/o_dialog_add_multiple_images.yy",},}, {"id":{"name":"assets_data","path":"scripts/assets_data/assets_data.yy",},}, {"id":{"name":"s_node_base_conversion","path":"sprites/s_node_base_conversion/s_node_base_conversion.yy",},}, + {"id":{"name":"node_transform_array","path":"scripts/node_transform_array/node_transform_array.yy",},}, {"id":{"name":"s_node_loop_array","path":"sprites/s_node_loop_array/s_node_loop_array.yy",},}, {"id":{"name":"s_node_iterator_amount","path":"sprites/s_node_iterator_amount/s_node_iterator_amount.yy",},}, {"id":{"name":"sh_color_adjust","path":"shaders/sh_color_adjust/sh_color_adjust.yy",},}, @@ -1211,6 +1214,7 @@ {"id":{"name":"s_node_mirror","path":"sprites/s_node_mirror/s_node_mirror.yy",},}, {"id":{"name":"draw_enable_alphablend","path":"scripts/draw_enable_alphablend/draw_enable_alphablend.yy",},}, {"id":{"name":"s_node_blur_simple","path":"sprites/s_node_blur_simple/s_node_blur_simple.yy",},}, + {"id":{"name":"theme_definition","path":"scripts/theme_definition/theme_definition.yy",},}, {"id":{"name":"node_VFX_spawner","path":"scripts/node_VFX_spawner/node_VFX_spawner.yy",},}, {"id":{"name":"s_node_equation","path":"sprites/s_node_equation/s_node_equation.yy",},}, {"id":{"name":"_draw_defines","path":"scripts/_draw_defines/_draw_defines.yy",},}, @@ -1373,6 +1377,7 @@ {"id":{"name":"s_node_twirl","path":"sprites/s_node_twirl/s_node_twirl.yy",},}, {"id":{"name":"sh_2d_light","path":"shaders/sh_2d_light/sh_2d_light.yy",},}, {"id":{"name":"node_image_animated","path":"scripts/node_image_animated/node_image_animated.yy",},}, + {"id":{"name":"s_node_transform_array","path":"sprites/s_node_transform_array/s_node_transform_array.yy",},}, {"id":{"name":"node_palette_extract","path":"scripts/node_palette_extract/node_palette_extract.yy",},}, {"id":{"name":"s_node_solid","path":"sprites/s_node_solid/s_node_solid.yy",},}, {"id":{"name":"s_node_fluidSim_vortex","path":"sprites/s_node_fluidSim_vortex/s_node_fluidSim_vortex.yy",},}, @@ -1921,6 +1926,7 @@ {"id":{"name":"s_node_draw_atlas","path":"sprites/s_node_draw_atlas/s_node_draw_atlas.yy",},}, {"id":{"name":"s_node_noise_aniso","path":"sprites/s_node_noise_aniso/s_node_noise_aniso.yy",},}, {"id":{"name":"steam_ugc_functions","path":"scripts/steam_ugc_functions/steam_ugc_functions.yy",},}, + {"id":{"name":"s_node_armature_path","path":"sprites/s_node_armature_path/s_node_armature_path.yy",},}, {"id":{"name":"s_node_gradient_palette","path":"sprites/s_node_gradient_palette/s_node_gradient_palette.yy",},}, {"id":{"name":"node_array_shuffle","path":"scripts/node_array_shuffle/node_array_shuffle.yy",},}, {"id":{"name":"panel_node_data_gen","path":"scripts/panel_node_data_gen/panel_node_data_gen.yy",},}, diff --git a/datafiles/data/themes/default.zip b/datafiles/data/themes/default.zip index 289e5dc94..110ccc380 100644 Binary files a/datafiles/data/themes/default.zip and b/datafiles/data/themes/default.zip differ diff --git a/fonts/_f_code/_f_code.yy b/fonts/_f_code/_f_code.yy index 6e5fc3acd..2e02f7630 100644 --- a/fonts/_f_code/_f_code.yy +++ b/fonts/_f_code/_f_code.yy @@ -116,6 +116,7 @@ "italic": false, "kerningPairs": [], "last": 0, + "lineHeight": 0, "maintainGms1Font": false, "parent": { "name": "font", @@ -128,6 +129,7 @@ ], "regenerateBitmap": false, "sampleText": "abcdef ABCDEF\n0123456789 .,<>\"'&!?\nthe quick brown fox jumps over the lazy dog\nTHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG\nDefault character: ▯ (9647)", + "sdfSpread": 8, "size": 12.0, "styleName": "Light", "textureGroupId": { @@ -135,4 +137,5 @@ "path": "texturegroups/Default", }, "TTFName": "", + "usesSDF": false, } \ No newline at end of file diff --git a/fonts/_f_h1/_f_h1.yy b/fonts/_f_h1/_f_h1.yy index 782225538..0608f4a4f 100644 --- a/fonts/_f_h1/_f_h1.yy +++ b/fonts/_f_h1/_f_h1.yy @@ -116,6 +116,7 @@ "italic": false, "kerningPairs": [], "last": 0, + "lineHeight": 0, "maintainGms1Font": false, "parent": { "name": "font", @@ -128,6 +129,7 @@ ], "regenerateBitmap": false, "sampleText": "abcdef ABCDEF\n0123456789 .,<>\"'&!?\nthe quick brown fox jumps over the lazy dog\nTHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG\nDefault character: ▯ (9647)", + "sdfSpread": 8, "size": 48.0, "styleName": "Black", "textureGroupId": { @@ -135,4 +137,5 @@ "path": "texturegroups/Default", }, "TTFName": "", + "usesSDF": false, } \ No newline at end of file diff --git a/fonts/_f_h2/_f_h2.yy b/fonts/_f_h2/_f_h2.yy index 2e52e1a22..6162084f2 100644 --- a/fonts/_f_h2/_f_h2.yy +++ b/fonts/_f_h2/_f_h2.yy @@ -1391,6 +1391,7 @@ {"amount":3,"first":123,"second":309,}, ], "last": 0, + "lineHeight": 0, "maintainGms1Font": false, "parent": { "name": "font", @@ -1403,6 +1404,7 @@ ], "regenerateBitmap": false, "sampleText": "abcdef ABCDEF\n0123456789 .,<>\"'&!?\nthe quick brown fox jumps over the lazy dog\nTHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG\nDefault character: ▯ (9647)", + "sdfSpread": 8, "size": 28.0, "styleName": "Bold", "textureGroupId": { @@ -1410,4 +1412,5 @@ "path": "texturegroups/Default", }, "TTFName": "", + "usesSDF": false, } \ No newline at end of file diff --git a/fonts/_f_h3/_f_h3.yy b/fonts/_f_h3/_f_h3.yy index 4f2e66466..21cd07b28 100644 --- a/fonts/_f_h3/_f_h3.yy +++ b/fonts/_f_h3/_f_h3.yy @@ -1192,6 +1192,7 @@ {"amount":2,"first":123,"second":309,}, ], "last": 0, + "lineHeight": 0, "maintainGms1Font": false, "parent": { "name": "font", @@ -1204,6 +1205,7 @@ ], "regenerateBitmap": false, "sampleText": "abcdef ABCDEF\n0123456789 .,<>\"'&!?\nthe quick brown fox jumps over the lazy dog\nTHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG\nDefault character: ▯ (9647)", + "sdfSpread": 8, "size": 20.0, "styleName": "Bold", "textureGroupId": { @@ -1211,4 +1213,5 @@ "path": "texturegroups/Default", }, "TTFName": "", + "usesSDF": false, } \ No newline at end of file diff --git a/fonts/_f_h5/_f_h5.yy b/fonts/_f_h5/_f_h5.yy index 1f0484eaa..090f0fc4b 100644 --- a/fonts/_f_h5/_f_h5.yy +++ b/fonts/_f_h5/_f_h5.yy @@ -871,6 +871,7 @@ {"amount":1,"first":123,"second":309,}, ], "last": 0, + "lineHeight": 0, "maintainGms1Font": false, "parent": { "name": "font", @@ -883,6 +884,7 @@ ], "regenerateBitmap": false, "sampleText": "abcdef ABCDEF\n0123456789 .,<>\"'&!?\nthe quick brown fox jumps over the lazy dog\nTHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG\nDefault character: ▯ (9647)", + "sdfSpread": 8, "size": 16.0, "styleName": "Bold", "textureGroupId": { @@ -890,4 +892,5 @@ "path": "texturegroups/Default", }, "TTFName": "", + "usesSDF": false, } \ No newline at end of file diff --git a/fonts/_f_p0/_f_p0.yy b/fonts/_f_p0/_f_p0.yy index 46ba19c7e..bd72c2c68 100644 --- a/fonts/_f_p0/_f_p0.yy +++ b/fonts/_f_p0/_f_p0.yy @@ -560,6 +560,7 @@ {"amount":1,"first":123,"second":309,}, ], "last": 0, + "lineHeight": 0, "maintainGms1Font": false, "parent": { "name": "font", @@ -572,6 +573,7 @@ ], "regenerateBitmap": false, "sampleText": "abcdef ABCDEF\n0123456789 .,<>\"'&!?\nthe quick brown fox jumps over the lazy dog\nTHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG\nDefault character: ▯ (9647)", + "sdfSpread": 8, "size": 12.0, "styleName": "Semibold", "textureGroupId": { @@ -579,4 +581,5 @@ "path": "texturegroups/Default", }, "TTFName": "", + "usesSDF": false, } \ No newline at end of file diff --git a/fonts/_f_p0b/_f_p0b.yy b/fonts/_f_p0b/_f_p0b.yy index 15a65e9ff..9b467360d 100644 --- a/fonts/_f_p0b/_f_p0b.yy +++ b/fonts/_f_p0b/_f_p0b.yy @@ -534,6 +534,7 @@ {"amount":1,"first":123,"second":309,}, ], "last": 0, + "lineHeight": 0, "maintainGms1Font": false, "parent": { "name": "font", @@ -546,6 +547,7 @@ ], "regenerateBitmap": false, "sampleText": "abcdef ABCDEF\n0123456789 .,<>\"'&!?\nthe quick brown fox jumps over the lazy dog\nTHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG\nDefault character: ▯ (9647)", + "sdfSpread": 8, "size": 12.0, "styleName": "Bold", "textureGroupId": { @@ -553,4 +555,5 @@ "path": "texturegroups/Default", }, "TTFName": "", + "usesSDF": false, } \ No newline at end of file diff --git a/fonts/_f_p1/_f_p1.yy b/fonts/_f_p1/_f_p1.yy index fe820762e..ae3b5d185 100644 --- a/fonts/_f_p1/_f_p1.yy +++ b/fonts/_f_p1/_f_p1.yy @@ -458,6 +458,7 @@ {"amount":1,"first":123,"second":309,}, ], "last": 0, + "lineHeight": 0, "maintainGms1Font": false, "parent": { "name": "font", @@ -470,6 +471,7 @@ ], "regenerateBitmap": false, "sampleText": "abcdef ABCDEF\n0123456789 .,<>\"'&!?\nthe quick brown fox jumps over the lazy dog\nTHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG\nDefault character: ▯ (9647)", + "sdfSpread": 8, "size": 11.0, "styleName": "Semibold", "textureGroupId": { @@ -477,4 +479,5 @@ "path": "texturegroups/Default", }, "TTFName": "", + "usesSDF": false, } \ No newline at end of file diff --git a/fonts/_f_p2/_f_p2.yy b/fonts/_f_p2/_f_p2.yy index 40ed8a51a..d654840f4 100644 --- a/fonts/_f_p2/_f_p2.yy +++ b/fonts/_f_p2/_f_p2.yy @@ -298,6 +298,7 @@ {"amount":1,"first":123,"second":309,}, ], "last": 0, + "lineHeight": 0, "maintainGms1Font": false, "parent": { "name": "font", @@ -310,6 +311,7 @@ ], "regenerateBitmap": false, "sampleText": "abcdef ABCDEF\n0123456789 .,<>\"'&!?\nthe quick brown fox jumps over the lazy dog\nTHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG\nDefault character: ▯ (9647)", + "sdfSpread": 8, "size": 10.0, "styleName": "Semibold", "textureGroupId": { @@ -317,4 +319,5 @@ "path": "texturegroups/Default", }, "TTFName": "", + "usesSDF": false, } \ No newline at end of file diff --git a/fonts/_f_p3/_f_p3.yy b/fonts/_f_p3/_f_p3.yy index 7d6135da0..a06d28321 100644 --- a/fonts/_f_p3/_f_p3.yy +++ b/fonts/_f_p3/_f_p3.yy @@ -193,6 +193,7 @@ {"amount":1,"first":91,"second":309,}, ], "last": 0, + "lineHeight": 0, "maintainGms1Font": false, "parent": { "name": "font", @@ -205,6 +206,7 @@ ], "regenerateBitmap": false, "sampleText": "abcdef ABCDEF\n0123456789 .,<>\"'&!?\nthe quick brown fox jumps over the lazy dog\nTHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG\nDefault character: ▯ (9647)", + "sdfSpread": 8, "size": 9.0, "styleName": "Bold", "textureGroupId": { @@ -212,4 +214,5 @@ "path": "texturegroups/Default", }, "TTFName": "", + "usesSDF": false, } \ No newline at end of file diff --git a/objects/o_dialog_add_multiple_images/Draw_64.gml b/objects/o_dialog_add_multiple_images/Draw_64.gml index d0b554188..e1891d97d 100644 --- a/objects/o_dialog_add_multiple_images/Draw_64.gml +++ b/objects/o_dialog_add_multiple_images/Draw_64.gml @@ -50,7 +50,7 @@ if !ready exit; } } - draw_sprite_ui_uniform(_node.spr, 0, xx + grid_size / 2, yy + grid_size / 2); + draw_sprite_ui_uniform(_node.spr, 0, xx + grid_size / 2, yy + grid_size / 2, 0.5); draw_set_text(f_p2, fa_center, fa_top, COLORS._main_text); draw_text(xx + grid_size / 2, yy + grid_size + 4, _node.name); diff --git a/objects/o_dialog_add_node/Create_0.gml b/objects/o_dialog_add_node/Create_0.gml index 9bc5b67bf..88d4f4077 100644 --- a/objects/o_dialog_add_node/Create_0.gml +++ b/objects/o_dialog_add_node/Create_0.gml @@ -416,12 +416,14 @@ event_inherited(); } } - gpu_set_blendmode(bm_subtract); - draw_set_color(c_white); - draw_rectangle(0, 0, content_pane.surface_w, ui(16 + 24 / 2), false); - gpu_set_blendmode(bm_normal); - var len = array_length(group_labels); + if(len) { + gpu_set_blendmode(bm_subtract); + draw_set_color(c_white); + draw_rectangle(0, 0, content_pane.surface_w, ui(16 + 24 / 2), false); + gpu_set_blendmode(bm_normal); + } + for( var i = 0; i < len; i++ ) { var lb = group_labels[i]; var _yy = max(lb.y, i == len - 1? ui(8) : min(ui(8), group_labels[i + 1].y - ui(32))); diff --git a/objects/o_dialog_file_name_collection/Draw_64.gml b/objects/o_dialog_file_name_collection/Draw_64.gml index ad5eb924c..250716894 100644 --- a/objects/o_dialog_file_name_collection/Draw_64.gml +++ b/objects/o_dialog_file_name_collection/Draw_64.gml @@ -7,7 +7,7 @@ #region draw TB draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text); - draw_text(dialog_x + ui(16), dialog_y + ui(32), __txtx("Name")); + draw_text_add(dialog_x + ui(16), dialog_y + ui(32), __txt("Name")); //var is_author = !meta.steam || meta.author_steam_id == 0 || meta.author_steam_id == STEAM_USER_ID; diff --git a/objects/o_dialog_fontscrollbox/Alarm_0.gml b/objects/o_dialog_fontscrollbox/Alarm_0.gml index 716ab4b7b..678bfe276 100644 --- a/objects/o_dialog_fontscrollbox/Alarm_0.gml +++ b/objects/o_dialog_fontscrollbox/Alarm_0.gml @@ -4,6 +4,6 @@ var hh = array_length(FONT_INTERNAL) * hght; dialog_h = min(max_h, hh); - sc_content.resize(dialog_w, dialog_h); + sc_content.resize(dialog_w - ui(6), dialog_h); #endregion event_inherited(); \ No newline at end of file diff --git a/objects/o_dialog_splash/Other_62.gml b/objects/o_dialog_splash/Other_62.gml index 35ac2d4d7..55ccfc195 100644 --- a/objects/o_dialog_splash/Other_62.gml +++ b/objects/o_dialog_splash/Other_62.gml @@ -54,8 +54,8 @@ for( var i = 0; i < array_length(contest_message_req); i++ ) { thr.title.meta = {}; var content = thr.title.content; - var _metaSp = string_split(content, "```",, 2); - + var _metaSp = string_split(content, "```", false, 2); + if(array_length(_metaSp) == 3 && _metaSp[0] == "") { var _meta = _metaSp[1]; var _mtS = string_splice(_meta, "\n"); diff --git a/objects/o_main/Step_0.gml b/objects/o_main/Step_0.gml index 63057fbed..c867b719c 100644 --- a/objects/o_main/Step_0.gml +++ b/objects/o_main/Step_0.gml @@ -18,7 +18,7 @@ if(OS == os_windows && gameframe_is_minimized()) exit; #endregion #region step - GLOBAL.step(); + GLOBAL_NODE.step(); try { if(PANEL_MAIN != 0) diff --git a/scripts/__bone/__bone.gml b/scripts/__bone/__bone.gml index 64b19bc74..535b8e5bb 100644 --- a/scripts/__bone/__bone.gml +++ b/scripts/__bone/__bone.gml @@ -1,5 +1,5 @@ -function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = 0, attributes = {}, node = noone) constructor { - id = UUID_generate(); +function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = 0, node = noone) constructor { + ID = UUID_generate(); self.name = "New bone"; self.distance = distance; self.direction = direction; @@ -26,7 +26,6 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = tb_name.font = f_p2; tb_name.hide = true; - self.attributes = attributes; updated = false; IKlength = 0; @@ -66,7 +65,7 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = } static findBone = function(_id) { - if(id == _id) + if(ID == _id) return self; for( var i = 0; i < array_length(childs); i++ ) { @@ -97,16 +96,16 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = return p; } - static draw = function(edit = false, _x = 0, _y = 0, _s = 1, _mx = 0, _my = 0, hovering = noone, selecting = noone) { - var hover = _drawBone(edit, _x, _y, _s, _mx, _my, hovering, selecting); - drawControl(); + static draw = function(attributes, edit = false, _x = 0, _y = 0, _s = 1, _mx = 0, _my = 0, hovering = noone, selecting = noone) { + var hover = _drawBone(attributes, edit, _x, _y, _s, _mx, _my, hovering, selecting); + drawControl(attributes); return hover; } control_x0 = 0; control_y0 = 0; control_i0 = 0; control_x1 = 0; control_y1 = 0; control_i1 = 0; - static _drawBone = function(edit = false, _x = 0, _y = 0, _s = 1, _mx = 0, _my = 0, hovering = noone, selecting = noone) { + static _drawBone = function(attributes, edit = false, _x = 0, _y = 0, _s = 1, _mx = 0, _my = 0, hovering = noone, selecting = noone) { var hover = noone; var p0 = getPoint(0); @@ -140,14 +139,21 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = _p.y = _y + _p.y * _s; draw_line_dashed(_p.x, _p.y, p0.x, p0.y, 1); } - - var _ppx = lerp(p0.x, p1.x, 0.2); - var _ppy = lerp(p0.y, p1.y, 0.2); - draw_line_width2(p0.x, p0.y, _ppx, _ppy, 2, 12); - draw_line_width2(_ppx, _ppy, p1.x, p1.y, 12, 2); - if((edit & 0b100) && distance_to_line(_mx, _my, p0.x, p0.y, p1.x, p1.y) <= 12) //drag bone - hover = [ self, 2 ]; + if(attributes.display_bone == 0) { + var _ppx = lerp(p0.x, p1.x, 0.2); + var _ppy = lerp(p0.y, p1.y, 0.2); + draw_line_width2(p0.x, p0.y, _ppx, _ppy, 2, 12); + draw_line_width2(_ppx, _ppy, p1.x, p1.y, 12, 2); + + if((edit & 0b100) && distance_to_line(_mx, _my, p0.x, p0.y, p1.x, p1.y) <= 12) //drag bone + hover = [ self, 2 ]; + } else if(attributes.display_bone == 1) { + draw_line_width(p0.x, p0.y, p1.x, p1.y, 3); + + if((edit & 0b100) && distance_to_line(_mx, _my, p0.x, p0.y, p1.x, p1.y) <= 6) //drag bone + hover = [ self, 2 ]; + } } else { draw_set_color(c_white); if(!parent_anchor && parent.parent != noone) { @@ -166,10 +172,10 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = if(attributes.display_name && IKlength == 0) { if(abs(p0.y - p1.y) < abs(p0.x - p1.x)) { - draw_set_text(f_p2, fa_center, fa_bottom, COLORS._main_accent); + draw_set_text(f_p3, fa_center, fa_bottom, COLORS._main_accent); draw_text_add((p0.x + p1.x) / 2, (p0.y + p1.y) / 2 - 4, name); } else { - draw_set_text(f_p2, fa_left, fa_center, COLORS._main_accent); + draw_set_text(f_p3, fa_left, fa_center, COLORS._main_accent); draw_text_add((p0.x + p1.x) / 2 + 4, (p0.y + p1.y) / 2, name); } } @@ -196,7 +202,7 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = //} for( var i = 0; i < array_length(childs); i++ ) { - var h = childs[i]._drawBone(edit, _x, _y, _s, _mx, _my, hovering, selecting); + var h = childs[i]._drawBone(attributes, edit, _x, _y, _s, _mx, _my, hovering, selecting); if(hover == noone && h != noone) hover = h; } @@ -204,15 +210,22 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = return hover; } - static drawControl = function() { + static drawControl = function(attributes) { if(parent != noone && IKlength == 0) { - if(!parent_anchor) - draw_sprite_colored(THEME.anchor_selector, control_i0, control_x0, control_y0); - draw_sprite_colored(THEME.anchor_selector, control_i1, control_x1, control_y1); + var spr, ind0, ind1; + if(attributes.display_bone == 0) { + if(!parent_anchor) + draw_sprite_colored(THEME.anchor_selector, control_i0, control_x0, control_y0); + draw_sprite_colored(THEME.anchor_selector, control_i1, control_x1, control_y1); + } else { + if(!parent_anchor) + draw_sprite_ext(THEME.anchor_bone_stick, control_i0 / 2, control_x0, control_y0, 1, 1, 0, COLORS._main_accent, 1); + draw_sprite_ext(THEME.anchor_bone_stick, control_i1 / 2, control_x1, control_y1, 1, 1, 0, COLORS._main_accent, 1); + } } for( var i = 0; i < array_length(childs); i++ ) - childs[i].drawControl(); + childs[i].drawControl(attributes); } static resetPose = function() { @@ -387,7 +400,7 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = static serialize = function() { var bone = {}; - bone.id = id; + bone.ID = ID; bone.name = name; bone.distance = distance; bone.direction = direction; @@ -398,7 +411,7 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = bone.parent_anchor = parent_anchor; bone.IKlength = IKlength; - bone.IKTarget = IKTarget == noone? "" : IKTarget.id; + bone.IKTarget = IKTarget == noone? "" : IKTarget.ID; bone.childs = []; for( var i = 0; i < array_length(childs); i++ ) @@ -407,8 +420,8 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = return bone; } - static deserialize = function(bone, attributes, node) { - id = bone.id; + static deserialize = function(bone, node) { + ID = bone.ID; name = bone.name; distance = bone.distance; direction = bone.direction; @@ -418,7 +431,6 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = is_main = bone.is_main; parent_anchor = bone.parent_anchor; - self.attributes = attributes; self.node = node; IKlength = bone.IKlength; @@ -426,7 +438,7 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = childs = []; for( var i = 0; i < array_length(bone.childs); i++ ) { - var _b = new __Bone().deserialize(bone.childs[i], attributes, node); + var _b = new __Bone().deserialize(bone.childs[i], node); addChild(_b); } @@ -443,22 +455,22 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = childs[i].connect(); } - static clone = function(attributes) { - var _b = new __Bone(parent, distance, direction, angle, length, attributes); - _b.id = id; + static clone = function() { + var _b = new __Bone(parent, distance, direction, angle, length); + _b.ID = ID; _b.name = name; _b.is_main = is_main; _b.parent_anchor = parent_anchor; _b.IKlength = IKlength; - _b.IKTarget = IKTarget == noone? "" : IKTarget.id; + _b.IKTarget = IKTarget == noone? "" : IKTarget.ID; for( var i = 0; i < array_length(childs); i++ ) - _b.addChild(childs[i].clone(attributes)); + _b.addChild(childs[i].clone()); return _b; } static toString = function() { - return $"Bone {name} [{id}]"; + return $"Bone {name} [{ID}]"; } } \ No newline at end of file diff --git a/scripts/addon_lua/addon_lua.gml b/scripts/addon_lua/addon_lua.gml index e88321389..9acca192c 100644 --- a/scripts/addon_lua/addon_lua.gml +++ b/scripts/addon_lua/addon_lua.gml @@ -1019,7 +1019,8 @@ end", [ "__button_draw", function(wd, _x, _y, _w, _h, _m) { if(!ds_map_exists(global.ADDON_WIDGET, wd)) return; - global.ADDON_WIDGET[? wd].draw(_x, _y, _w, _h); + var _button = global.ADDON_WIDGET[? wd]; + _button.draw(_x, _y, _w, _h); } ], @" diff --git a/scripts/draw_circle_functions/draw_circle_functions.gml b/scripts/draw_circle_functions/draw_circle_functions.gml index 7147aacd9..261111528 100644 --- a/scripts/draw_circle_functions/draw_circle_functions.gml +++ b/scripts/draw_circle_functions/draw_circle_functions.gml @@ -50,7 +50,7 @@ function draw_circle_angle(_x, _y, _r, _angSt, _angEd, precision = 32) { draw_primitive_begin(pr_trianglelist); for( var i = 0; i <= precision; i++ ) { - na = lerp_float_angle(_angSt, _angEd, i / precision); + na = lerp(_angSt, _angEd, i / precision); nx = _x + lengthdir_x(_r, na); ny = _y + lengthdir_y(_r, na); diff --git a/scripts/font_sprite_loader/font_sprite_loader.gml b/scripts/font_sprite_loader/font_sprite_loader.gml index 7e9fe6415..294f64d65 100644 --- a/scripts/font_sprite_loader/font_sprite_loader.gml +++ b/scripts/font_sprite_loader/font_sprite_loader.gml @@ -19,6 +19,7 @@ FONT_SPRITES = ds_map_create(); var spr = sprite_create_from_surface(s, 0, 0, ww, hh, false, false, 0, 0); surface_free(s); + font_delete(f); FONT_SPRITES[? path] = spr; } @@ -28,6 +29,7 @@ FONT_SPRITES = ds_map_create(); var root = DIRECTORY + "Fonts/*"; var f = file_find_first(root, -1); var filter = [ ".ttf", ".otf" ]; + while(f != "") { var fullname = DIRECTORY + "Fonts/" + f; var ext = filename_ext(fullname); @@ -37,6 +39,7 @@ FONT_SPRITES = ds_map_create(); } f = file_find_next(); } + file_find_close(); } #endregion \ No newline at end of file diff --git a/scripts/globals/globals.gml b/scripts/globals/globals.gml index 3819aaed9..c1d33d969 100644 --- a/scripts/globals/globals.gml +++ b/scripts/globals/globals.gml @@ -26,15 +26,15 @@ //OS = os_macosx; DEBUG = false; - THEME = {}; + THEME = new Theme(); COLOR_KEYS = []; globalvar VERSION, SAVEFILE_VERSION, VERSION_STRING, BUILD_NUMBER; VERSION = 1146; SAVEFILE_VERSION = 1440; - VERSION_STRING = "1.14.5n4"; - BUILD_NUMBER = 114504; + VERSION_STRING = "1.14.6"; + BUILD_NUMBER = 114600; globalvar NODES, NODE_MAP, APPEND_MAP, NODE_NAME_MAP; globalvar HOTKEYS, HOTKEY_CONTEXT, NODE_INSTANCES; diff --git a/scripts/globalvar_drawer/globalvar_drawer.gml b/scripts/globalvar_drawer/globalvar_drawer.gml index 8a95bb9bf..4aa074898 100644 --- a/scripts/globalvar_drawer/globalvar_drawer.gml +++ b/scripts/globalvar_drawer/globalvar_drawer.gml @@ -9,7 +9,7 @@ function globalvar_viewer_draw(xx, yy, ww, _m, focus, hover, _scrollPane, rx, ry if(var_editing) { var del = noone; - if(ds_list_size(GLOBAL.inputs)) { + if(ds_list_size(GLOBAL_NODE.inputs)) { yy += ui(8); hh += ui(8); } @@ -17,8 +17,8 @@ function globalvar_viewer_draw(xx, yy, ww, _m, focus, hover, _scrollPane, rx, ry var wd_x = xx; var wd_w = ww; - for( var j = 0; j < ds_list_size(GLOBAL.inputs); j++ ) { - var _inpu = GLOBAL.inputs[| j]; + for( var j = 0; j < ds_list_size(GLOBAL_NODE.inputs); j++ ) { + var _inpu = GLOBAL_NODE.inputs[| j]; var _edit = _inpu.editor; var wd_h = ui(32); @@ -53,15 +53,15 @@ function globalvar_viewer_draw(xx, yy, ww, _m, focus, hover, _scrollPane, rx, ry } if(del != noone) - ds_list_delete(GLOBAL.inputs, del); + ds_list_delete(GLOBAL_NODE.inputs, del); } else { - for( var j = 0; j < ds_list_size(GLOBAL.inputs); j++ ) { - var widg = drawWidget(xx, yy, ww, _m, GLOBAL.inputs[| j], true, focus, hover, _scrollPane, rx, ry); + for( var j = 0; j < ds_list_size(GLOBAL_NODE.inputs); j++ ) { + var widg = drawWidget(xx, yy, ww, _m, GLOBAL_NODE.inputs[| j], true, focus, hover, _scrollPane, rx, ry); var widH = widg[0]; var mbRight = widg[1]; if(hover && point_in_rectangle(_m[0], _m[1], xx, yy, xx + ww, yy + widH)) - _HOVERING_ELEMENT = GLOBAL.inputs[| j]; + _HOVERING_ELEMENT = GLOBAL_NODE.inputs[| j]; yy += lb_h + widH + padd; hh += lb_h + widH + padd; diff --git a/scripts/load_function/load_function.gml b/scripts/load_function/load_function.gml index 73b6338ec..da7e23c63 100644 --- a/scripts/load_function/load_function.gml +++ b/scripts/load_function/load_function.gml @@ -108,10 +108,12 @@ function __LOAD_PATH(path, readonly = false, safe_mode = false) { log_warning("LOAD, metadata", exception_print(e)); } - GLOBAL = new Node_Global(); + GLOBAL_NODE = new Node_Global(); try { if(struct_has(_load_content, "global")) - GLOBAL.deserialize(_load_content.global); + GLOBAL_NODE.deserialize(_load_content.global); + else if(struct_has(_load_content, "global_node")) + GLOBAL_NODE.deserialize(_load_content.global_node); } catch(e) { log_warning("LOAD, global", exception_print(e)); } diff --git a/scripts/node_area/node_area.yy b/scripts/node_area/node_area.yy index 3da8ada1e..fd6aeaa7a 100644 --- a/scripts/node_area/node_area.yy +++ b/scripts/node_area/node_area.yy @@ -5,7 +5,7 @@ "isCompatibility": false, "isDnD": false, "parent": { - "name": "value", - "path": "folders/nodes/data/value.yy", + "name": "number", + "path": "folders/nodes/data/value/number.yy", }, } \ No newline at end of file diff --git a/scripts/node_armature/node_armature.gml b/scripts/node_armature/node_armature.gml index 588d7ec5d..dab83afcf 100644 --- a/scripts/node_armature/node_armature.gml +++ b/scripts/node_armature/node_armature.gml @@ -50,11 +50,14 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo draw_sprite_ui(THEME.bone, 0, __x + 12, ty + 14,,,, COLORS._main_icon); } + if(point_in_rectangle(_m[0], _m[1], __x + 24, ty + 3, __x + __w, ty + _hh - 3)) + anchor_selecting = [ bone, 2 ]; + bone.tb_name.setFocusHover(_focus, _hover); bone.tb_name.draw(__x + 24, ty + 3, __w - 24 - 32, _hh - 6, bone.name, _m); - + ty += _hh; - + draw_set_color(COLORS.node_composite_separator); draw_line(_x + 16, ty, _x + _w - 16, ty); } @@ -79,7 +82,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo data_length = 1; static createBone = function(parent, distance, direction) { - var bone = new __Bone(parent, distance, direction,,, attributes, self); + var bone = new __Bone(parent, distance, direction,,, self); parent.addChild(bone); if(parent == attributes.bones) @@ -89,16 +92,23 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo outputs[| 0] = nodeValue("Armature", self, JUNCTION_CONNECT.output, VALUE_TYPE.armature, noone); - attributes.bones = new __Bone(,,,,, attributes, self); + attributes.bones = new __Bone(,,,,, self); attributes.bones.name = "Main"; attributes.bones.is_main = true; attributes.bones.node = self; attributes.display_name = true; + attributes.display_bone = 0; + + array_push(attributeEditors, "Display"); array_push(attributeEditors, ["Display name", "display_name", new checkBox(function() { attributes.display_name = !attributes.display_name; })]); + array_push(attributeEditors, ["Display bone", "display_bone", + new scrollBox(["Octahedral", "Stick"], function(ind) { + attributes.display_bone = ind; + })]); tools = [ new NodeTool( "Add bones", THEME.bone_tool_add ), @@ -128,7 +138,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo var _b = attributes.bones; if(builder_bone != noone) { - anchor_selecting = _b.draw(false, _x, _y, _s, _mx, _my, anchor_selecting); + anchor_selecting = _b.draw(attributes, false, _x, _y, _s, _mx, _my, anchor_selecting); var dir = point_direction(builder_sx, builder_sy, mx, my); var dis = point_distance(builder_sx, builder_sy, mx, my); @@ -197,7 +207,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo triggerRender(); } else if(ik_dragging != noone) { - anchor_selecting = _b.draw(active * 0b100, _x, _y, _s, _mx, _my, anchor_selecting, ik_dragging); + anchor_selecting = _b.draw(attributes, active * 0b100, _x, _y, _s, _mx, _my, anchor_selecting, ik_dragging); if(anchor_selecting != noone && anchor_selecting[1] == 2) { var anc = anchor_selecting[0]; @@ -207,7 +217,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo var len = 1; while(_bone != noone) { - if(_bone == anc) { + if(_bone == anc.parent) { reachable = true; break; } @@ -223,7 +233,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo var _len = point_distance(p0.x, p0.y, p1.x, p1.y); var _ang = point_direction(p0.x, p0.y, p1.x, p1.y); - var IKbone = new __Bone(anc, _len, _ang, ik_dragging.angle + 90, 0, attributes, self); + var IKbone = new __Bone(anc, _len, _ang, ik_dragging.angle + 90, 0, self); anc.addChild(IKbone); IKbone.IKlength = len; IKbone.IKTarget = ik_dragging; @@ -240,7 +250,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo triggerRender(); } else if(isUsingTool(0)) { // builder - anchor_selecting = _b.draw(active * 0b111, _x, _y, _s, _mx, _my, anchor_selecting); + anchor_selecting = _b.draw(attributes, active * 0b111, _x, _y, _s, _mx, _my, anchor_selecting); if(mouse_press(mb_left, active)) { if(anchor_selecting == noone) { @@ -257,7 +267,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo UNDO_HOLDING = true; } else if(anchor_selecting[1] == 2) { var _pr = anchor_selecting[0]; - var _md = new __Bone(noone, 0, 0, _pr.angle, _pr.length / 2, attributes, self); + var _md = new __Bone(noone, 0, 0, _pr.angle, _pr.length / 2, self); _pr.length = _md.length; for( var i = 0; i < array_length(_pr.childs); i++ ) @@ -278,7 +288,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo } else if(anchor_selecting[1] == 2) draw_sprite_ext(THEME.bone_tool_add, 0, _mx + 24, _my + 24, 1, 1, 0, c_white, 1); } else if(isUsingTool(1)) { //remover - anchor_selecting = _b.draw(active * 0b100, _x, _y, _s, _mx, _my, anchor_selecting); + anchor_selecting = _b.draw(attributes, active * 0b100, _x, _y, _s, _mx, _my, anchor_selecting); if(anchor_selecting != noone && anchor_selecting[1] == 2 && anchor_selecting[0].parent != noone && mouse_press(mb_left, active)) { var _bone = anchor_selecting[0]; @@ -299,7 +309,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo if(anchor_selecting != noone) draw_sprite_ext(THEME.bone_tool_remove, 1, _mx + 24, _my + 24, 1, 1, 0, c_white, 1); } else if(isUsingTool(2)) { //detach - anchor_selecting = _b.draw(active * 0b100, _x, _y, _s, _mx, _my, anchor_selecting); + anchor_selecting = _b.draw(attributes, active * 0b100, _x, _y, _s, _mx, _my, anchor_selecting); if(anchor_selecting != noone && anchor_selecting[1] == 2 && mouse_press(mb_left, active)) { builder_bone = anchor_selecting[0]; @@ -319,13 +329,13 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo UNDO_HOLDING = true; } } else if(isUsingTool(3)) { //IK - anchor_selecting = _b.draw(active * 0b100, _x, _y, _s, _mx, _my, anchor_selecting); + anchor_selecting = _b.draw(attributes, active * 0b100, _x, _y, _s, _mx, _my, anchor_selecting); if(anchor_selecting != noone && anchor_selecting[1] == 2 && mouse_press(mb_left, active)) { ik_dragging = anchor_selecting[0]; } } else { //mover - anchor_selecting = _b.draw(active * 0b111, _x, _y, _s, _mx, _my, anchor_selecting); + anchor_selecting = _b.draw(attributes, active * 0b111, _x, _y, _s, _mx, _my, anchor_selecting); if(anchor_selecting != noone && mouse_press(mb_left, active)) { builder_bone = anchor_selecting[0]; @@ -373,8 +383,8 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo static postDeserialize = function() { if(!struct_has(load_map, "bones")) return; - attributes.bones = new __Bone(,,,,, attributes, self); - attributes.bones.deserialize(load_map.bones, attributes, self); + attributes.bones = new __Bone(,,,,, self); + attributes.bones.deserialize(load_map.bones, self); attributes.bones.connect(); } diff --git a/scripts/node_armature_bind/node_armature_bind.gml b/scripts/node_armature_bind/node_armature_bind.gml index bca1c6804..4e726efed 100644 --- a/scripts/node_armature_bind/node_armature_bind.gml +++ b/scripts/node_armature_bind/node_armature_bind.gml @@ -10,7 +10,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 2] = nodeValue("Bind data", self, JUNCTION_CONNECT.input, VALUE_TYPE.struct, noone) .setVisible(true, true) - .setArrayDepth(1); + .setArrayDepth(1); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); @@ -29,9 +29,16 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr attributes.layer_visible = []; attributes.layer_selectable = []; + attributes.display_name = true; attributes.display_bone = 0; + + array_push(attributeEditors, "Display"); + array_push(attributeEditors, ["Display name", "display_name", + new checkBox(function() { + attributes.display_name = !attributes.display_name; + })]); array_push(attributeEditors, ["Display bone", "display_bone", - new scrollBox(["Above", "Below", "Hide"], function(ind) { + new scrollBox(["Octahedral", "Stick"], function(ind) { attributes.display_bone = ind; })]); @@ -101,8 +108,8 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text); draw_text(__x + 24, ty + 12, bone.name); - if(ds_map_exists(surfMap, bone.id)) { - var _sdata = surfMap[? bone.id]; + if(ds_map_exists(surfMap, bone.ID)) { + var _sdata = surfMap[? bone.ID]; var _sx = __x + 24 + string_width(bone.name) + 8; var _sy = ty + 4; @@ -150,9 +157,10 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr if(layer_dragging != noone && hovering && mouse_release(mb_left)) { var _lind = input_fix_len + layer_dragging * data_length; - inputs[| _lind].extra_data[0] = hovering.id; + inputs[| _lind].extra_data[0] = hovering.ID; layer_dragging = noone; + triggerRender(); } #endregion @@ -266,12 +274,12 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr if(layer_dragging == noone || layer_dragging == index) { var _bx = _x + 24; if(point_in_circle(_m[0], _m[1], _bx, _cy + lh / 2, 16)) { - draw_sprite_ui_uniform(THEME.hamburger, 3, _bx, _cy + lh / 2, .75, c_white); + draw_sprite_ui_uniform(THEME.hamburger, 3, _bx, _cy + lh / 2, 1, c_white); if(mouse_press(mb_left, _focus)) layer_dragging = index; } else - draw_sprite_ui_uniform(THEME.hamburger, 3, _bx, _cy + lh / 2, .75, COLORS._main_icon); + draw_sprite_ui_uniform(THEME.hamburger, 3, _bx, _cy + lh / 2, 1, COLORS._main_icon); } } #endregion @@ -379,6 +387,8 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr atlas_data = []; bind_data = []; + surface_selecting = noone; + static getInputAmount = function() { return input_fix_len + (ds_list_size(inputs) - input_fix_len) / data_length; } @@ -425,7 +435,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr for( var i = 0; i < array_length(bone.childs); i++ ) { var child_bone = bone.childs[i]; - boneMap[? child_bone.id] = child_bone; + boneMap[? child_bone.ID] = child_bone; ds_stack_push(_bst, child_bone); } } @@ -442,12 +452,11 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr if(_b == noone) return; if(_bind != noone) { - _b.draw(false, _x, _y, _s, _mx, _my); + _b.draw(attributes, false, _x, _y, _s, _mx, _my); return; } - if(attributes.display_bone == 1) - _b.draw(false, _x, _y, _s, _mx, _my); + _b.draw(attributes, false, _x, _y, _s, _mx, _my); var ww = dim[0]; var hh = dim[1]; @@ -514,18 +523,15 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr } } - var hovering = -1; - var hovering_type = 0; + var hovering = noone; + var hovering_type = noone; var _vis = attributes.layer_visible; var _sel = attributes.layer_selectable; var amo = (ds_list_size(inputs) - input_fix_len) / data_length; + var anchors = array_create(ds_list_size(inputs)); for(var i = 0; i < amo; i++) { - var vis = array_safe_get(_vis, i); - var sel = array_safe_get(_sel, i); - if(!vis) continue; - var index = input_fix_len + i * data_length; var _surf = array_safe_get(current_data, index); if(!_surf || is_array(_surf)) continue; @@ -548,14 +554,14 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr var _sw = _ww * _sca[0]; var _sh = _hh * _sca[1]; - var cx = _anc.x + _mov[0]; - var cy = _anc.y + _mov[1]; + var _cx = _anc.x + _mov[0]; + var _cy = _anc.y + _mov[1]; - var _d0 = point_rotate(cx - _sw / 2, cy - _sh / 2, cx, cy, _rot); - var _d1 = point_rotate(cx - _sw / 2, cy + _sh / 2, cx, cy, _rot); - var _d2 = point_rotate(cx + _sw / 2, cy - _sh / 2, cx, cy, _rot); - var _d3 = point_rotate(cx + _sw / 2, cy + _sh / 2, cx, cy, _rot); - var _rr = point_rotate(cx, cy - _sh / 2 - 4, cx, cy, _rot); + var _d0 = point_rotate(_cx - _sw / 2, _cy - _sh / 2, _cx, _cy, _rot); + var _d1 = point_rotate(_cx - _sw / 2, _cy + _sh / 2, _cx, _cy, _rot); + var _d2 = point_rotate(_cx + _sw / 2, _cy - _sh / 2, _cx, _cy, _rot); + var _d3 = point_rotate(_cx + _sw / 2, _cy + _sh / 2, _cx, _cy, _rot); + var _rr = point_rotate(_cx, _cy - _sh / 2 - 4, _cx, _cy, _rot); _d0[0] = overlay_x(_d0[0], _x, _s); _d0[1] = overlay_y(_d0[1], _y, _s); _d1[0] = overlay_x(_d1[0], _x, _s); _d1[1] = overlay_y(_d1[1], _y, _s); @@ -563,105 +569,105 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr _d3[0] = overlay_x(_d3[0], _x, _s); _d3[1] = overlay_y(_d3[1], _y, _s); _rr[0] = overlay_x(_rr[0], _x, _s); _rr[1] = overlay_y(_rr[1], _y, _s); - var _borcol = COLORS.node_composite_overlay_border; - - var _ri = 0; - var _si = 0; - - if(!sel) continue; - - if(point_in_circle(_mx, _my, _d3[0], _d3[1], 12)) { - hovering = index; - hovering_type = NODE_COMPOSE_DRAG.scale; - _si = 1; - } else if(point_in_rectangle_points(_mx, _my, _d0[0], _d0[1], _d1[0], _d1[1], _d2[0], _d2[1], _d3[0], _d3[1])) { - hovering = index; - hovering_type = NODE_COMPOSE_DRAG.move; - } else if(point_in_circle(_mx, _my, _rr[0], _rr[1], 12)) { - hovering = index; - hovering_type = NODE_COMPOSE_DRAG.rotate; - _ri = 1; + anchors[index] = { + cx: _cx, + cy: _cy, + d0: _d0, + d1: _d1, + d2: _d2, + d3: _d3, + rr: _rr, + + rot: _rot, } - - draw_sprite_colored(THEME.anchor_rotate, _ri, _rr[0], _rr[1],, _rot); - draw_sprite_colored(THEME.anchor_scale, _si, _d3[0], _d3[1],, _rot); - - draw_set_color(_borcol); - draw_line(_d0[0], _d0[1], _d1[0], _d1[1]); - draw_line(_d0[0], _d0[1], _d2[0], _d2[1]); - draw_line(_d3[0], _d3[1], _d1[0], _d1[1]); - draw_line(_d3[0], _d3[1], _d2[0], _d2[1]); } - if(hovering != -1) { - var _surf = current_data[hovering]; - var _bone = inputs[| hovering].extra_data[0]; - _bone = boneMap[? _bone]; + for(var i = 0; i < amo; i++) { + var vis = array_safe_get(_vis, i); + var sel = array_safe_get(_sel, i); + if(!vis) continue; + if(!sel) continue; - var _tran = current_data[hovering + 1]; - var _rot = _bone.angle + _tran[TRANSFORM.rot]; - var _anc = _bone.getPoint(0.5); - var _mov = point_rotate(_tran[TRANSFORM.pos_x], _tran[TRANSFORM.pos_y], 0, 0, _bone.angle); - var _sca = [ _tran[TRANSFORM.sca_x], _tran[TRANSFORM.sca_y] ]; + var index = input_fix_len + i * data_length; + var _surf = array_safe_get(current_data, index); + if(!_surf || is_array(_surf)) continue; - var _ww = surface_get_width(_surf); - var _hh = surface_get_height(_surf); - var _sw = _ww * _sca[0]; - var _sh = _hh * _sca[1]; + var _bone = inputs[| index].extra_data[0]; + if(!ds_map_exists(boneMap, _bone)) + continue; - var _cen = point_rotate(-_sw / 2, -_sh / 2, 0, 0, _bone.angle); - var _pos = [ - _anc.x + _cen[0] + _mov[0], - _anc.y + _cen[1] + _mov[1] - ]; + var a = anchors[index]; - var _dx0 = _x + _pos[0] * _s; - var _dy0 = _y + _pos[1] * _s; - - var cx = _anc.x + _mov[0]; - var cy = _anc.y + _mov[1]; - - var _d0 = point_rotate(cx - _sw / 2, cy - _sh / 2, cx, cy, _rot); - var _d1 = point_rotate(cx - _sw / 2, cy + _sh / 2, cx, cy, _rot); - var _d2 = point_rotate(cx + _sw / 2, cy - _sh / 2, cx, cy, _rot); - var _d3 = point_rotate(cx + _sw / 2, cy + _sh / 2, cx, cy, _rot); - - _d0[0] = overlay_x(_d0[0], _x, _s); _d0[1] = overlay_y(_d0[1], _y, _s); - _d1[0] = overlay_x(_d1[0], _x, _s); _d1[1] = overlay_y(_d1[1], _y, _s); - _d2[0] = overlay_x(_d2[0], _x, _s); _d2[1] = overlay_y(_d2[1], _y, _s); - _d3[0] = overlay_x(_d3[0], _x, _s); _d3[1] = overlay_y(_d3[1], _y, _s); - - if(hovering_type == NODE_COMPOSE_DRAG.move) { - draw_set_color(COLORS._main_accent); - draw_line_round(_d0[0], _d0[1], _d1[0], _d1[1], 2); - draw_line_round(_d0[0], _d0[1], _d2[0], _d2[1], 2); - draw_line_round(_d3[0], _d3[1], _d1[0], _d1[1], 2); - draw_line_round(_d3[0], _d3[1], _d2[0], _d2[1], 2); + if(surface_selecting == index) { + var _ri = 0; + var _si = 0; - if(mouse_press(mb_left, active)) { - surf_dragging = hovering; - drag_type = hovering_type; - dragging_sx = _tran[TRANSFORM.pos_x]; - dragging_sy = _tran[TRANSFORM.pos_y]; - dragging_mx = _mx; - dragging_my = _my; + if(point_in_circle(_mx, _my, a.d3[0], a.d3[1], 12)) { + hovering = index; + hovering_type = NODE_COMPOSE_DRAG.scale; + _si = 1; + } else if(point_in_rectangle_points(_mx, _my, a.d0[0], a.d0[1], a.d1[0], a.d1[1], a.d2[0], a.d2[1], a.d3[0], a.d3[1])) { + hovering = index; + hovering_type = NODE_COMPOSE_DRAG.move; + } else if(point_in_circle(_mx, _my, a.rr[0], a.rr[1], 12)) { + hovering = index; + hovering_type = NODE_COMPOSE_DRAG.rotate; + _ri = 1; } + + draw_sprite_colored(THEME.anchor_rotate, _ri, a.rr[0], a.rr[1],, a.rot); + draw_sprite_colored(THEME.anchor_scale, _si, a.d3[0], a.d3[1],, a.rot); + } else if(point_in_rectangle_points(_mx, _my, a.d0[0], a.d0[1], a.d1[0], a.d1[1], a.d2[0], a.d2[1], a.d3[0], a.d3[1])) { + hovering = index; + hovering_type = NODE_COMPOSE_DRAG.move; + } + } + + if(mouse_press(mb_left, active)) + surface_selecting = hovering; + + if(hovering != noone) { + var a = anchors[hovering]; + + draw_set_color(COLORS.node_composite_overlay_border); + draw_line(a.d0[0], a.d0[1], a.d1[0], a.d1[1]); + draw_line(a.d0[0], a.d0[1], a.d2[0], a.d2[1]); + draw_line(a.d3[0], a.d3[1], a.d1[0], a.d1[1]); + draw_line(a.d3[0], a.d3[1], a.d2[0], a.d2[1]); + } + + if(surface_selecting != noone) { + var a = anchors[surface_selecting]; + + draw_set_color(COLORS._main_accent); + draw_line(a.d0[0], a.d0[1], a.d1[0], a.d1[1]); + draw_line(a.d0[0], a.d0[1], a.d2[0], a.d2[1]); + draw_line(a.d3[0], a.d3[1], a.d1[0], a.d1[1]); + draw_line(a.d3[0], a.d3[1], a.d2[0], a.d2[1]); + } + + if(hovering != noone && hovering_type != noone && mouse_press(mb_left, active)) { + var a = anchors[hovering]; + + if(hovering_type == NODE_COMPOSE_DRAG.move) { //move + surf_dragging = hovering; + drag_type = hovering_type; + dragging_sx = _tran[TRANSFORM.pos_x]; + dragging_sy = _tran[TRANSFORM.pos_y]; + dragging_mx = _mx; + dragging_my = _my; } else if(hovering_type == NODE_COMPOSE_DRAG.rotate) { //rot - if(mouse_press(mb_left, active)) { - surf_dragging = hovering; - drag_type = hovering_type; - dragging_sx = _tran[TRANSFORM.rot]; - rot_anc_x = overlay_x(cx, _x, _s); - rot_anc_y = overlay_y(cy, _y, _s); - dragging_mx = point_direction(rot_anc_x, rot_anc_y, _mx, _my); - } + surf_dragging = hovering; + drag_type = hovering_type; + dragging_sx = _tran[TRANSFORM.rot]; + rot_anc_x = overlay_x(a.cx, _x, _s); + rot_anc_y = overlay_y(a.cy, _y, _s); + dragging_mx = point_direction(rot_anc_x, rot_anc_y, _mx, _my); } else if(hovering_type == NODE_COMPOSE_DRAG.scale) { //sca - if(mouse_press(mb_left, active)) { - surf_dragging = hovering; - drag_type = hovering_type; - dragging_mx = (_d0[0] + _d3[0]) / 2; - dragging_my = (_d0[1] + _d3[1]) / 2; - } + surf_dragging = hovering; + drag_type = hovering_type; + dragging_mx = (a.d0[0] + a.d3[0]) / 2; + dragging_my = (a.d0[1] + a.d3[1]) / 2; } } @@ -669,9 +675,6 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr deleteLayer(layer_remove); layer_remove = -1; } - - if(attributes.display_bone == 0) - _b.draw(false, _x, _y, _s, _mx, _my); #endregion } @@ -764,7 +767,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr array_push(atlas_data, new SurfaceAtlas(_s, _pos, _rot, _sca)); array_push(bind_data, { surface: new Surface(_s), - bone: _bone.id, + bone: _bone.ID, transform: _tran }); draw_surface_ext_safe(_s, _pos[0], _pos[1], _sca[0], _sca[1], _rot); diff --git a/scripts/node_armature_pose/node_armature_pose.gml b/scripts/node_armature_pose/node_armature_pose.gml index e6b157777..9176a581a 100644 --- a/scripts/node_armature_pose/node_armature_pose.gml +++ b/scripts/node_armature_pose/node_armature_pose.gml @@ -20,20 +20,27 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const boneMap = ds_map_create(); attributes.display_name = true; + attributes.display_bone = 0; + + array_push(attributeEditors, "Display"); array_push(attributeEditors, ["Display name", "display_name", new checkBox(function() { attributes.display_name = !attributes.display_name; })]); + array_push(attributeEditors, ["Display bone", "display_bone", + new scrollBox(["Octahedral", "Stick"], function(ind) { + attributes.display_bone = ind; + })]); function createNewControl(bone = noone) { var index = ds_list_size(inputs); inputs[| index] = nodeValue(bone != noone? bone.name : "bone", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 1 ] ) .setDisplay(VALUE_DISPLAY.transform); - inputs[| index].extra_data[0] = bone != noone? bone.id : noone; + inputs[| index].extra_data[0] = bone != noone? bone.ID : noone; if(bone != noone) - boneMap[? bone.id] = inputs[| index]; + boneMap[? bone.ID] = inputs[| index]; array_push(input_display_list, index); @@ -73,10 +80,10 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const var bone = _bones[i]; var _idx = ds_list_size(_inputs); array_push(_input_display_list, _idx); - //print($" > Adding bone id: {bone.id}"); + //print($" > Adding bone ID: {bone.ID}"); - if(ds_map_exists(boneMap, bone.id)) { - var _inp = boneMap[? bone.id]; + if(ds_map_exists(boneMap, bone.ID)) { + var _inp = boneMap[? bone.ID]; _inp.index = _idx; ds_list_add(_inputs, _inp); @@ -112,7 +119,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const var _b = outputs[| 0].getValue(); if(_b == noone) return; - anchor_selecting = _b.draw(active * 0b111, _x, _y, _s, _mx, _my, anchor_selecting); + anchor_selecting = _b.draw(attributes, active * 0b111, _x, _y, _s, _mx, _my, anchor_selecting); var mx = (_mx - _x) / _s; var my = (_my - _y) / _s; @@ -168,9 +175,9 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const if(anchor_selecting != noone && mouse_press(mb_left, active)) { if(anchor_selecting[1] == 0 || anchor_selecting[0].IKlength) { // move posing_bone = anchor_selecting[0]; - if(!ds_map_exists(boneMap, posing_bone.id)) + if(!ds_map_exists(boneMap, posing_bone.ID)) setBone(); - posing_input = boneMap[? posing_bone.id]; + posing_input = boneMap[? posing_bone.ID]; posing_type = 0; var val = posing_input.getValue(); @@ -182,9 +189,9 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const } else if(anchor_selecting[1] == 1) { // scale posing_bone = anchor_selecting[0]; - if(!ds_map_exists(boneMap, posing_bone.id)) + if(!ds_map_exists(boneMap, posing_bone.ID)) setBone(); - posing_input = boneMap[? posing_bone.id]; + posing_input = boneMap[? posing_bone.ID]; posing_type = 1; var ori = posing_bone.getPoint(0); @@ -199,9 +206,9 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const } else if(anchor_selecting[1] == 2) { // rotate posing_bone = anchor_selecting[0]; - if(!ds_map_exists(boneMap, posing_bone.id)) + if(!ds_map_exists(boneMap, posing_bone.ID)) setBone(); - posing_input = boneMap[? posing_bone.id]; + posing_input = boneMap[? posing_bone.ID]; posing_type = 2; var ori = posing_bone.getPoint(0); @@ -234,7 +241,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const var _b = inputs[| 0].getValue(); if(_b == noone) return; - var _bone_pose = _b.clone(attributes); + var _bone_pose = _b.clone(); _bone_pose.connect(); _bone_pose.resetPose(); @@ -243,7 +250,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const while(!ds_stack_empty(_bst)) { var bone = ds_stack_pop(_bst); - var _id = bone.id; + var _id = bone.ID; if(ds_map_exists(boneMap, _id)) { var _inp = boneMap[? _id]; diff --git a/scripts/node_armature_to_path/node_armature_to_path.gml b/scripts/node_armature_to_path/node_armature_to_path.gml new file mode 100644 index 000000000..f0514bac5 --- /dev/null +++ b/scripts/node_armature_to_path/node_armature_to_path.gml @@ -0,0 +1,116 @@ +function Node_Armature_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { + name = "Armature Path"; + previewable = false; + w = 96; + + inputs[| 0] = nodeValue("Armature", self, JUNCTION_CONNECT.input, VALUE_TYPE.armature, noone) + .setVisible(true, true) + .rejectArray(); + + outputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.pathnode, self); + + lines = []; + + current_length = 0; + boundary = new BoundingBox(); + + attributes.display_name = true; + attributes.display_bone = 0; + + array_push(attributeEditors, "Display"); + array_push(attributeEditors, ["Display name", "display_name", + new checkBox(function() { + attributes.display_name = !attributes.display_name; + })]); + array_push(attributeEditors, ["Display bone", "display_bone", + new scrollBox(["Octahedral", "Stick"], function(ind) { + attributes.display_bone = ind; + })]); + + static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + var _b = inputs[| 0].getValue(); + + if(_b == noone) return; + _b.draw(attributes, false, _x, _y, _s, _mx, _my); + } + + static getBoundary = function() { return boundary; } + + static getLineCount = function() { return array_length(lines); } + static getSegmentCount = function() { return 1; } + static getLength = function() { return current_length; } + static getAccuLength = function() { return [ 0, current_length ]; } + + static getWeightDistance = function (_dist, _ind = 0) { + return getWeightRatio(_dist / current_length, _ind); + } + + static getWeightRatio = function (_rat, _ind = 0) { + var _p0 = lines[_ind][0]; + var _p1 = lines[_ind][1]; + + if(!is_array(_p0) || array_length(_p0) < 3) return 1; + if(!is_array(_p1) || array_length(_p1) < 3) return 1; + + return lerp(_p0[2], _p1[2], _rat); + } + + static getPointDistance = function(_dist, _ind = 0) { + return getPointRatio(_dist / current_length, _ind); + } + + static getPointRatio = function(_rat, _ind = 0) { + var _p0 = lines[_ind][0]; + var _p1 = lines[_ind][1]; + + if(!is_array(_p0) || array_length(_p0) < 2) return new Point(); + if(!is_array(_p1) || array_length(_p1) < 2) return new Point(); + + var _x = lerp(_p0[0], _p1[0], _rat); + var _y = lerp(_p0[1], _p1[1], _rat); + + return new Point( _x, _y ); + } + + function update() { + var _bone = inputs[| 0].getValue(); + if(_bone == noone) return; + + lines = []; + current_length = 0; + + var _bst = ds_stack_create(); + ds_stack_push(_bst, _bone); + + while(!ds_stack_empty(_bst)) { + var bone = ds_stack_pop(_bst); + if(bone.IKlength) continue; + + if(!bone.is_main) { + var _p0 = bone.getPoint(0); + var _p1 = bone.getPoint(1); + + array_push(lines, [ + [_p0.x, _p0.y, 1], + [_p1.x, _p1.y, 1], + ]); + + current_length += point_distance(_p0.x, _p0.y, _p1.x, _p1.y); + } + + for( var i = 0; i < array_length(bone.childs); i++ ) { + var child_bone = bone.childs[i]; + ds_stack_push(_bst, child_bone); + } + } + + ds_stack_destroy(_bst); + + outputs[| 0].setValue(self); + } + + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { + var bbox = drawGetBbox(xx, yy, _s); + draw_sprite_fit(s_node_armature_path, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); + } +} \ No newline at end of file diff --git a/scripts/node_armature_to_path/node_armature_to_path.yy b/scripts/node_armature_to_path/node_armature_to_path.yy new file mode 100644 index 000000000..e580b3338 --- /dev/null +++ b/scripts/node_armature_to_path/node_armature_to_path.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_armature_to_path", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "armature", + "path": "folders/nodes/data/compose/armature.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_ase_file_read/node_ase_file_read.gml b/scripts/node_ase_file_read/node_ase_file_read.gml index 4cf407cbe..64c98f85f 100644 --- a/scripts/node_ase_file_read/node_ase_file_read.gml +++ b/scripts/node_ase_file_read/node_ase_file_read.gml @@ -72,7 +72,7 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const hold_visibility = !_vis[i]; if(mouse_click(mb_left, _focus) && _vis[i] != hold_visibility) { - _vis[i] = hold_visibility; + _vis[@ i] = hold_visibility; update(); } } else diff --git a/scripts/node_cache_array/node_cache_array.gml b/scripts/node_cache_array/node_cache_array.gml index bc83235b0..4259f4c4c 100644 --- a/scripts/node_cache_array/node_cache_array.gml +++ b/scripts/node_cache_array/node_cache_array.gml @@ -40,8 +40,6 @@ function Node_Cache_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constru } static update = function() { - if(recoverCache()) return; - var ss = []; var str = inputs[| 1].getValue(); var lst = inputs[| 2].getValue(); diff --git a/scripts/node_composite/node_composite.gml b/scripts/node_composite/node_composite.gml index ac250584e..8b037b16d 100644 --- a/scripts/node_composite/node_composite.gml +++ b/scripts/node_composite/node_composite.gml @@ -145,12 +145,12 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) if(layer_dragging == noone || layer_dragging == ind) { var _bx = _x + 24; if(point_in_circle(_m[0], _m[1], _bx, _cy + lh / 2, 16)) { - draw_sprite_ui_uniform(THEME.hamburger, 3, _bx, _cy + lh / 2, .75, c_white); + draw_sprite_ui_uniform(THEME.hamburger, 3, _bx, _cy + lh / 2, 1, c_white); if(mouse_press(mb_left, _focus)) layer_dragging = ind; } else - draw_sprite_ui_uniform(THEME.hamburger, 3, _bx, _cy + lh / 2, .75, COLORS._main_icon); + draw_sprite_ui_uniform(THEME.hamburger, 3, _bx, _cy + lh / 2, 1, COLORS._main_icon); } } @@ -270,6 +270,8 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) atlas_data = []; + surface_selecting = noone; + static getInputAmount = function() { return input_fix_len + (ds_list_size(inputs) - input_fix_len) / data_length; } @@ -575,8 +577,8 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } } - var hovering = -1; - var hovering_type = 0; + var hovering = noone; + var hovering_type = noone; var _vis = attributes.layer_visible; var _sel = attributes.layer_selectable; @@ -584,10 +586,11 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) if(array_length(current_data) < input_fix_len + amo * data_length) return; + var anchors = array_create(ds_list_size(inputs)); + for(var i = 0; i < amo; i++) { var vis = _vis[i]; var sel = _sel[i]; - if(!vis) continue; var index = input_fix_len + i * data_length; var _surf = current_data[index + 0]; @@ -602,14 +605,14 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var _sw = _ww * _sca[0]; var _sh = _hh * _sca[1]; - var cx = _pos[0] + _ww / 2; - var cy = _pos[1] + _hh / 2; + var _cx = _pos[0] + _ww / 2; + var _cy = _pos[1] + _hh / 2; - var _d0 = point_rotate(cx - _sw / 2, cy - _sh / 2, cx, cy, _rot); - var _d1 = point_rotate(cx - _sw / 2, cy + _sh / 2, cx, cy, _rot); - var _d2 = point_rotate(cx + _sw / 2, cy - _sh / 2, cx, cy, _rot); - var _d3 = point_rotate(cx + _sw / 2, cy + _sh / 2, cx, cy, _rot); - var _rr = point_rotate(cx, cy - _sh / 2 - 1, cx, cy, _rot); + var _d0 = point_rotate(_cx - _sw / 2, _cy - _sh / 2, _cx, _cy, _rot); + var _d1 = point_rotate(_cx - _sw / 2, _cy + _sh / 2, _cx, _cy, _rot); + var _d2 = point_rotate(_cx + _sw / 2, _cy - _sh / 2, _cx, _cy, _rot); + var _d3 = point_rotate(_cx + _sw / 2, _cy + _sh / 2, _cx, _cy, _rot); + var _rr = point_rotate(_cx, _cy - _sh / 2 - 1, _cx, _cy, _rot); _d0[0] = overlay_x(_d0[0], _x, _s); _d0[1] = overlay_y(_d0[1], _y, _s); _d1[0] = overlay_x(_d1[0], _x, _s); _d1[1] = overlay_y(_d1[1], _y, _s); @@ -617,101 +620,109 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) _d3[0] = overlay_x(_d3[0], _x, _s); _d3[1] = overlay_y(_d3[1], _y, _s); _rr[0] = overlay_x(_rr[0], _x, _s); _rr[1] = overlay_y(_rr[1], _y, _s); - var _borcol = COLORS.node_composite_overlay_border; - - var _ri = 0; - var _si = 0; - - if(!sel) continue; - - if(point_in_circle(_mx, _my, _d3[0], _d3[1], 12)) { - hovering = index; - hovering_type = NODE_COMPOSE_DRAG.scale; - _si = 1; - } else if(point_in_rectangle_points(_mx, _my, _d0[0], _d0[1], _d1[0], _d1[1], _d2[0], _d2[1], _d3[0], _d3[1])) { - hovering = index; - hovering_type = NODE_COMPOSE_DRAG.move; - } else if(point_in_circle(_mx, _my, _rr[0], _rr[1], 12)) { - hovering = index; - hovering_type = NODE_COMPOSE_DRAG.rotate; - _ri = 1; + anchors[index] = { + cx: _cx, + cy: _cy, + d0: _d0, + d1: _d1, + d2: _d2, + d3: _d3, + rr: _rr, + + rot: _rot, } - - draw_sprite_colored(THEME.anchor_rotate, _ri, _rr[0], _rr[1],, _rot); - draw_sprite_colored(THEME.anchor_scale, _si, _d3[0], _d3[1],, _rot); - - draw_set_color(_borcol); - draw_line(_d0[0], _d0[1], _d1[0], _d1[1]); - draw_line(_d0[0], _d0[1], _d2[0], _d2[1]); - draw_line(_d3[0], _d3[1], _d1[0], _d1[1]); - draw_line(_d3[0], _d3[1], _d2[0], _d2[1]); } - if(hovering != -1) { - var _surf = current_data[hovering]; - var _pos = current_data[hovering + 1]; - var _rot = current_data[hovering + 2]; - var _sca = current_data[hovering + 3]; + for(var i = 0; i < amo; i++) { + var vis = _vis[i]; + var sel = _sel[i]; + if(!vis) continue; - var _ww = surface_get_width(_surf); - var _hh = surface_get_height(_surf); - var _dx0 = _x + _pos[0] * _s; - var _dy0 = _y + _pos[1] * _s; - var _dx1 = _dx0 + _ww * _s; - var _dy1 = _dy0 + _hh * _s; + var index = input_fix_len + i * data_length; + var _surf = current_data[index + 0]; + var _pos = current_data[index + 1]; + var _rot = current_data[index + 2]; + var _sca = current_data[index + 3]; - var _sw = _ww * _sca[0]; - var _sh = _hh * _sca[1]; + if(!_surf || is_array(_surf)) continue; - var cx = _pos[0] + _ww / 2; - var cy = _pos[1] + _hh / 2; + var a = anchors[index]; - var _d0 = point_rotate(cx - _sw / 2, cy - _sh / 2, cx, cy, _rot); - var _d1 = point_rotate(cx - _sw / 2, cy + _sh / 2, cx, cy, _rot); - var _d2 = point_rotate(cx + _sw / 2, cy - _sh / 2, cx, cy, _rot); - var _d3 = point_rotate(cx + _sw / 2, cy + _sh / 2, cx, cy, _rot); + if(surface_selecting == index) { + var _ri = 0; + var _si = 0; - _d0[0] = overlay_x(_d0[0], _x, _s); _d0[1] = overlay_y(_d0[1], _y, _s); - _d1[0] = overlay_x(_d1[0], _x, _s); _d1[1] = overlay_y(_d1[1], _y, _s); - _d2[0] = overlay_x(_d2[0], _x, _s); _d2[1] = overlay_y(_d2[1], _y, _s); - _d3[0] = overlay_x(_d3[0], _x, _s); _d3[1] = overlay_y(_d3[1], _y, _s); + if(point_in_circle(_mx, _my, a.d3[0], a.d3[1], 12)) { + hovering = index; + hovering_type = NODE_COMPOSE_DRAG.scale; + _si = 1; + } else if(point_in_rectangle_points(_mx, _my, a.d0[0], a.d0[1], a.d1[0], a.d1[1], a.d2[0], a.d2[1], a.d3[0], a.d3[1])) { + hovering = index; + hovering_type = NODE_COMPOSE_DRAG.move; + } else if(point_in_circle(_mx, _my, a.rr[0], a.rr[1], 12)) { + hovering = index; + hovering_type = NODE_COMPOSE_DRAG.rotate; + _ri = 1; + } + + draw_sprite_colored(THEME.anchor_rotate, _ri, a.rr[0], a.rr[1],, a.rot); + draw_sprite_colored(THEME.anchor_scale, _si, a.d3[0], a.d3[1],, a.rot); + } else if(point_in_rectangle_points(_mx, _my, a.d0[0], a.d0[1], a.d1[0], a.d1[1], a.d2[0], a.d2[1], a.d3[0], a.d3[1])) { + hovering = index; + hovering_type = NODE_COMPOSE_DRAG.move; + } + } + + if(mouse_press(mb_left, active)) + surface_selecting = hovering; + + if(hovering != noone) { + var a = anchors[hovering]; + + draw_set_color(COLORS.node_composite_overlay_border); + draw_line(a.d0[0], a.d0[1], a.d1[0], a.d1[1]); + draw_line(a.d0[0], a.d0[1], a.d2[0], a.d2[1]); + draw_line(a.d3[0], a.d3[1], a.d1[0], a.d1[1]); + draw_line(a.d3[0], a.d3[1], a.d2[0], a.d2[1]); + } + + if(surface_selecting != noone) { + var a = anchors[surface_selecting]; + + draw_set_color(COLORS._main_accent); + draw_line(a.d0[0], a.d0[1], a.d1[0], a.d1[1]); + draw_line(a.d0[0], a.d0[1], a.d2[0], a.d2[1]); + draw_line(a.d3[0], a.d3[1], a.d1[0], a.d1[1]); + draw_line(a.d3[0], a.d3[1], a.d2[0], a.d2[1]); + } + + if(hovering != noone && mouse_press(mb_left, active)) { + var a = anchors[hovering]; if(hovering_type == NODE_COMPOSE_DRAG.move) { - draw_set_color(COLORS._main_accent); - draw_line_round(_d0[0], _d0[1], _d1[0], _d1[1], 2); - draw_line_round(_d0[0], _d0[1], _d2[0], _d2[1], 2); - draw_line_round(_d3[0], _d3[1], _d1[0], _d1[1], 2); - draw_line_round(_d3[0], _d3[1], _d2[0], _d2[1], 2); - - if(mouse_press(mb_left, active)) { - surf_dragging = hovering; - input_dragging = hovering + 1; - drag_type = hovering_type; - dragging_sx = _pos[0]; - dragging_sy = _pos[1]; - dragging_mx = _mx; - dragging_my = _my; - } + surf_dragging = hovering; + input_dragging = hovering + 1; + drag_type = hovering_type; + dragging_sx = current_data[hovering + 1][0]; + dragging_sy = current_data[hovering + 1][1]; + dragging_mx = _mx; + dragging_my = _my; } else if(hovering_type == NODE_COMPOSE_DRAG.rotate) { //rot - if(mouse_press(mb_left, active)) { - surf_dragging = hovering; - input_dragging = hovering + 2; - drag_type = hovering_type; - dragging_sx = _rot; - rot_anc_x = _dx0 + _ww / 2 * _s; - rot_anc_y = _dy0 + _hh / 2 * _s; - dragging_mx = point_direction(rot_anc_x, rot_anc_y, _mx, _my); - } + surf_dragging = hovering; + input_dragging = hovering + 2; + drag_type = hovering_type; + dragging_sx = current_data[hovering + 2]; + rot_anc_x = overlay_x(a.cx, _x, _s); + rot_anc_y = overlay_y(a.cy, _y, _s); + dragging_mx = point_direction(rot_anc_x, rot_anc_y, _mx, _my); } else if(hovering_type == NODE_COMPOSE_DRAG.scale) { //sca - if(mouse_press(mb_left, active)) { - surf_dragging = hovering; - input_dragging = hovering + 3; - drag_type = hovering_type; - dragging_sx = _sca[0]; - dragging_sy = _sca[1]; - dragging_mx = _dx0 + _ww / 2 * _s; - dragging_my = _dy0 + _hh / 2 * _s; - } + surf_dragging = hovering; + input_dragging = hovering + 3; + drag_type = hovering_type; + dragging_sx = _sca[0]; + dragging_sy = _sca[1]; + dragging_mx = (a.d0[0] + a.d3[0]) / 2; + dragging_my = (a.d0[1] + a.d3[1]) / 2; } } diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index c853cb08d..e21cbc59b 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -30,6 +30,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x MODIFIED = true; run_in(1, function() { + if(display_name != "") return; resetInternalName(); display_name = __txt_node_name(instanceof(self), name); }); diff --git a/scripts/node_global/node_global.gml b/scripts/node_global/node_global.gml index 601821a51..d89a8ba34 100644 --- a/scripts/node_global/node_global.gml +++ b/scripts/node_global/node_global.gml @@ -177,15 +177,15 @@ function variable_editor(nodeVal) constructor { } #region define - globalvar GLOBAL; + globalvar GLOBAL_NODE; gml_pragma("global", @" - globalvar GLOBAL; - GLOBAL = new Node_Global(); + globalvar GLOBAL_NODE; + GLOBAL_NODE = new Node_Global(); "); #endregion function Node_Global(_x = 0, _y = 0) : __Node_Base(_x, _y) constructor { - name = "GLOBAL"; + name = "GLOBAL_NODE"; display_name = ""; group = noone; diff --git a/scripts/node_image_gif/node_image_gif.gml b/scripts/node_image_gif/node_image_gif.gml index 177dfcca0..8e901cefa 100644 --- a/scripts/node_image_gif/node_image_gif.gml +++ b/scripts/node_image_gif/node_image_gif.gml @@ -78,24 +78,23 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct var ext = string_lower(filename_ext(path)); var _name = string_replace(filename_name(path), filename_ext(path), ""); - switch(ext) { - case ".gif": - outputs[| 1].setValue(path); + if(ext != ".gif") + return false; + + outputs[| 1].setValue(path); - if(spr) sprite_delete(spr); - sprite_add_gif(path, function(_spr) { - spr_builder = _spr; - loading = 2; - }); - loading = 1; + if(spr) sprite_delete(spr); + sprite_add_gif(path, function(_spr) { + spr_builder = _spr; + loading = 2; + }); + loading = 1; - if(path_current == "") - first_update = true; - path_current = path; + if(path_current == "") + first_update = true; + path_current = path; - return true; - } - return false; + return true; } static step = function() { diff --git a/scripts/node_line/node_line.gml b/scripts/node_line/node_line.gml index f3be22505..edbf8b2c8 100644 --- a/scripts/node_line/node_line.gml +++ b/scripts/node_line/node_line.gml @@ -259,7 +259,13 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons } if(_prog_total >= _pathStr) //Do not add point before range start. Do this instead of starting at _rtStr to prevent wiggle. - array_push(points, { x: _nx, y: _ny, prog: _prog_total / _pathEnd, progCrop: _prog_curr / _pathLength, weight: wght }); + array_push(points, { + x: _nx, + y: _ny, + prog: _prog_total / _pathEnd, + progCrop: _prog_curr / _pathLength, + weight: wght + }); if(_prog_next > _prog_curr) { _prog_total += _prog_next - _prog_curr; @@ -361,19 +367,20 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons _nc = _color.eval(_colP? prog : prgc); if(_cap) { - if(j == 1){ + if(j == 1) { draw_set_color(_oc); - draw_set_color(c_white); - _d = point_direction(_ox, _oy, _nx, _ny); - draw_circle_angle(_ox, _oy, _ow / 2, _d - 90, _d + 90, _capP); + _d = point_direction(_ox, _oy, _nx, _ny) + 180; + draw_circle_angle(_ox, _oy, _ow / 2, _d - 90, _d, _capP); + draw_circle_angle(_ox, _oy, _ow / 2, _d, _d + 90, _capP); } + if(j == array_length(points) - 1) { draw_set_color(_nc); - draw_set_color(c_black); _d = point_direction(_ox, _oy, _nx, _ny); - draw_circle_angle(_nx, _ny, _nw / 2, _d - 90, _d + 90, _capP); + draw_circle_angle(_nx, _ny, _nw / 2, _d - 90, _d, _capP); + draw_circle_angle(_nx, _ny, _nw / 2, _d, _d + 90, _capP); } } diff --git a/scripts/node_lua_compute/node_lua_compute.gml b/scripts/node_lua_compute/node_lua_compute.gml index c7c7ba13e..5dfe2ae7e 100644 --- a/scripts/node_lua_compute/node_lua_compute.gml +++ b/scripts/node_lua_compute/node_lua_compute.gml @@ -186,8 +186,9 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru var res = 0; try { res = lua_call_w(getState(), _func, argument_val); - } catch(e) + } catch(e) { noti_warning(exception_print(e),, self); + } outputs[| 1].setValue(res); } diff --git a/scripts/node_registry/node_registry.gml b/scripts/node_registry/node_registry.gml index 85e2144fd..e429446a8 100644 --- a/scripts/node_registry/node_registry.gml +++ b/scripts/node_registry/node_registry.gml @@ -418,6 +418,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { addNodeObject(compose, "Armature Create", s_node_armature_create, "Node_Armature", [1, Node_Armature], ["rigging", "bone"]).setVersion(1146); addNodeObject(compose, "Armature Pose", s_node_armature_pose, "Node_Armature_Pose", [1, Node_Armature_Pose], ["rigging", "bone"]).setVersion(1146); addNodeObject(compose, "Armature Bind", s_node_armature_bind, "Node_Armature_Bind", [1, Node_Armature_Bind], ["rigging", "bone"]).setVersion(1146); + addNodeObject(compose, "Armature Path", s_node_armature_path, "Node_Armature_Path", [1, Node_Armature_Path], ["rigging", "bone"]).setVersion(1146); if(!DEMO) { ds_list_add(compose, "Export"); @@ -451,6 +452,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { addNodeObject(values, "Cross product 3D", s_node_cross_product_2d, "Node_Vector_Cross_3D", [1, Node_Vector_Cross_3D]).setVersion(1141); addNodeObject(values, "Cross product 2D", s_node_cross_product_3d, "Node_Vector_Cross_2D", [1, Node_Vector_Cross_2D]).setVersion(1141); addNodeObject(values, "FFT", s_node_FFT, "Node_FFT", [1, Node_FFT], ["frequency analysis"], "Perform fourier transform on number array.").setVersion(1144); + addNodeObject(values, "Transform Array",s_node_transform_array, "Node_Transform_Array", [1, Node_Transform_Array]).setVersion(1146); ds_list_add(values, "Texts"); addNodeObject(values, "Text", s_node_text, "Node_String", [1, Node_String]); @@ -687,7 +689,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { if(array_length(strs) == 1) { var splt = string_splice(strs[0], "["); - var inp = GLOBAL.getInput(strs[0]); + var inp = GLOBAL_NODE.getInput(strs[0]); _val = inp == noone? 0 : inp.getValueRecursive()[0]; } else if(strs[0] == "Project") { switch(strs[1]) { diff --git a/scripts/node_transform_array/node_transform_array.gml b/scripts/node_transform_array/node_transform_array.gml new file mode 100644 index 000000000..c1521d603 --- /dev/null +++ b/scripts/node_transform_array/node_transform_array.gml @@ -0,0 +1,40 @@ +function Node_Transform_Array(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { + name = "Transform Array"; + color = COLORS.node_blend_number; + previewable = false; + + w = 96; + + inputs[| 0] = nodeValue("Postion", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] ) + .setDisplay(VALUE_DISPLAY.vector) + .setVisible(true, true); + + inputs[| 1] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) + .setDisplay(VALUE_DISPLAY.rotation) + .setVisible(true, true); + + inputs[| 2] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ] ) + .setDisplay(VALUE_DISPLAY.vector) + .setVisible(true, true); + + outputs[| 0] = nodeValue("Transform", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [ 0, 0, 0, 1, 1 ]) + .setDisplay(VALUE_DISPLAY.vector); + + static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + var pos = inputs[| 0].getValue(); + var px = _x + pos[0] * _s; + var py = _y + pos[1] * _s; + + inputs[| 0].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 1].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); + } + + function process_data(_output, _data, _output_index, _array_index = 0) { + return [_data[0][0], _data[0][1], _data[1], _data[2][0], _data[2][0]]; + } + + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { + var bbox = drawGetBbox(xx, yy, _s); + draw_sprite_fit(s_node_transform_array, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); + } +} \ No newline at end of file diff --git a/scripts/node_transform_array/node_transform_array.yy b/scripts/node_transform_array/node_transform_array.yy new file mode 100644 index 000000000..a0f4cfb2d --- /dev/null +++ b/scripts/node_transform_array/node_transform_array.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_transform_array", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "number", + "path": "folders/nodes/data/value/number.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index e5ee4b6c2..4314c211b 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -746,7 +746,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru return setValueDirect(_val); }); - extract_node = ""; + extract_node = "Node_Transform_Array"; break; } break; diff --git a/scripts/node_websocket_receiver/node_websocket_receiver.gml b/scripts/node_websocket_receiver/node_websocket_receiver.gml index b4bd9fdca..9e90c52bb 100644 --- a/scripts/node_websocket_receiver/node_websocket_receiver.gml +++ b/scripts/node_websocket_receiver/node_websocket_receiver.gml @@ -16,7 +16,8 @@ function Node_Websocket_Receiver(_x, _y, _group = noone) : Node(_x, _y, _group) input_display_list = [ 1, 0 ]; connected_device = 0; - port = 0; + port = 0; + socket = noone; function setPort(newPort) { if(ds_map_exists(PORT_MAP, port)) @@ -29,10 +30,12 @@ function Node_Websocket_Receiver(_x, _y, _group = noone) : Node(_x, _y, _group) if(ds_map_exists(NETWORK_SERVERS, newPort)) return; - - var s = network_create_server_raw(network_socket_ws, newPort, 16) - //print($"SERVER CREATED: {s}") - if(s >= 0) NETWORK_SERVERS[? newPort] = s; + + if(socket >= 0) network_destroy(socket); + socket = network_create_server_raw(network_socket_ws, newPort, 16) + if(socket < 0) return; + + NETWORK_SERVERS[? newPort] = socket; } insp1UpdateTooltip = __txt("Refresh Server"); @@ -40,6 +43,7 @@ function Node_Websocket_Receiver(_x, _y, _group = noone) : Node(_x, _y, _group) static onInspector1Update = function() { var _port = inputs[| 0].getValue(); + setPort(_port); } diff --git a/scripts/node_websocket_sender/node_websocket_sender.gml b/scripts/node_websocket_sender/node_websocket_sender.gml index e862b4770..c9118ae4a 100644 --- a/scripts/node_websocket_sender/node_websocket_sender.gml +++ b/scripts/node_websocket_sender/node_websocket_sender.gml @@ -27,6 +27,7 @@ function Node_Websocket_Sender(_x, _y, _group = noone) : Node(_x, _y, _group) co port = 0; url = ""; connected = false; + socket = noone; function connectTo(newPort, newUrl) { if(ds_map_exists(PORT_MAP, port)) @@ -41,11 +42,14 @@ function Node_Websocket_Sender(_x, _y, _group = noone) : Node(_x, _y, _group) co if(ds_map_exists(NETWORK_CLIENTS, newPort)) return; - - var s = network_create_socket(network_socket_ws); - network_connect_raw_async(s, newUrl, newPort); + + if(socket >= 0) network_destroy(socket); + socket = network_create_socket(network_socket_ws); + if(socket < 0) return; + + network_connect_raw_async(socket, newUrl, newPort); connected = false; - if(s >= 0) NETWORK_CLIENTS[? newPort] = s; + NETWORK_CLIENTS[? newPort] = socket; } insp1UpdateTooltip = __txt("Reconnect"); diff --git a/scripts/panel_addon/panel_addon.gml b/scripts/panel_addon/panel_addon.gml index f6c52f3a2..5f2b9c8ac 100644 --- a/scripts/panel_addon/panel_addon.gml +++ b/scripts/panel_addon/panel_addon.gml @@ -1,6 +1,6 @@ function Panel_Addon() : PanelContent() constructor { title = __txt("Addons"); - icon = THEME.addon; + icon = THEME.addon_icon; showHeader = false; title_height = 64; diff --git a/scripts/panel_animation/panel_animation.gml b/scripts/panel_animation/panel_animation.gml index 3298ba159..fd2f9e394 100644 --- a/scripts/panel_animation/panel_animation.gml +++ b/scripts/panel_animation/panel_animation.gml @@ -379,7 +379,7 @@ function Panel_Animation() : PanelContent() constructor { var k = ds_map_find_first(NODE_MAP); var pr = ds_priority_create(); - updatePropertyNode(pr, GLOBAL); + updatePropertyNode(pr, GLOBAL_NODE); repeat(amo) { var _node = NODE_MAP[? k]; @@ -907,7 +907,7 @@ function Panel_Animation() : PanelContent() constructor { for( var i = 0; i < ds_list_size(anim_properties); i++ ) { _node = anim_properties[| i]; - var _inContext = _node == GLOBAL || _node.group == PANEL_GRAPH.getCurrentContext(); + var _inContext = _node == GLOBAL_NODE || _node.group == PANEL_GRAPH.getCurrentContext(); var aa = _inContext? 1 : 0.9; var _node_y = _node.dopesheet_y; diff --git a/scripts/panel_collection/panel_collection.gml b/scripts/panel_collection/panel_collection.gml index 4a7003c61..ad0282c3c 100644 --- a/scripts/panel_collection/panel_collection.gml +++ b/scripts/panel_collection/panel_collection.gml @@ -330,7 +330,8 @@ function Panel_Collection() : PanelContent() constructor { } function refreshContext() { - context.scan([ ".json", ".pxcc", ".png", ".jpg", ".gif" ]); + if(mode == 0) context.scan([ ".json", ".pxcc" ]); + else if(mode == 1) context.scan([ ".png", ".jpg", ".gif" ]); if(STEAM_ENABLED) steamUCGload(); diff --git a/scripts/panel_globalvar/panel_globalvar.gml b/scripts/panel_globalvar/panel_globalvar.gml index 8026ceca9..0149acceb 100644 --- a/scripts/panel_globalvar/panel_globalvar.gml +++ b/scripts/panel_globalvar/panel_globalvar.gml @@ -52,7 +52,7 @@ function Panel_Globalvar() : PanelContent() constructor { var by = title_height / 2 - ui(16 + !in_dialog * 2); if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, __txtx("panel_globalvar_add", "Add variable"), THEME.add, 1, COLORS._main_value_positive) == 2) - GLOBAL.createValue(); + GLOBAL_NODE.createValue(); bx -= ui(32 + 4); if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, __txt("Edit"), var_editing? THEME.accept : THEME.gear,,,, 0.9) == 2) diff --git a/scripts/panel_graph/panel_graph.gml b/scripts/panel_graph/panel_graph.gml index b0699da5f..67270edd0 100644 --- a/scripts/panel_graph/panel_graph.gml +++ b/scripts/panel_graph/panel_graph.gml @@ -1006,7 +1006,8 @@ function Panel_Graph() : PanelContent() constructor { function doPaste() { var txt = clipboard_get_text(); - var _map = json_try_parse(txt); + var _map = json_try_parse(txt, noone); + if(_map != noone) { ds_map_clear(APPEND_MAP); APPENDING = true; @@ -1043,7 +1044,11 @@ function Panel_Graph() : PanelContent() constructor { return; } - if(filename_ext(txt) == ".png") { + if(filename_ext(txt) == ".pxc") + APPEND(txt); + else if(filename_ext(txt) == ".pxcc") + APPEND(txt); + else if(filename_ext(txt) == ".png") { if(file_exists(txt)) { Node_create_Image_path(0, 0, txt); return; @@ -1869,7 +1874,7 @@ function Panel_Graph() : PanelContent() constructor { break; } - if(key_mod_press(SHIFT) && node && struct_has(DRAGGING, "from") && DRAGGING.from.value_from == noone) + if(!key_mod_press(SHIFT) && node && struct_has(DRAGGING, "from") && DRAGGING.from.value_from == noone) DRAGGING.from.setFrom(node.outputs[| 0]); } diff --git a/scripts/panel_inspector/panel_inspector.gml b/scripts/panel_inspector/panel_inspector.gml index a543dc798..8508ea9e9 100644 --- a/scripts/panel_inspector/panel_inspector.gml +++ b/scripts/panel_inspector/panel_inspector.gml @@ -232,7 +232,7 @@ function Panel_Inspector() : PanelContent() constructor { bx += bw + ui(4); if(buttonInstant(THEME.button_hide, bx, by, bw, bh, _m, pFOCUS, _hover) == 2) - GLOBAL.createValue(); + GLOBAL_NODE.createValue(); var txt = __txt("Add"); var icon = THEME.add; @@ -329,6 +329,7 @@ function Panel_Inspector() : PanelContent() constructor { } var val = inspecting.attributes[$ edt[1]]; + if(is_undefined(val)) continue; edt[2].setFocusHover(pFOCUS, pHOVER); if(instanceof(edt[2]) == "buttonClass") { @@ -346,7 +347,10 @@ function Panel_Inspector() : PanelContent() constructor { switch(instanceof(edt[2])) { case "textBox" : edt[2].draw(wx0, yy, ww, hg, val, _m); break; case "checkBox" : edt[2].draw(wx0 + ww / 2 - ui(28) / 2, yy + ui(2), val, _m, ui(28)); break; - case "scrollBox" : edt[2].draw(wx0, yy, ww, hg, edt[2].data_list[val], _m, x + contentPane.x, y + contentPane.y); break; + case "scrollBox" : + var scBox = edt[2]; + scBox.draw(wx0, yy, ww, hg, scBox.data_list[val], _m, x + contentPane.x, y + contentPane.y); + break; } yy += hg + ui(8); diff --git a/scripts/panel_menu/panel_menu.gml b/scripts/panel_menu/panel_menu.gml index f826d4dee..0549ae992 100644 --- a/scripts/panel_menu/panel_menu.gml +++ b/scripts/panel_menu/panel_menu.gml @@ -51,7 +51,7 @@ function Panel_Menu() : PanelContent() constructor { } return submenuCall(_dat, arr); - }, THEME.addon ).setIsShelf(), + }, THEME.addon_icon ).setIsShelf(), -1, menuItem(__txt("Fullscreen"), function() { if(gameframe_is_fullscreen_window()) @@ -215,6 +215,9 @@ function Panel_Menu() : PanelContent() constructor { menuItem(__txtx("panel_debug_console", "Debug console"), function() { panelAdd("Panel_Console", true) }), + menuItem(__txtx("panel_debug_overlay", "Debug overlay"), function() { + show_debug_overlay(true); + }), menuItem(__txtx("panel_menu_tester", "Tester"), function() { var dia = dialogPanelCall(new Panel_Test()); dia.destroy_on_click_out = false; @@ -485,7 +488,7 @@ function Panel_Menu() : PanelContent() constructor { } else draw_sprite_stretched(THEME.ui_panel_bg, 1, nx0, ny0 - wh / 2, ww, wh); draw_text(nx0 + ui(8), ny0, name); - draw_sprite_ui(THEME.addon, 0, nx0 + ui(20) + string_width(name), ny0 + ui(1),,,, COLORS._main_icon); + draw_sprite_ui(THEME.addon_icon, 0, nx0 + ui(20) + string_width(name), ny0 + ui(1),,,, COLORS._main_icon); if(hori) nx0 += ww + ui(4); else ny0 += hh + ui(4); diff --git a/scripts/panel_preview/panel_preview.gml b/scripts/panel_preview/panel_preview.gml index 47b6b38d1..4ef08d999 100644 --- a/scripts/panel_preview/panel_preview.gml +++ b/scripts/panel_preview/panel_preview.gml @@ -496,6 +496,14 @@ function Panel_Preview() : PanelContent() constructor { draw_set_text(f_p0, fa_right, fa_top, COLORS._main_text_sub); draw_text(w - ui(8), right_menu_y, __txt("Frame") + " " + string(ANIMATOR.current_frame) + "/" + string(ANIMATOR.frames_total)); + right_menu_y += string_height("l"); + draw_text(w - ui(8), right_menu_y, "x" + string(canvas_s)); + + right_menu_y += string_height("l"); + var mpx = floor((mx - canvas_x) / canvas_s); + var mpy = floor((my - canvas_y) / canvas_s); + draw_text(w - ui(8), right_menu_y, "[" + string(mpx) + ", " + string(mpy) + "]"); + var _node = getNodePreview(); if(_node == noone) return; @@ -504,16 +512,6 @@ function Panel_Preview() : PanelContent() constructor { if(canvas_a) txt = string(canvas_a) + " x " + txt; draw_text(w - ui(8), right_menu_y, txt); - right_menu_y += string_height("l"); - draw_text(w - ui(8), right_menu_y, "x" + string(canvas_s)); - - if(pHOVER) { - right_menu_y += string_height("l"); - var mpx = floor((mx - canvas_x) / canvas_s); - var mpy = floor((my - canvas_y) / canvas_s); - draw_text(w - ui(8), right_menu_y, "[" + string(mpx) + ", " + string(mpy) + "]"); - } - right_menu_y += string_height("l"); var pseq = getNodePreviewSequence(); diff --git a/scripts/save_function/save_function.gml b/scripts/save_function/save_function.gml index bb7f23481..f4a485de6 100644 --- a/scripts/save_function/save_function.gml +++ b/scripts/save_function/save_function.gml @@ -42,10 +42,10 @@ function save_serialize() { var _anim_map = {}; _anim_map.frames_total = ANIMATOR.frames_total; _anim_map.framerate = ANIMATOR.framerate; - _map.animator = _anim_map; + _map.animator = _anim_map; - _map.metadata = METADATA.serialize(); - _map.global = GLOBAL.serialize(); + _map.metadata = METADATA.serialize(); + _map.global_node = GLOBAL_NODE.serialize(); var prev = PANEL_PREVIEW.getNodePreviewSurface(); if(!is_surface(prev)) _map.preview = ""; @@ -181,7 +181,7 @@ function SAVE_COLLECTION(_node, _path, save_surface = true, metadata = noone, co var _nodes = []; SAVE_NODE(_nodes, _node, _node.x, _node.y, true, context); - _content.nodes = nodes; + _content.nodes = _nodes; if(metadata != noone) _content.metadata = metadata.serialize(); diff --git a/scripts/string_eval/string_eval.gml b/scripts/string_eval/string_eval.gml index b907506b8..519c05188 100644 --- a/scripts/string_eval/string_eval.gml +++ b/scripts/string_eval/string_eval.gml @@ -95,7 +95,7 @@ function functionStringClean(fx) { if(is_struct(val)) return val.validate(); if(val == "value") return true; - if(GLOBAL.inputExist(val)) return true; + if(GLOBAL_NODE.inputExist(val)) return true; var strs = string_splice(val, "."); if(array_length(strs) < 2) return false; @@ -127,8 +127,8 @@ function functionStringClean(fx) { if(is_struct(val)) return val._isAnimated(); if(val == "value") return EXPRESS_TREE_ANIM.base_value; - if(GLOBAL.inputExist(val)) { - var _inp = GLOBAL.getInput(val); + if(GLOBAL_NODE.inputExist(val)) { + var _inp = GLOBAL_NODE.getInput(val); if(_inp.is_anim) return EXPRESS_TREE_ANIM.animated; } diff --git a/scripts/surface_functions/surface_functions.gml b/scripts/surface_functions/surface_functions.gml index 7a7669760..897987eaa 100644 --- a/scripts/surface_functions/surface_functions.gml +++ b/scripts/surface_functions/surface_functions.gml @@ -287,6 +287,7 @@ function surface_copy_size(dest, source, format = noone) { function surface_valid_size(s) { if(is_infinity(s)) return 1; + s = toNumber(s); if(!is_real(s)) return 1; return clamp(s, 1, 8196); } diff --git a/scripts/theme_definition/theme_definition.gml b/scripts/theme_definition/theme_definition.gml new file mode 100644 index 000000000..c3bb2accc --- /dev/null +++ b/scripts/theme_definition/theme_definition.gml @@ -0,0 +1,282 @@ +function Theme() constructor { + color_picker_sample = noone; + button_color_overlay = noone; + color_picker_box = noone; + dialog_active = noone; + dialog_bg = noone; + group_label = noone; + shadow_drop_down_24 = noone; + menu_bg = noone; + + accept = noone; + add = noone; + animate_clock = noone; + animate_node_go = noone; + animation_setting = noone; + animation_timing = noone; + animation_stretch = noone; + arrow = noone; + button_path_icon = noone; + button_path_not_found_icon = noone; + cache = noone; + circle = noone; + color_picker_dropper = noone; + cursor_select = noone; + file = noone; + explorer = noone; + fill = noone; + filter_type = noone; + fluid_sim = noone; + folder = noone; + folder_add = noone; + folder_content = noone; + gear = noone; + grad_blend = noone; + graph = noone; + group = noone; + group_s = noone; + hamburger = noone; + visible = noone; + workshop_download = noone; + workshop_upload = noone; + workshop_update = noone; + icon_visibility = noone; + info = noone; + junc_visible = noone; + loading = noone; + loading_s = noone; + feedback = noone; + loop = noone; + unit_ref = noone; + vfx = noone; + minus = noone; + text = noone; + new_file = noone; + node_processor = noone; + value_link = noone; + pin = noone; + play_all = noone; + project = noone; + preset = noone; + refresh = noone; + refresh_s = noone; + reverse = noone; + rigidSim = noone; + scroll_box_arrow = noone; + search = noone; + sequence_control = noone; + sort = noone; + steam = noone; + steam_creator = noone; + text_bullet = noone; + text_slider = noone; + timeline_clock = noone; + timeline_graph = noone; + view_group = noone; + view_mode = noone; + icon_delete = noone; + addon_icon = noone; + youtube = noone; + wiki = noone; + itch = noone; + undo = noone; + redo = noone; + action_history = noone; + cross = noone; + duplicate = noone; + copy = noone; + paste = noone; + node_resize = noone; + icon_curve_connection = noone; + node_output_visible = noone; + icon_minimap = noone; + noti_icon_tick = noone; + noti_icon_error = noone; + noti_icon_warning = noone; + noti_icon_log = noone; + noti_icon_file_load = noone; + noti_icon_file_save = noone; + icon_center_canvas = noone; + icon_grid = noone; + icon_grid_setting = noone; + icon_preview_export = noone; + icon_reset_when_preview = noone; + icon_split_view = noone; + icon_tile_view = noone; + icon_active_split = noone; + save = noone; + save_auto = noone; + window_exit = noone; + window_minimize = noone; + window_maximize = noone; + window_fullscreen = noone; + icon_splash_show_on_start = noone; + icon_array_processor = noone; + tunnel = noone; + lock = noone; + node_move = noone; + splash_thumbnail = noone; + node_goto = noone; + node_create = noone; + node_use_global = noone; + node_use_expression = noone; + icon_toggle = noone; + strandSim = noone; + star = noone; + panel_graph = noone; + panel_preview = noone; + panel_inspector = noone; + panel_animation = noone; + color_wheel = noone; + node_name_type = noone; + checkbox_on_start = noone; + addon_setting = noone; + keyframe_override = noone; + play_sound = noone; + trophy = noone; + chat = noone; + arrow_back_32 = noone; + discord = noone; + heart = noone; + websocket = noone; + node_dropper = noone; + bone = noone; + + inspector_area = noone; + inspector_area_type = noone; + inspector_padding = noone; + inspector_surface_halign = noone; + inspector_surface_valign = noone; + inspector_text_halign = noone; + inspector_text_valign = noone; + prop_gradient = noone; + prop_keyframe = noone; + prop_on_end = noone; + prop_selecting = noone; + rotator_bg = noone; + rotator_knob = noone; + + icon_24 = noone; + icon_32 = noone; + icon_64 = noone; + node_draw_area = noone; + node_draw_path = noone; + node_junction_inspector = noone; + node_junctions_array = noone; + node_junctions_array_hover = noone; + node_junctions_single = noone; + node_junctions_single_hover = noone; + node_new_badge = noone; + node_pin_bg = noone; + node_pin_bg_active = noone; + node_active = noone; + node_bg = noone; + node_bg_name = noone; + node_glow = noone; + node_frame_bg = noone; + node_frame_title = noone; + node_junction_name_bg = noone; + node_state = noone; + node_bg_pill = noone; + node_trigger = noone; + node_slider = noone; + node_rotator_bg = noone; + node_rotator_knob = noone; + node_checkbox = noone; + node_coor_pin = noone; + node_websocket_receive = noone; + node_websocket_send = noone; + + menu_separator = noone; + menu_button = noone; + menu_button_mask = noone; + key_display = noone; + toolbar_shadow = noone; + ui_panel_active = noone; + ui_panel_tab = noone; + ui_panel_bg = noone; + ui_panel_fg = noone; + ui_panel_bg_cover = noone; + ui_panel_bg_dark = noone; + ui_scrollbar = noone; + ui_label_bg = noone; + toolbar = noone; + ui_selection = noone; + + cursor_path_add = noone; + cursor_path_anchor = noone; + cursor_path_move = noone; + cursor_path_remove = noone; + anchor = noone; + anchor_rotate = noone; + anchor_scale = noone; + anchor_solid_hori = noone; + anchor_scale_hori = noone; + anchor_selector = noone; + anchor_arrow = noone; + preview_crosshair = noone; + preview_bone_IK = noone; + anchor_bone_stick = noone; + + timeline_ease = noone; + timeline_elastic = noone; + timeline_keyframe = noone; + timeline_keyframe_selecting = noone; + timeline_key_halign = noone; + timeline_key_valign = noone; + obj_distribute_h = noone; + obj_distribute_v = noone; + + canvas_tools_bucket = noone; + canvas_tools_ellip = noone; + canvas_tools_ellip_fill = noone; + canvas_tools_eraser = noone; + canvas_tools_pencil = noone; + canvas_tools_rect = noone; + canvas_tools_rect_fill = noone; + control_add = noone; + control_remove = noone; + control_pin = noone; + control_unpin = noone; + mesh_tool_edit = noone; + mesh_tool_delete = noone; + path_tools_add = noone; + path_tools_anchor = noone; + path_tools_circle = noone; + path_tools_rectangle = noone; + path_tools_draw = noone; + path_tools_transform = noone; + tools_canvas_channel = noone; + tools_3d_transform = noone; + tools_3d_rotate = noone; + tools_3d_scale = noone; + splice_draw = noone; + strand_comb = noone; + strand_cut = noone; + strand_grab = noone; + strand_push = noone; + strand_stretch = noone; + bone_tool_add = noone; + bone_tool_detach = noone; + bone_tool_remove = noone; + bone_tool_transform = noone; + bone_tool_IK = noone; + + button = noone; + button_hide = noone; + button_hide_fill = noone; + button_hide_left = noone; + button_hide_middle = noone; + button_hide_right = noone; + button_left = noone; + button_lime = noone; + button_middle = noone; + button_right = noone; + checkbox = noone; + slider = noone; + widget_selecting = noone; + textbox = noone; + textbox_header = noone; + textbox_code = noone; + progress_bar = noone; +} \ No newline at end of file diff --git a/scripts/theme_definition/theme_definition.yy b/scripts/theme_definition/theme_definition.yy new file mode 100644 index 000000000..4c7284279 --- /dev/null +++ b/scripts/theme_definition/theme_definition.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "theme_definition", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "scritps", + "path": "folders/main/scritps.yy", + }, +} \ No newline at end of file diff --git a/sprites/s_node_armature_path/ffb37a52-2458-40c5-96ab-710b1caca514.png b/sprites/s_node_armature_path/ffb37a52-2458-40c5-96ab-710b1caca514.png new file mode 100644 index 000000000..ecc41db1a Binary files /dev/null and b/sprites/s_node_armature_path/ffb37a52-2458-40c5-96ab-710b1caca514.png differ diff --git a/sprites/s_node_armature_path/layers/ffb37a52-2458-40c5-96ab-710b1caca514/4334f2de-eef0-468f-b2cc-17eafe99ba81.png b/sprites/s_node_armature_path/layers/ffb37a52-2458-40c5-96ab-710b1caca514/4334f2de-eef0-468f-b2cc-17eafe99ba81.png new file mode 100644 index 000000000..ecc41db1a Binary files /dev/null and b/sprites/s_node_armature_path/layers/ffb37a52-2458-40c5-96ab-710b1caca514/4334f2de-eef0-468f-b2cc-17eafe99ba81.png differ diff --git a/sprites/s_node_armature_path/s_node_armature_path.yy b/sprites/s_node_armature_path/s_node_armature_path.yy new file mode 100644 index 000000000..696588f32 --- /dev/null +++ b/sprites/s_node_armature_path/s_node_armature_path.yy @@ -0,0 +1,74 @@ +{ + "resourceType": "GMSprite", + "resourceVersion": "1.0", + "name": "s_node_armature_path", + "bbox_bottom": 53, + "bbox_left": 3, + "bbox_right": 60, + "bbox_top": 10, + "bboxMode": 0, + "collisionKind": 1, + "collisionTolerance": 0, + "DynamicTexturePage": false, + "edgeFiltering": false, + "For3D": false, + "frames": [ + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"ffb37a52-2458-40c5-96ab-710b1caca514",}, + ], + "gridX": 0, + "gridY": 0, + "height": 64, + "HTile": false, + "layers": [ + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"4334f2de-eef0-468f-b2cc-17eafe99ba81","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + ], + "nineSlice": null, + "origin": 4, + "parent": { + "name": "transform", + "path": "folders/nodes/icons/transform.yy", + }, + "preMultiplyAlpha": false, + "sequence": { + "resourceType": "GMSequence", + "resourceVersion": "1.4", + "name": "s_node_armature_path", + "autoRecord": true, + "backdropHeight": 768, + "backdropImageOpacity": 0.5, + "backdropImagePath": "", + "backdropWidth": 1366, + "backdropXOffset": 0.0, + "backdropYOffset": 0.0, + "events": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "eventStubScript": null, + "eventToFunction": {}, + "length": 1.0, + "lockOrigin": false, + "moments": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "playback": 1, + "playbackSpeed": 30.0, + "playbackSpeedType": 0, + "showBackdrop": true, + "showBackdropImage": false, + "timeUnits": 1, + "tracks": [ + {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[ + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"ffb37a52-2458-40c5-96ab-710b1caca514","path":"sprites/s_node_armature_path/s_node_armature_path.yy",},},},"Disabled":false,"id":"9e22564e-0090-42c9-a50a-f5a712d91678","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, + ], + "visibleRange": null, + "volume": 1.0, + "xorigin": 32, + "yorigin": 32, + }, + "swatchColours": null, + "swfPrecision": 2.525, + "textureGroupId": { + "name": "Default", + "path": "texturegroups/Default", + }, + "type": 0, + "VTile": false, + "width": 64, +} \ No newline at end of file diff --git a/sprites/s_node_transform_array/3fd47e65-56d2-4393-8034-7364d8a1b998.png b/sprites/s_node_transform_array/3fd47e65-56d2-4393-8034-7364d8a1b998.png new file mode 100644 index 000000000..4ed31fb31 Binary files /dev/null and b/sprites/s_node_transform_array/3fd47e65-56d2-4393-8034-7364d8a1b998.png differ diff --git a/sprites/s_node_transform_array/layers/3fd47e65-56d2-4393-8034-7364d8a1b998/8664c044-b58e-4e1b-936c-957432ee312a.png b/sprites/s_node_transform_array/layers/3fd47e65-56d2-4393-8034-7364d8a1b998/8664c044-b58e-4e1b-936c-957432ee312a.png new file mode 100644 index 000000000..4ed31fb31 Binary files /dev/null and b/sprites/s_node_transform_array/layers/3fd47e65-56d2-4393-8034-7364d8a1b998/8664c044-b58e-4e1b-936c-957432ee312a.png differ diff --git a/sprites/s_node_transform_array/s_node_transform_array.yy b/sprites/s_node_transform_array/s_node_transform_array.yy new file mode 100644 index 000000000..29ff5a3b8 --- /dev/null +++ b/sprites/s_node_transform_array/s_node_transform_array.yy @@ -0,0 +1,74 @@ +{ + "resourceType": "GMSprite", + "resourceVersion": "1.0", + "name": "s_node_transform_array", + "bbox_bottom": 61, + "bbox_left": 2, + "bbox_right": 61, + "bbox_top": 2, + "bboxMode": 0, + "collisionKind": 1, + "collisionTolerance": 0, + "DynamicTexturePage": false, + "edgeFiltering": false, + "For3D": false, + "frames": [ + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"3fd47e65-56d2-4393-8034-7364d8a1b998",}, + ], + "gridX": 0, + "gridY": 0, + "height": 64, + "HTile": false, + "layers": [ + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"8664c044-b58e-4e1b-936c-957432ee312a","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + ], + "nineSlice": null, + "origin": 4, + "parent": { + "name": "number", + "path": "folders/nodes/icons/value/number.yy", + }, + "preMultiplyAlpha": false, + "sequence": { + "resourceType": "GMSequence", + "resourceVersion": "1.4", + "name": "s_node_transform_array", + "autoRecord": true, + "backdropHeight": 768, + "backdropImageOpacity": 0.5, + "backdropImagePath": "", + "backdropWidth": 1366, + "backdropXOffset": 0.0, + "backdropYOffset": 0.0, + "events": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "eventStubScript": null, + "eventToFunction": {}, + "length": 1.0, + "lockOrigin": false, + "moments": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "playback": 1, + "playbackSpeed": 30.0, + "playbackSpeedType": 0, + "showBackdrop": true, + "showBackdropImage": false, + "timeUnits": 1, + "tracks": [ + {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[ + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"3fd47e65-56d2-4393-8034-7364d8a1b998","path":"sprites/s_node_transform_array/s_node_transform_array.yy",},},},"Disabled":false,"id":"b5ac7d3a-ebac-4aa0-9334-d4e8ac3f3d5e","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, + ], + "visibleRange": null, + "volume": 1.0, + "xorigin": 32, + "yorigin": 32, + }, + "swatchColours": null, + "swfPrecision": 2.525, + "textureGroupId": { + "name": "Default", + "path": "texturegroups/Default", + }, + "type": 0, + "VTile": false, + "width": 64, +} \ No newline at end of file