new pixel extract node

This commit is contained in:
Tanasart 2025-01-23 16:03:02 +07:00
parent a48bd0e9c7
commit e2d0f2bc8c
20 changed files with 506 additions and 155 deletions

View file

@ -103,17 +103,17 @@
{"name":"effects","order":4,"path":"folders/nodes/data/filter/effects.yy",},
{"name":"2d light","order":1,"path":"folders/nodes/data/filter/effects/2d light.yy",},
{"name":"atlas","order":3,"path":"folders/nodes/data/filter/effects/atlas.yy",},
{"name":"blend_edge","order":36,"path":"folders/nodes/data/filter/effects/blend_edge.yy",},
{"name":"blend_edge","order":37,"path":"folders/nodes/data/filter/effects/blend_edge.yy",},
{"name":"corner","order":11,"path":"folders/nodes/data/filter/effects/corner.yy",},
{"name":"dither","order":13,"path":"folders/nodes/data/filter/effects/dither.yy",},
{"name":"edge_shade","order":38,"path":"folders/nodes/data/filter/effects/edge_shade.yy",},
{"name":"jpeg","order":48,"path":"folders/nodes/data/filter/effects/jpeg.yy",},
{"name":"kuwahara","order":42,"path":"folders/nodes/data/filter/effects/kuwahara.yy",},
{"name":"outline","order":23,"path":"folders/nodes/data/filter/effects/outline.yy",},
{"name":"posterize","order":25,"path":"folders/nodes/data/filter/effects/posterize.yy",},
{"name":"shadow cast","order":28,"path":"folders/nodes/data/filter/effects/shadow cast.yy",},
{"name":"shuffle","order":54,"path":"folders/nodes/data/filter/effects/shuffle.yy",},
{"name":"trail","order":30,"path":"folders/nodes/data/filter/effects/trail.yy",},
{"name":"edge_shade","order":39,"path":"folders/nodes/data/filter/effects/edge_shade.yy",},
{"name":"jpeg","order":49,"path":"folders/nodes/data/filter/effects/jpeg.yy",},
{"name":"kuwahara","order":43,"path":"folders/nodes/data/filter/effects/kuwahara.yy",},
{"name":"outline","order":24,"path":"folders/nodes/data/filter/effects/outline.yy",},
{"name":"posterize","order":26,"path":"folders/nodes/data/filter/effects/posterize.yy",},
{"name":"shadow cast","order":29,"path":"folders/nodes/data/filter/effects/shadow cast.yy",},
{"name":"shuffle","order":55,"path":"folders/nodes/data/filter/effects/shuffle.yy",},
{"name":"trail","order":31,"path":"folders/nodes/data/filter/effects/trail.yy",},
{"name":"fixes","order":5,"path":"folders/nodes/data/filter/fixes.yy",},
{"name":"warps","order":6,"path":"folders/nodes/data/filter/warps.yy",},
{"name":"liquefy","order":20,"path":"folders/nodes/data/filter/warps/liquefy.yy",},
@ -757,7 +757,7 @@
{"name":"node_audio_loudness","order":1,"path":"scripts/node_audio_loudness/node_audio_loudness.yy",},
{"name":"node_base_convert","order":8,"path":"scripts/node_base_convert/node_base_convert.yy",},
{"name":"node_bend","order":29,"path":"scripts/node_bend/node_bend.yy",},
{"name":"node_blend_edge","order":35,"path":"scripts/node_blend_edge/node_blend_edge.yy",},
{"name":"node_blend_edge","order":36,"path":"scripts/node_blend_edge/node_blend_edge.yy",},
{"name":"node_blend","order":1,"path":"scripts/node_blend/node_blend.yy",},
{"name":"node_blobify","order":2,"path":"scripts/node_blobify/node_blobify.yy",},
{"name":"node_bloom","order":4,"path":"scripts/node_bloom/node_bloom.yy",},
@ -774,7 +774,7 @@
{"name":"node_blur","order":4,"path":"scripts/node_blur/node_blur.yy",},
{"name":"node_boolean","order":17,"path":"scripts/node_boolean/node_boolean.yy",},
{"name":"node_box_pattern","order":22,"path":"scripts/node_box_pattern/node_box_pattern.yy",},
{"name":"node_brush_linear","order":45,"path":"scripts/node_brush_linear/node_brush_linear.yy",},
{"name":"node_brush_linear","order":46,"path":"scripts/node_brush_linear/node_brush_linear.yy",},
{"name":"node_byte_file_read","order":16,"path":"scripts/node_byte_file_read/node_byte_file_read.yy",},
{"name":"node_byte_file_write","order":15,"path":"scripts/node_byte_file_write/node_byte_file_write.yy",},
{"name":"node_cache_array","order":10,"path":"scripts/node_cache_array/node_cache_array.yy",},
@ -835,10 +835,10 @@
{"name":"node_dynasurf_out_height","order":3,"path":"scripts/node_dynasurf_out_height/node_dynasurf_out_height.yy",},
{"name":"node_dynasurf_out_width","order":2,"path":"scripts/node_dynasurf_out_width/node_dynasurf_out_width.yy",},
{"name":"node_dynasurf_out","order":1,"path":"scripts/node_dynasurf_out/node_dynasurf_out.yy",},
{"name":"node_edge_detect","order":16,"path":"scripts/node_edge_detect/node_edge_detect.yy",},
{"name":"node_edge_shade","order":37,"path":"scripts/node_edge_shade/node_edge_shade.yy",},
{"name":"node_edge_detect","order":17,"path":"scripts/node_edge_detect/node_edge_detect.yy",},
{"name":"node_edge_shade","order":38,"path":"scripts/node_edge_shade/node_edge_shade.yy",},
{"name":"node_equation","order":5,"path":"scripts/node_equation/node_equation.yy",},
{"name":"node_erode","order":18,"path":"scripts/node_erode/node_erode.yy",},
{"name":"node_erode","order":19,"path":"scripts/node_erode/node_erode.yy",},
{"name":"node_export","order":7,"path":"scripts/node_export/node_export.yy",},
{"name":"node_feedback_inline","order":3,"path":"scripts/node_feedback_inline/node_feedback_inline.yy",},
{"name":"node_feedback_input","order":1,"path":"scripts/node_feedback_input/node_feedback_input.yy",},
@ -873,7 +873,7 @@
{"name":"node_gabor_noise","order":26,"path":"scripts/node_gabor_noise/node_gabor_noise.yy",},
{"name":"node_gamma_map","order":32,"path":"scripts/node_gamma_map/node_gamma_map.yy",},
{"name":"node_global","order":3,"path":"scripts/node_global/node_global.yy",},
{"name":"node_glow","order":20,"path":"scripts/node_glow/node_glow.yy",},
{"name":"node_glow","order":21,"path":"scripts/node_glow/node_glow.yy",},
{"name":"node_gm_room","order":4,"path":"scripts/node_gm_room/node_gm_room.yy",},
{"name":"node_gradient_extract","order":4,"path":"scripts/node_gradient_extract/node_gradient_extract.yy",},
{"name":"node_gradient_palette","order":2,"path":"scripts/node_gradient_palette/node_gradient_palette.yy",},
@ -906,7 +906,7 @@
{"name":"node_image_sequence","order":2,"path":"scripts/node_image_sequence/node_image_sequence.yy",},
{"name":"node_image_sheet","order":3,"path":"scripts/node_image_sheet/node_image_sheet.yy",},
{"name":"node_image","order":3,"path":"scripts/node_image/node_image.yy",},
{"name":"node_interlaced","order":49,"path":"scripts/node_interlaced/node_interlaced.yy",},
{"name":"node_interlaced","order":50,"path":"scripts/node_interlaced/node_interlaced.yy",},
{"name":"node_interpret_number","order":8,"path":"scripts/node_interpret_number/node_interpret_number.yy",},
{"name":"node_invert","order":16,"path":"scripts/node_invert/node_invert.yy",},
{"name":"node_isosurf","order":3,"path":"scripts/node_isosurf/node_isosurf.yy",},
@ -928,18 +928,18 @@
{"name":"node_iterator_sort_inline_output","order":2,"path":"scripts/node_iterator_sort_inline_output/node_iterator_sort_inline_output.yy",},
{"name":"node_iterator_sort_input","order":1,"path":"scripts/node_iterator_sort_input/node_iterator_sort_input.yy",},
{"name":"node_iterator_sort_output","order":2,"path":"scripts/node_iterator_sort_output/node_iterator_sort_output.yy",},
{"name":"node_jpeg","order":47,"path":"scripts/node_jpeg/node_jpeg.yy",},
{"name":"node_jpeg","order":48,"path":"scripts/node_jpeg/node_jpeg.yy",},
{"name":"node_json_file_read","order":5,"path":"scripts/node_json_file_read/node_json_file_read.yy",},
{"name":"node_json_file_write","order":9,"path":"scripts/node_json_file_write/node_json_file_write.yy",},
{"name":"node_julia_set","order":24,"path":"scripts/node_julia_set/node_julia_set.yy",},
{"name":"node_keyframe","order":4,"path":"scripts/node_keyframe/node_keyframe.yy",},
{"name":"node_kuwahara","order":41,"path":"scripts/node_kuwahara/node_kuwahara.yy",},
{"name":"node_kuwahara","order":42,"path":"scripts/node_kuwahara/node_kuwahara.yy",},
{"name":"node_lerp","order":3,"path":"scripts/node_lerp/node_lerp.yy",},
{"name":"node_level_selector","order":20,"path":"scripts/node_level_selector/node_level_selector.yy",},
{"name":"node_level","order":18,"path":"scripts/node_level/node_level.yy",},
{"name":"node_line","order":7,"path":"scripts/node_line/node_line.yy",},
{"name":"node_liquefy","order":19,"path":"scripts/node_liquefy/node_liquefy.yy",},
{"name":"node_local_analyze","order":31,"path":"scripts/node_local_analyze/node_local_analyze.yy",},
{"name":"node_local_analyze","order":32,"path":"scripts/node_local_analyze/node_local_analyze.yy",},
{"name":"node_lovify","order":1,"path":"scripts/node_lovify/node_lovify.yy",},
{"name":"node_lua_global","order":1,"path":"scripts/node_lua_global/node_lua_global.yy",},
{"name":"node_lua_surface","order":2,"path":"scripts/node_lua_surface/node_lua_surface.yy",},
@ -994,7 +994,7 @@
{"name":"node_number","order":1,"path":"scripts/node_number/node_number.yy",},
{"name":"node_offset","order":27,"path":"scripts/node_offset/node_offset.yy",},
{"name":"node_onion_skin","order":15,"path":"scripts/node_onion_skin/node_onion_skin.yy",},
{"name":"node_outline","order":22,"path":"scripts/node_outline/node_outline.yy",},
{"name":"node_outline","order":23,"path":"scripts/node_outline/node_outline.yy",},
{"name":"node_override_channel","order":4,"path":"scripts/node_override_channel/node_override_channel.yy",},
{"name":"node_pack_sprites","order":4,"path":"scripts/node_pack_sprites/node_pack_sprites.yy",},
{"name":"node_padding","order":13,"path":"scripts/node_padding/node_padding.yy",},
@ -1073,14 +1073,15 @@
{"name":"node_perlin","order":18,"path":"scripts/node_perlin/node_perlin.yy",},
{"name":"node_pin","order":6,"path":"scripts/node_pin/node_pin.yy",},
{"name":"node_pixel_builder","order":5,"path":"scripts/node_pixel_builder/node_pixel_builder.yy",},
{"name":"node_pixel_cloud","order":39,"path":"scripts/node_pixel_cloud/node_pixel_cloud.yy",},
{"name":"node_pixel_math","order":51,"path":"scripts/node_pixel_math/node_pixel_math.yy",},
{"name":"node_pixel_cloud","order":40,"path":"scripts/node_pixel_cloud/node_pixel_cloud.yy",},
{"name":"node_pixel_extract","order":16,"path":"scripts/node_pixel_extract/node_pixel_extract.yy",},
{"name":"node_pixel_math","order":52,"path":"scripts/node_pixel_math/node_pixel_math.yy",},
{"name":"node_pixel_sampler","order":18,"path":"scripts/node_pixel_sampler/node_pixel_sampler.yy",},
{"name":"node_pixel_sort","order":28,"path":"scripts/node_pixel_sort/node_pixel_sort.yy",},
{"name":"node_plot_linear","order":8,"path":"scripts/node_plot_linear/node_plot_linear.yy",},
{"name":"node_point_in_area","order":1,"path":"scripts/node_point_in_area/node_point_in_area.yy",},
{"name":"node_polar","order":8,"path":"scripts/node_polar/node_polar.yy",},
{"name":"node_posterize","order":24,"path":"scripts/node_posterize/node_posterize.yy",},
{"name":"node_posterize","order":25,"path":"scripts/node_posterize/node_posterize.yy",},
{"name":"node_print","order":13,"path":"scripts/node_print/node_print.yy",},
{"name":"node_processor","order":6,"path":"scripts/node_processor/node_processor.yy",},
{"name":"node_project_data","order":25,"path":"scripts/node_project_data/node_project_data.yy",},
@ -1110,7 +1111,7 @@
{"name":"node_rigid_render","order":10,"path":"scripts/node_rigid_render/node_rigid_render.yy",},
{"name":"node_rigid_variable","order":12,"path":"scripts/node_rigid_variable/node_rigid_variable.yy",},
{"name":"node_rigid_wall","order":13,"path":"scripts/node_rigid_wall/node_rigid_wall.yy",},
{"name":"node_rim","order":43,"path":"scripts/node_rim/node_rim.yy",},
{"name":"node_rim","order":44,"path":"scripts/node_rim/node_rim.yy",},
{"name":"node_rm_cloud","order":8,"path":"scripts/node_rm_cloud/node_rm_cloud.yy",},
{"name":"node_rm_combine","order":4,"path":"scripts/node_rm_combine/node_rm_combine.yy",},
{"name":"node_rm_render","order":7,"path":"scripts/node_rm_render/node_rm_render.yy",},
@ -1123,14 +1124,14 @@
{"name":"node_segment_filter","order":29,"path":"scripts/node_segment_filter/node_segment_filter.yy",},
{"name":"node_separate_color","order":42,"path":"scripts/node_separate_color/node_separate_color.yy",},
{"name":"node_sequence_anim","order":5,"path":"scripts/node_sequence_anim/node_sequence_anim.yy",},
{"name":"node_shadow_cast","order":27,"path":"scripts/node_shadow_cast/node_shadow_cast.yy",},
{"name":"node_shadow","order":26,"path":"scripts/node_shadow/node_shadow.yy",},
{"name":"node_shadow_cast","order":28,"path":"scripts/node_shadow_cast/node_shadow_cast.yy",},
{"name":"node_shadow","order":27,"path":"scripts/node_shadow/node_shadow.yy",},
{"name":"node_shape_map","order":14,"path":"scripts/node_shape_map/node_shape_map.yy",},
{"name":"node_shape_polygon","order":9,"path":"scripts/node_shape_polygon/node_shape_polygon.yy",},
{"name":"node_shape","order":12,"path":"scripts/node_shape/node_shape.yy",},
{"name":"node_shard_noise","order":28,"path":"scripts/node_shard_noise/node_shard_noise.yy",},
{"name":"node_shell","order":17,"path":"scripts/node_shell/node_shell.yy",},
{"name":"node_shuffle","order":53,"path":"scripts/node_shuffle/node_shuffle.yy",},
{"name":"node_shuffle","order":54,"path":"scripts/node_shuffle/node_shuffle.yy",},
{"name":"node_skew","order":15,"path":"scripts/node_skew/node_skew.yy",},
{"name":"node_sky","order":22,"path":"scripts/node_sky/node_sky.yy",},
{"name":"node_slideshow","order":30,"path":"scripts/node_slideshow/node_slideshow.yy",},
@ -1203,7 +1204,7 @@
{"name":"node_to_text","order":11,"path":"scripts/node_to_text/node_to_text.yy",},
{"name":"node_tonemap_ace","order":34,"path":"scripts/node_tonemap_ace/node_tonemap_ace.yy",},
{"name":"node_tool","order":8,"path":"scripts/node_tool/node_tool.yy",},
{"name":"node_trail","order":29,"path":"scripts/node_trail/node_trail.yy",},
{"name":"node_trail","order":30,"path":"scripts/node_trail/node_trail.yy",},
{"name":"node_transform_array","order":16,"path":"scripts/node_transform_array/node_transform_array.yy",},
{"name":"node_transform_single","order":1,"path":"scripts/node_transform_single/node_transform_single.yy",},
{"name":"node_trigger_bool","order":1,"path":"scripts/node_trigger_bool/node_trigger_bool.yy",},
@ -1286,7 +1287,7 @@
{"name":"node_VFX_variable","order":9,"path":"scripts/node_VFX_variable/node_VFX_variable.yy",},
{"name":"node_VFX_vortex","order":6,"path":"scripts/node_VFX_vortex/node_VFX_vortex.yy",},
{"name":"node_VFX_wind","order":7,"path":"scripts/node_VFX_wind/node_VFX_wind.yy",},
{"name":"node_vignette","order":33,"path":"scripts/node_vignette/node_vignette.yy",},
{"name":"node_vignette","order":34,"path":"scripts/node_vignette/node_vignette.yy",},
{"name":"node_voronoi_extra","order":36,"path":"scripts/node_voronoi_extra/node_voronoi_extra.yy",},
{"name":"node_warp","order":2,"path":"scripts/node_warp/node_warp.yy",},
{"name":"node_wav_file_read","order":11,"path":"scripts/node_wav_file_read/node_wav_file_read.yy",},
@ -1523,7 +1524,7 @@
{"name":"sh_blur_slope","order":22,"path":"shaders/sh_blur_slope/sh_blur_slope.yy",},
{"name":"sh_blur_zoom","order":24,"path":"shaders/sh_blur_zoom/sh_blur_zoom.yy",},
{"name":"sh_box_pattern","order":23,"path":"shaders/sh_box_pattern/sh_box_pattern.yy",},
{"name":"sh_brush_linear","order":46,"path":"shaders/sh_brush_linear/sh_brush_linear.yy",},
{"name":"sh_brush_linear","order":47,"path":"shaders/sh_brush_linear/sh_brush_linear.yy",},
{"name":"sh_brush_outline","order":7,"path":"shaders/sh_brush_outline/sh_brush_outline.yy",},
{"name":"sh_bw","order":1,"path":"shaders/sh_bw/sh_bw.yy",},
{"name":"sh_camera","order":3,"path":"shaders/sh_camera/sh_camera.yy",},
@ -1614,10 +1615,10 @@
{"name":"sh_draw_tile_clear","order":4,"path":"shaders/sh_draw_tile_clear/sh_draw_tile_clear.yy",},
{"name":"sh_draw_tile_map","order":5,"path":"shaders/sh_draw_tile_map/sh_draw_tile_map.yy",},
{"name":"sh_draw_tile","order":1,"path":"shaders/sh_draw_tile/sh_draw_tile.yy",},
{"name":"sh_edge_detect","order":17,"path":"shaders/sh_edge_detect/sh_edge_detect.yy",},
{"name":"sh_edge_detect","order":18,"path":"shaders/sh_edge_detect/sh_edge_detect.yy",},
{"name":"sh_edge_shade_apply","order":2,"path":"shaders/sh_edge_shade_apply/sh_edge_shade_apply.yy",},
{"name":"sh_edge_shade_convert","order":1,"path":"shaders/sh_edge_shade_convert/sh_edge_shade_convert.yy",},
{"name":"sh_erode","order":19,"path":"shaders/sh_erode/sh_erode.yy",},
{"name":"sh_erode","order":20,"path":"shaders/sh_erode/sh_erode.yy",},
{"name":"sh_fd_add_velocity","order":1,"path":"shaders/sh_fd_add_velocity/sh_fd_add_velocity.yy",},
{"name":"sh_fd_advect_material","order":2,"path":"shaders/sh_fd_advect_material/sh_fd_advect_material.yy",},
{"name":"sh_fd_advect_velocity","order":7,"path":"shaders/sh_fd_advect_velocity/sh_fd_advect_velocity.yy",},
@ -1642,7 +1643,7 @@
{"name":"sh_gamma_map","order":33,"path":"shaders/sh_gamma_map/sh_gamma_map.yy",},
{"name":"sh_get_max_downsampled","order":2,"path":"shaders/sh_get_max_downsampled/sh_get_max_downsampled.yy",},
{"name":"sh_get_min_downsampled","order":3,"path":"shaders/sh_get_min_downsampled/sh_get_min_downsampled.yy",},
{"name":"sh_glow","order":21,"path":"shaders/sh_glow/sh_glow.yy",},
{"name":"sh_glow","order":22,"path":"shaders/sh_glow/sh_glow.yy",},
{"name":"sh_gradient_display_alpha","order":1,"path":"shaders/sh_gradient_display_alpha/sh_gradient_display_alpha.yy",},
{"name":"sh_gradient_points","order":3,"path":"shaders/sh_gradient_points/sh_gradient_points.yy",},
{"name":"sh_gradient","order":1,"path":"shaders/sh_gradient/sh_gradient.yy",},
@ -1657,7 +1658,7 @@
{"name":"sh_herringbone_tile","order":15,"path":"shaders/sh_herringbone_tile/sh_herringbone_tile.yy",},
{"name":"sh_high_pass","order":32,"path":"shaders/sh_high_pass/sh_high_pass.yy",},
{"name":"sh_image_trace","order":18,"path":"shaders/sh_image_trace/sh_image_trace.yy",},
{"name":"sh_interlaced","order":50,"path":"shaders/sh_interlaced/sh_interlaced.yy",},
{"name":"sh_interlaced","order":51,"path":"shaders/sh_interlaced/sh_interlaced.yy",},
{"name":"sh_interpret_number","order":9,"path":"shaders/sh_interpret_number/sh_interpret_number.yy",},
{"name":"sh_invert","order":17,"path":"shaders/sh_invert/sh_invert.yy",},
{"name":"sh_jpeg_recons","order":1,"path":"shaders/sh_jpeg_recons/sh_jpeg_recons.yy",},
@ -1672,7 +1673,7 @@
{"name":"sh_liquefy_bloat","order":3,"path":"shaders/sh_liquefy_bloat/sh_liquefy_bloat.yy",},
{"name":"sh_liquefy_pinch","order":2,"path":"shaders/sh_liquefy_pinch/sh_liquefy_pinch.yy",},
{"name":"sh_liquefy_twirl","order":1,"path":"shaders/sh_liquefy_twirl/sh_liquefy_twirl.yy",},
{"name":"sh_local_analyze","order":32,"path":"shaders/sh_local_analyze/sh_local_analyze.yy",},
{"name":"sh_local_analyze","order":33,"path":"shaders/sh_local_analyze/sh_local_analyze.yy",},
{"name":"sh_lovify","order":2,"path":"shaders/sh_lovify/sh_lovify.yy",},
{"name":"sh_lum2alpha","order":7,"path":"shaders/sh_lum2alpha/sh_lum2alpha.yy",},
{"name":"sh_mask_expand","order":3,"path":"shaders/sh_mask_expand/sh_mask_expand.yy",},
@ -1748,8 +1749,8 @@
{"name":"sh_perlin_extra","order":25,"path":"shaders/sh_perlin_extra/sh_perlin_extra.yy",},
{"name":"sh_perlin_smear","order":23,"path":"shaders/sh_perlin_smear/sh_perlin_smear.yy",},
{"name":"sh_perlin_tiled","order":1,"path":"shaders/sh_perlin_tiled/sh_perlin_tiled.yy",},
{"name":"sh_pixel_cloud","order":40,"path":"shaders/sh_pixel_cloud/sh_pixel_cloud.yy",},
{"name":"sh_pixel_math","order":52,"path":"shaders/sh_pixel_math/sh_pixel_math.yy",},
{"name":"sh_pixel_cloud","order":41,"path":"shaders/sh_pixel_cloud/sh_pixel_cloud.yy",},
{"name":"sh_pixel_math","order":53,"path":"shaders/sh_pixel_math/sh_pixel_math.yy",},
{"name":"sh_pixel_sample","order":19,"path":"shaders/sh_pixel_sample/sh_pixel_sample.yy",},
{"name":"sh_pixel_sort","order":29,"path":"shaders/sh_pixel_sort/sh_pixel_sort.yy",},
{"name":"sh_polar","order":9,"path":"shaders/sh_polar/sh_polar.yy",},
@ -1774,7 +1775,7 @@
{"name":"sh_region_fill_rg_index","order":12,"path":"shaders/sh_region_fill_rg_index/sh_region_fill_rg_index.yy",},
{"name":"sh_region_fill_rg_map","order":7,"path":"shaders/sh_region_fill_rg_map/sh_region_fill_rg_map.yy",},
{"name":"sh_replace_color","order":4,"path":"shaders/sh_replace_color/sh_replace_color.yy",},
{"name":"sh_rim","order":44,"path":"shaders/sh_rim/sh_rim.yy",},
{"name":"sh_rim","order":45,"path":"shaders/sh_rim/sh_rim.yy",},
{"name":"sh_rm_cloud","order":9,"path":"shaders/sh_rm_cloud/sh_rm_cloud.yy",},
{"name":"sh_rm_primitive","order":1,"path":"shaders/sh_rm_primitive/sh_rm_primitive.yy",},
{"name":"sh_rm_terrain","order":3,"path":"shaders/sh_rm_terrain/sh_rm_terrain.yy",},
@ -1827,7 +1828,7 @@
{"name":"sh_vertex_normal_pass","order":3,"path":"shaders/sh_vertex_normal_pass/sh_vertex_normal_pass.yy",},
{"name":"sh_vertex_pnt_light","order":4,"path":"shaders/sh_vertex_pnt_light/sh_vertex_pnt_light.yy",},
{"name":"sh_vertex_pt","order":5,"path":"shaders/sh_vertex_pt/sh_vertex_pt.yy",},
{"name":"sh_vignette","order":34,"path":"shaders/sh_vignette/sh_vignette.yy",},
{"name":"sh_vignette","order":35,"path":"shaders/sh_vignette/sh_vignette.yy",},
{"name":"sh_voronoi_extra","order":37,"path":"shaders/sh_voronoi_extra/sh_voronoi_extra.yy",},
{"name":"sh_warp_4points_pers","order":24,"path":"shaders/sh_warp_4points_pers/sh_warp_4points_pers.yy",},
{"name":"sh_warp_4points","order":3,"path":"shaders/sh_warp_4points/sh_warp_4points.yy",},
@ -2275,6 +2276,7 @@
{"name":"s_node_pin","order":2,"path":"sprites/s_node_pin/s_node_pin.yy",},
{"name":"s_node_pixel_builder","order":29,"path":"sprites/s_node_pixel_builder/s_node_pixel_builder.yy",},
{"name":"s_node_pixel_cloud","order":53,"path":"sprites/s_node_pixel_cloud/s_node_pixel_cloud.yy",},
{"name":"s_node_pixel_extract","order":15,"path":"sprites/s_node_pixel_extract/s_node_pixel_extract.yy",},
{"name":"s_node_pixel_math","order":82,"path":"sprites/s_node_pixel_math/s_node_pixel_math.yy",},
{"name":"s_node_pixel_sampler","order":54,"path":"sprites/s_node_pixel_sampler/s_node_pixel_sampler.yy",},
{"name":"s_node_pixel_sort","order":54,"path":"sprites/s_node_pixel_sort/s_node_pixel_sort.yy",},

