diff --git a/PixelComposer.resource_order b/PixelComposer.resource_order index 0f69063fb..0e2bf898f 100644 --- a/PixelComposer.resource_order +++ b/PixelComposer.resource_order @@ -307,7 +307,6 @@ {"name":"node_region_fill","order":1,"path":"scripts/node_region_fill/node_region_fill.yy",}, {"name":"sh_mk_tile55_edge_r","order":7,"path":"shaders/sh_mk_tile55_edge_r/sh_mk_tile55_edge_r.yy",}, {"name":"sh_d3d_normal","order":18,"path":"shaders/sh_d3d_normal/sh_d3d_normal.yy",}, - {"name":"s_node_text_file_read","order":13,"path":"sprites/s_node_text_file_read/s_node_text_file_read.yy",}, {"name":"s_node_text_trim","order":7,"path":"sprites/s_node_text_trim/s_node_text_trim.yy",}, {"name":"s_node_pb_fx_shading","order":3,"path":"sprites/s_node_pb_fx_shading/s_node_pb_fx_shading.yy",}, {"name":"sh_noise_grid_hex","order":2,"path":"shaders/sh_noise_grid_hex/sh_noise_grid_hex.yy",}, @@ -322,6 +321,7 @@ {"name":"o_dialog_menubox","order":2,"path":"objects/o_dialog_menubox/o_dialog_menubox.yy",}, {"name":"s_node_blend","order":7,"path":"sprites/s_node_blend/s_node_blend.yy",}, {"name":"node_wrap_perspective","order":15,"path":"scripts/node_wrap_perspective/node_wrap_perspective.yy",}, + {"name":"s_node_json_file_write","order":32,"path":"sprites/s_node_json_file_write/s_node_json_file_write.yy",}, {"name":"s_node_rigidSim_object_spawner","order":5,"path":"sprites/s_node_rigidSim_object_spawner/s_node_rigidSim_object_spawner.yy",}, {"name":"node_pb_draw_round_rectangle","order":4,"path":"scripts/node_pb_draw_round_rectangle/node_pb_draw_round_rectangle.yy",}, {"name":"draw_text_function","order":10,"path":"scripts/draw_text_function/draw_text_function.yy",}, @@ -446,6 +446,7 @@ {"name":"FirebaseREST_asyncFunction_Firestore","order":4,"path":"scripts/FirebaseREST_asyncFunction_Firestore/FirebaseREST_asyncFunction_Firestore.yy",}, {"name":"sh_corner_erode","order":1,"path":"shaders/sh_corner_erode/sh_corner_erode.yy",}, {"name":"node_outline","order":11,"path":"scripts/node_outline/node_outline.yy",}, + {"name":"s_node_byte_file_read","order":28,"path":"sprites/s_node_byte_file_read/s_node_byte_file_read.yy",}, {"name":"sh_mesh_generation","order":4,"path":"shaders/sh_mesh_generation/sh_mesh_generation.yy",}, {"name":"math_function","order":7,"path":"scripts/math_function/math_function.yy",}, {"name":"panel_preview_snap_setting","order":5,"path":"scripts/panel_preview_snap_setting/panel_preview_snap_setting.yy",}, @@ -874,6 +875,7 @@ {"name":"sh_kuwahara","order":51,"path":"shaders/sh_kuwahara/sh_kuwahara.yy",}, {"name":"sh_grey_alpha","order":12,"path":"shaders/sh_grey_alpha/sh_grey_alpha.yy",}, {"name":"node_mk_cable","order":4,"path":"scripts/node_mk_cable/node_mk_cable.yy",}, + {"name":"s_node_json_file_read","order":33,"path":"sprites/s_node_json_file_read/s_node_json_file_read.yy",}, {"name":"s_node_time_map","order":36,"path":"sprites/s_node_time_map/s_node_time_map.yy",}, {"name":"node_crop","order":7,"path":"scripts/node_crop/node_crop.yy",}, {"name":"s_biterator_tab_content","order":14,"path":"sprites/s_biterator_tab_content/s_biterator_tab_content.yy",}, @@ -899,6 +901,7 @@ {"name":"node_VFX_repel","order":4,"path":"scripts/node_VFX_repel/node_VFX_repel.yy",}, {"name":"s_node_alpha_cut","order":3,"path":"sprites/s_node_alpha_cut/s_node_alpha_cut.yy",}, {"name":"sh_gamma_map","order":53,"path":"shaders/sh_gamma_map/sh_gamma_map.yy",}, + {"name":"node_byte_file_write","order":21,"path":"scripts/node_byte_file_write/node_byte_file_write.yy",}, {"name":"node_iterator_length","order":4,"path":"scripts/node_iterator_length/node_iterator_length.yy",}, {"name":"node_VFX_attract","order":2,"path":"scripts/node_VFX_attract/node_VFX_attract.yy",}, {"name":"sh_d3d_ssao_blur","order":1,"path":"shaders/sh_d3d_ssao_blur/sh_d3d_ssao_blur.yy",}, @@ -1058,7 +1061,6 @@ {"name":"dynaSurf_square_outline","order":3,"path":"scripts/dynaSurf_square_outline/dynaSurf_square_outline.yy",}, {"name":"node_3d_repeat","order":1,"path":"scripts/node_3d_repeat/node_3d_repeat.yy",}, {"name":"node_pb_fx_add","order":6,"path":"scripts/node_pb_fx_add/node_pb_fx_add.yy",}, - {"name":"s_node_csv_file_write","order":8,"path":"sprites/s_node_csv_file_write/s_node_csv_file_write.yy",}, {"name":"s_node_csv_parse","order":15,"path":"sprites/s_node_csv_parse/s_node_csv_parse.yy",}, {"name":"sh_glow","order":19,"path":"shaders/sh_glow/sh_glow.yy",}, {"name":"sh_clean_shape","order":22,"path":"shaders/sh_clean_shape/sh_clean_shape.yy",}, @@ -1104,7 +1106,6 @@ {"name":"sh_blend_overlay","order":15,"path":"shaders/sh_blend_overlay/sh_blend_overlay.yy",}, {"name":"node_sprite_stack","order":3,"path":"scripts/node_sprite_stack/node_sprite_stack.yy",}, {"name":"s_node_smokeSim_vortex","order":4,"path":"sprites/s_node_smokeSim_vortex/s_node_smokeSim_vortex.yy",}, - {"name":"s_node_json_file_read","order":11,"path":"sprites/s_node_json_file_read/s_node_json_file_read.yy",}, {"name":"s_node_wavelet","order":34,"path":"sprites/s_node_wavelet/s_node_wavelet.yy",}, {"name":"s_workshop_badge_version","order":3,"path":"sprites/s_workshop_badge_version/s_workshop_badge_version.yy",}, {"name":"node_override_channel","order":2,"path":"scripts/node_override_channel/node_override_channel.yy",}, @@ -1142,6 +1143,7 @@ {"name":"s_node_tunnel_in","order":21,"path":"sprites/s_node_tunnel_in/s_node_tunnel_in.yy",}, {"name":"s_node_pb_draw_trapezoid","order":10,"path":"sprites/s_node_pb_draw_trapezoid/s_node_pb_draw_trapezoid.yy",}, {"name":"sh_rd_render","order":2,"path":"shaders/sh_rd_render/sh_rd_render.yy",}, + {"name":"s_node_csv_file_write","order":30,"path":"sprites/s_node_csv_file_write/s_node_csv_file_write.yy",}, {"name":"append_function","order":1,"path":"scripts/append_function/append_function.yy",}, {"name":"node_3dsurf","order":4,"path":"scripts/node_3dsurf/node_3dsurf.yy",}, {"name":"fd_rectangle_reset_target","order":17,"path":"scripts/fd_rectangle_reset_target/fd_rectangle_reset_target.yy",}, @@ -1163,7 +1165,6 @@ {"name":"node_alpha_cutoff","order":10,"path":"scripts/node_alpha_cutoff/node_alpha_cutoff.yy",}, {"name":"sh_channel_R","order":4,"path":"shaders/sh_channel_R/sh_channel_R.yy",}, {"name":"draw_circle_functions","order":3,"path":"scripts/draw_circle_functions/draw_circle_functions.yy",}, - {"name":"s_node_text_file_write","order":12,"path":"sprites/s_node_text_file_write/s_node_text_file_write.yy",}, {"name":"sliderRange","order":16,"path":"scripts/sliderRange/sliderRange.yy",}, {"name":"point_rect_overlap","order":2,"path":"scripts/point_rect_overlap/point_rect_overlap.yy",}, {"name":"s_node_bevel","order":6,"path":"sprites/s_node_bevel/s_node_bevel.yy",}, @@ -1248,6 +1249,7 @@ {"name":"collection_data","order":9,"path":"scripts/collection_data/collection_data.yy",}, {"name":"s_node_flood_fill","order":24,"path":"sprites/s_node_flood_fill/s_node_flood_fill.yy",}, {"name":"json_compare","order":21,"path":"scripts/json_compare/json_compare.yy",}, + {"name":"s_node_text_file_write","order":34,"path":"sprites/s_node_text_file_write/s_node_text_file_write.yy",}, {"name":"node_rigid_force_apply","order":4,"path":"scripts/node_rigid_force_apply/node_rigid_force_apply.yy",}, {"name":"checkboxActive","order":38,"path":"scripts/checkboxActive/checkboxActive.yy",}, {"name":"__node_shader","order":21,"path":"scripts/__node_shader/__node_shader.yy",}, @@ -1259,6 +1261,7 @@ {"name":"s_node_array_get","order":3,"path":"sprites/s_node_array_get/s_node_array_get.yy",}, {"name":"d3d_bbox","order":8,"path":"scripts/d3d_bbox/d3d_bbox.yy",}, {"name":"s_node_mk_brownian","order":8,"path":"sprites/s_node_mk_brownian/s_node_mk_brownian.yy",}, + {"name":"s_node_wav_file_write","order":29,"path":"sprites/s_node_wav_file_write/s_node_wav_file_write.yy",}, {"name":"Obj_FirebaseFirestore_Collection_Query_AscendingDescending","order":1,"path":"objects/Obj_FirebaseFirestore_Collection_Query_AscendingDescending/Obj_FirebaseFirestore_Collection_Query_AscendingDescending.yy",}, {"name":"o_dialog_save","order":12,"path":"objects/o_dialog_save/o_dialog_save.yy",}, {"name":"s_node_BW","order":10,"path":"sprites/s_node_BW/s_node_BW.yy",}, @@ -1323,7 +1326,6 @@ {"name":"surfaceBox","order":22,"path":"scripts/surfaceBox/surfaceBox.yy",}, {"name":"s_node_array_composite","order":17,"path":"sprites/s_node_array_composite/s_node_array_composite.yy",}, {"name":"node_gradient_palette","order":11,"path":"scripts/node_gradient_palette/node_gradient_palette.yy",}, - {"name":"s_node_csv_file_read","order":9,"path":"sprites/s_node_csv_file_read/s_node_csv_file_read.yy",}, {"name":"node_fluid_domain","order":1,"path":"scripts/node_fluid_domain/node_fluid_domain.yy",}, {"name":"Obj_FirebaseFirestore_Collection_Query_LessEqualThan","order":6,"path":"objects/Obj_FirebaseFirestore_Collection_Query_LessEqualThan/Obj_FirebaseFirestore_Collection_Query_LessEqualThan.yy",}, {"name":"s_node_repeat","order":23,"path":"sprites/s_node_repeat/s_node_repeat.yy",}, @@ -1341,6 +1343,7 @@ {"name":"__node_shader_processor","order":23,"path":"scripts/__node_shader_processor/__node_shader_processor.yy",}, {"name":"Obj_FirebaseFirestore_Collection_Query_options_value","order":11,"path":"objects/Obj_FirebaseFirestore_Collection_Query_options_value/Obj_FirebaseFirestore_Collection_Query_options_value.yy",}, {"name":"__node_3d_mesh","order":1,"path":"scripts/__node_3d_mesh/__node_3d_mesh.yy",}, + {"name":"s_node_csv_file_read","order":31,"path":"sprites/s_node_csv_file_read/s_node_csv_file_read.yy",}, {"name":"d3d_surface_extrude","order":7,"path":"scripts/d3d_surface_extrude/d3d_surface_extrude.yy",}, {"name":"node_mesh_to_path","order":3,"path":"scripts/node_mesh_to_path/node_mesh_to_path.yy",}, {"name":"sh_kuwahara_ani","order":52,"path":"shaders/sh_kuwahara_ani/sh_kuwahara_ani.yy",}, @@ -1512,6 +1515,7 @@ {"name":"node_group_input","order":1,"path":"scripts/node_group_input/node_group_input.yy",}, {"name":"fd_rectangle_set_material_dissipation_type","order":4,"path":"scripts/fd_rectangle_set_material_dissipation_type/fd_rectangle_set_material_dissipation_type.yy",}, {"name":"s_node_gradient_shift","order":15,"path":"sprites/s_node_gradient_shift/s_node_gradient_shift.yy",}, + {"name":"node_byte_file_read","order":22,"path":"scripts/node_byte_file_read/node_byte_file_read.yy",}, {"name":"node_blobify","order":10,"path":"scripts/node_blobify/node_blobify.yy",}, {"name":"node_cache_array","order":8,"path":"scripts/node_cache_array/node_cache_array.yy",}, {"name":"node_array_convolute","order":16,"path":"scripts/node_array_convolute/node_array_convolute.yy",}, @@ -1526,6 +1530,7 @@ {"name":"node_image_sequence","order":1,"path":"scripts/node_image_sequence/node_image_sequence.yy",}, {"name":"node_text_file_read","order":6,"path":"scripts/node_text_file_read/node_text_file_read.yy",}, {"name":"node_note","order":17,"path":"scripts/node_note/node_note.yy",}, + {"name":"s_node_text_file_read","order":26,"path":"sprites/s_node_text_file_read/s_node_text_file_read.yy",}, {"name":"node_pb_box_divide_grid","order":7,"path":"scripts/node_pb_box_divide_grid/node_pb_box_divide_grid.yy",}, {"name":"FirebaseREST_firestore_cursor","order":8,"path":"scripts/FirebaseREST_firestore_cursor/FirebaseREST_firestore_cursor.yy",}, {"name":"panel_preview_onion_setting","order":7,"path":"scripts/panel_preview_onion_setting/panel_preview_onion_setting.yy",}, @@ -1644,7 +1649,7 @@ {"name":"directory_object","order":3,"path":"scripts/directory_object/directory_object.yy",}, {"name":"s_node_isosurf","order":2,"path":"sprites/s_node_isosurf/s_node_isosurf.yy",}, {"name":"node_pb_box_divide","order":5,"path":"scripts/node_pb_box_divide/node_pb_box_divide.yy",}, - {"name":"FLIP","order":5,"path":"extensions/FLIP/FLIP.yy",}, + {"name":"FLIP","order":17,"path":"extensions/FLIP/FLIP.yy",}, {"name":"node_websocket_sender","order":1,"path":"scripts/node_websocket_sender/node_websocket_sender.yy",}, {"name":"fd_rectangle_get_acceleration_b","order":1,"path":"scripts/fd_rectangle_get_acceleration_b/fd_rectangle_get_acceleration_b.yy",}, {"name":"surface_draw_functions","order":7,"path":"scripts/surface_draw_functions/surface_draw_functions.yy",}, @@ -1712,13 +1717,14 @@ {"name":"s_biterator_tab_active","order":12,"path":"sprites/s_biterator_tab_active/s_biterator_tab_active.yy",}, {"name":"dynaSurf_3d","order":2,"path":"scripts/dynaSurf_3d/dynaSurf_3d.yy",}, {"name":"s_node_3d_extrude","order":2,"path":"sprites/s_node_3d_extrude/s_node_3d_extrude.yy",}, - {"name":"YYFirebaseFirestore","order":2,"path":"extensions/YYFirebaseFirestore/YYFirebaseFirestore.yy",}, + {"name":"YYFirebaseFirestore","order":3,"path":"extensions/YYFirebaseFirestore/YYFirebaseFirestore.yy",}, {"name":"buttonGradient","order":2,"path":"scripts/buttonGradient/buttonGradient.yy",}, {"name":"sh_draw_downsample","order":2,"path":"shaders/sh_draw_downsample/sh_draw_downsample.yy",}, {"name":"__view_get","order":1,"path":"scripts/__view_get/__view_get.yy",}, {"name":"export_portable","order":3,"path":"scripts/export_portable/export_portable.yy",}, {"name":"s_node_texture_map","order":35,"path":"sprites/s_node_texture_map/s_node_texture_map.yy",}, {"name":"fd_rectangle_create","order":7,"path":"scripts/fd_rectangle_create/fd_rectangle_create.yy",}, + {"name":"s_node_byte_file_write","order":27,"path":"sprites/s_node_byte_file_write/s_node_byte_file_write.yy",}, {"name":"s_node_level_selector","order":26,"path":"sprites/s_node_level_selector/s_node_level_selector.yy",}, {"name":"s_node_herringbone_tile","order":39,"path":"sprites/s_node_herringbone_tile/s_node_herringbone_tile.yy",}, {"name":"node_vector_split","order":19,"path":"scripts/node_vector_split/node_vector_split.yy",}, @@ -1838,7 +1844,6 @@ {"name":"s_node_group_thumbnail","order":34,"path":"sprites/s_node_group_thumbnail/s_node_group_thumbnail.yy",}, {"name":"__node_VFX_effector","order":8,"path":"scripts/__node_VFX_effector/__node_VFX_effector.yy",}, {"name":"node_path_shift","order":5,"path":"scripts/node_path_shift/node_path_shift.yy",}, - {"name":"s_node_wav_file_write","order":17,"path":"sprites/s_node_wav_file_write/s_node_wav_file_write.yy",}, {"name":"s_node_3d_cylinder","order":1,"path":"sprites/s_node_3d_cylinder/s_node_3d_cylinder.yy",}, {"name":"sh_pb_brick","order":9,"path":"shaders/sh_pb_brick/sh_pb_brick.yy",}, {"name":"node_strand_break","order":9,"path":"scripts/node_strand_break/node_strand_break.yy",}, @@ -1970,7 +1975,6 @@ {"name":"sh_solid","order":5,"path":"shaders/sh_solid/sh_solid.yy",}, {"name":"panel_animation_scaler","order":1,"path":"scripts/panel_animation_scaler/panel_animation_scaler.yy",}, {"name":"wav_file_object","order":2,"path":"scripts/wav_file_object/wav_file_object.yy",}, - {"name":"s_node_json_file_write","order":10,"path":"sprites/s_node_json_file_write/s_node_json_file_write.yy",}, {"name":"node_pb_fx_intersect","order":5,"path":"scripts/node_pb_fx_intersect/node_pb_fx_intersect.yy",}, {"name":"fd_rectangle_get_material_time_step","order":13,"path":"scripts/fd_rectangle_get_material_time_step/fd_rectangle_get_material_time_step.yy",}, {"name":"node_vector3","order":17,"path":"scripts/node_vector3/node_vector3.yy",}, diff --git a/PixelComposer.yyp b/PixelComposer.yyp index 1dd73795c..d6631cc16 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -501,7 +501,6 @@ {"id":{"name":"sh_mk_tile55_edge_r","path":"shaders/sh_mk_tile55_edge_r/sh_mk_tile55_edge_r.yy",},}, {"id":{"name":"sh_d3d_normal","path":"shaders/sh_d3d_normal/sh_d3d_normal.yy",},}, {"id":{"name":"panel_data","path":"scripts/panel_data/panel_data.yy",},}, - {"id":{"name":"s_node_text_file_read","path":"sprites/s_node_text_file_read/s_node_text_file_read.yy",},}, {"id":{"name":"s_node_text_trim","path":"sprites/s_node_text_trim/s_node_text_trim.yy",},}, {"id":{"name":"s_node_pb_fx_shading","path":"sprites/s_node_pb_fx_shading/s_node_pb_fx_shading.yy",},}, {"id":{"name":"sh_noise_grid_hex","path":"shaders/sh_noise_grid_hex/sh_noise_grid_hex.yy",},}, @@ -516,6 +515,7 @@ {"id":{"name":"o_dialog_menubox","path":"objects/o_dialog_menubox/o_dialog_menubox.yy",},}, {"id":{"name":"s_node_blend","path":"sprites/s_node_blend/s_node_blend.yy",},}, {"id":{"name":"node_wrap_perspective","path":"scripts/node_wrap_perspective/node_wrap_perspective.yy",},}, + {"id":{"name":"s_node_json_file_write","path":"sprites/s_node_json_file_write/s_node_json_file_write.yy",},}, {"id":{"name":"s_node_rigidSim_object_spawner","path":"sprites/s_node_rigidSim_object_spawner/s_node_rigidSim_object_spawner.yy",},}, {"id":{"name":"node_pb_draw_round_rectangle","path":"scripts/node_pb_draw_round_rectangle/node_pb_draw_round_rectangle.yy",},}, {"id":{"name":"draw_text_function","path":"scripts/draw_text_function/draw_text_function.yy",},}, @@ -661,6 +661,7 @@ {"id":{"name":"sh_corner_erode","path":"shaders/sh_corner_erode/sh_corner_erode.yy",},}, {"id":{"name":"__init_view","path":"scripts/__init_view/__init_view.yy",},}, {"id":{"name":"node_outline","path":"scripts/node_outline/node_outline.yy",},}, + {"id":{"name":"s_node_byte_file_read","path":"sprites/s_node_byte_file_read/s_node_byte_file_read.yy",},}, {"id":{"name":"sh_mesh_generation","path":"shaders/sh_mesh_generation/sh_mesh_generation.yy",},}, {"id":{"name":"math_function","path":"scripts/math_function/math_function.yy",},}, {"id":{"name":"panel_preview_snap_setting","path":"scripts/panel_preview_snap_setting/panel_preview_snap_setting.yy",},}, @@ -1149,6 +1150,7 @@ {"id":{"name":"sh_grey_alpha","path":"shaders/sh_grey_alpha/sh_grey_alpha.yy",},}, {"id":{"name":"node_mk_cable","path":"scripts/node_mk_cable/node_mk_cable.yy",},}, {"id":{"name":"sh_normal","path":"shaders/sh_normal/sh_normal.yy",},}, + {"id":{"name":"s_node_json_file_read","path":"sprites/s_node_json_file_read/s_node_json_file_read.yy",},}, {"id":{"name":"s_node_time_map","path":"sprites/s_node_time_map/s_node_time_map.yy",},}, {"id":{"name":"node_crop","path":"scripts/node_crop/node_crop.yy",},}, {"id":{"name":"s_biterator_tab_content","path":"sprites/s_biterator_tab_content/s_biterator_tab_content.yy",},}, @@ -1176,6 +1178,7 @@ {"id":{"name":"node_VFX_repel","path":"scripts/node_VFX_repel/node_VFX_repel.yy",},}, {"id":{"name":"s_node_alpha_cut","path":"sprites/s_node_alpha_cut/s_node_alpha_cut.yy",},}, {"id":{"name":"sh_gamma_map","path":"shaders/sh_gamma_map/sh_gamma_map.yy",},}, + {"id":{"name":"node_byte_file_write","path":"scripts/node_byte_file_write/node_byte_file_write.yy",},}, {"id":{"name":"node_iterator_length","path":"scripts/node_iterator_length/node_iterator_length.yy",},}, {"id":{"name":"node_VFX_attract","path":"scripts/node_VFX_attract/node_VFX_attract.yy",},}, {"id":{"name":"node_fluid_repulse","path":"scripts/node_fluid_repulse/node_fluid_repulse.yy",},}, @@ -1355,7 +1358,6 @@ {"id":{"name":"dynaSurf_square_outline","path":"scripts/dynaSurf_square_outline/dynaSurf_square_outline.yy",},}, {"id":{"name":"node_3d_repeat","path":"scripts/node_3d_repeat/node_3d_repeat.yy",},}, {"id":{"name":"node_pb_fx_add","path":"scripts/node_pb_fx_add/node_pb_fx_add.yy",},}, - {"id":{"name":"s_node_csv_file_write","path":"sprites/s_node_csv_file_write/s_node_csv_file_write.yy",},}, {"id":{"name":"node_credit","path":"sprites/node_credit/node_credit.yy",},}, {"id":{"name":"s_node_csv_parse","path":"sprites/s_node_csv_parse/s_node_csv_parse.yy",},}, {"id":{"name":"sh_glow","path":"shaders/sh_glow/sh_glow.yy",},}, @@ -1410,7 +1412,6 @@ {"id":{"name":"sh_blend_overlay","path":"shaders/sh_blend_overlay/sh_blend_overlay.yy",},}, {"id":{"name":"node_sprite_stack","path":"scripts/node_sprite_stack/node_sprite_stack.yy",},}, {"id":{"name":"s_node_smokeSim_vortex","path":"sprites/s_node_smokeSim_vortex/s_node_smokeSim_vortex.yy",},}, - {"id":{"name":"s_node_json_file_read","path":"sprites/s_node_json_file_read/s_node_json_file_read.yy",},}, {"id":{"name":"s_node_wavelet","path":"sprites/s_node_wavelet/s_node_wavelet.yy",},}, {"id":{"name":"s_workshop_badge_version","path":"sprites/s_workshop_badge_version/s_workshop_badge_version.yy",},}, {"id":{"name":"node_override_channel","path":"scripts/node_override_channel/node_override_channel.yy",},}, @@ -1450,6 +1451,7 @@ {"id":{"name":"s_node_tunnel_in","path":"sprites/s_node_tunnel_in/s_node_tunnel_in.yy",},}, {"id":{"name":"s_node_pb_draw_trapezoid","path":"sprites/s_node_pb_draw_trapezoid/s_node_pb_draw_trapezoid.yy",},}, {"id":{"name":"sh_rd_render","path":"shaders/sh_rd_render/sh_rd_render.yy",},}, + {"id":{"name":"s_node_csv_file_write","path":"sprites/s_node_csv_file_write/s_node_csv_file_write.yy",},}, {"id":{"name":"append_function","path":"scripts/append_function/append_function.yy",},}, {"id":{"name":"node_3dsurf","path":"scripts/node_3dsurf/node_3dsurf.yy",},}, {"id":{"name":"fd_rectangle_reset_target","path":"scripts/fd_rectangle_reset_target/fd_rectangle_reset_target.yy",},}, @@ -1474,7 +1476,6 @@ {"id":{"name":"pack_best_fit","path":"scripts/pack_best_fit/pack_best_fit.yy",},}, {"id":{"name":"sh_channel_R","path":"shaders/sh_channel_R/sh_channel_R.yy",},}, {"id":{"name":"draw_circle_functions","path":"scripts/draw_circle_functions/draw_circle_functions.yy",},}, - {"id":{"name":"s_node_text_file_write","path":"sprites/s_node_text_file_write/s_node_text_file_write.yy",},}, {"id":{"name":"sliderRange","path":"scripts/sliderRange/sliderRange.yy",},}, {"id":{"name":"point_rect_overlap","path":"scripts/point_rect_overlap/point_rect_overlap.yy",},}, {"id":{"name":"s_node_bevel","path":"sprites/s_node_bevel/s_node_bevel.yy",},}, @@ -1567,6 +1568,7 @@ {"id":{"name":"s_node_flood_fill","path":"sprites/s_node_flood_fill/s_node_flood_fill.yy",},}, {"id":{"name":"node_iterate_each_inline","path":"scripts/node_iterate_each_inline/node_iterate_each_inline.yy",},}, {"id":{"name":"json_compare","path":"scripts/json_compare/json_compare.yy",},}, + {"id":{"name":"s_node_text_file_write","path":"sprites/s_node_text_file_write/s_node_text_file_write.yy",},}, {"id":{"name":"node_rigid_force_apply","path":"scripts/node_rigid_force_apply/node_rigid_force_apply.yy",},}, {"id":{"name":"checkboxActive","path":"scripts/checkboxActive/checkboxActive.yy",},}, {"id":{"name":"__node_shader","path":"scripts/__node_shader/__node_shader.yy",},}, @@ -1578,6 +1580,7 @@ {"id":{"name":"s_node_array_get","path":"sprites/s_node_array_get/s_node_array_get.yy",},}, {"id":{"name":"d3d_bbox","path":"scripts/d3d_bbox/d3d_bbox.yy",},}, {"id":{"name":"s_node_mk_brownian","path":"sprites/s_node_mk_brownian/s_node_mk_brownian.yy",},}, + {"id":{"name":"s_node_wav_file_write","path":"sprites/s_node_wav_file_write/s_node_wav_file_write.yy",},}, {"id":{"name":"Obj_FirebaseFirestore_Collection_Query_AscendingDescending","path":"objects/Obj_FirebaseFirestore_Collection_Query_AscendingDescending/Obj_FirebaseFirestore_Collection_Query_AscendingDescending.yy",},}, {"id":{"name":"dynaSurf","path":"scripts/dynaSurf/dynaSurf.yy",},}, {"id":{"name":"o_dialog_save","path":"objects/o_dialog_save/o_dialog_save.yy",},}, @@ -1652,7 +1655,6 @@ {"id":{"name":"surfaceBox","path":"scripts/surfaceBox/surfaceBox.yy",},}, {"id":{"name":"s_node_array_composite","path":"sprites/s_node_array_composite/s_node_array_composite.yy",},}, {"id":{"name":"node_gradient_palette","path":"scripts/node_gradient_palette/node_gradient_palette.yy",},}, - {"id":{"name":"s_node_csv_file_read","path":"sprites/s_node_csv_file_read/s_node_csv_file_read.yy",},}, {"id":{"name":"node_fluid_domain","path":"scripts/node_fluid_domain/node_fluid_domain.yy",},}, {"id":{"name":"Obj_FirebaseFirestore_Collection_Query_LessEqualThan","path":"objects/Obj_FirebaseFirestore_Collection_Query_LessEqualThan/Obj_FirebaseFirestore_Collection_Query_LessEqualThan.yy",},}, {"id":{"name":"s_node_repeat","path":"sprites/s_node_repeat/s_node_repeat.yy",},}, @@ -1671,6 +1673,7 @@ {"id":{"name":"__node_shader_processor","path":"scripts/__node_shader_processor/__node_shader_processor.yy",},}, {"id":{"name":"Obj_FirebaseFirestore_Collection_Query_options_value","path":"objects/Obj_FirebaseFirestore_Collection_Query_options_value/Obj_FirebaseFirestore_Collection_Query_options_value.yy",},}, {"id":{"name":"__node_3d_mesh","path":"scripts/__node_3d_mesh/__node_3d_mesh.yy",},}, + {"id":{"name":"s_node_csv_file_read","path":"sprites/s_node_csv_file_read/s_node_csv_file_read.yy",},}, {"id":{"name":"Obj_FirebaseFirestore_Collection_Query","path":"objects/Obj_FirebaseFirestore_Collection_Query/Obj_FirebaseFirestore_Collection_Query.yy",},}, {"id":{"name":"d3d_surface_extrude","path":"scripts/d3d_surface_extrude/d3d_surface_extrude.yy",},}, {"id":{"name":"sh_mk_tile18_edge_b","path":"shaders/sh_mk_tile18_edge_b/sh_mk_tile18_edge_b.yy",},}, @@ -1866,6 +1869,7 @@ {"id":{"name":"node_group_input","path":"scripts/node_group_input/node_group_input.yy",},}, {"id":{"name":"fd_rectangle_set_material_dissipation_type","path":"scripts/fd_rectangle_set_material_dissipation_type/fd_rectangle_set_material_dissipation_type.yy",},}, {"id":{"name":"s_node_gradient_shift","path":"sprites/s_node_gradient_shift/s_node_gradient_shift.yy",},}, + {"id":{"name":"node_byte_file_read","path":"scripts/node_byte_file_read/node_byte_file_read.yy",},}, {"id":{"name":"node_blobify","path":"scripts/node_blobify/node_blobify.yy",},}, {"id":{"name":"node_cache_array","path":"scripts/node_cache_array/node_cache_array.yy",},}, {"id":{"name":"node_array_convolute","path":"scripts/node_array_convolute/node_array_convolute.yy",},}, @@ -1881,6 +1885,7 @@ {"id":{"name":"node_text_file_read","path":"scripts/node_text_file_read/node_text_file_read.yy",},}, {"id":{"name":"node_note","path":"scripts/node_note/node_note.yy",},}, {"id":{"name":"s_menu_transparent","path":"sprites/s_menu_transparent/s_menu_transparent.yy",},}, + {"id":{"name":"s_node_text_file_read","path":"sprites/s_node_text_file_read/s_node_text_file_read.yy",},}, {"id":{"name":"node_pb_box_divide_grid","path":"scripts/node_pb_box_divide_grid/node_pb_box_divide_grid.yy",},}, {"id":{"name":"FirebaseREST_firestore_cursor","path":"scripts/FirebaseREST_firestore_cursor/FirebaseREST_firestore_cursor.yy",},}, {"id":{"name":"draw_tooltip","path":"scripts/draw_tooltip/draw_tooltip.yy",},}, @@ -2111,6 +2116,7 @@ {"id":{"name":"sh_sample","path":"shaders/sh_sample/sh_sample.yy",},}, {"id":{"name":"s_node_texture_map","path":"sprites/s_node_texture_map/s_node_texture_map.yy",},}, {"id":{"name":"fd_rectangle_create","path":"scripts/fd_rectangle_create/fd_rectangle_create.yy",},}, + {"id":{"name":"s_node_byte_file_write","path":"sprites/s_node_byte_file_write/s_node_byte_file_write.yy",},}, {"id":{"name":"s_node_level_selector","path":"sprites/s_node_level_selector/s_node_level_selector.yy",},}, {"id":{"name":"s_node_herringbone_tile","path":"sprites/s_node_herringbone_tile/s_node_herringbone_tile.yy",},}, {"id":{"name":"node_vector_split","path":"scripts/node_vector_split/node_vector_split.yy",},}, @@ -2248,7 +2254,6 @@ {"id":{"name":"__node_VFX_effector","path":"scripts/__node_VFX_effector/__node_VFX_effector.yy",},}, {"id":{"name":"sh_blur_gaussian","path":"shaders/sh_blur_gaussian/sh_blur_gaussian.yy",},}, {"id":{"name":"node_path_shift","path":"scripts/node_path_shift/node_path_shift.yy",},}, - {"id":{"name":"s_node_wav_file_write","path":"sprites/s_node_wav_file_write/s_node_wav_file_write.yy",},}, {"id":{"name":"s_node_3d_cylinder","path":"sprites/s_node_3d_cylinder/s_node_3d_cylinder.yy",},}, {"id":{"name":"sh_pb_brick","path":"shaders/sh_pb_brick/sh_pb_brick.yy",},}, {"id":{"name":"node_strand_break","path":"scripts/node_strand_break/node_strand_break.yy",},}, @@ -2399,7 +2404,6 @@ {"id":{"name":"sh_solid","path":"shaders/sh_solid/sh_solid.yy",},}, {"id":{"name":"panel_animation_scaler","path":"scripts/panel_animation_scaler/panel_animation_scaler.yy",},}, {"id":{"name":"wav_file_object","path":"scripts/wav_file_object/wav_file_object.yy",},}, - {"id":{"name":"s_node_json_file_write","path":"sprites/s_node_json_file_write/s_node_json_file_write.yy",},}, {"id":{"name":"node_pb_fx_intersect","path":"scripts/node_pb_fx_intersect/node_pb_fx_intersect.yy",},}, {"id":{"name":"timer_function","path":"scripts/timer_function/timer_function.yy",},}, {"id":{"name":"fd_rectangle_get_material_time_step","path":"scripts/fd_rectangle_get_material_time_step/fd_rectangle_get_material_time_step.yy",},}, diff --git a/datafiles/data/Theme.zip b/datafiles/data/Theme.zip index 8433d2ea7..5262fdb24 100644 Binary files a/datafiles/data/Theme.zip and b/datafiles/data/Theme.zip differ diff --git a/fonts/_f_sdf/_f_sdf.old.png b/fonts/_f_sdf/_f_sdf.old.png index 8554ae3bd..10b355e61 100644 Binary files a/fonts/_f_sdf/_f_sdf.old.png and b/fonts/_f_sdf/_f_sdf.old.png differ diff --git a/fonts/_f_sdf/_f_sdf.png b/fonts/_f_sdf/_f_sdf.png index 56410dca4..80285fea4 100644 Binary files a/fonts/_f_sdf/_f_sdf.png and b/fonts/_f_sdf/_f_sdf.png differ diff --git a/fonts/_f_sdf_medium/_f_sdf_medium.old.png b/fonts/_f_sdf_medium/_f_sdf_medium.old.png index 80082c64e..e44679133 100644 Binary files a/fonts/_f_sdf_medium/_f_sdf_medium.old.png and b/fonts/_f_sdf_medium/_f_sdf_medium.old.png differ diff --git a/fonts/_f_sdf_medium/_f_sdf_medium.png b/fonts/_f_sdf_medium/_f_sdf_medium.png index 12ccd970e..3fad3e879 100644 Binary files a/fonts/_f_sdf_medium/_f_sdf_medium.png and b/fonts/_f_sdf_medium/_f_sdf_medium.png differ diff --git a/objects/_p_dialog/Create_0.gml b/objects/_p_dialog/Create_0.gml index 3be40f86e..4fc8331de 100644 --- a/objects/_p_dialog/Create_0.gml +++ b/objects/_p_dialog/Create_0.gml @@ -39,6 +39,8 @@ dialog_drag_mx = 0; dialog_drag_my = 0; + passthrough = false; + function doDrag() { if(!active) return; @@ -128,14 +130,22 @@ #endregion #region focus + function point_in(mx, my) { + INLINE + + var _r = dialog_resizable * 6; + var x0 = dialog_x - _r; + var x1 = dialog_x + dialog_w + _r; + var y0 = dialog_y - _r; + var y1 = dialog_y + dialog_h + _r; + + return point_in_rectangle(mx, my, x0, y0, x1, y1); + } + function checkFocus() { if(!active) return; - var x0 = dialog_x - dialog_resizable * 6; - var x1 = dialog_x + dialog_w + dialog_resizable * 6; - var y0 = dialog_y - dialog_resizable * 6; - var y1 = dialog_y + dialog_h + dialog_resizable * 6; - - if(point_in_rectangle(mouse_mx, mouse_my, x0, y0, x1, y1)) { + + if(point_in(mouse_mx, mouse_my)) { if(depth < DIALOG_DEPTH_HOVER) { DIALOG_DEPTH_HOVER = depth; HOVER = self.id; @@ -169,42 +179,35 @@ dialog_x = round(clamp(dialog_x, 2, WIN_SW - dialog_w - 2)); dialog_y = round(clamp(dialog_y, 2, WIN_SH - dialog_h - 2)); } - + + function isTop() { + with(_p_dialog) if(depth < other.depth) return false; + return true; + } + function checkMouse() { - if(!active) return; - if(!DIALOG_CLICK) { - //printIf(mouse_press(mb_any), $"Check {object_get_name(object_index)} : Click"); - return; - } + if(!active) return; + if(!destroy_on_click_out) return; + if(!DIALOG_CLICK) return; - with(_p_dialog) if(depth < other.depth) { - //printIf(mouse_press(mb_any), $"Check {object_get_name(object_index)} : Top"); - return; - } - - for( var i = 0, n = array_length(children); i < n; i++ ) - if(instance_exists(children[i])) { - //printIf(mouse_press(mb_any), $"Check {object_get_name(object_index)} : Children"); - return; + if(mouse_press(mb_any)) { + if(!checkClosable()) return; + if(!isTop()) return; + + for( var i = 0, n = array_length(children); i < n; i++ ) + if(instance_exists(children[i])) return; + + if(!point_in(mouse_mx, mouse_my)) { + instance_destroy(self); + onDestroy(); + DIALOG_CLICK = false; } - - var x0 = dialog_x - dialog_resizable * 6; - var x1 = dialog_x + dialog_w + dialog_resizable * 6; - var y0 = dialog_y - dialog_resizable * 6; - var y1 = dialog_y + dialog_h + dialog_resizable * 6; - - if(destroy_on_click_out && mouse_press(mb_any) && !point_in_rectangle(mouse_mx, mouse_my, x0, y0, x1, y1) - && checkClosable()) { - - instance_destroy(self); - onDestroy(); - DIALOG_CLICK = false; } } function checkClosable() { return true; } - function onDestroy() {} + function onDestroy() { } #endregion #region children diff --git a/objects/_p_dialog/Destroy_0.gml b/objects/_p_dialog/Destroy_0.gml index 84dd21d60..a69c66beb 100644 --- a/objects/_p_dialog/Destroy_0.gml +++ b/objects/_p_dialog/Destroy_0.gml @@ -7,4 +7,5 @@ ds_list_remove(DIALOGS, self); if(parent) array_remove(parent.children, id); -MOUSE_BLOCK = true; \ No newline at end of file +if(!passthrough) + MOUSE_BLOCK = true; \ No newline at end of file diff --git a/objects/o_dialog_add_node/Create_0.gml b/objects/o_dialog_add_node/Create_0.gml index 2cecb3eb3..9d125a784 100644 --- a/objects/o_dialog_add_node/Create_0.gml +++ b/objects/o_dialog_add_node/Create_0.gml @@ -122,30 +122,17 @@ event_inherited(); return false; } #endregion - #region ---- set page ---- - function setPage(pageIndex) { - ADD_NODE_PAGE = min(pageIndex, ds_list_size(category) - 1); - node_list = pageIndex < 0? noone : category[| ADD_NODE_PAGE].list; - } - - ADD_NODE_PAGE = 0; - setPage(NODE_PAGE_DEFAULT); - #endregion - function buildNode(_node, _param = {}) { #region - if(!_node) { - instance_destroy(); - instance_destroy(o_dialog_menubox); - return; - } + instance_destroy(); + instance_destroy(o_dialog_menubox); + + if(!_node) return; if(is_instanceof(_node, AddNodeItem)) { _node.onClick({ node_called, junction_hovering }); - instance_destroy(o_dialog_menubox); - instance_destroy(); return; } @@ -154,11 +141,7 @@ event_inherited(); if(is_instanceof(_node, NodeObject)) { _new_node = _node.build(node_target_x, node_target_y,, _param); - if(!_new_node) { - instance_destroy(); - instance_destroy(o_dialog_menubox); - return; - } + if(!_new_node) return; if(category == NODE_CATEGORY && _node.show_in_recent) { array_remove(global.RECENT_NODES, _node.node); @@ -258,9 +241,6 @@ event_inherited(); } } } - - instance_destroy(); - instance_destroy(o_dialog_menubox); } #endregion catagory_pane = new scrollPane(category_width, dialog_h - ui(66), function(_y, _m) { #region @@ -273,13 +253,12 @@ event_inherited(); for(var i = start; i < ds_list_size(category); i++) { var name = ""; - var color = noone; if(i == -2) name = "All"; else if(i == -1) name = "New"; else { var cat = category[| i]; - name = cat.name; + name = cat.name; if(array_length(cat.filter)) { if(!array_exists(cat.filter, instanceof(context))) { @@ -287,7 +266,6 @@ event_inherited(); setPage(NODE_PAGE_DEFAULT); continue; } - color = context.color; draw_set_color(COLORS._main_text_accent); } } @@ -662,6 +640,22 @@ event_inherited(); }); #endregion content_pane.always_scroll = true; + + #region ---- set page ---- + function setPage(pageIndex) { + ADD_NODE_PAGE = min(pageIndex, ds_list_size(category) - 1); + node_list = pageIndex < 0? noone : category[| ADD_NODE_PAGE].list; + } + + if(PREFERENCES.add_node_remember) { + content_pane.scroll_y_raw = ADD_NODE_SCROLL; + content_pane.scroll_y_to = ADD_NODE_SCROLL; + } else + ADD_NODE_PAGE = 0; + + setPage(ADD_NODE_PAGE); + #endregion + #endregion #region resize diff --git a/objects/o_dialog_add_node/Draw_64.gml b/objects/o_dialog_add_node/Draw_64.gml index e4957df8c..2ce85833f 100644 --- a/objects/o_dialog_add_node/Draw_64.gml +++ b/objects/o_dialog_add_node/Draw_64.gml @@ -87,16 +87,5 @@ if !ready exit; } node_tooltip = noone; -#endregion - -//#region dec -// if(node_called) { -// var jx = 0; -// var jy = dialog_y + ui(26); - -// if(node_called.connect_type == JUNCTION_CONNECT.input) -// jx = dialog_x; -// else -// jx = dialog_x + dialog_w; -// } -//#endregion \ No newline at end of file + ADD_NODE_SCROLL = content_pane.scroll_y_to; +#endregion \ No newline at end of file diff --git a/objects/o_dialog_preference/Create_0.gml b/objects/o_dialog_preference/Create_0.gml index f48eefe11..14054bf38 100644 --- a/objects/o_dialog_preference/Create_0.gml +++ b/objects/o_dialog_preference/Create_0.gml @@ -348,6 +348,12 @@ event_inherited(); ds_list_add(pref_appr, __txt("Graph")); + ds_list_add(pref_appr, new __Panel_Linear_Setting_Item_Preference( + __txtx("pref_add_node_remember", "Remember add node position"), + "add_node_remember", + new checkBox(function() { PREFERENCES.add_node_remember = !PREFERENCES.add_node_remember; }) + )); + ds_list_add(pref_appr, new __Panel_Linear_Setting_Item_Preference( __txtx("pref_connection_type", "Connection type"), "curve_connection_line", diff --git a/scripts/__3D/__3D.gml b/scripts/__3D/__3D.gml index 3c36ec811..dc8c162ef 100644 --- a/scripts/__3D/__3D.gml +++ b/scripts/__3D/__3D.gml @@ -486,7 +486,7 @@ enum CAMERA_PROJ { drag_my = _my; } - inputs[| global_pos].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| global_pos].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); #endregion } diff --git a/scripts/__node_3d_combine/__node_3d_combine.gml b/scripts/__node_3d_combine/__node_3d_combine.gml index 4bdcd81f8..74eeee628 100644 --- a/scripts/__node_3d_combine/__node_3d_combine.gml +++ b/scripts/__node_3d_combine/__node_3d_combine.gml @@ -119,7 +119,7 @@ function __Node_3D_Combine(_x, _y, _group = noone) : Node(_x, _y, _group) constr refreshDynamicInput(); } - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny); } diff --git a/scripts/__node_3d_displace/__node_3d_displace.gml b/scripts/__node_3d_displace/__node_3d_displace.gml index 3050183a3..4dda1a651 100644 --- a/scripts/__node_3d_displace/__node_3d_displace.gml +++ b/scripts/__node_3d_displace/__node_3d_displace.gml @@ -80,7 +80,7 @@ function __Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr vertexObjects = []; _3d_node_init(1, /*Transform*/ 4, 5, 1, 2, 3); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny); } diff --git a/scripts/__node_3d_extrude/__node_3d_extrude.gml b/scripts/__node_3d_extrude/__node_3d_extrude.gml index 6ccf0b1ff..de8577e22 100644 --- a/scripts/__node_3d_extrude/__node_3d_extrude.gml +++ b/scripts/__node_3d_extrude/__node_3d_extrude.gml @@ -408,7 +408,7 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro } } - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny); } diff --git a/scripts/__node_3d_obj/__node_3d_obj.gml b/scripts/__node_3d_obj/__node_3d_obj.gml index 0b99ae796..46a70347c 100644 --- a/scripts/__node_3d_obj/__node_3d_obj.gml +++ b/scripts/__node_3d_obj/__node_3d_obj.gml @@ -170,7 +170,7 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo } do_reset_material = false; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny); } diff --git a/scripts/__node_3d_plane/__node_3d_plane.gml b/scripts/__node_3d_plane/__node_3d_plane.gml index 0daa79f15..a61ce9257 100644 --- a/scripts/__node_3d_plane/__node_3d_plane.gml +++ b/scripts/__node_3d_plane/__node_3d_plane.gml @@ -1,7 +1,7 @@ function __Node_3D_Plane(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "3D Plane"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Render position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -117,8 +117,8 @@ function __Node_3D_Plane(_x, _y, _group = noone) : Node_Processor(_x, _y, _group vertexObjects[0] = pln; } - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - if(inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + if(inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; var _out = outputs[| 0].getValue(); if(!is_surface(_out) || !surface_exists(_out)) return; diff --git a/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml b/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml index 534310b3e..db5a95c88 100644 --- a/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml +++ b/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml @@ -44,9 +44,9 @@ function __Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 14] = nodeValue("Sides", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 16); - inputs[| 15] = nodeValue("Textures base", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 15] = nodeValue("Textures base", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 16] = nodeValue("Textures side", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 16] = nodeValue("Textures side", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 17] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true) @@ -124,7 +124,7 @@ function __Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } generate_vb(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny); } diff --git a/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml b/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml index 4bdeedec1..8142a97fd 100644 --- a/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml +++ b/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml @@ -19,12 +19,12 @@ function __Node_3D_Cube(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 5] = nodeValue("Textures per face", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 6] = nodeValue("Textures 0", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0).setVisible(false); - inputs[| 7] = nodeValue("Textures 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0).setVisible(false); - inputs[| 8] = nodeValue("Textures 2", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0).setVisible(false); - inputs[| 9] = nodeValue("Textures 3", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0).setVisible(false); - inputs[| 10] = nodeValue("Textures 4", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0).setVisible(false); - inputs[| 11] = nodeValue("Textures 5", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0).setVisible(false); + inputs[| 6] = nodeValue("Textures 0", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone).setVisible(false); + inputs[| 7] = nodeValue("Textures 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone).setVisible(false); + inputs[| 8] = nodeValue("Textures 2", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone).setVisible(false); + inputs[| 9] = nodeValue("Textures 3", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone).setVisible(false); + inputs[| 10] = nodeValue("Textures 4", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone).setVisible(false); + inputs[| 11] = nodeValue("Textures 5", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone).setVisible(false); inputs[| 12] = nodeValue("Object scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -82,7 +82,7 @@ function __Node_3D_Cube(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) _3d_node_init(1, /*Transform*/ 2, 4, 19, 18, 12); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny, _panel) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, _panel) { _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny); } diff --git a/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml b/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml index fb2a2cf97..04241f1f9 100644 --- a/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml +++ b/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml @@ -19,9 +19,9 @@ function __Node_3D_Cylinder(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 5] = nodeValue("Render scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 6] = nodeValue("Textures top", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); - inputs[| 7] = nodeValue("Textures bottom", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); - inputs[| 8] = nodeValue("Textures side", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 6] = nodeValue("Textures top", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 7] = nodeValue("Textures bottom", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 8] = nodeValue("Textures side", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 9] = nodeValue("Object scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -137,7 +137,7 @@ function __Node_3D_Cylinder(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr } generate_vb(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny); } diff --git a/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml b/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml index 22fed03c7..3b4977d30 100644 --- a/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml +++ b/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml @@ -18,7 +18,7 @@ function __Node_3D_Sphere(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 4] = nodeValue("Render scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 5] = nodeValue("Textures", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 5] = nodeValue("Textures", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 6] = nodeValue("Object scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -139,7 +139,7 @@ function __Node_3D_Sphere(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou } generate_vb(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny); } diff --git a/scripts/__node_3d_render/__node_3d_render.gml b/scripts/__node_3d_render/__node_3d_render.gml index 378aedb6a..fbed18525 100644 --- a/scripts/__node_3d_render/__node_3d_render.gml +++ b/scripts/__node_3d_render/__node_3d_render.gml @@ -146,7 +146,7 @@ // } // do_reset_material = false; -// static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { +// static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { // _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny); // } diff --git a/scripts/__node_3d_repeat/__node_3d_repeat.gml b/scripts/__node_3d_repeat/__node_3d_repeat.gml index b53597c1c..cd48a40da 100644 --- a/scripts/__node_3d_repeat/__node_3d_repeat.gml +++ b/scripts/__node_3d_repeat/__node_3d_repeat.gml @@ -89,7 +89,7 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constru _3d_node_init(1, /*Transform*/ 4, 5, 1, 2, 3); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny); } diff --git a/scripts/__node_3d_transform/__node_3d_transform.gml b/scripts/__node_3d_transform/__node_3d_transform.gml index 35544896e..8ea56cb3e 100644 --- a/scripts/__node_3d_transform/__node_3d_transform.gml +++ b/scripts/__node_3d_transform/__node_3d_transform.gml @@ -64,7 +64,7 @@ function __Node_3D_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _g _3d_node_init(1, /*Transform*/ 4, 5, 1, 2, 3); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny); } diff --git a/scripts/__node_VFX_effector/__node_VFX_effector.gml b/scripts/__node_VFX_effector/__node_VFX_effector.gml index 23dbb114b..1b03bcdd1 100644 --- a/scripts/__node_VFX_effector/__node_VFX_effector.gml +++ b/scripts/__node_VFX_effector/__node_VFX_effector.gml @@ -64,8 +64,8 @@ function Node_VFX_effector(_x, _y, _group = noone) : Node(_x, _y, _group) constr UPDATE_PART_FORWARD - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); var area = getInputData(1); var cx = _x + area[0] * _s; diff --git a/scripts/__node_process_template/__node_process_template.gml b/scripts/__node_process_template/__node_process_template.gml index fc9f459c5..9e3e3e308 100644 --- a/scripts/__node_process_template/__node_process_template.gml +++ b/scripts/__node_process_template/__node_process_template.gml @@ -1,13 +1,13 @@ function Node_Process_Template(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = ""; - inputs[| 0] = nodeValue("", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - outputs[| 0] = nodeValue("", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, 0); + outputs[| 0] = nodeValue("", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); input_display_list = [ 0 ]; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {} + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) {} static step = function() {} diff --git a/scripts/__node_template/__node_template.gml b/scripts/__node_template/__node_template.gml index 1e02f2947..5fe324fe9 100644 --- a/scripts/__node_template/__node_template.gml +++ b/scripts/__node_template/__node_template.gml @@ -1,13 +1,13 @@ function Node_Template(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = ""; - inputs[| 0] = nodeValue("", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - outputs[| 0] = nodeValue("", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, 0); + outputs[| 0] = nodeValue("", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); input_display_list = [ 0 ]; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {} + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) {} static step = function() {} diff --git a/scripts/_node_VFX_spawner/_node_VFX_spawner.gml b/scripts/_node_VFX_spawner/_node_VFX_spawner.gml index 52352a695..8e7b37648 100644 --- a/scripts/_node_VFX_spawner/_node_VFX_spawner.gml +++ b/scripts/_node_VFX_spawner/_node_VFX_spawner.gml @@ -2,7 +2,7 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co name = "Spawner"; update_on_frame = true; - inputs[| 0] = nodeValue("Particle sprite", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0 ); + inputs[| 0] = nodeValue("Particle sprite", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); inputs[| 1] = nodeValue("Spawn delay", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4, "Frames delay between each particle spawn." ) .rejectArray(); @@ -96,7 +96,7 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[| 29] = nodeValue("Directed from center", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Make particle move away from the spawn center.") .rejectArray(); - inputs[| 30] = nodeValue("Distribution map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0) + inputs[| 30] = nodeValue("Distribution map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) .rejectArray() inputs[| 31] = nodeValue("Atlas", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, [] ) @@ -501,12 +501,12 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co onStep(); } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _spr = getInputData(0); if(is_array(_spr)) _spr = _spr[0]; var _flag = is_instanceof(_spr, SurfaceAtlas)? 0b0001 : 0b0011; - inputs[| 3].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, _flag); + inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, _flag); if(onDrawOverlay != -1) onDrawOverlay(active, _x, _y, _s, _mx, _my); } #endregion diff --git a/scripts/_node_strand_affector/_node_strand_affector.gml b/scripts/_node_strand_affector/_node_strand_affector.gml index ff83f9fd9..53ffab0bf 100644 --- a/scripts/_node_strand_affector/_node_strand_affector.gml +++ b/scripts/_node_strand_affector/_node_strand_affector.gml @@ -65,7 +65,7 @@ function _Node_Strand_Affector(_x, _y, _group = noone) : Node(_x, _y, _group) co ["Shape", false], 1, 2, 3, 4, 5, ]; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _typ = getInputData(1); var _pos = getInputData(2); var _ran = getInputData(3); @@ -142,9 +142,9 @@ function _Node_Strand_Affector(_x, _y, _group = noone) : Node(_x, _y, _group) co draw_line_dashed(px0, py0, px1, py1); } - active &= inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - active &= inputs[| 4].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); - active &= inputs[| 3].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny, 0, 1, THEME.anchor_scale_hori); + active &= inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + active &= inputs[| 4].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); + active &= inputs[| 3].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny, 0, 1, THEME.anchor_scale_hori); } static update = function(frame = CURRENT_FRAME) { diff --git a/scripts/array_functions/array_functions.gml b/scripts/array_functions/array_functions.gml index 6e5661a1f..a362c9e31 100644 --- a/scripts/array_functions/array_functions.gml +++ b/scripts/array_functions/array_functions.gml @@ -286,4 +286,14 @@ function array_insert_before(arr, before, values) { #region for( var i = 0, n = array_length(values); i < n; i++ ) array_insert(arr, _ind + i, values[i]); +} #endregion + +#macro array_equals array_equals_overwrite +#macro __array_equals array_equals + +function array_equals_overwrite(arr1, arr2) { #region + if(!is_array(arr1) && is_array(arr2)) return false; + if( is_array(arr1) && !is_array(arr2)) return false; + if(!is_array(arr1) && !is_array(arr2)) return arr1 == arr2; + return __array_equals(arr1, arr2) } #endregion \ No newline at end of file diff --git a/scripts/draw_surface_blend/draw_surface_blend.gml b/scripts/draw_surface_blend/draw_surface_blend.gml index 63a66cbbf..b04dd6898 100644 --- a/scripts/draw_surface_blend/draw_surface_blend.gml +++ b/scripts/draw_surface_blend/draw_surface_blend.gml @@ -49,11 +49,11 @@ function draw_surface_blend(background, foreground, blend = 0, alpha = 1, _pre_a shader_reset(); } -function draw_surface_blend_ext(bg, fg, _x, _y, _sx = 1, _sy = 1, _rot = 0, _col = c_white, _alpha = 1, _blend = 0) { +function draw_surface_blend_ext(bg, fg, _x, _y, _sx = 1, _sy = 1, _rot = 0, _col = c_white, _alpha = 1, _blend = 0, _pre_alp = false) { surface_set_shader(blend_temp_surface); shader_set_interpolation(fg); draw_surface_ext_safe(fg, _x, _y, _sx, _sy, _rot, _col, 1); surface_reset_shader(); - draw_surface_blend(bg, blend_temp_surface, _blend, _alpha, false); + draw_surface_blend(bg, blend_temp_surface, _blend, _alpha, _pre_alp); } \ No newline at end of file diff --git a/scripts/event_recorder/event_recorder.gml b/scripts/event_recorder/event_recorder.gml index 1758a4026..b1a8c9c88 100644 --- a/scripts/event_recorder/event_recorder.gml +++ b/scripts/event_recorder/event_recorder.gml @@ -59,6 +59,7 @@ function Action(_type, _object, _data, _trigger = 0) constructor { break; case ACTION_TYPE.list_insert : if(!ds_exists(obj, ds_type_list)) return; + ds_list_delete(obj, data[1]); break; case ACTION_TYPE.list_modify : diff --git a/scripts/globals/globals.gml b/scripts/globals/globals.gml index 07248989f..be4399a38 100644 --- a/scripts/globals/globals.gml +++ b/scripts/globals/globals.gml @@ -28,10 +28,10 @@ globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER, LATEST_VERSION; LATEST_VERSION = 11600; - VERSION = 11661; - SAVE_VERSION = 11660; - VERSION_STRING = "1.16.6.1"; - BUILD_NUMBER = 11661; + VERSION = 11670; + SAVE_VERSION = 11670; + VERSION_STRING = "1.16.7"; + BUILD_NUMBER = 11670; globalvar APPEND_MAP; APPEND_MAP = ds_map_create(); @@ -61,8 +61,10 @@ DIALOG_CLICK = true; - globalvar ADD_NODE_PAGE; - ADD_NODE_PAGE = 0; + globalvar ADD_NODE_PAGE, ADD_NODE_SCROLL; + + ADD_NODE_PAGE = 0; + ADD_NODE_SCROLL = 0; #endregion #region macro diff --git a/scripts/nodeValue_drawer/nodeValue_drawer.gml b/scripts/nodeValue_drawer/nodeValue_drawer.gml index 2ce364806..e5af07f0d 100644 --- a/scripts/nodeValue_drawer/nodeValue_drawer.gml +++ b/scripts/nodeValue_drawer/nodeValue_drawer.gml @@ -234,7 +234,8 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc bx -= ui(28); var ic_b = jun.expUse? c_white : COLORS._main_icon; if(buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _focus, _hover, __txtx("panel_inspector_use_expression", "Use expression"), THEME.node_use_expression, jun.expUse, ic_b) == 2) { - jun.expUse = !jun.expUse; + jun.setUseExpression(!jun.expUse); + if(!jun.expUse) WIDGET_CURRENT = noone; } diff --git a/scripts/node_2d_light/node_2d_light.gml b/scripts/node_2d_light/node_2d_light.gml index 8a57fe5d0..a24d665f5 100644 --- a/scripts/node_2d_light/node_2d_light.gml +++ b/scripts/node_2d_light/node_2d_light.gml @@ -14,7 +14,7 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) uniform_band = shader_get_uniform(shader, "band"); uniform_attn = shader_get_uniform(shader, "atten"); - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Light shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Point", s_node_2d_light_shape, 0), @@ -76,7 +76,7 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _shape = getInputData(1); switch(_shape) { @@ -85,14 +85,14 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; - inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 3].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); + inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 3].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); break; case LIGHT_SHAPE_2D.line : case LIGHT_SHAPE_2D.line_asym : case LIGHT_SHAPE_2D.spot : - inputs[| 6].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 7].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 6].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 7].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); break; } } diff --git a/scripts/node_9slice/node_9slice.gml b/scripts/node_9slice/node_9slice.gml index 76875045a..8729910de 100644 --- a/scripts/node_9slice/node_9slice.gml +++ b/scripts/node_9slice/node_9slice.gml @@ -1,7 +1,7 @@ function Node_9Slice(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Nine Slice"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) .setDisplay(VALUE_DISPLAY.vector); @@ -33,7 +33,7 @@ function Node_9Slice(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 1].setValue( [ surface_get_width_safe(s), surface_get_height_safe(s) ] ); } - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { if(array_length(current_data) < 1) return; var _dim = current_data[1]; @@ -75,7 +75,7 @@ function Node_9Slice(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co } } - if(inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) + if(inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) return; if(distance_to_line_infinite(_mx, _my, sp_r, -hh, sp_r, hh) < 12) { diff --git a/scripts/node_FLIP_apply_force/node_FLIP_apply_force.gml b/scripts/node_FLIP_apply_force/node_FLIP_apply_force.gml index 3eac7cc89..b2b51dfc3 100644 --- a/scripts/node_FLIP_apply_force/node_FLIP_apply_force.gml +++ b/scripts/node_FLIP_apply_force/node_FLIP_apply_force.gml @@ -50,7 +50,7 @@ function Node_FLIP_Apply_Force(_x, _y, _group = noone) : Node(_x, _y, _group) co obstracle = new FLIP_Obstracle(); index = 0; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _posit = getInputData(1); var _rad = getInputData(2); var _shp = getInputData(3); @@ -75,7 +75,7 @@ function Node_FLIP_Apply_Force(_x, _y, _group = noone) : Node(_x, _y, _group) co if(_shp == 0) draw_circle(_px, _py, _r, true); else if(_shp == 1) draw_rectangle(_px - _w, _py - _h, _px + _w, _py + _h, true); - if(inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; } #endregion diff --git a/scripts/node_FLIP_apply_velocity/node_FLIP_apply_velocity.gml b/scripts/node_FLIP_apply_velocity/node_FLIP_apply_velocity.gml index 630777289..e8b7224fc 100644 --- a/scripts/node_FLIP_apply_velocity/node_FLIP_apply_velocity.gml +++ b/scripts/node_FLIP_apply_velocity/node_FLIP_apply_velocity.gml @@ -31,7 +31,7 @@ function Node_FLIP_Apply_Velocity(_x, _y, _group = noone) : Node(_x, _y, _group) outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.fdomain, noone ); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _posit = getInputData(1); var _rad = getInputData(2); var _velo = getInputData(3); @@ -57,8 +57,8 @@ function Node_FLIP_Apply_Velocity(_x, _y, _group = noone) : Node(_x, _y, _group) draw_line_width2(_px, _py, _vx, _vy, 6, 2); draw_set_alpha(1); - if(inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; - if(inputs[| 3].drawOverlay(active, _px, _py, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[| 3].drawOverlay(hover, active, _px, _py, _s, _mx, _my, _snx, _sny)) active = false; } #endregion diff --git a/scripts/node_FLIP_domain/node_FLIP_domain.gml b/scripts/node_FLIP_domain/node_FLIP_domain.gml index 77976393c..0a28c0f24 100644 --- a/scripts/node_FLIP_domain/node_FLIP_domain.gml +++ b/scripts/node_FLIP_domain/node_FLIP_domain.gml @@ -98,7 +98,7 @@ function Node_FLIP_Domain(_x, _y, _group = noone) : Node(_x, _y, _group) constru static update = function(frame = CURRENT_FRAME) { var _dim = getInputData(0); - var _siz = getInputData(1); + var _siz = getInputData(1); _siz = max(_siz, 1); var _den = getInputData(2); var _flp = getInputData(3); diff --git a/scripts/node_FLIP_spawner/node_FLIP_spawner.gml b/scripts/node_FLIP_spawner/node_FLIP_spawner.gml index 8c47a24ea..1b387e32b 100644 --- a/scripts/node_FLIP_spawner/node_FLIP_spawner.gml +++ b/scripts/node_FLIP_spawner/node_FLIP_spawner.gml @@ -49,7 +49,7 @@ function Node_FLIP_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group) constr spawn_amo = 0; prev_position = [ 0, 0 ]; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _shp = getInputData(1); var _posit = getInputData(2); @@ -71,7 +71,7 @@ function Node_FLIP_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group) constr draw_surface_ext(_surf, _px - _sw * _s / 2, _py - _sh * _s / 2, _s, _s, 0, c_white, 0.5); } - if(inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; } #endregion diff --git a/scripts/node_FLIP_wall/node_FLIP_wall.gml b/scripts/node_FLIP_wall/node_FLIP_wall.gml index e824f4ea5..8163c1ef9 100644 --- a/scripts/node_FLIP_wall/node_FLIP_wall.gml +++ b/scripts/node_FLIP_wall/node_FLIP_wall.gml @@ -22,8 +22,8 @@ function Node_FLIP_Wall(_x, _y, _group = noone) : Node(_x, _y, _group) construct obstracle = new FLIP_Obstracle(); index = 0; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - if(inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + if(inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; } #endregion static update = function(frame = CURRENT_FRAME) { #region diff --git a/scripts/node_FXAA/node_FXAA.gml b/scripts/node_FXAA/node_FXAA.gml index 875fde906..a58a33925 100644 --- a/scripts/node_FXAA/node_FXAA.gml +++ b/scripts/node_FXAA/node_FXAA.gml @@ -1,7 +1,7 @@ function Node_FXAA(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "FXAA"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); diff --git a/scripts/node_VFX_trail/node_VFX_trail.gml b/scripts/node_VFX_trail/node_VFX_trail.gml index 09c207f6d..d9ceb8987 100644 --- a/scripts/node_VFX_trail/node_VFX_trail.gml +++ b/scripts/node_VFX_trail/node_VFX_trail.gml @@ -19,7 +19,7 @@ function Node_VFX_Trail(_x, _y, _group = noone) : Node(_x, _y, _group) construct outputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.pathnode, self); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region draw_set_color(COLORS._main_accent); for( var i = 0, n = array_length(lines); i < n; i++ ) { diff --git a/scripts/node_active_canvas/node_active_canvas.gml b/scripts/node_active_canvas/node_active_canvas.gml index 89fd35dd6..6e825ed77 100644 --- a/scripts/node_active_canvas/node_active_canvas.gml +++ b/scripts/node_active_canvas/node_active_canvas.gml @@ -37,8 +37,8 @@ function Node_Active_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) const temp_surface = [ surface_create(1, 1) ]; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } #endregion static step = function() { #region diff --git a/scripts/node_alpha_cutoff/node_alpha_cutoff.gml b/scripts/node_alpha_cutoff/node_alpha_cutoff.gml index 6b3b08987..724126df2 100644 --- a/scripts/node_alpha_cutoff/node_alpha_cutoff.gml +++ b/scripts/node_alpha_cutoff/node_alpha_cutoff.gml @@ -1,12 +1,12 @@ function Node_Alpha_Cutoff(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Alpha Cutoff"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Minimum", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2, "Any pixel with less alpha (more transparent) than this will be removed.") .setDisplay(VALUE_DISPLAY.slider); - inputs[| 2] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 2] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 3] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_alpha_grey/node_alpha_grey.gml b/scripts/node_alpha_grey/node_alpha_grey.gml index 28696bbde..ce92cf2f7 100644 --- a/scripts/node_alpha_grey/node_alpha_grey.gml +++ b/scripts/node_alpha_grey/node_alpha_grey.gml @@ -1,7 +1,7 @@ function Node_Alpha_Grey(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Alpha to Grey"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; diff --git a/scripts/node_alpha_hash/node_alpha_hash.gml b/scripts/node_alpha_hash/node_alpha_hash.gml index 824d72a33..ce9497a66 100644 --- a/scripts/node_alpha_hash/node_alpha_hash.gml +++ b/scripts/node_alpha_hash/node_alpha_hash.gml @@ -14,7 +14,7 @@ function Node_Alpha_Hash(_x, _y, _group = noone) : Node_Processor(_x, _y, _group 15, 47, 7, 39, 13, 45, 5, 37, 63, 31, 55, 23, 61, 29, 53, 21]; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_area/node_area.gml b/scripts/node_area/node_area.gml index 675b52ecd..a41ac66a3 100644 --- a/scripts/node_area/node_area.gml +++ b/scripts/node_area/node_area.gml @@ -17,7 +17,7 @@ function Node_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons outputs[| 0] = nodeValue("Area", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [ 0, 0, 0, 0, AREA_SHAPE.rectangle ]) .setDisplay(VALUE_DISPLAY.vector); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { if(process_amount > 1) return; var _pos = getInputData(0); @@ -38,8 +38,8 @@ function Node_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons break; } - inputs[| 0].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 1].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); + inputs[| 0].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 1].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); } static processData = function(_output, _data, _output_index, _array_index = 0) { diff --git a/scripts/node_armature/node_armature.gml b/scripts/node_armature/node_armature.gml index 5aa4251d7..d5dc27b7d 100644 --- a/scripts/node_armature/node_armature.gml +++ b/scripts/node_armature/node_armature.gml @@ -188,7 +188,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo moving = false; scaling = false; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var mx = (_mx - _x) / _s; var my = (_my - _y) / _s; diff --git a/scripts/node_armature_bind/node_armature_bind.gml b/scripts/node_armature_bind/node_armature_bind.gml index dc6d95c59..53d683165 100644 --- a/scripts/node_armature_bind/node_armature_bind.gml +++ b/scripts/node_armature_bind/node_armature_bind.gml @@ -387,7 +387,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr var index = ds_list_size(inputs); var _s = floor((index - input_fix_len) / data_length); - inputs[| index + 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| index + 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| index + 0].surface_index = index; inputs[| index + 0].hover_effect = 0; inputs[| index + 0].display_data.bone_id = ""; @@ -490,7 +490,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr ds_stack_destroy(_bst); } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var dim = getInputData(0); var _bind = getInputData(2); @@ -500,8 +500,8 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr if(bone == noone) return; bone.draw(attributes, false, _x + _dpos[0] * _s, _y + _dpos[1] * _s, _s * _dsca, _mx, _my, anchor_selecting); - inputs[| 3].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - //inputs[| 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + //inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); var mx = (_mx - _x) / _s; var my = (_my - _y) / _s; diff --git a/scripts/node_armature_path/node_armature_path.gml b/scripts/node_armature_path/node_armature_path.gml index cb00dd93f..0c9705a34 100644 --- a/scripts/node_armature_path/node_armature_path.gml +++ b/scripts/node_armature_path/node_armature_path.gml @@ -30,7 +30,7 @@ function Node_Armature_Path(_x, _y, _group = noone) : Node(_x, _y, _group) const })]); #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _b = getInputData(0); if(_b == noone) return; diff --git a/scripts/node_armature_pose/node_armature_pose.gml b/scripts/node_armature_pose/node_armature_pose.gml index c97704c13..e5d210748 100644 --- a/scripts/node_armature_pose/node_armature_pose.gml +++ b/scripts/node_armature_pose/node_armature_pose.gml @@ -108,7 +108,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const posing_mx = 0; posing_my = 0; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _b = outputs[| 0].getValue(); if(_b == noone) return; diff --git a/scripts/node_armature_sample/node_armature_sample.gml b/scripts/node_armature_sample/node_armature_sample.gml index 1a4fd4410..627351494 100644 --- a/scripts/node_armature_sample/node_armature_sample.gml +++ b/scripts/node_armature_sample/node_armature_sample.gml @@ -31,7 +31,7 @@ function Node_Armature_Sample(_x, _y, _group = noone) : Node(_x, _y, _group) con })]); #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _b = getInputData(0); if(_b == noone) return; 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 ce1e76986..0bd12ef5c 100644 --- a/scripts/node_ase_file_read/node_ase_file_read.gml +++ b/scripts/node_ase_file_read/node_ase_file_read.gml @@ -1,7 +1,7 @@ function Node_create_ASE_File_Read(_x, _y, _group = noone) { #region var path = ""; if(!LOADING && !APPENDING && !CLONING) { - path = get_open_filename("aseprite|*.ase", ""); + path = get_open_filename("Aseprite file (*.aseprite, *.ase)|*.aseprite;*.ase", ""); key_release(); if(path == "") return noone; } @@ -160,9 +160,10 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const ["Tags", false], 2, tag_renderer, ]; - attributes.file_checker = true; attributes.layer_visible = []; + edit_time = 0; + attributes.file_checker = true; array_push(attributeEditors, [ "File Watcher", function() { return attributes.file_checker; }, new checkBox(function() { attributes.file_checker = !attributes.file_checker; }) ]); @@ -171,7 +172,6 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const tags = []; _tag_delay = 0; path_current = ""; - edit_time = 0; first_update = false; @@ -217,13 +217,12 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const } } #endregion - function updatePaths(path) { #region - path_current = path; - edit_time = file_get_modify_s(path_current); - - path = try_get_path(path); + function updatePaths(path = path_current) { #region if(path == -1) return false; + path_current = path; + edit_time = max(edit_time, file_get_modify_s(path_current)); + var ext = string_lower(filename_ext(path)); var _name = string_replace(filename_name(path), filename_ext(path), ""); @@ -301,27 +300,21 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; static onInspector1Update = function() { #region - var path = getInputData(0); - if(path == "") return; - updatePaths(path); - + updatePaths(path_get(getInputData(0))); triggerRender(); } #endregion - static step = function() { + static step = function() { #region if(attributes.file_checker && path_current != "") { - var _ms = file_get_modify_s(path_current); - - if(_ms > edit_time) { - edit_time = _ms; - updatePaths(path_current); - update(); + if(file_get_modify_s(path_current) > edit_time) { + updatePaths(); + triggerRender(); } } - } + } #endregion static update = function(frame = CURRENT_FRAME) { #region - var path = getInputData(0); + var path = path_get(getInputData(0)); var current_tag = getInputData(2); if(path_current != path) updatePaths(path); diff --git a/scripts/node_atlas/node_atlas.gml b/scripts/node_atlas/node_atlas.gml index a6c87f1e4..c6a3f5966 100644 --- a/scripts/node_atlas/node_atlas.gml +++ b/scripts/node_atlas/node_atlas.gml @@ -1,7 +1,7 @@ function Node_Atlas(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Pixel Expand"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; diff --git a/scripts/node_average/node_average.gml b/scripts/node_average/node_average.gml index 1121a2db8..616606243 100644 --- a/scripts/node_average/node_average.gml +++ b/scripts/node_average/node_average.gml @@ -4,9 +4,9 @@ function Node_Average(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c shader = sh_average; uniform_dim = shader_get_uniform(shader, "dimension"); - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 2] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_bend/node_bend.gml b/scripts/node_bend/node_bend.gml index 80a616a29..ea4ea8dc1 100644 --- a/scripts/node_bend/node_bend.gml +++ b/scripts/node_bend/node_bend.gml @@ -1,7 +1,7 @@ function Node_Bend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Bend"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; @@ -30,7 +30,7 @@ function Node_Bend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons attribute_surface_depth(); attribute_interpolation(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region draw_set_color(COLORS._main_accent); //for( var i = 0, n = array_length(mesh); i < n; i++ ) { diff --git a/scripts/node_bevel/node_bevel.gml b/scripts/node_bevel/node_bevel.gml index a16eef8ab..490d7112e 100644 --- a/scripts/node_bevel/node_bevel.gml +++ b/scripts/node_bevel/node_bevel.gml @@ -1,7 +1,7 @@ function Node_Bevel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Bevel"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Height", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4) .setMappable(11); @@ -17,7 +17,7 @@ function Node_Bevel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con new scrollItem("Smooth", s_node_curve, 4), new scrollItem("Circular", s_node_curve, 5), ]); - inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -47,7 +47,7 @@ function Node_Bevel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con attribute_surface_depth(); attribute_oversample(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region PROCESSOR_OVERLAY_CHECK var _surf = current_data[0]; @@ -56,7 +56,7 @@ function Node_Bevel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con var _pw = surface_get_width_safe(_surf) * _s / 2; var _ph = surface_get_height_safe(_surf) * _s / 2; - inputs[| 2].drawOverlay(active, _x + _pw, _y + _ph, _s, _mx, _my, _snx, _sny); + inputs[| 2].drawOverlay(hover, active, _x + _pw, _y + _ph, _s, _mx, _my, _snx, _sny); } #endregion static step = function() { #region diff --git a/scripts/node_blend/node_blend.gml b/scripts/node_blend/node_blend.gml index daada4882..6d42ed7c2 100644 --- a/scripts/node_blend/node_blend.gml +++ b/scripts/node_blend/node_blend.gml @@ -8,12 +8,8 @@ function Node_create_Blend(_x, _y, _group = noone, _param = {}) { var node = new Node_Blend(_x, _y, _group); var query = struct_try_get(_param, "query", ""); - var ind = -1; - - switch(query) { - default : ind = array_find(global.node_blend_keys, query); - } + var ind = array_find(global.node_blend_keys, query); if(ind >= 0) node.inputs[| 2].setValue(ind); return node; @@ -34,7 +30,7 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 3] = nodeValue("Opacity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 5] = nodeValue("Fill mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "None", "Stretch", "Tile" ]); @@ -84,7 +80,7 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con drag_mx = 0; drag_my = 0; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _surf = outputs[| 0].getValue(); if(is_array(_surf)) _surf = array_safe_get(_surf, preview_index); if(is_struct(_surf)) return; diff --git a/scripts/node_blend_edge/node_blend_edge.gml b/scripts/node_blend_edge/node_blend_edge.gml index 4ba4cd408..61b4010de 100644 --- a/scripts/node_blend_edge/node_blend_edge.gml +++ b/scripts/node_blend_edge/node_blend_edge.gml @@ -1,7 +1,7 @@ function Node_Blend_Edge(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Blend Edge"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) .setDisplay(VALUE_DISPLAY.slider) diff --git a/scripts/node_blobify/node_blobify.gml b/scripts/node_blobify/node_blobify.gml index 4752f19a9..f63d4f358 100644 --- a/scripts/node_blobify/node_blobify.gml +++ b/scripts/node_blobify/node_blobify.gml @@ -1,7 +1,7 @@ function Node_Blobify(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Blobify"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); diff --git a/scripts/node_bloom/node_bloom.gml b/scripts/node_bloom/node_bloom.gml index d32e027d9..5194a285e 100644 --- a/scripts/node_bloom/node_bloom.gml +++ b/scripts/node_bloom/node_bloom.gml @@ -1,7 +1,7 @@ function Node_Bloom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Bloom"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3, "Bloom blur radius.") .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 1] }); @@ -11,9 +11,9 @@ function Node_Bloom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 3] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, .25, "Blend intensity.") .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] }); - inputs[| 4] = nodeValue("Bloom mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 4] = nodeValue("Bloom mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_blur/node_blur.gml b/scripts/node_blur/node_blur.gml index 599f8dd72..9d6875378 100644 --- a/scripts/node_blur/node_blur.gml +++ b/scripts/node_blur/node_blur.gml @@ -1,7 +1,7 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Blur"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 1] }); @@ -12,7 +12,7 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 4] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); - inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_blur_bokeh/node_blur_bokeh.gml b/scripts/node_blur_bokeh/node_blur_bokeh.gml index ace68a35b..762e9a72e 100644 --- a/scripts/node_blur_bokeh/node_blur_bokeh.gml +++ b/scripts/node_blur_bokeh/node_blur_bokeh.gml @@ -1,13 +1,13 @@ function Node_Blur_Bokeh(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Lens Blur"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.01] }) .setMappable(8); - inputs[| 2] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 2] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 3] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_blur_contrast/node_blur_contrast.gml b/scripts/node_blur_contrast/node_blur_contrast.gml index 64e3926aa..dfe923ddb 100644 --- a/scripts/node_blur_contrast/node_blur_contrast.gml +++ b/scripts/node_blur_contrast/node_blur_contrast.gml @@ -1,7 +1,7 @@ function Node_Blur_Contrast(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Contrast Blur"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 1] }); @@ -9,7 +9,7 @@ function Node_Blur_Contrast(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 2] = nodeValue("Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2, "Brightness different to be blur together.") .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_blur_directional/node_blur_directional.gml b/scripts/node_blur_directional/node_blur_directional.gml index 76880948f..b590654cb 100644 --- a/scripts/node_blur_directional/node_blur_directional.gml +++ b/scripts/node_blur_directional/node_blur_directional.gml @@ -1,7 +1,7 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Directional Blur"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) @@ -11,7 +11,7 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y, .setDisplay(VALUE_DISPLAY.rotation) .setMappable(10); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -42,7 +42,7 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y, attribute_surface_depth(); attribute_oversample(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _surf = outputs[| 0].getValue(); if(is_array(_surf)) { if(array_length(_surf) == 0) return; @@ -52,7 +52,7 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y, var ww = surface_get_width_safe(_surf); var hh = surface_get_height_safe(_surf); - inputs[| 2].drawOverlay(active, _x + ww / 2 * _s, _y + hh / 2 * _s, _s, _mx, _my, _snx, _sny); + inputs[| 2].drawOverlay(hover, active, _x + ww / 2 * _s, _y + hh / 2 * _s, _s, _mx, _my, _snx, _sny); } #endregion static step = function() { #region diff --git a/scripts/node_blur_radial/node_blur_radial.gml b/scripts/node_blur_radial/node_blur_radial.gml index e04222cb0..252657d84 100644 --- a/scripts/node_blur_radial/node_blur_radial.gml +++ b/scripts/node_blur_radial/node_blur_radial.gml @@ -1,7 +1,7 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Radial Blur"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 45) .setDisplay(VALUE_DISPLAY.rotation) @@ -14,7 +14,7 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 3] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]); - inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 5] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -44,13 +44,13 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_oversample(); attribute_interpolation(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var pos = getInputData(2); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; - inputs[| 1].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); - inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 1].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); + inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } #endregion static step = function() { #region diff --git a/scripts/node_blur_shape/node_blur_shape.gml b/scripts/node_blur_shape/node_blur_shape.gml index a12d33f00..428d09c66 100644 --- a/scripts/node_blur_shape/node_blur_shape.gml +++ b/scripts/node_blur_shape/node_blur_shape.gml @@ -6,7 +6,7 @@ function Node_Blur_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 2] = nodeValue("Blur mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_blur_simple/node_blur_simple.gml b/scripts/node_blur_simple/node_blur_simple.gml index 15ef6c81e..560ae2d79 100644 --- a/scripts/node_blur_simple/node_blur_simple.gml +++ b/scripts/node_blur_simple/node_blur_simple.gml @@ -1,20 +1,20 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Non-Uniform Blur"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 1] }); inputs[| 2] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]); - inputs[| 3] = nodeValue("Blur mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 3] = nodeValue("Blur mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 4] = nodeValue("Override color", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Replace all color while keeping the alpha. Used to\nfix grey outline when bluring transparent pixel."); inputs[| 5] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); - inputs[| 6] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 6] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 7] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_blur_slope/node_blur_slope.gml b/scripts/node_blur_slope/node_blur_slope.gml index 0e0f3b54d..2c27a5993 100644 --- a/scripts/node_blur_slope/node_blur_slope.gml +++ b/scripts/node_blur_slope/node_blur_slope.gml @@ -1,7 +1,7 @@ function Node_Blur_Slope(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Slope Blur"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 1] }) @@ -9,7 +9,7 @@ function Node_Blur_Slope(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 2] = nodeValue("Slope Map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_blur_zoom/node_blur_zoom.gml b/scripts/node_blur_zoom/node_blur_zoom.gml index ac1e41b13..44ef36d9b 100644 --- a/scripts/node_blur_zoom/node_blur_zoom.gml +++ b/scripts/node_blur_zoom/node_blur_zoom.gml @@ -1,7 +1,7 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Zoom Blur"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2) .setMappable(12); @@ -16,9 +16,9 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 4] = nodeValue("Zoom mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Start", "Middle", "End" ]); - inputs[| 5] = nodeValue("Blur mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 5] = nodeValue("Blur mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 6] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 6] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 7] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -47,13 +47,13 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); attribute_oversample(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var pos = getInputData(2); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; - inputs[| 1].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny, 0, 64, THEME.anchor_scale_hori); - inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 1].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny, 0, 64, THEME.anchor_scale_hori); + inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } #endregion static step = function() { #region diff --git a/scripts/node_bw/node_bw.gml b/scripts/node_bw/node_bw.gml index b654457cc..6db945165 100644 --- a/scripts/node_bw/node_bw.gml +++ b/scripts/node_bw/node_bw.gml @@ -1,7 +1,7 @@ function Node_BW(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "BW"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Brightness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01] }) @@ -11,7 +11,7 @@ function Node_BW(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 4, 0.01] }) .setMappable(10); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_byte_file_read/node_byte_file_read.gml b/scripts/node_byte_file_read/node_byte_file_read.gml new file mode 100644 index 000000000..bce10f167 --- /dev/null +++ b/scripts/node_byte_file_read/node_byte_file_read.gml @@ -0,0 +1,80 @@ +function Node_Byte_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { + name = "Byte File In"; + color = COLORS.node_blend_input; + + w = 128; + + inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") + .setDisplay(VALUE_DISPLAY.path_load, { filter: "any file|*" }) + .rejectArray(); + + outputs[| 0] = nodeValue("Content", self, JUNCTION_CONNECT.output, VALUE_TYPE.buffer, noone); + outputs[| 1] = nodeValue("Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.path, "") + .setVisible(true, true); + + content = noone; + + on_drop_file = function(path) { #region + path = path_get(path); + inputs[| 0].setValue(path); + + if(updatePaths(path)) { + doUpdate(); + return true; + } + + return false; + } #endregion + + path_current = ""; + edit_time = 0; + + attributes.file_checker = true; + array_push(attributeEditors, [ "File Watcher", function() { return attributes.file_checker; }, + new checkBox(function() { attributes.file_checker = !attributes.file_checker; }) ]); + + insp1UpdateTooltip = __txt("Refresh"); + insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; + + static onInspector1Update = function() { #region + updatePaths(path_get(getInputData(0))); + triggerRender(); + } #endregion + + function updatePaths(path = path_current) { #region + if(path == -1) return false; + + path_current = path; + edit_time = max(edit_time, file_get_modify_s(path_current)); + + outputs[| 1].setValue(path_current); + content = buffer_load(path_current); + + return true; + } #endregion + + static step = function() { #region + if(attributes.file_checker && path_current != "") { + if(file_get_modify_s(path_current) > edit_time) { + updatePaths(); + triggerRender(); + } + } + } #endregion + + static update = function(frame = CURRENT_FRAME) { #region + var path = path_get(getInputData(0)); + if(path_current != path) + updatePaths(path); + + outputs[| 0].setValue(content); + } #endregion + + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region + var bbox = drawGetBbox(xx, yy, _s); + var str = filename_name(getInputData(0)); + + draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); + draw_text_bbox(bbox, str); + } #endregion +} \ No newline at end of file diff --git a/scripts/node_byte_file_read/node_byte_file_read.yy b/scripts/node_byte_file_read/node_byte_file_read.yy new file mode 100644 index 000000000..41c2deedf --- /dev/null +++ b/scripts/node_byte_file_read/node_byte_file_read.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_byte_file_read", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "IO", + "path": "folders/nodes/data/IO.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_byte_file_write/node_byte_file_write.gml b/scripts/node_byte_file_write/node_byte_file_write.gml new file mode 100644 index 000000000..7f683120a --- /dev/null +++ b/scripts/node_byte_file_write/node_byte_file_write.gml @@ -0,0 +1,34 @@ +function Node_Byte_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { + name = "Byte File Out"; + color = COLORS.node_blend_input; + + w = 128; + + inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") + .setDisplay(VALUE_DISPLAY.path_save, { filter: "any file|*" }) + .rejectArray(); + + inputs[| 1] = nodeValue("Content", self, JUNCTION_CONNECT.input, VALUE_TYPE.buffer, noone) + .setVisible(true, true); + + static writeFile = function() { + var path = getInputData(0); + if(path == "") return; + + var cont = getInputData(1); + if(cont == noone) return; + + buffer_save(cont, path); + } + + static update = function(frame = CURRENT_FRAME) { writeFile(); } + static onInspector1Update = function() { getInputs(); writeFile(); } + + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { + var bbox = drawGetBbox(xx, yy, _s); + var str = filename_name(getInputData(0)); + + draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); + draw_text_bbox(bbox, str); + } +} \ No newline at end of file diff --git a/scripts/node_byte_file_write/node_byte_file_write.yy b/scripts/node_byte_file_write/node_byte_file_write.yy new file mode 100644 index 000000000..a7e0bb614 --- /dev/null +++ b/scripts/node_byte_file_write/node_byte_file_write.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_byte_file_write", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "IO", + "path": "folders/nodes/data/IO.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_cache/node_cache.gml b/scripts/node_cache/node_cache.gml index c622c41fc..6ecaf3f95 100644 --- a/scripts/node_cache/node_cache.gml +++ b/scripts/node_cache/node_cache.gml @@ -2,9 +2,9 @@ function Node_Cache(_x, _y, _group = noone) : __Node_Cache(_x, _y, _group) const name = "Cache"; use_cache = CACHE_USE.auto; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - outputs[| 0] = nodeValue("Cache surface", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, 0); + outputs[| 0] = nodeValue("Cache surface", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); input_display_list = [ ["Surfaces", true], 0, diff --git a/scripts/node_cache_array/node_cache_array.gml b/scripts/node_cache_array/node_cache_array.gml index b8e17e4b4..8de2410ad 100644 --- a/scripts/node_cache_array/node_cache_array.gml +++ b/scripts/node_cache_array/node_cache_array.gml @@ -2,7 +2,7 @@ function Node_Cache_Array(_x, _y, _group = noone) : __Node_Cache(_x, _y, _group) name = "Cache Array"; use_cache = CACHE_USE.manual; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Start frame", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, -1, "Frame index to start caching, set to -1 to start at the first frame."); diff --git a/scripts/node_camera/node_camera.gml b/scripts/node_camera/node_camera.gml index 206cc6310..0cf72edd6 100644 --- a/scripts/node_camera/node_camera.gml +++ b/scripts/node_camera/node_camera.gml @@ -2,7 +2,7 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co name = "Camera"; preview_alpha = 0.5; - inputs[| 0] = nodeValue("Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); onSurfaceSize = function() { return surface_get_dimension(getInputData(0)); }; inputs[| 1] = nodeValue("Focus area", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0, 0, 16, 16, AREA_SHAPE.rectangle ]) @@ -46,7 +46,7 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co var index = ds_list_size(inputs); var _s = floor((index - input_fix_len) / data_length); - inputs[| index + 0] = nodeValue($"Element {_s}", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| index + 0] = nodeValue($"Element {_s}", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| index + 1] = nodeValue($"Parallax {_s}", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ] ) .setDisplay(VALUE_DISPLAY.vector) @@ -103,7 +103,7 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co static getPreviewValues = function() { return getInputData(0); } - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region if(array_length(current_data) == 0) return; var _out = outputs[| 0].getValue(); @@ -114,7 +114,7 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co var _cam_y = _y + (_area[1] - _area[3] * _zoom) * _s; draw_surface_ext_safe(_out, _cam_x, _cam_y, _s * _zoom, _s * _zoom); - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); draw_set_color(COLORS._main_accent); var x0 = _cam_x; diff --git a/scripts/node_canvas/node_canvas.gml b/scripts/node_canvas/node_canvas.gml index b7374ba12..7e710ec25 100644 --- a/scripts/node_canvas/node_canvas.gml +++ b/scripts/node_canvas/node_canvas.gml @@ -708,7 +708,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor draw_set_alpha(1); } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region if(instance_exists(o_dialog_color_picker)) return; mouse_cur_x = round((_mx - _x) / _s - 0.5); diff --git a/scripts/node_cellular/node_cellular.gml b/scripts/node_cellular/node_cellular.gml index 8dcee0c69..33dc1b4f6 100644 --- a/scripts/node_cellular/node_cellular.gml +++ b/scripts/node_cellular/node_cellular.gml @@ -50,8 +50,8 @@ function Node_Cellular(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static step = function() { #region diff --git a/scripts/node_checker/node_checker.gml b/scripts/node_checker/node_checker.gml index e66f4fdd6..e32e7e9eb 100644 --- a/scripts/node_checker/node_checker.gml +++ b/scripts/node_checker/node_checker.gml @@ -38,13 +38,13 @@ function Node_Checker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var pos = getInputData(3); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; - inputs[| 3].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 2].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); + inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); } static step = function() { #region diff --git a/scripts/node_chromatic_aberration/node_chromatic_aberration.gml b/scripts/node_chromatic_aberration/node_chromatic_aberration.gml index 7c39fca39..ebd46a507 100644 --- a/scripts/node_chromatic_aberration/node_chromatic_aberration.gml +++ b/scripts/node_chromatic_aberration/node_chromatic_aberration.gml @@ -1,7 +1,7 @@ function Node_Chromatic_Aberration(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Chromatic Aberration"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Center", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -30,12 +30,12 @@ function Node_Chromatic_Aberration(_x, _y, _group = noone) : Node_Processor(_x, attribute_surface_depth(); attribute_interpolation(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var pos = getInputData(1); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } #endregion static step = function() { #region diff --git a/scripts/node_collection/node_collection.gml b/scripts/node_collection/node_collection.gml index 3b9f1306c..1ef9ddabb 100644 --- a/scripts/node_collection/node_collection.gml +++ b/scripts/node_collection/node_collection.gml @@ -262,7 +262,7 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc h = max(min_h, preH, _hi, _ho); } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region if(!draw_input_overlay) return; for(var i = custom_input_index; i < ds_list_size(inputs); i++) { @@ -270,7 +270,7 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc var _show = _in.from.getInputData(6); if(!_show) continue; - var _hov = _in.drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + var _hov = _in.drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); if(_hov != undefined) active &= !_hov; } } #endregion diff --git a/scripts/node_color_adjust/node_color_adjust.gml b/scripts/node_color_adjust/node_color_adjust.gml index 3e92264ff..7069499ab 100644 --- a/scripts/node_color_adjust/node_color_adjust.gml +++ b/scripts/node_color_adjust/node_color_adjust.gml @@ -1,7 +1,7 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Color Adjust"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Brightness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }) @@ -29,7 +29,7 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro .setDisplay(VALUE_DISPLAY.slider) .setMappable(23); - inputs[| 8] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 8] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 9] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider) diff --git a/scripts/node_color_remove/node_color_remove.gml b/scripts/node_color_remove/node_color_remove.gml index a6ff4ad15..06ef9dd05 100644 --- a/scripts/node_color_remove/node_color_remove.gml +++ b/scripts/node_color_remove/node_color_remove.gml @@ -1,7 +1,7 @@ function Node_Color_Remove(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Remove Color"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, DEF_PALETTE ) .setDisplay(VALUE_DISPLAY.palette); @@ -10,7 +10,7 @@ function Node_Color_Remove(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro .setDisplay(VALUE_DISPLAY.slider) .setMappable(10); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_color_replace/node_color_replace.gml b/scripts/node_color_replace/node_color_replace.gml index 75aa597ba..0d715ca4d 100644 --- a/scripts/node_color_replace/node_color_replace.gml +++ b/scripts/node_color_replace/node_color_replace.gml @@ -1,7 +1,7 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Replace Palette"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Palette from", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, DEF_PALETTE, "Color to be replaced.") .setDisplay(VALUE_DISPLAY.palette); @@ -17,7 +17,7 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 6] = nodeValue("Hard replace", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true, "Completely override pixel with new color instead of blending between it."); - inputs[| 7] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 7] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 8] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_colorize/node_colorize.gml b/scripts/node_colorize/node_colorize.gml index 6263271e9..6cd77c8ee 100644 --- a/scripts/node_colorize/node_colorize.gml +++ b/scripts/node_colorize/node_colorize.gml @@ -1,7 +1,7 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Colorize"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject([ c_black, c_white ]) ) .setMappable(11); @@ -10,7 +10,7 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, .01 ] }) .setMappable(10); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -44,8 +44,8 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - inputs[| 12].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, surface_get_dimension(getSingleValue(0))); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + inputs[| 12].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, surface_get_dimension(getSingleValue(0))); } #endregion static step = function() { #region diff --git a/scripts/node_colors_replace/node_colors_replace.gml b/scripts/node_colors_replace/node_colors_replace.gml index 8af34fcb5..b59f174f0 100644 --- a/scripts/node_colors_replace/node_colors_replace.gml +++ b/scripts/node_colors_replace/node_colors_replace.gml @@ -1,7 +1,7 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Replace Colors"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Palette from", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, []) .setDisplay(VALUE_DISPLAY.palette); @@ -12,7 +12,7 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g inputs[| 3] = nodeValue("Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 5] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_combine_hsv/node_combine_hsv.gml b/scripts/node_combine_hsv/node_combine_hsv.gml index 54e9d1356..8eda95a9a 100644 --- a/scripts/node_combine_hsv/node_combine_hsv.gml +++ b/scripts/node_combine_hsv/node_combine_hsv.gml @@ -6,9 +6,9 @@ function Node_Combine_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou uniform_s = shader_get_sampler_index(shader, "samS"); uniform_v = shader_get_sampler_index(shader, "samV"); - inputs[| 0] = nodeValue("Hue", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); - inputs[| 1] = nodeValue("Saturation", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); - inputs[| 2] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Hue", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue("Saturation", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 2] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_composite/node_composite.gml b/scripts/node_composite/node_composite.gml index aace0644a..4a297d564 100644 --- a/scripts/node_composite/node_composite.gml +++ b/scripts/node_composite/node_composite.gml @@ -26,10 +26,9 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); attribute_interpolation(); - setIsDynamicInput(4); - attributes.layer_visible = []; attributes.layer_selectable = []; + properties_expand = []; hold_visibility = true; hold_select = true; @@ -39,18 +38,24 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var amo = (ds_list_size(inputs) - input_fix_len) / data_length - 1; if(array_length(current_data) != ds_list_size(inputs)) return 0; - var lh = 32; - var _h = 8 + max(1, amo) * (lh + 4) + 8; + var lh = 28; + var eh = 36; + + properties_expand = array_verify(properties_expand, amo); + var _h = 4; + for(var i = 0; i < amo; i++) + _h += lh + 4 + properties_expand[i] * eh; layer_renderer.h = _h; + draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _y, _w, _h, COLORS.node_composite_bg_blend, 1); var _vis = attributes.layer_visible; var _sel = attributes.layer_selectable; - var ly = _y + 8; - var ssh = lh - 6; + var ly = _y + 4; + var ssh = lh - 4; var hoverIndex = noone; - draw_set_color(COLORS.node_composite_separator); - draw_line(_x + 16, ly, _x + _w - 16, ly); + + var _cy = ly; layer_remove = -1; for(var i = 0; i < amo; i++) { @@ -60,7 +65,41 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var _pos = current_data[index + 1]; var _bx = _x + _w - 24; - var _cy = ly + i * (lh + 4); + var aa = (ind != layer_dragging || layer_dragging == noone)? 1 : 0.5; + var vis = _vis[ind]; + var sel = _sel[ind]; + + var _exp = properties_expand[i]; + var _lh = lh + 4 + _exp * eh; + + if(_exp) { #region extended + var _px = _x + 4; + var _py = _cy + lh + 4; + var _pw = _w - 8; + var _ph = eh - 4; + + var _pww = (_pw - 8) / 2 - 8; + var _pwh = _ph - 8; + + draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, _px, _py, _pw, _ph, COLORS.node_composite_bg_blend, 1); + + var jun = inputs[| index + 4]; + var bl_wid = jun.editWidget; + + var _param = new widgetParam(_px + 4, _py + 4, _pww, _pwh, jun.showValue(), jun.display_data, _m, layer_renderer.rx, layer_renderer.ry); + bl_wid.setFocusHover(_focus, _hover); + + bl_wid.font = f_p2; + bl_wid.drawParam(_param); + bl_wid.font = f_p0; + + var jun = inputs[| index + 5]; + var bl_wid = jun.editWidget; + + var _param = new widgetParam(_px + 4 + _pww + 8, _py + 4, _pww, _pwh, jun.showValue(), jun.display_data, _m, layer_renderer.rx, layer_renderer.ry); + bl_wid.setFocusHover(_focus, _hover); + bl_wid.drawParam(_param); + } #endregion if(point_in_circle(_m[0], _m[1], _bx, _cy + lh / 2, 16)) { draw_sprite_ui_uniform(THEME.icon_delete, 3, _bx, _cy + lh / 2, 1, COLORS._main_value_negative); @@ -72,15 +111,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) if(!is_surface(_surf)) continue; - var aa = (ind != layer_dragging || layer_dragging == noone)? 1 : 0.5; - var vis = _vis[ind]; - var sel = _sel[ind]; - var hover = point_in_rectangle(_m[0], _m[1], _x, _cy, _x + _w, _cy + lh); - - draw_set_color(COLORS.node_composite_separator); - draw_line(_x + 16, _cy + lh + 2, _x + _w - 16, _cy + lh + 2); - - var _bx = _x + 24 * 2 + 8; + var _bx = _x + 16 + 24; if(point_in_circle(_m[0], _m[1], _bx, _cy + lh / 2, 12)) { draw_sprite_ui_uniform(THEME.junc_visible, vis, _bx, _cy + lh / 2, 1, c_white); @@ -94,7 +125,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } else draw_sprite_ui_uniform(THEME.junc_visible, vis, _bx, _cy + lh / 2, 1, COLORS._main_icon, 0.5 + 0.5 * vis); - _bx += 24 + 8; + _bx += 12 + 1 + 12; if(point_in_circle(_m[0], _m[1], _bx, _cy + lh / 2, 12)) { draw_sprite_ui_uniform(THEME.cursor_select, sel, _bx, _cy + lh / 2, 1, c_white); @@ -106,21 +137,21 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } else draw_sprite_ui_uniform(THEME.cursor_select, sel, _bx, _cy + lh / 2, 1, COLORS._main_icon, 0.5 + 0.5 * sel); - draw_set_color(COLORS.node_composite_bg); - var _sx0 = _bx + 24; + var hover = point_in_rectangle(_m[0], _m[1], _bx + 12 + 6, _cy, _x + _w - 48, _cy + lh - 1); + + var _sx0 = _bx + 12 + 6; var _sx1 = _sx0 + ssh; var _sy0 = _cy + 3; var _sy1 = _sy0 + ssh; - draw_rectangle(_sx0, _sy0, _sx1, _sy1, true); var _ssw = surface_get_width_safe(_surf); var _ssh = surface_get_height_safe(_surf); var _sss = min(ssh / _ssw, ssh / _ssh); draw_surface_ext_safe(_surf, _sx0, _sy0, _sss, _sss, 0, c_white, 1); - draw_set_text(f_p1, fa_left, fa_center, hover? COLORS._main_text : COLORS._main_text); + draw_set_text(f_p1, fa_left, fa_center, hover? COLORS._main_text_accent : COLORS._main_text); draw_set_alpha(aa); - draw_text(_sx1 + 12, _cy + lh / 2, inputs[| index].name); + draw_text(_sx1 + 12, _cy + lh / 2 + 2, inputs[| index].name); draw_set_alpha(1); if(_hover && point_in_rectangle(_m[0], _m[1], _x, _cy, _x + _w, _cy + lh)) { @@ -134,16 +165,23 @@ 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_s, 3, _bx, _cy + lh / 2, 1, c_white); + var _bx = _x + 8 + 8; + var cc = COLORS._main_icon; + if(point_in_rectangle(_m[0], _m[1], _bx - 8, _cy + 4, _bx + 8, _cy + lh - 4)) { + cc = c_white; - if(mouse_press(mb_left, _focus)) - layer_dragging = ind; - } else - draw_sprite_ui_uniform(THEME.hamburger_s, 3, _bx, _cy + lh / 2, 1, COLORS._main_icon); + if(mouse_press(mb_left, _focus)) + properties_expand[i] = !properties_expand[i]; } + + draw_sprite_ui_uniform(THEME.arrow, _exp? 3 : 0, _bx, _cy + lh / 2 + _exp * 2, 1, cc); + + if(hover && layer_dragging == noone || layer_dragging == ind) { + if(mouse_press(mb_left, _focus)) + layer_dragging = ind; + } + + _cy += _lh; } if(layer_dragging != noone && mouse_release(mb_left)) { @@ -184,10 +222,13 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ["Layers", false], layer_renderer, ["Surfaces", true], ]; + input_display_list_len = array_length(input_display_list); + setIsDynamicInput(6); function deleteLayer(index) { #region var idx = input_fix_len + index * data_length; + for( var i = 0; i < data_length; i++ ) { ds_list_delete(inputs, idx); array_remove(input_display_list, idx + i); @@ -207,36 +248,37 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var index = ds_list_size(inputs); var _s = floor((index - input_fix_len) / data_length); - inputs[| index + 0] = nodeValue(_s? ("Surface " + string(_s)) : "Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); - inputs[| index + 0].surface_index = index; + inputs[| index + 0] = nodeValue(_s? ($"Surface {_s}") : "Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| index + 0].hover_effect = 0; - inputs[| index + 1] = nodeValue("Position " + string(_s), self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] ) + inputs[| index + 1] = nodeValue($"Position {_s}", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] ) .setDisplay(VALUE_DISPLAY.vector) .setUnitRef(function(index) { return [ overlay_w, overlay_h ]; }); - inputs[| index + 1].surface_index = index; - inputs[| index + 2] = nodeValue("Rotation " + string(_s), self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) + inputs[| index + 2] = nodeValue($"Rotation {_s}", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) .setDisplay(VALUE_DISPLAY.rotation); - inputs[| index + 2].surface_index = index; - inputs[| index + 3] = nodeValue("Scale " + string(_s), self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ] ) + inputs[| index + 3] = nodeValue($"Scale {_s}", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ] ) .setDisplay(VALUE_DISPLAY.vector); - inputs[| index + 3].surface_index = index; - array_push(input_display_list, index + 0); - array_push(input_display_list, index + 1); - array_push(input_display_list, index + 2); - array_push(input_display_list, index + 3); + inputs[| index + 4] = nodeValue($"Blend {_s}", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) + .setDisplay(VALUE_DISPLAY.enum_scroll, BLEND_TYPES ); + + inputs[| index + 5] = nodeValue($"Opacity {_s}", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) + .setDisplay(VALUE_DISPLAY.slider); + + for( var i = 0; i < data_length; i++ ) { + array_push(input_display_list, index + i); + inputs[| index + i].surface_index = index; + } while(_s >= array_length(attributes.layer_visible)) array_push(attributes.layer_visible, true); + while(_s >= array_length(attributes.layer_selectable)) array_push(attributes.layer_selectable, true); - } #endregion - if(!LOADING && !APPENDING) createNewInput(); - - //function getInput() { return inputs[| ds_list_size(inputs) - data_length]; } + + } if(!LOADING && !APPENDING) createNewInput(); #endregion outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); @@ -248,11 +290,11 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) surf_dragging = -1; input_dragging = -1; - drag_type = 0; - dragging_sx = 0; - dragging_sy = 0; - dragging_mx = 0; - dragging_my = 0; + drag_type = 0; + dragging_sx = 0; + dragging_sy = 0; + dragging_mx = 0; + dragging_my = 0; rot_anc_x = 0; rot_anc_y = 0; @@ -264,11 +306,11 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) surface_selecting = noone; - static getInputAmount = function() { #region - return input_fix_len + (ds_list_size(inputs) - input_fix_len) / data_length; - } #endregion + static getInputAmount = function() { INLINE return input_fix_len + (ds_list_size(inputs) - input_fix_len) / data_length; } static getInputIndex = function(index) { #region + INLINE + if(index < input_fix_len) return index; return input_fix_len + (index - input_fix_len) * data_length; } #endregion @@ -458,7 +500,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) createNewInput(); } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var pad = getInputData(0); var ww = overlay_w; var hh = overlay_h; @@ -740,56 +782,64 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) if(_output_index == 1) return atlas_data; if(_output_index == 0 && _array_index == 0) atlas_data = []; - if(array_length(_data) < 4) return _outSurf; + if(array_length(_data) <= input_fix_len) return _outSurf; var _pad = _data[0]; var _dim_type = _data[1]; var _dim = _data[2]; var base = _data[3]; var cDep = attrDepth(); - var ww = 0, hh = 0; - switch(_dim_type) { - case COMPOSE_OUTPUT_SCALING.first : - ww = surface_get_width_safe(base); - hh = surface_get_height_safe(base); - break; - case COMPOSE_OUTPUT_SCALING.largest : - for(var i = input_fix_len; i < array_length(_data) - data_length; i += data_length) { - var _s = _data[i]; - ww = max(ww, surface_get_width_safe(_s)); - hh = max(hh, surface_get_height_safe(_s)); - } - break; - case COMPOSE_OUTPUT_SCALING.constant : - ww = _dim[0]; - hh = _dim[1]; - break; - } - ww += _pad[0] + _pad[2]; - hh += _pad[1] + _pad[3]; + #region dimension + var ww = 0, hh = 0; - overlay_w = ww; - overlay_h = hh; + switch(_dim_type) { + case COMPOSE_OUTPUT_SCALING.first : + ww = surface_get_width_safe(base); + hh = surface_get_height_safe(base); + break; + case COMPOSE_OUTPUT_SCALING.largest : + for(var i = input_fix_len; i < array_length(_data) - data_length; i += data_length) { + var _s = _data[i]; + ww = max(ww, surface_get_width_safe(_s)); + hh = max(hh, surface_get_height_safe(_s)); + } + break; + case COMPOSE_OUTPUT_SCALING.constant : + ww = _dim[0]; + hh = _dim[1]; + break; + } + ww += _pad[0] + _pad[2]; + hh += _pad[1] + _pad[3]; + + overlay_w = ww; + overlay_h = hh; + #endregion for(var i = 0; i < 3; i++) { temp_surface[i] = surface_verify(temp_surface[i], ww, hh, cDep); surface_clear(temp_surface[i]); } - var res_index = 0, bg = 0; - var imageAmo = (ds_list_size(inputs) - input_fix_len) / data_length; - var _vis = attributes.layer_visible; - var _bg = 0; + var res_index = 0; + var imageAmo = (ds_list_size(inputs) - input_fix_len) / data_length; + var _vis = attributes.layer_visible; + var bg = 0; + var _bg = 0; + + blend_temp_surface = temp_surface[2]; for(var i = 0; i < imageAmo; i++) { var vis = _vis[i]; if(!vis) continue; - var startDataIndex = input_fix_len + i * data_length; - var _s = _data[startDataIndex + 0]; - var _pos = _data[startDataIndex + 1]; - var _rot = _data[startDataIndex + 2]; - var _sca = _data[startDataIndex + 3]; + var _ind = input_fix_len + i * data_length; + var _s = _data[_ind + 0]; + var _pos = _data[_ind + 1]; + var _rot = _data[_ind + 2]; + var _sca = _data[_ind + 3]; + var _bld = _data[_ind + 4]; + var _alp = _data[_ind + 5]; if(!_s || is_array(_s)) continue; @@ -806,8 +856,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) array_push(atlas_data, new SurfaceAtlas(_s, _d0[0], _d0[1], _rot, _sca[0], _sca[1])); surface_set_shader(temp_surface[_bg], sh_sample, true, BLEND.over); - blend_temp_surface = temp_surface[2]; - draw_surface_blend_ext(temp_surface[!_bg], _s, _d0[0], _d0[1], _sca[0], _sca[1], _rot); + draw_surface_blend_ext(temp_surface[!_bg], _s, _d0[0], _d0[1], _sca[0], _sca[1], _rot, c_white, _alp, _bld, true); surface_reset_shader(); _bg = !_bg; diff --git a/scripts/node_convolution/node_convolution.gml b/scripts/node_convolution/node_convolution.gml index e898aedd8..8d2e59f53 100644 --- a/scripts/node_convolution/node_convolution.gml +++ b/scripts/node_convolution/node_convolution.gml @@ -1,7 +1,7 @@ function Node_Convolution(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Convolution"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Kernel", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, array_create(9)) .setDisplay(VALUE_DISPLAY.matrix, { size: 3 }); @@ -9,7 +9,7 @@ function Node_Convolution(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 2] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_corner/node_corner.gml b/scripts/node_corner/node_corner.gml index a157166f1..d91ddb911 100644 --- a/scripts/node_corner/node_corner.gml +++ b/scripts/node_corner/node_corner.gml @@ -1,12 +1,12 @@ function Node_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Round corner"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 2) .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 1] }); - inputs[| 2] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 2] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 3] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_crop/node_crop.gml b/scripts/node_crop/node_crop.gml index b3c795722..641ee353c 100644 --- a/scripts/node_crop/node_crop.gml +++ b/scripts/node_crop/node_crop.gml @@ -2,7 +2,7 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons name = "Crop"; preview_alpha = 0.5; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Crop", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.padding) @@ -28,7 +28,7 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons static getPreviewValues = function() { return getInputData(0); } - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny, params) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, params) { #region var _inSurf = getSingleValue(0); var _spRaw = getSingleValue(1); var _splice; diff --git a/scripts/node_crop_content/node_crop_content.gml b/scripts/node_crop_content/node_crop_content.gml index 24f87e053..680a103a7 100644 --- a/scripts/node_crop_content/node_crop_content.gml +++ b/scripts/node_crop_content/node_crop_content.gml @@ -1,7 +1,7 @@ function Node_Crop_Content(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Crop Content"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); diff --git a/scripts/node_csv_file_read/node_csv_file_read.gml b/scripts/node_csv_file_read/node_csv_file_read.gml index 77db6f56e..13c665353 100644 --- a/scripts/node_csv_file_read/node_csv_file_read.gml +++ b/scripts/node_csv_file_read/node_csv_file_read.gml @@ -41,9 +41,14 @@ function Node_CSV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const outputs[| 1] = nodeValue("Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.path, "") .setVisible(true, true); - content = ""; + content = ""; path_current = ""; + edit_time = 0; + attributes.file_checker = true; + array_push(attributeEditors, [ "File Watcher", function() { return attributes.file_checker; }, + new checkBox(function() { attributes.file_checker = !attributes.file_checker; }) ]); + first_update = false; on_drop_file = function(path) { #region @@ -55,8 +60,8 @@ function Node_CSV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const return false; } #endregion - function updatePaths(path) { #region - path = try_get_path(path); + function updatePaths(path = path_current) { #region + path = path_get(path); if(path == -1) return false; var ext = string_lower(filename_ext(path)); @@ -84,8 +89,10 @@ function Node_CSV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const if(path_current == "") first_update = true; + path_current = path; - + edit_time = max(edit_time, file_get_modify_s(path_current)); + return true; } #endregion @@ -93,15 +100,21 @@ function Node_CSV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; static onInspector1Update = function() { #region - var path = getInputData(0); - if(path == "") return; - updatePaths(path); - update(); + updatePaths(path_get(getInputData(0))); + triggerRender(); + } #endregion + + static step = function() { #region + if(attributes.file_checker && path_current != "") { + if(file_get_modify_s(path_current) > edit_time) { + updatePaths(); + triggerRender(); + } + } } #endregion static update = function(frame = CURRENT_FRAME) { #region - var path = getInputData(0); - if(path == "") return; + var path = path_get(getInputData(0)); if(path_current != path) updatePaths(path); outputs[| 0].setValue(content); diff --git a/scripts/node_curve/node_curve.gml b/scripts/node_curve/node_curve.gml index 776e5d63c..a3e7edfe5 100644 --- a/scripts/node_curve/node_curve.gml +++ b/scripts/node_curve/node_curve.gml @@ -1,7 +1,7 @@ function Node_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Curve"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Brightness", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); @@ -11,7 +11,7 @@ function Node_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 4] = nodeValue("Blue", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); - inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index 8801ea5d2..4748939bb 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -1017,14 +1017,14 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { static drawJunctions = function(_x, _y, _mx, _my, _s) { #region if(!active) return; var hover = noone; - var amo = input_display_list == -1? ds_list_size(inputs) : array_length(input_display_list); - var jun; + var amo = input_display_list == -1? ds_list_size(inputs) : array_length(input_display_list); gpu_set_texfilter(true); for(var i = 0; i < amo; i++) { var ind = getInputJunctionIndex(i); if(ind == noone) continue; - jun = ds_list_get(inputs, ind, noone); + + var jun = ds_list_get(inputs, ind, noone); if(jun == noone || is_undefined(jun)) continue; if(jun.drawJunction(_s, _mx, _my)) @@ -1032,17 +1032,21 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { } for(var i = 0; i < ds_list_size(outputs); i++) { - jun = outputs[| i]; + var jun = outputs[| i]; if(jun.drawJunction(_s, _mx, _my)) hover = jun; } - if(hasInspector1Update() && inspectInput1.drawJunction(_s, _mx, _my)) - hover = inspectInput1; + if(hasInspector1Update()) { + if(inspectInput1.drawJunction(_s, _mx, _my)) + hover = inspectInput1; + } - if(hasInspector2Update() && inspectInput2.drawJunction(_s, _mx, _my)) - hover = inspectInput2; + if(hasInspector2Update()) { + if(inspectInput2.drawJunction(_s, _mx, _my)) + hover = inspectInput2; + } if(attributes.show_update_trigger) { if(updatedInTrigger.drawJunction(_s, _mx, _my)) hover = updatedInTrigger; @@ -1408,9 +1412,9 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { if(display_parameter.highlight) drawBranch(); } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {} + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) {} - static drawPreviewToolOverlay = function(active, _mx, _my, _panel) { return false; } + static drawPreviewToolOverlay = function(hover, active, _mx, _my, _panel) { return false; } static drawAnimationTimeline = function(_w, _h, _s) {} diff --git a/scripts/node_de_corner/node_de_corner.gml b/scripts/node_de_corner/node_de_corner.gml index 4556146e5..51fcde946 100644 --- a/scripts/node_de_corner/node_de_corner.gml +++ b/scripts/node_de_corner/node_de_corner.gml @@ -1,7 +1,7 @@ function Node_De_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "De-Corner"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; diff --git a/scripts/node_de_stray/node_de_stray.gml b/scripts/node_de_stray/node_de_stray.gml index 223efb7f8..1d6731b90 100644 --- a/scripts/node_de_stray/node_de_stray.gml +++ b/scripts/node_de_stray/node_de_stray.gml @@ -1,7 +1,7 @@ function Node_De_Stray(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "De-Stray"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Tolerance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_diffuse/node_diffuse.gml b/scripts/node_diffuse/node_diffuse.gml index 91cb16c72..385df014c 100644 --- a/scripts/node_diffuse/node_diffuse.gml +++ b/scripts/node_diffuse/node_diffuse.gml @@ -38,7 +38,7 @@ function Node_Diffuse(_x, _y, _group = noone) : Node(_x, _y, _group) constructor bufferStore.velocity = buffer_create(1, buffer_grow, 4); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _surf = getInputData(0); var _sw = surface_get_width_safe(_surf); var _sh = surface_get_height_safe(_surf); diff --git a/scripts/node_dilate/node_dilate.gml b/scripts/node_dilate/node_dilate.gml index 4aa2cdc89..983ad76fa 100644 --- a/scripts/node_dilate/node_dilate.gml +++ b/scripts/node_dilate/node_dilate.gml @@ -1,7 +1,7 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Dilate"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Center", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -17,7 +17,7 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 4] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]); - inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -51,14 +51,14 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co attribute_oversample(); attribute_interpolation(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var pos = getInputData(1); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 3].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny, 0, 1, THEME.anchor_scale_hori); + inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 3].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny, 0, 1, THEME.anchor_scale_hori); } #endregion static step = function() { #region diff --git a/scripts/node_displace/node_displace.gml b/scripts/node_displace/node_displace.gml index 1c335d9d7..dbea6c327 100644 --- a/scripts/node_displace/node_displace.gml +++ b/scripts/node_displace/node_displace.gml @@ -1,7 +1,7 @@ function Node_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Displace"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Displace map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); @@ -27,7 +27,7 @@ If set, then strength value control how many times the effect applies on itself. inputs[| 7] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]); - inputs[| 8] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 8] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 9] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_display_image/node_display_image.gml b/scripts/node_display_image/node_display_image.gml index 97f217839..357f72511 100644 --- a/scripts/node_display_image/node_display_image.gml +++ b/scripts/node_display_image/node_display_image.gml @@ -78,7 +78,7 @@ function Node_Display_Image(_x, _y, _group = noone) : Node(_x, _y, _group) const } #endregion function updatePaths(path) { #region - path = try_get_path(path); + path = path_get(path); if(path == -1) return false; var ext = string_lower(filename_ext(path)); diff --git a/scripts/node_dither/node_dither.gml b/scripts/node_dither/node_dither.gml index 58dcee0b8..36afec855 100644 --- a/scripts/node_dither/node_dither.gml +++ b/scripts/node_dither/node_dither.gml @@ -16,7 +16,7 @@ function Node_Dither(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co name = "Dither"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Palette", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, DEF_PALETTE ) .setDisplay(VALUE_DISPLAY.palette); @@ -24,18 +24,18 @@ function Node_Dither(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 2] = nodeValue("Pattern", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "2 x 2 Bayer", "4 x 4 Bayer", "8 x 8 Bayer", "Custom" ]); - inputs[| 3] = nodeValue("Dither map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0) + inputs[| 3] = nodeValue("Dither map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) .setVisible(false); inputs[| 4] = nodeValue("Contrast", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 5, 0.1] }); - inputs[| 5] = nodeValue("Contrast map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 5] = nodeValue("Contrast map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 6] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_button, [ "Color", "Alpha" ]); - inputs[| 7] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 7] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 8] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -105,11 +105,11 @@ function Node_Dither(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co } break; } - + if(_mode == 0) { shader_set_f("contrast", _con); - shader_set_i("useConMap", _conMap != DEF_SURFACE); - shader_set_surface("conMap", surface_get_texture(_conMap)); + shader_set_i("useConMap", is_surface(_conMap)); + shader_set_surface("conMap", _conMap); shader_set_f("palette", paletteToArray(_pal)); shader_set_i("keys", array_length(_pal)); diff --git a/scripts/node_edge_detect/node_edge_detect.gml b/scripts/node_edge_detect/node_edge_detect.gml index 878dcd64d..120c00564 100644 --- a/scripts/node_edge_detect/node_edge_detect.gml +++ b/scripts/node_edge_detect/node_edge_detect.gml @@ -6,7 +6,7 @@ function Node_Edge_Detect(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou uniform_filter = shader_get_uniform(shader, "filter"); uniform_sam = shader_get_uniform(shader, "sampleMode"); - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Algorithm", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, ["Sobel", "Prewitt", "Laplacian", "Neighbor max diff"] ); @@ -14,7 +14,7 @@ function Node_Edge_Detect(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 2] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_edge_shade/node_edge_shade.gml b/scripts/node_edge_shade/node_edge_shade.gml index a87bebbfe..cefecb743 100644 --- a/scripts/node_edge_shade/node_edge_shade.gml +++ b/scripts/node_edge_shade/node_edge_shade.gml @@ -1,7 +1,7 @@ function Node_Edge_Shade(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Edge Shade"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; diff --git a/scripts/node_erode/node_erode.gml b/scripts/node_erode/node_erode.gml index 6da1d03d1..29e041119 100644 --- a/scripts/node_erode/node_erode.gml +++ b/scripts/node_erode/node_erode.gml @@ -1,7 +1,7 @@ function Node_Erode(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Erode"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) .setMappable(10); @@ -10,7 +10,7 @@ function Node_Erode(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 3] = nodeValue("Use alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); - inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 5] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_export/node_export.gml b/scripts/node_export/node_export.gml index be22091c2..1fc109a3c 100644 --- a/scripts/node_export/node_export.gml +++ b/scripts/node_export/node_export.gml @@ -52,7 +52,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor _format_still = { filter: "Portable Network Graphics (.png)|*.png|Joint Photographic Experts Group (.jpg)|*.jpg" }; _format_anim = { filter: "Graphics Interchange Format (.gif)|*.gif|Animated WebP (.webp)|*.webp" }; - inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Paths", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") .setDisplay(VALUE_DISPLAY.path_save, _format_still) diff --git a/scripts/node_find_pixel/node_find_pixel.gml b/scripts/node_find_pixel/node_find_pixel.gml index 3fefd0ac2..e641bad39 100644 --- a/scripts/node_find_pixel/node_find_pixel.gml +++ b/scripts/node_find_pixel/node_find_pixel.gml @@ -2,16 +2,16 @@ function Node_Find_Pixel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group name = "Find pixel"; w = 96; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Search color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); inputs[| 2] = nodeValue("Tolerance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue("Find all", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) + inputs[| 3] = nodeValue("Find all", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 4] = nodeValue("Include alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) + inputs[| 4] = nodeValue("Include alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); inputs[| 5] = nodeValue("Alpha tolerance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_flip/node_flip.gml b/scripts/node_flip/node_flip.gml index 6ad800322..676582561 100644 --- a/scripts/node_flip/node_flip.gml +++ b/scripts/node_flip/node_flip.gml @@ -4,7 +4,7 @@ function Node_Flip(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons shader = sh_flip; uniform_axs = shader_get_uniform(shader, "axis"); - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_button, ["x", "y"]); diff --git a/scripts/node_flood_fill/node_flood_fill.gml b/scripts/node_flood_fill/node_flood_fill.gml index 2b930eb56..a9d7f303a 100644 --- a/scripts/node_flood_fill/node_flood_fill.gml +++ b/scripts/node_flood_fill/node_flood_fill.gml @@ -1,10 +1,10 @@ function Node_Flood_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Flood Fill"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0) + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) .rejectArray(); - inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 2] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -43,8 +43,8 @@ function Node_Flood_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group triggerRender(); })]); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static step = function() { #region diff --git a/scripts/node_fluid_add/node_fluid_add.gml b/scripts/node_fluid_add/node_fluid_add.gml index a9176c84b..d88be6e16 100644 --- a/scripts/node_fluid_add/node_fluid_add.gml +++ b/scripts/node_fluid_add/node_fluid_add.gml @@ -40,7 +40,7 @@ function Node_Fluid_Add(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) con temp_surface = [ surface_create(1, 1) ]; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _mat = getInputData(1); var _pos = getInputData(2); @@ -53,7 +53,7 @@ function Node_Fluid_Add(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) con draw_surface_ext_safe(_mat, mx, my, _s, _s, 0, c_white, 0.5); } - inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } #endregion static update = function(frame = CURRENT_FRAME) { diff --git a/scripts/node_fluid_add_collider/node_fluid_add_collider.gml b/scripts/node_fluid_add_collider/node_fluid_add_collider.gml index 5543d5363..abfe3d02a 100644 --- a/scripts/node_fluid_add_collider/node_fluid_add_collider.gml +++ b/scripts/node_fluid_add_collider/node_fluid_add_collider.gml @@ -20,7 +20,7 @@ function Node_Fluid_Add_Collider(_x, _y, _group = noone) : Node_Fluid(_x, _y, _g outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.sdomain, noone); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _mat = getInputData(1); var _area = getInputData(2); @@ -33,7 +33,7 @@ function Node_Fluid_Add_Collider(_x, _y, _group = noone) : Node_Fluid(_x, _y, _g draw_surface_stretched_ext(_mat, x0, y0, x1 - x0, y1 - y0, c_white, 0.5); } - inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static update = function(frame = CURRENT_FRAME) { diff --git a/scripts/node_fluid_apply_velocity/node_fluid_apply_velocity.gml b/scripts/node_fluid_apply_velocity/node_fluid_apply_velocity.gml index 6a9e7c795..ae79fdd1c 100644 --- a/scripts/node_fluid_apply_velocity/node_fluid_apply_velocity.gml +++ b/scripts/node_fluid_apply_velocity/node_fluid_apply_velocity.gml @@ -25,7 +25,7 @@ function Node_Fluid_Apply_Velocity(_x, _y, _group = noone) : Node_Fluid(_x, _y, outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.sdomain, noone); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _mat = getInputData(1); var _pos = getInputData(2); @@ -38,7 +38,7 @@ function Node_Fluid_Apply_Velocity(_x, _y, _group = noone) : Node_Fluid(_x, _y, draw_surface_ext_safe(_mat, mx, my, _s, _s, 0, c_white, 0.5); } - inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static update = function(frame = CURRENT_FRAME) { diff --git a/scripts/node_fluid_repulse/node_fluid_repulse.gml b/scripts/node_fluid_repulse/node_fluid_repulse.gml index 4f08d34b0..c2e67b785 100644 --- a/scripts/node_fluid_repulse/node_fluid_repulse.gml +++ b/scripts/node_fluid_repulse/node_fluid_repulse.gml @@ -26,7 +26,7 @@ function Node_Fluid_Repulse(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.sdomain, noone); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _pos = getInputData(1); var _rad = getInputData(2); var px = _x + _pos[0] * _s; @@ -35,8 +35,8 @@ function Node_Fluid_Repulse(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) draw_set_color(COLORS._main_accent); draw_circle_prec(px, py, _rad * _s, true); - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 2].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny, 0, 1, THEME.anchor_scale_hori); + inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny, 0, 1, THEME.anchor_scale_hori); } static update = function(frame = CURRENT_FRAME) { diff --git a/scripts/node_fluid_turbulence/node_fluid_turbulence.gml b/scripts/node_fluid_turbulence/node_fluid_turbulence.gml index e24531d5b..ae8fe323d 100644 --- a/scripts/node_fluid_turbulence/node_fluid_turbulence.gml +++ b/scripts/node_fluid_turbulence/node_fluid_turbulence.gml @@ -29,8 +29,8 @@ function Node_Fluid_Turbulence(_x, _y, _group = noone) : Node_Fluid(_x, _y, _gro outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.sdomain, noone); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static update = function(frame = CURRENT_FRAME) { diff --git a/scripts/node_fluid_vortex/node_fluid_vortex.gml b/scripts/node_fluid_vortex/node_fluid_vortex.gml index c30eab726..034a6165a 100644 --- a/scripts/node_fluid_vortex/node_fluid_vortex.gml +++ b/scripts/node_fluid_vortex/node_fluid_vortex.gml @@ -30,7 +30,7 @@ function Node_Fluid_Vortex(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.sdomain, noone); outputs[| 1] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _pos = getInputData(1); var _rad = getInputData(2); var px = _x + _pos[0] * _s; @@ -39,8 +39,8 @@ function Node_Fluid_Vortex(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) draw_set_color(COLORS._main_accent); draw_circle_prec(px, py, _rad * _s, true); - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 2].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny, 0, 1, THEME.anchor_scale_hori); + inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny, 0, 1, THEME.anchor_scale_hori); } static update = function(frame = CURRENT_FRAME) { diff --git a/scripts/node_gamma_map/node_gamma_map.gml b/scripts/node_gamma_map/node_gamma_map.gml index ac63a6ab7..896298a5b 100644 --- a/scripts/node_gamma_map/node_gamma_map.gml +++ b/scripts/node_gamma_map/node_gamma_map.gml @@ -1,7 +1,7 @@ function Node_Gamma_Map(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Gamma Map"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Invert", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); diff --git a/scripts/node_global/node_global.gml b/scripts/node_global/node_global.gml index 2cd3ec53f..8f8e55b11 100644 --- a/scripts/node_global/node_global.gml +++ b/scripts/node_global/node_global.gml @@ -1,4 +1,4 @@ -function variable_editor(nodeVal) constructor { #region +function variable_editor(nodeVal) constructor { value = nodeVal; val_type = [ VALUE_TYPE.integer, VALUE_TYPE.float, VALUE_TYPE.boolean, VALUE_TYPE.color, VALUE_TYPE.gradient, VALUE_TYPE.path, VALUE_TYPE.curve, VALUE_TYPE.text ]; @@ -61,19 +61,17 @@ function variable_editor(nodeVal) constructor { #region slider_range = [ 0, 1 ]; slider_step = 0.01; - static refreshInput = function() { + static refreshInput = function() { #region value.setType(val_type[type_index]); value.name = value_name; if(_type_index != type_index || _disp_index != disp_index) { - _type_index = type_index; - _disp_index = disp_index; - switch(value.type) { case VALUE_TYPE.integer : case VALUE_TYPE.float : switch(sc_disp.data_list[disp_index]) { case "Vector2" : + case "Range" : case "Vector range" : case "Slider range" : case "Rotation range" : @@ -121,6 +119,9 @@ function variable_editor(nodeVal) constructor { #region } } + _type_index = type_index; + _disp_index = disp_index; + switch(sc_disp.data_list[disp_index]) { case "Default" : value.setDisplay(VALUE_DISPLAY._default); break; case "Range" : value.setDisplay(VALUE_DISPLAY.range); break; @@ -145,9 +146,9 @@ function variable_editor(nodeVal) constructor { #region case "Export" : value.setDisplay(VALUE_DISPLAY.path_save, { filter: "" }); break; case "Font" : value.setDisplay(VALUE_DISPLAY.path_font); break; } - } + } #endregion - static draw = function(_x, _y, _w, _m, _focus, _hover) { + static draw = function(_x, _y, _w, _m, _focus, _hover) { #region var _h = 0; switch(sc_disp.data_list[disp_index]) { @@ -176,8 +177,8 @@ function variable_editor(nodeVal) constructor { #region } return _h; - } -} #endregion + } #endregion +} function Node_Global(_x = 0, _y = 0) : __Node_Base(_x, _y) constructor { name = "GLOBAL"; diff --git a/scripts/node_glow/node_glow.gml b/scripts/node_glow/node_glow.gml index 95758652e..f15af435f 100644 --- a/scripts/node_glow/node_glow.gml +++ b/scripts/node_glow/node_glow.gml @@ -1,7 +1,7 @@ function Node_Glow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Glow"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Border", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 4, 1] }); @@ -14,7 +14,7 @@ function Node_Glow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 4] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); - inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_gradient/node_gradient.gml b/scripts/node_gradient/node_gradient.gml index da16468f6..bb22fdfc8 100644 --- a/scripts/node_gradient/node_gradient.gml +++ b/scripts/node_gradient/node_gradient.gml @@ -68,9 +68,9 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var a = inputs[| 6].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; - var a = inputs[| 16].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + var a = inputs[| 6].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[| 16].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; } #endregion static step = function() { #region diff --git a/scripts/node_gradient_palette/node_gradient_palette.gml b/scripts/node_gradient_palette/node_gradient_palette.gml index 419317a8f..fc8eac570 100644 --- a/scripts/node_gradient_palette/node_gradient_palette.gml +++ b/scripts/node_gradient_palette/node_gradient_palette.gml @@ -12,7 +12,7 @@ function Node_Gradient_Palette(_x, _y, _group = noone) : Node_Processor(_x, _y, .setVisible(true, true); inputs[| 2].array_depth = 1; - inputs[| 3] = nodeValue("Blending", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) + inputs[| 3] = nodeValue("Color Space", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) .setDisplay(VALUE_DISPLAY.enum_button, [ "Hard", "RGB", "HSV", "OKLAB", "sRGB" ]); outputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.output, VALUE_TYPE.gradient, new gradientObject(c_white) ) diff --git a/scripts/node_gradient_points/node_gradient_points.gml b/scripts/node_gradient_points/node_gradient_points.gml index 79a323070..d3848c536 100644 --- a/scripts/node_gradient_points/node_gradient_points.gml +++ b/scripts/node_gradient_points/node_gradient_points.gml @@ -54,11 +54,11 @@ function Node_Gradient_Points(_x, _y, _group = noone) : Node_Processor(_x, _y, _ attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - if(inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; - if(inputs[| 3].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; - if(inputs[| 5].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; - if(inputs[| 7].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + if(inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[| 5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[| 7].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; } #endregion static step = function() { #region diff --git a/scripts/node_grey_alpha/node_grey_alpha.gml b/scripts/node_grey_alpha/node_grey_alpha.gml index bf43b0950..e1b2c8f48 100644 --- a/scripts/node_grey_alpha/node_grey_alpha.gml +++ b/scripts/node_grey_alpha/node_grey_alpha.gml @@ -1,7 +1,7 @@ function Node_Grey_Alpha(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Grey to Alpha"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Replace color", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true, "Replace output with solid color."); diff --git a/scripts/node_greyscale/node_greyscale.gml b/scripts/node_greyscale/node_greyscale.gml index a80f8ccdb..841d930f4 100644 --- a/scripts/node_greyscale/node_greyscale.gml +++ b/scripts/node_greyscale/node_greyscale.gml @@ -1,7 +1,7 @@ function Node_Greyscale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Greyscale"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Brightness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01] }) @@ -11,7 +11,7 @@ function Node_Greyscale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 4, 0.01] }) .setMappable(10); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_grid/node_grid.gml b/scripts/node_grid/node_grid.gml index 16d0c044c..50111e0c1 100644 --- a/scripts/node_grid/node_grid.gml +++ b/scripts/node_grid/node_grid.gml @@ -25,7 +25,7 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 6] = nodeValue("Gap color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); - inputs[| 7] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 7] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 8] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-0.5, 0.5, 0.01] }) @@ -79,9 +79,9 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var a = inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; - var a = inputs[| 21].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + var a = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[| 21].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; } static step = function() { #region diff --git a/scripts/node_grid_hex/node_grid_hex.gml b/scripts/node_grid_hex/node_grid_hex.gml index 6ec6194df..6ec211a6d 100644 --- a/scripts/node_grid_hex/node_grid_hex.gml +++ b/scripts/node_grid_hex/node_grid_hex.gml @@ -73,9 +73,9 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var a = inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; - var a = inputs[| 18].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + var a = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[| 18].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; } static step = function() { #region diff --git a/scripts/node_grid_noise/node_grid_noise.gml b/scripts/node_grid_noise/node_grid_noise.gml index 83b2c24fa..4cdef4edc 100644 --- a/scripts/node_grid_noise/node_grid_noise.gml +++ b/scripts/node_grid_noise/node_grid_noise.gml @@ -16,7 +16,7 @@ function Node_Grid_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 4] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-0.5, 0.5, 0.01] }); - inputs[| 5] = nodeValue("Texture sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 5] = nodeValue("Texture sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 6] = nodeValue("Shift axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_button, ["x", "y"]); @@ -43,8 +43,8 @@ function Node_Grid_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_grid_tri/node_grid_tri.gml b/scripts/node_grid_tri/node_grid_tri.gml index e033abc46..fd003d0ed 100644 --- a/scripts/node_grid_tri/node_grid_tri.gml +++ b/scripts/node_grid_tri/node_grid_tri.gml @@ -25,7 +25,7 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 6] = nodeValue("Gap color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); - inputs[| 7] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 7] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 8] = nodeValue("Render type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Height map", "Texture grid", "Texture sample"]); @@ -73,9 +73,9 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var a = inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; - var a = inputs[| 18].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + var a = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[| 18].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; } static step = function() { #region diff --git a/scripts/node_group_input/node_group_input.gml b/scripts/node_group_input/node_group_input.gml index 699bde0e5..75a996b00 100644 --- a/scripts/node_group_input/node_group_input.gml +++ b/scripts/node_group_input/node_group_input.gml @@ -145,9 +145,9 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 2].setValue(ind); } - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region if(inParent.isArray()) return; - return inParent.drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + return inParent.drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } #endregion static onValueUpdate = function(index = 0) { #region diff --git a/scripts/node_herringbone_tile/node_herringbone_tile.gml b/scripts/node_herringbone_tile/node_herringbone_tile.gml index ee25c500e..bc563f1cf 100644 --- a/scripts/node_herringbone_tile/node_herringbone_tile.gml +++ b/scripts/node_herringbone_tile/node_herringbone_tile.gml @@ -75,9 +75,9 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var a = inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; - var a = inputs[| 19].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + var a = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[| 19].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; } static step = function() { #region diff --git a/scripts/node_hlsl/node_hlsl.gml b/scripts/node_hlsl/node_hlsl.gml index 21f53c0a9..d5987e152 100644 --- a/scripts/node_hlsl/node_hlsl.gml +++ b/scripts/node_hlsl/node_hlsl.gml @@ -261,8 +261,7 @@ struct PixelShaderOutput { } if(!LOADING && !APPENDING) refreshShader(); #endregion static onValueUpdate = function(index) { #region - var _refresh = index == 0 || index == 1 || - (index >= input_fix_len && (index - input_fix_len) % data_length != 2); + var _refresh = index == 0 || index == 1 || (index >= input_fix_len && (index - input_fix_len) % data_length != 2); if(_refresh) { refreshShader(); diff --git a/scripts/node_hsv_channel/node_hsv_channel.gml b/scripts/node_hsv_channel/node_hsv_channel.gml index 79986fbe4..a0b637e92 100644 --- a/scripts/node_hsv_channel/node_hsv_channel.gml +++ b/scripts/node_hsv_channel/node_hsv_channel.gml @@ -1,7 +1,7 @@ function Node_HSV_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "HSV Extract"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Hue", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 1] = nodeValue("Saturation", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_image/node_image.gml b/scripts/node_image/node_image.gml index f10bf3144..ce4dd446d 100644 --- a/scripts/node_image/node_image.gml +++ b/scripts/node_image/node_image.gml @@ -37,11 +37,14 @@ function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { attribute_surface_depth(); - spr = []; - path_current = []; - first_update = false; - edit_time = []; + spr = []; + path_current = []; + edit_time = 0; + + attributes.file_checker = true; + array_push(attributeEditors, [ "File Watcher", function() { return attributes.file_checker; }, + new checkBox(function() { attributes.file_checker = !attributes.file_checker; }) ]); on_drop_file = function(path) { #region inputs[| 0].setValue(path); @@ -55,10 +58,8 @@ function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { } #endregion function createSprite(path) { #region - path = try_get_path(path); if(path == -1) return noone; - var spr; var ext = string_lower(filename_ext(path)); var _name = filename_name_only(path); @@ -68,31 +69,32 @@ function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { case ".jpeg": case ".gif": setDisplayName(_name); - spr = sprite_add(path, 1, false, false, 0, 0); + var spr = sprite_add(path, 1, false, false, 0, 0); if(spr == -1) { noti_warning($"Image node: File not a valid image."); break; } - edit_time = file_get_modify_s(path); + edit_time = max(edit_time, file_get_modify_s(path)); return spr; } return noone; } #endregion - function updatePaths(path, index = 0) { #region + function updatePaths(path = path_current) { #region if(array_empty(path_current)) first_update = true; - path_current = path; for( var i = 0, n = array_length(spr); i < n; i++ ) sprite_delete(spr[i]); - + spr = []; + if(!is_array(path)) path = [ path ]; - spr = []; for( var i = 0, n = array_length(path); i < n; i++ ) { + path_current[i] = path_get(path[i]); + var s = createSprite(path[i]); if(s) array_push(spr, s); } @@ -102,37 +104,32 @@ function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; static onInspector1Update = function() { #region - var path = getInputData(0); - if(path == "") return; - - update(); + updatePaths(path_get(getInputData(0))); + triggerRender(); + } #endregion + + static step = function() { #region + if(attributes.file_checker) + for( var i = 0, n = array_length(path_current); i < n; i++ ) { + if(file_get_modify_s(path_current[i]) > edit_time) { + updatePaths(); + triggerRender(); + break; + } + } } #endregion static update = function(frame = CURRENT_FRAME) { #region - var path = getInputData(0); + var path = path_get(getInputData(0)); var pad = getInputData(1); outputs[| 1].setValue(path); - if(path_current != path) + if(!array_equals(path_current, path)) updatePaths(path); - else { - //if(!is_array(path)) path = [ path ]; - //var _upd = false; - - //for( var i = 0, n = array_length(path); i < n; i++ ) { - // var _et = array_safe_get(edit_time, i); - // var _ms = file_get_modify_s(path[i]); - - // if(_ms > edit_time[i]) _upd = true; - // edit_time[i] = _ms; - //} - - //if(_upd) updatePaths(path); - } if(array_empty(spr)) return; - var _arr = is_array(spr) && array_length(spr) > 1; + var _arr = array_length(spr) > 1; var _outsurf = outputs[| 0].getValue(); if(!is_array(_outsurf)) _outsurf = [ _outsurf ]; diff --git a/scripts/node_image_animated/node_image_animated.gml b/scripts/node_image_animated/node_image_animated.gml index 91997cc5c..2a011ea53 100644 --- a/scripts/node_image_animated/node_image_animated.gml +++ b/scripts/node_image_animated/node_image_animated.gml @@ -78,7 +78,12 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons attribute_surface_depth(); - path_loaded = []; + path_current = []; + edit_time = 0; + + attributes.file_checker = true; + array_push(attributeEditors, [ "File Watcher", function() { return attributes.file_checker; }, + new checkBox(function() { attributes.file_checker = !attributes.file_checker; }) ]); on_drop_file = function(path) { #region if(directory_exists(path)) { @@ -100,7 +105,7 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons return false; } #endregion - function updatePaths(paths) { #region + function updatePaths(paths = path_current) { #region if(!is_array(paths) && ds_exists(paths, ds_type_list)) paths = ds_list_to_array(paths); @@ -108,17 +113,18 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons if(spr[i] && sprite_exists(spr[i])) sprite_delete(spr[i]); } - spr = []; - path_loaded = array_create(array_length(paths)); + spr = []; + path_current = []; for( var i = 0, n = array_length(paths); i < n; i++ ) { - path_loaded[i] = paths[i]; - var path = try_get_path(paths[i]); - if(path == -1) continue; - setDisplayName(filename_name_only(path)); + var _path = path_get(paths[i]); + if(_path == -1) continue; - var ext = string_lower(filename_ext(path)); + array_push(path_current, _path); + setDisplayName(filename_name_only(_path)); + + var ext = string_lower(filename_ext(_path)); switch(ext) { case ".png" : @@ -131,6 +137,7 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons return false; } + edit_time = max(edit_time, file_get_modify_s(_path)); array_push(spr, _spr); break; } @@ -143,10 +150,8 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; static onInspector1Update = function() { #region - var path = getInputData(0); - if(path == "") return; - updatePaths(path); - update(); + updatePaths(path_get(getInputData(0))); + triggerRender(); } #endregion static step = function() { #region @@ -156,13 +161,22 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons inputs[| 2].setVisible(!_cus); inputs[| 3].setVisible(!_cus && !str); inputs[| 4].setVisible(!_cus && !str); + + if(attributes.file_checker) + for( var i = 0, n = array_length(path_current); i < n; i++ ) { + if(file_get_modify_s(path_current[i]) > edit_time) { + updatePaths(); + triggerRender(); + break; + } + } } #endregion static update = function(frame = CURRENT_FRAME) { #region - var path = getInputData(0); - if(path == "") return; - if(is_array(path) && !array_equals(path, path_loaded)) + var path = path_get(getInputData(0)); + if(!array_equals(path_current, path)) updatePaths(path); + if(array_length(spr) == 0) return; var _pad = getInputData(1); diff --git a/scripts/node_image_gif/node_image_gif.gml b/scripts/node_image_gif/node_image_gif.gml index 8fafc94a9..541b4c9bb 100644 --- a/scripts/node_image_gif/node_image_gif.gml +++ b/scripts/node_image_gif/node_image_gif.gml @@ -72,7 +72,12 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct spr_builder = noone; surfaces = []; - on_drop_file = function(path) { + edit_time = 0; + attributes.file_checker = true; + array_push(attributeEditors, [ "File Watcher", function() { return attributes.file_checker; }, + new checkBox(function() { attributes.file_checker = !attributes.file_checker; }) ]); + + on_drop_file = function(path) { #region inputs[| 0].setValue(path); if(updatePaths(path)) { @@ -81,20 +86,16 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct } return false; - } + } #endregion insp1UpdateTooltip = __txt("Refresh"); insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; static onInspector1Update = function() { #region - var path = getInputData(0); - if(path == "") return; - updatePaths(path); - update(); + updatePaths(path_get(getInputData(0))); } #endregion - function updatePaths(path) { #region - path = try_get_path(path); + function updatePaths(path = path_current) { #region if(path == -1) return false; var ext = string_lower(filename_ext(path)); @@ -115,8 +116,9 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct if(path_current == "") first_update = true; - path_current = path; - + path_current = path; + edit_time = max(edit_time, file_get_modify_s(path_current)); + return true; } #endregion @@ -133,19 +135,27 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct if(loading == 2 && spr_builder != noone && spr_builder.building()) { surfaces = []; spr = spr_builder._spr; - print($"{spr}: {sprite_get_width(spr)}, {sprite_get_height(spr)}"); + //print($"{spr}: {sprite_get_width(spr)}, {sprite_get_height(spr)}"); triggerRender(); loading = 0; gc_collect(); } + + if(attributes.file_checker && path_current != "") { + if(file_get_modify_s(path_current) > edit_time) { + updatePaths(); + triggerRender(); + } + + } } #endregion static update = function(frame = CURRENT_FRAME) { #region - var path = getInputData(0); - if(path == "") return; + var path = path_get(getInputData(0)); if(path_current != path) updatePaths(path); + if(!spr || !sprite_exists(spr)) return; var ww = sprite_get_width(spr); diff --git a/scripts/node_image_sequence/node_image_sequence.gml b/scripts/node_image_sequence/node_image_sequence.gml index 2e9c49f53..c58c7bb68 100644 --- a/scripts/node_image_sequence/node_image_sequence.gml +++ b/scripts/node_image_sequence/node_image_sequence.gml @@ -61,7 +61,12 @@ function Node_Image_Sequence(_x, _y, _group = noone) : Node(_x, _y, _group) cons attribute_surface_depth(); - path_loaded = []; + path_current = []; + edit_time = 0; + + attributes.file_checker = true; + array_push(attributeEditors, [ "File Watcher", function() { return attributes.file_checker; }, + new checkBox(function() { attributes.file_checker = !attributes.file_checker; }) ]); on_drop_file = function(path) { #region if(directory_exists(path)) { @@ -87,25 +92,25 @@ function Node_Image_Sequence(_x, _y, _group = noone) : Node(_x, _y, _group) cons insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; static onInspector1Update = function() { #region - var path = getInputData(0); - if(path == "") return; - updatePaths(path); - update(); + updatePaths(path_get(getInputData(0))); + triggerRender(); } #endregion - function updatePaths(paths) { #region + function updatePaths(paths = path_current) { #region for(var i = 0; i < array_length(spr); i++) { if(spr[i] && sprite_exists(spr[i])) sprite_delete(spr[i]); } - spr = []; - path_loaded = array_create(array_length(paths)); + spr = []; + path_current = []; for( var i = 0, n = array_length(paths); i < n; i++ ) { - path_loaded[i] = paths[i]; - var path = try_get_path(paths[i]); + var path = path_get(paths[i]); if(path == -1) continue; + + array_push(path_current, path); + var ext = string_lower(filename_ext(path)); setDisplayName(filename_name_only(path)); @@ -120,6 +125,7 @@ function Node_Image_Sequence(_x, _y, _group = noone) : Node(_x, _y, _group) cons return false; } + edit_time = max(edit_time, file_get_modify_s(path)); array_push(spr, _spr); break; } @@ -130,11 +136,21 @@ function Node_Image_Sequence(_x, _y, _group = noone) : Node(_x, _y, _group) cons return true; } #endregion + static step = function() { #region + if(attributes.file_checker) + for( var i = 0, n = array_length(path_current); i < n; i++ ) { + if(file_get_modify_s(path_current[i]) > edit_time) { + updatePaths(); + triggerRender(); + break; + } + } + } #endregion + static update = function(frame = CURRENT_FRAME) { #region - var path = getInputData(0); - if(path == "") return; - if(!is_array(path)) path = [ path ]; - if(!array_equals(path, path_loaded)) + var path = path_get(getInputData(0)); + + if(!array_equals(path_current, path)) updatePaths(path); var pad = getInputData(1); diff --git a/scripts/node_image_sheet/node_image_sheet.gml b/scripts/node_image_sheet/node_image_sheet.gml index 6125091c3..7bce34938 100644 --- a/scripts/node_image_sheet/node_image_sheet.gml +++ b/scripts/node_image_sheet/node_image_sheet.gml @@ -1,7 +1,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Splice Spritesheet"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Sprite size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 32, 32 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -128,7 +128,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru else return [ _y, _x ]; } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _inSurf = getInputData(0); if(!is_surface(_inSurf)) return; diff --git a/scripts/node_interpret_number/node_interpret_number.gml b/scripts/node_interpret_number/node_interpret_number.gml index b69715baa..3555e0ba5 100644 --- a/scripts/node_interpret_number/node_interpret_number.gml +++ b/scripts/node_interpret_number/node_interpret_number.gml @@ -31,8 +31,8 @@ function Node_Interpret_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var a = inputs[| 5].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getDimension()); active &= !a; + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + var a = inputs[| 5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getDimension()); active &= !a; } static step = function() { diff --git a/scripts/node_invert/node_invert.gml b/scripts/node_invert/node_invert.gml index bfd6b4a87..8d1ddee65 100644 --- a/scripts/node_invert/node_invert.gml +++ b/scripts/node_invert/node_invert.gml @@ -1,9 +1,9 @@ function Node_Invert(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Invert"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 2] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_json_file_read/node_json_file_read.gml b/scripts/node_json_file_read/node_json_file_read.gml index abf2b822d..9db607fdd 100644 --- a/scripts/node_json_file_read/node_json_file_read.gml +++ b/scripts/node_json_file_read/node_json_file_read.gml @@ -1,4 +1,4 @@ -function Node_create_Json_File_Read(_x, _y, _group = noone) { +function Node_create_Json_File_Read(_x, _y, _group = noone) { #region var path = ""; if(!LOADING && !APPENDING && !CLONING) { path = get_open_filename("JSON file|*.json", ""); @@ -11,9 +11,9 @@ function Node_create_Json_File_Read(_x, _y, _group = noone) { node.doUpdate(); return node; -} +} #endregion -function Node_create_Json_File_Read_path(_x, _y, path) { +function Node_create_Json_File_Read_path(_x, _y, path) { #region if(!file_exists_empty(path)) return noone; var node = new Node_Json_File_Read(_x, _y, PANEL_GRAPH.getCurrentContext()); @@ -21,15 +21,14 @@ function Node_create_Json_File_Read_path(_x, _y, path) { node.doUpdate(); return node; -} +} #endregion function Node_Json_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { - name = "JSON File In"; + name = "JSON File In"; color = COLORS.node_blend_input; w = 128; - inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") .setDisplay(VALUE_DISPLAY.path_load, { filter: "JSON file|*.json" }) .rejectArray(); @@ -42,7 +41,7 @@ function Node_Json_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons setIsDynamicInput(1); output_fix_len = ds_list_size(outputs); - static createNewInput = function() { + static createNewInput = function() { #region var index = ds_list_size(inputs); inputs[| index] = nodeValue("Key", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "" ) .setVisible(true, true); @@ -50,34 +49,36 @@ function Node_Json_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons var index = ds_list_size(outputs); outputs[| index] = nodeValue("Values", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0 ) .setVisible(true, true); - } - if(!LOADING && !APPENDING) createNewInput(); + } if(!LOADING && !APPENDING) createNewInput(); #endregion - content = {}; + content = {}; path_current = ""; + edit_time = 0; + + attributes.file_checker = true; + array_push(attributeEditors, [ "File Watcher", function() { return attributes.file_checker; }, + new checkBox(function() { attributes.file_checker = !attributes.file_checker; }) ]); first_update = false; - on_drop_file = function(path) { + on_drop_file = function(path) { #region if(updatePaths(path)) { doUpdate(); return true; } return false; - } + } #endregion insp1UpdateTooltip = __txt("Refresh"); insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; - static onInspector1Update = function() { - var path = getInputData(0); - if(path == "") return; - updatePaths(path); - update(); - } + static onInspector1Update = function() { #region + updatePaths(path_get(getInputData(0))); + triggerRender(); + } #endregion - static refreshDynamicInput = function() { + static refreshDynamicInput = function() { #region var _in = ds_list_create(); var _ot = ds_list_create(); @@ -109,20 +110,19 @@ function Node_Json_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons outputs = _ot; createNewInput(); - } + } #endregion - static onValueUpdate = function(index = 0) { + static onValueUpdate = function(index = 0) { #region if(index < input_fix_len) return; if(LOADING || APPENDING) return; refreshDynamicInput(); - } + } #endregion - function updatePaths(path) { - path = try_get_path(path); + function updatePaths(path) { #region if(path == -1) return false; - var ext = string_lower(filename_ext(path)); + var ext = string_lower(filename_ext(path)); var _name = string_replace(filename_name(path), filename_ext(path), ""); if(ext != ".json") return false; @@ -134,13 +134,22 @@ function Node_Json_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons if(path_current == "") first_update = true; path_current = path; + edit_time = max(edit_time, file_get_modify_s(path_current)); return true; - } + } #endregion - static update = function(frame = CURRENT_FRAME) { - var path = getInputData(0); - if(path == "") return; + static step = function() { #region + if(attributes.file_checker && path_current != "") { + if(file_get_modify_s(path_current) > edit_time) { + updatePaths(); + triggerRender(); + } + } + } #endregion + + static update = function(frame = CURRENT_FRAME) { #region + var path = path_get(getInputData(0)); if(path_current != path) updatePaths(path); outputs[| 1].setValue(content); @@ -178,17 +187,15 @@ function Node_Json_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons else break; } } - } + } #endregion - static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); var str = filename_name(path_current); var bbox = drawGetBbox(xx, yy, _s); var ss = string_scale(str, bbox.w, bbox.h); draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0); - } + } #endregion - static doApplyDeserialize = function() { - refreshDynamicInput(); - } + static doApplyDeserialize = function() { refreshDynamicInput(); } } \ No newline at end of file diff --git a/scripts/node_kuwahara/node_kuwahara.gml b/scripts/node_kuwahara/node_kuwahara.gml index da41346bc..76455d33c 100644 --- a/scripts/node_kuwahara/node_kuwahara.gml +++ b/scripts/node_kuwahara/node_kuwahara.gml @@ -1,7 +1,7 @@ function Node_Kuwahara(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Kuwahara"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; diff --git a/scripts/node_level/node_level.gml b/scripts/node_level/node_level.gml index 4278a4911..529274805 100644 --- a/scripts/node_level/node_level.gml +++ b/scripts/node_level/node_level.gml @@ -1,7 +1,7 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Level"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("White in", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 1]) .setDisplay(VALUE_DISPLAY.slider_range); @@ -18,7 +18,7 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 5] = nodeValue("Alpha in", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 1]) .setDisplay(VALUE_DISPLAY.slider_range); - inputs[| 6] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 6] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 7] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_level_selector/node_level_selector.gml b/scripts/node_level_selector/node_level_selector.gml index 6565bbe00..89b3f4086 100644 --- a/scripts/node_level_selector/node_level_selector.gml +++ b/scripts/node_level_selector/node_level_selector.gml @@ -1,7 +1,7 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Level Selector"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Midpoint", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider) @@ -11,7 +11,7 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g .setDisplay(VALUE_DISPLAY.slider) .setMappable(10); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_line/node_line.gml b/scripts/node_line/node_line.gml index e2f95a03a..89da5ebec 100644 --- a/scripts/node_line/node_line.gml +++ b/scripts/node_line/node_line.gml @@ -86,7 +86,7 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons attribute_surface_depth(); attribute_interpolation(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region draw_set_color(COLORS._main_accent); for( var i = 0, n = array_length(lines); i < n; i++ ) { var points = lines[i]; diff --git a/scripts/node_local_analyze/node_local_analyze.gml b/scripts/node_local_analyze/node_local_analyze.gml index ae901226e..28cb48910 100644 --- a/scripts/node_local_analyze/node_local_analyze.gml +++ b/scripts/node_local_analyze/node_local_analyze.gml @@ -1,7 +1,7 @@ function Node_Local_Analyze(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Local Analyze"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Algorithm", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Average (Blur)", "Maximum", "Minimum" ]); @@ -17,7 +17,7 @@ function Node_Local_Analyze(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr new scrollItem("Circle", s_node_shape, 1), new scrollItem("Diamond", s_node_shape_misc, 0) ]); - inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_lua_compute/node_lua_compute.gml b/scripts/node_lua_compute/node_lua_compute.gml index 789238217..282557125 100644 --- a/scripts/node_lua_compute/node_lua_compute.gml +++ b/scripts/node_lua_compute/node_lua_compute.gml @@ -17,7 +17,7 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru outputs[| 0] = nodeValue("Execution thread", self, JUNCTION_CONNECT.output, VALUE_TYPE.node, noone ); - outputs[| 1] = nodeValue("Return value", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, 0); + outputs[| 1] = nodeValue("Return value", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); argumentRenderer(global.lua_arguments); @@ -181,7 +181,5 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru static onDestroy = function() { #region lua_state_destroy(lua_state); - if(error_notification != noone) - noti_remove(error_notification); } #endregion } \ No newline at end of file diff --git a/scripts/node_lua_global/node_lua_global.gml b/scripts/node_lua_global/node_lua_global.gml index 3d76df16c..19632c446 100644 --- a/scripts/node_lua_global/node_lua_global.gml +++ b/scripts/node_lua_global/node_lua_global.gml @@ -38,7 +38,5 @@ function Node_Lua_Global(_x, _y, _group = noone) : Node(_x, _y, _group) construc static onDestroy = function() { #region lua_state_destroy(lua_state); - if(error_notification != noone) - noti_remove(error_notification); } #endregion } \ No newline at end of file diff --git a/scripts/node_lua_surface/node_lua_surface.gml b/scripts/node_lua_surface/node_lua_surface.gml index 9c294fdcf..10306ed57 100644 --- a/scripts/node_lua_surface/node_lua_surface.gml +++ b/scripts/node_lua_surface/node_lua_surface.gml @@ -181,7 +181,5 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru static onDestroy = function() { #region lua_state_destroy(lua_state); - if(error_notification != noone) - noti_remove(error_notification); } #endregion } \ No newline at end of file diff --git a/scripts/node_mesh_create_path/node_mesh_create_path.gml b/scripts/node_mesh_create_path/node_mesh_create_path.gml index 5417026a1..310a17770 100644 --- a/scripts/node_mesh_create_path/node_mesh_create_path.gml +++ b/scripts/node_mesh_create_path/node_mesh_create_path.gml @@ -13,7 +13,7 @@ function Node_Mesh_Create_Path(_x, _y, _group = noone) : Node(_x, _y, _group) co outputs[| 0] = nodeValue("Mesh", self, JUNCTION_CONNECT.output, VALUE_TYPE.mesh, noone); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var mesh = outputs[| 0].getValue(); if(mesh == noone) return; diff --git a/scripts/node_mesh_to_path/node_mesh_to_path.gml b/scripts/node_mesh_to_path/node_mesh_to_path.gml index cf119a23a..a6e371be2 100644 --- a/scripts/node_mesh_to_path/node_mesh_to_path.gml +++ b/scripts/node_mesh_to_path/node_mesh_to_path.gml @@ -12,7 +12,7 @@ function Node_Mesh_To_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constr length = 0; lengths = []; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var mesh = getInputData(0); if(mesh == noone) return; diff --git a/scripts/node_mesh_transform/node_mesh_transform.gml b/scripts/node_mesh_transform/node_mesh_transform.gml index aaaf8d4cb..337d4510e 100644 --- a/scripts/node_mesh_transform/node_mesh_transform.gml +++ b/scripts/node_mesh_transform/node_mesh_transform.gml @@ -20,15 +20,15 @@ function Node_Mesh_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) cons outputs[| 0] = nodeValue("Mesh", self, JUNCTION_CONNECT.output, VALUE_TYPE.mesh, noone); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var pos = getInputData(1); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; - active &= !inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - active &= !inputs[| 2].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); - active &= !inputs[| 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, THEME.anchor ); + active &= !inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + active &= !inputs[| 2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); + active &= !inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, THEME.anchor ); var mesh = outputs[| 0].getValue(); if(mesh == noone) return; diff --git a/scripts/node_mesh_warp/node_mesh_warp.gml b/scripts/node_mesh_warp/node_mesh_warp.gml index 0c2db7b5b..151c64120 100644 --- a/scripts/node_mesh_warp/node_mesh_warp.gml +++ b/scripts/node_mesh_warp/node_mesh_warp.gml @@ -202,7 +202,7 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) anchor_drag_mx = -1; anchor_drag_my = -1; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 8, "Amount of grid subdivision. Higher number means more grid, detail.") .setDisplay(VALUE_DISPLAY.slider, { range: [ 2, 32, 1 ] }); @@ -296,7 +296,7 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) Mesh_setTriangle(); } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var mx = (_mx - _x) / _s; var my = (_my - _y) / _s; @@ -399,7 +399,7 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var _hover = -1; for(var i = control_index; i < ds_list_size(inputs); i++) { - if(inputs[| i].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) + if(inputs[| i].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) _hover = i; } diff --git a/scripts/node_mirror/node_mirror.gml b/scripts/node_mirror/node_mirror.gml index ec3457ba1..deb992dad 100644 --- a/scripts/node_mirror/node_mirror.gml +++ b/scripts/node_mirror/node_mirror.gml @@ -1,7 +1,7 @@ function Node_Mirror(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Mirror"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -24,7 +24,7 @@ function Node_Mirror(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _pos = getInputData(1); var _ang = getInputData(2); var _posx = _pos[0] * _s + _x; @@ -38,8 +38,8 @@ function Node_Mirror(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co draw_set_color(COLORS._main_accent); draw_line(dx0, dy0, dx1, dy1); - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 2].drawOverlay(active, _posx, _posy, _s, _mx, _my, _snx, _sny); + inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 2].drawOverlay(hover, active, _posx, _posy, _s, _mx, _my, _snx, _sny); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region diff --git a/scripts/node_mk_brownian/node_mk_brownian.gml b/scripts/node_mk_brownian/node_mk_brownian.gml index 0eaddb5d2..091f38220 100644 --- a/scripts/node_mk_brownian/node_mk_brownian.gml +++ b/scripts/node_mk_brownian/node_mk_brownian.gml @@ -48,8 +48,8 @@ function Node_MK_Brownian(_x, _y, _group = noone) : Node(_x, _y, _group) constru ["Render", false], 13, 6, 7, ]; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 3].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static getPosition = function(ind, t, _area, _sped, _dire, _dirs, _turn, _dira) { #region diff --git a/scripts/node_mk_cable/node_mk_cable.gml b/scripts/node_mk_cable/node_mk_cable.gml index f4155b192..1ad11a7f8 100644 --- a/scripts/node_mk_cable/node_mk_cable.gml +++ b/scripts/node_mk_cable/node_mk_cable.gml @@ -16,9 +16,9 @@ function Node_MK_Cable(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var _a = inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= _a; - var _a = inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= _a; + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + var _a = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= _a; + var _a = inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= _a; } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_mk_fall/node_mk_fall.gml b/scripts/node_mk_fall/node_mk_fall.gml index 63f746300..fea1a16dc 100644 --- a/scripts/node_mk_fall/node_mk_fall.gml +++ b/scripts/node_mk_fall/node_mk_fall.gml @@ -95,7 +95,7 @@ function Node_MK_Fall(_x, _y, _group = noone) : Node(_x, _y, _group) constructor traj = []; traj_index = 0; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region draw_set_color(COLORS._main_accent); for( var i = 0, n = array_length(traj); i < n; i++ ) { @@ -116,7 +116,7 @@ function Node_MK_Fall(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } } - inputs[| 3].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); if(getInputData(15)) { var _gr = getInputData(16); diff --git a/scripts/node_mk_flag/node_mk_flag.gml b/scripts/node_mk_flag/node_mk_flag.gml index 759bc8501..625a61244 100644 --- a/scripts/node_mk_flag/node_mk_flag.gml +++ b/scripts/node_mk_flag/node_mk_flag.gml @@ -181,8 +181,8 @@ function Node_MK_Flag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c } } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var _a = inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= _a; + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + var _a = inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= _a; //for( var i = 0, n = array_length(links); i < n; i++ ) { // var _l = links[i]; diff --git a/scripts/node_mk_flare/node_mk_flare.gml b/scripts/node_mk_flare/node_mk_flare.gml index 4b5c600c3..ca8aa175a 100644 --- a/scripts/node_mk_flare/node_mk_flare.gml +++ b/scripts/node_mk_flare/node_mk_flare.gml @@ -328,9 +328,9 @@ function Node_MK_Flare(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) dir = 0; dis = 0; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 6].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 6].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } #endregion static getDimension = function(arr = 0) { #region diff --git a/scripts/node_mk_gridballs/node_mk_gridballs.gml b/scripts/node_mk_gridballs/node_mk_gridballs.gml index d0b1617b9..7afee66d5 100644 --- a/scripts/node_mk_gridballs/node_mk_gridballs.gml +++ b/scripts/node_mk_gridballs/node_mk_gridballs.gml @@ -1,7 +1,7 @@ function Node_MK_GridBalls(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "MK GridBalls"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) .setDisplay(VALUE_DISPLAY.vector); @@ -57,8 +57,8 @@ function Node_MK_GridBalls(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro dimension_index = 1; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 8].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + inputs[| 8].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_mk_gridflip/node_mk_gridflip.gml b/scripts/node_mk_gridflip/node_mk_gridflip.gml index a3017dc4f..11e6e8534 100644 --- a/scripts/node_mk_gridflip/node_mk_gridflip.gml +++ b/scripts/node_mk_gridflip/node_mk_gridflip.gml @@ -1,7 +1,7 @@ function Node_MK_GridFlip(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "MK GridFlip"; - inputs[| 0] = nodeValue("Surface front", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface front", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) .setDisplay(VALUE_DISPLAY.vector); @@ -11,7 +11,7 @@ function Node_MK_GridFlip(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, irandom_range(100000, 999999)); - inputs[| 4] = nodeValue("Surface back", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 4] = nodeValue("Surface back", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 5] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.rotation); @@ -44,7 +44,7 @@ function Node_MK_GridFlip(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou dimension_index = 1; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { } diff --git a/scripts/node_mk_rain/node_mk_rain.gml b/scripts/node_mk_rain/node_mk_rain.gml index 655442fe6..292cb77ad 100644 --- a/scripts/node_mk_rain/node_mk_rain.gml +++ b/scripts/node_mk_rain/node_mk_rain.gml @@ -2,7 +2,7 @@ function Node_MK_Rain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c name = "MK Rain"; update_on_frame = true; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 45) .setDisplay(VALUE_DISPLAY.rotation); diff --git a/scripts/node_mk_saber/node_mk_saber.gml b/scripts/node_mk_saber/node_mk_saber.gml index b6be3e337..d108ba585 100644 --- a/scripts/node_mk_saber/node_mk_saber.gml +++ b/scripts/node_mk_saber/node_mk_saber.gml @@ -41,7 +41,7 @@ function Node_MK_Saber(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) temp_surface = [ surface_create(1, 1), surface_create(1, 1), surface_create(1, 1) ]; surface_blur_init(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _p1 = getSingleValue(1); var _p2 = getSingleValue(2); @@ -53,8 +53,8 @@ function Node_MK_Saber(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) draw_set_color(COLORS._main_accent); draw_line(_p1x, _p1y, _p2x, _p2y); - var _a = inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= _a; - var _a = inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= _a; + var _a = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= _a; + var _a = inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= _a; draw_set_text(f_p1, fa_left, fa_bottom, COLORS._main_accent); draw_text(_p1x + ui(4), _p1y - ui(4), "1"); diff --git a/scripts/node_mk_tile/node_mk_tile.gml b/scripts/node_mk_tile/node_mk_tile.gml index 79c6c0675..95491fdd5 100644 --- a/scripts/node_mk_tile/node_mk_tile.gml +++ b/scripts/node_mk_tile/node_mk_tile.gml @@ -136,7 +136,7 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region } #endregion diff --git a/scripts/node_morph_surface/node_morph_surface.gml b/scripts/node_morph_surface/node_morph_surface.gml index 8a333d3e7..c2e4a5b90 100644 --- a/scripts/node_morph_surface/node_morph_surface.gml +++ b/scripts/node_morph_surface/node_morph_surface.gml @@ -1,9 +1,9 @@ function Node_Morph_Surface(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Morph Surface"; - inputs[| 0] = nodeValue("Surface from", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface from", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 1] = nodeValue("Surface to", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 1] = nodeValue("Surface to", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 2] = nodeValue("Morph amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_noise_aniso/node_noise_aniso.gml b/scripts/node_noise_aniso/node_noise_aniso.gml index 0f52cf40c..26aa1315e 100644 --- a/scripts/node_noise_aniso/node_noise_aniso.gml +++ b/scripts/node_noise_aniso/node_noise_aniso.gml @@ -43,8 +43,8 @@ function Node_Noise_Aniso(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 3].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static step = function() { #region diff --git a/scripts/node_noise_hex/node_noise_hex.gml b/scripts/node_noise_hex/node_noise_hex.gml index 68c0d934b..41e04d468 100644 --- a/scripts/node_noise_hex/node_noise_hex.gml +++ b/scripts/node_noise_hex/node_noise_hex.gml @@ -22,7 +22,7 @@ function Node_Noise_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 3] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 8, 8 ] ) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 4] = nodeValue("Texture sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 4] = nodeValue("Texture sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 5] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]); @@ -38,8 +38,8 @@ function Node_Noise_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); attribute_oversample(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_noise_tri/node_noise_tri.gml b/scripts/node_noise_tri/node_noise_tri.gml index 7366414bb..569610606 100644 --- a/scripts/node_noise_tri/node_noise_tri.gml +++ b/scripts/node_noise_tri/node_noise_tri.gml @@ -22,7 +22,7 @@ function Node_Noise_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 3] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 4, 4 ] ) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 4] = nodeValue("Texture sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 4] = nodeValue("Texture sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 5] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]); @@ -38,8 +38,8 @@ function Node_Noise_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); attribute_oversample(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_normal/node_normal.gml b/scripts/node_normal/node_normal.gml index 04e9c3941..90a9ef5cf 100644 --- a/scripts/node_normal/node_normal.gml +++ b/scripts/node_normal/node_normal.gml @@ -5,7 +5,7 @@ function Node_Normal(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co uniform_hei = shader_get_uniform(sh_normal, "height"); uniform_smt = shader_get_uniform(sh_normal, "smooth"); - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1); diff --git a/scripts/node_normal_light/node_normal_light.gml b/scripts/node_normal_light/node_normal_light.gml index b2709c11c..4dab477ce 100644 --- a/scripts/node_normal_light/node_normal_light.gml +++ b/scripts/node_normal_light/node_normal_light.gml @@ -1,9 +1,9 @@ function Node_Normal_Light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Normal Light"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 1] = nodeValue("Normal map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 1] = nodeValue("Normal map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 2] = nodeValue("Normal intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1); @@ -34,13 +34,13 @@ function Node_Normal_Light(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var pos = getInputData(4); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; - inputs[| 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 5].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); + inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 5].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_number/node_number.gml b/scripts/node_number/node_number.gml index c6ad5dec0..c36467dfc 100644 --- a/scripts/node_number/node_number.gml +++ b/scripts/node_number/node_number.gml @@ -40,11 +40,11 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co outputs[| 0] = nodeValue("Number", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var __ax = getInputData(0); if(is_array(__ax)) return; - inputs[| 0].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 0].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } #endregion static step = function() { #region diff --git a/scripts/node_offset/node_offset.gml b/scripts/node_offset/node_offset.gml index 2bd01dc73..e3cd7b566 100644 --- a/scripts/node_offset/node_offset.gml +++ b/scripts/node_offset/node_offset.gml @@ -1,7 +1,7 @@ function Node_Offset(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Offset"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("X Offset", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_onion_skin/node_onion_skin.gml b/scripts/node_onion_skin/node_onion_skin.gml index d5c0e1230..4b6c924c0 100644 --- a/scripts/node_onion_skin/node_onion_skin.gml +++ b/scripts/node_onion_skin/node_onion_skin.gml @@ -3,7 +3,7 @@ function Node_Onion_Skin(_x, _y, _group = noone) : Node(_x, _y, _group) construc use_cache = CACHE_USE.manual; clearCacheOnChange = false; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [-1, 1]) .setDisplay(VALUE_DISPLAY.slider_range, { range: [ -16, 16, 1 ] }); @@ -19,7 +19,7 @@ function Node_Onion_Skin(_x, _y, _group = noone) : Node(_x, _y, _group) construc inputs[| 6] = nodeValue("On top", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true, "Render current frame on top of all frames.") - outputs[| 0] = nodeValue("Output", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, 0); + outputs[| 0] = nodeValue("Output", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); input_display_list = [ ["Surface", false], 0, 1, 5, diff --git a/scripts/node_outline/node_outline.gml b/scripts/node_outline/node_outline.gml index da2b6900d..75b5918d3 100644 --- a/scripts/node_outline/node_outline.gml +++ b/scripts/node_outline/node_outline.gml @@ -1,7 +1,7 @@ function Node_Outline(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Outline"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setMappable(15); @@ -25,7 +25,7 @@ function Node_Outline(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 8] = nodeValue("Start", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "Shift outline inside, outside the shape.") .setMappable(17); - inputs[| 9] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 9] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 10] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_pack_sprites/node_pack_sprites.gml b/scripts/node_pack_sprites/node_pack_sprites.gml index 9ec26402b..a2ed629f6 100644 --- a/scripts/node_pack_sprites/node_pack_sprites.gml +++ b/scripts/node_pack_sprites/node_pack_sprites.gml @@ -4,7 +4,7 @@ function Node_Pack_Sprites(_x, _y, _group = noone) : Node(_x, _y, _group) constr inputs[| 0] = nodeValue("Sprites", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Algorithm", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Skyline", "Shelf", "Top left", "Best fit" ], update_hover: false }) + .setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Skyline", "Shelf", "Top left", "Best fit" ], update_hover: false }); inputs[| 2] = nodeValue("Max width", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 128); @@ -18,7 +18,7 @@ function Node_Pack_Sprites(_x, _y, _group = noone) : Node(_x, _y, _group) constr input_display_list = [ 0, 4, 1, 2, 3 ]; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var rect = outputs[| 1].getValue(); var spac = getInputData(4); diff --git a/scripts/node_padding/node_padding.gml b/scripts/node_padding/node_padding.gml index 2ab1f56a8..55db92f32 100644 --- a/scripts/node_padding/node_padding.gml +++ b/scripts/node_padding/node_padding.gml @@ -2,7 +2,7 @@ function Node_Padding(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c name = "Padding"; dimension_index = -1; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Padding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0, 0, 0]) .setDisplay(VALUE_DISPLAY.padding) diff --git a/scripts/node_palette_extract/node_palette_extract.gml b/scripts/node_palette_extract/node_palette_extract.gml index 2dcb2edfa..ca8152036 100644 --- a/scripts/node_palette_extract/node_palette_extract.gml +++ b/scripts/node_palette_extract/node_palette_extract.gml @@ -2,7 +2,7 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _ name = "Palette Extract"; w = 96; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Max colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 5, "Amount of color in a palette.") .rejectArray(); diff --git a/scripts/node_palette_shift/node_palette_shift.gml b/scripts/node_palette_shift/node_palette_shift.gml index 5b330f460..708d23e49 100644 --- a/scripts/node_palette_shift/node_palette_shift.gml +++ b/scripts/node_palette_shift/node_palette_shift.gml @@ -1,7 +1,7 @@ function Node_Palette_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Palette Shift"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Palette", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, DEF_PALETTE) .setDisplay(VALUE_DISPLAY.palette); @@ -9,7 +9,7 @@ function Node_Palette_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 2] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 1] }); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_path/node_path.gml b/scripts/node_path/node_path.gml index d3b974fc8..81e9fd134 100644 --- a/scripts/node_path/node_path.gml +++ b/scripts/node_path/node_path.gml @@ -100,14 +100,16 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { } } #endregion - static createNewInput = function(_x = 0, _y = 0, _dxx = 0, _dxy = 0, _dyx = 0, _dyy = 0) { #region + static createNewInput = function(_x = 0, _y = 0, _dxx = 0, _dxy = 0, _dyx = 0, _dyy = 0, rec = true) { #region var index = ds_list_size(inputs); inputs[| index] = nodeValue("Anchor", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ _x, _y, _dxx, _dxy, _dyx, _dyy, false ]) .setDisplay(VALUE_DISPLAY.path_anchor); - recordAction(ACTION_TYPE.list_insert, inputs, [ inputs[| index], index, "add path anchor point" ]); - resetDisplayList(); + if(rec) { + recordAction(ACTION_TYPE.list_insert, inputs, [ inputs[| index], index, $"add path anchor point {index}" ]); + resetDisplayList(); + } return inputs[| index]; } #endregion @@ -126,7 +128,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var sample = PREFERENCES.path_resolution; var loop = getInputData(1); var ansize = ds_list_size(inputs) - input_fix_len; @@ -732,9 +734,10 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { draw_sprite_ui_uniform(THEME.cursor_path_remove, 0, _mx + 16, _my + 16); if(mouse_press(mb_left, active)) { - recordAction(ACTION_TYPE.list_delete, inputs, [ inputs[| input_fix_len + anchor_hover], input_fix_len + anchor_hover, "remove path anchor point" ]); - - ds_list_delete(inputs, input_fix_len + anchor_hover); + var _indx = input_fix_len + anchor_hover; + recordAction(ACTION_TYPE.list_delete, inputs, [ inputs[| _indx], _indx, "remove path anchor point" ]); + + ds_list_delete(inputs, _indx); resetDisplayList(); doUpdate(); } @@ -768,8 +771,8 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { draw_sprite_ui_uniform(THEME.cursor_path_add, 0, _mx + 16, _my + 16); if(mouse_press(mb_left, active)) { - var anc = createNewInput(value_snap((_mx - _x) / _s, _snx), value_snap((_my - _y) / _s, _sny)); - UNDO_HOLDING = true; + var ind = ds_list_size(inputs); + var anc = createNewInput(value_snap((_mx - _x) / _s, _snx), value_snap((_my - _y) / _s, _sny), 0, 0, 0, 0, false); if(_line_hover == -1) { drag_point = ds_list_size(inputs) - input_fix_len - 1; @@ -777,8 +780,13 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { ds_list_remove(inputs, anc); ds_list_insert(inputs, input_fix_len + _line_hover + 1, anc); drag_point = _line_hover + 1; + ind = input_fix_len + _line_hover + 1; } + recordAction(ACTION_TYPE.list_insert, inputs, [ inputs[| ind], ind, $"add path anchor point {ind}" ]); + resetDisplayList(); + UNDO_HOLDING = true; + drag_type = -1; drag_point_mx = _mx; drag_point_my = _my; diff --git a/scripts/node_path_anchor/node_path_anchor.gml b/scripts/node_path_anchor/node_path_anchor.gml index febfcd6bb..997298256 100644 --- a/scripts/node_path_anchor/node_path_anchor.gml +++ b/scripts/node_path_anchor/node_path_anchor.gml @@ -22,7 +22,7 @@ function Node_Path_Anchor(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou new NodeTool( "Adjust control point", THEME.path_tools_anchor ), ]; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _pos = getInputData(0); var _cn1 = getInputData(1); var _cn2 = getInputData(2); @@ -40,11 +40,11 @@ function Node_Path_Anchor(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou draw_line(px, py, c1x, c1y); draw_line(px, py, c2x, c2y); - active &= !inputs[| 0].drawOverlay(!isUsingTool(0) && active, _x, _y, _s, _mx, _my, _snx, _sny); - active &= !inputs[| 1].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); + active &= !inputs[| 0].drawOverlay(hover, !isUsingTool(0) && active, _x, _y, _s, _mx, _my, _snx, _sny); + active &= !inputs[| 1].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); if(!_mir) - active &= !inputs[| 2].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); + active &= !inputs[| 2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); else draw_circle_prec(c2x, c2y, 4, false); } diff --git a/scripts/node_path_array/node_path_array.gml b/scripts/node_path_array/node_path_array.gml index 1c2f5630d..4d3d0ce9d 100644 --- a/scripts/node_path_array/node_path_array.gml +++ b/scripts/node_path_array/node_path_array.gml @@ -125,12 +125,12 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc return 0; } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i += data_length ) { var _path = getInputData(i); if(!struct_has(_path, "drawOverlay")) continue; - _path.drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + _path.drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } } #endregion diff --git a/scripts/node_path_bake/node_path_bake.gml b/scripts/node_path_bake/node_path_bake.gml index 4dd0a5130..52c3869bb 100644 --- a/scripts/node_path_bake/node_path_bake.gml +++ b/scripts/node_path_bake/node_path_bake.gml @@ -11,9 +11,9 @@ function Node_Path_Bake(_x, _y, _group = noone) : Node(_x, _y, _group) construct .setDisplay(VALUE_DISPLAY.vector) .setArrayDepth(1); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _path = getInputData(0); - if(_path) _path.drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + if(_path) _path.drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); var _segs = outputs[| 0].getValue(); var ox, oy, nx, ny; diff --git a/scripts/node_path_blend/node_path_blend.gml b/scripts/node_path_blend/node_path_blend.gml index 251e3f0c5..99e749221 100644 --- a/scripts/node_path_blend/node_path_blend.gml +++ b/scripts/node_path_blend/node_path_blend.gml @@ -19,12 +19,12 @@ function Node_Path_Blend(_x, _y, _group = noone) : Node(_x, _y, _group) construc cached_pos = ds_map_create(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _p0 = getInputData(0); var _p1 = getInputData(1); - if(_p0) _p0.drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - if(_p1) _p1.drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + if(_p0) _p0.drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + if(_p1) _p1.drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); draw_set_color(COLORS._main_icon); diff --git a/scripts/node_path_bridge/node_path_bridge.gml b/scripts/node_path_bridge/node_path_bridge.gml index 40f3bd497..b5ed26813 100644 --- a/scripts/node_path_bridge/node_path_bridge.gml +++ b/scripts/node_path_bridge/node_path_bridge.gml @@ -31,10 +31,10 @@ function Node_Path_Bridge(_x, _y, _group = noone) : Node(_x, _y, _group) constru cached_pos = ds_map_create(); #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _path = getInputData(0); var _smt = getInputData(2); - if(_path) _path.drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + if(_path) _path.drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); var _amo = array_length(anchors); var ox, oy, nx, ny; diff --git a/scripts/node_path_builder/node_path_builder.gml b/scripts/node_path_builder/node_path_builder.gml index 547c91a42..20d380ba5 100644 --- a/scripts/node_path_builder/node_path_builder.gml +++ b/scripts/node_path_builder/node_path_builder.gml @@ -15,7 +15,7 @@ function Node_Path_Builder(_x, _y, _group = noone) : Node(_x, _y, _group) constr cached_pos = ds_map_create(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region draw_set_color(COLORS._main_accent); for( var i = 0, n = array_length(lines); i < n; i++ ) { diff --git a/scripts/node_path_from_mask/node_path_from_mask.gml b/scripts/node_path_from_mask/node_path_from_mask.gml index 150d91765..c12b09f18 100644 --- a/scripts/node_path_from_mask/node_path_from_mask.gml +++ b/scripts/node_path_from_mask/node_path_from_mask.gml @@ -65,7 +65,7 @@ function Node_Path_From_Mask(_x, _y, _group = noone) : Node(_x, _y, _group) cons return getPointDistance(pix, _ind, out); } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region draw_set_color(COLORS._main_accent); var ox, oy, nx, ny, sx, sy; diff --git a/scripts/node_path_l_system/node_path_l_system.gml b/scripts/node_path_l_system/node_path_l_system.gml index d53d8deb3..89e9b8298 100644 --- a/scripts/node_path_l_system/node_path_l_system.gml +++ b/scripts/node_path_l_system/node_path_l_system.gml @@ -143,8 +143,8 @@ function Node_Path_L_System(_x, _y, _group = noone) : Node(_x, _y, _group) const refreshDynamicInput(); } - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); draw_set_color(COLORS._main_accent); for( var i = 0, n = array_length(lines); i < n; i++ ) { diff --git a/scripts/node_path_map/node_path_map.gml b/scripts/node_path_map/node_path_map.gml index 3cc93e7c0..527d00c21 100644 --- a/scripts/node_path_map/node_path_map.gml +++ b/scripts/node_path_map/node_path_map.gml @@ -19,9 +19,9 @@ function Node_Path_Map(_x, _y, _group = noone) : Node(_x, _y, _group) constructo ["Mapping", false], 1, 2, 3, ] - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _path = getInputData(0); - if(_path) _path.drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + if(_path) _path.drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } #endregion static update = function() { #region diff --git a/scripts/node_path_map_area/node_path_map_area.gml b/scripts/node_path_map_area/node_path_map_area.gml index 1921deba0..26a9c4ac6 100644 --- a/scripts/node_path_map_area/node_path_map_area.gml +++ b/scripts/node_path_map_area/node_path_map_area.gml @@ -13,8 +13,8 @@ function Node_Path_Map_Area(_x, _y, _group = noone) : Node(_x, _y, _group) const cached_pos = ds_map_create(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static getLineCount = function() { diff --git a/scripts/node_path_plot/node_path_plot.gml b/scripts/node_path_plot/node_path_plot.gml index 4511d3135..0c9eac1ef 100644 --- a/scripts/node_path_plot/node_path_plot.gml +++ b/scripts/node_path_plot/node_path_plot.gml @@ -40,8 +40,8 @@ function Node_Path_Plot(_x, _y, _group = noone) : Node(_x, _y, _group) construct boundary = new BoundingBox( 0, 0, 1, 1 ); cached_pos = ds_map_create(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 5].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + inputs[| 5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static getLineCount = function() { return 1; } diff --git a/scripts/node_path_profile/node_path_profile.gml b/scripts/node_path_profile/node_path_profile.gml index d0181c7f0..48deb437d 100644 --- a/scripts/node_path_profile/node_path_profile.gml +++ b/scripts/node_path_profile/node_path_profile.gml @@ -35,9 +35,9 @@ function Node_Path_Profile(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro temp_surface = [ surface_create(1, 1) ]; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _path = getInputData(1); - if(_path) _path.drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + if(_path) _path.drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index = 0) { #region diff --git a/scripts/node_path_reverse/node_path_reverse.gml b/scripts/node_path_reverse/node_path_reverse.gml index 067b4e3dc..112a73465 100644 --- a/scripts/node_path_reverse/node_path_reverse.gml +++ b/scripts/node_path_reverse/node_path_reverse.gml @@ -9,9 +9,9 @@ function Node_Path_Reverse(_x, _y, _group = noone) : Node(_x, _y, _group) constr cached_pos = ds_map_create(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _path = getInputData(0); - if(_path) _path.drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + if(_path) _path.drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } #endregion static getLineCount = function() { #region diff --git a/scripts/node_path_sample/node_path_sample.gml b/scripts/node_path_sample/node_path_sample.gml index 76515de41..f2cc59f67 100644 --- a/scripts/node_path_sample/node_path_sample.gml +++ b/scripts/node_path_sample/node_path_sample.gml @@ -15,9 +15,9 @@ function Node_Path_Sample(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou outputs[| 1] = nodeValue("Direction", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _path = getInputData(0); - if(_path) _path.drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + if(_path) _path.drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); var _pnt = outputs[| 0].getValue(); if(process_amount == 1) _pnt = [ _pnt ]; diff --git a/scripts/node_path_shift/node_path_shift.gml b/scripts/node_path_shift/node_path_shift.gml index 74fd5ee5d..9e49134b8 100644 --- a/scripts/node_path_shift/node_path_shift.gml +++ b/scripts/node_path_shift/node_path_shift.gml @@ -11,9 +11,9 @@ function Node_Path_Shift(_x, _y, _group = noone) : Node(_x, _y, _group) construc cached_pos = ds_map_create(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _path = getInputData(0); - if(_path) _path.drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + if(_path) _path.drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); draw_set_color(COLORS._main_icon); diff --git a/scripts/node_path_smooth/node_path_smooth.gml b/scripts/node_path_smooth/node_path_smooth.gml index 2da44d38a..447ce20fe 100644 --- a/scripts/node_path_smooth/node_path_smooth.gml +++ b/scripts/node_path_smooth/node_path_smooth.gml @@ -66,7 +66,7 @@ function Node_Path_Smooth(_x, _y, _group = noone) : Node(_x, _y, _group) constru return inputs[| index]; } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var sample = PREFERENCES.path_resolution; var ansize = ds_list_size(inputs) - input_fix_len; var loop = getInputData(0); @@ -101,7 +101,7 @@ function Node_Path_Smooth(_x, _y, _group = noone) : Node(_x, _y, _group) constru var _act = active && !isUsingTool(0); for(var i = input_fix_len; i < ds_list_size(inputs); i++) { - var a = inputs[| i].drawOverlay(_act, _x, _y, _s, _mx, _my, _snx, _sny); + var a = inputs[| i].drawOverlay(hover, _act, _x, _y, _s, _mx, _my, _snx, _sny); _act &= !a; if(a) _anchor_hover = i; } diff --git a/scripts/node_path_transform/node_path_transform.gml b/scripts/node_path_transform/node_path_transform.gml index 9b9415cb3..1f6928a94 100644 --- a/scripts/node_path_transform/node_path_transform.gml +++ b/scripts/node_path_transform/node_path_transform.gml @@ -21,15 +21,15 @@ function Node_Path_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) cons cached_pos = ds_map_create(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var pth = getInputData(0); var pos = getInputData(4); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; - active &= !inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - active &= !inputs[| 2].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); - active &= !inputs[| 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, THEME.anchor ); + active &= !inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + active &= !inputs[| 2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); + active &= !inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, THEME.anchor ); } #endregion static getLineCount = function() { #region diff --git a/scripts/node_path_trim/node_path_trim.gml b/scripts/node_path_trim/node_path_trim.gml index eaf2829db..89f164066 100644 --- a/scripts/node_path_trim/node_path_trim.gml +++ b/scripts/node_path_trim/node_path_trim.gml @@ -12,9 +12,9 @@ function Node_Path_Trim(_x, _y, _group = noone) : Node(_x, _y, _group) construct cached_pos = ds_map_create(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _path = getInputData(0); - if(_path) _path.drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + if(_path) _path.drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); draw_set_color(COLORS._main_icon); diff --git a/scripts/node_path_wave/node_path_wave.gml b/scripts/node_path_wave/node_path_wave.gml index 5a550050d..aa6e1d372 100644 --- a/scripts/node_path_wave/node_path_wave.gml +++ b/scripts/node_path_wave/node_path_wave.gml @@ -54,9 +54,9 @@ function Node_Path_Wave(_x, _y, _group = noone) : Node(_x, _y, _group) construct cached_pos = ds_map_create(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _path = getInputData(0); - if(_path) _path.drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + if(_path) _path.drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); draw_set_color(COLORS._main_icon); diff --git a/scripts/node_pb/node_pb.gml b/scripts/node_pb/node_pb.gml index cfdc1f90a..0dffb3aaf 100644 --- a/scripts/node_pb/node_pb.gml +++ b/scripts/node_pb/node_pb.gml @@ -9,7 +9,7 @@ function Node_PB(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr static getNextNodesRaw = getNextNodes; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { if(drawOverlayPB != noone) drawOverlayPB(active, _x, _y, _s, _mx, _my, _snx, _sny); diff --git a/scripts/node_pb_box_transform/node_pb_box_transform.gml b/scripts/node_pb_box_transform/node_pb_box_transform.gml index 41cada8d4..8b6737fa3 100644 --- a/scripts/node_pb_box_transform/node_pb_box_transform.gml +++ b/scripts/node_pb_box_transform/node_pb_box_transform.gml @@ -14,7 +14,7 @@ function Node_PB_Box_Transform(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _gr ] static drawOverlayPB = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_pb_draw_blob/node_pb_draw_blob.gml b/scripts/node_pb_draw_blob/node_pb_draw_blob.gml index c4912c7ed..8633ac1c8 100644 --- a/scripts/node_pb_draw_blob/node_pb_draw_blob.gml +++ b/scripts/node_pb_draw_blob/node_pb_draw_blob.gml @@ -22,7 +22,7 @@ function Node_PB_Draw_Blob(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group x0 = _x + x0 * _s; y0 = _y + y0 * _s; - //inputs[| 2].drawOverlay(active, x0, y0, _s, _mx, _my, _snx, _sny); + //inputs[| 2].drawOverlay(hover, active, x0, y0, _s, _mx, _my, _snx, _sny); var x0 = _pbox.x + _pbox.w / 2; var y0 = _pbox.y + _pbox.h; @@ -30,7 +30,7 @@ function Node_PB_Draw_Blob(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group x0 = _x + x0 * _s; y0 = _y + y0 * _s; - //inputs[| 3].drawOverlay(active, x0, y0, _s, _mx, _my, _snx, _sny); + //inputs[| 3].drawOverlay(hover, active, x0, y0, _s, _mx, _my, _snx, _sny); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_pixel_cloud/node_pixel_cloud.gml b/scripts/node_pixel_cloud/node_pixel_cloud.gml index f91d5d6d9..79cb79a1c 100644 --- a/scripts/node_pixel_cloud/node_pixel_cloud.gml +++ b/scripts/node_pixel_cloud/node_pixel_cloud.gml @@ -1,14 +1,14 @@ function Node_Pixel_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Pixel Cloud"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, irandom(100000)); inputs[| 2] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] }); - inputs[| 3] = nodeValue("Strength map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 3] = nodeValue("Strength map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 4] = nodeValue("Color over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) .setMappable(9); diff --git a/scripts/node_pixel_sort/node_pixel_sort.gml b/scripts/node_pixel_sort/node_pixel_sort.gml index f241f32f2..5fd60e83a 100644 --- a/scripts/node_pixel_sort/node_pixel_sort.gml +++ b/scripts/node_pixel_sort/node_pixel_sort.gml @@ -7,7 +7,7 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group uniform_tre = shader_get_uniform(shader, "threshold"); uniform_dir = shader_get_uniform(shader, "direction"); - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Iteration", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2); @@ -17,7 +17,7 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 3] = nodeValue("Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.rotation, { step: 90 }); - inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 5] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_plot_linear/node_plot_linear.gml b/scripts/node_plot_linear/node_plot_linear.gml index 4c4bcb946..a0f14f2de 100644 --- a/scripts/node_plot_linear/node_plot_linear.gml +++ b/scripts/node_plot_linear/node_plot_linear.gml @@ -59,15 +59,15 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 14] = nodeValue("Trim mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Range", "Window" ]); - inputs[| 15] = nodeValue("Window Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 8) + inputs[| 15] = nodeValue("Window Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 8); - inputs[| 16] = nodeValue("Window Offset", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) + inputs[| 16] = nodeValue("Window Offset", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); - inputs[| 17] = nodeValue("Spacing", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) + inputs[| 17] = nodeValue("Spacing", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1); - inputs[| 18] = nodeValue("Bar Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4) + inputs[| 18] = nodeValue("Bar Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4); - inputs[| 19] = nodeValue("Rounded Bar", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) + inputs[| 19] = nodeValue("Rounded Bar", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); inputs[| 20] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone) .setVisible(true, true); @@ -135,16 +135,16 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 24].mappableStep(); } - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _use_path = getSingleValue(20) != noone; if(!_use_path) { - var a = inputs[| 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + var a = inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; } - var a = inputs[| 28].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; - var a = inputs[| 30].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; + var a = inputs[| 28].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; + var a = inputs[| 30].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_polar/node_polar.gml b/scripts/node_polar/node_polar.gml index e74145ac0..8716031c3 100644 --- a/scripts/node_polar/node_polar.gml +++ b/scripts/node_polar/node_polar.gml @@ -1,9 +1,9 @@ function Node_Polar(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Polar"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 2] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_posterize/node_posterize.gml b/scripts/node_posterize/node_posterize.gml index c2df0f1f2..daf0de761 100644 --- a/scripts/node_posterize/node_posterize.gml +++ b/scripts/node_posterize/node_posterize.gml @@ -1,7 +1,7 @@ function Node_Posterize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Posterize"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Palette", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, DEF_PALETTE ) .setDisplay(VALUE_DISPLAY.palette); diff --git a/scripts/node_pytagorean_tile/node_pytagorean_tile.gml b/scripts/node_pytagorean_tile/node_pytagorean_tile.gml index d5a0616b5..47448cdad 100644 --- a/scripts/node_pytagorean_tile/node_pytagorean_tile.gml +++ b/scripts/node_pytagorean_tile/node_pytagorean_tile.gml @@ -76,9 +76,9 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _ attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var a = inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; - var a = inputs[| 19].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + var a = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[| 19].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; } static step = function() { #region diff --git a/scripts/node_quasicrystal/node_quasicrystal.gml b/scripts/node_quasicrystal/node_quasicrystal.gml index 72c7954c6..8852347de 100644 --- a/scripts/node_quasicrystal/node_quasicrystal.gml +++ b/scripts/node_quasicrystal/node_quasicrystal.gml @@ -47,13 +47,13 @@ function Node_Quasicrystal(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var pos = getInputData(3); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; - var a = inputs[| 3].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; - var a = inputs[| 2].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[| 2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); active &= !a; } #endregion static step = function() { #region diff --git a/scripts/node_random_tile/node_random_tile.gml b/scripts/node_random_tile/node_random_tile.gml index 01a6cab4c..214571d9b 100644 --- a/scripts/node_random_tile/node_random_tile.gml +++ b/scripts/node_random_tile/node_random_tile.gml @@ -73,9 +73,9 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var a = inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; - var a = inputs[| 18].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + var a = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[| 18].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; } static step = function() { #region diff --git a/scripts/node_registry/node_registry.gml b/scripts/node_registry/node_registry.gml index a8183b43b..1ddd46a58 100644 --- a/scripts/node_registry/node_registry.gml +++ b/scripts/node_registry/node_registry.gml @@ -253,9 +253,9 @@ function addNodeObject(_list, _name, _spr, _node, _fun, _tag = [], tooltip = "") return _n; } #endregion -function addNodeCatagory(name, list, filter = []) { #region +function addNodeCatagory(name, list, filter = [], color = noone) { #region global.__currPage = name; - ds_list_add(NODE_CATEGORY, { name: name, list: list, filter: filter }); + ds_list_add(NODE_CATEGORY, { name, list, filter, color }); } #endregion function addNodePBCatagory(name, list, filter = []) { #region @@ -492,6 +492,8 @@ function __initNodes() { addNodeObject(input, "ASE Layer", s_node_ase_layer, "Node_ASE_layer", [1, Node_ASE_layer],, "Load Aseprite project file").setVersion(1100); addNodeObject(input, "WAV File In", s_node_wav_file_read, "Node_WAV_File_Read", [0, Node_create_WAV_File_Read],, "Load wav audio file.").setVersion(1144); addNodeObject(input, "WAV File Out", s_node_wav_file_write, "Node_WAV_File_Write", [1, Node_WAV_File_Write],, "Save wav audio file.").setVersion(1145); + addNodeObject(input, "Byte File In", s_node_byte_file_read, "Node_Byte_File_Read", [1, Node_Byte_File_Read],, "Load any file to buffer.").setVersion(11670); + addNodeObject(input, "Byte File Out", s_node_byte_file_write, "Node_Byte_File_Write", [1, Node_Byte_File_Write],, "Save buffer content to a file.").setVersion(11670); ds_list_add(input, "External"); addNodeObject(input, "Websocket Receiver", s_node_websocket_receive, "Node_Websocket_Receiver", [1, Node_Websocket_Receiver],, "Create websocket server to receive data from the network.").setVersion(1145); diff --git a/scripts/node_repeat/node_repeat.gml b/scripts/node_repeat/node_repeat.gml index 4b9c26c08..ec8a35c68 100644 --- a/scripts/node_repeat/node_repeat.gml +++ b/scripts/node_repeat/node_repeat.gml @@ -119,8 +119,8 @@ function Node_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constructor return [ surface_get_width_safe(_surf), surface_get_height_safe(_surf) ]; } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var a = inputs[| 9].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, THEME.anchor); active &= !a; + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + var a = inputs[| 9].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, THEME.anchor); active &= !a; var _pat = getInputData(3); var _spos = getInputData(9); @@ -129,16 +129,16 @@ function Node_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var py = _y + _spos[1] * _s; if(_pat == 0 || _pat == 1) { - var a = inputs[| 4].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); + var a = inputs[| 4].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); active &= !a; } else if(_pat == 2) { - var a = inputs[| 8].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); + var a = inputs[| 8].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); active &= !a; } - var a = inputs[| 31].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getInputData(1)); active &= !a; + var a = inputs[| 31].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getInputData(1)); active &= !a; } #endregion static step = function() { #region diff --git a/scripts/node_rgb_channel/node_rgb_channel.gml b/scripts/node_rgb_channel/node_rgb_channel.gml index cf5cc8fa1..a758b24ec 100644 --- a/scripts/node_rgb_channel/node_rgb_channel.gml +++ b/scripts/node_rgb_channel/node_rgb_channel.gml @@ -1,7 +1,7 @@ function Node_RGB_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "RGBA Extract"; - inputs[| 0] = nodeValue("Surface In", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface In", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Output Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, ["Channel value", "Greyscale"]); diff --git a/scripts/node_rigid_force_apply/node_rigid_force_apply.gml b/scripts/node_rigid_force_apply/node_rigid_force_apply.gml index 537d8c775..496bfc858 100644 --- a/scripts/node_rigid_force_apply/node_rigid_force_apply.gml +++ b/scripts/node_rigid_force_apply/node_rigid_force_apply.gml @@ -60,7 +60,7 @@ function Node_Rigid_Force_Apply(_x, _y, _group = noone) : Node(_x, _y, _group) c attributes.display_scale = val; })]); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { if(attributes.show_objects) for( var i = 0, n = ds_list_size(group.nodes); i < n; i++ ) { var _node = group.nodes[| i]; @@ -85,8 +85,8 @@ function Node_Rigid_Force_Apply(_x, _y, _group = noone) : Node(_x, _y, _group) c draw_line_width2(px, py, fx, fy, 8, 2); draw_set_alpha(1); - inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 5].drawOverlay(active, px, py, _s * attributes.display_scale, _mx, _my, _snx, _sny, THEME.anchor, 10); + inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 5].drawOverlay(hover, active, px, py, _s * attributes.display_scale, _mx, _my, _snx, _sny, THEME.anchor, 10); } else if(_typ == 3) { var _rad = getInputData(8); @@ -95,10 +95,10 @@ function Node_Rigid_Force_Apply(_x, _y, _group = noone) : Node(_x, _y, _group) c draw_circle_prec(px, py, _rad * _s, 1); draw_set_alpha(1); - inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 8].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny, 0, 1, THEME.anchor_scale_hori); + inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 8].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny, 0, 1, THEME.anchor_scale_hori); } else - inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static step = function() { diff --git a/scripts/node_rigid_object/node_rigid_object.gml b/scripts/node_rigid_object/node_rigid_object.gml index 8cae8619e..d8a473bc3 100644 --- a/scripts/node_rigid_object/node_rigid_object.gml +++ b/scripts/node_rigid_object/node_rigid_object.gml @@ -163,10 +163,10 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr } else drawOverlayPreviewSingle(0, _x, _y, _s, _pr_x, _pr_y, _tex); - return inputs[| 7].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + return inputs[| 7].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var gr = is_instanceof(group, Node_Rigid_Group)? group : noone; if(inline_context != noone) gr = inline_context; diff --git a/scripts/node_rigid_object_spawner/node_rigid_object_spawner.gml b/scripts/node_rigid_object_spawner/node_rigid_object_spawner.gml index d9de529a7..6818ab592 100644 --- a/scripts/node_rigid_object_spawner/node_rigid_object_spawner.gml +++ b/scripts/node_rigid_object_spawner/node_rigid_object_spawner.gml @@ -49,7 +49,7 @@ function Node_Rigid_Object_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group attributes.show_objects = !attributes.show_objects; })]); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { if(attributes.show_objects) for( var i = 0, n = ds_list_size(group.nodes); i < n; i++ ) { var _node = group.nodes[| i]; @@ -58,7 +58,7 @@ function Node_Rigid_Object_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group active &= !_hov; } - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static reset = function() { diff --git a/scripts/node_rigid_render/node_rigid_render.gml b/scripts/node_rigid_render/node_rigid_render.gml index 713df253e..3630347cc 100644 --- a/scripts/node_rigid_render/node_rigid_render.gml +++ b/scripts/node_rigid_render/node_rigid_render.gml @@ -62,7 +62,7 @@ function Node_Rigid_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constr refreshDynamicInput(); } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var gr = is_instanceof(group, Node_Rigid_Group)? group : noone; if(inline_context != noone) gr = inline_context; diff --git a/scripts/node_rigid_render_output/node_rigid_render_output.gml b/scripts/node_rigid_render_output/node_rigid_render_output.gml index 4e629a423..fcfd92c34 100644 --- a/scripts/node_rigid_render_output/node_rigid_render_output.gml +++ b/scripts/node_rigid_render_output/node_rigid_render_output.gml @@ -81,7 +81,7 @@ function Node_Rigid_Render_Output(_x, _y, _group = noone) : Node_Group_Output(_x refreshDynamicInput(); } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var gr = is_instanceof(group, Node_Rigid_Group)? group : noone; if(inline_context != noone) gr = inline_context; diff --git a/scripts/node_sampler/node_sampler.gml b/scripts/node_sampler/node_sampler.gml index aedf679a0..a677a48bf 100644 --- a/scripts/node_sampler/node_sampler.gml +++ b/scripts/node_sampler/node_sampler.gml @@ -2,7 +2,7 @@ function Node_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c name = "Sampler"; w = 96; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -17,8 +17,8 @@ function Node_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c static getPreviewValues = function() { return getInputData(0); } - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); var _suf = current_data[0]; if(!is_surface(_suf)) return; diff --git a/scripts/node_scale/node_scale.gml b/scripts/node_scale/node_scale.gml index e47afd4b1..028f5690e 100644 --- a/scripts/node_scale/node_scale.gml +++ b/scripts/node_scale/node_scale.gml @@ -4,7 +4,7 @@ function Node_Scale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con manage_atlas = false; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY._default, { slide_speed: 0.01 }); diff --git a/scripts/node_scale_algo/node_scale_algo.gml b/scripts/node_scale_algo/node_scale_algo.gml index c21a46720..e73472f57 100644 --- a/scripts/node_scale_algo/node_scale_algo.gml +++ b/scripts/node_scale_algo/node_scale_algo.gml @@ -15,7 +15,7 @@ function Node_Scale_Algo(_x, _y, _group = noone) : Node_Processor(_x, _y, _group manage_atlas = false; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Algorithm", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Scale2x", "Scale3x" ]); diff --git a/scripts/node_scatter/node_scatter.gml b/scripts/node_scatter/node_scatter.gml index 17ba0adb4..6609d2338 100644 --- a/scripts/node_scatter/node_scatter.gml +++ b/scripts/node_scatter/node_scatter.gml @@ -46,7 +46,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 12] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.slider_range); - inputs[| 13] = nodeValue("Distribution map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 13] = nodeValue("Distribution map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 14] = nodeValue("Distribution data", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, []) .setDisplay(VALUE_DISPLAY.vector); @@ -114,7 +114,9 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 36] = nodeValue("Shift position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - + + inputs[| 37] = nodeValue("Exact", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) + outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 1] = nodeValue("Atlas data", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, []) @@ -125,7 +127,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c ["Surfaces", true], 0, 1, 15, 24, 25, 26, 27, ["Scatter", false], 6, 5, 13, 14, 17, 9, 31, 2, 30, 35, ["Path", false], 19, 20, 21, 22, - ["Position", false], 33, 36, + ["Position", false], 33, 36, 37, ["Rotation", false], 7, 4, 32, ["Scale", false], 3, 8, 34, ["Render", false], 18, 11, 28, 12, 16, 23, @@ -143,15 +145,15 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c scatter_maps = 0; scatter_mapp = []; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _distType = current_data[6]; if(_distType < 3) { - var a = inputs[| 5].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + var a = inputs[| 5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; } - var a = inputs[| 29].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(1)); active &= !a; + var a = inputs[| 29].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(1)); active &= !a; } #endregion static onValueUpdate = function(index) { #region @@ -268,6 +270,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c var uniSca = _data[34]; var cirRng = _data[35]; var posShf = _data[36]; + var posExt = _data[37]; var _in_w, _in_h; @@ -551,6 +554,11 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c var alp = _alpUni? alpha[0] : random_range(alpha[0], alpha[1]); var _atl = _sct_len >= _datLen? noone : scatter_data[_sct_len]; + if(posExt) { + _x = round(_x); + _y = round(_y); + } + if(_useAtl) { if(!is_instanceof(_atl, SurfaceAtlasFast)) _atl = new SurfaceAtlasFast(surf, _x, _y, _r, _scx, _scy, clr, alp); else _atl.set(surf, _x, _y, _r, _scx, _scy, clr, alp); diff --git a/scripts/node_scatter_points/node_scatter_points.gml b/scripts/node_scatter_points/node_scatter_points.gml index 413d9a918..69f0702d1 100644 --- a/scripts/node_scatter_points/node_scatter_points.gml +++ b/scripts/node_scatter_points/node_scatter_points.gml @@ -19,7 +19,7 @@ function Node_Scatter_Points(_x, _y, _group = noone) : Node(_x, _y, _group) cons inputs[| 3] = nodeValue("Point amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2, "Amount of particle spawn in that frame.") .rejectArray(); - inputs[| 4] = nodeValue("Distribution map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0) + inputs[| 4] = nodeValue("Distribution map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) .rejectArray(); inputs[| 5] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, irandom(99999)) @@ -30,7 +30,7 @@ function Node_Scatter_Points(_x, _y, _group = noone) : Node(_x, _y, _group) cons inputs[| 7] = nodeValue("Reference dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 8] = nodeValue("Reference value", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 8] = nodeValue("Reference value", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 9] = nodeValue("Output 3D", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); @@ -55,8 +55,8 @@ function Node_Scatter_Points(_x, _y, _group = noone) : Node(_x, _y, _group) cons inputs[| 4].setVisible(_dist == 2, _dist == 2); } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - inputs[| 0].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + inputs[| 0].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } #endregion static getPreviewValues = function() { return inputs[| 8].getValue(); } diff --git a/scripts/node_sdf/node_sdf.gml b/scripts/node_sdf/node_sdf.gml index bf129e372..8c1aaf1bb 100644 --- a/scripts/node_sdf/node_sdf.gml +++ b/scripts/node_sdf/node_sdf.gml @@ -8,7 +8,7 @@ function Node_SDF(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const uniform_dst_sid = shader_get_uniform(sh_sdf_dist, "side"); uniform_dst_dst = shader_get_uniform(sh_sdf_dist, "max_distance"); - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; diff --git a/scripts/node_seperate_shape/node_seperate_shape.gml b/scripts/node_seperate_shape/node_seperate_shape.gml index eb3822952..1a2b36caf 100644 --- a/scripts/node_seperate_shape/node_seperate_shape.gml +++ b/scripts/node_seperate_shape/node_seperate_shape.gml @@ -2,7 +2,7 @@ function Node_Seperate_Shape(_x, _y, _group = noone) : Node(_x, _y, _group) cons name = "Separate Shape"; //error_update_enabled = true; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0) + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) .rejectArray(); inputs[| 1] = nodeValue("Tolerance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2) diff --git a/scripts/node_shadow/node_shadow.gml b/scripts/node_shadow/node_shadow.gml index b97abf294..416c7a1ba 100644 --- a/scripts/node_shadow/node_shadow.gml +++ b/scripts/node_shadow/node_shadow.gml @@ -1,7 +1,7 @@ function Node_Shadow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Shadow"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); inputs[| 2] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, .5) @@ -17,7 +17,7 @@ function Node_Shadow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 5] = nodeValue("Blur", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 1] }); - inputs[| 6] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 6] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 7] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -37,7 +37,7 @@ function Node_Shadow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co surface_blur_init(); attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _surf = outputs[| 0].getValue(); if(is_array(_surf)) { if(array_length(_surf) == 0) return; @@ -47,7 +47,7 @@ function Node_Shadow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co var ww = surface_get_width_safe(_surf) * _s; var hh = surface_get_height_safe(_surf) * _s; - inputs[| 3].drawOverlay(active, _x + ww / 2, _y + hh / 2, _s, _mx, _my, _snx, _sny); + inputs[| 3].drawOverlay(hover, active, _x + ww / 2, _y + hh / 2, _s, _mx, _my, _snx, _sny); } static step = function() { #region diff --git a/scripts/node_shadow_cast/node_shadow_cast.gml b/scripts/node_shadow_cast/node_shadow_cast.gml index 59eddb176..9da91d67c 100644 --- a/scripts/node_shadow_cast/node_shadow_cast.gml +++ b/scripts/node_shadow_cast/node_shadow_cast.gml @@ -1,9 +1,9 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Cast Shadow"; - inputs[| 0] = nodeValue("Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 1] = nodeValue("Solid", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 1] = nodeValue("Solid", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 2] = nodeValue("Light Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -78,8 +78,8 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); if(array_length(current_data) != ds_list_size(inputs)) return; var _type = current_data[5]; @@ -88,7 +88,7 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; - inputs[| 8].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny, 0, 1 / 4, THEME.anchor_scale_hori); + inputs[| 8].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny, 0, 1 / 4, THEME.anchor_scale_hori); } } diff --git a/scripts/node_shape/node_shape.gml b/scripts/node_shape/node_shape.gml index 5d1d5a3a5..1ae0e9fae 100644 --- a/scripts/node_shape/node_shape.gml +++ b/scripts/node_shape/node_shape.gml @@ -110,21 +110,21 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _path = getInputData(14); if(_path != noone && struct_has(_path, "getPointRatio")) return; var _type = getInputData(15); if(_type == 0) { - inputs[| 3].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } else if(_type == 1) { var _pos = getInputData(16); var _px = _x + _pos[0] * _s; var _py = _y + _pos[1] * _s; - inputs[| 16].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 17].drawOverlay(active, _px, _py, _s, _mx, _my, _snx, _sny); + inputs[| 16].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 17].drawOverlay(hover, active, _px, _py, _s, _mx, _my, _snx, _sny); } } #endregion diff --git a/scripts/node_shape_map/node_shape_map.gml b/scripts/node_shape_map/node_shape_map.gml index 820815c79..47ca671df 100644 --- a/scripts/node_shape_map/node_shape_map.gml +++ b/scripts/node_shape_map/node_shape_map.gml @@ -1,7 +1,7 @@ function Node_Shape_Map(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Shape Map"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; diff --git a/scripts/node_shape_polygon/node_shape_polygon.gml b/scripts/node_shape_polygon/node_shape_polygon.gml index 94c1f2bd0..4875d3ca8 100644 --- a/scripts/node_shape_polygon/node_shape_polygon.gml +++ b/scripts/node_shape_polygon/node_shape_polygon.gml @@ -70,7 +70,7 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr node_draw_transform_init(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { if(array_length(current_data) != ds_list_size(inputs)) return; if(process_amount > 1) return; diff --git a/scripts/node_skew/node_skew.gml b/scripts/node_skew/node_skew.gml index a20eff27d..b19bd5638 100644 --- a/scripts/node_skew/node_skew.gml +++ b/scripts/node_skew/node_skew.gml @@ -1,7 +1,7 @@ function Node_Skew(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Skew"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_button, ["x", "y"]); @@ -19,7 +19,7 @@ function Node_Skew(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 5] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]); - inputs[| 6] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 6] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 7] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -57,8 +57,8 @@ function Node_Skew(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 4].setValue([ww / 2, hh / 2]); } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - inputs[| 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } #endregion static step = function() { #region diff --git a/scripts/node_spherize/node_spherize.gml b/scripts/node_spherize/node_spherize.gml index f1c700e88..e3684854a 100644 --- a/scripts/node_spherize/node_spherize.gml +++ b/scripts/node_spherize/node_spherize.gml @@ -1,7 +1,7 @@ function Node_Spherize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Spherize"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Center", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -18,7 +18,7 @@ function Node_Spherize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 4] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]); - inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -57,13 +57,13 @@ function Node_Spherize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attributes.oversample = 2; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var pos = getInputData(1); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } #endregion static step = function() { #region diff --git a/scripts/node_sprite_stack/node_sprite_stack.gml b/scripts/node_sprite_stack/node_sprite_stack.gml index d19ef341f..9287fd154 100644 --- a/scripts/node_sprite_stack/node_sprite_stack.gml +++ b/scripts/node_sprite_stack/node_sprite_stack.gml @@ -55,17 +55,17 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro preview_custom_x_to = 0; preview_custom_x_max = 0; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var pos = getInputData(4); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; - inputs[| 3].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny, THEME.anchor); - inputs[| 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 5].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); + var a = inputs[| 3].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny, THEME.anchor); active &= a; + var a = inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= a; + var a = inputs[| 5].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); active &= a; } #endregion - static drawPreviewToolOverlay = function(active, _mx, _my, _panel) { #region + static drawPreviewToolOverlay = function(hover, active, _mx, _my, _panel) { #region var _surf = getInputData(0); if(!is_array(_surf)) return false; @@ -85,18 +85,21 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro var _sw = surface_get_width_safe(_s); var _sh = surface_get_height_safe(_s); - var _ss = prev_size / min(_sw, _sh); + var _ss = prev_size / max(_sw, _sh); var _sx = sx + (prev_size / 2 - _sw * _ss / 2); var _sy = sy + (prev_size / 2 - _sh * _ss / 2); draw_surface_ext_safe(_s, _sx, _sy, _ss, _ss); - draw_set_color(COLORS.panel_preview_surface_outline); - draw_rectangle(_sx, _sy, _sx + _sw * _ss, _sy + _sh * _ss, true); - if(point_in_rectangle(_mx, _my, _sx - ui(4), _sy, _sx + _sw * _ss + ui(4), _sy + _sh * _ss)) { + if(hover && point_in_rectangle(_mx, _my, _sx - ui(4), _sy, _sx + _sw * _ss + ui(4), _sy + _sh * _ss)) { hov = true; preview_custom_index = i; - } + + draw_set_color(COLORS._main_accent); + } else + draw_set_color(COLORS.panel_preview_surface_outline); + + draw_rectangle(_sx, _sy, _sx + _sw * _ss, _sy + _sh * _ss, true); sx += prev_size + ui(8); preview_custom_x_max += prev_size + ui(8); @@ -206,7 +209,7 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro var _hig = _data[ 9]; var _hiC = _data[10]; - //var _hiA = _data[11]; + var _hiA = _data[11]; var _arr = _data[12]; _pos = [ _pos[0], _pos[1] ]; diff --git a/scripts/node_strand_collision/node_strand_collision.gml b/scripts/node_strand_collision/node_strand_collision.gml index 43703d9f1..cc1d44775 100644 --- a/scripts/node_strand_collision/node_strand_collision.gml +++ b/scripts/node_strand_collision/node_strand_collision.gml @@ -14,7 +14,7 @@ function Node_Strand_Collision(_x, _y, _group = noone) : Node(_x, _y, _group) co outputs[| 0] = nodeValue("Strand", self, JUNCTION_CONNECT.output, VALUE_TYPE.strands, noone); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _msh = getInputData(1); if(_msh == noone) return; diff --git a/scripts/node_strand_create/node_strand_create.gml b/scripts/node_strand_create/node_strand_create.gml index 3ff1dfdbb..11376c70c 100644 --- a/scripts/node_strand_create/node_strand_create.gml +++ b/scripts/node_strand_create/node_strand_create.gml @@ -119,7 +119,7 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const tool_grabbing = []; #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _typ = getInputData(0); var _pre = getInputData(16); if(!attributes.use_groom) @@ -129,7 +129,7 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const if(_typ == 0) { if(tool_dragging == noone) - inputs[| 6].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 6].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } else if(_typ == 1) { var _pth = getInputData(5); var _sid = getInputData(7); diff --git a/scripts/node_strand_render/node_strand_render.gml b/scripts/node_strand_render/node_strand_render.gml index ea77e9621..f6511593a 100644 --- a/scripts/node_strand_render/node_strand_render.gml +++ b/scripts/node_strand_render/node_strand_render.gml @@ -40,7 +40,7 @@ function Node_Strand_Render(_x, _y, _group = noone) : Node(_x, _y, _group) const static onInspector2Update = function() { clearCache(); } - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _str = getInputData(1); if(_str == noone) return; if(!is_array(_str)) _str = [ _str ]; diff --git a/scripts/node_strand_render_texture/node_strand_render_texture.gml b/scripts/node_strand_render_texture/node_strand_render_texture.gml index e18877de0..600a937b0 100644 --- a/scripts/node_strand_render_texture/node_strand_render_texture.gml +++ b/scripts/node_strand_render_texture/node_strand_render_texture.gml @@ -17,7 +17,7 @@ function Node_Strand_Render_Texture(_x, _y, _group = noone) : Node(_x, _y, _grou inputs[| 3] = nodeValue("Random color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white)); - inputs[| 4] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 4] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 5] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, irandom_range(10000, 99999)); @@ -34,7 +34,7 @@ function Node_Strand_Render_Texture(_x, _y, _group = noone) : Node(_x, _y, _grou static onInspector2Update = function() { clearCache(); } - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _str = getInputData(1); if(instanceof(_str) != "StrandMesh") return; diff --git a/scripts/node_stripe/node_stripe.gml b/scripts/node_stripe/node_stripe.gml index fcdc509cd..ffdf563fa 100644 --- a/scripts/node_stripe/node_stripe.gml +++ b/scripts/node_stripe/node_stripe.gml @@ -62,14 +62,14 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var pos = getInputData(4); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; - var a = inputs[| 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; - var a = inputs[| 2].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); active &= !a; - var a = inputs[| 16].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; + var a = inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[| 2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[| 16].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; } #endregion static step = function() { #region diff --git a/scripts/node_surface_data/node_surface_data.gml b/scripts/node_surface_data/node_surface_data.gml index 168822e30..bf13238b8 100644 --- a/scripts/node_surface_data/node_surface_data.gml +++ b/scripts/node_surface_data/node_surface_data.gml @@ -2,7 +2,7 @@ function Node_Surface_data(_x, _y, _group = noone) : Node(_x, _y, _group) constr name = "Surface data"; color = COLORS.node_blend_number; - inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_text/node_text.gml b/scripts/node_text/node_text.gml index 6c8dcbb33..bf8d570ab 100644 --- a/scripts/node_text/node_text.gml +++ b/scripts/node_text/node_text.gml @@ -69,10 +69,12 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons .setDisplay(VALUE_DISPLAY.enum_button, [ "Character", "Word", "Line" ]); inputs[| 26] = nodeValue("Use full text size", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true ); + + inputs[| 27] = nodeValue("Max line width", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ); input_display_list = [ ["Output", true], 9, 6, 10, - ["Text", false], 0, 13, 14, 7, 8, + ["Text", false], 0, 13, 14, 7, 8, 27, ["Font", false], 1, 2, 15, 3, 11, 12, ["Rendering", false], 5, ["Background", true, 16], 17, @@ -173,6 +175,8 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons var _typeC = _data[25]; var _typeF = _data[26]; + var _lineW = _data[27]; + generateFont(_font, _size, _aa); draw_set_font(font); @@ -210,37 +214,63 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons #endregion #region cut string - var _str_lines = string_splice(str, "\n"); - _line_widths = []; - - __temp_len = string_length(str); - __temp_lw = 0; - __temp_ww = 0; - __temp_hh = line_get_height(); - __temp_trck = _trck; - __temp_line = _line; + var _cut_lines = string_splice(str, "\n"); - string_foreach(strRaw, function(_chr, _ind) { - if(_chr == "\n") { - var _lw = max(0, __temp_lw - __temp_trck); - array_push(_line_widths, _lw); - __temp_ww = max(__temp_ww, _lw); - __temp_hh += string_height(_chr) + __temp_line; - __temp_lw = 0; - } else - __temp_lw += string_width(_chr) + __temp_trck; - }); + var _str_lines = []; + var _line_widths = []; + var _ind = 0; + + for( var i = 0, n = array_length(_cut_lines); i < n; i++ ) { + var _str_line = _cut_lines[i]; + + if(_lineW == 0) { + _str_lines[_ind] = _str_line; + _line_widths[_ind] = string_width(_str_line) + _trck * (string_length(_str_line) - 1); + _ind++; + } else { + var _lw = 0; + var _lne = ""; + + for( var j = 1; j <= string_length(_str_line); j++ ) { + var _chr = string_char_at(_str_line, j); + var _chw = string_width(_chr) + _trck; + + if(_lw + _chw >= _lineW) { + _str_lines[_ind] = _lne; + _line_widths[_ind] = _lw - _trck; + _ind++; + + _lne = ""; + _lw = 0; + } + + _lne += _chr; + _lw += _chw; + } + + if(_lne != "") { + _str_lines[_ind] = _lne; + _line_widths[_ind] = _lw - _trck; + _ind++; + } + } + } + + var _max_ww = 0; + var _max_hh = 0; + + for( var i = 0, n = array_length(_str_lines); i < n; i++ ) { + _max_ww = max(_max_ww, _line_widths[i]); + _max_hh += string_height(_str_lines[i]); + } #endregion #region dimension var ww = 0, _sw = 0; var hh = 0, _sh = 0; - var _lw = max(0, __temp_lw - __temp_trck); - array_push(_line_widths, _lw); - __temp_ww = max(__temp_ww, _lw); - ww = __temp_ww; - hh = __temp_hh; + ww = _max_ww; + hh = _max_hh; var _use_path = _path != noone && struct_has(_path, "getPointDistance"); var _ss = 1; diff --git a/scripts/node_text_file_read/node_text_file_read.gml b/scripts/node_text_file_read/node_text_file_read.gml index b8e5f9970..88e0a303a 100644 --- a/scripts/node_text_file_read/node_text_file_read.gml +++ b/scripts/node_text_file_read/node_text_file_read.gml @@ -1,4 +1,4 @@ -function Node_create_Text_File_Read(_x, _y, _group = noone) { +function Node_create_Text_File_Read(_x, _y, _group = noone) { #region var path = ""; if(!LOADING && !APPENDING && !CLONING) { path = get_open_filename("text file|*.txt", ""); @@ -11,9 +11,9 @@ function Node_create_Text_File_Read(_x, _y, _group = noone) { node.doUpdate(); return node; -} +} #endregion -function Node_create_Text_File_Read_path(_x, _y, path) { +function Node_create_Text_File_Read_path(_x, _y, path) { #region if(!file_exists_empty(path)) return noone; var node = new Node_Text_File_Read(_x, _y, PANEL_GRAPH.getCurrentContext()); @@ -21,7 +21,7 @@ function Node_create_Text_File_Read_path(_x, _y, path) { node.doUpdate(); return node; -} +} #endregion function Node_Text_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Text File In"; @@ -30,73 +30,80 @@ function Node_Text_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons w = 128; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_load, { filter: "text file|*.txt" }) + .setDisplay(VALUE_DISPLAY.path_load, { filter: "any file|*" }) .rejectArray(); outputs[| 0] = nodeValue("Content", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, ""); outputs[| 1] = nodeValue("Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.path, "") .setVisible(true, true); - content = ""; + content = ""; path_current = ""; + edit_time = 0; + + attributes.file_checker = true; + array_push(attributeEditors, [ "File Watcher", function() { return attributes.file_checker; }, + new checkBox(function() { attributes.file_checker = !attributes.file_checker; }) ]); first_update = false; - on_drop_file = function(path) { + on_drop_file = function(path) { #region if(updatePaths(path)) { doUpdate(); return true; } return false; - } + } #endregion insp1UpdateTooltip = __txt("Refresh"); insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; - static onInspector1Update = function() { - var path = getInputData(0); - if(path == "") return; - updatePaths(path); - update(); - } + static onInspector1Update = function() { #region + updatePaths(path_get(getInputData(0))); + triggerRender(); + } #endregion - function updatePaths(path) { - path = try_get_path(path); + function updatePaths(path) { #region if(path == -1) return false; - var ext = string_lower(filename_ext(path)); + var ext = string_lower(filename_ext(path)); var _name = string_replace(filename_name(path), filename_ext(path), ""); - switch(ext) { - case ".txt": - outputs[| 1].setValue(path); + outputs[| 1].setValue(path); - content = file_read_all(path); + content = file_read_all(path); - if(path_current == "") - first_update = true; - path_current = path; - - return true; - } - return false; - } + if(path_current == "") + first_update = true; + path_current = path; + edit_time = max(edit_time, file_get_modify_s(path_current)); + + return true; + } #endregion - static update = function(frame = CURRENT_FRAME) { - var path = getInputData(0); - if(path == "") return; + static step = function() { #region + if(attributes.file_checker && path_current != "") { + if(file_get_modify_s(path_current) > edit_time) { + updatePaths(); + triggerRender(); + } + } + } #endregion + + static update = function(frame = CURRENT_FRAME) { #region + var path = path_get(getInputData(0)); if(path_current != path) updatePaths(path); outputs[| 0].setValue(content); - } + } #endregion - static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region var bbox = drawGetBbox(xx, yy, _s); var str = filename_name(path_current); draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); var ss = string_scale(str, bbox.w, bbox.h); draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0); - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_text_file_write/node_text_file_write.gml b/scripts/node_text_file_write/node_text_file_write.gml index 4df6a37ac..6b1ca0ba2 100644 --- a/scripts/node_text_file_write/node_text_file_write.gml +++ b/scripts/node_text_file_write/node_text_file_write.gml @@ -14,7 +14,7 @@ function Node_Text_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) con static writeFile = function() { var path = getInputData(0); if(path == "") return; - if(filename_ext(path) != ".txt") + if(filename_ext(path) == "") path += ".txt"; var cont = getInputData(1); diff --git a/scripts/node_texture_remap/node_texture_remap.gml b/scripts/node_texture_remap/node_texture_remap.gml index aac62c8f0..35c72d9fa 100644 --- a/scripts/node_texture_remap/node_texture_remap.gml +++ b/scripts/node_texture_remap/node_texture_remap.gml @@ -4,9 +4,9 @@ function Node_Texture_Remap(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr shader = sh_texture_remap; uniform_map = shader_get_sampler_index(shader, "map"); - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 1] = nodeValue("RG Map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0, "Displacement map where red retermine the X position, and green determine the Y position."); + inputs[| 1] = nodeValue("RG Map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone, "Displacement map where red retermine the X position, and green determine the Y position."); inputs[| 2] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 2; diff --git a/scripts/node_threshold/node_threshold.gml b/scripts/node_threshold/node_threshold.gml index 91a45371b..859b007e9 100644 --- a/scripts/node_threshold/node_threshold.gml +++ b/scripts/node_threshold/node_threshold.gml @@ -1,7 +1,7 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Threshold"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Brightness", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); @@ -12,7 +12,7 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 3] = nodeValue("Brightness Smoothness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 5] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_tile/node_tile.gml b/scripts/node_tile/node_tile.gml index 60d30f1e8..d03e65747 100644 --- a/scripts/node_tile/node_tile.gml +++ b/scripts/node_tile/node_tile.gml @@ -5,7 +5,7 @@ function Node_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 1] = nodeValue("Border texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - outputs[| 0] = nodeValue("", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, 0); + outputs[| 0] = nodeValue("", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); input_display_list = [ 0 ]; diff --git a/scripts/node_tile_random/node_tile_random.gml b/scripts/node_tile_random/node_tile_random.gml index 586445772..8e742461b 100644 --- a/scripts/node_tile_random/node_tile_random.gml +++ b/scripts/node_tile_random/node_tile_random.gml @@ -2,7 +2,7 @@ function Node_Tile_Random(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou name = "Tile Random"; dimension_index = -1; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, DEF_SURF) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_time_remap/node_time_remap.gml b/scripts/node_time_remap/node_time_remap.gml index 55d8ce78c..e31461a93 100644 --- a/scripts/node_time_remap/node_time_remap.gml +++ b/scripts/node_time_remap/node_time_remap.gml @@ -8,10 +8,10 @@ function Node_Time_Remap(_x, _y, _group = noone) : Node(_x, _y, _group) construc uniform_min = shader_get_uniform(shader, "vMin"); uniform_max = shader_get_uniform(shader, "vMax"); - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0) + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) .rejectArray(); - inputs[| 1] = nodeValue("Map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0) + inputs[| 1] = nodeValue("Map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) .rejectArray(); inputs[| 2] = nodeValue("Max life", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 3) diff --git a/scripts/node_timeline_preview/node_timeline_preview.gml b/scripts/node_timeline_preview/node_timeline_preview.gml index 3773a417a..bd6c1c0e6 100644 --- a/scripts/node_timeline_preview/node_timeline_preview.gml +++ b/scripts/node_timeline_preview/node_timeline_preview.gml @@ -8,7 +8,7 @@ function Node_Timeline_Preview(_x, _y, _group = noone) : Node(_x, _y, _group) co PANEL_ANIMATION.timeline_preview = self; - inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); static update = function(frame = CURRENT_FRAME) { var _inSurf = getInputData(0); diff --git a/scripts/node_trail/node_trail.gml b/scripts/node_trail/node_trail.gml index 735c1c004..2657033ad 100644 --- a/scripts/node_trail/node_trail.gml +++ b/scripts/node_trail/node_trail.gml @@ -3,7 +3,7 @@ function Node_Trail(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { use_cache = CACHE_USE.manual; clearCacheOnChange = false; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Max life", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 5); diff --git a/scripts/node_transform/node_transform.gml b/scripts/node_transform/node_transform.gml index bd1f0e09e..b63d60f24 100644 --- a/scripts/node_transform/node_transform.gml +++ b/scripts/node_transform/node_transform.gml @@ -335,7 +335,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) overlay_drag_ma = 0; overlay_drag_sa = 0; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region PROCESSOR_OVERLAY_CHECK var _surf = getInputData(0); diff --git a/scripts/node_transform_array/node_transform_array.gml b/scripts/node_transform_array/node_transform_array.gml index 103f1cff6..eafa925cc 100644 --- a/scripts/node_transform_array/node_transform_array.gml +++ b/scripts/node_transform_array/node_transform_array.gml @@ -19,13 +19,13 @@ function Node_Transform_Array(_x, _y, _group = noone) : Node_Processor(_x, _y, _ 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) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var pos = getInputData(0); 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); + inputs[| 0].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 1].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); } static processData = function(_output, _data, _output_index, _array_index = 0) { diff --git a/scripts/node_transform_single/node_transform_single.gml b/scripts/node_transform_single/node_transform_single.gml index 31e6c810f..5384f4c4a 100644 --- a/scripts/node_transform_single/node_transform_single.gml +++ b/scripts/node_transform_single/node_transform_single.gml @@ -1,7 +1,7 @@ function Node_Transform_Single(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Transform single"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Position x", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); inputs[| 2] = nodeValue("Position y", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); @@ -47,7 +47,7 @@ function Node_Transform_Single(_x, _y, _group = noone) : Node_Processor(_x, _y, overlay_drag_ma = 0; overlay_drag_sa = 0; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { if(array_length(current_data) < ds_list_size(inputs)) return; var _surf = outputs[| 0].getValue(); diff --git a/scripts/node_twirl/node_twirl.gml b/scripts/node_twirl/node_twirl.gml index 289eb0b62..dab697abd 100644 --- a/scripts/node_twirl/node_twirl.gml +++ b/scripts/node_twirl/node_twirl.gml @@ -1,7 +1,7 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Twirl"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Center", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -17,7 +17,7 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 4] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]); - inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -51,13 +51,13 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con attribute_oversample(); attribute_interpolation(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var pos = getInputData(1); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 3].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny, 0, 1, THEME.anchor_scale_hori); + inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| 3].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny, 0, 1, THEME.anchor_scale_hori); } #endregion static step = function() { #region diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index bc637a1db..400a4d1f3 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -1384,6 +1384,13 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru return true; } #endregion + static setUseExpression = function(useExp) { #region + INLINE + if(expUse == useExp) return; + expUse = useExp; + node.triggerRender(); + } #endregion + static setExpression = function(_expression) { #region expUse = true; expression = _expression; @@ -1413,7 +1420,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru break; } - if(try_get_path(path) == -1) { + if(path_get(path) == -1) { value_validation = VALIDATION.error; str = $"File not exist: {path}"; } @@ -1422,7 +1429,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru var paths = animator.getValue(); if(is_array(paths)) { for( var i = 0, n = array_length(paths); i < n; i++ ) { - if(try_get_path(paths[i]) != -1) continue; + if(path_get(paths[i]) != -1) continue; value_validation = VALIDATION.error; str = "File not exist: " + string(paths[i]); } @@ -2216,36 +2223,38 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru _v[| i].value = unit.convertUnit(_v[| i].value, mode); } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region if(type != VALUE_TYPE.integer && type != VALUE_TYPE.float) return -1; if(value_from != noone) return -1; if(expUse) return -1; + var arc = 9; + switch(display_type) { case VALUE_DISPLAY._default : - var _angle = argument_count > 8? argument[ 8] : 0; - var _scale = argument_count > 9? argument[ 9] : 1; - var _spr = argument_count > 10? argument[10] : THEME.anchor_selector; + var _angle = argument_count > arc + 0? argument[arc + 0] : 0; + var _scale = argument_count > arc + 1? argument[arc + 1] : 1; + var _spr = argument_count > arc + 2? argument[arc + 2] : THEME.anchor_selector; return preview_overlay_scalar(isLeaf(), active, _x, _y, _s, _mx, _my, _snx, _sny, _angle, _scale, _spr); case VALUE_DISPLAY.rotation : - var _rad = argument_count > 8? argument[ 8] : 64; + var _rad = argument_count > arc + 0? argument[ arc + 0] : 64; return preview_overlay_rotation(isLeaf(), active, _x, _y, _s, _mx, _my, _snx, _sny, _rad); case VALUE_DISPLAY.vector : - var _spr = argument_count > 8? argument[8] : THEME.anchor_selector; - var _sca = argument_count > 9? argument[9] : 1; + var _spr = argument_count > arc + 0? argument[arc + 0] : THEME.anchor_selector; + var _sca = argument_count > arc + 1? argument[arc + 1] : 1; return preview_overlay_vector(isLeaf(), active, _x, _y, _s, _mx, _my, _snx, _sny, _spr); case VALUE_DISPLAY.gradient_range : - var _dim = argument[8]; + var _dim = argument[arc]; if(mappedJunc.attributes.mapped) return preview_overlay_gradient_range(isLeaf(), active, _x, _y, _s, _mx, _my, _snx, _sny, _dim); break; case VALUE_DISPLAY.area : - var _flag = argument_count > 8? argument[8] : 0b0011; + var _flag = argument_count > arc + 0? argument[arc + 0] : 0b0011; return preview_overlay_area(isLeaf(), active, _x, _y, _s, _mx, _my, _snx, _sny, _flag, struct_try_get(display_data, "onSurfaceSize")); case VALUE_DISPLAY.puppet_control : @@ -2407,6 +2416,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru if(value_from) return true; if(!visible) return false; + if(index == -1) return true; + if(is_array(node.input_display_list)) return array_exists(node.input_display_list, index); return true; @@ -2653,8 +2664,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru } #endregion static cleanUp = function() { #region - animator.cleanUp(); - delete animator; + } #endregion static toString = function() { return (connect_type == JUNCTION_CONNECT.input? "Input" : "Output") + $" junction {index} of [{name}]: {node}"; } diff --git a/scripts/node_vector2/node_vector2.gml b/scripts/node_vector2/node_vector2.gml index 1b75387c3..8db983093 100644 --- a/scripts/node_vector2/node_vector2.gml +++ b/scripts/node_vector2/node_vector2.gml @@ -56,7 +56,7 @@ function Node_Vector2(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c }), ]; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var __ax = getInputData(0); var __ay = getInputData(1); diff --git a/scripts/node_vignette/node_vignette.gml b/scripts/node_vignette/node_vignette.gml index 51a0a94ef..5bfdb5549 100644 --- a/scripts/node_vignette/node_vignette.gml +++ b/scripts/node_vignette/node_vignette.gml @@ -1,7 +1,7 @@ function Node_Vignette(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Vignette"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; diff --git a/scripts/node_warp/node_warp.gml b/scripts/node_warp/node_warp.gml index febb47552..be7d61c34 100644 --- a/scripts/node_warp/node_warp.gml +++ b/scripts/node_warp/node_warp.gml @@ -1,7 +1,7 @@ function Node_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Warp"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Top left", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] ) .setDisplay(VALUE_DISPLAY.vector) @@ -70,7 +70,7 @@ function Node_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons dimension_index = _useDim? 7 : 0; } #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny, params) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, params) { #region PROCESSOR_OVERLAY_CHECK var _surf = outputs[| 0].getValue(); @@ -234,10 +234,10 @@ function Node_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons } } - if(inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; - if(inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; - if(inputs[| 3].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; - if(inputs[| 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; #endregion } #endregion diff --git a/scripts/node_wav_file_read/node_wav_file_read.gml b/scripts/node_wav_file_read/node_wav_file_read.gml index b2194bd39..3016f33ee 100644 --- a/scripts/node_wav_file_read/node_wav_file_read.gml +++ b/scripts/node_wav_file_read/node_wav_file_read.gml @@ -35,7 +35,7 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const .setDisplay(VALUE_DISPLAY.path_load, { filter: "audio|*.wav" }) .rejectArray(); - inputs[| 1] = nodeValue("Sync lenght", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) + inputs[| 1] = nodeValue("Sync length", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, 0) .setDisplay(VALUE_DISPLAY.button, { name: "Sync", onClick: function() { if(content == noone) return; var frm = max(1, ceil(content.duration * PROJECT.animator.framerate)); @@ -59,8 +59,13 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const outputs[| 4] = nodeValue("Duration (s)", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0) .setVisible(false); - content = noone; + content = noone; path_current = ""; + edit_time = 0; + + attributes.file_checker = true; + array_push(attributeEditors, [ "File Watcher", function() { return attributes.file_checker; }, + new checkBox(function() { attributes.file_checker = !attributes.file_checker; }) ]); first_update = false; @@ -100,12 +105,12 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const } #endregion function updatePaths(path) { #region - path = try_get_path(path); if(path == -1) return false; if(path_current == "") first_update = true; path_current = path; + edit_time = max(edit_time, file_get_modify_s(path_current)); var ext = string_lower(filename_ext(path)); var _name = string_replace(filename_name(path), filename_ext(path), ""); @@ -191,12 +196,18 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const if(!audio_is_playing(preview_audio)) preview_id = audio_play_sound(preview_audio, 1, false, attributes.preview_gain, dur); } + + if(attributes.file_checker && path_current != "") { + if(file_get_modify_s(path_current) > edit_time) { + updatePaths(); + triggerRender(); + } + } } #endregion static update = function(frame = CURRENT_FRAME) { #region - var path = getInputData(0); + var path = path_get(getInputData(0)); var mono = getInputData(2); - if(path == "") return; if(path_current != path) updatePaths(path); if(!is_instanceof(content, audioObject)) return; diff --git a/scripts/node_wrap_area/node_wrap_area.gml b/scripts/node_wrap_area/node_wrap_area.gml index e07307b18..573f4632b 100644 --- a/scripts/node_wrap_area/node_wrap_area.gml +++ b/scripts/node_wrap_area/node_wrap_area.gml @@ -1,7 +1,7 @@ function Node_Wrap_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Area Warp"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); onSurfaceSize = function() { return surface_get_dimension(getInputData(0)); }; inputs[| 1] = nodeValue("Area", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 16, 16, 4, 4, AREA_SHAPE.rectangle ]) @@ -35,8 +35,8 @@ function Node_Wrap_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } } if(!LOADING && !APPENDING) run_in(1, function() { onValueFromUpdate(0); }) #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_wrap_perspective/node_wrap_perspective.gml b/scripts/node_wrap_perspective/node_wrap_perspective.gml index 3402475a3..9370a9eac 100644 --- a/scripts/node_wrap_perspective/node_wrap_perspective.gml +++ b/scripts/node_wrap_perspective/node_wrap_perspective.gml @@ -1,7 +1,7 @@ function Node_Warp_Perspective(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Perspective Warp"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; @@ -54,7 +54,7 @@ function Node_Warp_Perspective(_x, _y, _group = noone) : Node_Processor(_x, _y, drag_my = 0; drag_s = [[0, 0], [0, 0]]; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { if(array_length(current_data) < ds_list_size(inputs)) return; var _surf = outputs[| 0].getValue(); @@ -96,10 +96,10 @@ function Node_Warp_Perspective(_x, _y, _group = noone) : Node_Processor(_x, _y, draw_line(br[0], br[1], tr[0], tr[1]); draw_line(br[0], br[1], bl[0], bl[1]); - if(inputs[| tool * 4 + 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; - if(inputs[| tool * 4 + 3].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; - if(inputs[| tool * 4 + 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; - if(inputs[| tool * 4 + 5].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[| tool * 4 + 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[| tool * 4 + 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[| tool * 4 + 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; + if(inputs[| tool * 4 + 5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; var dx = 0; var dy = 0; @@ -186,10 +186,10 @@ function Node_Warp_Perspective(_x, _y, _group = noone) : Node_Processor(_x, _y, } } - inputs[| tool * 4 + 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| tool * 4 + 3].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| tool * 4 + 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| tool * 4 + 5].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| tool * 4 + 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| tool * 4 + 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| tool * 4 + 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); + inputs[| tool * 4 + 5].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_zigzag/node_zigzag.gml b/scripts/node_zigzag/node_zigzag.gml index 7b264195d..21bc68458 100644 --- a/scripts/node_zigzag/node_zigzag.gml +++ b/scripts/node_zigzag/node_zigzag.gml @@ -34,8 +34,8 @@ function Node_Zigzag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co attribute_surface_depth(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } static step = function() { #region diff --git a/scripts/pack_best_fit/pack_best_fit.gml b/scripts/pack_best_fit/pack_best_fit.gml index 0cfc0f236..597b45500 100644 --- a/scripts/pack_best_fit/pack_best_fit.gml +++ b/scripts/pack_best_fit/pack_best_fit.gml @@ -26,25 +26,25 @@ function sprite_pack_best_fit(rectangles) { var bestSpace = noone; var bestArea = new Rectangle(0, 0, 0, 0); - for (var xx = area.x; xx <= area.x + area.w; xx += grW) { - for (var yy = area.y; yy <= area.y + area.h; yy += grH) { - var space = new Rectangle(xx, yy, rect.w, rect.h); - if (space.x + space.w > area.x + area.w || space.y + space.h > area.y + area.h) - continue; + + for (var xx = area.x; xx <= area.x + area.w; xx += grW) + for (var yy = area.y; yy <= area.y + area.h; yy += grH) { + var space = new Rectangle(xx, yy, rect.w, rect.h); + if (space.x + space.w > area.x + area.w || space.y + space.h > area.y + area.h) + continue; - var overlaps = false; - for (var j = 0; j < i; j++) { - var otherRect = rectangles[j]; - if (rectangleOverlap(space, otherRect)) { - overlaps = true; - break; - } + var overlaps = false; + for (var j = 0; j < i; j++) { + var otherRect = rectangles[j]; + if (rectangleOverlap(space, otherRect)) { + overlaps = true; + break; } + } - if (!overlaps && (bestSpace == noone || space.w * space.h < bestSpace.w * bestSpace.h)) { - bestSpace = space; - bestArea = new Rectangle(area.x, area.y, area.w, area.h); - } + if (!overlaps && (bestSpace == noone || space.w * space.h < bestSpace.w * bestSpace.h)) { + bestSpace = space; + bestArea = new Rectangle(area.x, area.y, area.w, area.h); } } diff --git a/scripts/pack_bottom_left/pack_bottom_left.gml b/scripts/pack_bottom_left/pack_bottom_left.gml index ff65d067b..a754e1a82 100644 --- a/scripts/pack_bottom_left/pack_bottom_left.gml +++ b/scripts/pack_bottom_left/pack_bottom_left.gml @@ -3,9 +3,7 @@ function sprite_pack_bottom_left(rectangles, height = 999999) { var maxW = 0; var maxH = 0; - array_sort(rectangles, function(a, b) { - return b.h - a.h; - }); + array_sort(rectangles, function(a, b) { return b.h - a.h; }); var xx = 0; for (var i = 0; i < array_length(rectangles); i++) { diff --git a/scripts/panel_graph/panel_graph.gml b/scripts/panel_graph/panel_graph.gml index beb28ba3f..6fcfefae1 100644 --- a/scripts/panel_graph/panel_graph.gml +++ b/scripts/panel_graph/panel_graph.gml @@ -1079,12 +1079,13 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { }, THEME.cross)); } } - - var ctx = is_instanceof(frame_hovering, Node_Collection_Inline)? frame_hovering : getCurrentContext(); - callAddDialog(ctx); - menuCall("graph_node_selected_menu", o_dialog_add_node.dialog_x - ui(8), o_dialog_add_node.dialog_y + ui(4), menu, fa_right ); - setFocus(o_dialog_add_node.id, "Dialog"); + var ctx = is_instanceof(frame_hovering, Node_Collection_Inline)? frame_hovering : getCurrentContext(); + var _diaAdd = callAddDialog(ctx); + + var _dia = menuCall("graph_node_selected_menu", o_dialog_add_node.dialog_x - ui(8), o_dialog_add_node.dialog_y + ui(4), menu, fa_right ); + _dia.passthrough = true; + setFocus(_diaAdd, "Dialog"); } } #endregion @@ -1377,7 +1378,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { if(mouse_release(mb_left)) { // CONNECT junction var _connect = [ 0, noone, noone ]; - if(target != noone) { + if(PANEL_INSPECTOR && PANEL_INSPECTOR.attribute_hovering != noone) { + PANEL_INSPECTOR.attribute_hovering(value_dragging); + } else if(target != noone) { var _addInput = false; if(target.isLeaf() && target.connect_type == JUNCTION_CONNECT.input && target.node.auto_input) _addInput = true; @@ -1412,7 +1415,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { } } - value_dragging = noone; + value_dragging = noone; connection_draw_mouse = noone; if(_connect[0] == -9) { @@ -1509,8 +1512,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { } #endregion function callAddDialog(ctx = getCurrentContext()) { #region + var _dia = dialogCall(o_dialog_add_node, mouse_mx + 8, mouse_my + 8, { context: ctx }); - with(dialogCall(o_dialog_add_node, mouse_mx + 8, mouse_my + 8, { context: ctx })) { + with(_dia) { node_target_x = other.mouse_grid_x; node_target_y = other.mouse_grid_y; junction_hovering = other.junction_hovering; @@ -1518,6 +1522,8 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { resetPosition(); alarm[0] = 1; } + + return _dia; } #endregion function drawContext() { #region diff --git a/scripts/panel_inspector/panel_inspector.gml b/scripts/panel_inspector/panel_inspector.gml index e9080bcbf..0aa09a3b2 100644 --- a/scripts/panel_inspector/panel_inspector.gml +++ b/scripts/panel_inspector/panel_inspector.gml @@ -221,7 +221,7 @@ function Panel_Inspector() : PanelContent() constructor { } #endregion static drawMeta = function(_y, _m) { #region - var con_w = contentPane.surface_w - ui(4); + var con_w = contentPane.surface_w - ui(4); var _hover = pHOVER && contentPane.hover; var context = PANEL_GRAPH.getCurrentContext(); @@ -235,6 +235,8 @@ function Panel_Inspector() : PanelContent() constructor { var rx = x + ui(16); var ry = y + top_bar_h; + attribute_hovering = noone; + for( var i = 0, n = array_length(meta_display); i < n; i++ ) { if(i == 3) { var context = PANEL_GRAPH.getCurrentContext(); @@ -280,7 +282,11 @@ function Panel_Inspector() : PanelContent() constructor { var title = _edt[j][0]; var param = _edt[j][1]; var editW = _edt[j][2]; + var drpFn = _edt[j][3]; + var widx = ui(8); + var widy = yy; + draw_set_text(f_p0, fa_left, fa_top, COLORS._main_text_inner); draw_text_add(ui(16), yy, __txt(title)); yy += line_get_height() + ui(6); @@ -288,12 +294,22 @@ function Panel_Inspector() : PanelContent() constructor { editW.setFocusHover(pFOCUS, _hover); if(pFOCUS) editW.register(contentPane); - + var wh = 0; - var _data = PROJECT.attributes[$ param]; - - wh = editW.drawParam(new widgetParam(ui(16), yy, w - ui(16 + 48), TEXTBOX_HEIGHT, _data, {}, _m, rx, ry)); - + var _data = PROJECT.attributes[$ param]; + var _param = new widgetParam(ui(16), yy, w - ui(16 + 48), TEXTBOX_HEIGHT, _data, {}, _m, rx, ry); + + wh = editW.drawParam(_param); + + var jun = PANEL_GRAPH.value_dragging; + var widw = con_w - ui(16); + var widh = line_get_height() + ui(6) + wh + ui(4); + + if(jun != noone && _hover && point_in_rectangle(_m[0], _m[1], widx, widy, widx + widw, widy + widh)) { + draw_sprite_stretched_ext(THEME.ui_panel_active, 0, widx, widy, widw, widh, COLORS._main_value_positive, 1); + attribute_hovering = drpFn; + } + yy += wh + ui(8); hh += wh + ui(8); } diff --git a/scripts/panel_preview/panel_preview.gml b/scripts/panel_preview/panel_preview.gml index 99d55ae90..db90f6b66 100644 --- a/scripts/panel_preview/panel_preview.gml +++ b/scripts/panel_preview/panel_preview.gml @@ -1177,13 +1177,13 @@ function Panel_Preview() : PanelContent() constructor { _sny = PROJECT.previewGrid.size[1]; } - _node.drawOverlay(overlayHover, cx, cy, canvas_s, _mx, _my, _snx, _sny, params); + _node.drawOverlay(isHover, overlayHover, cx, cy, canvas_s, _mx, _my, _snx, _sny, params); } #region node overlay overlay_hovering = false; - if(_node.drawPreviewToolOverlay(pHOVER && pFOCUS, _mx, _my, { x, y, w, h, toolbar_height, + if(_node.drawPreviewToolOverlay(pHOVER, pFOCUS, _mx, _my, { x, y, w, h, toolbar_height, x0: _node.tools == -1? 0 : ui(40), x1: w, y0: toolbar_height - ui(8), diff --git a/scripts/path_parser/path_parser.gml b/scripts/path_parser/path_parser.gml index 47e662e94..bd2d22337 100644 --- a/scripts/path_parser/path_parser.gml +++ b/scripts/path_parser/path_parser.gml @@ -1,10 +1,23 @@ -function try_get_path(path) { - if(file_exists_empty(path)) - return path; +function __path_get(path) { + INLINE + + if(file_exists_empty(path)) return path; - var local_path = filename_dir(PROJECT.path) + "/" + path; + var local_path = $"{filename_dir(PROJECT.path)}/{path}"; if(file_exists_empty(local_path)) return local_path; return -1; +} + +function path_get(path) { + INLINE + + if(!is_array(path)) return __path_get(path); + + var _res = array_create(array_length(path)); + for( var i = 0, n = array_length(path); i < n; i++ ) + _res[i] = __path_get(path[i]); + + return _res; } \ No newline at end of file diff --git a/scripts/preferences/preferences.gml b/scripts/preferences/preferences.gml index a292856f9..166d97dda 100644 --- a/scripts/preferences/preferences.gml +++ b/scripts/preferences/preferences.gml @@ -96,6 +96,8 @@ PREFERENCES.caret_blink = 0.75; + PREFERENCES.add_node_remember = true; + PREFERENCES_DEF = variable_clone(PREFERENCES); #endregion diff --git a/scripts/project_data/project_data.gml b/scripts/project_data/project_data.gml index f3550fe4c..16adf0e1c 100644 --- a/scripts/project_data/project_data.gml +++ b/scripts/project_data/project_data.gml @@ -13,9 +13,9 @@ version = SAVE_VERSION; /// @is {number} seed = irandom_range(100000, 999999); /// @is {number} - modified = false; /// @is {bool} - readonly = false; /// @is {bool} - safeMode = false; + modified = false; /// @is {bool} + readonly = false; /// @is {bool} + safeMode = false; nodes = ds_list_create(); nodeArray = []; @@ -63,15 +63,48 @@ palette_fix : false, } - var _bpal = new buttonPalette(function(pal) { setPalette(pal); RENDER_ALL return true; }); - - //_bpal.side_button = button(function() { attributes.palette_fix = !attributes.palette_fix; RENDER_ALL return true; }) - // .setIcon( THEME.project_fix_palette, [ function() { return attributes.palette_fix; } ], COLORS._main_icon ) - // .setTooltip("Fix palette"); - attributeEditor = [ - [ "Default Surface", "surface_dimension", new vectorBox(2, function(ind, val) { attributes.surface_dimension[ind] = val; RENDER_ALL return true; }) ], - [ "Palette", "palette", _bpal ], + [ "Default Surface", "surface_dimension", new vectorBox(2, function(ind, val) { attributes.surface_dimension[ind] = val; RENDER_ALL return true; }), + function(junc) { + if(!is_struct(junc)) return; + if(!is_instanceof(junc, NodeValue)) return; + + var attr = attributes.surface_dimension; + var _val = junc.getValue(); + var _res = [ attr[0], attr[1] ]; + + switch(junc.type) { + case VALUE_TYPE.float : + case VALUE_TYPE.integer : + if(is_real(_val)) + _res = [ _val, _val ]; + else if(is_array(_val) && array_length(_val) >= 2) { + _res[0] = is_real(_val[0])? _val[0] : 1; + _res[1] = is_real(_val[1])? _val[1] : 1; + } + break; + + case VALUE_TYPE.surface : + if(is_array(_val)) _val = array_safe_get(_val, 0); + if(is_surface(_val)) + _res = surface_get_dimension(_val); + break; + } + + attr[0] = _res[0]; + attr[1] = _res[1]; + } ], + + [ "Palette", "palette", new buttonPalette(function(pal) { setPalette(pal); RENDER_ALL return true; }), + function(junc) { + if(!is_struct(junc)) return; + if(!is_instanceof(junc, NodeValue)) return; + if(junc.type != VALUE_TYPE.color) return; + if(junc.display_type != VALUE_DISPLAY.palette) return; + + setPalette(junc.getValue()); + } + ], ]; static setPalette = function(pal = noone) { diff --git a/scripts/render_data/render_data.gml b/scripts/render_data/render_data.gml index 7beb4ccf3..7451754e2 100644 --- a/scripts/render_data/render_data.gml +++ b/scripts/render_data/render_data.gml @@ -64,7 +64,7 @@ function NodeTopoSort() { #region } ds_list_clear(PROJECT.nodeTopo); - topoSort(PROJECT.nodeTopo, PROJECT.nodes); + __topoSort(PROJECT.nodeTopo, PROJECT.nodes); LOG_IF(global.FLAG.render == 1, $"+++++++ Topo Sort Completed: {ds_list_size(PROJECT.nodeTopo)} nodes sorted in {(get_timer() - _t) / 1000} ms +++++++"); } #endregion @@ -86,7 +86,7 @@ function __sortNode(_list, _node) { #region if(array_empty(_childs)) { if(is_instanceof(_node, Node_Collection) && !_node.managedRenderOrder) - topoSort(_list, _node.nodes); + __topoSort(_list, _node.nodes); } else { for( var i = 0, n = array_length(_childs); i < n; i++ ) @@ -101,12 +101,10 @@ function __sortNode(_list, _node) { #region } } #endregion -function topoSort(_list, _nodeList) { #region +function __topoSort(_list, _nodeList) { #region var _root = []; var _leftOver = []; - //print($"Sorting..."); - for( var i = 0, n = ds_list_size(_nodeList); i < n; i++ ) { var _node = _nodeList[| i]; var _isRoot = true; @@ -132,8 +130,6 @@ function topoSort(_list, _nodeList) { #region if(_isRoot) array_push(_root, _node); } - //print($" > Roots: {_root}"); - for( var i = 0, n = array_length(_root); i < n; i++ ) __sortNode(_list, _root[i]); @@ -148,7 +144,7 @@ function NodeListSort(_list, _nodeList) { #region _nodeList[| i].topoSorted = false; ds_list_clear(_list); - topoSort(_list, _nodeList); + __topoSort(_list, _nodeList); } #endregion function __nodeIsRenderLeaf(_node) { #region diff --git a/sprites/s_node_byte_file_read/09941d0a-3bfe-4452-9cf1-33da4f83fb67.png b/sprites/s_node_byte_file_read/09941d0a-3bfe-4452-9cf1-33da4f83fb67.png new file mode 100644 index 000000000..2505bf78b Binary files /dev/null and b/sprites/s_node_byte_file_read/09941d0a-3bfe-4452-9cf1-33da4f83fb67.png differ diff --git a/sprites/s_node_byte_file_read/layers/09941d0a-3bfe-4452-9cf1-33da4f83fb67/73bb7ea0-23d2-4c09-acba-ffb7bdb51acd.png b/sprites/s_node_byte_file_read/layers/09941d0a-3bfe-4452-9cf1-33da4f83fb67/73bb7ea0-23d2-4c09-acba-ffb7bdb51acd.png new file mode 100644 index 000000000..2505bf78b Binary files /dev/null and b/sprites/s_node_byte_file_read/layers/09941d0a-3bfe-4452-9cf1-33da4f83fb67/73bb7ea0-23d2-4c09-acba-ffb7bdb51acd.png differ diff --git a/sprites/s_node_byte_file_read/s_node_byte_file_read.yy b/sprites/s_node_byte_file_read/s_node_byte_file_read.yy new file mode 100644 index 000000000..41a8054d3 --- /dev/null +++ b/sprites/s_node_byte_file_read/s_node_byte_file_read.yy @@ -0,0 +1,74 @@ +{ + "resourceType": "GMSprite", + "resourceVersion": "1.0", + "name": "s_node_byte_file_read", + "bbox_bottom": 63, + "bbox_left": 0, + "bbox_right": 63, + "bbox_top": 1, + "bboxMode": 0, + "collisionKind": 1, + "collisionTolerance": 0, + "DynamicTexturePage": false, + "edgeFiltering": false, + "For3D": false, + "frames": [ + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"09941d0a-3bfe-4452-9cf1-33da4f83fb67",}, + ], + "gridX": 0, + "gridY": 0, + "height": 64, + "HTile": false, + "layers": [ + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"73bb7ea0-23d2-4c09-acba-ffb7bdb51acd","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + ], + "nineSlice": null, + "origin": 4, + "parent": { + "name": "IO", + "path": "folders/nodes/icons/IO.yy", + }, + "preMultiplyAlpha": false, + "sequence": { + "resourceType": "GMSequence", + "resourceVersion": "1.4", + "name": "s_node_byte_file_read", + "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":"09941d0a-3bfe-4452-9cf1-33da4f83fb67","path":"sprites/s_node_byte_file_read/s_node_byte_file_read.yy",},},},"Disabled":false,"id":"54194e15-a84f-4e21-8355-38c49e7b828f","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_byte_file_write/0eaa8003-157f-4ef6-b4bc-ecbc3987be17.png b/sprites/s_node_byte_file_write/0eaa8003-157f-4ef6-b4bc-ecbc3987be17.png new file mode 100644 index 000000000..28f249d7a Binary files /dev/null and b/sprites/s_node_byte_file_write/0eaa8003-157f-4ef6-b4bc-ecbc3987be17.png differ diff --git a/sprites/s_node_byte_file_write/layers/0eaa8003-157f-4ef6-b4bc-ecbc3987be17/c5d46dc6-9208-4fea-8e67-042a0d9c58b7.png b/sprites/s_node_byte_file_write/layers/0eaa8003-157f-4ef6-b4bc-ecbc3987be17/c5d46dc6-9208-4fea-8e67-042a0d9c58b7.png new file mode 100644 index 000000000..28f249d7a Binary files /dev/null and b/sprites/s_node_byte_file_write/layers/0eaa8003-157f-4ef6-b4bc-ecbc3987be17/c5d46dc6-9208-4fea-8e67-042a0d9c58b7.png differ diff --git a/sprites/s_node_byte_file_write/s_node_byte_file_write.yy b/sprites/s_node_byte_file_write/s_node_byte_file_write.yy new file mode 100644 index 000000000..e0e2d4b43 --- /dev/null +++ b/sprites/s_node_byte_file_write/s_node_byte_file_write.yy @@ -0,0 +1,74 @@ +{ + "resourceType": "GMSprite", + "resourceVersion": "1.0", + "name": "s_node_byte_file_write", + "bbox_bottom": 63, + "bbox_left": 0, + "bbox_right": 63, + "bbox_top": 1, + "bboxMode": 0, + "collisionKind": 1, + "collisionTolerance": 0, + "DynamicTexturePage": false, + "edgeFiltering": false, + "For3D": false, + "frames": [ + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"0eaa8003-157f-4ef6-b4bc-ecbc3987be17",}, + ], + "gridX": 0, + "gridY": 0, + "height": 64, + "HTile": false, + "layers": [ + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"c5d46dc6-9208-4fea-8e67-042a0d9c58b7","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + ], + "nineSlice": null, + "origin": 4, + "parent": { + "name": "IO", + "path": "folders/nodes/icons/IO.yy", + }, + "preMultiplyAlpha": false, + "sequence": { + "resourceType": "GMSequence", + "resourceVersion": "1.4", + "name": "s_node_byte_file_write", + "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":"0eaa8003-157f-4ef6-b4bc-ecbc3987be17","path":"sprites/s_node_byte_file_write/s_node_byte_file_write.yy",},},},"Disabled":false,"id":"b2a89c29-b081-43c5-b91a-06cbbb991e26","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_csv_file_read/59746e35-8a9c-4624-8676-8eefedf4b76e.png b/sprites/s_node_csv_file_read/59746e35-8a9c-4624-8676-8eefedf4b76e.png deleted file mode 100644 index 5e44c9f8a..000000000 Binary files a/sprites/s_node_csv_file_read/59746e35-8a9c-4624-8676-8eefedf4b76e.png and /dev/null differ diff --git a/sprites/s_node_csv_file_read/a65b6a5b-56f0-424f-b384-c99ee314f30e.png b/sprites/s_node_csv_file_read/a65b6a5b-56f0-424f-b384-c99ee314f30e.png new file mode 100644 index 000000000..2614d5e76 Binary files /dev/null and b/sprites/s_node_csv_file_read/a65b6a5b-56f0-424f-b384-c99ee314f30e.png differ diff --git a/sprites/s_node_csv_file_read/layers/59746e35-8a9c-4624-8676-8eefedf4b76e/61553495-93d6-4951-ac0b-4f9302aada09.png b/sprites/s_node_csv_file_read/layers/59746e35-8a9c-4624-8676-8eefedf4b76e/61553495-93d6-4951-ac0b-4f9302aada09.png deleted file mode 100644 index 5e44c9f8a..000000000 Binary files a/sprites/s_node_csv_file_read/layers/59746e35-8a9c-4624-8676-8eefedf4b76e/61553495-93d6-4951-ac0b-4f9302aada09.png and /dev/null differ diff --git a/sprites/s_node_csv_file_read/layers/a65b6a5b-56f0-424f-b384-c99ee314f30e/bf597068-214e-4b87-aa51-281d01051226.png b/sprites/s_node_csv_file_read/layers/a65b6a5b-56f0-424f-b384-c99ee314f30e/bf597068-214e-4b87-aa51-281d01051226.png new file mode 100644 index 000000000..2614d5e76 Binary files /dev/null and b/sprites/s_node_csv_file_read/layers/a65b6a5b-56f0-424f-b384-c99ee314f30e/bf597068-214e-4b87-aa51-281d01051226.png differ diff --git a/sprites/s_node_csv_file_read/s_node_csv_file_read.yy b/sprites/s_node_csv_file_read/s_node_csv_file_read.yy index 637135f9f..628755982 100644 --- a/sprites/s_node_csv_file_read/s_node_csv_file_read.yy +++ b/sprites/s_node_csv_file_read/s_node_csv_file_read.yy @@ -13,14 +13,14 @@ "edgeFiltering": false, "For3D": false, "frames": [ - {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"59746e35-8a9c-4624-8676-8eefedf4b76e",}, + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"a65b6a5b-56f0-424f-b384-c99ee314f30e",}, ], "gridX": 0, "gridY": 0, "height": 64, "HTile": false, "layers": [ - {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"61553495-93d6-4951-ac0b-4f9302aada09","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"bf597068-214e-4b87-aa51-281d01051226","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, ], "nineSlice": null, "origin": 4, @@ -54,7 +54,7 @@ "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":"59746e35-8a9c-4624-8676-8eefedf4b76e","path":"sprites/s_node_csv_file_read/s_node_csv_file_read.yy",},},},"Disabled":false,"id":"612ebeec-3719-4f68-a476-9379c28747cd","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"a65b6a5b-56f0-424f-b384-c99ee314f30e","path":"sprites/s_node_csv_file_read/s_node_csv_file_read.yy",},},},"Disabled":false,"id":"863871fd-11cc-450a-ad68-cbc9d96512d8","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, ], "visibleRange": null, diff --git a/sprites/s_node_csv_file_write/5056ed3c-88f5-426c-93a0-241530cdd87a.png b/sprites/s_node_csv_file_write/5056ed3c-88f5-426c-93a0-241530cdd87a.png new file mode 100644 index 000000000..215ca2b35 Binary files /dev/null and b/sprites/s_node_csv_file_write/5056ed3c-88f5-426c-93a0-241530cdd87a.png differ diff --git a/sprites/s_node_csv_file_write/8f1efea1-d911-4244-8e8f-f84b5f07e265.png b/sprites/s_node_csv_file_write/8f1efea1-d911-4244-8e8f-f84b5f07e265.png deleted file mode 100644 index 21580a7b4..000000000 Binary files a/sprites/s_node_csv_file_write/8f1efea1-d911-4244-8e8f-f84b5f07e265.png and /dev/null differ diff --git a/sprites/s_node_csv_file_write/layers/5056ed3c-88f5-426c-93a0-241530cdd87a/4b9b0bbb-ea29-4526-a38f-2152f2a31447.png b/sprites/s_node_csv_file_write/layers/5056ed3c-88f5-426c-93a0-241530cdd87a/4b9b0bbb-ea29-4526-a38f-2152f2a31447.png new file mode 100644 index 000000000..215ca2b35 Binary files /dev/null and b/sprites/s_node_csv_file_write/layers/5056ed3c-88f5-426c-93a0-241530cdd87a/4b9b0bbb-ea29-4526-a38f-2152f2a31447.png differ diff --git a/sprites/s_node_csv_file_write/layers/8f1efea1-d911-4244-8e8f-f84b5f07e265/4242e5f2-a92f-441f-a61f-332c1fccc063.png b/sprites/s_node_csv_file_write/layers/8f1efea1-d911-4244-8e8f-f84b5f07e265/4242e5f2-a92f-441f-a61f-332c1fccc063.png deleted file mode 100644 index 21580a7b4..000000000 Binary files a/sprites/s_node_csv_file_write/layers/8f1efea1-d911-4244-8e8f-f84b5f07e265/4242e5f2-a92f-441f-a61f-332c1fccc063.png and /dev/null differ diff --git a/sprites/s_node_csv_file_write/s_node_csv_file_write.yy b/sprites/s_node_csv_file_write/s_node_csv_file_write.yy index 1abf947c9..b640830a3 100644 --- a/sprites/s_node_csv_file_write/s_node_csv_file_write.yy +++ b/sprites/s_node_csv_file_write/s_node_csv_file_write.yy @@ -13,14 +13,14 @@ "edgeFiltering": false, "For3D": false, "frames": [ - {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"8f1efea1-d911-4244-8e8f-f84b5f07e265",}, + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"5056ed3c-88f5-426c-93a0-241530cdd87a",}, ], "gridX": 0, "gridY": 0, "height": 64, "HTile": false, "layers": [ - {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"4242e5f2-a92f-441f-a61f-332c1fccc063","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"4b9b0bbb-ea29-4526-a38f-2152f2a31447","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, ], "nineSlice": null, "origin": 4, @@ -54,7 +54,7 @@ "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":"8f1efea1-d911-4244-8e8f-f84b5f07e265","path":"sprites/s_node_csv_file_write/s_node_csv_file_write.yy",},},},"Disabled":false,"id":"6bf115b8-4fbf-42fb-8172-f1947b067122","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"5056ed3c-88f5-426c-93a0-241530cdd87a","path":"sprites/s_node_csv_file_write/s_node_csv_file_write.yy",},},},"Disabled":false,"id":"ba118426-351d-43b7-a821-2a5ebbf286db","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, ], "visibleRange": null, diff --git a/sprites/s_node_json_file_read/1e63bb4b-0c46-47b5-b9f2-7fcac7a18e48.png b/sprites/s_node_json_file_read/1e63bb4b-0c46-47b5-b9f2-7fcac7a18e48.png new file mode 100644 index 000000000..4b7c591a5 Binary files /dev/null and b/sprites/s_node_json_file_read/1e63bb4b-0c46-47b5-b9f2-7fcac7a18e48.png differ diff --git a/sprites/s_node_json_file_read/544e3062-0349-46ed-91f5-9f4543ed3b38.png b/sprites/s_node_json_file_read/544e3062-0349-46ed-91f5-9f4543ed3b38.png deleted file mode 100644 index 3dabffc1f..000000000 Binary files a/sprites/s_node_json_file_read/544e3062-0349-46ed-91f5-9f4543ed3b38.png and /dev/null differ diff --git a/sprites/s_node_json_file_read/layers/1e63bb4b-0c46-47b5-b9f2-7fcac7a18e48/cdd5f205-6187-4180-ae8a-0bc0ffbe4928.png b/sprites/s_node_json_file_read/layers/1e63bb4b-0c46-47b5-b9f2-7fcac7a18e48/cdd5f205-6187-4180-ae8a-0bc0ffbe4928.png new file mode 100644 index 000000000..4b7c591a5 Binary files /dev/null and b/sprites/s_node_json_file_read/layers/1e63bb4b-0c46-47b5-b9f2-7fcac7a18e48/cdd5f205-6187-4180-ae8a-0bc0ffbe4928.png differ diff --git a/sprites/s_node_json_file_read/layers/544e3062-0349-46ed-91f5-9f4543ed3b38/71f87406-6969-4ed3-8bae-a0a16b96ea70.png b/sprites/s_node_json_file_read/layers/544e3062-0349-46ed-91f5-9f4543ed3b38/71f87406-6969-4ed3-8bae-a0a16b96ea70.png deleted file mode 100644 index 3dabffc1f..000000000 Binary files a/sprites/s_node_json_file_read/layers/544e3062-0349-46ed-91f5-9f4543ed3b38/71f87406-6969-4ed3-8bae-a0a16b96ea70.png and /dev/null differ diff --git a/sprites/s_node_json_file_read/s_node_json_file_read.yy b/sprites/s_node_json_file_read/s_node_json_file_read.yy index 62311b025..52c39e5df 100644 --- a/sprites/s_node_json_file_read/s_node_json_file_read.yy +++ b/sprites/s_node_json_file_read/s_node_json_file_read.yy @@ -13,14 +13,14 @@ "edgeFiltering": false, "For3D": false, "frames": [ - {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"544e3062-0349-46ed-91f5-9f4543ed3b38",}, + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"1e63bb4b-0c46-47b5-b9f2-7fcac7a18e48",}, ], "gridX": 0, "gridY": 0, "height": 64, "HTile": false, "layers": [ - {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"71f87406-6969-4ed3-8bae-a0a16b96ea70","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"cdd5f205-6187-4180-ae8a-0bc0ffbe4928","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, ], "nineSlice": null, "origin": 4, @@ -54,7 +54,7 @@ "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":"544e3062-0349-46ed-91f5-9f4543ed3b38","path":"sprites/s_node_json_file_read/s_node_json_file_read.yy",},},},"Disabled":false,"id":"aabb6e05-7987-4575-ad78-451464117b91","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"1e63bb4b-0c46-47b5-b9f2-7fcac7a18e48","path":"sprites/s_node_json_file_read/s_node_json_file_read.yy",},},},"Disabled":false,"id":"5475ae36-4538-44ca-b639-7e37cc09fd0a","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, ], "visibleRange": null, diff --git a/sprites/s_node_json_file_write/22e621aa-1f12-4860-8436-205e6e945b46.png b/sprites/s_node_json_file_write/22e621aa-1f12-4860-8436-205e6e945b46.png new file mode 100644 index 000000000..b315d8b28 Binary files /dev/null and b/sprites/s_node_json_file_write/22e621aa-1f12-4860-8436-205e6e945b46.png differ diff --git a/sprites/s_node_json_file_write/920af631-b5b3-482c-9f81-7131062b0597.png b/sprites/s_node_json_file_write/920af631-b5b3-482c-9f81-7131062b0597.png deleted file mode 100644 index dcfac6e56..000000000 Binary files a/sprites/s_node_json_file_write/920af631-b5b3-482c-9f81-7131062b0597.png and /dev/null differ diff --git a/sprites/s_node_json_file_write/layers/22e621aa-1f12-4860-8436-205e6e945b46/60fd2805-b9d7-4f84-a617-ae4e17792da3.png b/sprites/s_node_json_file_write/layers/22e621aa-1f12-4860-8436-205e6e945b46/60fd2805-b9d7-4f84-a617-ae4e17792da3.png new file mode 100644 index 000000000..b315d8b28 Binary files /dev/null and b/sprites/s_node_json_file_write/layers/22e621aa-1f12-4860-8436-205e6e945b46/60fd2805-b9d7-4f84-a617-ae4e17792da3.png differ diff --git a/sprites/s_node_json_file_write/layers/920af631-b5b3-482c-9f81-7131062b0597/ba5b41df-ebef-4082-9daa-d4c343cfc6ed.png b/sprites/s_node_json_file_write/layers/920af631-b5b3-482c-9f81-7131062b0597/ba5b41df-ebef-4082-9daa-d4c343cfc6ed.png deleted file mode 100644 index dcfac6e56..000000000 Binary files a/sprites/s_node_json_file_write/layers/920af631-b5b3-482c-9f81-7131062b0597/ba5b41df-ebef-4082-9daa-d4c343cfc6ed.png and /dev/null differ diff --git a/sprites/s_node_json_file_write/s_node_json_file_write.yy b/sprites/s_node_json_file_write/s_node_json_file_write.yy index 345dbc240..583cbbc73 100644 --- a/sprites/s_node_json_file_write/s_node_json_file_write.yy +++ b/sprites/s_node_json_file_write/s_node_json_file_write.yy @@ -13,14 +13,14 @@ "edgeFiltering": false, "For3D": false, "frames": [ - {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"920af631-b5b3-482c-9f81-7131062b0597",}, + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"22e621aa-1f12-4860-8436-205e6e945b46",}, ], "gridX": 0, "gridY": 0, "height": 64, "HTile": false, "layers": [ - {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"ba5b41df-ebef-4082-9daa-d4c343cfc6ed","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"60fd2805-b9d7-4f84-a617-ae4e17792da3","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, ], "nineSlice": null, "origin": 4, @@ -54,7 +54,7 @@ "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":"920af631-b5b3-482c-9f81-7131062b0597","path":"sprites/s_node_json_file_write/s_node_json_file_write.yy",},},},"Disabled":false,"id":"7ae3ac33-aa8c-4448-a4d4-bd461e230713","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"22e621aa-1f12-4860-8436-205e6e945b46","path":"sprites/s_node_json_file_write/s_node_json_file_write.yy",},},},"Disabled":false,"id":"5b5bfc21-5153-4570-8cb4-f9018bcef794","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, ], "visibleRange": null, diff --git a/sprites/s_node_text_file_read/32854c1a-8616-4ac3-9960-1b941a4738a2.png b/sprites/s_node_text_file_read/32854c1a-8616-4ac3-9960-1b941a4738a2.png deleted file mode 100644 index 65b426029..000000000 Binary files a/sprites/s_node_text_file_read/32854c1a-8616-4ac3-9960-1b941a4738a2.png and /dev/null differ diff --git a/sprites/s_node_text_file_read/837626c2-2be3-41ab-8cc0-8c24fe9652ed.png b/sprites/s_node_text_file_read/837626c2-2be3-41ab-8cc0-8c24fe9652ed.png new file mode 100644 index 000000000..0272bb415 Binary files /dev/null and b/sprites/s_node_text_file_read/837626c2-2be3-41ab-8cc0-8c24fe9652ed.png differ diff --git a/sprites/s_node_text_file_read/layers/32854c1a-8616-4ac3-9960-1b941a4738a2/017e13dc-6670-43d9-907a-66709f235aad.png b/sprites/s_node_text_file_read/layers/32854c1a-8616-4ac3-9960-1b941a4738a2/017e13dc-6670-43d9-907a-66709f235aad.png deleted file mode 100644 index 65b426029..000000000 Binary files a/sprites/s_node_text_file_read/layers/32854c1a-8616-4ac3-9960-1b941a4738a2/017e13dc-6670-43d9-907a-66709f235aad.png and /dev/null differ diff --git a/sprites/s_node_text_file_read/layers/837626c2-2be3-41ab-8cc0-8c24fe9652ed/d72129fa-11d5-4404-8aea-afa16481c655.png b/sprites/s_node_text_file_read/layers/837626c2-2be3-41ab-8cc0-8c24fe9652ed/d72129fa-11d5-4404-8aea-afa16481c655.png new file mode 100644 index 000000000..0272bb415 Binary files /dev/null and b/sprites/s_node_text_file_read/layers/837626c2-2be3-41ab-8cc0-8c24fe9652ed/d72129fa-11d5-4404-8aea-afa16481c655.png differ diff --git a/sprites/s_node_text_file_read/s_node_text_file_read.yy b/sprites/s_node_text_file_read/s_node_text_file_read.yy index 058d14c88..cfa7b90f7 100644 --- a/sprites/s_node_text_file_read/s_node_text_file_read.yy +++ b/sprites/s_node_text_file_read/s_node_text_file_read.yy @@ -13,14 +13,14 @@ "edgeFiltering": false, "For3D": false, "frames": [ - {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"32854c1a-8616-4ac3-9960-1b941a4738a2",}, + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"837626c2-2be3-41ab-8cc0-8c24fe9652ed",}, ], "gridX": 0, "gridY": 0, "height": 64, "HTile": false, "layers": [ - {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"017e13dc-6670-43d9-907a-66709f235aad","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"d72129fa-11d5-4404-8aea-afa16481c655","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, ], "nineSlice": null, "origin": 4, @@ -54,7 +54,7 @@ "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":"32854c1a-8616-4ac3-9960-1b941a4738a2","path":"sprites/s_node_text_file_read/s_node_text_file_read.yy",},},},"Disabled":false,"id":"feadbbd3-66bb-4fec-b403-ca0b7493a56d","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"837626c2-2be3-41ab-8cc0-8c24fe9652ed","path":"sprites/s_node_text_file_read/s_node_text_file_read.yy",},},},"Disabled":false,"id":"13100a38-a579-4a98-9570-e8845c611dbd","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, ], "visibleRange": null, diff --git a/sprites/s_node_text_file_write/89b07064-c4f6-496b-a3f8-b99cace28835.png b/sprites/s_node_text_file_write/89b07064-c4f6-496b-a3f8-b99cace28835.png deleted file mode 100644 index 26812633e..000000000 Binary files a/sprites/s_node_text_file_write/89b07064-c4f6-496b-a3f8-b99cace28835.png and /dev/null differ diff --git a/sprites/s_node_text_file_write/d01d0d5b-77fa-433a-ad2e-80ce3722b213.png b/sprites/s_node_text_file_write/d01d0d5b-77fa-433a-ad2e-80ce3722b213.png new file mode 100644 index 000000000..b80f6308a Binary files /dev/null and b/sprites/s_node_text_file_write/d01d0d5b-77fa-433a-ad2e-80ce3722b213.png differ diff --git a/sprites/s_node_text_file_write/layers/89b07064-c4f6-496b-a3f8-b99cace28835/474efa0a-2e27-4818-aa98-a75708f4fa19.png b/sprites/s_node_text_file_write/layers/89b07064-c4f6-496b-a3f8-b99cace28835/474efa0a-2e27-4818-aa98-a75708f4fa19.png deleted file mode 100644 index 26812633e..000000000 Binary files a/sprites/s_node_text_file_write/layers/89b07064-c4f6-496b-a3f8-b99cace28835/474efa0a-2e27-4818-aa98-a75708f4fa19.png and /dev/null differ diff --git a/sprites/s_node_text_file_write/layers/d01d0d5b-77fa-433a-ad2e-80ce3722b213/5f955162-e42d-43db-8cae-634ba913384c.png b/sprites/s_node_text_file_write/layers/d01d0d5b-77fa-433a-ad2e-80ce3722b213/5f955162-e42d-43db-8cae-634ba913384c.png new file mode 100644 index 000000000..b80f6308a Binary files /dev/null and b/sprites/s_node_text_file_write/layers/d01d0d5b-77fa-433a-ad2e-80ce3722b213/5f955162-e42d-43db-8cae-634ba913384c.png differ diff --git a/sprites/s_node_text_file_write/s_node_text_file_write.yy b/sprites/s_node_text_file_write/s_node_text_file_write.yy index 73559ab1c..dac91e958 100644 --- a/sprites/s_node_text_file_write/s_node_text_file_write.yy +++ b/sprites/s_node_text_file_write/s_node_text_file_write.yy @@ -13,14 +13,14 @@ "edgeFiltering": false, "For3D": false, "frames": [ - {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"89b07064-c4f6-496b-a3f8-b99cace28835",}, + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"d01d0d5b-77fa-433a-ad2e-80ce3722b213",}, ], "gridX": 0, "gridY": 0, "height": 64, "HTile": false, "layers": [ - {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"474efa0a-2e27-4818-aa98-a75708f4fa19","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"5f955162-e42d-43db-8cae-634ba913384c","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, ], "nineSlice": null, "origin": 4, @@ -54,7 +54,7 @@ "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":"89b07064-c4f6-496b-a3f8-b99cace28835","path":"sprites/s_node_text_file_write/s_node_text_file_write.yy",},},},"Disabled":false,"id":"fa0fb827-9608-48d6-97b5-640bdd7708c8","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"d01d0d5b-77fa-433a-ad2e-80ce3722b213","path":"sprites/s_node_text_file_write/s_node_text_file_write.yy",},},},"Disabled":false,"id":"c9afce02-5b06-4cc3-9193-db9c3785577e","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, ], "visibleRange": null, diff --git a/sprites/s_node_wav_file_write/e3356a24-b9f4-4c0b-972b-da970f6bbbe3.png b/sprites/s_node_wav_file_write/e3356a24-b9f4-4c0b-972b-da970f6bbbe3.png new file mode 100644 index 000000000..14fbe973d Binary files /dev/null and b/sprites/s_node_wav_file_write/e3356a24-b9f4-4c0b-972b-da970f6bbbe3.png differ diff --git a/sprites/s_node_wav_file_write/f600e086-97a1-4550-abca-174b3b243d48.png b/sprites/s_node_wav_file_write/f600e086-97a1-4550-abca-174b3b243d48.png deleted file mode 100644 index 1708c88ef..000000000 Binary files a/sprites/s_node_wav_file_write/f600e086-97a1-4550-abca-174b3b243d48.png and /dev/null differ diff --git a/sprites/s_node_wav_file_write/layers/e3356a24-b9f4-4c0b-972b-da970f6bbbe3/fdec83a8-23f6-4244-abe9-6a2a3b41d171.png b/sprites/s_node_wav_file_write/layers/e3356a24-b9f4-4c0b-972b-da970f6bbbe3/fdec83a8-23f6-4244-abe9-6a2a3b41d171.png new file mode 100644 index 000000000..14fbe973d Binary files /dev/null and b/sprites/s_node_wav_file_write/layers/e3356a24-b9f4-4c0b-972b-da970f6bbbe3/fdec83a8-23f6-4244-abe9-6a2a3b41d171.png differ diff --git a/sprites/s_node_wav_file_write/layers/f600e086-97a1-4550-abca-174b3b243d48/9875a4ef-d711-48b8-b516-a9d19283bd1a.png b/sprites/s_node_wav_file_write/layers/f600e086-97a1-4550-abca-174b3b243d48/9875a4ef-d711-48b8-b516-a9d19283bd1a.png deleted file mode 100644 index 1708c88ef..000000000 Binary files a/sprites/s_node_wav_file_write/layers/f600e086-97a1-4550-abca-174b3b243d48/9875a4ef-d711-48b8-b516-a9d19283bd1a.png and /dev/null differ diff --git a/sprites/s_node_wav_file_write/s_node_wav_file_write.yy b/sprites/s_node_wav_file_write/s_node_wav_file_write.yy index 643c12b0a..4afacd431 100644 --- a/sprites/s_node_wav_file_write/s_node_wav_file_write.yy +++ b/sprites/s_node_wav_file_write/s_node_wav_file_write.yy @@ -13,14 +13,14 @@ "edgeFiltering": false, "For3D": false, "frames": [ - {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"f600e086-97a1-4550-abca-174b3b243d48",}, + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"e3356a24-b9f4-4c0b-972b-da970f6bbbe3",}, ], "gridX": 0, "gridY": 0, "height": 64, "HTile": false, "layers": [ - {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"9875a4ef-d711-48b8-b516-a9d19283bd1a","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"fdec83a8-23f6-4244-abe9-6a2a3b41d171","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, ], "nineSlice": null, "origin": 4, @@ -54,7 +54,7 @@ "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":"f600e086-97a1-4550-abca-174b3b243d48","path":"sprites/s_node_wav_file_write/s_node_wav_file_write.yy",},},},"Disabled":false,"id":"0a3f90fa-129f-4c03-a0d8-cac031cdfc05","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"e3356a24-b9f4-4c0b-972b-da970f6bbbe3","path":"sprites/s_node_wav_file_write/s_node_wav_file_write.yy",},},},"Disabled":false,"id":"cee79d54-5da8-40ad-8721-b712f9ffdadf","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, ], "visibleRange": null,