View file

@ -586,6 +586,7 @@
{"$GMIncludedFile":"","%Name":"info.json","CopyToMask":-1,"filePath":"datafiles/data/Nodes/Internal/Color/Node_Palette_Shrink","name":"info.json","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"info.json","CopyToMask":-1,"filePath":"datafiles/data/Nodes/Internal/Color/Node_Palette_Sort","name":"info.json","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"info.json","CopyToMask":-1,"filePath":"datafiles/data/Nodes/Internal/Color/Node_Palette","name":"info.json","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"info.json","CopyToMask":-1,"filePath":"datafiles/data/Nodes/Internal/Color/Node_Pixel_Extract","name":"info.json","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"info.json","CopyToMask":-1,"filePath":"datafiles/data/Nodes/Internal/Color/Node_Sampler","name":"info.json","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"info.json","CopyToMask":-1,"filePath":"datafiles/data/Nodes/Internal/Compose/Node_Armature_Bind","name":"info.json","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"info.json","CopyToMask":-1,"filePath":"datafiles/data/Nodes/Internal/Compose/Node_Armature_Mesh_Rig","name":"info.json","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
@ -2278,6 +2279,7 @@
{"id":{"name":"node_pin","path":"scripts/node_pin/node_pin.yy",},},
{"id":{"name":"node_pixel_builder","path":"scripts/node_pixel_builder/node_pixel_builder.yy",},},
{"id":{"name":"node_pixel_cloud","path":"scripts/node_pixel_cloud/node_pixel_cloud.yy",},},
{"id":{"name":"node_pixel_extract","path":"scripts/node_pixel_extract/node_pixel_extract.yy",},},
{"id":{"name":"node_pixel_math","path":"scripts/node_pixel_math/node_pixel_math.yy",},},
{"id":{"name":"node_pixel_sampler","path":"scripts/node_pixel_sampler/node_pixel_sampler.yy",},},
{"id":{"name":"node_pixel_sort","path":"scripts/node_pixel_sort/node_pixel_sort.yy",},},
@ -3618,6 +3620,7 @@
{"id":{"name":"s_node_pin","path":"sprites/s_node_pin/s_node_pin.yy",},},
{"id":{"name":"s_node_pixel_builder","path":"sprites/s_node_pixel_builder/s_node_pixel_builder.yy",},},
{"id":{"name":"s_node_pixel_cloud","path":"sprites/s_node_pixel_cloud/s_node_pixel_cloud.yy",},},
{"id":{"name":"s_node_pixel_extract","path":"sprites/s_node_pixel_extract/s_node_pixel_extract.yy",},},
{"id":{"name":"s_node_pixel_math","path":"sprites/s_node_pixel_math/s_node_pixel_math.yy",},},
{"id":{"name":"s_node_pixel_sampler","path":"sprites/s_node_pixel_sampler/s_node_pixel_sampler.yy",},},
{"id":{"name":"s_node_pixel_sort","path":"sprites/s_node_pixel_sort/s_node_pixel_sort.yy",},},

Binary file not shown.

View file

@ -0,0 +1,7 @@
{
"name":"Pixel Extract",
"tooltip":"Extract pixels from an image.",
"baseNode":"Node_Pixel_Extract",
"pxc_version":118071,
"io":[ "color", "surface" ],
}

View file

@ -845,6 +845,7 @@
{ "label": "/Surfaces" },
"Node_Sampler",
"Node_Find_Pixel",
"Node_Pixel_Extract",
{ "label": "Palettes" },
"Node_Palette",

View file

@ -59,7 +59,8 @@ DIALOG_WINCLEAR1
var _hc = cc == c_white? COLORS.dialog_menubox_highlight : cc;
var _ha = cc == c_white? 0.75 : 0.8;
draw_sprite_stretched_ext(THEME.textbox, 3, dialog_x, yy, dialog_w, _h, _hc);
if(_menuItem.active)
draw_sprite_stretched_ext(THEME.textbox, 3, dialog_x, yy, dialog_w, _h, _hc);
if(_hovering_ch && is_instanceof(_menuItem, MenuItem)) {
if(_menuItem.active && _lclick) {

View file

@ -356,6 +356,12 @@
return _arr;
}
function array_toggle(arr, value) {
if(array_exists(arr, value)) array_remove(arr, value);
else array_push(arr, value);
}
#endregion
#region binary opr

View file

@ -25,12 +25,12 @@ function buttonClass(_onClick, _icon = noone) : widget() constructor {
onWUp = undefined;
onWDown = undefined;
static setContext = function(struct) { onClick = method(struct, onClick); return self; }
static setWheel = function(wup, wdown = wup) { onWUp = wup; onWDown = wdown; return self; }
static setContext = function(_s) /*=>*/ { onClick = method(_s, onClick); return self; }
static setWheel = function(_u, _d = _u) /*=>*/ { onWUp = _u; onWDown = _d; return self; }
static setBaseSprite = function(_bspr) { base_spr = _bspr; return self; }
static setText = function(_text) { text = _text; return self; }
static setTooltip = function(_tip) { tooltip = _tip; return self; }
static setBaseSprite = function(_b) /*=>*/ { base_spr = _b; return self; }
static setText = function(_t) /*=>*/ { text = _t; return self; }
static setTooltip = function(_t) /*=>*/ { tooltip = _t; return self; }
static setIcon = function(_icon, _index = 0, _blend = c_white, _size = 1) {
icon = _icon;
@ -106,7 +106,7 @@ function buttonClass(_onClick, _icon = noone) : widget() constructor {
if(mouse_press(mb_left)) deactivate();
}
var aa = interactable * 0.25 + 0.75;
var aa = interactable * .5 + .5;
var bx = _x + _w / 2;
if(text != "") {

View file

@ -29,7 +29,7 @@ function __3dCamera() constructor {
viewMat = new __mat4();
projMat = new __mat4();
static getUp = function(_x = 1, _y = 1, _z = 1) { #region
static getUp = function(_x = 1, _y = 1, _z = 1) {
var upVector = new __vec3(0, 0, -1);
var hRad = degtorad(focus_angle_x);
@ -40,23 +40,23 @@ function __3dCamera() constructor {
upVector.z = cos(vRad) * _z;
return upVector._normalize();
} #endregion
}
static getCombinedMatrix = function() { return matrix_multiply(viewMat.raw, projMat.raw); }
static applyCamera = function() { #region
static applyCamera = function() {
camera_set_view_mat(raw, viewMat.raw);
camera_set_proj_mat(raw, projMat.raw);
camera_apply(raw);
} #endregion
}
static resetCamera = function() { #region
static resetCamera = function() {
camera_apply(0);
gpu_set_cullmode(cull_noculling);
} #endregion
}
static setMatrix = function() { #region
static setMatrix = function() {
if(projection == CAMERA_PROJECTION.perspective)
projMat.setRaw(matrix_build_projection_perspective_fov(fov, view_aspect, view_near, view_far));
else
@ -74,9 +74,9 @@ function __3dCamera() constructor {
}
return self;
} #endregion
}
static setFocusAngle = function(ax, ay, dist) { #region
static setFocusAngle = function(ax, ay, dist) {
if(ay % 90 == 0) ay += 0.01;
focus_angle_x = ax;
@ -84,30 +84,30 @@ function __3dCamera() constructor {
focus_dist = dist;
return self;
} #endregion
}
static setViewFov = function(fov, near, far) { #region
static setViewFov = function(fov, near, far) {
self.fov = fov;
self.view_near = near;
self.view_far = far;
return self;
} #endregion
}
static setViewSize = function(w, h) { #region
static setViewSize = function(w, h) {
view_w = w;
view_h = h;
view_aspect = w / h;
return self;
} #endregion
}
static setCameraLookRotate = function() { #region
static setCameraLookRotate = function() {
var _fPos = d3d_PolarToCart(focus.x, focus.y, focus.z, focus_angle_x, focus_angle_y, focus_dist);
position.set(_fPos);
} #endregion
}
static worldPointToViewPoint = function(vec3) { #region
static worldPointToViewPoint = function(vec3) {
var _vec4 = new __vec4().set(vec3, 1);
var _view = viewMat.transpose().multiplyVector(_vec4);
var _proj = projMat.transpose().multiplyVector(_view);
@ -117,9 +117,9 @@ function __3dCamera() constructor {
_proj.y = view_h / 2 + _proj.y * view_h / 2;
return _proj;
} #endregion
}
static viewPointToWorldRay = function(_x, _y) { #region
static viewPointToWorldRay = function(_x, _y) {
var rayOrigin = position;
var normalizedX = (2 * _x / view_w) - 1;
@ -135,5 +135,5 @@ function __3dCamera() constructor {
._normalize();
return new __ray(rayOrigin, rayDirection);
} #endregion
}
}

View file

@ -44,7 +44,7 @@
VERSION = 1_18_06_2;
SAVE_VERSION = 1_18_05_0;
VERSION_STRING = MAC? "1.18.003m" : "1.18.7.1";
BUILD_NUMBER = 118071;
BUILD_NUMBER = 118071.001;
PREF_VERSION = 1_17_1;
var _vsp = string_split(VERSION_STRING, ".");

View file

@ -25,7 +25,7 @@ function Node_3D_Bend(_x, _y, _group = noone) : Node_3D_Modifier(_x, _y, _group)
var _ori = _data[in_mesh + 3];
var _nrm = _data[in_mesh + 4];
if(!is_instanceof(_obj, __3dObject)) return noone;
if(!is_instanceof(_obj, __3dObject)) return noone;
var _res = _obj.clone();
var _vlen = array_length(_res.vertex);

View file

@ -22,30 +22,59 @@ function Node_Armature_Mesh_Rig(_x, _y, _group = noone) : Node(_x, _y, _group) c
newInput(2, nodeValue_Trigger("Autoweight", self, false ))
.setDisplay(VALUE_DISPLAY.button, { name: "Auto weight", UI : true, onClick: function() /*=>*/ {return AutoWeightPaint()} });
newInput(3, nodeValue_Float("Radius", self, 8))
newInput(3, nodeValue_Float("Auto Weight Radius", self, 8))
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
newOutput(0, nodeValue_Output("Rigged Surface", self, VALUE_TYPE.dynaSurface, noone));
bone_posed = noone;
bone_array = [];
rigdata = noone;
anchor_selecting = noone;
bone_bbox = undefined;
preview_alpha = .5;
attributes.bonePoseData = {};
attributes.rigBones = noone;
attributes.baked = false;
attributes.bakeData = 0;
attributes.display_name = true;
attributes.display_bone = 0;
attributes.display_mesh_size = 2;
tool_attribute.size = 48;
tool_size_edit = new textBox(TEXTBOX_INPUT.number, function(val) /*=>*/ { tool_attribute.size = max(1, round(val)); }).setFont(f_p3)
tool_size = [ "Size", tool_size_edit, "size", tool_attribute ];
tool_attribute.weight = .5;
tool_weight_edit = new textBox(TEXTBOX_INPUT.number, function(val) /*=>*/ { tool_attribute.weight = clamp(val, 0, 1); }).setFont(f_p3)
tool_weight = [ "Weight", tool_weight_edit, "weight", tool_attribute ];
array_push(attributeEditors, "Display");
array_push(attributeEditors, ["Display name", function() /*=>*/ {return attributes.display_name}, new checkBox(function() /*=>*/ { attributes.display_name = !attributes.display_name; })]);
array_push(attributeEditors, ["Display bone", function() /*=>*/ {return attributes.display_bone}, new scrollBox(["Octahedral", "Stick"], function(ind) /*=>*/ { attributes.display_bone = ind; })]);
array_push(attributeEditors, ["Display name", function() /*=>*/ {return attributes.display_name}, new checkBox(function() /*=>*/ { attributes.display_name = !attributes.display_name; })]);
array_push(attributeEditors, ["Display bone", function() /*=>*/ {return attributes.display_bone}, new scrollBox(["Octahedral", "Stick"], function(ind) /*=>*/ { attributes.display_bone = ind; })]);
array_push(attributeEditors, ["Vertex size", function() /*=>*/ {return attributes.display_mesh_size}, new textBox(TEXTBOX_INPUT.number, function(ind) /*=>*/ { attributes.display_mesh_size = ind; })]);
tools = [
new NodeTool( "Pose", THEME.bone_tool_pose )
tools_dynamic = [
new NodeTool( "Pose", THEME.bone_tool_pose ),
];
tools_baked = [
new NodeTool( "Pose", THEME.bone_tool_pose ),
new NodeTool( "Weight Brush", THEME.canvas_tools_pencil )
.setSetting(tool_size)
.setSetting(tool_weight),
new NodeTool( "Weight Eraser", THEME.canvas_tools_eraser )
.setSetting(tool_size)
.setSetting(tool_weight),
];
tools = tools_dynamic;
layer_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) {
var _b = inputs[0].getValue();
if(_b == noone) return 0;
@ -76,36 +105,62 @@ function Node_Armature_Mesh_Rig(_x, _y, _group = noone) : Node(_x, _y, _group) c
if(_bone.is_main) continue;
var _dx = __x + ui(24);
var _iy = ty + _hh / 2;
draw_sprite_stretched_ext(THEME.checkbox_def, 0, _x + ui(16), ty + ui(4), ui(20), ui(20), c_white);
if(_sel) draw_sprite_stretched_ext(THEME.checkbox_def, 2, _x + ui(16), ty + ui(4), ui(20), ui(20), COLORS._main_accent);
draw_sprite_stretched_ext(THEME.checkbox_def, 0, _x + ui(16), ty + ui(4), ui(20), ui(20), c_white);
if(_bone.parent_anchor) draw_sprite_ui(THEME.bone, 1, _dx + 12, ty + 14,,,, COLORS._main_icon);
else if(_bone.IKlength) draw_sprite_ui(THEME.bone, 2, _dx + 12, ty + 14,,,, COLORS._main_icon);
else draw_sprite_ui(THEME.bone, 0, _dx + 12, ty + 14,,,, COLORS._main_icon);
if(_bone.parent_anchor) draw_sprite_ui(THEME.bone, 1, _dx + ui(12), _iy, 1, 1, 0, COLORS._main_icon);
else if(_bone.IKlength) draw_sprite_ui(THEME.bone, 2, _dx + ui(12), _iy, 1, 1, 0, COLORS._main_icon);
else draw_sprite_ui(THEME.bone, 0, _dx + ui(12), _iy, 1, 1, 0, COLORS._main_icon);
var cc = _sel? COLORS._main_text : COLORS._main_text_sub;
if(brush_bone_target == _bone.ID) cc = COLORS._main_value_positive;
var cc = COLORS._main_text;
var _hov = _hover && point_in_rectangle(_m[0], _m[1], _x, ty, _x + _w, ty + _hh - 1);
if(_hov) {
cc = COLORS._main_accent;
anchor_selecting = [ _bone, 2 ];
if(mouse_press(mb_left, _focus)) {
if(attributes.rigBones == noone)
attributes.rigBones = [ _bone.ID ];
else {
if(array_exists(attributes.rigBones, _bone.ID))
array_remove(attributes.rigBones, _bone.ID);
else
array_push(attributes.rigBones, _bone.ID);
if(_m[0] < _x + ui(36)) {
draw_sprite_stretched_ext(THEME.checkbox_def, 1, _x + ui(16), ty + ui(4), ui(20), ui(20), c_white);
TOOLTIP = "Include in autoweight";
if(mouse_press(mb_left, _focus)) {
if(attributes.rigBones == noone)
attributes.rigBones = [];
array_toggle(attributes.rigBones, _bone.ID);
}
} else {
if(mouse_press(mb_left, _focus))
attributes.rigBones = [ _bone.ID ];
}
}
if(_sel) draw_sprite_stretched_ext(THEME.checkbox_def, 2, _x + ui(16), ty + ui(4), ui(20), ui(20), COLORS._main_accent);
draw_set_text(f_p2, fa_left, fa_center, cc);
draw_text_add(_dx + 24, ty + 12, _bone.name);
if(_hov && attributes.baked) {
var _ix = _x + _w - ui(20);
var _cc = COLORS._main_icon;
if(_m[0] > _ix - ui(12)) {
_cc = COLORS._main_value_negative;
TOOLTIP = "Clear weight";
if(mouse_press(mb_left, _focus) && struct_has(attributes.bakeData, _bone.ID)) {
var _wdata = attributes.bakeData[$ _bone.ID];
for( var i = 0, n = array_length(_wdata); i < n; i++ )
_wdata[i] = 0;
}
}
draw_sprite_ui(THEME.icon_delete, 0, _ix, _iy, 1, 1, 0, _cc);
}
ty += _hh;
if(!ds_stack_empty(_bst)) {
@ -121,59 +176,66 @@ function Node_Armature_Mesh_Rig(_x, _y, _group = noone) : Node(_x, _y, _group) c
});
auto_button = button(function() /*=>*/ {return AutoWeightPaint()}).setText("Auto weight");
bake_button = button(function() /*=>*/ {return bake()}).setText("Bake mesh");
normalize_button = button(function() /*=>*/ {return normalizeWeight()}).setText("Normalize weight");
input_display_list = [ 0, 1,
["Armature", false], layer_renderer,
["Autoweight", false], 2, 3,
["Armature", false], layer_renderer,
["Weight", false], 3, auto_button, new Inspector_Spacer(ui(8)), bake_button, normalize_button,
];
anchor_selecting = noone;
posing_bone = noone;
posing_input = 0;
posing_type = 0;
posing_sx = 0;
posing_sy = 0;
posing_sz = 0;
posing_mx = 0;
posing_my = 0;
posing_bone = noone;
posing_input = 0;
posing_type = 0;
posing_sx = 0;
posing_sy = 0;
posing_sz = 0;
posing_mx = 0;
posing_my = 0;
brush_drawing = false;
brush_draw_mask = [];
brush_bone_target = noone;
current_bone = noone;
static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) {
var _bones = inputs[0].getValue();
var _mesh = inputs[1].getValue();
var _rdata = attributes.baked? attributes.bakeData : rigdata;
var _boneTargetID = noone;
brush_bone_target = noone;
__weights = anchor_selecting == noone? noone : struct_try_get(_rdata, anchor_selecting[0].ID, noone);
if(isUsingTool("Weight Brush") || isUsingTool("Weight Eraser")) {
if(!is_array(attributes.rigBones)) attributes.rigBones = [ bone_array[0].ID ];
var _boneTargetID = array_safe_get(attributes.rigBones, 0, noone);
var _boneTarget = noone;
for( var i = 0, n = array_length(bone_array); i < n; i++ ) {
if(bone_array[i].ID == _boneTargetID) {
_boneTarget = bone_array[i];
break;
}
}
brush_bone_target = _boneTargetID;
var _weightData = _rdata[$ _boneTargetID];
if(__weights == noone)
__weights = _weightData;
}
if(_mesh != noone) {
__weights = anchor_selecting == noone? noone : struct_try_get(rigdata, anchor_selecting[0].ID, noone);
__x = _x;
__y = _y;
__s = _s;
draw_set_circle_precision(4);
if(__weights == noone) {
array_foreach(_mesh.points, function(_p) /*=>*/ {
if(!is(_p, MeshedPoint)) return;
_p.drx = __x + _p.x * __s;
_p.dry = __y + _p.y * __s;
_p.color = COLORS._main_accent;
draw_set_color(_p.color);
draw_circle(_p.drx, _p.dry, 2, false);
});
} else {
array_foreach(_mesh.points, function(_p, i) /*=>*/ {
if(!is(_p, MeshedPoint)) return;
_p.drx = __x + _p.x * __s;
_p.dry = __y + _p.y * __s;
var _w = array_safe_get_fast(__weights, i);
_p.color = merge_color(COLORS._main_accent, c_white, _w);
draw_set_color(_p.color);
draw_circle(_p.drx, _p.dry, 2, false);
});
}
draw_set_alpha(.5);
array_foreach(_mesh.links, function(_l) /*=>*/ {
var _p0 = _l.p0;
@ -185,19 +247,45 @@ function Node_Armature_Mesh_Rig(_x, _y, _group = noone) : Node(_x, _y, _group) c
});
draw_set_alpha(1);
if(__weights == noone) {
array_foreach(_mesh.points, function(_p) /*=>*/ {
if(!is(_p, MeshedPoint)) return;
_p.drx = __x + _p.x * __s;
_p.dry = __y + _p.y * __s;
_p.color = COLORS._main_accent;
draw_set_color(_p.color);
draw_circle(_p.drx, _p.dry, attributes.display_mesh_size, false);
});
} else {
array_foreach(_mesh.points, function(_p, i) /*=>*/ {
if(!is(_p, MeshedPoint)) return;
_p.drx = __x + _p.x * __s;
_p.dry = __y + _p.y * __s;
var _w = array_safe_get_fast(__weights, i);
_p.color = _w > .5? merge_color(COLORS._main_value_negative, COLORS._main_value_positive, (_w - .5) * 2) :
merge_color(CDEF.main_dkblack, COLORS._main_value_negative, _w);
draw_set_color(_p.color);
draw_circle(_p.drx, _p.dry, attributes.display_mesh_size, false);
});
}
}
if(bone_posed == noone) return;
var mx = (_mx - _x) / _s;
var my = (_my - _y) / _s;
var smx = value_snap(mx, _snx);
var smy = value_snap(my, _sny);
if(isUsingTool("Pose")) {
anchor_selecting = bone_posed.draw(attributes, active * 0b111, _x, _y, _s, _mx, _my, anchor_selecting, posing_bone);
var mx = (_mx - _x) / _s;
var my = (_my - _y) / _s;
var smx = value_snap(mx, _snx);
var smy = value_snap(my, _sny);
if(posing_bone) {
if(posing_type == 0 && posing_bone.parent) { //move
var ang = posing_bone.parent.pose_rotate;
@ -280,12 +368,58 @@ function Node_Armature_Mesh_Rig(_x, _y, _group = noone) : Node(_x, _y, _group) c
}
}
return;
}
if(isUsingTool("Weight Brush") || isUsingTool("Weight Eraser")) {
if(_boneTargetID == noone) return;
draw_set_color(COLORS._main_icon);
draw_set_circle_precision(32);
var _rad = tool_attribute.size;
draw_circle(_mx, _my, _rad, true);
var _r = _rad / _s;
var _pnts = _mesh.points;
var _plen = array_length(_pnts);
if(brush_drawing) {
var _weight = tool_attribute.weight;
if(isUsingTool("Weight Eraser")) _weight = -_weight;
for( var i = 0; i < _plen; i++ ) {
var _p = _pnts[i];
var _d = point_distance(_p.x, _p.y, mx, my);
var _ww = 1 - _d / _r;
if(_ww <= 0) continue;
var _w = _weight * min(_ww * 2, 1);
if(brush_draw_mask[i] >= abs(_w)) continue;
brush_draw_mask[i] = abs(_w);
brush_draw_orig[i] ??= _weightData[i];
_weightData[i] = clamp(brush_draw_orig[i] + _w, 0, 1);
}
if(mouse_release(mb_left)) {
brush_drawing = false;
triggerRender();
}
}
if(hover && mouse_press(mb_left, active)) {
brush_drawing = true;
brush_draw_mask = array_create(_plen, 0);
brush_draw_orig = array_create(_plen, undefined);
}
if(_boneTarget != noone) _boneTarget.drawBone(attributes, false, _x, _y, _s, _mx, _my, noone, noone, c_white, 1);
return;
}
var _boneArr = bone_posed.toArray();
for( var i = 0, n = array_length(_boneArr); i < n; i++ ) {
var _b = _boneArr[i];
for( var i = 0, n = array_length(bone_array); i < n; i++ ) {
var _b = bone_array[i];
var _l = attributes.rigBones == noone || array_exists(attributes.rigBones, _b.ID);
_b.drawBone(attributes, false, _x, _y, _s, _mx, _my, anchor_selecting, noone, c_white, 0.25 + _l * 0.75);
}
@ -300,8 +434,8 @@ function Node_Armature_Mesh_Rig(_x, _y, _group = noone) : Node(_x, _y, _group) c
rigdata = {};
var _pnts = _mesh.points;
var _plen = array_length(_pnts);
var _pnts = _mesh.points;
var _plen = array_length(_pnts);
var _boneArr = bone_posed.toArray();
var _boneDat = [];
@ -323,7 +457,7 @@ function Node_Armature_Mesh_Rig(_x, _y, _group = noone) : Node(_x, _y, _group) c
var _boneAmo = array_length(_boneDat);
for( var i = 0, n = array_length(_pnts); i < n; i++ ) {
for( var i = 0, n = _plen; i < n; i++ ) {
var _p = _pnts[i];
if(!is(_p, MeshedPoint)) continue;
@ -370,7 +504,12 @@ function Node_Armature_Mesh_Rig(_x, _y, _group = noone) : Node(_x, _y, _group) c
if(_render) triggerRender();
}
current_bone = noone;
static step = function() {
auto_button.interactable = !attributes.baked;
bake_button.text = attributes.baked? "Unbake" : "Bake mesh";
bake_button.blend = attributes.baked? COLORS._main_value_negative : c_white;
tools = attributes.baked? tools_baked : tools_dynamic;
}
static update = function() {
var _bones = inputs[0].getValue();
@ -387,9 +526,9 @@ function Node_Armature_Mesh_Rig(_x, _y, _group = noone) : Node(_x, _y, _group) c
.resetPose();
bone_posed.constrains = _bones.constrains;
var _barr = bone_posed.toArray();
for( var i = 0, n = array_length(_barr); i < n; i++ ) {
var _b = _barr[i];
bone_array = bone_posed.toArray();
for( var i = 0, n = array_length(bone_array); i < n; i++ ) {
var _b = bone_array[i];
_map[$ _b.ID] = _b;
if(!struct_has(attributes.bonePoseData, _b.ID)) continue;
@ -403,10 +542,12 @@ function Node_Armature_Mesh_Rig(_x, _y, _group = noone) : Node(_x, _y, _group) c
bone_posed.setPose(false);
bone_bbox = bone_posed.bbox();
if(rigdata == noone) AutoWeightPaint(false);
var _rdata = attributes.baked? attributes.bakeData : rigdata;
if(!attributes.baked && rigdata == noone)
AutoWeightPaint(false);
var _meshRigged = new RiggedMeshedSurface();
_meshRigged.rigMap = rigdata;
_meshRigged.rigMap = _rdata;
_meshRigged.mesh = _mesh.clone();
_meshRigged.bone = bone_posed;
_meshRigged.boneMap = _map;
@ -414,6 +555,46 @@ function Node_Armature_Mesh_Rig(_x, _y, _group = noone) : Node(_x, _y, _group) c
outputs[0].setValue(_meshRigged);
}
static bake = function() {
if(attributes.baked) { attributes.baked = false; return; }
attributes.baked = true;
var _dat = {};
var _k = struct_get_names(rigdata);
for( var i = 0, n = array_length(_k); i < n; i++ )
_dat[$ _k[i]] = array_clone(rigdata[$ _k[i]]);
attributes.bakeData = _dat;
}
static normalizeWeight = function() {
if(!attributes.baked) return;
var _mesh = inputs[1].getValue();
if(!is(_mesh, MeshedSurface)) return;
var _wdata = attributes.bakeData;
var _wkeys = struct_get_names(_wdata);
var _plen = array_length(_mesh.points);
for( var i = 0; i < _plen; i++ ) {
var _totalWeight = 0;
for( var j = 0, m = array_length(_wkeys); j < m; j++ )
_totalWeight += _wdata[$ _wkeys[j]][i];
if(_totalWeight == 0) continue;
for( var j = 0, m = array_length(_wkeys); j < m; j++ )
_wdata[$ _wkeys[j]][i] /= _totalWeight;
}
triggerRender();
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static getGraphPreviewSurface = function() { return noone; }
static getPreviewValues = function() {

View file

@ -0,0 +1,44 @@
function Node_Pixel_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "Pixel Extract";
setDimension(96, 48);
newInput(0, nodeValue_Surface("Surface in", self));
newOutput(0, nodeValue_Output("Colors", self, VALUE_TYPE.color, [ ]))
.setDisplay(VALUE_DISPLAY.palette);
input_display_list = [
["Surfaces", true], 0,
]
static processData = function(_outSurf, _data, _output_index, _array_index) {
var _surf = _data[0];
if(!is_surface(_surf)) return [];
var ww = surface_get_width_safe(_surf);
var hh = surface_get_height_safe(_surf);
var _pixels = array_create(ww * hh);
var c_buffer = buffer_create(1, buffer_grow, 4);
buffer_get_surface(c_buffer, _surf, 0);
buffer_seek(c_buffer, buffer_seek_start, 0);
var amo = ww * hh;
for( var i = 0; i < amo; i++ )
_pixels[i] = buffer_read(c_buffer, buffer_u32);
buffer_delete(c_buffer);
return _pixels;
}
static getPreviewValues = function() { return getInputData(0); }
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
var bbox = drawGetBbox(xx, yy, _s);
if(bbox.h < 1) return;
var pal = outputs[0].getValue();
drawPalette(pal, bbox.x0, bbox.y0, bbox.w, bbox.h);
}
}

View file

@ -0,0 +1,14 @@
{
"$GMScript":"v1",
"%Name":"node_pixel_extract",
"isCompatibility":false,
"isDnD":false,
"name":"node_pixel_extract",
"parent":{
"name":"effects",
"path":"folders/nodes/data/filter/effects.yy",
},
"resourceType":"GMScript",
"resourceVersion":"2.0",
"tags":[],
}

View file

@ -602,20 +602,22 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr
var _spr = _fromSel? THEME.add_16_select : THEME.add_16;
var _txt = _fromSel? "New autoterrain from selection" : "New autoterrain";
if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, _txt, _spr, 0, COLORS._main_value_positive) == 2) {
var _new_at = noone;
var _indx = array_create(brush.brush_width * brush.brush_height);
for( var i = 0, n = brush.brush_height; i < n; i++ )
for( var j = 0, m = brush.brush_width; j < m; j++ )
_indx[i * brush.brush_width + j] = brush.brush_indices[i][j][0];
if(_brush_tiles == 9) _new_at = new tiler_brush_autoterrain(AUTOTERRAIN_TYPE.box9, _indx);
else if(_brush_tiles == 25) _new_at = new tiler_brush_autoterrain(AUTOTERRAIN_TYPE.box25, _indx);
else if(_brush_tiles == 15) _new_at = new tiler_brush_autoterrain(AUTOTERRAIN_TYPE.side15, _indx);
else if(_brush_tiles == 48) _new_at = new tiler_brush_autoterrain(AUTOTERRAIN_TYPE.top48, _indx);
else if(_brush_tiles == 55) _new_at = new tiler_brush_autoterrain(AUTOTERRAIN_TYPE.top55, _indx);
else _new_at = new tiler_brush_autoterrain(AUTOTERRAIN_TYPE.box9, _indx);
var _typ = AUTOTERRAIN_TYPE.box9;
switch(_brush_tiles) {
case 9 : _typ = AUTOTERRAIN_TYPE.box9; break;
case 25 : _typ = AUTOTERRAIN_TYPE.box25; break;
case 15 : _typ = AUTOTERRAIN_TYPE.side15; break;
case 48 : _typ = AUTOTERRAIN_TYPE.top48; break;
case 55 : _typ = AUTOTERRAIN_TYPE.top55; break;
}
var _new_at = new tiler_brush_autoterrain(_typ, _indx);
object_selecting = _new_at;
object_select_id = noone;
array_push(autoterrain, _new_at);

View file

@ -926,7 +926,7 @@ function Panel_Inspector() : PanelContent() constructor {
jun.setFocusHover(pFOCUS, pHOVER);
var param = new widgetParam(ui(6), yy, con_w - ui(12), TEXTBOX_HEIGHT, noone, {}, _m, x, y);
var _wdh = jun.drawParam(param);
if(!is_undefined(_wdh)) hh += _wdh;
if(!is_undefined(_wdh)) hh += _wdh + ui(4);
continue;
} else if(is_array(jun)) { // LABEL

View file

@ -427,9 +427,9 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
draw_text_add(_tx, _y, "."); _tx += _dt_w;
draw_text_add(_tx, _y, _dc);
} else if(sliding == 2 && align == fa_center) {
var _wh_w = string_width(_text);
draw_text_add(_w / 2 - _wh_w - padding, _y, _text);
// } else if(sliding == 2 && align == fa_center) {
// var _wh_w = string_width(_text);
// draw_text_add(_w / 2 - _wh_w - padding, _y, _text);
} else
draw_text_add(_x + disp_x, _y, $"{_text}{suffix}");

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,90 @@
{
"$GMSprite":"",
"%Name":"s_node_pixel_extract",
"bboxMode":0,
"bbox_bottom":60,
"bbox_left":3,
"bbox_right":60,
"bbox_top":3,
"collisionKind":1,
"collisionTolerance":0,
"DynamicTexturePage":false,
"edgeFiltering":false,
"For3D":false,
"frames":[
{"$GMSpriteFrame":"","%Name":"c364c911-5377-4cd8-b746-937ff406eb90","name":"c364c911-5377-4cd8-b746-937ff406eb90","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
],
"gridX":0,
"gridY":0,
"height":64,
"HTile":false,
"layers":[
{"$GMImageLayer":"","%Name":"a950d84b-0a7b-4260-8bed-ecd94a1e681a","blendMode":0,"displayName":"default","isLocked":false,"name":"a950d84b-0a7b-4260-8bed-ecd94a1e681a","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,},
],
"name":"s_node_pixel_extract",
"nineSlice":null,
"origin":4,
"parent":{
"name":"color",
"path":"folders/nodes/icons/value/color.yy",
},
"preMultiplyAlpha":false,
"resourceType":"GMSprite",
"resourceVersion":"2.0",
"sequence":{
"$GMSequence":"",
"%Name":"s_node_pixel_extract",
"autoRecord":true,
"backdropHeight":768,
"backdropImageOpacity":0.5,
"backdropImagePath":"",
"backdropWidth":1366,
"backdropXOffset":0.0,
"backdropYOffset":0.0,
"events":{
"$KeyframeStore<MessageEventKeyframe>":"",
"Keyframes":[],
"resourceType":"KeyframeStore<MessageEventKeyframe>",
"resourceVersion":"2.0",
},
"eventStubScript":null,
"eventToFunction":{},
"length":1.0,
"lockOrigin":false,
"moments":{
"$KeyframeStore<MomentsEventKeyframe>":"",
"Keyframes":[],
"resourceType":"KeyframeStore<MomentsEventKeyframe>",
"resourceVersion":"2.0",
},
"name":"s_node_pixel_extract",
"playback":1,
"playbackSpeed":30.0,
"playbackSpeedType":0,
"resourceType":"GMSequence",
"resourceVersion":"2.0",
"showBackdrop":true,
"showBackdropImage":false,
"timeUnits":1,
"tracks":[
{"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore<SpriteFrameKeyframe>":"","Keyframes":[
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"c364c911-5377-4cd8-b746-937ff406eb90","path":"sprites/s_node_pixel_extract/s_node_pixel_extract.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
},"Disabled":false,"id":"f69bc807-9461-48ce-9e80-fedd88ef3820","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
],"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
],
"visibleRange":null,
"volume":1.0,
"xorigin":32,
"yorigin":32,
},
"swatchColours":null,
"swfPrecision":0.5,
"textureGroupId":{
"name":"Default",
"path":"texturegroups/Default",
},
"type":0,
"VTile":false,
"width":64,
}