From d10c77ee832578cc31c73708088046f7fc7eebd5 Mon Sep 17 00:00:00 2001 From: Tanasart Date: Wed, 7 Aug 2024 16:48:39 +0700 Subject: [PATCH] enum value update --- PixelComposer.resource_order | 41 +++ PixelComposer.yyp | 44 +++ .../__node_3d_combine/__node_3d_combine.gml | 9 +- .../__node_3d_displace/__node_3d_displace.gml | 11 +- .../__node_3d_extrude/__node_3d_extrude.gml | 13 +- scripts/__node_3d_obj/__node_3d_obj.gml | 9 +- scripts/__node_3d_plane/__node_3d_plane.gml | 11 +- .../__node_3d_prim_cone.gml | 13 +- .../__node_3d_prim_cube.gml | 23 +- .../__node_3d_prim_cylinder.gml | 15 +- .../__node_3d_prim_sphere.gml | 11 +- scripts/__node_3d_render/__node_3d_render.gml | 6 +- scripts/__node_3d_repeat/__node_3d_repeat.gml | 15 +- .../__node_3d_transform.gml | 9 +- .../__node_process_template.gml | 2 +- .../__node_shader_generator.gml | 3 +- .../__node_shader_processor.gml | 2 +- scripts/__node_template/__node_template.gml | 2 +- .../__node_value_array/__node_value_array.gml | 28 ++ .../__node_value_array/__node_value_array.yy | 13 + .../__node_value_object.gml | 21 ++ .../__node_value_object.yy | 13 + .../_node_VFX_spawner/_node_VFX_spawner.gml | 25 +- .../_node_strand_affector.gml | 6 +- scripts/areaBox/areaBox.gml | 22 -- scripts/draw_setter/draw_setter.gml | 5 + .../draw_text_function/draw_text_function.gml | 13 + .../nodd_mk_delay_machine.gml | 5 +- scripts/node_2d_light/node_2d_light.gml | 21 +- scripts/node_3d_camera/node_3d_camera.gml | 23 +- .../node_3d_camera_set/node_3d_camera_set.gml | 10 +- scripts/node_3d_depth/node_3d_depth.gml | 4 +- scripts/node_3d_material/node_3d_material.gml | 4 +- .../node_3d_mesh_extrude.gml | 4 +- scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml | 3 +- .../node_3d_mesh_plane/node_3d_mesh_plane.gml | 3 +- .../node_3d_mesh_terrain.gml | 5 +- .../node_3d_point_affector.gml | 5 +- scripts/node_3d_repeat/node_3d_repeat.gml | 3 +- .../node_3d_mesh_plane.gml | 3 +- .../node_3d_transform_image.gml | 2 +- .../node_3d_transform_scene.gml | 9 +- scripts/node_9slice/node_9slice.gml | 8 +- scripts/node_FFT/node_FFT.gml | 3 +- .../node_FLIP_apply_force.gml | 5 +- .../node_FLIP_apply_velocity.gml | 3 +- .../node_FLIP_destroy/node_FLIP_destroy.gml | 3 +- scripts/node_FLIP_domain/node_FLIP_domain.gml | 6 +- scripts/node_FLIP_render/node_FLIP_render.gml | 5 +- .../node_FLIP_spawner/node_FLIP_spawner.gml | 8 +- scripts/node_FXAA/node_FXAA.gml | 2 +- scripts/node_PCX_fn_math/node_PCX_fn_math.gml | 3 +- .../node_VFX_override/node_VFX_override.gml | 2 +- .../node_VFX_renderer/node_VFX_renderer.gml | 6 +- .../node_VFX_renderer_output.gml | 6 +- .../node_active_canvas/node_active_canvas.gml | 8 +- .../node_alpha_cutoff/node_alpha_cutoff.gml | 4 +- scripts/node_alpha_grey/node_alpha_grey.gml | 2 +- scripts/node_alpha_hash/node_alpha_hash.gml | 2 +- .../node_application_in.gml | 2 +- scripts/node_area/node_area.gml | 9 +- scripts/node_argument/node_argument.gml | 3 +- .../node_armature_bind/node_armature_bind.gml | 5 +- scripts/node_array/node_array.gml | 3 +- scripts/node_array_get/node_array_get.gml | 3 +- .../node_array_remove/node_array_remove.gml | 3 +- scripts/node_array_sort/node_array_sort.gml | 3 +- scripts/node_atlas/node_atlas.gml | 5 +- scripts/node_atlas_draw/node_atlas_draw.gml | 5 +- scripts/node_atlas_get/node_atlas_get.gml | 2 +- scripts/node_atlas_set/node_atlas_set.gml | 6 +- .../node_atlas_to_struct.gml | 2 +- .../node_audio_window/node_audio_window.gml | 3 +- scripts/node_average/node_average.gml | 4 +- scripts/node_bend/node_bend.gml | 10 +- scripts/node_bevel/node_bevel.gml | 15 +- scripts/node_blend/node_blend.gml | 23 +- scripts/node_blend_edge/node_blend_edge.gml | 7 +- scripts/node_blobify/node_blobify.gml | 2 +- scripts/node_bloom/node_bloom.gml | 12 +- scripts/node_blur/node_blur.gml | 11 +- scripts/node_blur_bokeh/node_blur_bokeh.gml | 4 +- .../node_blur_contrast/node_blur_contrast.gml | 4 +- .../node_blur_directional.gml | 7 +- scripts/node_blur_path/node_blur_path.gml | 4 +- scripts/node_blur_radial/node_blur_radial.gml | 11 +- scripts/node_blur_shape/node_blur_shape.gml | 11 +- scripts/node_blur_simple/node_blur_simple.gml | 10 +- scripts/node_blur_slope/node_blur_slope.gml | 6 +- scripts/node_blur_zoom/node_blur_zoom.gml | 13 +- scripts/node_boolean/node_boolean.gml | 3 +- scripts/node_box_pattern/node_box_pattern.gml | 12 +- .../node_brush_linear/node_brush_linear.gml | 4 +- scripts/node_bw/node_bw.gml | 4 +- scripts/node_cache/node_cache.gml | 2 +- scripts/node_cache_array/node_cache_array.gml | 2 +- scripts/node_camera/node_camera.gml | 6 +- scripts/node_canvas/node_canvas.gml | 13 +- .../node_canvas_group/node_canvas_group.gml | 3 +- scripts/node_cellular/node_cellular.gml | 12 +- scripts/node_checker/node_checker.gml | 9 +- .../node_chromatic_aberration.gml | 2 +- .../node_color_adjust/node_color_adjust.gml | 26 +- scripts/node_color_mix/node_color_mix.gml | 3 +- .../node_color_remove/node_color_remove.gml | 4 +- .../node_color_replace/node_color_replace.gml | 7 +- scripts/node_colorize/node_colorize.gml | 4 +- .../node_colors_replace.gml | 4 +- scripts/node_combine_hsv/node_combine_hsv.gml | 10 +- scripts/node_combine_rgb/node_combine_rgb.gml | 13 +- scripts/node_compare/node_compare.gml | 3 +- scripts/node_composite/node_composite.gml | 14 +- scripts/node_condition/node_condition.gml | 6 +- scripts/node_convolution/node_convolution.gml | 8 +- scripts/node_corner/node_corner.gml | 4 +- scripts/node_crop/node_crop.gml | 8 +- .../node_crop_content/node_crop_content.gml | 6 +- .../node_cross_section/node_cross_section.gml | 8 +- scripts/node_curve/node_curve.gml | 4 +- scripts/node_curve_hsv/node_curve_hsv.gml | 4 +- scripts/node_de_corner/node_de_corner.gml | 7 +- scripts/node_de_stray/node_de_stray.gml | 7 +- scripts/node_delay/node_delay.gml | 2 +- scripts/node_diffuse/node_diffuse.gml | 10 +- scripts/node_dilate/node_dilate.gml | 12 +- .../node_directory_search.gml | 3 +- scripts/node_displace/node_displace.gml | 23 +- .../node_display_text/node_display_text.gml | 3 +- scripts/node_dither/node_dither.gml | 14 +- scripts/node_dll/node_dll.gml | 6 +- scripts/node_dust/node_dust.gml | 3 +- scripts/node_dynasurf_in/node_dynasurf_in.gml | 2 +- scripts/node_edge_detect/node_edge_detect.gml | 11 +- scripts/node_edge_shade/node_edge_shade.gml | 2 +- scripts/node_erode/node_erode.gml | 6 +- scripts/node_export/node_export.gml | 11 +- scripts/node_find_pixel/node_find_pixel.gml | 5 +- scripts/node_flip/node_flip.gml | 5 +- scripts/node_flood_fill/node_flood_fill.gml | 7 +- scripts/node_flow_noise/node_flow_noise.gml | 3 +- scripts/node_fn/node_fn.gml | 3 +- scripts/node_fn_ease/node_fn_ease.gml | 3 +- scripts/node_fn_math/node_fn_math.gml | 3 +- .../node_fn_smoothstep/node_fn_smoothstep.gml | 3 +- scripts/node_fold_noise/node_fold_noise.gml | 6 +- scripts/node_gabor_noise/node_gabor_noise.gml | 6 +- scripts/node_gamma_map/node_gamma_map.gml | 2 +- scripts/node_glow/node_glow.gml | 10 +- scripts/node_gradient/node_gradient.gml | 14 +- .../node_gradient_palette.gml | 3 +- .../node_gradient_points.gml | 3 +- scripts/node_grain/node_grain.gml | 13 +- .../node_graph_preview/node_graph_preview.gml | 2 +- scripts/node_grey_alpha/node_grey_alpha.gml | 2 +- scripts/node_greyscale/node_greyscale.gml | 8 +- scripts/node_grid/node_grid.gml | 14 +- scripts/node_grid_hex/node_grid_hex.gml | 11 +- scripts/node_grid_noise/node_grid_noise.gml | 11 +- .../node_grid_pentagonal.gml | 11 +- scripts/node_grid_tri/node_grid_tri.gml | 11 +- scripts/node_group_input/node_group_input.gml | 12 +- .../node_group_thumbnail.gml | 4 +- .../node_herringbone_tile.gml | 11 +- scripts/node_hlsl/node_hlsl.gml | 5 +- scripts/node_honey_noise/node_honey_noise.gml | 6 +- scripts/node_hsv_channel/node_hsv_channel.gml | 2 +- .../node_http_request/node_http_request.gml | 3 +- .../node_image_animated.gml | 6 +- scripts/node_image_gif/node_image_gif.gml | 3 +- scripts/node_image_grid/node_image_grid.gml | 5 +- .../node_image_sequence.gml | 6 +- scripts/node_image_sheet/node_image_sheet.gml | 11 +- scripts/node_interlaced/node_interlaced.gml | 7 +- .../node_interpret_number.gml | 3 +- scripts/node_invert/node_invert.gml | 4 +- scripts/node_isosurf/node_isosurf.gml | 5 +- scripts/node_jpeg/node_jpeg.gml | 10 +- scripts/node_kuwahara/node_kuwahara.gml | 4 +- scripts/node_level/node_level.gml | 4 +- .../node_level_selector.gml | 4 +- scripts/node_line/node_line.gml | 14 +- .../node_local_analyze/node_local_analyze.gml | 14 +- scripts/node_logic/node_logic.gml | 3 +- scripts/node_lovify/node_lovify.gml | 2 +- scripts/node_lua_compute/node_lua_compute.gml | 6 +- scripts/node_lua_global/node_lua_global.gml | 3 +- scripts/node_lua_surface/node_lua_surface.gml | 3 +- scripts/node_math/node_math.gml | 3 +- .../node_mesh_create_path.gml | 3 +- .../node_mesh_transform.gml | 3 +- scripts/node_mesh_warp/node_mesh_warp.gml | 5 +- scripts/node_midi_in/node_midi_in.gml | 3 +- scripts/node_mirror/node_mirror.gml | 5 +- scripts/node_mk_blinker/node_mk_blinker.gml | 4 +- scripts/node_mk_brownian/node_mk_brownian.gml | 7 +- scripts/node_mk_cable/node_mk_cable.gml | 3 +- scripts/node_mk_fall/node_mk_fall.gml | 8 +- scripts/node_mk_flag/node_mk_flag.gml | 8 +- scripts/node_mk_flame/node_mk_flame.gml | 6 +- scripts/node_mk_flare/node_mk_flare.gml | 5 +- scripts/node_mk_fracture/node_mk_fracture.gml | 8 +- .../node_mk_gridballs/node_mk_gridballs.gml | 17 +- scripts/node_mk_gridflip/node_mk_gridflip.gml | 19 +- scripts/node_mk_rain/node_mk_rain.gml | 10 +- scripts/node_mk_saber/node_mk_saber.gml | 5 +- scripts/node_mk_tile/node_mk_tile.gml | 27 +- scripts/node_module_test/node_module_test.gml | 2 +- .../node_monitor_capture.gml | 6 +- .../node_morph_surface/node_morph_surface.gml | 4 +- scripts/node_move_point/node_move_point.gml | 6 +- scripts/node_noise/node_noise.gml | 6 +- scripts/node_noise_aniso/node_noise_aniso.gml | 9 +- .../node_noise_bubble/node_noise_bubble.gml | 6 +- .../node_noise_cristal/node_noise_cristal.gml | 3 +- scripts/node_noise_fbm/node_noise_fbm.gml | 6 +- scripts/node_noise_hex/node_noise_hex.gml | 8 +- .../node_noise_simplex/node_noise_simplex.gml | 9 +- .../node_noise_strand/node_noise_strand.gml | 6 +- scripts/node_noise_tri/node_noise_tri.gml | 8 +- scripts/node_normal/node_normal.gml | 2 +- .../node_normal_light/node_normal_light.gml | 7 +- scripts/node_normalize/node_normalize.gml | 5 +- scripts/node_number/node_number.gml | 16 +- scripts/node_offset/node_offset.gml | 2 +- scripts/node_onion_skin/node_onion_skin.gml | 2 +- scripts/node_outline/node_outline.gml | 11 +- .../node_override_channel.gml | 13 +- .../node_pack_sprites/node_pack_sprites.gml | 5 +- scripts/node_padding/node_padding.gml | 14 +- .../node_palette_extract.gml | 8 +- .../node_palette_shift/node_palette_shift.gml | 4 +- .../node_palette_sort/node_palette_sort.gml | 3 +- scripts/node_particle/node_particle.gml | 8 +- scripts/node_path/node_path.gml | 4 +- scripts/node_path_3d/node_path_3d.gml | 3 +- .../node_path_from_mask.gml | 2 +- .../node_path_l_system/node_path_l_system.gml | 6 +- scripts/node_path_map/node_path_map.gml | 5 +- scripts/node_path_plot/node_path_plot.gml | 6 +- .../node_path_profile/node_path_profile.gml | 6 +- scripts/node_path_sample/node_path_sample.gml | 3 +- .../node_path_scatter/node_path_scatter.gml | 6 +- .../node_path_transform.gml | 3 +- .../node_pb_box_contract.gml | 6 +- .../node_pb_box_divide/node_pb_box_divide.gml | 6 +- .../node_pb_box_inset/node_pb_box_inset.gml | 3 +- .../node_pb_box_split/node_pb_box_split.gml | 6 +- .../node_pb_draw_angle/node_pb_draw_angle.gml | 3 +- .../node_pb_draw_line/node_pb_draw_line.gml | 3 +- .../node_pb_draw_round_rectangle.gml | 3 +- .../node_pb_draw_semi_ellipse.gml | 3 +- .../node_pb_draw_trapezoid.gml | 6 +- scripts/node_pb_fx_brick/node_pb_fx_brick.gml | 3 +- .../node_pb_fx_intersect.gml | 2 +- .../node_pb_fx_outline/node_pb_fx_outline.gml | 3 +- scripts/node_pb_fx_stack/node_pb_fx_stack.gml | 3 +- scripts/node_pb_fx_strip/node_pb_fx_strip.gml | 3 +- .../node_pb_fx_subtract.gml | 2 +- scripts/node_perlin/node_perlin.gml | 9 +- .../node_perlin_extra/node_perlin_extra.gml | 9 +- .../node_perlin_smear/node_perlin_smear.gml | 6 +- .../node_pixel_builder/node_pixel_builder.gml | 3 +- scripts/node_pixel_cloud/node_pixel_cloud.gml | 4 +- .../node_pixel_sampler/node_pixel_sampler.gml | 13 +- scripts/node_pixel_sort/node_pixel_sort.gml | 4 +- scripts/node_plot_linear/node_plot_linear.gml | 12 +- scripts/node_polar/node_polar.gml | 7 +- scripts/node_posterize/node_posterize.gml | 5 +- scripts/node_processor/node_processor.gml | 6 +- .../node_pytagorean_tile.gml | 14 +- .../node_quasicrystal/node_quasicrystal.gml | 6 +- .../node_random_shape/node_random_shape.gml | 3 +- scripts/node_random_tile/node_random_tile.gml | 11 +- scripts/node_rate_remap/node_rate_remap.gml | 2 +- scripts/node_rd/node_rd.gml | 14 +- scripts/node_region_fill/node_region_fill.gml | 14 +- .../node_render_sprite_sheet.gml | 11 +- scripts/node_repeat/node_repeat.gml | 28 +- .../node_repeat_texture.gml | 5 +- scripts/node_rgb_channel/node_rgb_channel.gml | 5 +- .../node_rigid_force_apply.gml | 6 +- .../node_rigid_object/node_rigid_object.gml | 5 +- .../node_rigid_object_spawner.gml | 3 +- scripts/node_rigid_wall/node_rigid_wall.gml | 3 +- scripts/node_rim/node_rim.gml | 3 +- scripts/node_rm_cloud/node_rm_cloud.gml | 6 +- scripts/node_rm_combine/node_rm_combine.gml | 11 +- .../node_rm_primitive/node_rm_primitive.gml | 19 +- scripts/node_rm_render/node_rm_render.gml | 8 +- scripts/node_rm_terrain/node_rm_terrain.gml | 9 +- scripts/node_sampler/node_sampler.gml | 2 +- scripts/node_scale/node_scale.gml | 5 +- scripts/node_scale_algo/node_scale_algo.gml | 5 +- scripts/node_scatter/node_scatter.gml | 27 +- .../node_scatter_points.gml | 13 +- scripts/node_sdf/node_sdf.gml | 5 +- .../node_segment_filter.gml | 3 +- .../node_seperate_shape.gml | 5 +- .../node_sequence_anim/node_sequence_anim.gml | 5 +- scripts/node_shadow/node_shadow.gml | 7 +- scripts/node_shadow_cast/node_shadow_cast.gml | 15 +- scripts/node_shape/node_shape.gml | 18 +- scripts/node_shape_map/node_shape_map.gml | 8 +- .../node_shape_polygon/node_shape_polygon.gml | 9 +- scripts/node_shard_noise/node_shard_noise.gml | 3 +- scripts/node_skew/node_skew.gml | 11 +- scripts/node_slideshow/node_slideshow.gml | 3 +- scripts/node_smear/node_smear.gml | 13 +- scripts/node_smoke_add/node_smoke_add.gml | 2 +- .../node_smoke_add_collider.gml | 2 +- .../node_smoke_apply_velocity.gml | 2 +- .../node_smoke_domain/node_smoke_domain.gml | 11 +- scripts/node_smoke_group/node_smoke_group.gml | 11 +- .../node_smoke_render/node_smoke_render.gml | 3 +- .../node_smoke_render_output.gml | 3 +- .../node_smoke_repulse/node_smoke_repulse.gml | 3 +- .../node_smoke_turbulence.gml | 3 +- .../node_smoke_vortex/node_smoke_vortex.gml | 3 +- scripts/node_solid/node_solid.gml | 5 +- scripts/node_spherize/node_spherize.gml | 12 +- scripts/node_spout_send/node_spout_send.gml | 2 +- .../node_sprite_stack/node_sprite_stack.gml | 11 +- scripts/node_stack/node_stack.gml | 8 +- scripts/node_stagger/node_stagger.gml | 5 +- scripts/node_statistic/node_statistic.gml | 3 +- .../node_strand_create/node_strand_create.gml | 9 +- .../node_strand_gravity.gml | 3 +- .../node_strand_length_adjust.gml | 3 +- .../node_strand_render/node_strand_render.gml | 3 +- .../node_strand_render_texture.gml | 5 +- .../node_string_length/node_string_length.gml | 3 +- scripts/node_string_trim/node_string_trim.gml | 8 +- scripts/node_stripe/node_stripe.gml | 12 +- .../node_surface_data/node_surface_data.gml | 4 +- .../node_surface_replace.gml | 9 +- .../node_surface_to_buffer.gml | 2 +- .../node_surface_to_color.gml | 2 +- scripts/node_text/node_text.gml | 15 +- .../node_texture_remap/node_texture_remap.gml | 7 +- scripts/node_threshold/node_threshold.gml | 4 +- scripts/node_tile/node_tile.gml | 4 +- scripts/node_tile_random/node_tile_random.gml | 5 +- scripts/node_time_remap/node_time_remap.gml | 4 +- .../node_timeline_preview.gml | 2 +- scripts/node_tonemap_ace/node_tonemap_ace.gml | 4 +- scripts/node_trail/node_trail.gml | 2 +- scripts/node_transform/node_transform.gml | 73 +++-- .../node_transform_array.gml | 3 +- .../node_transform_single.gml | 2 +- .../node_trigger_bool/node_trigger_bool.gml | 3 +- scripts/node_twirl/node_twirl.gml | 12 +- scripts/node_value/node_value.gml | 11 +- scripts/node_value_area/node_value_area.gml | 86 ++++++ scripts/node_value_area/node_value_area.yy | 13 + .../node_value_armature.gml | 5 + .../node_value_armature.yy | 13 + .../node_value_audioBit.gml | 5 + .../node_value_audioBit.yy | 13 + scripts/node_value_bool/node_value_bool.gml | 18 ++ scripts/node_value_bool/node_value_bool.yy | 13 + .../node_value_buffer/node_value_buffer.gml | 5 + .../node_value_buffer/node_value_buffer.yy | 13 + scripts/node_value_color/node_value_color.gml | 19 ++ scripts/node_value_color/node_value_color.yy | 13 + .../node_value_corner/node_value_corner.gml | 5 + .../node_value_corner/node_value_corner.yy | 13 + .../node_value_d3_camera.gml | 21 ++ .../node_value_d3_camera.yy | 13 + .../node_value_d3_light.gml | 21 ++ .../node_value_d3_light.yy | 13 + .../node_value_d3_material.gml | 38 +++ .../node_value_d3_material.yy | 13 + .../node_value_d3_mesh/node_value_d3_mesh.gml | 21 ++ .../node_value_d3_mesh/node_value_d3_mesh.yy | 13 + .../node_value_d3_scene.gml | 21 ++ .../node_value_d3_scene.yy | 13 + .../node_value_dimension.gml | 72 +++++ .../node_value_dimension.yy | 13 + .../node_value_enum_button.gml | 23 ++ .../node_value_enum_button.yy | 13 + .../node_value_enum_scroll.gml | 19 ++ .../node_value_enum_scroll.yy | 13 + scripts/node_value_float/node_value_float.gml | 28 +- scripts/node_value_float/node_value_float.yy | 4 +- .../node_value_gradient.gml | 35 +++ .../node_value_gradient.yy | 13 + scripts/node_value_int/node_value_int.gml | 51 ++++ scripts/node_value_int/node_value_int.yy | 13 + .../node_value_output/node_value_output.gml | 8 +- .../node_value_padding/node_value_padding.gml | 5 + .../node_value_padding/node_value_padding.yy | 13 + .../node_value_palette/node_value_palette.gml | 21 ++ .../node_value_palette/node_value_palette.yy | 13 + .../node_value_particle.gml | 5 + .../node_value_particle.yy | 13 + .../node_value_path_anchor.gml | 5 + .../node_value_path_anchor.yy | 13 + .../node_value_pathnode.gml | 5 + .../node_value_pathnode.yy | 13 + .../node_value_quarterion.gml | 20 ++ .../node_value_quarterion.yy | 13 + scripts/node_value_range/node_value_range.gml | 30 ++ scripts/node_value_range/node_value_range.yy | 13 + .../node_value_rotation.gml | 22 ++ .../node_value_rotation.yy | 13 + .../node_value_rotation_random.gml | 8 + .../node_value_rotation_random.yy | 13 + .../node_value_rotation_range.gml | 6 + .../node_value_rotation_range.yy | 13 + scripts/node_value_sdf/node_value_sdf.gml | 5 + scripts/node_value_sdf/node_value_sdf.yy | 13 + .../node_value_slider_range.gml | 6 + .../node_value_slider_range.yy | 13 + .../node_value_struct/node_value_struct.gml | 5 + .../node_value_struct/node_value_struct.yy | 13 + .../node_value_surface/node_value_surface.gml | 24 ++ .../node_value_surface/node_value_surface.yy | 13 + scripts/node_value_text/node_value_text.gml | 18 ++ scripts/node_value_text/node_value_text.yy | 13 + .../node_value_trigger/node_value_trigger.gml | 17 ++ .../node_value_trigger/node_value_trigger.yy | 13 + scripts/node_value_types/node_value_types.gml | 4 +- scripts/node_value_vec2/node_value_vec2.gml | 70 +++++ scripts/node_value_vec2/node_value_vec2.yy | 13 + .../node_value_vec2_range.gml | 6 + .../node_value_vec2_range.yy | 13 + scripts/node_value_vec3/node_value_vec3.gml | 5 + scripts/node_value_vec3/node_value_vec3.yy | 13 + .../node_value_vec3_range.gml | 6 + .../node_value_vec3_range.yy | 13 + scripts/node_value_vec4/node_value_vec4.gml | 5 + scripts/node_value_vec4/node_value_vec4.yy | 13 + scripts/node_vector2/node_vector2.gml | 3 +- scripts/node_vignette/node_vignette.gml | 2 +- .../node_voronoi_extra/node_voronoi_extra.gml | 6 +- scripts/node_warp/node_warp.gml | 5 +- .../node_wav_file_write.gml | 3 +- .../node_wavelet_noise/node_wavelet_noise.gml | 3 +- .../node_websocket_receiver.gml | 3 +- .../node_websocket_sender.gml | 5 +- scripts/node_widget_test/node_widget_test.gml | 2 +- scripts/node_wrap_area/node_wrap_area.gml | 2 +- .../node_wrap_perspective.gml | 2 +- scripts/node_zigzag/node_zigzag.gml | 9 +- scripts/panel_graph/panel_graph.gml | 258 +++++++++--------- 445 files changed, 2541 insertions(+), 1632 deletions(-) create mode 100644 scripts/__node_value_array/__node_value_array.gml create mode 100644 scripts/__node_value_array/__node_value_array.yy create mode 100644 scripts/__node_value_object/__node_value_object.gml create mode 100644 scripts/__node_value_object/__node_value_object.yy create mode 100644 scripts/node_value_area/node_value_area.gml create mode 100644 scripts/node_value_area/node_value_area.yy create mode 100644 scripts/node_value_armature/node_value_armature.gml create mode 100644 scripts/node_value_armature/node_value_armature.yy create mode 100644 scripts/node_value_audioBit/node_value_audioBit.gml create mode 100644 scripts/node_value_audioBit/node_value_audioBit.yy create mode 100644 scripts/node_value_bool/node_value_bool.gml create mode 100644 scripts/node_value_bool/node_value_bool.yy create mode 100644 scripts/node_value_buffer/node_value_buffer.gml create mode 100644 scripts/node_value_buffer/node_value_buffer.yy create mode 100644 scripts/node_value_color/node_value_color.gml create mode 100644 scripts/node_value_color/node_value_color.yy create mode 100644 scripts/node_value_corner/node_value_corner.gml create mode 100644 scripts/node_value_corner/node_value_corner.yy create mode 100644 scripts/node_value_d3_camera/node_value_d3_camera.gml create mode 100644 scripts/node_value_d3_camera/node_value_d3_camera.yy create mode 100644 scripts/node_value_d3_light/node_value_d3_light.gml create mode 100644 scripts/node_value_d3_light/node_value_d3_light.yy create mode 100644 scripts/node_value_d3_material/node_value_d3_material.gml create mode 100644 scripts/node_value_d3_material/node_value_d3_material.yy create mode 100644 scripts/node_value_d3_mesh/node_value_d3_mesh.gml create mode 100644 scripts/node_value_d3_mesh/node_value_d3_mesh.yy create mode 100644 scripts/node_value_d3_scene/node_value_d3_scene.gml create mode 100644 scripts/node_value_d3_scene/node_value_d3_scene.yy create mode 100644 scripts/node_value_dimension/node_value_dimension.gml create mode 100644 scripts/node_value_dimension/node_value_dimension.yy create mode 100644 scripts/node_value_enum_button/node_value_enum_button.gml create mode 100644 scripts/node_value_enum_button/node_value_enum_button.yy create mode 100644 scripts/node_value_enum_scroll/node_value_enum_scroll.gml create mode 100644 scripts/node_value_enum_scroll/node_value_enum_scroll.yy create mode 100644 scripts/node_value_gradient/node_value_gradient.gml create mode 100644 scripts/node_value_gradient/node_value_gradient.yy create mode 100644 scripts/node_value_int/node_value_int.gml create mode 100644 scripts/node_value_int/node_value_int.yy create mode 100644 scripts/node_value_padding/node_value_padding.gml create mode 100644 scripts/node_value_padding/node_value_padding.yy create mode 100644 scripts/node_value_palette/node_value_palette.gml create mode 100644 scripts/node_value_palette/node_value_palette.yy create mode 100644 scripts/node_value_particle/node_value_particle.gml create mode 100644 scripts/node_value_particle/node_value_particle.yy create mode 100644 scripts/node_value_path_anchor/node_value_path_anchor.gml create mode 100644 scripts/node_value_path_anchor/node_value_path_anchor.yy create mode 100644 scripts/node_value_pathnode/node_value_pathnode.gml create mode 100644 scripts/node_value_pathnode/node_value_pathnode.yy create mode 100644 scripts/node_value_quarterion/node_value_quarterion.gml create mode 100644 scripts/node_value_quarterion/node_value_quarterion.yy create mode 100644 scripts/node_value_range/node_value_range.gml create mode 100644 scripts/node_value_range/node_value_range.yy create mode 100644 scripts/node_value_rotation/node_value_rotation.gml create mode 100644 scripts/node_value_rotation/node_value_rotation.yy create mode 100644 scripts/node_value_rotation_random/node_value_rotation_random.gml create mode 100644 scripts/node_value_rotation_random/node_value_rotation_random.yy create mode 100644 scripts/node_value_rotation_range/node_value_rotation_range.gml create mode 100644 scripts/node_value_rotation_range/node_value_rotation_range.yy create mode 100644 scripts/node_value_sdf/node_value_sdf.gml create mode 100644 scripts/node_value_sdf/node_value_sdf.yy create mode 100644 scripts/node_value_slider_range/node_value_slider_range.gml create mode 100644 scripts/node_value_slider_range/node_value_slider_range.yy create mode 100644 scripts/node_value_struct/node_value_struct.gml create mode 100644 scripts/node_value_struct/node_value_struct.yy create mode 100644 scripts/node_value_surface/node_value_surface.gml create mode 100644 scripts/node_value_surface/node_value_surface.yy create mode 100644 scripts/node_value_text/node_value_text.gml create mode 100644 scripts/node_value_text/node_value_text.yy create mode 100644 scripts/node_value_trigger/node_value_trigger.gml create mode 100644 scripts/node_value_trigger/node_value_trigger.yy create mode 100644 scripts/node_value_vec2/node_value_vec2.gml create mode 100644 scripts/node_value_vec2/node_value_vec2.yy create mode 100644 scripts/node_value_vec2_range/node_value_vec2_range.gml create mode 100644 scripts/node_value_vec2_range/node_value_vec2_range.yy create mode 100644 scripts/node_value_vec3/node_value_vec3.gml create mode 100644 scripts/node_value_vec3/node_value_vec3.yy create mode 100644 scripts/node_value_vec3_range/node_value_vec3_range.gml create mode 100644 scripts/node_value_vec3_range/node_value_vec3_range.yy create mode 100644 scripts/node_value_vec4/node_value_vec4.gml create mode 100644 scripts/node_value_vec4/node_value_vec4.yy diff --git a/PixelComposer.resource_order b/PixelComposer.resource_order index fbeae14b9..1de24cfd8 100644 --- a/PixelComposer.resource_order +++ b/PixelComposer.resource_order @@ -144,6 +144,10 @@ {"name":"VFX","order":16,"path":"folders/nodes/icons/VFX.yy",}, {"name":"values","order":3,"path":"folders/nodes/values.yy",}, {"name":"types","order":4,"path":"folders/nodes/values/types.yy",}, + {"name":"3d","order":31,"path":"folders/nodes/values/types/3d.yy",}, + {"name":"colors","order":32,"path":"folders/nodes/values/types/colors.yy",}, + {"name":"object","order":33,"path":"folders/nodes/values/types/object.yy",}, + {"name":"numeric","order":30,"path":"folders/nodes/values/types/numeric.yy",}, {"name":"panels","order":150,"path":"folders/panels.yy",}, {"name":"video_banner","order":11,"path":"folders/panels/_others/video_banner.yy",}, {"name":"components","order":3,"path":"folders/panels/inspectors/components.yy",}, @@ -372,6 +376,8 @@ {"name":"__node_shader_generator","order":4,"path":"scripts/__node_shader_generator/__node_shader_generator.yy",}, {"name":"__node_shader_processor","order":5,"path":"scripts/__node_shader_processor/__node_shader_processor.yy",}, {"name":"__node_shader","order":3,"path":"scripts/__node_shader/__node_shader.yy",}, + {"name":"__node_value_array","order":12,"path":"scripts/__node_value_array/__node_value_array.yy",}, + {"name":"__node_value_object","order":3,"path":"scripts/__node_value_object/__node_value_object.yy",}, {"name":"__node_value_processor","order":4,"path":"scripts/__node_value_processor/__node_value_processor.yy",}, {"name":"__node_VFX_effector","order":8,"path":"scripts/__node_VFX_effector/__node_VFX_effector.yy",}, {"name":"__node","order":6,"path":"scripts/__node/__node.yy",}, @@ -1144,10 +1150,45 @@ {"name":"node_tunnel_out","order":1,"path":"scripts/node_tunnel_out/node_tunnel_out.yy",}, {"name":"node_twirl","order":4,"path":"scripts/node_twirl/node_twirl.yy",}, {"name":"node_unicode","order":1,"path":"scripts/node_unicode/node_unicode.yy",}, + {"name":"node_value_area","order":10,"path":"scripts/node_value_area/node_value_area.yy",}, + {"name":"node_value_audioBit","order":1,"path":"scripts/node_value_audioBit/node_value_audioBit.yy",}, {"name":"node_value_base","order":1,"path":"scripts/node_value_base/node_value_base.yy",}, + {"name":"node_value_bool","order":3,"path":"scripts/node_value_bool/node_value_bool.yy",}, + {"name":"node_value_buffer","order":2,"path":"scripts/node_value_buffer/node_value_buffer.yy",}, + {"name":"node_value_corner","order":17,"path":"scripts/node_value_corner/node_value_corner.yy",}, + {"name":"node_value_d3_light","order":1,"path":"scripts/node_value_d3_light/node_value_d3_light.yy",}, + {"name":"node_value_d3_material","order":2,"path":"scripts/node_value_d3_material/node_value_d3_material.yy",}, + {"name":"node_value_d3_mesh","order":3,"path":"scripts/node_value_d3_mesh/node_value_d3_mesh.yy",}, + {"name":"node_value_d3_scene","order":4,"path":"scripts/node_value_d3_scene/node_value_d3_scene.yy",}, + {"name":"node_value_dimension","order":20,"path":"scripts/node_value_dimension/node_value_dimension.yy",}, + {"name":"node_value_enum_button","order":6,"path":"scripts/node_value_enum_button/node_value_enum_button.yy",}, + {"name":"node_value_enum_scroll","order":7,"path":"scripts/node_value_enum_scroll/node_value_enum_scroll.yy",}, + {"name":"node_value_gradient","order":1,"path":"scripts/node_value_gradient/node_value_gradient.yy",}, + {"name":"node_value_int","order":1,"path":"scripts/node_value_int/node_value_int.yy",}, {"name":"node_value_output","order":1,"path":"scripts/node_value_output/node_value_output.yy",}, + {"name":"node_value_padding","order":16,"path":"scripts/node_value_padding/node_value_padding.yy",}, + {"name":"node_value_palette","order":2,"path":"scripts/node_value_palette/node_value_palette.yy",}, + {"name":"node_value_particle","order":4,"path":"scripts/node_value_particle/node_value_particle.yy",}, + {"name":"node_value_path_anchor","order":18,"path":"scripts/node_value_path_anchor/node_value_path_anchor.yy",}, + {"name":"node_value_pathnode","order":5,"path":"scripts/node_value_pathnode/node_value_pathnode.yy",}, + {"name":"node_value_quarterion","order":19,"path":"scripts/node_value_quarterion/node_value_quarterion.yy",}, + {"name":"node_value_range","order":2,"path":"scripts/node_value_range/node_value_range.yy",}, + {"name":"node_value_rotation_random","order":11,"path":"scripts/node_value_rotation_random/node_value_rotation_random.yy",}, + {"name":"node_value_rotation_range","order":9,"path":"scripts/node_value_rotation_range/node_value_rotation_range.yy",}, + {"name":"node_value_rotation","order":8,"path":"scripts/node_value_rotation/node_value_rotation.yy",}, + {"name":"node_value_sdf","order":6,"path":"scripts/node_value_sdf/node_value_sdf.yy",}, + {"name":"node_value_slider_range","order":13,"path":"scripts/node_value_slider_range/node_value_slider_range.yy",}, + {"name":"node_value_struct","order":7,"path":"scripts/node_value_struct/node_value_struct.yy",}, + {"name":"node_value_surface","order":9,"path":"scripts/node_value_surface/node_value_surface.yy",}, + {"name":"node_value_text","order":14,"path":"scripts/node_value_text/node_value_text.yy",}, + {"name":"node_value_trigger","order":19,"path":"scripts/node_value_trigger/node_value_trigger.yy",}, {"name":"node_value_types","order":2,"path":"scripts/node_value_types/node_value_types.yy",}, {"name":"node_value_validators","order":3,"path":"scripts/node_value_validators/node_value_validators.yy",}, + {"name":"node_value_vec2_range","order":14,"path":"scripts/node_value_vec2_range/node_value_vec2_range.yy",}, + {"name":"node_value_vec2","order":3,"path":"scripts/node_value_vec2/node_value_vec2.yy",}, + {"name":"node_value_vec3_range","order":15,"path":"scripts/node_value_vec3_range/node_value_vec3_range.yy",}, + {"name":"node_value_vec3","order":4,"path":"scripts/node_value_vec3/node_value_vec3.yy",}, + {"name":"node_value_vec4","order":5,"path":"scripts/node_value_vec4/node_value_vec4.yy",}, {"name":"node_vector_cross_2D","order":11,"path":"scripts/node_vector_cross_2D/node_vector_cross_2D.yy",}, {"name":"node_vector_cross_3D","order":10,"path":"scripts/node_vector_cross_3D/node_vector_cross_3D.yy",}, {"name":"node_vector_dot","order":9,"path":"scripts/node_vector_dot/node_vector_dot.yy",}, diff --git a/PixelComposer.yyp b/PixelComposer.yyp index aec74b26b..a57dcf331 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -244,6 +244,10 @@ {"$GMFolder":"","%Name":"VFX","folderPath":"folders/nodes/icons/VFX.yy","name":"VFX","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"values","folderPath":"folders/nodes/values.yy","name":"values","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"types","folderPath":"folders/nodes/values/types.yy","name":"types","resourceType":"GMFolder","resourceVersion":"2.0",}, + {"$GMFolder":"","%Name":"3d","folderPath":"folders/nodes/values/types/3d.yy","name":"3d","resourceType":"GMFolder","resourceVersion":"2.0",}, + {"$GMFolder":"","%Name":"colors","folderPath":"folders/nodes/values/types/colors.yy","name":"colors","resourceType":"GMFolder","resourceVersion":"2.0",}, + {"$GMFolder":"","%Name":"object","folderPath":"folders/nodes/values/types/object.yy","name":"object","resourceType":"GMFolder","resourceVersion":"2.0",}, + {"$GMFolder":"","%Name":"numeric","folderPath":"folders/nodes/values/types/numeric.yy","name":"numeric","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"panels","folderPath":"folders/panels.yy","name":"panels","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"_others","folderPath":"folders/panels/_others.yy","name":"_others","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"video_banner","folderPath":"folders/panels/_others/video_banner.yy","name":"video_banner","resourceType":"GMFolder","resourceVersion":"2.0",}, @@ -856,6 +860,8 @@ {"id":{"name":"__node_shader_processor","path":"scripts/__node_shader_processor/__node_shader_processor.yy",},}, {"id":{"name":"__node_shader","path":"scripts/__node_shader/__node_shader.yy",},}, {"id":{"name":"__node_template","path":"scripts/__node_template/__node_template.yy",},}, + {"id":{"name":"__node_value_array","path":"scripts/__node_value_array/__node_value_array.yy",},}, + {"id":{"name":"__node_value_object","path":"scripts/__node_value_object/__node_value_object.yy",},}, {"id":{"name":"__node_value_processor","path":"scripts/__node_value_processor/__node_value_processor.yy",},}, {"id":{"name":"__node_VFX_effector","path":"scripts/__node_VFX_effector/__node_VFX_effector.yy",},}, {"id":{"name":"__node","path":"scripts/__node/__node.yy",},}, @@ -1746,11 +1752,49 @@ {"id":{"name":"node_tunnel_out","path":"scripts/node_tunnel_out/node_tunnel_out.yy",},}, {"id":{"name":"node_twirl","path":"scripts/node_twirl/node_twirl.yy",},}, {"id":{"name":"node_unicode","path":"scripts/node_unicode/node_unicode.yy",},}, + {"id":{"name":"node_value_area","path":"scripts/node_value_area/node_value_area.yy",},}, + {"id":{"name":"node_value_armature","path":"scripts/node_value_armature/node_value_armature.yy",},}, + {"id":{"name":"node_value_audioBit","path":"scripts/node_value_audioBit/node_value_audioBit.yy",},}, {"id":{"name":"node_value_base","path":"scripts/node_value_base/node_value_base.yy",},}, + {"id":{"name":"node_value_bool","path":"scripts/node_value_bool/node_value_bool.yy",},}, + {"id":{"name":"node_value_buffer","path":"scripts/node_value_buffer/node_value_buffer.yy",},}, + {"id":{"name":"node_value_color","path":"scripts/node_value_color/node_value_color.yy",},}, + {"id":{"name":"node_value_corner","path":"scripts/node_value_corner/node_value_corner.yy",},}, + {"id":{"name":"node_value_d3_camera","path":"scripts/node_value_d3_camera/node_value_d3_camera.yy",},}, + {"id":{"name":"node_value_d3_light","path":"scripts/node_value_d3_light/node_value_d3_light.yy",},}, + {"id":{"name":"node_value_d3_material","path":"scripts/node_value_d3_material/node_value_d3_material.yy",},}, + {"id":{"name":"node_value_d3_mesh","path":"scripts/node_value_d3_mesh/node_value_d3_mesh.yy",},}, + {"id":{"name":"node_value_d3_scene","path":"scripts/node_value_d3_scene/node_value_d3_scene.yy",},}, + {"id":{"name":"node_value_dimension","path":"scripts/node_value_dimension/node_value_dimension.yy",},}, + {"id":{"name":"node_value_enum_button","path":"scripts/node_value_enum_button/node_value_enum_button.yy",},}, + {"id":{"name":"node_value_enum_scroll","path":"scripts/node_value_enum_scroll/node_value_enum_scroll.yy",},}, {"id":{"name":"node_value_float","path":"scripts/node_value_float/node_value_float.yy",},}, + {"id":{"name":"node_value_gradient","path":"scripts/node_value_gradient/node_value_gradient.yy",},}, + {"id":{"name":"node_value_int","path":"scripts/node_value_int/node_value_int.yy",},}, {"id":{"name":"node_value_output","path":"scripts/node_value_output/node_value_output.yy",},}, + {"id":{"name":"node_value_padding","path":"scripts/node_value_padding/node_value_padding.yy",},}, + {"id":{"name":"node_value_palette","path":"scripts/node_value_palette/node_value_palette.yy",},}, + {"id":{"name":"node_value_particle","path":"scripts/node_value_particle/node_value_particle.yy",},}, + {"id":{"name":"node_value_path_anchor","path":"scripts/node_value_path_anchor/node_value_path_anchor.yy",},}, + {"id":{"name":"node_value_pathnode","path":"scripts/node_value_pathnode/node_value_pathnode.yy",},}, + {"id":{"name":"node_value_quarterion","path":"scripts/node_value_quarterion/node_value_quarterion.yy",},}, + {"id":{"name":"node_value_range","path":"scripts/node_value_range/node_value_range.yy",},}, + {"id":{"name":"node_value_rotation_random","path":"scripts/node_value_rotation_random/node_value_rotation_random.yy",},}, + {"id":{"name":"node_value_rotation_range","path":"scripts/node_value_rotation_range/node_value_rotation_range.yy",},}, + {"id":{"name":"node_value_rotation","path":"scripts/node_value_rotation/node_value_rotation.yy",},}, + {"id":{"name":"node_value_sdf","path":"scripts/node_value_sdf/node_value_sdf.yy",},}, + {"id":{"name":"node_value_slider_range","path":"scripts/node_value_slider_range/node_value_slider_range.yy",},}, + {"id":{"name":"node_value_struct","path":"scripts/node_value_struct/node_value_struct.yy",},}, + {"id":{"name":"node_value_surface","path":"scripts/node_value_surface/node_value_surface.yy",},}, + {"id":{"name":"node_value_text","path":"scripts/node_value_text/node_value_text.yy",},}, + {"id":{"name":"node_value_trigger","path":"scripts/node_value_trigger/node_value_trigger.yy",},}, {"id":{"name":"node_value_types","path":"scripts/node_value_types/node_value_types.yy",},}, {"id":{"name":"node_value_validators","path":"scripts/node_value_validators/node_value_validators.yy",},}, + {"id":{"name":"node_value_vec2_range","path":"scripts/node_value_vec2_range/node_value_vec2_range.yy",},}, + {"id":{"name":"node_value_vec2","path":"scripts/node_value_vec2/node_value_vec2.yy",},}, + {"id":{"name":"node_value_vec3_range","path":"scripts/node_value_vec3_range/node_value_vec3_range.yy",},}, + {"id":{"name":"node_value_vec3","path":"scripts/node_value_vec3/node_value_vec3.yy",},}, + {"id":{"name":"node_value_vec4","path":"scripts/node_value_vec4/node_value_vec4.yy",},}, {"id":{"name":"node_value","path":"scripts/node_value/node_value.yy",},}, {"id":{"name":"node_VCT","path":"scripts/node_VCT/node_VCT.yy",},}, {"id":{"name":"node_vector_cross_2D","path":"scripts/node_vector_cross_2D/node_vector_cross_2D.yy",},}, diff --git a/scripts/__node_3d_combine/__node_3d_combine.gml b/scripts/__node_3d_combine/__node_3d_combine.gml index e9abd8198..76d4142d5 100644 --- a/scripts/__node_3d_combine/__node_3d_combine.gml +++ b/scripts/__node_3d_combine/__node_3d_combine.gml @@ -1,8 +1,7 @@ function __Node_3D_Combine(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "3D Combine"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector) + inputs[| 0] = nodeValue_Dimension(self) .rejectArray(); inputs[| 1] = nodeValue("Object position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ]) @@ -26,8 +25,7 @@ function __Node_3D_Combine(_x, _y, _group = noone) : Node(_x, _y, _group) constr .setDisplay(VALUE_DISPLAY.vector) .rejectArray(); - inputs[| 6] = nodeValue("Light direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 6] = nodeValue_Rotation("Light direction", self, 0) .rejectArray(); inputs[| 7] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) @@ -44,8 +42,7 @@ function __Node_3D_Combine(_x, _y, _group = noone) : Node(_x, _y, _group) constr inputs[| 10] = nodeValue("Ambient color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_grey) .rejectArray(); - inputs[| 11] = nodeValue("Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]) + inputs[| 11] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); inputs[| 12] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) diff --git a/scripts/__node_3d_displace/__node_3d_displace.gml b/scripts/__node_3d_displace/__node_3d_displace.gml index 0cdada3da..b842ed965 100644 --- a/scripts/__node_3d_displace/__node_3d_displace.gml +++ b/scripts/__node_3d_displace/__node_3d_displace.gml @@ -2,8 +2,7 @@ function __Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr name = "3D Displace"; batch_output = false; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Object position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -21,8 +20,7 @@ function __Node_3D_Displace(_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("Light direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 6] = nodeValue_Rotation("Light direction", self, 0); inputs[| 7] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); @@ -37,8 +35,7 @@ function __Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 11] = nodeValue("3D vertex", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3vertex, []) .setVisible(true, true); - inputs[| 12] = nodeValue("Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]) + inputs[| 12] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); inputs[| 13] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) @@ -46,7 +43,7 @@ function __Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 14] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); - inputs[| 15] = nodeValue("Displacement map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 15] = nodeValue_Surface("Displacement map", self); inputs[| 16] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); diff --git a/scripts/__node_3d_extrude/__node_3d_extrude.gml b/scripts/__node_3d_extrude/__node_3d_extrude.gml index 65d36e6cf..7e635e152 100644 --- a/scripts/__node_3d_extrude/__node_3d_extrude.gml +++ b/scripts/__node_3d_extrude/__node_3d_extrude.gml @@ -2,10 +2,9 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro name = "3D Extrude"; batch_output = false; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 1] = nodeValue_Dimension(self); inputs[| 2] = nodeValue("Object position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -29,8 +28,7 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 8] = nodeValue("Manual generate", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, false ) .setDisplay(VALUE_DISPLAY.button, { name: "Generate", UI : true, onClick: function() { generateMesh(); doUpdate(); } }); - inputs[| 9] = nodeValue("Light direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 9] = nodeValue_Rotation("Light direction", self, 0); inputs[| 10] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); @@ -41,12 +39,11 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 12] = nodeValue("Light color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); inputs[| 13] = nodeValue("Ambient color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_grey); - inputs[| 14] = nodeValue("Height map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 14] = nodeValue_Surface("Height map", self); inputs[| 15] = nodeValue("Always update", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 16] = nodeValue("Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]) + inputs[| 16] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); inputs[| 17] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) diff --git a/scripts/__node_3d_obj/__node_3d_obj.gml b/scripts/__node_3d_obj/__node_3d_obj.gml index f26d700c6..4969525d3 100644 --- a/scripts/__node_3d_obj/__node_3d_obj.gml +++ b/scripts/__node_3d_obj/__node_3d_obj.gml @@ -11,8 +11,7 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo doUpdate(); } }); - inputs[| 2] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 2] = nodeValue_Dimension(self); inputs[| 3] = nodeValue("Render position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -24,8 +23,7 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo inputs[| 5] = nodeValue("Render scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 6] = nodeValue("Light direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 6] = nodeValue_Rotation("Light direction", self, 0) .rejectArray(); inputs[| 7] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) @@ -54,8 +52,7 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo inputs[| 14] = nodeValue("Object position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 15] = nodeValue("Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]) + inputs[| 15] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); inputs[| 16] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) diff --git a/scripts/__node_3d_plane/__node_3d_plane.gml b/scripts/__node_3d_plane/__node_3d_plane.gml index 21aef3d64..7d9e4aa3b 100644 --- a/scripts/__node_3d_plane/__node_3d_plane.gml +++ b/scripts/__node_3d_plane/__node_3d_plane.gml @@ -2,7 +2,7 @@ function __Node_3D_Plane(_x, _y, _group = noone) : Node_Processor(_x, _y, _group name = "3D Plane"; batch_output = false; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Render position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -14,8 +14,7 @@ function __Node_3D_Plane(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 3] = nodeValue("Render scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 4] = nodeValue("Output dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, OUTPUT_SCALING.same_as_input) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Same as input", "Constant", "Relative to input" ]) + inputs[| 4] = nodeValue_Enum_Scroll("Output dimension", self, OUTPUT_SCALING.same_as_input, [ "Same as input", "Constant", "Relative to input" ]) .rejectArray(); inputs[| 5] = nodeValue("Constant dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) @@ -27,8 +26,7 @@ function __Node_3D_Plane(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 7] = nodeValue("Object scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 8] = nodeValue("Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]) + inputs[| 8] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); inputs[| 9] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) @@ -42,8 +40,7 @@ function __Node_3D_Plane(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 12] = nodeValue("Subdiviion", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - inputs[| 13] = nodeValue("Normal axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2) - .setDisplay(VALUE_DISPLAY.enum_button, [ "X", "Y", "Z" ]) + inputs[| 13] = nodeValue_Enum_Button("Normal axis", self, 2, [ "X", "Y", "Z" ]); input_display_list = [0, ["Geometry", true], 13, 12, 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 58c74121c..e5fa38ad9 100644 --- a/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml +++ b/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml @@ -2,8 +2,7 @@ function __Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) name = "3D Cone"; batch_output = false; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Render position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -18,8 +17,7 @@ function __Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 4] = nodeValue("Object scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 5] = nodeValue("Light direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 5] = nodeValue_Rotation("Light direction", self, 0); inputs[| 6] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); @@ -36,8 +34,7 @@ function __Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 11] = nodeValue("Object position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 12] = nodeValue("Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]) + inputs[| 12] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); inputs[| 13] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) @@ -45,9 +42,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, noone); + inputs[| 15] = nodeValue_Surface("Textures base", self); - inputs[| 16] = nodeValue("Textures side", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 16] = nodeValue_Surface("Textures side", self); inputs[| 17] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true) 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 7db4e8cb7..5ae204ec0 100644 --- a/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml +++ b/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml @@ -3,10 +3,9 @@ function __Node_3D_Cube(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) batch_output = false; dimension_index = 1; - inputs[| 0] = nodeValue("Main texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, USE_DEF); + inputs[| 0] = nodeValue_Surface("Main texture", self); - inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 1] = nodeValue_Dimension(self); inputs[| 2] = nodeValue("Render position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -20,18 +19,17 @@ 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, 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[| 6] = nodeValue_Surface("Textures 0", self).setVisible(false); + inputs[| 7] = nodeValue_Surface("Textures 1", self).setVisible(false); + inputs[| 8] = nodeValue_Surface("Textures 2", self).setVisible(false); + inputs[| 9] = nodeValue_Surface("Textures 3", self).setVisible(false); + inputs[| 10] = nodeValue_Surface("Textures 4", self).setVisible(false); + inputs[| 11] = nodeValue_Surface("Textures 5", self).setVisible(false); inputs[| 12] = nodeValue("Object scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 13] = nodeValue("Light direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 13] = nodeValue_Rotation("Light direction", self, 0); inputs[| 14] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); @@ -49,8 +47,7 @@ function __Node_3D_Cube(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 19] = nodeValue("Object position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 20] = nodeValue("Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]) + inputs[| 20] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); inputs[| 21] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) 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 5ec3b2dd9..c0d147562 100644 --- a/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml +++ b/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml @@ -7,8 +7,7 @@ function __Node_3D_Cylinder(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 1] = nodeValue("Thickness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2); - inputs[| 2] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 2] = nodeValue_Dimension(self); inputs[| 3] = nodeValue("Render position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -20,15 +19,14 @@ 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, 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[| 6] = nodeValue_Surface("Textures top", self); + inputs[| 7] = nodeValue_Surface("Textures bottom", self); + inputs[| 8] = nodeValue_Surface("Textures side", self); inputs[| 9] = nodeValue("Object scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 10] = nodeValue("Light direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 10] = nodeValue_Rotation("Light direction", self, 0); inputs[| 11] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); @@ -45,8 +43,7 @@ function __Node_3D_Cylinder(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 16] = nodeValue("Object position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 17] = nodeValue("Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]) + inputs[| 17] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); inputs[| 18] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) 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 3d3ca5c19..e2e5162c1 100644 --- a/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml +++ b/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml @@ -6,8 +6,7 @@ function __Node_3D_Sphere(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 0] = nodeValue("Subdivisions", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [8, 4], "Amount of polygon in X and Y axis.") .setDisplay(VALUE_DISPLAY.vector); - inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 1] = nodeValue_Dimension(self); inputs[| 2] = nodeValue("Render position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -19,13 +18,12 @@ 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, noone); + inputs[| 5] = nodeValue_Surface("Textures", self); inputs[| 6] = nodeValue("Object scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 7] = nodeValue("Light direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 7] = nodeValue_Rotation("Light direction", self, 0); inputs[| 8] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); @@ -42,8 +40,7 @@ function __Node_3D_Sphere(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 13] = nodeValue("Object position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 14] = nodeValue("Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]) + inputs[| 14] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); inputs[| 15] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) diff --git a/scripts/__node_3d_render/__node_3d_render.gml b/scripts/__node_3d_render/__node_3d_render.gml index fbed18525..d50949898 100644 --- a/scripts/__node_3d_render/__node_3d_render.gml +++ b/scripts/__node_3d_render/__node_3d_render.gml @@ -1,8 +1,7 @@ //function Node_3D_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { // name = "3D Render"; -// inputs[| 2] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) -// .setDisplay(VALUE_DISPLAY.vector); +// inputs[| 2] = nodeValue_Dimension(self); // inputs[| 3] = nodeValue("Render position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) // .setDisplay(VALUE_DISPLAY.vector) @@ -32,8 +31,7 @@ // inputs[| 10] = nodeValue("Ambient color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_grey) // .rejectArray(); -// inputs[| 15] = nodeValue("Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) -// .setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]) +// inputs[| 15] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) // .rejectArray(); // inputs[| 16] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) diff --git a/scripts/__node_3d_repeat/__node_3d_repeat.gml b/scripts/__node_3d_repeat/__node_3d_repeat.gml index b1f75de02..079741a4a 100644 --- a/scripts/__node_3d_repeat/__node_3d_repeat.gml +++ b/scripts/__node_3d_repeat/__node_3d_repeat.gml @@ -1,8 +1,7 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "3D Repeat"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Object position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -20,8 +19,7 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 5] = nodeValue("Render scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 6] = nodeValue("Light direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 6] = nodeValue_Rotation("Light direction", self, 0); inputs[| 7] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); @@ -47,20 +45,17 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 15] = nodeValue("Repeat scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 16] = nodeValue("Repeat pattern", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Linear", "Circular" ]) + inputs[| 16] = nodeValue_Enum_Button("Repeat pattern", self, 0, [ "Linear", "Circular" ]) .rejectArray(); - inputs[| 17] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "x", "y", "z" ]); + inputs[| 17] = nodeValue_Enum_Button("Axis", self, 0, [ "x", "y", "z" ]); inputs[| 18] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1); inputs[| 19] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 360 ]) .setDisplay(VALUE_DISPLAY.rotation_range); - inputs[| 20] = nodeValue("Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]) + inputs[| 20] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); inputs[| 21] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) diff --git a/scripts/__node_3d_transform/__node_3d_transform.gml b/scripts/__node_3d_transform/__node_3d_transform.gml index f92d70876..c8ccf8551 100644 --- a/scripts/__node_3d_transform/__node_3d_transform.gml +++ b/scripts/__node_3d_transform/__node_3d_transform.gml @@ -2,8 +2,7 @@ function __Node_3D_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _g name = "3D Transform"; batch_output = false; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Object position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -21,8 +20,7 @@ function __Node_3D_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _g inputs[| 5] = nodeValue("Render scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 6] = nodeValue("Light direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 6] = nodeValue_Rotation("Light direction", self, 0); inputs[| 7] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); @@ -37,8 +35,7 @@ function __Node_3D_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _g inputs[| 11] = nodeValue("3D object", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3object, noone) .setVisible(true, true); - inputs[| 12] = nodeValue("Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]) + inputs[| 12] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); inputs[| 13] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) diff --git a/scripts/__node_process_template/__node_process_template.gml b/scripts/__node_process_template/__node_process_template.gml index 9e3e3e308..46fc4d165 100644 --- a/scripts/__node_process_template/__node_process_template.gml +++ b/scripts/__node_process_template/__node_process_template.gml @@ -1,7 +1,7 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("", self); outputs[| 0] = nodeValue("", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/__node_shader_generator/__node_shader_generator.gml b/scripts/__node_shader_generator/__node_shader_generator.gml index afc5d3cdf..bb27680ee 100644 --- a/scripts/__node_shader_generator/__node_shader_generator.gml +++ b/scripts/__node_shader_generator/__node_shader_generator.gml @@ -1,8 +1,7 @@ function Node_Shader_Generator(_x, _y, _group = noone) : Node_Shader(_x, _y, _group) constructor { name = ""; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); addShaderProp(SHADER_UNIFORM.float, "u_resolution"); attribute_surface_depth(); diff --git a/scripts/__node_shader_processor/__node_shader_processor.gml b/scripts/__node_shader_processor/__node_shader_processor.gml index 6337620e4..5bb1987a2 100644 --- a/scripts/__node_shader_processor/__node_shader_processor.gml +++ b/scripts/__node_shader_processor/__node_shader_processor.gml @@ -1,7 +1,7 @@ function Node_Shader_Processor(_x, _y, _group = noone) : Node_Shader(_x, _y, _group) constructor { name = ""; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| 0] = nodeValue_Surface("Surface in", self); addShaderProp(); attribute_surface_depth(); diff --git a/scripts/__node_template/__node_template.gml b/scripts/__node_template/__node_template.gml index 5fe324fe9..a0516b887 100644 --- a/scripts/__node_template/__node_template.gml +++ b/scripts/__node_template/__node_template.gml @@ -1,7 +1,7 @@ function Node_Template(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = ""; - inputs[| 0] = nodeValue("", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("", self); outputs[| 0] = nodeValue("", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/__node_value_array/__node_value_array.gml b/scripts/__node_value_array/__node_value_array.gml new file mode 100644 index 000000000..9eab47f90 --- /dev/null +++ b/scripts/__node_value_array/__node_value_array.gml @@ -0,0 +1,28 @@ +function NodeValue_Array(_name, _node, _value, _tooltip = "", _length = 2) : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.float, _value, _tooltip) constructor { + + data_array_length = _length; + + /////============== GET ============= + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + + val = array_verify(val, data_array_length); + return val; + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + if(!is_anim) { + if(sep_axis) return array_create_ext(data_array_length, function(i) /*=>*/ {return animators[i].processType(animators[i].values[| 0].value)}); + return ds_list_empty(animator.values)? 0 : animator.processType(animator.values[| 0].value); + } + + if(sep_axis) { + __temp_time = _time; + return array_create_ext(data_array_length, function(i) /*=>*/ {return animators[i].getValue(__temp_time)}); + } + + return animator.getValue(_time); + } +} \ No newline at end of file diff --git a/scripts/__node_value_array/__node_value_array.yy b/scripts/__node_value_array/__node_value_array.yy new file mode 100644 index 000000000..1694112c5 --- /dev/null +++ b/scripts/__node_value_array/__node_value_array.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"__node_value_array", + "isCompatibility":false, + "isDnD":false, + "name":"__node_value_array", + "parent":{ + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/__node_value_object/__node_value_object.gml b/scripts/__node_value_object/__node_value_object.gml new file mode 100644 index 000000000..19890681e --- /dev/null +++ b/scripts/__node_value_object/__node_value_object.gml @@ -0,0 +1,21 @@ +function nodeValue_Object(_name, _node, _value, _tooltip = "") { return new NodeValue_Object(_name, _node, _value, _tooltip); } + +function __NodeValue_Object(_name, _node, _type, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, _type, _value, _tooltip) constructor { + + animable = false; + + /////============== GET ============= + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + return val; + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { return ds_list_empty(animator.values)? 0 : animator.values[| 0].value; } +} + +function NodeValue_Object(_name, _node, _value, _tooltip = "") : __NodeValue_Object(_name, _node, VALUE_TYPE.object, _value, _tooltip) constructor { + +} \ No newline at end of file diff --git a/scripts/__node_value_object/__node_value_object.yy b/scripts/__node_value_object/__node_value_object.yy new file mode 100644 index 000000000..8dcd71dc2 --- /dev/null +++ b/scripts/__node_value_object/__node_value_object.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"__node_value_object", + "isCompatibility":false, + "isDnD":false, + "name":"__node_value_object", + "parent":{ + "name":"object", + "path":"folders/nodes/values/types/object.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/_node_VFX_spawner/_node_VFX_spawner.gml b/scripts/_node_VFX_spawner/_node_VFX_spawner.gml index 40fbaf9b9..bc453519b 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, noone ); + inputs[| 0] = nodeValue_Surface("Particle sprite", self); inputs[| 1] = nodeValue("Spawn delay", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4, "Frames delay between each particle spawn." ); @@ -12,8 +12,7 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[| 3] = nodeValue("Spawn area", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, DEF_AREA ) .setDisplay(VALUE_DISPLAY.area); - inputs[| 4] = nodeValue("Spawn distribution", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Area", "Border", "Map" ] ); + inputs[| 4] = nodeValue_Enum_Scroll("Spawn distribution", self, 0, [ "Area", "Border", "Map" ] ); inputs[| 5] = nodeValue("Lifespan", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 20, 30 ] ) .setDisplay(VALUE_DISPLAY.range); @@ -44,8 +43,7 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[| 15] = nodeValue("Rotate by direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Make the particle rotates to follow its movement."); - inputs[| 16] = nodeValue("Spawn type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Stream", "Burst", "Trigger" ]); + inputs[| 16] = nodeValue_Enum_Button("Spawn type", self, 0, [ "Stream", "Burst", "Trigger" ]); inputs[| 17] = nodeValue("Spawn size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ] ) .setDisplay(VALUE_DISPLAY.range, { linked : true }); @@ -61,23 +59,21 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[| 21] = nodeValue("Loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true ); - inputs[| 22] = nodeValue("Surface array", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "Whether to select image from an array in order, at random, or treat array as animation." ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Random", "Order", "Animation", "Scale" ]) + inputs[| 22] = nodeValue_Enum_Scroll("Surface array", self, 0, [ "Random", "Order", "Animation", "Scale" ]) + .setTooltip("Whether to select image from an array in order, at random, or treat array as animation.") .setVisible(false); inputs[| 23] = nodeValue("Animation speed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ] ) .setDisplay(VALUE_DISPLAY.range, { linked : true }) .setVisible(false); - inputs[| 24] = nodeValue("Scatter", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Uniform", "Random" ]); + inputs[| 24] = nodeValue_Enum_Button("Scatter", self, 1, [ "Uniform", "Random" ]); inputs[| 25] = nodeValue("Boundary data", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, []) .setArrayDepth(1) .setVisible(false, true); - inputs[| 26] = nodeValue("On animation end", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, ANIM_END_ACTION.loop) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Loop", "Ping pong", "Destroy" ]) + inputs[| 26] = nodeValue_Enum_Button("On animation end", self, ANIM_END_ACTION.loop, [ "Loop", "Ping pong", "Destroy" ]) .setVisible(false); inputs[| 27] = nodeValue("Spawn", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); @@ -86,16 +82,15 @@ 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."); - inputs[| 30] = nodeValue("Distribution map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 30] = nodeValue_Surface("Distribution map", self) - inputs[| 31] = nodeValue("Atlas", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, [] ) + inputs[| 31] = nodeValue_Surface("Atlas", self, []) .setArrayDepth(1); inputs[| 32] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 32].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 33] = nodeValue("Gravity direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, -90 ) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 33] = nodeValue_Rotation("Gravity direction", self, -90); inputs[| 34] = nodeValue("Turning", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] ) .setDisplay(VALUE_DISPLAY.range, { linked : true }); diff --git a/scripts/_node_strand_affector/_node_strand_affector.gml b/scripts/_node_strand_affector/_node_strand_affector.gml index 60ee1d7ac..35aad8695 100644 --- a/scripts/_node_strand_affector/_node_strand_affector.gml +++ b/scripts/_node_strand_affector/_node_strand_affector.gml @@ -43,16 +43,14 @@ function _Node_Strand_Affector(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[| 0] = nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone) .setVisible(true, true); - inputs[| 1] = nodeValue("Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Point", "Band" ]); + inputs[| 1] = nodeValue_Enum_Scroll("Shape", self, 0, [ "Point", "Band" ]); inputs[| 2] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); inputs[| 3] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4); - inputs[| 4] = nodeValue("Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 4] = nodeValue_Rotation("Direction", self, 0); inputs[| 5] = nodeValue("Falloff", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/areaBox/areaBox.gml b/scripts/areaBox/areaBox.gml index 1c7a17e29..6604aed83 100644 --- a/scripts/areaBox/areaBox.gml +++ b/scripts/areaBox/areaBox.gml @@ -1,25 +1,3 @@ -enum AREA_SHAPE { - rectangle, - elipse -} - -enum AREA_MODE { - area, - padding, - two_point, -} - -enum AREA_INDEX { - center_x, - center_y, - half_w, - half_h, - shape -} - -#macro DEF_AREA [ DEF_SURF_W / 2, DEF_SURF_H / 2, DEF_SURF_W / 2, DEF_SURF_H / 2, AREA_SHAPE.rectangle, AREA_MODE.area ] -#macro DEF_AREA_REF [ 0.5, 0.5, 0.5, 0.5, AREA_SHAPE.rectangle, AREA_MODE.area ] - function areaBox(_onModify, _unit = noone) : widget() constructor { onModify = _onModify; unit = _unit; diff --git a/scripts/draw_setter/draw_setter.gml b/scripts/draw_setter/draw_setter.gml index 739bb70ae..5bf784a63 100644 --- a/scripts/draw_setter/draw_setter.gml +++ b/scripts/draw_setter/draw_setter.gml @@ -33,4 +33,9 @@ function draw_set_text(font, halign, valign) { draw_set_font(font); draw_set_halign(halign); draw_set_valign(valign); +} + +function draw_set_align(halign, valign) { + INLINE + draw_set_halign(halign); draw_set_valign(valign); } \ No newline at end of file diff --git a/scripts/draw_text_function/draw_text_function.gml b/scripts/draw_text_function/draw_text_function.gml index b52ad3f8a..d7a6bd2b5 100644 --- a/scripts/draw_text_function/draw_text_function.gml +++ b/scripts/draw_text_function/draw_text_function.gml @@ -120,6 +120,19 @@ function draw_text_bbox(bbox, text, scale = 1) { draw_set_halign(fa_center); draw_set_valign(fa_center); + // BLEND_ALPHA_MULP + draw_text_transformed(bbox.xc, bbox.yc, text, ss * scale, ss * scale, 0); + // BLEND_NORMAL +} + +function draw_text_bbox_cut(bbox, text, scale = 1) { + INLINE + var ss = min(bbox.w / string_width(text), bbox.h / string_height(text)); + if(ss <= 0) return; + + draw_set_halign(fa_center); + draw_set_valign(fa_center); + draw_text_cut(bbox.xc, bbox.yc, text, bbox.w, ss * scale); } diff --git a/scripts/nodd_mk_delay_machine/nodd_mk_delay_machine.gml b/scripts/nodd_mk_delay_machine/nodd_mk_delay_machine.gml index 82fad7f18..5326aad71 100644 --- a/scripts/nodd_mk_delay_machine/nodd_mk_delay_machine.gml +++ b/scripts/nodd_mk_delay_machine/nodd_mk_delay_machine.gml @@ -4,7 +4,7 @@ function Node_MK_Delay_Machine(_x, _y, _group = noone) : Node(_x, _y, _group) co is_simulation = true; - inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface", self); inputs[| 1] = nodeValue("Delay Amounts", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4); @@ -15,8 +15,7 @@ function Node_MK_Delay_Machine(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[| 4] = nodeValue("Alpha over Delay", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); - inputs[| 5] = nodeValue("Palette Select", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Loop", "Pingpong", "Random" ]); + inputs[| 5] = nodeValue_Enum_Scroll("Palette Select", self, 0, [ "Loop", "Pingpong", "Random" ]); inputs[| 6] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 6].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); diff --git a/scripts/node_2d_light/node_2d_light.gml b/scripts/node_2d_light/node_2d_light.gml index 86b312c63..c0139ad87 100644 --- a/scripts/node_2d_light/node_2d_light.gml +++ b/scripts/node_2d_light/node_2d_light.gml @@ -15,13 +15,12 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - 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), - new scrollItem("Line", s_node_2d_light_shape, 1), - new scrollItem("Line asymmetric", s_node_2d_light_shape, 2), - new scrollItem("Spot", s_node_2d_light_shape, 3), ]); + inputs[| 1] = nodeValue_Enum_Scroll("Light shape", self, 0, [ new scrollItem("Point", s_node_2d_light_shape, 0), + new scrollItem("Line", s_node_2d_light_shape, 1), + new scrollItem("Line asymmetric", s_node_2d_light_shape, 2), + new scrollItem("Spot", s_node_2d_light_shape, 3), ]); inputs[| 2] = nodeValue("Center", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 16, 16 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -49,16 +48,16 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 10] = nodeValue("Banding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.1] }); - inputs[| 11] = nodeValue("Attenuation", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "Control how light fade out over distance.") - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Quadratic", s_node_curve, 0), + inputs[| 11] = nodeValue_Enum_Scroll("Attenuation", self, 0, + [ new scrollItem("Quadratic", s_node_curve, 0), new scrollItem("Invert quadratic", s_node_curve, 1), - new scrollItem("Linear", s_node_curve, 2), ]); + new scrollItem("Linear", s_node_curve, 2), ]) + .setTooltip("Control how light fade out over distance."); inputs[| 12] = nodeValue("Radial banding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.1] }); - inputs[| 13] = nodeValue("Radial start", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 13] = nodeValue_Rotation("Radial start", self, 0); inputs[| 14] = nodeValue("Radial band ratio", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_3d_camera/node_3d_camera.gml b/scripts/node_3d_camera/node_3d_camera.gml index dde10a42c..8a8a39ab0 100644 --- a/scripts/node_3d_camera/node_3d_camera.gml +++ b/scripts/node_3d_camera/node_3d_camera.gml @@ -24,11 +24,9 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) inputs[| in_d3d + 1] = nodeValue("Clipping Distance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 10 ] ) .setDisplay(VALUE_DISPLAY.vector); - inputs[| in_d3d + 2] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| in_d3d + 2] = nodeValue_Dimension(self); - inputs[| in_d3d + 3] = nodeValue("Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Perspective", "Orthographic" ]); + inputs[| in_d3d + 3] = nodeValue_Enum_Button("Projection", self, 1 , [ "Perspective", "Orthographic" ]); inputs[| in_d3d + 4] = nodeValue("Scene", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3Scene, noone ) .setVisible(true, true); @@ -37,23 +35,19 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) inputs[| in_d3d + 6] = nodeValue("Show Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false ); - inputs[| in_d3d + 7] = nodeValue("Backface Culling", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "None", "CW", "CCW" ]); + inputs[| in_d3d + 7] = nodeValue_Enum_Button("Backface Culling", self, 2 , [ "None", "CW", "CCW" ]); inputs[| in_d3d + 8] = nodeValue("Orthographic Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 ) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0.01, 4, 0.01 ] }); - inputs[| in_d3d + 9] = nodeValue("Postioning Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Position + Rotation", "Position + Lookat", "Lookat + Rotation" ] ); + inputs[| in_d3d + 9] = nodeValue_Enum_Scroll("Postioning Mode", self, 2, [ "Position + Rotation", "Position + Lookat", "Lookat + Rotation" ] ); inputs[| in_d3d + 10] = nodeValue("Lookat Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ] ) .setDisplay(VALUE_DISPLAY.vector); - inputs[| in_d3d + 11] = nodeValue("Roll", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| in_d3d + 11] = nodeValue_Rotation("Roll", self, 0); - inputs[| in_d3d + 12] = nodeValue("Horizontal Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 45 ) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| in_d3d + 12] = nodeValue_Rotation("Horizontal Angle", self, 45 ); inputs[| in_d3d + 13] = nodeValue("Vertical Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 30 ) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 0.1] }); @@ -62,7 +56,7 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) inputs[| in_d3d + 15] = nodeValue("Gamma Adjust", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false ); - inputs[| in_d3d + 16] = nodeValue("Environment Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| in_d3d + 16] = nodeValue_Surface("Environment Texture", self); inputs[| in_d3d + 17] = nodeValue("Ambient Occlusion", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false ); @@ -76,8 +70,7 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) inputs[| in_d3d + 21] = nodeValue("Round Normal", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) .setWindows(); - inputs[| in_d3d + 22] = nodeValue("Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Normal", "Additive" ]); + inputs[| in_d3d + 22] = nodeValue_Enum_Button("Blend mode", self, 0 , [ "Normal", "Additive" ]); in_cam = ds_list_size(inputs); diff --git a/scripts/node_3d_camera_set/node_3d_camera_set.gml b/scripts/node_3d_camera_set/node_3d_camera_set.gml index 092f3741c..8002672b2 100644 --- a/scripts/node_3d_camera_set/node_3d_camera_set.gml +++ b/scripts/node_3d_camera_set/node_3d_camera_set.gml @@ -5,9 +5,8 @@ function Node_3D_Camera_Set(_x, _y, _group = noone) : Node_3D_Camera(_x, _y, _gr light_key = new __3dLightDirectional(); light_fill = new __3dLightDirectional(); - inputs[| in_cam + 0] = nodeValue("L1 H angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 30 ) - .setName("Horizontal angle") - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| in_cam + 0] = nodeValue_Rotation("L1 H angle", self, 30) + .setName("Horizontal angle"); inputs[| in_cam + 1] = nodeValue("L1 V angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 45 ) .setName("Vertical angle") @@ -20,9 +19,8 @@ function Node_3D_Camera_Set(_x, _y, _group = noone) : Node_3D_Camera(_x, _y, _gr .setName("Intensity") .setDisplay(VALUE_DISPLAY.slider); - inputs[| in_cam + 4] = nodeValue("L2 H angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, -45 ) - .setName("Horizontal angle") - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| in_cam + 4] = nodeValue_Rotation("L2 H angle", self, -45) + .setName("Horizontal angle"); inputs[| in_cam + 5] = nodeValue("L2 V angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 45 ) .setName("Vertical angle") diff --git a/scripts/node_3d_depth/node_3d_depth.gml b/scripts/node_3d_depth/node_3d_depth.gml index 7acb2308c..81741f0e9 100644 --- a/scripts/node_3d_depth/node_3d_depth.gml +++ b/scripts/node_3d_depth/node_3d_depth.gml @@ -1,9 +1,9 @@ function Node_3D_Depth(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "3D Depth"; - inputs[| 0] = nodeValue("Base Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| 0] = nodeValue_Surface("Base Texture", self); - inputs[| 1] = nodeValue("Depth", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| 1] = nodeValue_Surface("Depth", self); inputs[| 2] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0, 0] ) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_3d_material/node_3d_material.gml b/scripts/node_3d_material/node_3d_material.gml index 5a84e52ae..feba73570 100644 --- a/scripts/node_3d_material/node_3d_material.gml +++ b/scripts/node_3d_material/node_3d_material.gml @@ -2,7 +2,7 @@ function Node_3D_Material(_x, _y, _group = noone) : Node_3D(_x, _y, _group) cons name = "3D Material"; solid_surf = noone; - inputs[| 0] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ) + inputs[| 0] = nodeValue_Surface("Texture", self) .setVisible(true, true); inputs[| 1] = nodeValue("Diffuse", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1 ) @@ -15,7 +15,7 @@ function Node_3D_Material(_x, _y, _group = noone) : Node_3D(_x, _y, _group) cons inputs[| 4] = nodeValue("Metalic", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false ); - inputs[| 5] = nodeValue("Normal Map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| 5] = nodeValue_Surface("Normal Map", self); inputs[| 6] = nodeValue("Normal Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1 ) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); diff --git a/scripts/node_3d_mesh_extrude/node_3d_mesh_extrude.gml b/scripts/node_3d_mesh_extrude/node_3d_mesh_extrude.gml index 20c6a87d8..8e447ad3a 100644 --- a/scripts/node_3d_mesh_extrude/node_3d_mesh_extrude.gml +++ b/scripts/node_3d_mesh_extrude/node_3d_mesh_extrude.gml @@ -6,7 +6,7 @@ function Node_3D_Mesh_Extrude(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _gr inputs[| in_mesh + 0] = nodeValue("Front Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3Material, new __d3dMaterial()) .setVisible(true, true); - inputs[| in_mesh + 1] = nodeValue("Front Height", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| in_mesh + 1] = nodeValue_Surface("Front Height", self); inputs[| in_mesh + 2] = nodeValue("Smooth", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) @@ -17,7 +17,7 @@ function Node_3D_Mesh_Extrude(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _gr inputs[| in_mesh + 5] = nodeValue("Back Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3Material, new __d3dMaterial()) .setVisible(true, true); - inputs[| in_mesh + 6] = nodeValue("Back Height", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| in_mesh + 6] = nodeValue_Surface("Back Height", self); inputs[| in_mesh + 7] = nodeValue("Front Height Level", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) .setDisplay(VALUE_DISPLAY.slider_range); diff --git a/scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml b/scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml index 073e48fca..4adbc9631 100644 --- a/scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml +++ b/scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml @@ -35,8 +35,7 @@ function Node_3D_Mesh_Obj(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group) inputs[| in_mesh + 2] = nodeValue("Import Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .rejectArray(); - inputs[| in_mesh + 3] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "XYZ", "XZ-Y", "X-ZY" ]) + inputs[| in_mesh + 3] = nodeValue_Enum_Scroll("Axis", self, 0, [ "XYZ", "XZ-Y", "X-ZY" ]) .rejectArray(); input_display_list = [ diff --git a/scripts/node_3d_mesh_plane/node_3d_mesh_plane.gml b/scripts/node_3d_mesh_plane/node_3d_mesh_plane.gml index 0ceda9962..c881c4b71 100644 --- a/scripts/node_3d_mesh_plane/node_3d_mesh_plane.gml +++ b/scripts/node_3d_mesh_plane/node_3d_mesh_plane.gml @@ -6,8 +6,7 @@ function Node_3D_Mesh_Plane(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _grou inputs[| in_mesh + 0] = nodeValue("Material", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3Material, new __d3dMaterial() ) .setVisible(true, true); - inputs[| in_mesh + 1] = nodeValue("Normal", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "X", "Y", "Z" ]); + inputs[| in_mesh + 1] = nodeValue_Enum_Button("Normal", self, 2 , [ "X", "Y", "Z" ]); inputs[| in_mesh + 2] = nodeValue("Both side", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false ) .rejectArray(); diff --git a/scripts/node_3d_mesh_terrain/node_3d_mesh_terrain.gml b/scripts/node_3d_mesh_terrain/node_3d_mesh_terrain.gml index 0eb686f6a..34fc1ef14 100644 --- a/scripts/node_3d_mesh_terrain/node_3d_mesh_terrain.gml +++ b/scripts/node_3d_mesh_terrain/node_3d_mesh_terrain.gml @@ -6,10 +6,9 @@ function Node_3D_Mesh_Terrain(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _gr inputs[| in_mesh + 0] = nodeValue("Material", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3Material, new __d3dMaterial() ) .setVisible(true, true); - inputs[| in_mesh + 1] = nodeValue("Input type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Surface", "Array" ]); + inputs[| in_mesh + 1] = nodeValue_Enum_Button("Input type", self, 0 , [ "Surface", "Array" ]); - inputs[| in_mesh + 2] = nodeValue("Height map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| in_mesh + 2] = nodeValue_Surface("Height map", self); inputs[| in_mesh + 3] = nodeValue("Subdivision", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4 ); diff --git a/scripts/node_3d_point_affector/node_3d_point_affector.gml b/scripts/node_3d_point_affector/node_3d_point_affector.gml index cf15650ce..bfd4667cb 100644 --- a/scripts/node_3d_point_affector/node_3d_point_affector.gml +++ b/scripts/node_3d_point_affector/node_3d_point_affector.gml @@ -19,9 +19,8 @@ function Node_3D_Point_Affector(_x, _y, _group = noone) : Node_3D_Object(_x, _y, inputs[| in_d3d + 4] = nodeValue("Falloff curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); - inputs[| in_d3d + 5] = nodeValue("Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Sphere", s_node_3d_affector_shape, 0), - new scrollItem("Plane", s_node_3d_affector_shape, 1), ]); + inputs[| in_d3d + 5] = nodeValue_Enum_Scroll("Shape", self, 0, [ new scrollItem("Sphere", s_node_3d_affector_shape, 0), + new scrollItem("Plane", s_node_3d_affector_shape, 1), ]); outputs[| 0] = nodeValue("Output", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [ 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_3d_repeat/node_3d_repeat.gml b/scripts/node_3d_repeat/node_3d_repeat.gml index 892181e7e..3c9e8d7ee 100644 --- a/scripts/node_3d_repeat/node_3d_repeat.gml +++ b/scripts/node_3d_repeat/node_3d_repeat.gml @@ -5,8 +5,7 @@ function Node_3D_Repeat(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr .setArrayDepth(1) .setVisible(true, true); - inputs[| 1] = nodeValue("Object Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Duplicate", "Array" ] ) + inputs[| 1] = nodeValue_Enum_Button("Object Mode", self, 0 , [ "Duplicate", "Array" ] ) .rejectArray(); inputs[| 2] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1 ); diff --git a/scripts/node_3d_transform_image/node_3d_mesh_plane.gml b/scripts/node_3d_transform_image/node_3d_mesh_plane.gml index 55538a0b0..032af6535 100644 --- a/scripts/node_3d_transform_image/node_3d_mesh_plane.gml +++ b/scripts/node_3d_transform_image/node_3d_mesh_plane.gml @@ -6,8 +6,7 @@ function Node_3D_Mesh_Plane(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _grou inputs[| in_mesh + 0] = nodeValue("Material", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3Material, noone ) .setVisible(true, true); - inputs[| in_mesh + 1] = nodeValue("Normal", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "X", "Y", "Z" ]); + inputs[| in_mesh + 1] = nodeValue_Enum_Button("Normal", self, 2 , [ "X", "Y", "Z" ]); inputs[| in_mesh + 2] = nodeValue("Both side", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false ) diff --git a/scripts/node_3d_transform_image/node_3d_transform_image.gml b/scripts/node_3d_transform_image/node_3d_transform_image.gml index 62f13fb97..d07910caa 100644 --- a/scripts/node_3d_transform_image/node_3d_transform_image.gml +++ b/scripts/node_3d_transform_image/node_3d_transform_image.gml @@ -19,7 +19,7 @@ function Node_3D_Transform_Image(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, projMat = matrix_build_projection_ortho(1, 1, 0.001, 10); - inputs[| in_mesh + 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ) + inputs[| in_mesh + 0] = nodeValue_Surface("Surface", self) .setVisible(true, true); input_display_list = [ diff --git a/scripts/node_3d_transform_scene/node_3d_transform_scene.gml b/scripts/node_3d_transform_scene/node_3d_transform_scene.gml index 0bfd9b509..5bf90f04c 100644 --- a/scripts/node_3d_transform_scene/node_3d_transform_scene.gml +++ b/scripts/node_3d_transform_scene/node_3d_transform_scene.gml @@ -13,14 +13,11 @@ function Node_3D_Transform_Scene(_x, _y, _group = noone) : Node_3D(_x, _y, _grou inputs[| 3] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, []) .setArrayDepth(2); - inputs[| 4] = nodeValue("Positioning type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Additive", "Override" ]); + inputs[| 4] = nodeValue_Enum_Scroll("Positioning type", self, 0, [ "Additive", "Override" ]); - inputs[| 5] = nodeValue("Rotating type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Additive", "Override" ]); + inputs[| 5] = nodeValue_Enum_Scroll("Rotating type", self, 0, [ "Additive", "Override" ]); - inputs[| 6] = nodeValue("Scaling type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Additive", "Multiplicative", "Override" ]); + inputs[| 6] = nodeValue_Enum_Scroll("Scaling type", self, 0, [ "Additive", "Multiplicative", "Override" ]); outputs[| 0] = nodeValue("Scene", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3Scene, noone); diff --git a/scripts/node_9slice/node_9slice.gml b/scripts/node_9slice/node_9slice.gml index a0c1d216a..ae638e052 100644 --- a/scripts/node_9slice/node_9slice.gml +++ b/scripts/node_9slice/node_9slice.gml @@ -1,17 +1,15 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 1] = nodeValue_Dimension(self); inputs[| 2] = nodeValue("Splice", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.padding) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 3] = nodeValue("Filling modes", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Scale", "Repeat" ]); + inputs[| 3] = nodeValue_Enum_Scroll("Filling modes", self, 0, [ "Scale", "Repeat" ]); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_FFT/node_FFT.gml b/scripts/node_FFT/node_FFT.gml index 2e025f740..04dfaedd6 100644 --- a/scripts/node_FFT/node_FFT.gml +++ b/scripts/node_FFT/node_FFT.gml @@ -6,8 +6,7 @@ function Node_FFT(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const .setArrayDepth(1) .setVisible(true, true); - inputs[| 1] = nodeValue("Preprocess Function", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "None", "Hann" ]); + inputs[| 1] = nodeValue_Enum_Scroll("Preprocess Function", self, 0, [ "None", "Hann" ]); outputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, []) .setArrayDepth(1); 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 e9f1c17ed..6e1873ef8 100644 --- a/scripts/node_FLIP_apply_force/node_FLIP_apply_force.gml +++ b/scripts/node_FLIP_apply_force/node_FLIP_apply_force.gml @@ -32,13 +32,12 @@ function Node_FLIP_Apply_Force(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[| 2] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4 ) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); - inputs[| 3] = nodeValue("Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Rectangle", s_node_shape_rectangle, 0), ]); + inputs[| 3] = nodeValue_Enum_Scroll("Shape", self, 0 , [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Rectangle", s_node_shape_rectangle, 0), ]); inputs[| 4] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 4, 4 ] ) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 5] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ) + inputs[| 5] = nodeValue_Surface("Texture", self) input_display_list = [ 0, ["Collider", false], 3, 2, 4, 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 c5adb64cd..764d91ab4 100644 --- a/scripts/node_FLIP_apply_velocity/node_FLIP_apply_velocity.gml +++ b/scripts/node_FLIP_apply_velocity/node_FLIP_apply_velocity.gml @@ -19,8 +19,7 @@ function Node_FLIP_Apply_Velocity(_x, _y, _group = noone) : Node(_x, _y, _group) inputs[| 3] = nodeValue("Velocity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] ) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 4] = nodeValue("Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Rectangle", s_node_shape_rectangle, 0) ]); + inputs[| 4] = nodeValue_Enum_Scroll("Shape", self, 0 , [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Rectangle", s_node_shape_rectangle, 0) ]); inputs[| 5] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 4, 4 ] ) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_FLIP_destroy/node_FLIP_destroy.gml b/scripts/node_FLIP_destroy/node_FLIP_destroy.gml index 6ece23a1d..055205a97 100644 --- a/scripts/node_FLIP_destroy/node_FLIP_destroy.gml +++ b/scripts/node_FLIP_destroy/node_FLIP_destroy.gml @@ -13,8 +13,7 @@ function Node_FLIP_Destroy(_x, _y, _group = noone) : Node(_x, _y, _group) constr .setDisplay(VALUE_DISPLAY.vector) .setUnitRef(function(index) { return getDimension(); }); - inputs[| 2] = nodeValue("Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Rectangle", s_node_shape_rectangle, 0), ]); + inputs[| 2] = nodeValue_Enum_Scroll("Shape", self, 0 , [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Rectangle", s_node_shape_rectangle, 0), ]); inputs[| 3] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4 ) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); diff --git a/scripts/node_FLIP_domain/node_FLIP_domain.gml b/scripts/node_FLIP_domain/node_FLIP_domain.gml index 7d337798e..779bf2537 100644 --- a/scripts/node_FLIP_domain/node_FLIP_domain.gml +++ b/scripts/node_FLIP_domain/node_FLIP_domain.gml @@ -7,8 +7,7 @@ function Node_FLIP_Domain(_x, _y, _group = noone) : Node(_x, _y, _group) constru manual_ungroupable = false; update_on_frame = true; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Particle Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1); @@ -40,8 +39,7 @@ function Node_FLIP_Domain(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 12] = nodeValue("Wall Elasticity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); - inputs[| 13] = nodeValue("Gravity Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 270) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 13] = nodeValue_Rotation("Gravity Direction", self, 0); input_display_list = [ ["Domain", false], 0, 1, 9, 12, diff --git a/scripts/node_FLIP_render/node_FLIP_render.gml b/scripts/node_FLIP_render/node_FLIP_render.gml index 32ddc272a..46dcac9a2 100644 --- a/scripts/node_FLIP_render/node_FLIP_render.gml +++ b/scripts/node_FLIP_render/node_FLIP_render.gml @@ -18,10 +18,9 @@ function Node_FLIP_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 4] = nodeValue("Draw obstracles", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); - inputs[| 5] = nodeValue("Fluid particle", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 5] = nodeValue_Surface("Fluid particle", self); - inputs[| 6] = nodeValue("Render type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Particle", s_node_flip_render, 0), + inputs[| 6] = nodeValue_Enum_Scroll("Render type", self, 0, [ new scrollItem("Particle", s_node_flip_render, 0), new scrollItem("Line", s_node_flip_render, 1), ] ); inputs[| 7] = nodeValue("Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); diff --git a/scripts/node_FLIP_spawner/node_FLIP_spawner.gml b/scripts/node_FLIP_spawner/node_FLIP_spawner.gml index 72a1ba461..954d16cad 100644 --- a/scripts/node_FLIP_spawner/node_FLIP_spawner.gml +++ b/scripts/node_FLIP_spawner/node_FLIP_spawner.gml @@ -9,15 +9,13 @@ function Node_FLIP_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group) constr inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.fdomain, noone ) .setVisible(true, true); - inputs[| 1] = nodeValue("Spawn Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Rectangle", s_node_shape_rectangle, 0), "Surface" ]); + inputs[| 1] = nodeValue_Enum_Scroll("Spawn Shape", self, 0 , [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Rectangle", s_node_shape_rectangle, 0), "Surface" ]); inputs[| 2] = nodeValue("Spawn Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.25 ] ) .setDisplay(VALUE_DISPLAY.vector) .setUnitRef(function(index) { return getDimension(); }, VALUE_UNIT.reference); - inputs[| 3] = nodeValue("Spawn Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Stream", "Splash" ]); + inputs[| 3] = nodeValue_Enum_Button("Spawn Type", self, 0 , [ "Stream", "Splash" ]); inputs[| 4] = nodeValue("Spawn Frame", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ); @@ -26,7 +24,7 @@ function Node_FLIP_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group) constr inputs[| 6] = nodeValue("Spawn Velocity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] ) .setDisplay(VALUE_DISPLAY.range); - inputs[| 7] = nodeValue("Spawn Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| 7] = nodeValue_Surface("Spawn Surface", self); inputs[| 8] = nodeValue("Spawn Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 2 ) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); diff --git a/scripts/node_FXAA/node_FXAA.gml b/scripts/node_FXAA/node_FXAA.gml index acc0d17c3..2527c2e77 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); diff --git a/scripts/node_PCX_fn_math/node_PCX_fn_math.gml b/scripts/node_PCX_fn_math/node_PCX_fn_math.gml index 5967c68c5..f378fba99 100644 --- a/scripts/node_PCX_fn_math/node_PCX_fn_math.gml +++ b/scripts/node_PCX_fn_math/node_PCX_fn_math.gml @@ -1,8 +1,7 @@ function Node_PCX_fn_Math(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor { name = "Math"; - inputs[| 0] = nodeValue("Operator", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Add", "Subtract", "Multiply", "Divide", "Power", "Modulo", "Absolute", -1, + inputs[| 0] = nodeValue_Enum_Scroll("Operator", self, 0, [ "Add", "Subtract", "Multiply", "Divide", "Power", "Modulo", "Absolute", -1, "Round", "Floor", "Ceil", -1, "Sin", "Cos", "Tan", "Arcsin", "Arccos", "Arctan", -1, "Min", "Max", "Clamp", -1, diff --git a/scripts/node_VFX_override/node_VFX_override.gml b/scripts/node_VFX_override/node_VFX_override.gml index 9f08ccc10..38db4d530 100644 --- a/scripts/node_VFX_override/node_VFX_override.gml +++ b/scripts/node_VFX_override/node_VFX_override.gml @@ -20,7 +20,7 @@ function Node_VFX_Override(_x, _y, _group = noone) : Node(_x, _y, _group) constr inputs[| 5] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, noone ); - inputs[| 6] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ) + inputs[| 6] = nodeValue_Surface("Surface", self) .setVisible(true, false); outputs[| 0] = nodeValue("Particles", self, JUNCTION_CONNECT.output, VALUE_TYPE.particle, -1 ); diff --git a/scripts/node_VFX_renderer/node_VFX_renderer.gml b/scripts/node_VFX_renderer/node_VFX_renderer.gml index 22e1ae610..a4cd92f3e 100644 --- a/scripts/node_VFX_renderer/node_VFX_renderer.gml +++ b/scripts/node_VFX_renderer/node_VFX_renderer.gml @@ -12,8 +12,7 @@ function Node_VFX_Renderer(_x, _y, _group = noone) : Node(_x, _y, _group) constr inputs[| 1] = nodeValue("Round position", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true, "Round position to the closest integer value to avoid jittering.") .rejectArray(); - inputs[| 2] = nodeValue("Render Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, PARTICLE_RENDER_TYPE.surface ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Surface", "Line" ]) + inputs[| 2] = nodeValue_Enum_Button("Render Type", self, PARTICLE_RENDER_TYPE.surface , [ "Surface", "Line" ]) .rejectArray(); inputs[| 3] = nodeValue("Line life", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4 ) @@ -30,8 +29,7 @@ function Node_VFX_Renderer(_x, _y, _group = noone) : Node(_x, _y, _group) constr static createNewInput = function() { var index = ds_list_size(inputs); - inputs[| index + 0] = nodeValue("Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Normal", "Alpha", "Additive" ]) + inputs[| index + 0] = nodeValue_Enum_Scroll("Blend mode", self, 0 , [ "Normal", "Alpha", "Additive" ]) .rejectArray(); inputs[| index + 1] = nodeValue("Particles", self, JUNCTION_CONNECT.input, VALUE_TYPE.particle, noone ) diff --git a/scripts/node_VFX_renderer_output/node_VFX_renderer_output.gml b/scripts/node_VFX_renderer_output/node_VFX_renderer_output.gml index 0a116cd35..ece1573dc 100644 --- a/scripts/node_VFX_renderer_output/node_VFX_renderer_output.gml +++ b/scripts/node_VFX_renderer_output/node_VFX_renderer_output.gml @@ -13,8 +13,7 @@ function Node_VFX_Renderer_Output(_x, _y, _group = noone) : Node_Group_Output(_x inputs[| 1] = nodeValue("Round position", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true, "Round position to the closest integer value to avoid jittering.") .rejectArray(); - inputs[| 2] = nodeValue("Render Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, PARTICLE_RENDER_TYPE.surface ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Surface", "Line" ]) + inputs[| 2] = nodeValue_Enum_Button("Render Type", self, PARTICLE_RENDER_TYPE.surface , [ "Surface", "Line" ]) .rejectArray(); inputs[| 3] = nodeValue("Line life", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4 ) @@ -36,8 +35,7 @@ function Node_VFX_Renderer_Output(_x, _y, _group = noone) : Node_Group_Output(_x static createNewInput = function() { var index = ds_list_size(inputs); - inputs[| index + 0] = nodeValue("Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Normal", "Alpha", "Additive" ]) + inputs[| index + 0] = nodeValue_Enum_Scroll("Blend mode", self, 0 , [ "Normal", "Alpha", "Additive" ]) .rejectArray(); inputs[| index + 1] = nodeValue("Particles", self, JUNCTION_CONNECT.input, VALUE_TYPE.particle, noone ) diff --git a/scripts/node_active_canvas/node_active_canvas.gml b/scripts/node_active_canvas/node_active_canvas.gml index 1a873e2c9..8b1284992 100644 --- a/scripts/node_active_canvas/node_active_canvas.gml +++ b/scripts/node_active_canvas/node_active_canvas.gml @@ -1,16 +1,14 @@ function Node_Active_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Active Canvas"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| 1] = nodeValue_Surface("Texture", self); inputs[| 2] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] ) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 3] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 3] = nodeValue_Rotation("Rotation", self, 0); inputs[| 4] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ] ) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_alpha_cutoff/node_alpha_cutoff.gml b/scripts/node_alpha_cutoff/node_alpha_cutoff.gml index 0031cf9b3..1566becb2 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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, noone); + inputs[| 2] = nodeValue_Surface("Mask", self); 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 e3262a66d..c9ad92101 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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 0472ea69e..6f82e1a4c 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_application_in/node_application_in.gml b/scripts/node_application_in/node_application_in.gml index 4dcd75894..814f9246e 100644 --- a/scripts/node_application_in/node_application_in.gml +++ b/scripts/node_application_in/node_application_in.gml @@ -2,7 +2,7 @@ function Node_Application_In(_x, _y, _group = noone) : Node(_x, _y, _group) cons name = "GUI In"; update_on_frame = true; - inputs[| 0] = nodeValue("GUI", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("GUI", self); APP_SURF_OVERRIDE = true; diff --git a/scripts/node_area/node_area.gml b/scripts/node_area/node_area.gml index 8fb1f47f4..ffec99cdb 100644 --- a/scripts/node_area/node_area.gml +++ b/scripts/node_area/node_area.gml @@ -11,11 +11,12 @@ function Node_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons .setDisplay(VALUE_DISPLAY.vector) .setVisible(true, true); - inputs[| 2] = nodeValue("Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, AREA_SHAPE.rectangle ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Rectangle", s_node_shape_rectangle, 0), new scrollItem("Elipse", s_node_shape_circle, 0) ]); + inputs[| 2] = nodeValue_Enum_Scroll("Shape", self, AREA_SHAPE.rectangle, [ + new scrollItem("Rectangle", s_node_shape_rectangle, 0), + new scrollItem("Elipse", s_node_shape_circle, 0) + ]); - inputs[| 3] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Center Span", "Two Point" ]); + inputs[| 3] = nodeValue_Enum_Scroll("Type", self, 0, [ "Center Span", "Two Point" ]); outputs[| 0] = nodeValue("Area", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [ 0, 0, 0, 0, AREA_SHAPE.rectangle ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_argument/node_argument.gml b/scripts/node_argument/node_argument.gml index bf8bf3cc7..7f4b60f16 100644 --- a/scripts/node_argument/node_argument.gml +++ b/scripts/node_argument/node_argument.gml @@ -6,8 +6,7 @@ function Node_Argument(_x, _y, _group = noone) : Node(_x, _y, _group) constructo inputs[| 0] = nodeValue("Tag", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); - inputs[| 1] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "String", "Number" ]); + inputs[| 1] = nodeValue_Enum_Scroll("Type", self, 0, [ "String", "Number" ]); inputs[| 2] = nodeValue("Default value", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); diff --git a/scripts/node_armature_bind/node_armature_bind.gml b/scripts/node_armature_bind/node_armature_bind.gml index 63210115e..a0105cbf5 100644 --- a/scripts/node_armature_bind/node_armature_bind.gml +++ b/scripts/node_armature_bind/node_armature_bind.gml @@ -12,8 +12,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr name = "Armature Bind"; batch_output = false; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Armature", self, JUNCTION_CONNECT.input, VALUE_TYPE.armature, noone) .setVisible(true, true) @@ -397,7 +396,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, noone); + inputs[| index + 0] = nodeValue_Surface("Surface", self); inputs[| index + 0].surface_index = index; inputs[| index + 0].hover_effect = 0; inputs[| index + 0].display_data.bone_id = ""; diff --git a/scripts/node_array/node_array.gml b/scripts/node_array/node_array.gml index e68cea139..6da1eca24 100644 --- a/scripts/node_array/node_array.gml +++ b/scripts/node_array/node_array.gml @@ -3,8 +3,7 @@ function Node_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { attributes.spread_value = false; - inputs[| 0] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Any", "Surface", "Number", "Color", "Text" ], update_hover: false }) + inputs[| 0] = nodeValue_Enum_Scroll("Type", self, 0, { data: [ "Any", "Surface", "Number", "Color", "Text" ], update_hover: false }) .rejectArray(); inputs[| 1] = nodeValue("Spread array", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Unpack array and push the contents into the output one by one." ) diff --git a/scripts/node_array_get/node_array_get.gml b/scripts/node_array_get/node_array_get.gml index 85d2b790c..d44761dad 100644 --- a/scripts/node_array_get/node_array_get.gml +++ b/scripts/node_array_get/node_array_get.gml @@ -8,8 +8,7 @@ function Node_Array_Get(_x, _y, _group = noone) : Node(_x, _y, _group) construct inputs[| 1] = nodeValue("Index", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setVisible(true, true); - inputs[| 2] = nodeValue("Overflow", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, ["Clamp", "Loop", "Ping Pong"]) + inputs[| 2] = nodeValue_Enum_Scroll("Overflow", self, 0, [ "Clamp", "Loop", "Ping Pong" ]) .rejectArray(); outputs[| 0] = nodeValue("Value", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, 0); diff --git a/scripts/node_array_remove/node_array_remove.gml b/scripts/node_array_remove/node_array_remove.gml index 5fdc2896c..b18923931 100644 --- a/scripts/node_array_remove/node_array_remove.gml +++ b/scripts/node_array_remove/node_array_remove.gml @@ -5,8 +5,7 @@ function Node_Array_Remove(_x, _y, _group = noone) : Node(_x, _y, _group) constr inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setVisible(true, true); - inputs[| 1] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Index", "Value" ]) + inputs[| 1] = nodeValue_Enum_Button("Type", self, 0, [ "Index", "Value" ]) .rejectArray(); inputs[| 2] = nodeValue("Index", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0); diff --git a/scripts/node_array_sort/node_array_sort.gml b/scripts/node_array_sort/node_array_sort.gml index ccb0eb813..80d1bbade 100644 --- a/scripts/node_array_sort/node_array_sort.gml +++ b/scripts/node_array_sort/node_array_sort.gml @@ -6,8 +6,7 @@ function Node_Array_Sort(_x, _y, _group = noone) : Node(_x, _y, _group) construc inputs[| 0] = nodeValue("Array in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, []) .setVisible(true, true); - inputs[| 1] = nodeValue("Order", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Ascending", "Descending" ]) + inputs[| 1] = nodeValue_Enum_Button("Order", self, 0, [ "Ascending", "Descending" ]) .rejectArray(); outputs[| 0] = nodeValue("Sorted array", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, []); diff --git a/scripts/node_atlas/node_atlas.gml b/scripts/node_atlas/node_atlas.gml index 6b7ca89d5..5b561ecc6 100644 --- a/scripts/node_atlas/node_atlas.gml +++ b/scripts/node_atlas/node_atlas.gml @@ -1,13 +1,12 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; - inputs[| 2] = nodeValue("Method", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Radial", "Scan" ]); + inputs[| 2] = nodeValue_Enum_Scroll("Method", self, 0, [ "Radial", "Scan" ]); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_atlas_draw/node_atlas_draw.gml b/scripts/node_atlas_draw/node_atlas_draw.gml index 72c769f91..5fcdd1088 100644 --- a/scripts/node_atlas_draw/node_atlas_draw.gml +++ b/scripts/node_atlas_draw/node_atlas_draw.gml @@ -2,10 +2,9 @@ function Node_Atlas_Draw(_x, _y, _group = noone) : Node(_x, _y, _group) construc name = "Draw Atlas"; previewable = true; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue("Atlas", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 1] = nodeValue_Surface("Atlas", self) .setVisible(true, true); outputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_atlas_get/node_atlas_get.gml b/scripts/node_atlas_get/node_atlas_get.gml index a63020635..d14c4bfe1 100644 --- a/scripts/node_atlas_get/node_atlas_get.gml +++ b/scripts/node_atlas_get/node_atlas_get.gml @@ -2,7 +2,7 @@ function Node_Atlas_Get(_x, _y, _group = noone) : Node(_x, _y, _group) construct name = "Atlas Get"; previewable = true; - inputs[| 0] = nodeValue("Atlas", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 0] = nodeValue_Surface("Atlas", self) .setVisible(true, true); outputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, []) diff --git a/scripts/node_atlas_set/node_atlas_set.gml b/scripts/node_atlas_set/node_atlas_set.gml index 295182130..08f631d5c 100644 --- a/scripts/node_atlas_set/node_atlas_set.gml +++ b/scripts/node_atlas_set/node_atlas_set.gml @@ -2,15 +2,15 @@ function Node_Atlas_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construct name = "Atlas Set"; previewable = true; - inputs[| 0] = nodeValue("Atlas", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 0] = nodeValue_Surface("Atlas", self) .setVisible(true, true); - inputs[| 1] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Surface", self); inputs[| 2] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 3] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); + inputs[| 3] = nodeValue_Rotation("Rotation", self, 0); inputs[| 4] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_atlas_to_struct/node_atlas_to_struct.gml b/scripts/node_atlas_to_struct/node_atlas_to_struct.gml index dd7b80719..7fe4b4479 100644 --- a/scripts/node_atlas_to_struct/node_atlas_to_struct.gml +++ b/scripts/node_atlas_to_struct/node_atlas_to_struct.gml @@ -2,7 +2,7 @@ function Node_Atlas_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constr name = "Atlas to Struct"; setDimension(96, 48); - inputs[| 0] = nodeValue("Atlas", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 0] = nodeValue_Surface("Atlas", self) .setVisible(true, true); outputs[| 0] = nodeValue("Struct", self, JUNCTION_CONNECT.output, VALUE_TYPE.struct, []) diff --git a/scripts/node_audio_window/node_audio_window.gml b/scripts/node_audio_window/node_audio_window.gml index 26fa96496..27d3c4f32 100644 --- a/scripts/node_audio_window/node_audio_window.gml +++ b/scripts/node_audio_window/node_audio_window.gml @@ -16,8 +16,7 @@ function Node_Audio_Window(_x, _y, _group = noone) : Node(_x, _y, _group) constr } ); - inputs[| 3] = nodeValue("Cursor location", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Start", "Middle", "End" ]); + inputs[| 3] = nodeValue_Enum_Button("Cursor location", self, 1, [ "Start", "Middle", "End" ]); inputs[| 4] = nodeValue("Step", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 16); diff --git a/scripts/node_average/node_average.gml b/scripts/node_average/node_average.gml index 65c0935a4..bd101d198 100644 --- a/scripts/node_average/node_average.gml +++ b/scripts/node_average/node_average.gml @@ -1,9 +1,9 @@ function Node_Average(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Average"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Mask", self); 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 0a64f36a6..2ee94833d 100644 --- a/scripts/node_bend/node_bend.gml +++ b/scripts/node_bend/node_bend.gml @@ -1,17 +1,15 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; - inputs[| 2] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Arc", s_node_bend_type, 0), - new scrollItem("Wave", s_node_bend_type, 1) ]); + inputs[| 2] = nodeValue_Enum_Scroll("Type", self, 0, [ new scrollItem("Arc", s_node_bend_type, 0), + new scrollItem("Wave", s_node_bend_type, 1) ]); - inputs[| 3] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "x", "y" ]); + inputs[| 3] = nodeValue_Enum_Button("Axis", self, 0, [ "x", "y" ]); inputs[| 4] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.25) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); diff --git a/scripts/node_bevel/node_bevel.gml b/scripts/node_bevel/node_bevel.gml index 39e676eda..66e8cff59 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Height", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4) .setMappable(11); @@ -12,12 +12,11 @@ function Node_Bevel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 3] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ] ) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 4] = nodeValue("Slope", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Linear", s_node_curve, 2), - new scrollItem("Smooth", s_node_curve, 4), - new scrollItem("Circular", s_node_curve, 5), ]); + inputs[| 4] = nodeValue_Enum_Scroll("Slope", self, 0, [ new scrollItem("Linear", s_node_curve, 2), + 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, noone); + inputs[| 5] = nodeValue_Surface("Mask", self); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -25,8 +24,8 @@ function Node_Bevel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 7; - inputs[| 8] = 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_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); __init_mask_modifier(5); // inputs 9, 10 diff --git a/scripts/node_blend/node_blend.gml b/scripts/node_blend/node_blend.gml index 155d0ef89..e405c7a2e 100644 --- a/scripts/node_blend/node_blend.gml +++ b/scripts/node_blend/node_blend.gml @@ -34,22 +34,19 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con name = "Blend"; manage_atlas = false; - inputs[| 0] = nodeValue("Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 1] = nodeValue("Foreground", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Background", self); + inputs[| 1] = nodeValue_Surface("Foreground", self); - inputs[| 2] = nodeValue("Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, BLEND_TYPES ); + inputs[| 2] = nodeValue_Enum_Scroll("Blend mode", self, 0, BLEND_TYPES ); 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, noone); + inputs[| 4] = nodeValue_Surface("Mask", self); - inputs[| 5] = nodeValue("Fill mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "None", "Stretch", "Tile" ]); + inputs[| 5] = nodeValue_Enum_Scroll("Fill mode", self, 0, [ "None", "Stretch", "Tile" ]); - inputs[| 6] = nodeValue("Output dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Background", "Forground", "Mask", "Maximum", "Constant" ]) + inputs[| 6] = nodeValue_Enum_Scroll("Output dimension", self, 0, [ "Background", "Forground", "Mask", "Maximum", "Constant" ]) .rejectArray(); inputs[| 7] = nodeValue("Constant dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) @@ -60,11 +57,11 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 9] = nodeValue("Preserve alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 10] = nodeValue("Horizontal Align", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ THEME.inspector_surface_halign, THEME.inspector_surface_halign, THEME.inspector_surface_halign]); + inputs[| 10] = nodeValue_Enum_Button("Horizontal Align", self, 0, + [ THEME.inspector_surface_halign, THEME.inspector_surface_halign, THEME.inspector_surface_halign]); - inputs[| 11] = nodeValue("Vertical Align", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ THEME.inspector_surface_valign, THEME.inspector_surface_valign, THEME.inspector_surface_valign]); + inputs[| 11] = nodeValue_Enum_Button("Vertical Align", self, 0, + [ THEME.inspector_surface_valign, THEME.inspector_surface_valign, THEME.inspector_surface_valign]); inputs[| 12] = nodeValue("Invert mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); diff --git a/scripts/node_blend_edge/node_blend_edge.gml b/scripts/node_blend_edge/node_blend_edge.gml index 760aa814d..b08e1e54d 100644 --- a/scripts/node_blend_edge/node_blend_edge.gml +++ b/scripts/node_blend_edge/node_blend_edge.gml @@ -1,14 +1,13 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) .setDisplay(VALUE_DISPLAY.slider) .setMappable(5); - inputs[| 2] = nodeValue("Types",self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Both", "Horizontal", "Vertical" ]); + inputs[| 2] = nodeValue_Enum_Button("Types",self, 0, [ "Both", "Horizontal", "Vertical" ]); inputs[| 3] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 3; @@ -18,7 +17,7 @@ function Node_Blend_Edge(_x, _y, _group = noone) : Node_Processor(_x, _y, _group ///////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 5] = nodeValue("Width map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 5] = nodeValue_Surface("Width map", self) .setVisible(false, false); ///////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_blobify/node_blobify.gml b/scripts/node_blobify/node_blobify.gml index c372d652b..091dccd65 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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 209e4b325..e87709767 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3, "Bloom blur radius.") .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.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, noone); + inputs[| 4] = nodeValue_Surface("Bloom mask", self); - inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 5] = nodeValue_Surface("Mask", self); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -29,11 +29,9 @@ function Node_Bloom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 11] = nodeValue("Aspect Ratio", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 12] = nodeValue("Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 12] = nodeValue_Rotation("Direction", self, 0); - inputs[| 13] = nodeValue("Types", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Gaussian", "Zoom" ]); + inputs[| 13] = nodeValue_Enum_Scroll("Types", self, 0, [ "Gaussian", "Zoom" ]); inputs[| 14] = nodeValue("Zoom Origin", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) diff --git a/scripts/node_blur/node_blur.gml b/scripts/node_blur/node_blur.gml index c4c244254..4c4d94094 100644 --- a/scripts/node_blur/node_blur.gml +++ b/scripts/node_blur/node_blur.gml @@ -1,18 +1,18 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 3) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 32, 0.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[| 2] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); inputs[| 3] = 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[| 4] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); - inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 5] = nodeValue_Surface("Mask", self); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -30,8 +30,7 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 12] = nodeValue("Aspect Ratio", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 13] = nodeValue("Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 13] = nodeValue_Rotation("Direction", self, 0); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_blur_bokeh/node_blur_bokeh.gml b/scripts/node_blur_bokeh/node_blur_bokeh.gml index 598f04c41..bdee8bb47 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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, noone); + inputs[| 2] = nodeValue_Surface("Mask", self); 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 94f9c3a37..f7f0e8861 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.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, noone); + inputs[| 3] = nodeValue_Surface("Mask", self); 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 bb23831d6..df3774a19 100644 --- a/scripts/node_blur_directional/node_blur_directional.gml +++ b/scripts/node_blur_directional/node_blur_directional.gml @@ -1,17 +1,16 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) .setMappable(9); - inputs[| 2] = nodeValue("Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 2] = nodeValue_Rotation("Direction", self, 0) .setMappable(10); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 3] = nodeValue_Surface("Mask", self); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_blur_path/node_blur_path.gml b/scripts/node_blur_path/node_blur_path.gml index 78fd58a29..ebda20e39 100644 --- a/scripts/node_blur_path/node_blur_path.gml +++ b/scripts/node_blur_path/node_blur_path.gml @@ -1,13 +1,13 @@ function Node_Blur_Path(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Path Blur"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Blur Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone) .setVisible(true, true); inputs[| 2] = nodeValue("Resolution", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 32); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 3] = nodeValue_Surface("Mask", self); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_blur_radial/node_blur_radial.gml b/scripts/node_blur_radial/node_blur_radial.gml index 1f5ebcde6..57f3ca20a 100644 --- a/scripts/node_blur_radial/node_blur_radial.gml +++ b/scripts/node_blur_radial/node_blur_radial.gml @@ -1,20 +1,19 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 45) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 1] = nodeValue_Rotation("Strength", self, 45) .setMappable(10); inputs[| 2] = nodeValue("Center", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - 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[| 3] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 4] = nodeValue_Surface("Mask", self); inputs[| 5] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_blur_shape/node_blur_shape.gml b/scripts/node_blur_shape/node_blur_shape.gml index 240752953..04ff84d4a 100644 --- a/scripts/node_blur_shape/node_blur_shape.gml +++ b/scripts/node_blur_shape/node_blur_shape.gml @@ -1,12 +1,12 @@ function Node_Blur_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Shape Blur"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 1] = nodeValue("Blur Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[| 1] = nodeValue_Surface("Blur Shape", self); - inputs[| 2] = nodeValue("Blur mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 2] = nodeValue_Surface("Blur mask", self); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 3] = nodeValue_Surface("Mask", self); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -17,8 +17,7 @@ function Node_Blur_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 6] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111) .setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) }); - inputs[| 7] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Blur", "Max" ]); + inputs[| 7] = nodeValue_Enum_Button("Mode", self, 0, [ "Blur", "Max" ]); __init_mask_modifier(3); // inputs 8, 9, diff --git a/scripts/node_blur_simple/node_blur_simple.gml b/scripts/node_blur_simple/node_blur_simple.gml index 23713b1d9..a9bcaacc8 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.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[| 2] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 3] = nodeValue("Blur mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 3] = nodeValue_Surface("Blur mask", self); 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, noone); + inputs[| 6] = nodeValue_Surface("Mask", self); 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 e0c3fd1be..6e50d6c75 100644 --- a/scripts/node_blur_slope/node_blur_slope.gml +++ b/scripts/node_blur_slope/node_blur_slope.gml @@ -1,15 +1,15 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 32, 0.1 ] }) .setMappable(9); - inputs[| 2] = nodeValue("Slope Map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 2] = nodeValue_Surface("Slope Map", self); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 3] = nodeValue_Surface("Mask", self); 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 96fbc3356..01bcff955 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2) .setMappable(12); @@ -10,15 +10,14 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.vector) .setUnitRef(function(index) { return getDimension(index); }); - 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[| 3] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 4] = nodeValue("Zoom mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Start", "Middle", "End" ]); + inputs[| 4] = nodeValue_Enum_Scroll("Zoom mode", self, 1, [ "Start", "Middle", "End" ]); - inputs[| 5] = nodeValue("Blur mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 5] = nodeValue_Surface("Blur mask", self); - inputs[| 6] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 6] = nodeValue_Surface("Mask", self); inputs[| 7] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_boolean/node_boolean.gml b/scripts/node_boolean/node_boolean.gml index 1960c8793..fef2fba73 100644 --- a/scripts/node_boolean/node_boolean.gml +++ b/scripts/node_boolean/node_boolean.gml @@ -13,8 +13,7 @@ function Node_Boolean(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 1] = nodeValue("Hide Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 2] = nodeValue("Name location", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Top", "Bottom" ]); + inputs[| 2] = nodeValue_Enum_Button("Name location", self, 1, [ "Top", "Bottom" ]); outputs[| 0] = nodeValue("Boolean", self, JUNCTION_CONNECT.output, VALUE_TYPE.boolean, false); diff --git a/scripts/node_box_pattern/node_box_pattern.gml b/scripts/node_box_pattern/node_box_pattern.gml index 760c82ef3..955d7ca32 100644 --- a/scripts/node_box_pattern/node_box_pattern.gml +++ b/scripts/node_box_pattern/node_box_pattern.gml @@ -1,15 +1,13 @@ function Node_Box_Pattern(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Box Pattern"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 2) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }) .setMappable(6); - inputs[| 2] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 2] = nodeValue_Rotation("Angle", self, 0) .setMappable(7); inputs[| 3] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0] ) @@ -28,8 +26,7 @@ function Node_Box_Pattern(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou ////////////////////////////////////////////////////////////////////////////////// - inputs[| 8] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Solid", "Smooth", "AA" ]); + inputs[| 8] = nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ]); inputs[| 9] = nodeValue("Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.25) .setDisplay(VALUE_DISPLAY.slider) @@ -37,8 +34,7 @@ function Node_Box_Pattern(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 10] = nodeValueMap("Width map", self); - inputs[| 11] = nodeValue("Pattern", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Cross", "Xor" ]); + inputs[| 11] = nodeValue_Enum_Button("Pattern", self, 0, [ "Cross", "Xor" ]); inputs[| 12] = nodeValue("Iteration", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4) diff --git a/scripts/node_brush_linear/node_brush_linear.gml b/scripts/node_brush_linear/node_brush_linear.gml index 84abb5a69..1aff5afcc 100644 --- a/scripts/node_brush_linear/node_brush_linear.gml +++ b/scripts/node_brush_linear/node_brush_linear.gml @@ -1,7 +1,7 @@ function Node_Brush_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Brush"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; @@ -20,7 +20,7 @@ function Node_Brush_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 6] = nodeValue("Circulation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.8) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 7] = nodeValue_Surface("Mask", self); inputs[| 8] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_bw/node_bw.gml b/scripts/node_bw/node_bw.gml index 218abd4a7..bf635e5d7 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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, noone); + inputs[| 3] = nodeValue_Surface("Mask", self); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_cache/node_cache.gml b/scripts/node_cache/node_cache.gml index f764459d0..bb1f10b22 100644 --- a/scripts/node_cache/node_cache.gml +++ b/scripts/node_cache/node_cache.gml @@ -2,7 +2,7 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); outputs[| 0] = nodeValue("Cache surface", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_cache_array/node_cache_array.gml b/scripts/node_cache_array/node_cache_array.gml index 0629f7b4b..829981383 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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 4011b8b85..b716a34e7 100644 --- a/scripts/node_camera/node_camera.gml +++ b/scripts/node_camera/node_camera.gml @@ -37,15 +37,13 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| index + 0] = nodeValue($"Element {_s}", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| index + 1] = nodeValue($"Positioning {_s}", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, false) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Space", "Camera" ]); + inputs[| index + 1] = nodeValue_Enum_Button($"Positioning {_s}", self, false, [ "Space", "Camera" ]); inputs[| index + 2] = nodeValue($"Position {_s}", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] ) .setDisplay(VALUE_DISPLAY.vector) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| index + 3] = nodeValue($"Oversample {_s}", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Empty ", s_node_camera_repeat, 0), + inputs[| index + 3] = nodeValue_Enum_Scroll($"Oversample {_s}", self, 0, [ new scrollItem("Empty ", s_node_camera_repeat, 0), new scrollItem("Repeat ", s_node_camera_repeat, 1), new scrollItem("Repeat X", s_node_camera_repeat, 2), new scrollItem("Repeat Y", s_node_camera_repeat, 3), ]); diff --git a/scripts/node_canvas/node_canvas.gml b/scripts/node_canvas/node_canvas.gml index 19b86f602..5c492c72c 100644 --- a/scripts/node_canvas/node_canvas.gml +++ b/scripts/node_canvas/node_canvas.gml @@ -3,8 +3,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor color = COLORS.node_blend_canvas; setAlwaysTimeline(new timelineItemNode_Canvas(self)); - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white ); inputs[| 2] = nodeValue("Brush size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1 ) @@ -13,17 +12,16 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor inputs[| 3] = nodeValue("Fill threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 4] = nodeValue("Fill type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, ["4 connect", "8 connect", "Entire canvas"]); + inputs[| 4] = nodeValue_Enum_Scroll("Fill type", self, 0, ["4 connect", "8 connect", "Entire canvas"]); inputs[| 5] = nodeValue("Draw preview overlay", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); - inputs[| 6] = nodeValue("Brush", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 6] = nodeValue_Surface("Brush", self) .setVisible(true, false); inputs[| 7] = nodeValue("Surface amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1); - inputs[| 8] = nodeValue("Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, -1); + inputs[| 8] = nodeValue_Surface("Background", self); inputs[| 9] = nodeValue("Background alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1.) .setDisplay(VALUE_DISPLAY.slider); @@ -47,8 +45,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor inputs[| 17] = nodeValue("Random direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0, 0 ] ) .setDisplay(VALUE_DISPLAY.rotation_random); - inputs[| 18] = nodeValue("Animation Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Loop", "Hold", "Clear" ]); + inputs[| 18] = nodeValue_Enum_Scroll("Animation Type", self, 0, [ "Loop", "Hold", "Clear" ]); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_canvas_group/node_canvas_group.gml b/scripts/node_canvas_group/node_canvas_group.gml index 71dfc26fb..ece861e6f 100644 --- a/scripts/node_canvas_group/node_canvas_group.gml +++ b/scripts/node_canvas_group/node_canvas_group.gml @@ -8,8 +8,7 @@ function Node_Canvas_Group(_x, _y, _group) : Node_Collection(_x, _y, _group) con modifiable = false; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); custom_input_index = ds_list_size(inputs); diff --git a/scripts/node_cellular/node_cellular.gml b/scripts/node_cellular/node_cellular.gml index ae4c66d8f..68ea11afc 100644 --- a/scripts/node_cellular/node_cellular.gml +++ b/scripts/node_cellular/node_cellular.gml @@ -1,8 +1,7 @@ function Node_Cellular(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Cellular Noise"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ DEF_SURF_W / 2, DEF_SURF_H / 2]) .setDisplay(VALUE_DISPLAY.vector) @@ -14,14 +13,12 @@ function Node_Cellular(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 4] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Point", "Edge", "Cell", "Crystal" ]); + inputs[| 4] = nodeValue_Enum_Scroll("Type", self, 0, [ "Point", "Edge", "Cell", "Crystal" ]); inputs[| 5] = nodeValue("Contrast", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 4, 0.01] }); - inputs[| 6] = nodeValue("Pattern", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Tiled", "Uniform", "Radial" ]); + inputs[| 6] = nodeValue_Enum_Button("Pattern", self, 0, [ "Tiled", "Uniform", "Radial" ]); inputs[| 7] = nodeValue("Middle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [0., 1., 0.01] }); @@ -41,8 +38,7 @@ function Node_Cellular(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ////////////////////////////////////////////////////////////////////////////////// - inputs[| 12] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 12] = nodeValue_Rotation("Rotation", self, 0); input_display_list = [ ["Output", false], 0, diff --git a/scripts/node_checker/node_checker.gml b/scripts/node_checker/node_checker.gml index 584351d98..062a7c6e7 100644 --- a/scripts/node_checker/node_checker.gml +++ b/scripts/node_checker/node_checker.gml @@ -1,15 +1,13 @@ function Node_Checker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Checker"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 2) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }) .setMappable(6); - inputs[| 2] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 2] = nodeValue_Rotation("Angle", self, 0) .setMappable(7); inputs[| 3] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0] ) @@ -28,8 +26,7 @@ function Node_Checker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c ////////////////////////////////////////////////////////////////////////////////// - inputs[| 8] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Solid", "Smooth", "AA" ]); + inputs[| 8] = nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ]); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_chromatic_aberration/node_chromatic_aberration.gml b/scripts/node_chromatic_aberration/node_chromatic_aberration.gml index 8c8e20e34..82cad89a7 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Center", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) diff --git a/scripts/node_color_adjust/node_color_adjust.gml b/scripts/node_color_adjust/node_color_adjust.gml index a292c1672..bd3fbaa9c 100644 --- a/scripts/node_color_adjust/node_color_adjust.gml +++ b/scripts/node_color_adjust/node_color_adjust.gml @@ -2,7 +2,7 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro name = "Color Adjust"; batch_output = false; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Brightness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }) @@ -30,7 +30,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, noone); + inputs[| 8] = nodeValue_Surface("Mask", self); inputs[| 9] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider) @@ -43,15 +43,13 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 11] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 11; - inputs[| 12] = nodeValue("Input Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Surface", "Color" ]); + inputs[| 12] = nodeValue_Enum_Button("Input Type", self, 0, [ "Surface", "Color" ]); inputs[| 13] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, array_clone(DEF_PALETTE)) .setDisplay(VALUE_DISPLAY.palette) .setVisible(true, true); - inputs[| 14] = nodeValue("Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, BLEND_TYPES); + inputs[| 14] = nodeValue_Enum_Scroll("Blend mode", self, 0, BLEND_TYPES); inputs[| 15] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111) .setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) }); @@ -63,28 +61,28 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro //////////////////////////////////////////////////////////////////////////////////////// - inputs[| 18] = nodeValue("Brightness map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 18] = nodeValue_Surface("Brightness map", self) .setVisible(false, false); - inputs[| 19] = nodeValue("Contrast map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 19] = nodeValue_Surface("Contrast map", self) .setVisible(false, false); - inputs[| 20] = nodeValue("Hue map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 20] = nodeValue_Surface("Hue map", self) .setVisible(false, false); - inputs[| 21] = nodeValue("Saturation map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 21] = nodeValue_Surface("Saturation map", self) .setVisible(false, false); - inputs[| 22] = nodeValue("Value map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 22] = nodeValue_Surface("Value map", self) .setVisible(false, false); - inputs[| 23] = nodeValue("Blend map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 23] = nodeValue_Surface("Blend map", self) .setVisible(false, false); - inputs[| 24] = nodeValue("Alpha map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 24] = nodeValue_Surface("Alpha map", self) .setVisible(false, false); - inputs[| 25] = nodeValue("Exposure map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 25] = nodeValue_Surface("Exposure map", self) .setVisible(false, false); //////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_color_mix/node_color_mix.gml b/scripts/node_color_mix/node_color_mix.gml index 49909963e..e59801cc8 100644 --- a/scripts/node_color_mix/node_color_mix.gml +++ b/scripts/node_color_mix/node_color_mix.gml @@ -9,8 +9,7 @@ function Node_Color_Mix(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 2] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 3] = nodeValue("Color space", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "RGB", "HSV", "OKLAB" ]); + inputs[| 3] = nodeValue_Enum_Button("Color space", self, 0, [ "RGB", "HSV", "OKLAB" ]); outputs[| 0] = nodeValue("Color", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, c_white); diff --git a/scripts/node_color_remove/node_color_remove.gml b/scripts/node_color_remove/node_color_remove.gml index f1989bfde..1ca0cef0b 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, array_clone(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, noone); + inputs[| 3] = nodeValue_Surface("Mask", self); 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 63f3bcd3b..f75fb81bd 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Palette from", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, array_clone(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, noone); + inputs[| 7] = nodeValue_Surface("Mask", self); inputs[| 8] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -30,8 +30,7 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr __init_mask_modifier(7); // inputs 11, 12 - inputs[| 13] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Closet", "Random" ]); + inputs[| 13] = nodeValue_Enum_Scroll("Mode", self, 0, [ "Closet", "Random" ]); inputs[| 14] = nodeValueSeed(self, VALUE_TYPE.float); diff --git a/scripts/node_colorize/node_colorize.gml b/scripts/node_colorize/node_colorize.gml index dc66ffbda..13537857f 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject([ cola(c_black), cola(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, noone); + inputs[| 3] = nodeValue_Surface("Mask", self); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_colors_replace/node_colors_replace.gml b/scripts/node_colors_replace/node_colors_replace.gml index d4fa38af4..816bb70a3 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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, noone); + inputs[| 4] = nodeValue_Surface("Mask", self); 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 684b77961..c272c0feb 100644 --- a/scripts/node_combine_hsv/node_combine_hsv.gml +++ b/scripts/node_combine_hsv/node_combine_hsv.gml @@ -1,14 +1,14 @@ function Node_Combine_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "HSV Combine"; - 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); - inputs[| 3] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Hue", self); + inputs[| 1] = nodeValue_Surface("Saturation", self); + inputs[| 2] = nodeValue_Surface("Value", self); + inputs[| 3] = nodeValue_Surface("Alpha", self); inputs[| 4] = nodeValue("Array Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 5] = nodeValue("HSV Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, []) + inputs[| 5] = nodeValue_Surface("HSV Array", self, []) .setArrayDepth(1); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_combine_rgb/node_combine_rgb.gml b/scripts/node_combine_rgb/node_combine_rgb.gml index a46e26e06..3356e1a5d 100644 --- a/scripts/node_combine_rgb/node_combine_rgb.gml +++ b/scripts/node_combine_rgb/node_combine_rgb.gml @@ -2,13 +2,12 @@ function Node_Combine_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou name = "RGB Combine"; dimension_index = -1; - inputs[| 0] = nodeValue("Red", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 1] = nodeValue("Green", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 2] = nodeValue("Blue", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 3] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Red", self); + inputs[| 1] = nodeValue_Surface("Green", self); + inputs[| 2] = nodeValue_Surface("Blue", self); + inputs[| 3] = nodeValue_Surface("Alpha", self); - inputs[| 4] = nodeValue("Sampling type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, ["Channel value", "Greyscale"]); + inputs[| 4] = nodeValue_Enum_Scroll("Sampling type", self, 0, ["Channel value", "Greyscale"]); inputs[| 5] = nodeValue("Base value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0, "Set value to the unconnected color channels.") .setDisplay(VALUE_DISPLAY.slider) @@ -22,7 +21,7 @@ function Node_Combine_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 7] = nodeValue("Array Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 8] = nodeValue("RGBA Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, []) + inputs[| 8] = nodeValue_Surface("RGBA Array", self, []) .setArrayDepth(1); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_compare/node_compare.gml b/scripts/node_compare/node_compare.gml index 44fccf82d..f67b3946d 100644 --- a/scripts/node_compare/node_compare.gml +++ b/scripts/node_compare/node_compare.gml @@ -33,8 +33,7 @@ function Node_Compare(_x, _y, _group = noone) : Node(_x, _y, _group) constructor setDimension(96, 48); - inputs[| 0] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Equal", s_node_condition_type, 0), + inputs[| 0] = nodeValue_Enum_Scroll("Type", self, 0, [ new scrollItem("Equal", s_node_condition_type, 0), new scrollItem("Not equal", s_node_condition_type, 1), new scrollItem("Greater ", s_node_condition_type, 4), new scrollItem("Greater or equal", s_node_condition_type, 5), diff --git a/scripts/node_composite/node_composite.gml b/scripts/node_composite/node_composite.gml index e397f5518..f3bf7efc3 100644 --- a/scripts/node_composite/node_composite.gml +++ b/scripts/node_composite/node_composite.gml @@ -16,11 +16,9 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 0] = nodeValue("Padding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.padding); - inputs[| 1] = nodeValue("Output dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, COMPOSE_OUTPUT_SCALING.first) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "First surface", "Largest surface", "Constant" ]); + inputs[| 1] = nodeValue_Enum_Scroll("Output dimension", self, COMPOSE_OUTPUT_SCALING.first, [ "First surface", "Largest surface", "Constant" ]); - inputs[| 2] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector) + inputs[| 2] = nodeValue_Dimension(self) .setVisible(false); attribute_surface_depth(); @@ -422,14 +420,12 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.vector) .setUnitRef(function(index) { return [ overlay_w, overlay_h ]; }); - inputs[| index + 2] = nodeValue($"Rotation {_s}", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| index + 2] = nodeValue_Rotation($"Rotation {_s}", self, 0); inputs[| index + 3] = nodeValue($"Scale {_s}", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ] ) .setDisplay(VALUE_DISPLAY.vector); - inputs[| index + 4] = nodeValue($"Blend {_s}", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, BLEND_TYPES ); + inputs[| index + 4] = nodeValue_Enum_Scroll($"Blend {_s}", self, 0, BLEND_TYPES ); inputs[| index + 5] = nodeValue($"Opacity {_s}", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -454,7 +450,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) outputs[| 1] = nodeValue("Atlas data", self, JUNCTION_CONNECT.output, VALUE_TYPE.atlas, []); - outputs[| 2] = nodeValue("Dimension", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, [1, 1]) + outputs[| 2] = nodeValue_Dimension(self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, [1, 1]) .setVisible(false) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_condition/node_condition.gml b/scripts/node_condition/node_condition.gml index e33bd3aa8..36eb510e2 100644 --- a/scripts/node_condition/node_condition.gml +++ b/scripts/node_condition/node_condition.gml @@ -6,8 +6,7 @@ function Node_Condition(_x, _y, _group = noone) : Node(_x, _y, _group) construct inputs[| 0] = nodeValue("Check value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) .setVisible(true, true); - inputs[| 1] = nodeValue("Condition", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Equal", s_node_condition_type, 0), + inputs[| 1] = nodeValue_Enum_Scroll("Condition", self, 0 , [ new scrollItem("Equal", s_node_condition_type, 0), new scrollItem("Not equal", s_node_condition_type, 1), new scrollItem("Less ", s_node_condition_type, 2), new scrollItem("Less or equal ", s_node_condition_type, 3), @@ -24,8 +23,7 @@ function Node_Condition(_x, _y, _group = noone) : Node(_x, _y, _group) construct inputs[| 4] = nodeValue("False", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 ) .setVisible(true, true); - inputs[| 5] = nodeValue("Eval mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, ["Boolean", "Number compare", "Text compare" ]) + inputs[| 5] = nodeValue_Enum_Scroll("Eval mode", self, 0 , ["Boolean", "Number compare", "Text compare" ]) .rejectArray(); inputs[| 6] = nodeValue("Boolean", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false ) diff --git a/scripts/node_convolution/node_convolution.gml b/scripts/node_convolution/node_convolution.gml index 8d2e59f53..46e70e036 100644 --- a/scripts/node_convolution/node_convolution.gml +++ b/scripts/node_convolution/node_convolution.gml @@ -1,15 +1,15 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Kernel", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, array_create(9)) .setDisplay(VALUE_DISPLAY.matrix, { size: 3 }); - 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[| 2] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 3] = nodeValue_Surface("Mask", self); 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 7af8d8de6..4d43d4a2e 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 2) .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 0.1] }); - inputs[| 2] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 2] = nodeValue_Surface("Mask", self); 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 f65cc8b4f..6c41be448 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Crop", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.padding) @@ -11,8 +11,7 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 2] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 2; - inputs[| 3] = nodeValue("Aspect Ratio", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "None", "Manual", "1:1", "3:2", "4:3", "16:9" ]); + inputs[| 3] = nodeValue_Enum_Scroll("Aspect Ratio", self, 0, [ "None", "Manual", "1:1", "3:2", "4:3", "16:9" ]); inputs[| 4] = nodeValue("Ratio", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -23,8 +22,7 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 6] = nodeValue("Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 8 ); - inputs[| 7] = nodeValue("Fit Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Manual", "Width", "Height", "Minimum" ]); + inputs[| 7] = nodeValue_Enum_Scroll("Fit Mode", self, 0, [ "Manual", "Width", "Height", "Minimum" ]); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_crop_content/node_crop_content.gml b/scripts/node_crop_content/node_crop_content.gml index 680a103a7..6d0a7bbf9 100644 --- a/scripts/node_crop_content/node_crop_content.gml +++ b/scripts/node_crop_content/node_crop_content.gml @@ -1,12 +1,12 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); - inputs[| 2] = nodeValue("Array Sizing", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1, "Cropping mode for dealing with image array.") - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Largest, same size", "Independent" ]); + inputs[| 2] = nodeValue_Enum_Scroll("Array Sizing", self, 1, [ "Largest, same size", "Independent" ]) + .setTooltip("Cropping mode for dealing with image array."); inputs[| 3] = nodeValue("Padding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0, 0, 0, 0 ], "Add padding back after crop.") .setDisplay(VALUE_DISPLAY.padding); diff --git a/scripts/node_cross_section/node_cross_section.gml b/scripts/node_cross_section/node_cross_section.gml index 7a35ce933..28de21bc3 100644 --- a/scripts/node_cross_section/node_cross_section.gml +++ b/scripts/node_cross_section/node_cross_section.gml @@ -1,18 +1,16 @@ function Node_Cross_Section(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Draw Cross Section"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "X", "Y" ]); + inputs[| 1] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ]); inputs[| 2] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) .setDisplay(VALUE_DISPLAY.slider); inputs[| 3] = nodeValue("Anti Aliasing", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false ); - inputs[| 4] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "BW", "Colored" ]); + inputs[| 4] = nodeValue_Enum_Button("Mode", self, 0 , [ "BW", "Colored" ]); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone ); diff --git a/scripts/node_curve/node_curve.gml b/scripts/node_curve/node_curve.gml index 92bb41b1e..8679e9e01 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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, noone); + inputs[| 5] = nodeValue_Surface("Mask", self); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_curve_hsv/node_curve_hsv.gml b/scripts/node_curve_hsv/node_curve_hsv.gml index f66349c58..2f17a37bc 100644 --- a/scripts/node_curve_hsv/node_curve_hsv.gml +++ b/scripts/node_curve_hsv/node_curve_hsv.gml @@ -1,7 +1,7 @@ function Node_Curve_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "HSV Curve"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Hue", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); @@ -9,7 +9,7 @@ function Node_Curve_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 3] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); - inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 4] = nodeValue_Surface("Mask", self); inputs[| 5] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_de_corner/node_de_corner.gml b/scripts/node_de_corner/node_de_corner.gml index 5dccb14b2..6176fe0cf 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; @@ -11,10 +11,9 @@ function Node_De_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 3] = nodeValue("Iteration", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2) - inputs[| 4] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Double", "Diagonal" ]); + inputs[| 4] = nodeValue_Enum_Button("Type", self, 0, [ "Double", "Diagonal" ]); - inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 5] = nodeValue_Surface("Mask", self); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_de_stray/node_de_stray.gml b/scripts/node_de_stray/node_de_stray.gml index ae942f401..55ed974f9 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Tolerance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider); @@ -11,10 +11,9 @@ function Node_De_Stray(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 3] = nodeValue("Iteration", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2) - inputs[| 4] = nodeValue("Strictness", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Low", "High", "Stray-only" ]); + inputs[| 4] = nodeValue_Enum_Button("Strictness", self, 0, [ "Low", "High", "Stray-only" ]); - inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 5] = nodeValue_Surface("Mask", self); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_delay/node_delay.gml b/scripts/node_delay/node_delay.gml index 0dd30678f..c7249dfca 100644 --- a/scripts/node_delay/node_delay.gml +++ b/scripts/node_delay/node_delay.gml @@ -3,7 +3,7 @@ function Node_Delay(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con is_simulation = true; - inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface", self); inputs[| 1] = nodeValue("Frames", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1); diff --git a/scripts/node_diffuse/node_diffuse.gml b/scripts/node_diffuse/node_diffuse.gml index 57e07b172..300c97a8b 100644 --- a/scripts/node_diffuse/node_diffuse.gml +++ b/scripts/node_diffuse/node_diffuse.gml @@ -1,7 +1,7 @@ function Node_Diffuse(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Diffuse"; - inputs[| 0] = nodeValue("Density field", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| 0] = nodeValue_Surface("Density field", self); inputs[| 1] = nodeValue("Dissipation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.05) .setDisplay(VALUE_DISPLAY.slider, { range: [ -0.2, 0.2, 0.001] }); @@ -19,18 +19,16 @@ function Node_Diffuse(_x, _y, _group = noone) : Node(_x, _y, _group) constructor inputs[| 6] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 6].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 7] = nodeValue("External", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| 7] = nodeValue_Surface("External", self); inputs[| 8] = nodeValue("External Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) .setDisplay(VALUE_DISPLAY.slider, { range: [ -0.25, 0.25, 0.01] }); inputs[| 9] = nodeValue("Detail", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - inputs[| 10] = nodeValue("External Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Point", "Vector" ]); + inputs[| 10] = nodeValue_Enum_Scroll("External Type", self, 0, [ "Point", "Vector" ]); - inputs[| 11] = nodeValue("External Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 11] = nodeValue_Rotation("External Direction", self, 0); outputs[| 0] = nodeValue("Result", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_dilate/node_dilate.gml b/scripts/node_dilate/node_dilate.gml index fe8bd3d2a..e029dc6f2 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Center", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -14,10 +14,10 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 3] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 16) .setMappable(12); - 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[| 4] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 5] = nodeValue_Surface("Mask", self); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -32,10 +32,10 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co ////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValue("Strength map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 11] = nodeValue_Surface("Strength map", self) .setVisible(false, false); - inputs[| 12] = nodeValue("Radius map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 12] = nodeValue_Surface("Radius map", self) .setVisible(false, false); ////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_directory_search/node_directory_search.gml b/scripts/node_directory_search/node_directory_search.gml index c11520d69..7f2c8f07b 100644 --- a/scripts/node_directory_search/node_directory_search.gml +++ b/scripts/node_directory_search/node_directory_search.gml @@ -31,8 +31,7 @@ function Node_Directory_Search(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[| 1] = nodeValue("Extensions", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, ".png"); - inputs[| 2] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Surface", "Text" ]); + inputs[| 2] = nodeValue_Enum_Scroll("Type", self, 0, [ "Surface", "Text" ]); inputs[| 3] = nodeValue("Recursive", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) diff --git a/scripts/node_displace/node_displace.gml b/scripts/node_displace/node_displace.gml index cee8ad017..ac0c58991 100644 --- a/scripts/node_displace/node_displace.gml +++ b/scripts/node_displace/node_displace.gml @@ -1,9 +1,9 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Displace map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Displace map", self); inputs[| 2] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 0 ], "Vector to displace pixel by." ) .setDisplay(VALUE_DISPLAY.vector) @@ -15,20 +15,20 @@ function Node_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 4] = nodeValue("Mid value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0., "Brightness value to be use as a basis for 'no displacement'.") .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, @"Use color data for extra information. + inputs[| 5] = nodeValue_Enum_Button("Mode", self, 0, [ "Linear", "Vector", "Angle", "Gradient" ]) + .setTooltip(@"Use color data for extra information. - Linear: Displace along a single line (defined by the position value). - Vector: Use red as X displacement, green as Y displacement. - Angle: Use red as angle, green as distance. - - Gradient: Displace down the brightness value defined by the Displace map.") - .setDisplay(VALUE_DISPLAY.enum_button, [ "Linear", "Vector", "Angle", "Gradient" ]); + - Gradient: Displace down the brightness value defined by the Displace map."); inputs[| 6] = nodeValue("Iterate", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, @"If not set, then strength value is multiplied directly to the displacement. 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[| 7] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 8] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 8] = nodeValue_Surface("Mask", self); inputs[| 9] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -36,8 +36,7 @@ If set, then strength value control how many times the effect applies on itself. inputs[| 10] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 10; - inputs[| 11] = nodeValue("Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Overwrite", "Min", "Max" ]); + inputs[| 11] = nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Overwrite", "Min", "Max" ]); inputs[| 12] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111) .setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) }); @@ -46,14 +45,14 @@ If set, then strength value control how many times the effect applies on itself. //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 15] = nodeValue("Strength map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 15] = nodeValue_Surface("Strength map", self) .setVisible(false, false); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// inputs[| 16] = nodeValue("Separate axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 17] = nodeValue("Displace map 2", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 17] = nodeValue_Surface("Displace map 2", self); input_display_list = [ 10, 12, ["Surfaces", true], 0, 8, 9, 13, 14, diff --git a/scripts/node_display_text/node_display_text.gml b/scripts/node_display_text/node_display_text.gml index 816cc607b..31faabe1a 100644 --- a/scripts/node_display_text/node_display_text.gml +++ b/scripts/node_display_text/node_display_text.gml @@ -22,8 +22,7 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr inputs[| 1] = nodeValue("Text", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "Text"); - inputs[| 2] = nodeValue("Style", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Header", "Sub header", "Normal" ]) + inputs[| 2] = nodeValue_Enum_Scroll("Style", self, 2, [ "Header", "Sub header", "Normal" ]) .rejectArray(); inputs[| 3] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.75) diff --git a/scripts/node_dither/node_dither.gml b/scripts/node_dither/node_dither.gml index d253915a7..0f1b200af 100644 --- a/scripts/node_dither/node_dither.gml +++ b/scripts/node_dither/node_dither.gml @@ -16,26 +16,24 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Palette", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, array_clone(DEF_PALETTE)) .setDisplay(VALUE_DISPLAY.palette); - 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", "White Noise", "Custom" ]); + inputs[| 2] = nodeValue_Enum_Scroll("Pattern", self, 0, [ "2 x 2 Bayer", "4 x 4 Bayer", "8 x 8 Bayer", "White Noise", "Custom" ]); - inputs[| 3] = nodeValue("Dither map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 3] = nodeValue_Surface("Dither map", self) .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, noone); + inputs[| 5] = nodeValue_Surface("Contrast map", self); - inputs[| 6] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Color", "Alpha" ]); + inputs[| 6] = nodeValue_Enum_Button("Mode", self, 0, [ "Color", "Alpha" ]); - inputs[| 7] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 7] = nodeValue_Surface("Mask", self); inputs[| 8] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_dll/node_dll.gml b/scripts/node_dll/node_dll.gml index 783bc9ab0..1658efd6d 100644 --- a/scripts/node_dll/node_dll.gml +++ b/scripts/node_dll/node_dll.gml @@ -8,8 +8,7 @@ function Node_DLL(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { inputs[| 1] = nodeValue("Function name", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); - inputs[| 2] = nodeValue("Return type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Number", "Buffer" ]); + inputs[| 2] = nodeValue_Enum_Button("Return type", self, 0, [ "Number", "Buffer" ]); outputs[| 0] = nodeValue("Return Value", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0); @@ -46,8 +45,7 @@ function Node_DLL(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static createNewInput = function() { var index = ds_list_size(inputs); - inputs[| index + 0] = nodeValue("Parameter type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Number", "Buffer" ]); + inputs[| index + 0] = nodeValue_Enum_Button("Parameter type", self, 0, [ "Number", "Buffer" ]); inputs[| index + 1] = nodeValue("Parameter value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) .setVisible(true, true); diff --git a/scripts/node_dust/node_dust.gml b/scripts/node_dust/node_dust.gml index b222b7da1..553c3e3cf 100644 --- a/scripts/node_dust/node_dust.gml +++ b/scripts/node_dust/node_dust.gml @@ -79,8 +79,7 @@ function __Dust(x, y, size = 8) constructor { function Node_Dust(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Dust"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_dynasurf_in/node_dynasurf_in.gml b/scripts/node_dynasurf_in/node_dynasurf_in.gml index ba862b1b5..576c5942d 100644 --- a/scripts/node_dynasurf_in/node_dynasurf_in.gml +++ b/scripts/node_dynasurf_in/node_dynasurf_in.gml @@ -16,7 +16,7 @@ function Node_DynaSurf_In(_x, _y, _group = noone) : Node(_x, _y, _group) constru if(!is_undefined(inParent)) ds_list_remove(group.inputs, inParent); - inParent = nodeValue("Value", group, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inParent = nodeValue_Surface("Value", group) .uncache() .setVisible(true, true); inParent.from = self; diff --git a/scripts/node_edge_detect/node_edge_detect.gml b/scripts/node_edge_detect/node_edge_detect.gml index f70621725..022226043 100644 --- a/scripts/node_edge_detect/node_edge_detect.gml +++ b/scripts/node_edge_detect/node_edge_detect.gml @@ -6,15 +6,14 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in self); - inputs[| 1] = nodeValue("Algorithm", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, ["Sobel", "Prewitt", "Laplacian", "Neighbor max diff"] ); + inputs[| 1] = nodeValue_Enum_Scroll("Algorithm", self, 0, ["Sobel", "Prewitt", "Laplacian", "Neighbor max diff"] ); - 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[| 2] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 3] = nodeValue_Surface("Mask", self); 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 353af3966..a7c97857d 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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 470b00e34..b352e7b8f 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) .setValidator(VV_min(0)) @@ -11,7 +11,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, noone); + inputs[| 4] = nodeValue_Surface("Mask", self); inputs[| 5] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -26,7 +26,7 @@ function Node_Erode(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con ///////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 10] = nodeValue("Width map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 10] = nodeValue_Surface("Width map", self) .setVisible(false, false); ///////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_export/node_export.gml b/scripts/node_export/node_export.gml index d35f2d326..1586cb3f0 100644 --- a/scripts/node_export/node_export.gml +++ b/scripts/node_export/node_export.gml @@ -46,7 +46,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, noone); + inputs[| 0] = nodeValue_Surface("Surface", self); inputs[| 1] = nodeValue("Paths", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") .setDisplay(VALUE_DISPLAY.path_save, _format_still) @@ -60,8 +60,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor format_single = ["Single image", "Image sequence", "Animation"]; format_array = ["Multiple images", "Image sequences", "Animations"]; - inputs[| 3] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, { data: format_single, update_hover: false }) + inputs[| 3] = nodeValue_Enum_Scroll("Type", self, 0, { data: format_single, update_hover: false }) .rejectArray(); inputs[| 4] = nodeValue("Template guides", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) @@ -91,8 +90,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor format_image = [ ".png", ".jpg", ".webp" ]; format_animation = [ ".gif", ".apng", ".webp", ".mp4" ]; - inputs[| 9] = nodeValue("Format", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, { data: format_image, update_hover: false }) + inputs[| 9] = nodeValue_Enum_Scroll("Format", self, 0, { data: format_image, update_hover: false }) .rejectArray(); inputs[| 10] = nodeValue("Quality", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 23) @@ -105,8 +103,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor .setDisplay(VALUE_DISPLAY.slider_range, { range: [0, TOTAL_FRAMES, 0.1] }); png_format = [ "INDEX4", "INDEX8", "Default (PNG32)" ]; - inputs[| 13] = nodeValue("Subformat", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2) - .setDisplay(VALUE_DISPLAY.enum_scroll, { data: png_format, update_hover: false }); + inputs[| 13] = nodeValue_Enum_Scroll("Subformat", self, 2, { data: png_format, update_hover: false }); inputs[| 14] = nodeValue("Frame step", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1); diff --git a/scripts/node_find_pixel/node_find_pixel.gml b/scripts/node_find_pixel/node_find_pixel.gml index 98185e738..325a66872 100644 --- a/scripts/node_find_pixel/node_find_pixel.gml +++ b/scripts/node_find_pixel/node_find_pixel.gml @@ -2,7 +2,7 @@ function Node_Find_Pixel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group name = "Find pixel"; setDimension(96, 48); - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Search color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); @@ -16,8 +16,7 @@ function Node_Find_Pixel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 5] = nodeValue("Alpha tolerance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2) .setDisplay(VALUE_DISPLAY.slider); - // inputs[| 6] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - // .setDisplay(VALUE_DISPLAY.enum_button, [ "X", "Y" ]); + // inputs[| 6] = nodeValue_Enum_Button("Axis", self, 1, [ "X", "Y" ]); outputs[| 0] = nodeValue("Position", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_flip/node_flip.gml b/scripts/node_flip/node_flip.gml index b2cdabca2..190d28c31 100644 --- a/scripts/node_flip/node_flip.gml +++ b/scripts/node_flip/node_flip.gml @@ -1,10 +1,9 @@ function Node_Flip(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Flip"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "x", "y" ]); + inputs[| 1] = nodeValue_Enum_Button("Axis", self, 0, [ "x", "y" ]); inputs[| 2] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 2; diff --git a/scripts/node_flood_fill/node_flood_fill.gml b/scripts/node_flood_fill/node_flood_fill.gml index e63e84245..d4a303b30 100644 --- a/scripts/node_flood_fill/node_flood_fill.gml +++ b/scripts/node_flood_fill/node_flood_fill.gml @@ -1,9 +1,9 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Mask", self); inputs[| 2] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -23,8 +23,7 @@ function Node_Flood_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group __init_mask_modifier(1); // inputs 8, 9 - inputs[| 10] = nodeValue("Blend", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Override", "Multiply" ]); + inputs[| 10] = nodeValue_Enum_Scroll("Blend", self, 0, [ "Override", "Multiply" ]); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_flow_noise/node_flow_noise.gml b/scripts/node_flow_noise/node_flow_noise.gml index c55082e22..2d52e167e 100644 --- a/scripts/node_flow_noise/node_flow_noise.gml +++ b/scripts/node_flow_noise/node_flow_noise.gml @@ -18,8 +18,7 @@ function Node_Flow_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, .setDisplay(VALUE_DISPLAY.slider_range, { range: [ 1, 16, 0.1 ] }); addShaderProp(SHADER_UNIFORM.float, "detail"); - inputs[| 5] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 5] = nodeValue_Rotation("Rotation", self, 0); addShaderProp(SHADER_UNIFORM.float, "rotation"); input_display_list = [ diff --git a/scripts/node_fn/node_fn.gml b/scripts/node_fn/node_fn.gml index 573be3a7d..69a20f8b0 100644 --- a/scripts/node_fn/node_fn.gml +++ b/scripts/node_fn/node_fn.gml @@ -4,8 +4,7 @@ function Node_Fn(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr update_on_frame = true; setDimension(96, 96); - inputs[| 0] = nodeValue("Display", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Number", "Graph" ]); + inputs[| 0] = nodeValue_Enum_Scroll("Display", self, 1 , [ "Number", "Graph" ]); outputs[| 0] = nodeValue("Output", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0); diff --git a/scripts/node_fn_ease/node_fn_ease.gml b/scripts/node_fn_ease/node_fn_ease.gml index 44aaedd4f..be8e72d64 100644 --- a/scripts/node_fn_ease/node_fn_ease.gml +++ b/scripts/node_fn_ease/node_fn_ease.gml @@ -7,8 +7,7 @@ function Node_Fn_Ease(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) construc inputs[| inl + 1] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.1, 0.9 ] ) .setDisplay(VALUE_DISPLAY.slider_range ); - inputs[| inl + 2] = nodeValue("Smooth", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Cubic poly", "Quadratic rat", "Cubic rat", "Cosine" ] ); + inputs[| inl + 2] = nodeValue_Enum_Scroll("Smooth", self, 0 , [ "Cubic poly", "Quadratic rat", "Cubic rat", "Cosine" ] ); array_append(input_display_list, [ ["Value", false], inl + 0, inl + 1, inl + 2, diff --git a/scripts/node_fn_math/node_fn_math.gml b/scripts/node_fn_math/node_fn_math.gml index 70295df91..e76d16326 100644 --- a/scripts/node_fn_math/node_fn_math.gml +++ b/scripts/node_fn_math/node_fn_math.gml @@ -2,8 +2,7 @@ function Node_Fn_Math(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) construc name = "Math"; time_based = false; - inputs[| inl + 0] = nodeValue("Operation", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Add", "Minus", "Multiply" ] ); + inputs[| inl + 0] = nodeValue_Enum_Scroll("Operation", self, 2 , [ "Add", "Minus", "Multiply" ] ); inputs[| inl + 1] = nodeValue("Value 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) .setVisible(true, true); diff --git a/scripts/node_fn_smoothstep/node_fn_smoothstep.gml b/scripts/node_fn_smoothstep/node_fn_smoothstep.gml index 1179fa1ee..4a1f587f8 100644 --- a/scripts/node_fn_smoothstep/node_fn_smoothstep.gml +++ b/scripts/node_fn_smoothstep/node_fn_smoothstep.gml @@ -5,8 +5,7 @@ function Node_Fn_SmoothStep(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) co inputs[| inl + 0] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) .setVisible(true, true); - inputs[| inl + 1] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Cubic poly", "Quadratic rat", "Cubic rat", "Cosine" ] ); + inputs[| inl + 1] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Cubic poly", "Quadratic rat", "Cubic rat", "Cosine" ] ); array_append(input_display_list, [ ["Value", false], inl + 1, inl + 0, diff --git a/scripts/node_fold_noise/node_fold_noise.gml b/scripts/node_fold_noise/node_fold_noise.gml index 75bb7ee37..a8029f665 100644 --- a/scripts/node_fold_noise/node_fold_noise.gml +++ b/scripts/node_fold_noise/node_fold_noise.gml @@ -22,12 +22,10 @@ function Node_Fold_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] }); addShaderProp(SHADER_UNIFORM.float, "amplitude"); - inputs[| 6] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "Map" ]); + inputs[| 6] = nodeValue_Enum_Button("Mode", self, 0, [ "Greyscale", "Map" ]); addShaderProp(SHADER_UNIFORM.integer, "mode"); - inputs[| 7] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 7] = nodeValue_Rotation("Rotation", self, 0); addShaderProp(SHADER_UNIFORM.float, "rotation"); input_display_list = [ diff --git a/scripts/node_gabor_noise/node_gabor_noise.gml b/scripts/node_gabor_noise/node_gabor_noise.gml index 9b891f93e..76ea3e63c 100644 --- a/scripts/node_gabor_noise/node_gabor_noise.gml +++ b/scripts/node_gabor_noise/node_gabor_noise.gml @@ -30,8 +30,7 @@ function Node_Gabor_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y .setDisplay(VALUE_DISPLAY.vector); addShaderProp(SHADER_UNIFORM.float, "augment"); - inputs[| 7] = nodeValue("Phase", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 7] = nodeValue_Rotation("Phase", self, 0) .setMappable(11); addShaderProp(SHADER_UNIFORM.float, "rotation"); @@ -47,8 +46,7 @@ function Node_Gabor_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y ////////////////////////////////////////////////////////////////////////////////// - inputs[| 12] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 12] = nodeValue_Rotation("Rotation", self, 0); addShaderProp(SHADER_UNIFORM.float, "trRotation"); input_display_list = [ diff --git a/scripts/node_gamma_map/node_gamma_map.gml b/scripts/node_gamma_map/node_gamma_map.gml index 31ef7a682..98dbd21a8 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Invert", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); diff --git a/scripts/node_glow/node_glow.gml b/scripts/node_glow/node_glow.gml index 077a17c32..cc05d58c9 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Border", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 4, 0.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, noone); + inputs[| 5] = nodeValue_Surface("Mask", self); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -24,13 +24,11 @@ function Node_Glow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons __init_mask_modifier(5); // inputs 8, 9, - inputs[| 10] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "Alpha" ]); + inputs[| 10] = nodeValue_Enum_Button("Mode", self, 0, [ "Greyscale", "Alpha" ]); inputs[| 11] = nodeValue("Draw original", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); - inputs[| 12] = nodeValue("Side", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Outer", "Inner" ]); + inputs[| 12] = nodeValue_Enum_Button("Side", self, 0, [ "Outer", "Inner" ]); input_display_list = [ 7, ["Surfaces", true], 0, 5, 6, 8, 9, diff --git a/scripts/node_gradient/node_gradient.gml b/scripts/node_gradient/node_gradient.gml index f1d43586c..df6716d6e 100644 --- a/scripts/node_gradient/node_gradient.gml +++ b/scripts/node_gradient/node_gradient.gml @@ -1,19 +1,16 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Draw Gradient"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject([ cola(c_black), cola(c_white) ]) ) .setMappable(15); - inputs[| 2] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Linear", s_node_gradient_type, 0), + inputs[| 2] = nodeValue_Enum_Scroll("Type", self, 0, [ new scrollItem("Linear", s_node_gradient_type, 0), new scrollItem("Circular", s_node_gradient_type, 1), new scrollItem("Radial", s_node_gradient_type, 2) ]); - inputs[| 3] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 3] = nodeValue_Rotation("Angle", self, 0) .setMappable(10); inputs[| 4] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, .5) @@ -27,10 +24,9 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.vector) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[| 7] = nodeValue("Loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "None", "Loop", "Pingpong" ]); + inputs[| 7] = nodeValue_Enum_Button("Loop", self, 0, [ "None", "Loop", "Pingpong" ]); - inputs[| 8] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 8] = nodeValue_Surface("Mask", self); inputs[| 9] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 2, 0.01] }) diff --git a/scripts/node_gradient_palette/node_gradient_palette.gml b/scripts/node_gradient_palette/node_gradient_palette.gml index 4a9cf8866..e751ee2f6 100644 --- a/scripts/node_gradient_palette/node_gradient_palette.gml +++ b/scripts/node_gradient_palette/node_gradient_palette.gml @@ -12,8 +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("Interpolation", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.enum_button, [ "None", "RGB", "HSV", "OKLAB", "sRGB" ]); + inputs[| 3] = nodeValue_Enum_Button("Interpolation", self, 1, [ "None", "RGB", "HSV", "OKLAB", "sRGB" ]); outputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.output, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) diff --git a/scripts/node_gradient_points/node_gradient_points.gml b/scripts/node_gradient_points/node_gradient_points.gml index bdc302135..4f19e0082 100644 --- a/scripts/node_gradient_points/node_gradient_points.gml +++ b/scripts/node_gradient_points/node_gradient_points.gml @@ -1,8 +1,7 @@ function Node_Gradient_Points(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Draw 4 Points Gradient"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Center 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] ) .setDisplay(VALUE_DISPLAY.vector) diff --git a/scripts/node_grain/node_grain.gml b/scripts/node_grain/node_grain.gml index 3c18e38eb..68bef1f14 100644 --- a/scripts/node_grain/node_grain.gml +++ b/scripts/node_grain/node_grain.gml @@ -1,9 +1,9 @@ function Node_Grain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Grain"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Mask", self); inputs[| 2] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -67,14 +67,11 @@ function Node_Grain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 22] = nodeValue("Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Additive", "Multiply", "Screen", "Overlay" ]) + inputs[| 22] = nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Additive", "Multiply", "Screen", "Overlay" ]) - inputs[| 23] = nodeValue("Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Additive", "Multiply", "Screen" ]) + inputs[| 23] = nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Additive", "Multiply", "Screen" ]) - inputs[| 24] = nodeValue("Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Additive", "Multiply", "Screen" ]) + inputs[| 24] = nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Additive", "Multiply", "Screen" ]) input_display_list = [ 3, 4, 9, ["Surfaces", true], 0, 1, 2, 5, 6, diff --git a/scripts/node_graph_preview/node_graph_preview.gml b/scripts/node_graph_preview/node_graph_preview.gml index 079c435f3..465b68cac 100644 --- a/scripts/node_graph_preview/node_graph_preview.gml +++ b/scripts/node_graph_preview/node_graph_preview.gml @@ -2,7 +2,7 @@ function Node_Graph_Preview(_x, _y, _group = noone) : Node(_x, _y, _group) const name = "Graph Preview"; preview_draw = true; - inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 0] = nodeValue_Surface("Surface", self) .rejectArray(); inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) diff --git a/scripts/node_grey_alpha/node_grey_alpha.gml b/scripts/node_grey_alpha/node_grey_alpha.gml index bb7eccd34..70263449f 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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 911fa083b..b70c16462 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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, noone); + inputs[| 3] = nodeValue_Surface("Mask", self); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -24,10 +24,10 @@ function Node_Greyscale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) __init_mask_modifier(3); // inputs 7, 8 - inputs[| 9] = nodeValue("Brightness map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 9] = nodeValue_Surface("Brightness map", self) .setVisible(false, false); - inputs[| 10] = nodeValue("Contrast map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 10] = nodeValue_Surface("Contrast map", self) .setVisible(false, false); input_display_list = [ 5, 6, diff --git a/scripts/node_grid/node_grid.gml b/scripts/node_grid/node_grid.gml index 1b26770df..3c18bd50a 100644 --- a/scripts/node_grid/node_grid.gml +++ b/scripts/node_grid/node_grid.gml @@ -1,8 +1,7 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Grid"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -16,8 +15,7 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) .setMappable(14); - inputs[| 4] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 4] = nodeValue_Rotation("Angle", self, 0) .setMappable(15); inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) @@ -25,17 +23,15 @@ 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, noone); + inputs[| 7] = nodeValue_Surface("Texture", self); inputs[| 8] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-0.5, 0.5, 0.01] }) .setMappable(16); - inputs[| 9] = nodeValue("Shift axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, ["X", "Y"]); + inputs[| 9] = nodeValue_Enum_Button("Shift axis", self, 0, ["X", "Y"]); - inputs[| 10] = nodeValue("Render type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Colored tile (Accurate)", "Height map", "Texture grid", "Texture sample"]); + inputs[| 10] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Colored tile (Accurate)", "Height map", "Texture grid", "Texture sample"]); inputs[| 11] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 11].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); diff --git a/scripts/node_grid_hex/node_grid_hex.gml b/scripts/node_grid_hex/node_grid_hex.gml index 44222be70..1f0279ca4 100644 --- a/scripts/node_grid_hex/node_grid_hex.gml +++ b/scripts/node_grid_hex/node_grid_hex.gml @@ -1,8 +1,7 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Hexagonal Grid"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -12,8 +11,7 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.vector) .setMappable(11); - inputs[| 3] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 3] = nodeValue_Rotation("Angle", self, 0) .setMappable(12); inputs[| 4] = nodeValue("Gap", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) @@ -25,13 +23,12 @@ function Node_Grid_Hex(_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("Render type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Height map", "Texture grid", "Texture sample"]); + inputs[| 7] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid", "Texture sample"]); inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 9] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 9] = nodeValue_Surface("Texture", self); inputs[| 10] = nodeValue("Anti aliasing", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); diff --git a/scripts/node_grid_noise/node_grid_noise.gml b/scripts/node_grid_noise/node_grid_noise.gml index f7810c29f..15fe63f8b 100644 --- a/scripts/node_grid_noise/node_grid_noise.gml +++ b/scripts/node_grid_noise/node_grid_noise.gml @@ -1,8 +1,7 @@ function Node_Grid_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Grid Noise"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -17,13 +16,11 @@ 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, noone); + inputs[| 5] = nodeValue_Surface("Texture sample", self); - inputs[| 6] = nodeValue("Shift axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, ["x", "y"]); + inputs[| 6] = nodeValue_Enum_Button("Shift axis", self, 0, ["x", "y"]); - inputs[| 7] = nodeValue("Color mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "RGB", "HSV" ]); + inputs[| 7] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); inputs[| 8] = nodeValue("Color R range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) .setDisplay(VALUE_DISPLAY.slider_range); diff --git a/scripts/node_grid_pentagonal/node_grid_pentagonal.gml b/scripts/node_grid_pentagonal/node_grid_pentagonal.gml index 6222a0767..ea7d6f460 100644 --- a/scripts/node_grid_pentagonal/node_grid_pentagonal.gml +++ b/scripts/node_grid_pentagonal/node_grid_pentagonal.gml @@ -1,8 +1,7 @@ function Node_Grid_Pentagonal(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Pentagonal Grid"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -16,8 +15,7 @@ function Node_Grid_Pentagonal(_x, _y, _group = noone) : Node_Processor(_x, _y, _ .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) .setMappable(12); - inputs[| 4] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 4] = nodeValue_Rotation("Angle", self, 0) .setMappable(13); inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) @@ -25,10 +23,9 @@ function Node_Grid_Pentagonal(_x, _y, _group = noone) : Node_Processor(_x, _y, _ 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, noone); + inputs[| 7] = nodeValue_Surface("Texture", self); - inputs[| 8] = nodeValue("Render type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Height map", "Texture grid"]); + inputs[| 8] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]); inputs[| 9] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 9].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); diff --git a/scripts/node_grid_tri/node_grid_tri.gml b/scripts/node_grid_tri/node_grid_tri.gml index 31be86ba7..550676733 100644 --- a/scripts/node_grid_tri/node_grid_tri.gml +++ b/scripts/node_grid_tri/node_grid_tri.gml @@ -1,8 +1,7 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Triangle Grid"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -16,8 +15,7 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) .setMappable(12); - inputs[| 4] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 4] = nodeValue_Rotation("Angle", self, 0) .setMappable(13); inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) @@ -25,10 +23,9 @@ 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, noone); + inputs[| 7] = nodeValue_Surface("Texture", self); - 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"]); + inputs[| 8] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid", "Texture sample"]); inputs[| 9] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 9].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); diff --git a/scripts/node_group_input/node_group_input.gml b/scripts/node_group_input/node_group_input.gml index 71fa012d4..1da6de5ab 100644 --- a/scripts/node_group_input/node_group_input.gml +++ b/scripts/node_group_input/node_group_input.gml @@ -78,21 +78,18 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru skipDefault(); setDimension(96, 32 + 24); - inputs[| 0] = nodeValue("Display type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, { data: GROUP_IO_DISPLAY[11], update_hover: false }); + inputs[| 0] = nodeValue_Enum_Scroll("Display type", self, 0, { data: GROUP_IO_DISPLAY[11], update_hover: false }); inputs[| 1] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) .setDisplay(VALUE_DISPLAY.range) .setVisible(false); - inputs[| 2] = nodeValue("Input type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 11) - .setDisplay(VALUE_DISPLAY.enum_scroll, { data: GROUP_IO_TYPE_NAME, update_hover: false }); + inputs[| 2] = nodeValue_Enum_Scroll("Input type", self, 11, { data: GROUP_IO_TYPE_NAME, update_hover: false }); inputs[| 3] = nodeValue("Enum label", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "") .setVisible(false); - inputs[| 4] = nodeValue("Vector size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "2", "3", "4" ]) + inputs[| 4] = nodeValue_Enum_Button("Vector size", self, 0, [ "2", "3", "4" ]) .setVisible(false); inputs[| 5] = nodeValue("Order", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0); @@ -105,8 +102,7 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 8] = nodeValue("Button Label", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "Trigger") .setVisible(false); - inputs[| 9] = nodeValue("Visible Condition", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Show", "Hide", /* 2 */ new scrollItem("Equal", s_node_condition_type, 0), + inputs[| 9] = nodeValue_Enum_Scroll("Visible Condition", self, 0, [ "Show", "Hide", /* 2 */ new scrollItem("Equal", s_node_condition_type, 0), /* 3 */ new scrollItem("Not equal", s_node_condition_type, 1), /* 4 */ new scrollItem("Greater ", s_node_condition_type, 4), /* 5 */ new scrollItem("Greater or equal", s_node_condition_type, 5), diff --git a/scripts/node_group_thumbnail/node_group_thumbnail.gml b/scripts/node_group_thumbnail/node_group_thumbnail.gml index 4ffc1b9f5..0ac81f1b1 100644 --- a/scripts/node_group_thumbnail/node_group_thumbnail.gml +++ b/scripts/node_group_thumbnail/node_group_thumbnail.gml @@ -3,10 +3,10 @@ function Node_Group_Thumbnail(_x, _y, _group = noone) : Node(_x, _y, _group) con destroy_when_upgroup = true; color = COLORS.node_blend_collection; - inputs[| 0] = nodeValue("Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 0] = nodeValue_Surface("Input", self) .setVisible(true, true); - outputs[| 0] = nodeValue("Output", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + outputs[| 0] = nodeValue_Surface("Output", self) .setVisible(false, false); static getGraphPreviewSurface = function() { #region diff --git a/scripts/node_herringbone_tile/node_herringbone_tile.gml b/scripts/node_herringbone_tile/node_herringbone_tile.gml index f393ab0a9..cf67b3103 100644 --- a/scripts/node_herringbone_tile/node_herringbone_tile.gml +++ b/scripts/node_herringbone_tile/node_herringbone_tile.gml @@ -1,8 +1,7 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Herringbone Tile"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -12,8 +11,7 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, .setDisplay(VALUE_DISPLAY.vector) .setMappable(11); - inputs[| 3] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 3] = nodeValue_Rotation("Angle", self, 0) .setMappable(12); inputs[| 4] = nodeValue("Gap", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.25) @@ -25,13 +23,12 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, inputs[| 6] = nodeValue("Gap color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); - inputs[| 7] = nodeValue("Render type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Height map", "Texture grid"]); + inputs[| 7] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]); inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 9] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 9] = nodeValue_Surface("Texture", self); inputs[| 10] = nodeValue("Anti aliasing", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); diff --git a/scripts/node_hlsl/node_hlsl.gml b/scripts/node_hlsl/node_hlsl.gml index d49a25910..b4d24fb2b 100644 --- a/scripts/node_hlsl/node_hlsl.gml +++ b/scripts/node_hlsl/node_hlsl.gml @@ -30,7 +30,7 @@ output.color = surfaceColor;") .setDisplay(VALUE_DISPLAY.codeHLSL) .rejectArray(); - inputs[| 2] = nodeValue("Base Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 2] = nodeValue_Surface("Base Texture", self); outputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone ); @@ -38,8 +38,7 @@ output.color = surfaceColor;") var index = ds_list_size(inputs); inputs[| index + 0] = nodeValue("Argument name", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "" ); - inputs[| index + 1] = nodeValue("Argument type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Float", "Int", "Vec2", "Vec3", "Vec4", "Mat3", "Mat4", "Sampler2D", "Color" ], update_hover: false }); + inputs[| index + 1] = nodeValue_Enum_Scroll("Argument type", self, 0 , { data: [ "Float", "Int", "Vec2", "Vec3", "Vec4", "Mat3", "Mat4", "Sampler2D", "Color" ], update_hover: false }); inputs[| index + 1].editWidget.interactable = false; inputs[| index + 2] = nodeValue("Argument value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) diff --git a/scripts/node_honey_noise/node_honey_noise.gml b/scripts/node_honey_noise/node_honey_noise.gml index 9cd98f174..a40124fc9 100644 --- a/scripts/node_honey_noise/node_honey_noise.gml +++ b/scripts/node_honey_noise/node_honey_noise.gml @@ -11,12 +11,10 @@ function Node_Honeycomb_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x .setDisplay(VALUE_DISPLAY.vector); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[| 3] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 3] = nodeValue_Rotation("Rotation", self, 0); addShaderProp(SHADER_UNIFORM.float, "rotation"); - inputs[| 4] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Hexagon", "Star" ]); + inputs[| 4] = nodeValue_Enum_Button("Mode", self, 0, [ "Hexagon", "Star" ]); addShaderProp(SHADER_UNIFORM.integer, "mode"); inputs[| 5] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) diff --git a/scripts/node_hsv_channel/node_hsv_channel.gml b/scripts/node_hsv_channel/node_hsv_channel.gml index bbad7abc3..2600f0dff 100644 --- a/scripts/node_hsv_channel/node_hsv_channel.gml +++ b/scripts/node_hsv_channel/node_hsv_channel.gml @@ -2,7 +2,7 @@ function Node_HSV_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou name = "HSV Extract"; batch_output = false; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Output Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); diff --git a/scripts/node_http_request/node_http_request.gml b/scripts/node_http_request/node_http_request.gml index eb5e88df4..48f6d15ba 100644 --- a/scripts/node_http_request/node_http_request.gml +++ b/scripts/node_http_request/node_http_request.gml @@ -4,8 +4,7 @@ function Node_HTTP_request(_x, _y, _group = noone) : Node(_x, _y, _group) constr inputs[| 0] = nodeValue("Address", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); - inputs[| 1] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Get", "Post" ]); + inputs[| 1] = nodeValue_Enum_Scroll("Type", self, 0, [ "Get", "Post" ]); inputs[| 2] = nodeValue("Content", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "") diff --git a/scripts/node_image_animated/node_image_animated.gml b/scripts/node_image_animated/node_image_animated.gml index b987ce064..135502b59 100644 --- a/scripts/node_image_animated/node_image_animated.gml +++ b/scripts/node_image_animated/node_image_animated.gml @@ -51,8 +51,7 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons inputs[| 3] = nodeValue("Animation speed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .rejectArray(); - inputs[| 4] = nodeValue("Loop modes", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, ["Loop", "Ping pong", "Hold last frame", "Hide"]) + inputs[| 4] = nodeValue_Enum_Scroll("Loop modes", self, 0, ["Loop", "Ping pong", "Hold last frame", "Hide"]) .rejectArray(); inputs[| 5] = nodeValue("Set animation length to match", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, false ) @@ -65,8 +64,7 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons inputs[| 7] = nodeValue("Frame", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0); - inputs[| 8] = nodeValue("Canvas size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "First", "Minimum", "Maximum" ]) + inputs[| 8] = nodeValue_Enum_Scroll("Canvas size", self, 2, [ "First", "Minimum", "Maximum" ]) .rejectArray(); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_image_gif/node_image_gif.gml b/scripts/node_image_gif/node_image_gif.gml index 9c6c986c7..a1f892f3c 100644 --- a/scripts/node_image_gif/node_image_gif.gml +++ b/scripts/node_image_gif/node_image_gif.gml @@ -42,8 +42,7 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct inputs[| 2] = nodeValue("Output as array", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 3] = nodeValue("Loop modes", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, ["Loop", "Ping pong", "Hold last frame", "Hide"]) + inputs[| 3] = nodeValue_Enum_Scroll("Loop modes", self, 0, ["Loop", "Ping pong", "Hold last frame", "Hide"]) .rejectArray(); inputs[| 4] = nodeValue("Start frame", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0); diff --git a/scripts/node_image_grid/node_image_grid.gml b/scripts/node_image_grid/node_image_grid.gml index 838970ac1..b5c977973 100644 --- a/scripts/node_image_grid/node_image_grid.gml +++ b/scripts/node_image_grid/node_image_grid.gml @@ -1,8 +1,7 @@ function Node_Image_Grid(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Image Grid"; - inputs[| 0] = nodeValue("Main Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Horizontal", s_node_alignment, 0), + inputs[| 0] = nodeValue_Enum_Scroll("Main Axis", self, 0, [ new scrollItem("Horizontal", s_node_alignment, 0), new scrollItem("Vertical", s_node_alignment, 1) ]) .rejectArray(); @@ -26,7 +25,7 @@ function Node_Image_Grid(_x, _y, _group = noone) : Node(_x, _y, _group) construc static createNewInput = function() { var index = ds_list_size(inputs); - inputs[| index] = nodeValue("Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, -1 ) + inputs[| index] = nodeValue_Surface("Input", self) .setVisible(true, true); return inputs[| index]; diff --git a/scripts/node_image_sequence/node_image_sequence.gml b/scripts/node_image_sequence/node_image_sequence.gml index d879dd876..432401e61 100644 --- a/scripts/node_image_sequence/node_image_sequence.gml +++ b/scripts/node_image_sequence/node_image_sequence.gml @@ -46,12 +46,10 @@ function Node_Image_Sequence(_x, _y, _group = noone) : Node(_x, _y, _group) cons .setDisplay(VALUE_DISPLAY.padding) .rejectArray(); - inputs[| 2] = nodeValue("Canvas size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Individual", "Minimum", "Maximum" ]) + inputs[| 2] = nodeValue_Enum_Scroll("Canvas size", self, 0, [ "Individual", "Minimum", "Maximum" ]) .rejectArray(); - inputs[| 3] = nodeValue("Sizing method", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Padding / Crop", "Scale" ]) + inputs[| 3] = nodeValue_Enum_Scroll("Sizing method", self, 0, [ "Padding / Crop", "Scale" ]) .rejectArray(); input_display_list = [ diff --git a/scripts/node_image_sheet/node_image_sheet.gml b/scripts/node_image_sheet/node_image_sheet.gml index 3168a4af8..d3f5a7f01 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Sprite size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 32, 32 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -19,13 +19,11 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 6] = nodeValue("Padding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0, 0, 0]) .setDisplay(VALUE_DISPLAY.padding); - inputs[| 7] = nodeValue("Output", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Animation", "Array" ]); + inputs[| 7] = nodeValue_Enum_Scroll("Output", self, 1, [ "Animation", "Array" ]); inputs[| 8] = nodeValue("Animation speed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1); - inputs[| 9] = nodeValue("Main Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Horizontal", s_node_alignment, 0), + inputs[| 9] = nodeValue_Enum_Scroll("Main Axis", self, 0, [ new scrollItem("Horizontal", s_node_alignment, 0), new scrollItem("Vertical", s_node_alignment, 1), ]); inputs[| 10] = nodeValue("Auto fill", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, false, "Automatically set amount based on sprite size.") @@ -59,8 +57,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 12] = nodeValue("Filter empty output", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 13] = nodeValue("Filtered Pixel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Transparent", "Color" ]); + inputs[| 13] = nodeValue_Enum_Scroll("Filtered Pixel", self, 0, [ "Transparent", "Color" ]); inputs[| 14] = nodeValue("Filtered Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black) diff --git a/scripts/node_interlaced/node_interlaced.gml b/scripts/node_interlaced/node_interlaced.gml index 66562e779..a23f00287 100644 --- a/scripts/node_interlaced/node_interlaced.gml +++ b/scripts/node_interlaced/node_interlaced.gml @@ -1,12 +1,12 @@ function Node_Interlaced(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Interlace"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; - inputs[| 2] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 2] = nodeValue_Surface("Mask", self); inputs[| 3] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -16,8 +16,7 @@ function Node_Interlaced(_x, _y, _group = noone) : Node_Processor(_x, _y, _group __init_mask_modifier(2); // inputs 5, 6 - inputs[| 7] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "X", "Y" ]); + inputs[| 7] = nodeValue_Enum_Button("Axis", self, 0, [ "X", "Y" ]); inputs[| 8] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1); diff --git a/scripts/node_interpret_number/node_interpret_number.gml b/scripts/node_interpret_number/node_interpret_number.gml index 4bdd0b9b9..73381dc98 100644 --- a/scripts/node_interpret_number/node_interpret_number.gml +++ b/scripts/node_interpret_number/node_interpret_number.gml @@ -6,8 +6,7 @@ function Node_Interpret_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, .setVisible(true, true) .setArrayDepth(1); - inputs[| 1] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "Gradient" ]); + inputs[| 1] = nodeValue_Enum_Button("Mode", self, 0, [ "Greyscale", "Gradient" ]); inputs[| 2] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ] ) .setDisplay(VALUE_DISPLAY.range); diff --git a/scripts/node_invert/node_invert.gml b/scripts/node_invert/node_invert.gml index 0985ebedf..2abe12a34 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Mask", self); inputs[| 2] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_isosurf/node_isosurf.gml b/scripts/node_isosurf/node_isosurf.gml index 6b194ef3a..505691866 100644 --- a/scripts/node_isosurf/node_isosurf.gml +++ b/scripts/node_isosurf/node_isosurf.gml @@ -4,12 +4,11 @@ function Node_IsoSurf(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 0] = nodeValue("Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4) .setValidator(VV_min(1)); - inputs[| 1] = nodeValue("Surfaces", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 1] = nodeValue_Surface("Surfaces", self) .setVisible(true, true) .setArrayDepth(1); - inputs[| 2] = nodeValue("Angle Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 2] = nodeValue_Rotation("Angle Shift", self, 0); inputs[| 3] = nodeValue("Angle Split", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0 * 90, 1 * 90, 2 * 90, 3 * 90 ]) .setArrayDynamic() diff --git a/scripts/node_jpeg/node_jpeg.gml b/scripts/node_jpeg/node_jpeg.gml index 74a66cf87..81ee68c77 100644 --- a/scripts/node_jpeg/node_jpeg.gml +++ b/scripts/node_jpeg/node_jpeg.gml @@ -1,7 +1,7 @@ function Node_JPEG(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "JPEG"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; @@ -14,7 +14,7 @@ function Node_JPEG(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 4] = nodeValue("Reconstruction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 8) .setValidator(VV_min(0)); - inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 5] = nodeValue_Surface("Mask", self); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -24,11 +24,9 @@ function Node_JPEG(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons __init_mask_modifier(5); // inputs 8, 9 - inputs[| 10] = nodeValue("Transformation", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Cosine", "Zigzag", "Smooth Zigzag", "Step" ]); + inputs[| 10] = nodeValue_Enum_Scroll("Transformation", self, 0, [ "Cosine", "Zigzag", "Smooth Zigzag", "Step" ]); - inputs[| 11] = nodeValue("Phase", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 11] = nodeValue_Rotation("Phase", self, 0); inputs[| 12] = nodeValue("Deconstruct Only", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) diff --git a/scripts/node_kuwahara/node_kuwahara.gml b/scripts/node_kuwahara/node_kuwahara.gml index 8796936ef..241e511c0 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; @@ -9,7 +9,7 @@ function Node_Kuwahara(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 2] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2) .setValidator(VV_min(1)); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 3] = nodeValue_Surface("Mask", self); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_level/node_level.gml b/scripts/node_level/node_level.gml index b8c3d171c..6d7326296 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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, noone); + inputs[| 6] = nodeValue_Surface("Mask", self); 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 f428c19a7..98f0bf049 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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, noone); + inputs[| 3] = nodeValue_Surface("Mask", self); 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 b6b219caa..6fb39298c 100644 --- a/scripts/node_line/node_line.gml +++ b/scripts/node_line/node_line.gml @@ -1,8 +1,7 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Draw Line"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); @@ -17,8 +16,7 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 5] = nodeValue("Random seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); - inputs[| 6] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 6] = nodeValue_Rotation("Rotation", self, 0); inputs[| 7] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone, "Draw line along path.") .setVisible(true, true); @@ -45,7 +43,7 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 17] = nodeValue("1px mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Render pixel perfect 1px line."); - inputs[| 18] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 18] = nodeValue_Surface("Texture", self); inputs[| 19] = nodeValue("Fix length", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Fix length of each segment instead of segment count."); @@ -54,8 +52,7 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 21] = nodeValue("Texture position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 22] = nodeValue("Texture rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 22] = nodeValue_Rotation("Texture Rotation", self, 0); inputs[| 23] = nodeValue("Texture scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -66,8 +63,7 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 26] = nodeValue("Clamp range", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false ); - inputs[| 27] = nodeValue("Data Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "None", "Path", "Segments" ]); + inputs[| 27] = nodeValue_Enum_Scroll("Data Type", self, 1, [ "None", "Path", "Segments" ]); inputs[| 28] = nodeValue("Segments", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [[]]) .setDisplay(VALUE_DISPLAY.vector) diff --git a/scripts/node_local_analyze/node_local_analyze.gml b/scripts/node_local_analyze/node_local_analyze.gml index dccce05fe..5c9976a47 100644 --- a/scripts/node_local_analyze/node_local_analyze.gml +++ b/scripts/node_local_analyze/node_local_analyze.gml @@ -1,23 +1,21 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Algorithm", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Average (Blur)", "Maximum", "Minimum" ]); + inputs[| 1] = nodeValue_Enum_Scroll("Algorithm", self, 0, [ "Average (Blur)", "Maximum", "Minimum" ]); inputs[| 2] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 16, 0.1] }); - 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[| 3] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 4] = nodeValue("Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Square", s_node_shape_rectangle, 0), + inputs[| 4] = nodeValue_Enum_Scroll("Shape", self, 0, [ new scrollItem("Square", s_node_shape_rectangle, 0), new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Diamond", s_node_shape_misc, 0) ]); - inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 5] = nodeValue_Surface("Mask", self); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_logic/node_logic.gml b/scripts/node_logic/node_logic.gml index d1da42cab..a52e5536b 100644 --- a/scripts/node_logic/node_logic.gml +++ b/scripts/node_logic/node_logic.gml @@ -32,8 +32,7 @@ function Node_Logic(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { setDimension(96, 48); - inputs[| 0] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("And" , s_node_logic, 0), + inputs[| 0] = nodeValue_Enum_Scroll("Type", self, 0, [ new scrollItem("And" , s_node_logic, 0), new scrollItem("Or" , s_node_logic, 1), new scrollItem("Not" , s_node_logic, 2), new scrollItem("Nand", s_node_logic, 3), diff --git a/scripts/node_lovify/node_lovify.gml b/scripts/node_lovify/node_lovify.gml index 1270fa747..e407756b6 100644 --- a/scripts/node_lovify/node_lovify.gml +++ b/scripts/node_lovify/node_lovify.gml @@ -2,7 +2,7 @@ function Node_Lovify(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co name = "Lovify"; color = CDEF.red; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); diff --git a/scripts/node_lua_compute/node_lua_compute.gml b/scripts/node_lua_compute/node_lua_compute.gml index cacb78ca4..25d1d7382 100644 --- a/scripts/node_lua_compute/node_lua_compute.gml +++ b/scripts/node_lua_compute/node_lua_compute.gml @@ -4,8 +4,7 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 0] = nodeValue("Function name", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "render" + string(irandom_range(100000, 999999))); - inputs[| 1] = nodeValue("Return type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Number", "String", "Struct" ], update_hover: false }); + inputs[| 1] = nodeValue_Enum_Scroll("Return type", self, 0, { data: [ "Number", "String", "Struct" ], update_hover: false }); inputs[| 2] = nodeValue("Lua code", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "", o_dialog_lua_reference) .setDisplay(VALUE_DISPLAY.codeLUA); @@ -37,8 +36,7 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru var index = ds_list_size(inputs); inputs[| index + 0] = nodeValue("Argument name", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "" ); - inputs[| index + 1] = nodeValue("Argument type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Number", "String", "Surface", "Struct" ], update_hover: false }); + inputs[| index + 1] = nodeValue_Enum_Scroll("Argument type", self, 0 , { data: [ "Number", "String", "Surface", "Struct" ], update_hover: false }); inputs[| index + 1].editWidget.interactable = false; inputs[| index + 2] = nodeValue("Argument value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) diff --git a/scripts/node_lua_global/node_lua_global.gml b/scripts/node_lua_global/node_lua_global.gml index 615137b14..bfc6b28ce 100644 --- a/scripts/node_lua_global/node_lua_global.gml +++ b/scripts/node_lua_global/node_lua_global.gml @@ -5,8 +5,7 @@ function Node_Lua_Global(_x, _y, _group = noone) : Node(_x, _y, _group) construc inputs[| 0] = nodeValue("Lua code", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "", o_dialog_lua_reference) .setDisplay(VALUE_DISPLAY.codeLUA); - inputs[| 1] = nodeValue("Run order", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "On start", "Every frame" ]); + inputs[| 1] = nodeValue_Enum_Scroll("Run order", self, 0, [ "On start", "Every frame" ]); inputs[| 2] = nodeValue("Execution thread", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, noone) .setVisible(false, true); diff --git a/scripts/node_lua_surface/node_lua_surface.gml b/scripts/node_lua_surface/node_lua_surface.gml index 14cb80ea1..91914e5d5 100644 --- a/scripts/node_lua_surface/node_lua_surface.gml +++ b/scripts/node_lua_surface/node_lua_surface.gml @@ -39,8 +39,7 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru var index = ds_list_size(inputs); inputs[| index + 0] = nodeValue("Argument name", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "" ); - inputs[| index + 1] = nodeValue("Argument type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Number", "String", "Surface", "Struct" ], update_hover: false }); + inputs[| index + 1] = nodeValue_Enum_Scroll("Argument type", self, 0 , { data: [ "Number", "String", "Surface", "Struct" ], update_hover: false }); inputs[| index + 1].editWidget.interactable = false; inputs[| index + 2] = nodeValue("Argument value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) diff --git a/scripts/node_math/node_math.gml b/scripts/node_math/node_math.gml index ee289ff91..db051b9dc 100644 --- a/scripts/node_math/node_math.gml +++ b/scripts/node_math/node_math.gml @@ -79,8 +79,7 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { color = COLORS.node_blend_number; setDimension(96, 48); - inputs[| 0] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ + inputs[| 0] = nodeValue_Enum_Scroll("Type", self, 0, [ /* 0 - 9*/ "Add", "Subtract", "Multiply", "Divide", "Power", "Root", "Sin", "Cos", "Tan", "Modulo", /*10 - 20*/ "Floor", "Ceil", "Round", "Lerp", "Abs", "Clamp", "Snap" ]) .rejectArray(); 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 f5ea0a253..d2d6c9480 100644 --- a/scripts/node_mesh_create_path/node_mesh_create_path.gml +++ b/scripts/node_mesh_create_path/node_mesh_create_path.gml @@ -8,8 +8,7 @@ function Node_Mesh_Create_Path(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[| 1] = nodeValue("Sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 8); - inputs[| 2] = nodeValue("Algorithm", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Ear Clipping", "Convex Fan", "Delaunay" ]); + inputs[| 2] = nodeValue_Enum_Scroll("Algorithm", self, 0, [ "Ear Clipping", "Convex Fan", "Delaunay" ]); outputs[| 0] = nodeValue("Mesh", self, JUNCTION_CONNECT.output, VALUE_TYPE.mesh, noone); diff --git a/scripts/node_mesh_transform/node_mesh_transform.gml b/scripts/node_mesh_transform/node_mesh_transform.gml index feecbe46f..04c7cffed 100644 --- a/scripts/node_mesh_transform/node_mesh_transform.gml +++ b/scripts/node_mesh_transform/node_mesh_transform.gml @@ -8,8 +8,7 @@ function Node_Mesh_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) cons inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 2] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 2] = nodeValue_Rotation("Rotation", self, 0); inputs[| 3] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_mesh_warp/node_mesh_warp.gml b/scripts/node_mesh_warp/node_mesh_warp.gml index b4729a0c6..04d2a9d8d 100644 --- a/scripts/node_mesh_warp/node_mesh_warp.gml +++ b/scripts/node_mesh_warp/node_mesh_warp.gml @@ -154,7 +154,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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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, 0.1 ] }); @@ -175,8 +175,7 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 7] = nodeValue("Full Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 8] = nodeValue("Mesh Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Grid", s_node_mesh_type, 0), + inputs[| 8] = nodeValue_Enum_Scroll("Mesh Type", self, 0, [ new scrollItem("Grid", s_node_mesh_type, 0), new scrollItem("Custom", s_node_mesh_type, 1), ] ); inputs[| 9] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6)) diff --git a/scripts/node_midi_in/node_midi_in.gml b/scripts/node_midi_in/node_midi_in.gml index 92125b462..9996e11a3 100644 --- a/scripts/node_midi_in/node_midi_in.gml +++ b/scripts/node_midi_in/node_midi_in.gml @@ -13,8 +13,7 @@ function Node_MIDI_In(_x, _y, _group = noone) : Node(_x, _y, _group) constructor for( var i = 0; i < inps; i++ ) _miniNames[i] = rtmidi_name_in(i); - inputs[| 0] = nodeValue("Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, { data: _miniNames, update_hover: false }) + inputs[| 0] = nodeValue_Enum_Scroll("Input", self, 0, { data: _miniNames, update_hover: false }) .rejectArray(); outputs[| 0] = nodeValue("Raw Message", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, []); diff --git a/scripts/node_mirror/node_mirror.gml b/scripts/node_mirror/node_mirror.gml index e7cf7e250..719b689b0 100644 --- a/scripts/node_mirror/node_mirror.gml +++ b/scripts/node_mirror/node_mirror.gml @@ -2,14 +2,13 @@ function Node_Mirror(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co name = "Mirror"; batch_output = false; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[| 2] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 2] = nodeValue_Rotation("Angle", self, 0); inputs[| 3] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 3; diff --git a/scripts/node_mk_blinker/node_mk_blinker.gml b/scripts/node_mk_blinker/node_mk_blinker.gml index fdd5a5765..a36b62a88 100644 --- a/scripts/node_mk_blinker/node_mk_blinker.gml +++ b/scripts/node_mk_blinker/node_mk_blinker.gml @@ -2,9 +2,9 @@ function Node_MK_Blinker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group name = "MK Blinker"; batch_output = false; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Mask", self); inputs[| 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); diff --git a/scripts/node_mk_brownian/node_mk_brownian.gml b/scripts/node_mk_brownian/node_mk_brownian.gml index b75f3fd28..7b11cc628 100644 --- a/scripts/node_mk_brownian/node_mk_brownian.gml +++ b/scripts/node_mk_brownian/node_mk_brownian.gml @@ -2,9 +2,9 @@ function Node_MK_Brownian(_x, _y, _group = noone) : Node(_x, _y, _group) constru name = "MK Brownian"; update_on_frame = true; - inputs[| 0] = nodeValue("Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Background", self); - inputs[| 1] = nodeValue("Sprite", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Sprite", self); inputs[| 2] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 10); @@ -32,8 +32,7 @@ function Node_MK_Brownian(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 11] = nodeValue("Turn", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 12] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 12] = nodeValue_Dimension(self); inputs[| 13] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.range, { linked : true }); diff --git a/scripts/node_mk_cable/node_mk_cable.gml b/scripts/node_mk_cable/node_mk_cable.gml index abc8f4b53..a3669a8bc 100644 --- a/scripts/node_mk_cable/node_mk_cable.gml +++ b/scripts/node_mk_cable/node_mk_cable.gml @@ -1,8 +1,7 @@ function Node_MK_Cable(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "MK Cable"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Point 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_mk_fall/node_mk_fall.gml b/scripts/node_mk_fall/node_mk_fall.gml index b961ac82a..8aea9becf 100644 --- a/scripts/node_mk_fall/node_mk_fall.gml +++ b/scripts/node_mk_fall/node_mk_fall.gml @@ -2,10 +2,9 @@ function Node_MK_Fall(_x, _y, _group = noone) : Node(_x, _y, _group) constructor name = "MK Fall"; update_on_frame = true; - inputs[| 0] = nodeValue("Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Background", self); - inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 1] = nodeValue_Dimension(self); inputs[| 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); @@ -61,8 +60,7 @@ function Node_MK_Fall(_x, _y, _group = noone) : Node(_x, _y, _group) constructor inputs[| 21] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.range, { linked : true }); - inputs[| 22] = nodeValue("Render Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Leaf", s_node_shape_leaf, 0), new scrollItem("Circle", s_node_shape_circle, 0) ]); + inputs[| 22] = nodeValue_Enum_Scroll("Render Type", self, 0, [ new scrollItem("Leaf", s_node_shape_leaf, 0), new scrollItem("Circle", s_node_shape_circle, 0) ]); inputs[| 23] = nodeValue("Twist Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.7) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_mk_flag/node_mk_flag.gml b/scripts/node_mk_flag/node_mk_flag.gml index 9b5b53cd9..99645cf74 100644 --- a/scripts/node_mk_flag/node_mk_flag.gml +++ b/scripts/node_mk_flag/node_mk_flag.gml @@ -2,16 +2,14 @@ function Node_MK_Flag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c name = "MK Flag"; update_on_frame = true; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Texture", self); inputs[| 2] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 3] = nodeValue("Pin side", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Left", "Right", "Up", "Down" ]); + inputs[| 3] = nodeValue_Enum_Button("Pin side", self, 0, [ "Left", "Right", "Up", "Down" ]); inputs[| 4] = nodeValue("Subdivision", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 8); diff --git a/scripts/node_mk_flame/node_mk_flame.gml b/scripts/node_mk_flame/node_mk_flame.gml index 828b748d6..e7bfacc9f 100644 --- a/scripts/node_mk_flame/node_mk_flame.gml +++ b/scripts/node_mk_flame/node_mk_flame.gml @@ -2,11 +2,9 @@ function Node_MK_Flame(_x, _y, _group = noone) : Node(_x, _y, _group) constructo name = "MK Flame"; update_on_frame = true; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue("Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 45) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 1] = nodeValue_Rotation("Direction", self, 45); input_display_list = [ new Inspector_Sprite(s_MKFX), 0, ["Shape", false], 1, diff --git a/scripts/node_mk_flare/node_mk_flare.gml b/scripts/node_mk_flare/node_mk_flare.gml index e50645948..9c7a6d1bc 100644 --- a/scripts/node_mk_flare/node_mk_flare.gml +++ b/scripts/node_mk_flare/node_mk_flare.gml @@ -25,14 +25,13 @@ function Node_MK_Flare(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) name = "MK Lens Flare"; batch_output = false; - inputs[| 0] = nodeValue("Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Background", self); inputs[| 1] = nodeValue("Origin", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[| 2] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 2] = nodeValue_Dimension(self); inputs[| 3] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) diff --git a/scripts/node_mk_fracture/node_mk_fracture.gml b/scripts/node_mk_fracture/node_mk_fracture.gml index fa788eba0..37914fd81 100644 --- a/scripts/node_mk_fracture/node_mk_fracture.gml +++ b/scripts/node_mk_fracture/node_mk_fracture.gml @@ -1,7 +1,7 @@ function Node_MK_Fracture(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "MK Fracture"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Subdivision", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 4, 4 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -16,8 +16,7 @@ function Node_MK_Fracture(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou .setDisplay(VALUE_DISPLAY.vector) .setMappable(9, true); - inputs[| 5] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 180) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 5] = nodeValue_Rotation("Rotation", self, 180) .setMappable(10); inputs[| 6] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.) @@ -38,8 +37,7 @@ function Node_MK_Fracture(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 12] = nodeValue("Skew", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.) .setDisplay(VALUE_DISPLAY.slider, { range : [ -1, 1, 0.01 ] }); - inputs[| 13] = nodeValue("Brick Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "X", "Y" ]); + inputs[| 13] = nodeValue_Enum_Button("Brick Axis", self, 0, [ "X", "Y" ]); input_display_list = [ new Inspector_Sprite(s_MKFX), 0, ["Fracture", false], 1, 2, 13, 11, 12, diff --git a/scripts/node_mk_gridballs/node_mk_gridballs.gml b/scripts/node_mk_gridballs/node_mk_gridballs.gml index cfd556e44..1df064fc7 100644 --- a/scripts/node_mk_gridballs/node_mk_gridballs.gml +++ b/scripts/node_mk_gridballs/node_mk_gridballs.gml @@ -1,16 +1,14 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 1] = nodeValue_Dimension(self); inputs[| 2] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 4, 4 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 3] = nodeValue("Light", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 3] = nodeValue_Rotation("Light", self, 0); inputs[| 4] = nodeValue("Scatter", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); @@ -20,16 +18,14 @@ function Node_MK_GridBalls(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 6] = nodeValue("Shading", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue("Scatter direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 7] = nodeValue_Rotation("Scatter direction", self, 0); inputs[| 8] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); inputs[| 9] = nodeValue("Stretch", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); - inputs[| 10] = nodeValue("Stretch direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 10] = nodeValue_Rotation("Stretch direction", self, 0); inputs[| 11] = nodeValue("Stretch shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); @@ -39,8 +35,7 @@ function Node_MK_GridBalls(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 13] = nodeValue("Twist", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); - inputs[| 14] = nodeValue("Twist axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 14] = nodeValue_Rotation("Twist axis", self, 0); inputs[| 15] = nodeValue("Twist shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); diff --git a/scripts/node_mk_gridflip/node_mk_gridflip.gml b/scripts/node_mk_gridflip/node_mk_gridflip.gml index d4ecd6d98..6955c3ce6 100644 --- a/scripts/node_mk_gridflip/node_mk_gridflip.gml +++ b/scripts/node_mk_gridflip/node_mk_gridflip.gml @@ -1,10 +1,9 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface front", self); - inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 1] = nodeValue_Dimension(self); inputs[| 2] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 4, 4 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -12,24 +11,20 @@ function Node_MK_GridFlip(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 4] = nodeValue("Surface back", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 4] = nodeValue_Surface("Surface back", self); - inputs[| 5] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 5] = nodeValue_Rotation("Rotation", self, 0); - inputs[| 6] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "X", "Y" ]); + inputs[| 6] = nodeValue_Enum_Button("Axis", self, 0, [ "X", "Y" ]); inputs[| 7] = nodeValue("Sweep", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); - inputs[| 8] = nodeValue("Sweep direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 8] = nodeValue_Rotation("Sweep direction", self, 0); inputs[| 9] = nodeValue("Sweep shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); - inputs[| 10] = nodeValue("Flip limit", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("None", s_node_mk_grid_flip, 0), + inputs[| 10] = nodeValue_Enum_Scroll("Flip limit", self, 0, [ new scrollItem("None", s_node_mk_grid_flip, 0), new scrollItem("90", s_node_mk_grid_flip, 1), new scrollItem("180", s_node_mk_grid_flip, 2), ]); diff --git a/scripts/node_mk_rain/node_mk_rain.gml b/scripts/node_mk_rain/node_mk_rain.gml index 7a009b26a..52cc2710c 100644 --- a/scripts/node_mk_rain/node_mk_rain.gml +++ b/scripts/node_mk_rain/node_mk_rain.gml @@ -2,10 +2,9 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 45) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 1] = nodeValue_Rotation("Direction", self, 45); inputs[| 2] = nodeValue("Density", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 5); @@ -26,15 +25,14 @@ function Node_MK_Rain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 9] = nodeValue("Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Rain", s_node_mk_rain_type, 0), + inputs[| 9] = nodeValue_Enum_Scroll("Shape", self, 0, [ new scrollItem("Rain", s_node_mk_rain_type, 0), new scrollItem("Snow", s_node_mk_rain_type, 1), new scrollItem("Texture", s_node_mk_rain_type, 2) ]); inputs[| 10] = nodeValue("Snow size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 3, 4 ]) .setDisplay(VALUE_DISPLAY.range); - inputs[| 11] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 11] = nodeValue_Surface("Texture", self); inputs[| 12] = nodeValue("Track extension", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.slider_range, { range: [ 0, 10, 0.01 ] }); diff --git a/scripts/node_mk_saber/node_mk_saber.gml b/scripts/node_mk_saber/node_mk_saber.gml index fa964ec78..65dd7349f 100644 --- a/scripts/node_mk_saber/node_mk_saber.gml +++ b/scripts/node_mk_saber/node_mk_saber.gml @@ -1,8 +1,7 @@ function Node_MK_Saber(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "MK Saber"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Point 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -25,7 +24,7 @@ function Node_MK_Saber(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 9] = nodeValue("Glow radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0); - inputs[| 10] = nodeValue("Trace texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 10] = nodeValue_Surface("Trace texture", self) .setVisible(true, true); input_display_list = [ new Inspector_Sprite(s_MKFX), 0, diff --git a/scripts/node_mk_tile/node_mk_tile.gml b/scripts/node_mk_tile/node_mk_tile.gml index 340ef6ab4..fcf2695e9 100644 --- a/scripts/node_mk_tile/node_mk_tile.gml +++ b/scripts/node_mk_tile/node_mk_tile.gml @@ -2,26 +2,23 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c name = "MK Tile"; dimension_index = -1; - inputs[| 0] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Texture", self); - inputs[| 1] = nodeValue("Background texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Background texture", self); - inputs[| 2] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "GMS Corner (18 sprites)", "GMS Corner + Side (55 sprites)", "Godot Blob (48 sprites)" ] ); + inputs[| 2] = nodeValue_Enum_Button("Type", self, 0, [ "GMS Corner (18 sprites)", "GMS Corner + Side (55 sprites)", "Godot Blob (48 sprites)" ] ); - inputs[| 3] = nodeValue("Output type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Sheet", "Array" ] ); + inputs[| 3] = nodeValue_Enum_Button("Output type", self, 0, [ "Sheet", "Array" ] ); inputs[| 4] = nodeValue("Crop", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 8, 8, 8, 8 ]) .setDisplay(VALUE_DISPLAY.padding); - inputs[| 5] = nodeValue("Edge type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Uniform", "Individual" ] ); + inputs[| 5] = nodeValue_Enum_Button("Edge type", self, 0, [ "Uniform", "Individual" ] ); - inputs[| 6] = nodeValue("Edge", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 7] = nodeValue("Edge bottom", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 8] = nodeValue("Edge left", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 9] = nodeValue("Edge right", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 6] = nodeValue_Surface("Edge", self); + inputs[| 7] = nodeValue_Surface("Edge bottom", self); + inputs[| 8] = nodeValue_Surface("Edge left", self); + inputs[| 9] = nodeValue_Surface("Edge right", self); inputs[| 10] = nodeValue("Edge shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.padding); @@ -29,11 +26,9 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 11] = nodeValue("Full edge", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.toggle, { data: [ "T", "B", "L", "R" ] }); - inputs[| 12] = nodeValue("Edge sprite", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Single", "Side + Center", "Side + Center + Side" ] ); + inputs[| 12] = nodeValue_Enum_Scroll("Edge sprite", self, 0, [ "Single", "Side + Center", "Side + Center + Side" ] ); - inputs[| 13] = nodeValue("Edge transform", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Flip", "Rotate" ] ); + inputs[| 13] = nodeValue_Enum_Button("Edge transform", self, 0, [ "Flip", "Rotate" ] ); inputs[| 14] = nodeValue("Sort array by bit", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true) diff --git a/scripts/node_module_test/node_module_test.gml b/scripts/node_module_test/node_module_test.gml index 287d609e4..c2ab3fc7f 100644 --- a/scripts/node_module_test/node_module_test.gml +++ b/scripts/node_module_test/node_module_test.gml @@ -1,5 +1,5 @@ function Node_Module_SubModule(parent) : NodeModule(parent) constructor { - inputs[| 0] = nodeValue("Module input 0", parent, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Module input 0", parent); inputs[| 1] = nodeValue("Module input 1", parent, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); } diff --git a/scripts/node_monitor_capture/node_monitor_capture.gml b/scripts/node_monitor_capture/node_monitor_capture.gml index 1a217244f..e7f40ac92 100644 --- a/scripts/node_monitor_capture/node_monitor_capture.gml +++ b/scripts/node_monitor_capture/node_monitor_capture.gml @@ -4,11 +4,9 @@ function Node_Monitor_Capture(_x, _y, _group = noone) : Node(_x, _y, _group) con monitors = display_measure_all(); - inputs[| 0] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Monitor", "Region" ]); + inputs[| 0] = nodeValue_Enum_Scroll("Mode", self, 0, [ "Monitor", "Region" ]); - inputs[| 1] = nodeValue("Monitor", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, array_create_ext(array_length(monitors), function(ind) { return monitors[ind][9]; })); + inputs[| 1] = nodeValue_Enum_Scroll("Monitor", self, 0, array_create_ext(array_length(monitors), function(ind) { return monitors[ind][9]; })); inputs[| 2] = nodeValue("Region", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0, 0, display_get_width(), display_get_height() ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_morph_surface/node_morph_surface.gml b/scripts/node_morph_surface/node_morph_surface.gml index 76df782d9..406128688 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, noone); + inputs[| 0] = nodeValue_Surface("Surface from", self); - inputs[| 1] = nodeValue("Surface to", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Surface to", self); inputs[| 2] = nodeValue("Morph amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_move_point/node_move_point.gml b/scripts/node_move_point/node_move_point.gml index 3380184f6..bdfd28398 100644 --- a/scripts/node_move_point/node_move_point.gml +++ b/scripts/node_move_point/node_move_point.gml @@ -8,14 +8,12 @@ function Node_Move_Point(_x, _y, _group = noone) : Node_Processor(_x, _y, _group .setDisplay(VALUE_DISPLAY.vector) .setVisible(true, true); - inputs[| 1] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "XY Shift", "Direction + Distance" ]); + inputs[| 1] = nodeValue_Enum_Scroll("Mode", self, 0, [ "XY Shift", "Direction + Distance" ]); inputs[| 2] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 3] = nodeValue("Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 3] = nodeValue_Rotation("Direction", self, 0); inputs[| 4] = nodeValue("Distance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4 ); diff --git a/scripts/node_noise/node_noise.gml b/scripts/node_noise/node_noise.gml index e8a0b6a46..3aac4d618 100644 --- a/scripts/node_noise/node_noise.gml +++ b/scripts/node_noise/node_noise.gml @@ -1,14 +1,12 @@ function Node_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Noise"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 2] = nodeValue("Color mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "RGB", "HSV" ]); + inputs[| 2] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); inputs[| 3] = nodeValue("Color R range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) .setDisplay(VALUE_DISPLAY.slider_range); diff --git a/scripts/node_noise_aniso/node_noise_aniso.gml b/scripts/node_noise_aniso/node_noise_aniso.gml index 280b9fd50..205c1e3ee 100644 --- a/scripts/node_noise_aniso/node_noise_aniso.gml +++ b/scripts/node_noise_aniso/node_noise_aniso.gml @@ -1,8 +1,7 @@ function Node_Noise_Aniso(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Anisotropic Noise"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("X Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 2) .setMappable(6); @@ -14,8 +13,7 @@ function Node_Noise_Aniso(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou .setDisplay(VALUE_DISPLAY.vector) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 4] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 4] = nodeValue_Rotation("Rotation", self, 0) .setMappable(8); inputs[| 5] = nodeValue("Y Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 16) @@ -31,8 +29,7 @@ function Node_Noise_Aniso(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 9] = nodeValue("Render mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Blend", "Waterfall" ] ) + inputs[| 9] = nodeValue_Enum_Scroll("Render mode", self, 0, [ "Blend", "Waterfall" ] ) input_display_list = [ ["Output", false], 0, diff --git a/scripts/node_noise_bubble/node_noise_bubble.gml b/scripts/node_noise_bubble/node_noise_bubble.gml index d96271661..029296e52 100644 --- a/scripts/node_noise_bubble/node_noise_bubble.gml +++ b/scripts/node_noise_bubble/node_noise_bubble.gml @@ -18,16 +18,14 @@ function Node_Noise_Bubble(_x, _y, _group = noone) : Node_Shader_Generator(_x, _ .setDisplay(VALUE_DISPLAY.slider); addShaderProp(SHADER_UNIFORM.float, "thickness"); - inputs[| 5] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Line", "Fill" ] ); + inputs[| 5] = nodeValue_Enum_Button("Mode", self, 0 , [ "Line", "Fill" ] ); addShaderProp(SHADER_UNIFORM.integer, "mode"); inputs[| 6] = nodeValue("Opacity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0., 1. ] ) .setDisplay(VALUE_DISPLAY.slider_range); addShaderProp(SHADER_UNIFORM.float, "alpha"); - inputs[| 7] = nodeValue("Blending", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Max", "Add" ] ); + inputs[| 7] = nodeValue_Enum_Scroll("Blending", self, 0 , [ "Max", "Add" ] ); addShaderProp(SHADER_UNIFORM.integer, "render"); input_display_list = [ 2, diff --git a/scripts/node_noise_cristal/node_noise_cristal.gml b/scripts/node_noise_cristal/node_noise_cristal.gml index f652d8769..ea3df0734 100644 --- a/scripts/node_noise_cristal/node_noise_cristal.gml +++ b/scripts/node_noise_cristal/node_noise_cristal.gml @@ -24,8 +24,7 @@ function Node_Noise_Cristal(_x, _y, _group = noone) : Node_Shader_Generator(_x, .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); addShaderProp(SHADER_UNIFORM.float, "gamma"); - inputs[| 7] = nodeValue("Phase", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 30 ) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 7] = nodeValue_Rotation("Phase", self, 0); addShaderProp(SHADER_UNIFORM.float, "phase"); input_display_list = [ 3, diff --git a/scripts/node_noise_fbm/node_noise_fbm.gml b/scripts/node_noise_fbm/node_noise_fbm.gml index d115b9f06..80d8a3dde 100644 --- a/scripts/node_noise_fbm/node_noise_fbm.gml +++ b/scripts/node_noise_fbm/node_noise_fbm.gml @@ -1,8 +1,7 @@ function Node_Noise_FBM(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "FBM Noise"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); @@ -15,8 +14,7 @@ function Node_Noise_FBM(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 4] = nodeValue("Iteration", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4); - inputs[| 5] = nodeValue("Color mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "RGB", "HSV" ]); + inputs[| 5] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); inputs[| 6] = nodeValue("Color R range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) .setDisplay(VALUE_DISPLAY.slider_range); diff --git a/scripts/node_noise_hex/node_noise_hex.gml b/scripts/node_noise_hex/node_noise_hex.gml index d1661535e..6fb8fed36 100644 --- a/scripts/node_noise_hex/node_noise_hex.gml +++ b/scripts/node_noise_hex/node_noise_hex.gml @@ -11,8 +11,7 @@ function Node_Noise_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) uniform_sam = shader_get_uniform(shader, "useSampler"); uniform_samTyp = shader_get_uniform(shader, "sampleMode"); - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); @@ -23,10 +22,9 @@ 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, noone); + inputs[| 4] = nodeValue_Surface("Texture sample", self); - inputs[| 5] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]); + inputs[| 5] = nodeValue_Enum_Scroll("Oversample mode", self, 2, [ "Empty", "Clamp", "Repeat" ]); input_display_list = [ ["Output", false], 0, diff --git a/scripts/node_noise_simplex/node_noise_simplex.gml b/scripts/node_noise_simplex/node_noise_simplex.gml index 9165cf36d..5c1f59397 100644 --- a/scripts/node_noise_simplex/node_noise_simplex.gml +++ b/scripts/node_noise_simplex/node_noise_simplex.gml @@ -1,8 +1,7 @@ function Node_Noise_Simplex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Simplex Noise"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ] ) .setDisplay(VALUE_DISPLAY.vector); @@ -15,8 +14,7 @@ function Node_Noise_Simplex(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }) .setMappable(9); - inputs[| 4] = nodeValue("Color mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "RGB", "HSV" ]); + inputs[| 4] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); inputs[| 5] = nodeValue("Color R range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) .setDisplay(VALUE_DISPLAY.slider_range); @@ -35,8 +33,7 @@ function Node_Noise_Simplex(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr ////////////////////////////////////////////////////////////////////////////////// - inputs[| 10] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 10] = nodeValue_Rotation("Rotation", self, 0); input_display_list = [ ["Output", false], 0, diff --git a/scripts/node_noise_strand/node_noise_strand.gml b/scripts/node_noise_strand/node_noise_strand.gml index f9f142771..3b49cce9d 100644 --- a/scripts/node_noise_strand/node_noise_strand.gml +++ b/scripts/node_noise_strand/node_noise_strand.gml @@ -33,12 +33,10 @@ function Node_Noise_Strand(_x, _y, _group = noone) : Node_Shader_Generator(_x, _ inputs[| 8] = nodeValue("Curve shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ); addShaderProp(SHADER_UNIFORM.float, "curveShift"); - inputs[| 9] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "x", "y" ] ); + inputs[| 9] = nodeValue_Enum_Button("Axis", self, 0 , [ "x", "y" ] ); addShaderProp(SHADER_UNIFORM.integer, "axis"); - inputs[| 10] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Line", "Area" ] ); + inputs[| 10] = nodeValue_Enum_Button("Mode", self, 0 , [ "Line", "Area" ] ); addShaderProp(SHADER_UNIFORM.integer, "mode"); inputs[| 11] = nodeValue("Opacity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0., 1. ] ) diff --git a/scripts/node_noise_tri/node_noise_tri.gml b/scripts/node_noise_tri/node_noise_tri.gml index 23ad53c45..37138150c 100644 --- a/scripts/node_noise_tri/node_noise_tri.gml +++ b/scripts/node_noise_tri/node_noise_tri.gml @@ -11,8 +11,7 @@ function Node_Noise_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) uniform_sam = shader_get_uniform(shader, "useSampler"); uniform_samTyp = shader_get_uniform(shader, "sampleMode"); - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); @@ -23,10 +22,9 @@ 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, noone); + inputs[| 4] = nodeValue_Surface("Texture sample", self); - inputs[| 5] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]); + inputs[| 5] = nodeValue_Enum_Scroll("Oversample mode", self, 2, [ "Empty", "Clamp", "Repeat" ]); input_display_list = [ ["Output", false], 0, diff --git a/scripts/node_normal/node_normal.gml b/scripts/node_normal/node_normal.gml index 9eea8819f..346e601fe 100644 --- a/scripts/node_normal/node_normal.gml +++ b/scripts/node_normal/node_normal.gml @@ -1,7 +1,7 @@ function Node_Normal(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Normal"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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 1c76481d9..c74e535c4 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Normal map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Normal map", self); inputs[| 2] = nodeValue("Normal intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1); @@ -19,8 +19,7 @@ function Node_Normal_Light(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 7] = nodeValue("Light color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); - inputs[| 8] = nodeValue("Light type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, ["Point", "Sun"]); + inputs[| 8] = nodeValue_Enum_Button("Light type", self, 0, ["Point", "Sun"]); inputs[| 9] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 9; diff --git a/scripts/node_normalize/node_normalize.gml b/scripts/node_normalize/node_normalize.gml index 89b29f8dc..3caa07204 100644 --- a/scripts/node_normalize/node_normalize.gml +++ b/scripts/node_normalize/node_normalize.gml @@ -1,10 +1,9 @@ function Node_Normalize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Normalize"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "BW", "RGB" ]); + inputs[| 1] = nodeValue_Enum_Button("Mode", self, 0, [ "BW", "RGB" ]); input_display_list = [ 0, 1 ]; diff --git a/scripts/node_number/node_number.gml b/scripts/node_number/node_number.gml index 76c13a46e..624aaa2e6 100644 --- a/scripts/node_number/node_number.gml +++ b/scripts/node_number/node_number.gml @@ -19,22 +19,20 @@ function Node_Number(_x, _y, _group = noone) : Node(_x, _y, _group) constructor rotator_p = 0; rotator_m = 0; - inputs[| 0] = nodeValue_Float("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) + inputs[| 0] = nodeValue_Float("Value", self, 0) .setVisible(true, true); - inputs[| 1] = nodeValue("Integer", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); + inputs[| 1] = nodeValue_Bool("Integer", self, false); - inputs[| 2] = nodeValue("Display", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Number", "Slider", "Rotator" ], update_hover: false }); + inputs[| 2] = nodeValue_Enum_Scroll("Display", self, 0, { data: [ "Number", "Slider", "Rotator" ], update_hover: false }); - inputs[| 3] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) - .setDisplay(VALUE_DISPLAY.range); + inputs[| 3] = nodeValue_Range("Range", self, [ 0, 1 ]); - inputs[| 4] = nodeValue("Step", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.01) + inputs[| 4] = nodeValue_Float("Step", self, 0.01); - inputs[| 5] = nodeValue("Clamp to range", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); + inputs[| 5] = nodeValue_Bool("Clamp to range", self, true); - outputs[| 0] = nodeValue_Output("Number", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0); + outputs[| 0] = nodeValue_Output("Number", self, VALUE_TYPE.float, 0); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var __ax = getInputData(0); diff --git a/scripts/node_offset/node_offset.gml b/scripts/node_offset/node_offset.gml index e3cd7b566..a991a2ac9 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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 e71f0fd60..6a80c2344 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [-1, 1]) .setDisplay(VALUE_DISPLAY.slider_range, { range: [ -16, 16, 0.1 ] }); diff --git a/scripts/node_outline/node_outline.gml b/scripts/node_outline/node_outline.gml index e52a36fac..23e7a5faa 100644 --- a/scripts/node_outline/node_outline.gml +++ b/scripts/node_outline/node_outline.gml @@ -12,7 +12,7 @@ function Node_Outline(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c triggerRender(); }); - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY._default, { front_button : filter_button }) @@ -27,18 +27,17 @@ function Node_Outline(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c .setDisplay(VALUE_DISPLAY.slider) .setMappable(16); - inputs[| 5] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.enum_button, ["Inside", "Outside"]); + inputs[| 5] = nodeValue_Enum_Button("Position", self, 1, ["Inside", "Outside"]); inputs[| 6] = nodeValue("Anti aliasing", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, 0); - 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[| 7] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); 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, noone); + inputs[| 9] = nodeValue_Surface("Mask", self); inputs[| 10] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_override_channel/node_override_channel.gml b/scripts/node_override_channel/node_override_channel.gml index 5fd8c8290..5d49f0d26 100644 --- a/scripts/node_override_channel/node_override_channel.gml +++ b/scripts/node_override_channel/node_override_channel.gml @@ -1,15 +1,14 @@ function Node_Override_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Override Channel"; - inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface", self); - inputs[| 1] = nodeValue("Red", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 2] = nodeValue("Green", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 3] = nodeValue("Blue", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 4] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Red", self); + inputs[| 2] = nodeValue_Surface("Green", self); + inputs[| 3] = nodeValue_Surface("Blue", self); + inputs[| 4] = nodeValue_Surface("Alpha", self); - inputs[| 5] = nodeValue("Sampling type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, ["Brightness", "Channel value"]); + inputs[| 5] = nodeValue_Enum_Scroll("Sampling type", self, 0, ["Brightness", "Channel value"]); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_pack_sprites/node_pack_sprites.gml b/scripts/node_pack_sprites/node_pack_sprites.gml index 67b6e3070..e07c8602e 100644 --- a/scripts/node_pack_sprites/node_pack_sprites.gml +++ b/scripts/node_pack_sprites/node_pack_sprites.gml @@ -1,10 +1,9 @@ function Node_Pack_Sprites(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Pack Sprites"; - inputs[| 0] = nodeValue("Sprites", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Sprites", self); - 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 }); + inputs[| 1] = nodeValue_Enum_Scroll("Algorithm", self, 0, { data: [ "Skyline", "Shelf", "Top left", "Best fit" ], update_hover: false }); inputs[| 2] = nodeValue("Max width", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 128); diff --git a/scripts/node_padding/node_padding.gml b/scripts/node_padding/node_padding.gml index 55db92f32..ecc73374c 100644 --- a/scripts/node_padding/node_padding.gml +++ b/scripts/node_padding/node_padding.gml @@ -2,31 +2,27 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Padding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0, 0, 0]) .setDisplay(VALUE_DISPLAY.padding) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 2] = nodeValue("Fill method", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Solid" ]); + inputs[| 2] = nodeValue_Enum_Scroll("Fill method", self, 0, [ "Empty", "Solid" ]); inputs[| 3] = nodeValue("Fill color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); inputs[| 4] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 4; - inputs[| 5] = nodeValue("Pad mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Pad out", "Pad to size" ]); + inputs[| 5] = nodeValue_Enum_Button("Pad mode", self, 0, [ "Pad out", "Pad to size" ]); inputs[| 6] = nodeValue("Target dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) .setDisplay(VALUE_DISPLAY.vector) - inputs[| 7] = nodeValue("Horizontal alignment", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ THEME.inspector_surface_halign, THEME.inspector_surface_halign, THEME.inspector_surface_halign]); + inputs[| 7] = nodeValue_Enum_Button("Horizontal alignment", self, 0 , [ THEME.inspector_surface_halign, THEME.inspector_surface_halign, THEME.inspector_surface_halign]); - inputs[| 8] = nodeValue("Vertical alignment", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ THEME.inspector_surface_valign, THEME.inspector_surface_valign, THEME.inspector_surface_valign ]); + inputs[| 8] = nodeValue_Enum_Button("Vertical alignment", self, 0 , [ THEME.inspector_surface_valign, THEME.inspector_surface_valign, THEME.inspector_surface_valign ]); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_palette_extract/node_palette_extract.gml b/scripts/node_palette_extract/node_palette_extract.gml index c0db61fd8..c4d79440c 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"; setDimension(96, 48);; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Max colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 5, "Amount of color in a palette.") .rejectArray(); @@ -11,12 +11,10 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _ .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }) .rejectArray(); - inputs[| 3] = nodeValue("Algorithm", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "K-mean", "Frequency", "All colors" ], update_hover: false }) + inputs[| 3] = nodeValue_Enum_Scroll("Algorithm", self, 0, { data: [ "K-mean", "Frequency", "All colors" ], update_hover: false }) .rejectArray(); - inputs[| 4] = nodeValue("Color Space", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "RGB", "HSV" ], update_hover: false }) + inputs[| 4] = nodeValue_Enum_Scroll("Color Space", self, 1, { data: [ "RGB", "HSV" ], update_hover: false }) .rejectArray(); outputs[| 0] = nodeValue("Palette", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, [ ]) diff --git a/scripts/node_palette_shift/node_palette_shift.gml b/scripts/node_palette_shift/node_palette_shift.gml index d5110a2f7..275145dc9 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Palette", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, array_clone(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, 0.1] }); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 3] = nodeValue_Surface("Mask", self); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_palette_sort/node_palette_sort.gml b/scripts/node_palette_sort/node_palette_sort.gml index ddb01233f..ca0fd697a 100644 --- a/scripts/node_palette_sort/node_palette_sort.gml +++ b/scripts/node_palette_sort/node_palette_sort.gml @@ -6,8 +6,7 @@ function Node_Palette_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro .setDisplay(VALUE_DISPLAY.palette) .setVisible(true, true); - inputs[| 1] = nodeValue("Order", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Brightness", -1, "Hue (HSV)", "Saturation (SHV)", "Value (VHS)", -1, "Red (RGB)", "Green (GBR)", "Blue (BRG)", -1, "Custom" ]) + inputs[| 1] = nodeValue_Enum_Button("Order", self, 0, [ "Brightness", -1, "Hue (HSV)", "Saturation (SHV)", "Value (VHS)", -1, "Red (RGB)", "Green (GBR)", "Blue (BRG)", -1, "Custom" ]) .rejectArray(); inputs[| 2] = nodeValue("Reverse", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); diff --git a/scripts/node_particle/node_particle.gml b/scripts/node_particle/node_particle.gml index 783dcf387..e95786efc 100644 --- a/scripts/node_particle/node_particle.gml +++ b/scripts/node_particle/node_particle.gml @@ -14,13 +14,11 @@ function Node_Particle(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y, _ inputs[| input_len + 1] = nodeValue("Round position", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true, "Round position to the closest integer value to avoid jittering."); - inputs[| input_len + 2] = nodeValue("Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Normal", "Alpha", "Additive" ]); + inputs[| input_len + 2] = nodeValue_Enum_Scroll("Blend mode", self, 0 , [ "Normal", "Alpha", "Additive" ]); - inputs[| input_len + 3] = nodeValue("Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| input_len + 3] = nodeValue_Surface("Background", self); - inputs[| input_len + 4] = nodeValue("Render Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, PARTICLE_RENDER_TYPE.surface ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Surface", "Line" ]); + inputs[| input_len + 4] = nodeValue_Enum_Button("Render Type", self, PARTICLE_RENDER_TYPE.surface , [ "Surface", "Line" ]); inputs[| input_len + 5] = nodeValue("Line life", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4 ); diff --git a/scripts/node_path/node_path.gml b/scripts/node_path/node_path.gml index ad5ffa2e6..7e04c4ae7 100644 --- a/scripts/node_path/node_path.gml +++ b/scripts/node_path/node_path.gml @@ -7,6 +7,7 @@ enum _ANCHOR { c2y, ind, + amount } function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { @@ -20,8 +21,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { inputs[| 1] = nodeValue("Loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) .rejectArray(); - inputs[| 2] = nodeValue("Progress mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, ["Entire line", "Segment"]) + inputs[| 2] = nodeValue_Enum_Scroll("Progress mode", self, 0, ["Entire line", "Segment"]) .rejectArray(); inputs[| 3] = nodeValue("Round anchor", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) diff --git a/scripts/node_path_3d/node_path_3d.gml b/scripts/node_path_3d/node_path_3d.gml index 149330cc2..77d72fb1a 100644 --- a/scripts/node_path_3d/node_path_3d.gml +++ b/scripts/node_path_3d/node_path_3d.gml @@ -24,8 +24,7 @@ function Node_Path_3D(_x, _y, _group = noone) : Node(_x, _y, _group) constructor inputs[| 1] = nodeValue("Loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) .rejectArray(); - inputs[| 2] = nodeValue("Progress mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, ["Entire line", "Segment"]) + inputs[| 2] = nodeValue_Enum_Scroll("Progress mode", self, 0, ["Entire line", "Segment"]) .rejectArray(); inputs[| 3] = nodeValue("Round anchor", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) 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 ec33c98e9..9b497deff 100644 --- a/scripts/node_path_from_mask/node_path_from_mask.gml +++ b/scripts/node_path_from_mask/node_path_from_mask.gml @@ -1,7 +1,7 @@ function Node_Path_From_Mask(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Path from Mask"; - inputs[| 0] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Mask", self); inputs[| 1] = nodeValue("Smooth angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 15); 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 27dd01f07..3daa8ea1a 100644 --- a/scripts/node_path_l_system/node_path_l_system.gml +++ b/scripts/node_path_l_system/node_path_l_system.gml @@ -16,8 +16,7 @@ function Node_Path_L_System(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 0] = nodeValue("Length", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 8); - inputs[| 1] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 45) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 1] = nodeValue_Rotation("Angle", self, 45); inputs[| 2] = nodeValue("Starting position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -28,8 +27,7 @@ function Node_Path_L_System(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 5] = nodeValue("End replacement", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "", "Replace symbol of the last generated rule, for example a=F to replace all a with F. Use comma to separate different replacements."); - inputs[| 6] = nodeValue("Starting angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 90) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 6] = nodeValue_Rotation("Starting Angle", self, 90); inputs[| 7] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 7].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); diff --git a/scripts/node_path_map/node_path_map.gml b/scripts/node_path_map/node_path_map.gml index 62c09ac06..347cd641c 100644 --- a/scripts/node_path_map/node_path_map.gml +++ b/scripts/node_path_map/node_path_map.gml @@ -5,10 +5,9 @@ function Node_Path_Map(_x, _y, _group = noone) : Node(_x, _y, _group) constructo .setVisible(true, true) .rejectArray(); - inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 1] = nodeValue_Dimension(self); - inputs[| 2] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 2] = nodeValue_Surface("Texture", self); inputs[| 3] = nodeValue("Subdivision", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 16) .setValidator(VV_min(2)) diff --git a/scripts/node_path_plot/node_path_plot.gml b/scripts/node_path_plot/node_path_plot.gml index 1e675bc04..6838f11a1 100644 --- a/scripts/node_path_plot/node_path_plot.gml +++ b/scripts/node_path_plot/node_path_plot.gml @@ -6,14 +6,12 @@ function Node_Path_Plot(_x, _y, _group = noone) : Node(_x, _y, _group) construct inputs[| 0] = nodeValue("Output scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 8, 8 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 1] = nodeValue("Coordinate", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Cartesian", s_node_axis_type, 0), + inputs[| 1] = nodeValue_Enum_Scroll("Coordinate", self, 0, [ new scrollItem("Cartesian", s_node_axis_type, 0), new scrollItem("Polar", s_node_axis_type, 1), ]); eq_type_car = [ "x function", "y function", "parametric" ]; eq_type_pol = [ "r function", "O function", "parametric" ]; - inputs[| 2] = nodeValue("Equation type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, eq_type_car); + inputs[| 2] = nodeValue_Enum_Scroll("Equation type", self, 0, eq_type_car); inputs[| 3] = nodeValue("0 function", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); inputs[| 4] = nodeValue("1 function", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); diff --git a/scripts/node_path_profile/node_path_profile.gml b/scripts/node_path_profile/node_path_profile.gml index 56a6dc7a3..6cc5026a6 100644 --- a/scripts/node_path_profile/node_path_profile.gml +++ b/scripts/node_path_profile/node_path_profile.gml @@ -1,16 +1,14 @@ function Node_Path_Profile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Draw Path Profile"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone ) .setVisible(true, true); inputs[| 2] = nodeValue("Resolution", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 64 ); - inputs[| 3] = nodeValue("Side", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "L", "R", "T", "D" ]); + inputs[| 3] = nodeValue_Enum_Button("Side", self, 0 , [ "L", "R", "T", "D" ]); inputs[| 4] = nodeValue("Mirror", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false ); diff --git a/scripts/node_path_sample/node_path_sample.gml b/scripts/node_path_sample/node_path_sample.gml index 20a305ddf..cf66d0741 100644 --- a/scripts/node_path_sample/node_path_sample.gml +++ b/scripts/node_path_sample/node_path_sample.gml @@ -8,8 +8,7 @@ function Node_Path_Sample(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 1] = nodeValue("Ratio", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); - inputs[| 2] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Loop", "Ping pong" ]); + inputs[| 2] = nodeValue_Enum_Scroll("Type", self, 0, [ "Loop", "Ping pong" ]); outputs[| 0] = nodeValue("Position", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_path_scatter/node_path_scatter.gml b/scripts/node_path_scatter/node_path_scatter.gml index c689cae30..59448e4c0 100644 --- a/scripts/node_path_scatter/node_path_scatter.gml +++ b/scripts/node_path_scatter/node_path_scatter.gml @@ -24,8 +24,7 @@ function Node_Path_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 7] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 45, 135, 0, 0 ] ) .setDisplay(VALUE_DISPLAY.rotation_random); - inputs[| 8] = nodeValue("Distribution", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Uniform", "Random" ]); + inputs[| 8] = nodeValue_Enum_Scroll("Distribution", self, 0 , [ "Uniform", "Random" ]); inputs[| 9] = nodeValue("Trim over Length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); @@ -34,8 +33,7 @@ function Node_Path_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 11] = nodeValue("Flip if Negative", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false ); - inputs[| 12] = nodeValue("Origin", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Individual", "First", "Zero" ]); + inputs[| 12] = nodeValue_Enum_Scroll("Origin", self, 0 , [ "Individual", "First", "Zero" ]); outputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.pathnode, self); diff --git a/scripts/node_path_transform/node_path_transform.gml b/scripts/node_path_transform/node_path_transform.gml index ff4054391..520ed4224 100644 --- a/scripts/node_path_transform/node_path_transform.gml +++ b/scripts/node_path_transform/node_path_transform.gml @@ -8,8 +8,7 @@ function Node_Path_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) cons inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 2] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 2] = nodeValue_Rotation("Rotation", self, 0); inputs[| 3] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_pb_box_contract/node_pb_box_contract.gml b/scripts/node_pb_box_contract/node_pb_box_contract.gml index fead6615a..a06826a6f 100644 --- a/scripts/node_pb_box_contract/node_pb_box_contract.gml +++ b/scripts/node_pb_box_contract/node_pb_box_contract.gml @@ -5,16 +5,14 @@ function Node_PB_Box_Contract(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _gro inputs[| 1] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) .setVisible(true, true); - inputs[| 2] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Ratio", "Fix" ]); + inputs[| 2] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Ratio", "Fix" ]); inputs[| 3] = nodeValue("Ratio", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); inputs[| 4] = nodeValue("Fix Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 8 ) - inputs[| 5] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "X", "Y" ]); + inputs[| 5] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ]); outputs[| 0] = nodeValue("pBox Center", self, JUNCTION_CONNECT.output, VALUE_TYPE.pbBox, noone ); diff --git a/scripts/node_pb_box_divide/node_pb_box_divide.gml b/scripts/node_pb_box_divide/node_pb_box_divide.gml index 7e01d90ea..e8ca1d6ec 100644 --- a/scripts/node_pb_box_divide/node_pb_box_divide.gml +++ b/scripts/node_pb_box_divide/node_pb_box_divide.gml @@ -9,13 +9,11 @@ function Node_PB_Box_Divide(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group inputs[| 3] = nodeValue("Spacing", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1 ); - inputs[| 4] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "X", "Y" ]); + inputs[| 4] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ]); inputs[| 5] = nodeValue("Mirror", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, 0 ) - inputs[| 6] = nodeValue("Spacing", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Space Between", "Space Around", "Begin", "End" ]); + inputs[| 6] = nodeValue_Enum_Button("Spacing", self, 0 , [ "Space Between", "Space Around", "Begin", "End" ]); outputs[| 0] = nodeValue("pBox Content", self, JUNCTION_CONNECT.output, VALUE_TYPE.pbBox, [ noone ] ); diff --git a/scripts/node_pb_box_inset/node_pb_box_inset.gml b/scripts/node_pb_box_inset/node_pb_box_inset.gml index 00c5f0b8f..d436ee1f6 100644 --- a/scripts/node_pb_box_inset/node_pb_box_inset.gml +++ b/scripts/node_pb_box_inset/node_pb_box_inset.gml @@ -8,8 +8,7 @@ function Node_PB_Box_Inset(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group) inputs[| 2] = nodeValue("Inset", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 2, 2, 2, 2 ] ) .setDisplay(VALUE_DISPLAY.padding); - inputs[| 3] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Padding", "Ratio" ]); + inputs[| 3] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Padding", "Ratio" ]); inputs[| 4] = nodeValue("Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_pb_box_split/node_pb_box_split.gml b/scripts/node_pb_box_split/node_pb_box_split.gml index 1116f0d71..00f27733d 100644 --- a/scripts/node_pb_box_split/node_pb_box_split.gml +++ b/scripts/node_pb_box_split/node_pb_box_split.gml @@ -5,16 +5,14 @@ function Node_PB_Box_Split(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group) inputs[| 1] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) .setVisible(true, true); - inputs[| 2] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Ratio", "Fix Left", "Fix Right" ]); + inputs[| 2] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Ratio", "Fix Left", "Fix Right" ]); inputs[| 3] = nodeValue("Ratio", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); inputs[| 4] = nodeValue("Fix width", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 8 ) - inputs[| 5] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "X", "Y" ]); + inputs[| 5] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ]); inputs[| 6] = nodeValue("Mirror", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, 0 ) diff --git a/scripts/node_pb_draw_angle/node_pb_draw_angle.gml b/scripts/node_pb_draw_angle/node_pb_draw_angle.gml index fb5cb0b48..1ef9a68e5 100644 --- a/scripts/node_pb_draw_angle/node_pb_draw_angle.gml +++ b/scripts/node_pb_draw_angle/node_pb_draw_angle.gml @@ -1,8 +1,7 @@ function Node_PB_Draw_Angle(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group) constructor { name = "Angle"; - inputs[| 3] = nodeValue("Side", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, array_create(4, THEME.obj_angle) ); + inputs[| 3] = nodeValue_Enum_Button("Side", self, 0 , array_create(4, THEME.obj_angle) ); inputs[| 4] = nodeValue("Round", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false ) diff --git a/scripts/node_pb_draw_line/node_pb_draw_line.gml b/scripts/node_pb_draw_line/node_pb_draw_line.gml index 42ce90de4..2715eb0fc 100644 --- a/scripts/node_pb_draw_line/node_pb_draw_line.gml +++ b/scripts/node_pb_draw_line/node_pb_draw_line.gml @@ -1,8 +1,7 @@ function Node_PB_Draw_Line(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group) constructor { name = "Line"; - inputs[| 3] = nodeValue("Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ THEME.obj_draw_line, THEME.obj_draw_line, THEME.obj_draw_line, THEME.obj_draw_line ] ); + inputs[| 3] = nodeValue_Enum_Button("Direction", self, 0 , [ THEME.obj_draw_line, THEME.obj_draw_line, THEME.obj_draw_line, THEME.obj_draw_line ] ); inputs[| 4] = nodeValue("Thickness", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2 ) diff --git a/scripts/node_pb_draw_round_rectangle/node_pb_draw_round_rectangle.gml b/scripts/node_pb_draw_round_rectangle/node_pb_draw_round_rectangle.gml index c48b614f7..f2d17eda0 100644 --- a/scripts/node_pb_draw_round_rectangle/node_pb_draw_round_rectangle.gml +++ b/scripts/node_pb_draw_round_rectangle/node_pb_draw_round_rectangle.gml @@ -1,8 +1,7 @@ function Node_PB_Draw_Round_Rectangle(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group) constructor { name = "Round Rectangle"; - inputs[| 3] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Uniform", "Per Corner" ]); + inputs[| 3] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Uniform", "Per Corner" ]); inputs[| 4] = nodeValue("Corner Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1 ); diff --git a/scripts/node_pb_draw_semi_ellipse/node_pb_draw_semi_ellipse.gml b/scripts/node_pb_draw_semi_ellipse/node_pb_draw_semi_ellipse.gml index e0fc637c0..1e2337cca 100644 --- a/scripts/node_pb_draw_semi_ellipse/node_pb_draw_semi_ellipse.gml +++ b/scripts/node_pb_draw_semi_ellipse/node_pb_draw_semi_ellipse.gml @@ -1,8 +1,7 @@ function Node_PB_Draw_Semi_Ellipse(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group) constructor { name = "Semi Ellipse"; - inputs[| 3] = nodeValue("Side", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, array_create(4, THEME.obj_hemicircle) ); + inputs[| 3] = nodeValue_Enum_Button("Side", self, 0 , array_create(4, THEME.obj_hemicircle) ); input_display_list = [ ["Draw", false], 0, 1, 2, diff --git a/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml b/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml index 019767ae1..808d61c7c 100644 --- a/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml +++ b/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml @@ -1,12 +1,10 @@ function Node_PB_Draw_Trapezoid(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group) constructor { name = "Trapezoid"; - inputs[| 3] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Horizontal", s_node_alignment, 0), + inputs[| 3] = nodeValue_Enum_Scroll("Axis", self, 0 , [ new scrollItem("Horizontal", s_node_alignment, 0), new scrollItem("Vertical", s_node_alignment, 1), ]); - inputs[| 4] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Symmetric", "Independent" ]); + inputs[| 4] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Symmetric", "Independent" ]); inputs[| 5] = nodeValue("Bevel", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_pb_fx_brick/node_pb_fx_brick.gml b/scripts/node_pb_fx_brick/node_pb_fx_brick.gml index aae5f7fbd..1e2f1ab5f 100644 --- a/scripts/node_pb_fx_brick/node_pb_fx_brick.gml +++ b/scripts/node_pb_fx_brick/node_pb_fx_brick.gml @@ -4,8 +4,7 @@ function Node_PB_Fx_Brick(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) c inputs[| 1] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 4, 1 ] ) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 2] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "X", "Y" ] ); + inputs[| 2] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ] ); inputs[| 3] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0); diff --git a/scripts/node_pb_fx_intersect/node_pb_fx_intersect.gml b/scripts/node_pb_fx_intersect/node_pb_fx_intersect.gml index 3162d7f53..041af3e4a 100644 --- a/scripts/node_pb_fx_intersect/node_pb_fx_intersect.gml +++ b/scripts/node_pb_fx_intersect/node_pb_fx_intersect.gml @@ -1,7 +1,7 @@ function Node_PB_Fx_Intersect(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { name = "Subtract"; - inputs[| 1] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ) + inputs[| 1] = nodeValue_Surface("Surface", self) .setVisible(true, true); input_display_list = [ 0, diff --git a/scripts/node_pb_fx_outline/node_pb_fx_outline.gml b/scripts/node_pb_fx_outline/node_pb_fx_outline.gml index a88a50394..21e39e4b8 100644 --- a/scripts/node_pb_fx_outline/node_pb_fx_outline.gml +++ b/scripts/node_pb_fx_outline/node_pb_fx_outline.gml @@ -5,8 +5,7 @@ function Node_PB_Fx_Outline(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) inputs[| 2] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white ); - inputs[| 3] = nodeValue("Side", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Inside", "Outside" ]); + inputs[| 3] = nodeValue_Enum_Button("Side", self, 0, [ "Inside", "Outside" ]); input_display_list = [ 0, ["Effect", false], 3, 1, 2, diff --git a/scripts/node_pb_fx_stack/node_pb_fx_stack.gml b/scripts/node_pb_fx_stack/node_pb_fx_stack.gml index 8e56897a6..f5d0d8909 100644 --- a/scripts/node_pb_fx_stack/node_pb_fx_stack.gml +++ b/scripts/node_pb_fx_stack/node_pb_fx_stack.gml @@ -3,8 +3,7 @@ function Node_PB_Fx_Stack(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) c inputs[| 1] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4 ); - inputs[| 2] = nodeValue("Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, array_create(4, THEME.obj_direction) ); + inputs[| 2] = nodeValue_Enum_Button("Direction", self, 0 , array_create(4, THEME.obj_direction) ); inputs[| 3] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white ); diff --git a/scripts/node_pb_fx_strip/node_pb_fx_strip.gml b/scripts/node_pb_fx_strip/node_pb_fx_strip.gml index 343cab661..59dd0bda5 100644 --- a/scripts/node_pb_fx_strip/node_pb_fx_strip.gml +++ b/scripts/node_pb_fx_strip/node_pb_fx_strip.gml @@ -7,8 +7,7 @@ function Node_PB_Fx_Strip(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) c inputs[| 3] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ); - inputs[| 4] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "X", "Y" ]); + inputs[| 4] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ]); input_display_list = [ 0, ["Effect", false], 1, 4, 2, 3, diff --git a/scripts/node_pb_fx_subtract/node_pb_fx_subtract.gml b/scripts/node_pb_fx_subtract/node_pb_fx_subtract.gml index 7a60c8087..0c30755f7 100644 --- a/scripts/node_pb_fx_subtract/node_pb_fx_subtract.gml +++ b/scripts/node_pb_fx_subtract/node_pb_fx_subtract.gml @@ -1,7 +1,7 @@ function Node_PB_Fx_Subtract(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { name = "Subtract"; - inputs[| 1] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ) + inputs[| 1] = nodeValue_Surface("Surface", self) .setVisible(true, true); input_display_list = [ 0, diff --git a/scripts/node_perlin/node_perlin.gml b/scripts/node_perlin/node_perlin.gml index 0aab4d98f..4bc75ba63 100644 --- a/scripts/node_perlin/node_perlin.gml +++ b/scripts/node_perlin/node_perlin.gml @@ -1,8 +1,7 @@ function Node_Perlin(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Perlin Noise"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -19,8 +18,7 @@ function Node_Perlin(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 5] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 6] = nodeValue("Color mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "RGB", "HSV" ]); + inputs[| 6] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); inputs[| 7] = nodeValue("Color R range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) .setDisplay(VALUE_DISPLAY.slider_range); @@ -37,8 +35,7 @@ function Node_Perlin(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co ////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 11] = nodeValue_Rotation("Rotation", self, 0); input_display_list = [ ["Output", true], 0, 5, diff --git a/scripts/node_perlin_extra/node_perlin_extra.gml b/scripts/node_perlin_extra/node_perlin_extra.gml index 6b7a91c02..a6adb33da 100644 --- a/scripts/node_perlin_extra/node_perlin_extra.gml +++ b/scripts/node_perlin_extra/node_perlin_extra.gml @@ -22,8 +22,7 @@ function Node_Perlin_Extra(_x, _y, _group = noone) : Node_Shader_Generator(_x, _ .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); addShaderProp(SHADER_UNIFORM.float, "seed"); - inputs[| 6] = nodeValue("Color mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "RGB", "HSV" ]); + inputs[| 6] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); addShaderProp(SHADER_UNIFORM.integer, "colored"); inputs[| 7] = nodeValue("Color R range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) @@ -38,8 +37,7 @@ function Node_Perlin_Extra(_x, _y, _group = noone) : Node_Shader_Generator(_x, _ .setDisplay(VALUE_DISPLAY.slider_range); addShaderProp(SHADER_UNIFORM.float, "colorRanB"); - inputs[| 10] = nodeValue("Noise type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Absolute worley", "Fluid", "Noisy", "Camo", "Blocky", "Max", "Vine" ]); + inputs[| 10] = nodeValue_Enum_Scroll("Noise type", self, 0, [ "Absolute worley", "Fluid", "Noisy", "Camo", "Blocky", "Max", "Vine" ]); addShaderProp(SHADER_UNIFORM.integer, "type"); inputs[| 11] = nodeValue("Parameter A", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) @@ -61,8 +59,7 @@ function Node_Perlin_Extra(_x, _y, _group = noone) : Node_Shader_Generator(_x, _ ////////////////////////////////////////////////////////////////////////////////// - inputs[| 16] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 16] = nodeValue_Rotation("Rotation", self, 0); addShaderProp(SHADER_UNIFORM.float, "rotation"); input_display_list = [ diff --git a/scripts/node_perlin_smear/node_perlin_smear.gml b/scripts/node_perlin_smear/node_perlin_smear.gml index d83b43ac5..b264d31aa 100644 --- a/scripts/node_perlin_smear/node_perlin_smear.gml +++ b/scripts/node_perlin_smear/node_perlin_smear.gml @@ -1,8 +1,7 @@ function Node_Perlin_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Smear noise"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -16,8 +15,7 @@ function Node_Perlin_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 4] = nodeValue("Brightness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 5] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 5] = nodeValue_Rotation("Rotation", self, 0); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_pixel_builder/node_pixel_builder.gml b/scripts/node_pixel_builder/node_pixel_builder.gml index e4f8f97d6..c04de80b0 100644 --- a/scripts/node_pixel_builder/node_pixel_builder.gml +++ b/scripts/node_pixel_builder/node_pixel_builder.gml @@ -5,8 +5,7 @@ function Node_Pixel_Builder(_x, _y, _group = noone) : Node_Collection(_x, _y, _g reset_all_child = true; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); outputs[| 0] = nodeValue("Surface Out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_pixel_cloud/node_pixel_cloud.gml b/scripts/node_pixel_cloud/node_pixel_cloud.gml index 5878e0598..6802a3079 100644 --- a/scripts/node_pixel_cloud/node_pixel_cloud.gml +++ b/scripts/node_pixel_cloud/node_pixel_cloud.gml @@ -1,7 +1,7 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); @@ -9,7 +9,7 @@ function Node_Pixel_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou 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, noone); + inputs[| 3] = nodeValue_Surface("Strength map", self); inputs[| 4] = nodeValue("Color over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) .setMappable(9); diff --git a/scripts/node_pixel_sampler/node_pixel_sampler.gml b/scripts/node_pixel_sampler/node_pixel_sampler.gml index ebd67b92b..7a3bbe90b 100644 --- a/scripts/node_pixel_sampler/node_pixel_sampler.gml +++ b/scripts/node_pixel_sampler/node_pixel_sampler.gml @@ -1,15 +1,13 @@ function Node_Pixel_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Pixel Sampler"; - inputs[| 0] = nodeValue("Base Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| 0] = nodeValue_Surface("Base Texture", self); - inputs[| 1] = nodeValue("Sample Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Keep Size", "Expand" ]); + inputs[| 1] = nodeValue_Enum_Button("Sample Mode", self, 0 , [ "Keep Size", "Expand" ]); - inputs[| 2] = nodeValue("Match Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Brightness", "RGB", "Hue" ]); + inputs[| 2] = nodeValue_Enum_Button("Match Mode", self, 0 , [ "Brightness", "RGB", "Hue" ]); - inputs[| 3] = nodeValue("Surfaces", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, [ noone ] ) + inputs[| 3] = nodeValue_Surface("Surfaces", self, [ noone ]) .setArrayDepth(1); inputs[| 4] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject([ cola(c_black), cola(c_white) ]) ) @@ -19,8 +17,7 @@ function Node_Pixel_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 6] = nodeValueGradientRange("Gradient map range", self, inputs[| 4]); - inputs[| 7] = nodeValue("Color Blending", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "None", "Multiply" ]); + inputs[| 7] = nodeValue_Enum_Scroll("Color Blending", self, 0 , [ "None", "Multiply" ]); inputs[| 8] = nodeValue("Blending Intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1 ) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_pixel_sort/node_pixel_sort.gml b/scripts/node_pixel_sort/node_pixel_sort.gml index 3422a977a..fc256c75b 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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, noone); + inputs[| 4] = nodeValue_Surface("Mask", self); 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 60daeaaf8..693cdbcf4 100644 --- a/scripts/node_plot_linear/node_plot_linear.gml +++ b/scripts/node_plot_linear/node_plot_linear.gml @@ -19,8 +19,7 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Draw Bar / Graph"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Data", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, []) .setArrayDepth(1) @@ -44,11 +43,9 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 9] = nodeValue("Background color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); - inputs[| 10] = nodeValue("Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 10] = nodeValue_Rotation("Direction", self, 0); - inputs[| 11] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Bar chart", s_node_plot_linear_type, 0), + inputs[| 11] = nodeValue_Enum_Scroll("Type", self, 0, [ new scrollItem("Bar chart", s_node_plot_linear_type, 0), new scrollItem("Graph", s_node_plot_linear_type, 1), ]); inputs[| 12] = nodeValue("Value Offset", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); @@ -56,8 +53,7 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 13] = nodeValue("Color Over Sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white))) .setMappable(27); - inputs[| 14] = nodeValue("Trim mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Range", "Window" ]); + inputs[| 14] = nodeValue_Enum_Scroll("Trim mode", self, 0, [ "Range", "Window" ]); inputs[| 15] = nodeValue("Window Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 8); diff --git a/scripts/node_polar/node_polar.gml b/scripts/node_polar/node_polar.gml index cfea04b61..e2113777b 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Mask", self); inputs[| 2] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -22,8 +22,7 @@ function Node_Polar(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con __init_mask_modifier(1); // inputs 7, 8, - inputs[| 9] = nodeValue("Radius mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Linear", s_node_curve, 2), + inputs[| 9] = nodeValue_Enum_Scroll("Radius mode", self, 0, [ new scrollItem("Linear", s_node_curve, 2), new scrollItem("Inverse Square", s_node_curve, 1), new scrollItem("Logarithm", s_node_curve, 3), ]); diff --git a/scripts/node_posterize/node_posterize.gml b/scripts/node_posterize/node_posterize.gml index 6be40fb4a..df2555d6a 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Palette", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, array_clone(DEF_PALETTE)) .setDisplay(VALUE_DISPLAY.palette); @@ -26,8 +26,7 @@ function Node_Posterize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 8] = nodeValue("Space", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "RGB", "LAB" ]); + inputs[| 8] = nodeValue_Enum_Button("Space", self, 0, [ "RGB", "LAB" ]); input_display_list = [ 5, 0, ["Palette", false, 2], 1, 3, 4, 7, 8, diff --git a/scripts/node_processor/node_processor.gml b/scripts/node_processor/node_processor.gml index 5475d542b..b99aa3b0a 100644 --- a/scripts/node_processor/node_processor.gml +++ b/scripts/node_processor/node_processor.gml @@ -85,7 +85,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct var _pAtl = noone; var _data = array_create(ds_list_size(inputs)); - if(process_amount == 1) { #region render single data + if(process_amount == 1) { // render single data if(_output.type == VALUE_TYPE.d3object) //passing 3D vertex call return _out; @@ -142,7 +142,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct } return data; - } #endregion + } #region ++++ array preparation ++++ if(!is_array(_out)) @@ -318,7 +318,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct for(var i = 0; i < _len; i++) { var _in = inputs[| i]; - var raw = _in._getValue(); + var raw = _in.getValue(); var amo = _in.arrayLength(raw); var val = raw; diff --git a/scripts/node_pytagorean_tile/node_pytagorean_tile.gml b/scripts/node_pytagorean_tile/node_pytagorean_tile.gml index 66d95b858..30c26acbc 100644 --- a/scripts/node_pytagorean_tile/node_pytagorean_tile.gml +++ b/scripts/node_pytagorean_tile/node_pytagorean_tile.gml @@ -1,8 +1,7 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Pytagorean Tile"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -12,8 +11,7 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _ .setDisplay(VALUE_DISPLAY.vector) .setMappable(11); - inputs[| 3] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 3] = nodeValue_Rotation("Rotation", self, 0) .setMappable(12); inputs[| 4] = nodeValue("Gap", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.25) @@ -25,13 +23,12 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _ inputs[| 6] = nodeValue("Gap color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); - inputs[| 7] = nodeValue("Render type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Height map", "Texture grid"]); + inputs[| 7] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]); inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 9] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 9] = nodeValue_Surface("Texture", self); inputs[| 10] = nodeValue("Anti aliasing", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); @@ -52,8 +49,7 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _ inputs[| 16] = nodeValue("Truchet threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider) - inputs[| 17] = nodeValue("Phase", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 90) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 17] = nodeValue_Rotation("Phase", self, 90); ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_quasicrystal/node_quasicrystal.gml b/scripts/node_quasicrystal/node_quasicrystal.gml index 368e16ab4..6970159bb 100644 --- a/scripts/node_quasicrystal/node_quasicrystal.gml +++ b/scripts/node_quasicrystal/node_quasicrystal.gml @@ -1,15 +1,13 @@ function Node_Quasicrystal(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Quasicrystal"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 16) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 64, 0.1] }) .setMappable(6); - inputs[| 2] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 2] = nodeValue_Rotation("Angle", self, 0) .setMappable(7); inputs[| 3] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0, 0 ] ) diff --git a/scripts/node_random_shape/node_random_shape.gml b/scripts/node_random_shape/node_random_shape.gml index a854c31f5..59c6a4521 100644 --- a/scripts/node_random_shape/node_random_shape.gml +++ b/scripts/node_random_shape/node_random_shape.gml @@ -1,8 +1,7 @@ function Node_Random_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Draw Random Shape"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); diff --git a/scripts/node_random_tile/node_random_tile.gml b/scripts/node_random_tile/node_random_tile.gml index ca61430b2..b1fa3a07a 100644 --- a/scripts/node_random_tile/node_random_tile.gml +++ b/scripts/node_random_tile/node_random_tile.gml @@ -1,8 +1,7 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Random Tile"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -12,8 +11,7 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou .setDisplay(VALUE_DISPLAY.vector) .setMappable(11); - inputs[| 3] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 3] = nodeValue_Rotation("Angle", self, 0) .setMappable(12); inputs[| 4] = nodeValue("Gap", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) @@ -25,13 +23,12 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 6] = nodeValue("Gap color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); - inputs[| 7] = nodeValue("Render type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Height map", "Texture grid"]); + inputs[| 7] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]); inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 9] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 9] = nodeValue_Surface("Texture", self); inputs[| 10] = nodeValue("Anti aliasing", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); diff --git a/scripts/node_rate_remap/node_rate_remap.gml b/scripts/node_rate_remap/node_rate_remap.gml index 120590476..5b854bd74 100644 --- a/scripts/node_rate_remap/node_rate_remap.gml +++ b/scripts/node_rate_remap/node_rate_remap.gml @@ -2,7 +2,7 @@ function Node_Rate_Remap(_x, _y, _group = noone) : Node_Processor(_x, _y, _group name = "Rate Remap"; use_cache = CACHE_USE.manual; - inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface", self); inputs[| 1] = nodeValue("Framerate", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 10) .setValidator(VV_min(1)); diff --git a/scripts/node_rd/node_rd.gml b/scripts/node_rd/node_rd.gml index 4923e82c7..4fec751f8 100644 --- a/scripts/node_rd/node_rd.gml +++ b/scripts/node_rd/node_rd.gml @@ -1,7 +1,7 @@ function Node_RD(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Reaction Diffusion"; - inputs[| 0] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| 0] = nodeValue_Surface("Seed", self); inputs[| 1] = nodeValue("Kill rate", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.058) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.001] }) @@ -24,23 +24,23 @@ function Node_RD(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { .setDisplay(VALUE_DISPLAY.slider) .setMappable(12); - inputs[| 7] = nodeValue("Add B", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| 7] = nodeValue_Surface("Add B", self); ////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 8] = nodeValue("Kill map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 8] = nodeValue_Surface("Kill map", self) .setVisible(false, false); - inputs[| 9] = nodeValue("Feed map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 9] = nodeValue_Surface("Feed map", self) .setVisible(false, false); - inputs[| 10] = nodeValue("Time map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 10] = nodeValue_Surface("Time map", self) .setVisible(false, false); - inputs[| 11] = nodeValue("DfA map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 11] = nodeValue_Surface("DfA map", self) .setVisible(false, false); - inputs[| 12] = nodeValue("DfB map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 12] = nodeValue_Surface("DfB map", self) .setVisible(false, false); ////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_region_fill/node_region_fill.gml b/scripts/node_region_fill/node_region_fill.gml index 91d97f4c1..d060d511e 100644 --- a/scripts/node_region_fill/node_region_fill.gml +++ b/scripts/node_region_fill/node_region_fill.gml @@ -1,9 +1,9 @@ function Node_Region_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Region Fill"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Mask", self); inputs[| 2] = nodeValue("Fill Colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, array_clone(DEF_PALETTE)) .setDisplay(VALUE_DISPLAY.palette); @@ -17,15 +17,13 @@ function Node_Region_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 6] = nodeValue("Inner only", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Only fill regions with surrounding pixels."); - inputs[| 7] = nodeValue("Draw original", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "None", "Above", "Behind" ]); + inputs[| 7] = nodeValue_Enum_Scroll("Draw original", self, 0, [ "None", "Above", "Behind" ]); - inputs[| 8] = nodeValue("Fill type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Random", "Color map", "Texture map" ]); + inputs[| 8] = nodeValue_Enum_Scroll("Fill type", self, 0, [ "Random", "Color map", "Texture map" ]); - inputs[| 9] = nodeValue("Color map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 9] = nodeValue_Surface("Color map", self); - inputs[| 10] = nodeValue("Texture map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 10] = nodeValue_Surface("Texture map", self); inputs[| 11] = nodeValue("Color Filter", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); diff --git a/scripts/node_render_sprite_sheet/node_render_sprite_sheet.gml b/scripts/node_render_sprite_sheet/node_render_sprite_sheet.gml index a695eb172..e11459a75 100644 --- a/scripts/node_render_sprite_sheet/node_render_sprite_sheet.gml +++ b/scripts/node_render_sprite_sheet/node_render_sprite_sheet.gml @@ -15,17 +15,15 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) name = "Render Spritesheet"; anim_drawn = array_create(TOTAL_FRAMES + 1, false); - inputs[| 0] = nodeValue("Sprites", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Sprites", self); - inputs[| 1] = nodeValue("Sprite set", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Animation", "Sprite array" ]) + inputs[| 1] = nodeValue_Enum_Scroll("Sprite set", self, 0, [ "Animation", "Sprite array" ]) .rejectArray(); inputs[| 2] = nodeValue("Frame step", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1, "Number of frames until next sprite. Can be seen as (Step - 1) frame skip.") .rejectArray(); - inputs[| 3] = nodeValue("Packing type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Horizontal", s_node_alignment, 0), + inputs[| 3] = nodeValue_Enum_Scroll("Packing type", self, 0, [ new scrollItem("Horizontal", s_node_alignment, 0), new scrollItem("Vertical", s_node_alignment, 1), new scrollItem("Grid", s_node_alignment, 2), ]) .rejectArray(); @@ -33,8 +31,7 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) inputs[| 4] = nodeValue("Grid column", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4) .rejectArray(); - inputs[| 5] = nodeValue("Alignment", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "First", "Middle", "Last" ]) + inputs[| 5] = nodeValue_Enum_Button("Alignment", self, 0, [ "First", "Middle", "Last" ]) .rejectArray(); inputs[| 6] = nodeValue("Spacing", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0); diff --git a/scripts/node_repeat/node_repeat.gml b/scripts/node_repeat/node_repeat.gml index 3b692773b..253d8742f 100644 --- a/scripts/node_repeat/node_repeat.gml +++ b/scripts/node_repeat/node_repeat.gml @@ -20,16 +20,14 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co name = "Repeat"; dimension_index = 1; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 1] = nodeValue_Dimension(self); inputs[| 2] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2) .rejectArray(); - inputs[| 3] = nodeValue("Pattern", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Linear", s_node_repeat_axis, 0), + inputs[| 3] = nodeValue_Enum_Scroll("Pattern", self, 0, [ new scrollItem("Linear", s_node_repeat_axis, 0), new scrollItem("Grid", s_node_repeat_axis, 1), new scrollItem("Circular", s_node_repeat_axis, 2), ]); @@ -66,8 +64,8 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 15] = nodeValue("Alpha over copy", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 ); - inputs[| 16] = nodeValue("Array select", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "Whether to select image from an array in order, at random, or spread or each image to one output." ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Order", "Random", "Spread" ]); + inputs[| 16] = nodeValue_Enum_Button("Array select", self, 0, [ "Order", "Random", "Spread" ]) + .setTooltip("Whether to select image from an array in order, at random, or spread or each image to one output."); inputs[| 17] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 17].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); @@ -87,16 +85,15 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 22] = nodeValue("Animator position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 23] = nodeValue("Animator rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 23] = nodeValue_Rotation("Animator rotation", self, 0); inputs[| 24] = nodeValue("Animator scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); inputs[| 25] = nodeValue("Animator falloff", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_10); - inputs[| 26] = nodeValue("Stack", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "Place each copy next to each other, taking surface dimension into account.") - .setDisplay(VALUE_DISPLAY.enum_button, [ "None", "X", "Y" ]); + inputs[| 26] = nodeValue_Enum_Button("Stack", self, 0, [ "None", "X", "Y" ]) + .setTooltip("Place each copy next to each other, taking surface dimension into account."); inputs[| 27] = nodeValue("Animator blend", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, cola(c_white)); @@ -113,14 +110,11 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 32] = nodeValue("Start rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 32] = nodeValue_Rotation("Start rotation", self, 0); - inputs[| 33] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 33] = nodeValue_Rotation("Rotation", self, 0); - inputs[| 34] = nodeValue("Blend Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Normal", "Additive", "Maximum" ]); + inputs[| 34] = nodeValue_Enum_Scroll("Blend Mode", self, 0, [ "Normal", "Additive", "Maximum" ]); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_repeat_texture/node_repeat_texture.gml b/scripts/node_repeat_texture/node_repeat_texture.gml index 8f5616924..5304b7121 100644 --- a/scripts/node_repeat_texture/node_repeat_texture.gml +++ b/scripts/node_repeat_texture/node_repeat_texture.gml @@ -2,13 +2,12 @@ function Node_Repeat_Texture(_x, _y, _group = noone) : Node_Processor(_x, _y, _g name = "Repeat Texture"; dimension_index = 1; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Target dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 2] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Tile", "Scatter", "Cell" ]); + inputs[| 2] = nodeValue_Enum_Scroll("Type", self, 1, [ "Tile", "Scatter", "Cell" ]); inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }) diff --git a/scripts/node_rgb_channel/node_rgb_channel.gml b/scripts/node_rgb_channel/node_rgb_channel.gml index 046a0f05b..07c35e8bb 100644 --- a/scripts/node_rgb_channel/node_rgb_channel.gml +++ b/scripts/node_rgb_channel/node_rgb_channel.gml @@ -2,10 +2,9 @@ function Node_RGB_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou name = "RGBA Extract"; batch_output = false; - inputs[| 0] = nodeValue("Surface In", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface In", self); - inputs[| 1] = nodeValue("Output Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Channel value", "Greyscale" ]); + inputs[| 1] = nodeValue_Enum_Scroll("Output Type", self, 0, [ "Channel value", "Greyscale" ]); inputs[| 2] = nodeValue("Keep Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); 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 82eb03faa..810215399 100644 --- a/scripts/node_rigid_force_apply/node_rigid_force_apply.gml +++ b/scripts/node_rigid_force_apply/node_rigid_force_apply.gml @@ -9,8 +9,7 @@ function Node_Rigid_Force_Apply(_x, _y, _group = noone) : Node(_x, _y, _group) c inputs[| 0] = nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone) .setVisible(true, true); - inputs[| 1] = nodeValue("Force type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Constant", "Impulse", "Torque", "Explode" ]) + inputs[| 1] = nodeValue_Enum_Scroll("Force type", self, 0, [ "Constant", "Impulse", "Torque", "Explode" ]) .rejectArray(); inputs[| 2] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) @@ -27,8 +26,7 @@ function Node_Rigid_Force_Apply(_x, _y, _group = noone) : Node(_x, _y, _group) c .setDisplay(VALUE_DISPLAY.vector) .rejectArray(); - inputs[| 6] = nodeValue("Scope", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Global", "Local" ]) + inputs[| 6] = nodeValue_Enum_Button("Scope", self, 0, [ "Global", "Local" ]) .rejectArray(); inputs[| 7] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) diff --git a/scripts/node_rigid_object/node_rigid_object.gml b/scripts/node_rigid_object/node_rigid_object.gml index 6ad51349e..68b08135a 100644 --- a/scripts/node_rigid_object/node_rigid_object.gml +++ b/scripts/node_rigid_object/node_rigid_object.gml @@ -35,12 +35,11 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr .rejectArray() .setAnimable(false); - inputs[| 5] = nodeValue("Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Box", s_node_shape_rectangle, 0), new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Custom", s_node_shape_misc, 1) ]) + inputs[| 5] = nodeValue_Enum_Scroll("Shape", self, 0, [ new scrollItem("Box", s_node_shape_rectangle, 0), new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Custom", s_node_shape_misc, 1) ]) .rejectArray() .setAnimable(false); - inputs[| 6] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 6] = nodeValue_Surface("Texture", self) .setAnimable(false); inputs[| 7] = nodeValue("Start position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 16, 16 ]) 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 5ce99c01d..817b5b6b8 100644 --- a/scripts/node_rigid_object_spawner/node_rigid_object_spawner.gml +++ b/scripts/node_rigid_object_spawner/node_rigid_object_spawner.gml @@ -15,8 +15,7 @@ function Node_Rigid_Object_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group .setDisplay(VALUE_DISPLAY.area) .rejectArray(); - inputs[| 2] = nodeValue("Spawn type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Stream", "Burst" ]) + inputs[| 2] = nodeValue_Enum_Button("Spawn type", self, 0, [ "Stream", "Burst" ]) .rejectArray(); inputs[| 3] = nodeValue("Spawn delay", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4) diff --git a/scripts/node_rigid_wall/node_rigid_wall.gml b/scripts/node_rigid_wall/node_rigid_wall.gml index 56bf7eafe..e0bfe06d7 100644 --- a/scripts/node_rigid_wall/node_rigid_wall.gml +++ b/scripts/node_rigid_wall/node_rigid_wall.gml @@ -13,8 +13,7 @@ function Node_Rigid_Wall(_x, _y, _group = noone) : Node(_x, _y, _group) construc inputs[| 1] = nodeValue("Contact Friction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2); - inputs[| 2] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 2] = nodeValue_Dimension(self); inputs[| 3] = nodeValue("Collision Group", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1); diff --git a/scripts/node_rim/node_rim.gml b/scripts/node_rim/node_rim.gml index 0a01cdc35..516f7ab56 100644 --- a/scripts/node_rim/node_rim.gml +++ b/scripts/node_rim/node_rim.gml @@ -2,8 +2,7 @@ function Node_Rim(_x, _y, _group = noone) : Node_Shader_Processor(_x, _y, _group name = "Rim"; shader = sh_rim; - inputs[| 1] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 1] = nodeValue_Rotation("Angle", self, 0); addShaderProp(SHADER_UNIFORM.float, "rotation"); } \ No newline at end of file diff --git a/scripts/node_rm_cloud/node_rm_cloud.gml b/scripts/node_rm_cloud/node_rm_cloud.gml index 8fc0de9fe..bdc1f661e 100644 --- a/scripts/node_rm_cloud/node_rm_cloud.gml +++ b/scripts/node_rm_cloud/node_rm_cloud.gml @@ -1,8 +1,7 @@ function Node_RM_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "RM CLoud"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -32,8 +31,7 @@ function Node_RM_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 10] = nodeValue("Detail Attenuation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 11] = nodeValue("Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Volume", "Plane" ]); + inputs[| 11] = nodeValue_Enum_Scroll("Shape", self, 0, [ "Volume", "Plane" ]); inputs[| 12] = nodeValue("Use Fog", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, 0) diff --git a/scripts/node_rm_combine/node_rm_combine.gml b/scripts/node_rm_combine/node_rm_combine.gml index 730836d25..728a89800 100644 --- a/scripts/node_rm_combine/node_rm_combine.gml +++ b/scripts/node_rm_combine/node_rm_combine.gml @@ -1,13 +1,11 @@ function Node_RM_Combine(_x, _y, _group = noone) : Node_RM(_x, _y, _group) constructor { name = "RM Combine"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 1] = nodeValue("Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Perspective", "Orthographic" ]); + inputs[| 1] = nodeValue_Enum_Button("Projection", self, 0, [ "Perspective", "Orthographic" ]); inputs[| 2] = nodeValue("FOV", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 30) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }); @@ -30,7 +28,7 @@ function Node_RM_Combine(_x, _y, _group = noone) : Node_RM(_x, _y, _group) const inputs[| 9] = nodeValue("Light Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ -.4, -.5, 1 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 10] = nodeValue("Environment", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, false); + inputs[| 10] = nodeValue_Surface("Environment", self); inputs[| 11] = nodeValue("Camera Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 30, 45, 0 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -48,8 +46,7 @@ function Node_RM_Combine(_x, _y, _group = noone) : Node_RM(_x, _y, _group) const //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 15] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Place", "Union", "Subtract", "Intersect" ]); + inputs[| 15] = nodeValue_Enum_Scroll("Type", self, 0, [ "Place", "Union", "Subtract", "Intersect" ]); inputs[| 16] = nodeValue("Merge", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_rm_primitive/node_rm_primitive.gml b/scripts/node_rm_primitive/node_rm_primitive.gml index 1b8801890..211305e50 100644 --- a/scripts/node_rm_primitive/node_rm_primitive.gml +++ b/scripts/node_rm_primitive/node_rm_primitive.gml @@ -1,8 +1,7 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) constructor { name = "RM Primitive"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); shape_types = [ "Plane", "Box", "Box Frame", "Box Round", @@ -19,8 +18,7 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con for( var i = 0, n = array_length(shape_types); i < n; i++ ) shape_types_str[i] = shape_types[i] == -1? -1 : new scrollItem(shape_types[i], s_node_shape_3d, _ind++, COLORS._main_icon_light); - inputs[| 1] = nodeValue("Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.enum_scroll, { data: shape_types_str, horizontal: true, text_pad: ui(16) }); + inputs[| 1] = nodeValue_Enum_Scroll("Shape", self, 1, { data: shape_types_str, horizontal: true, text_pad: ui(16) }); inputs[| 2] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -54,8 +52,7 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con inputs[| 12] = nodeValue("Rounded", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 13] = nodeValue("Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Perspective", "Orthographic" ]); + inputs[| 13] = nodeValue_Enum_Button("Projection", self, 0, [ "Perspective", "Orthographic" ]); inputs[| 14] = nodeValue("Ortho Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1.) @@ -68,8 +65,7 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con inputs[| 17] = nodeValue("Wave Phase", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 18] = nodeValue("Twist Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "X", "Y", "Z" ]); + inputs[| 18] = nodeValue_Enum_Button("Twist Axis", self, 0, [ "X", "Y", "Z" ]); inputs[| 19] = nodeValue("Twist Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 8, 0.1 ] }); @@ -91,8 +87,7 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con inputs[| 24] = nodeValue("Crop", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); - inputs[| 25] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 30.) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 25] = nodeValue_Rotation("Angle", self, 30); inputs[| 26] = nodeValue("Height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, .5) .setDisplay(VALUE_DISPLAY.slider); @@ -119,12 +114,12 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con inputs[| 33] = nodeValue("Density", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.3) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 34] = nodeValue("Environment", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, false); + inputs[| 34] = nodeValue_Surface("Environment", self); inputs[| 35] = nodeValue("Reflective", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 36] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, false); + inputs[| 36] = nodeValue_Surface("Texture", self); inputs[| 37] = nodeValue("Triplanar Smoothing", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1.) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 10, 0.1 ] }); diff --git a/scripts/node_rm_render/node_rm_render.gml b/scripts/node_rm_render/node_rm_render.gml index 1e2ed0200..6a5fbdeb1 100644 --- a/scripts/node_rm_render/node_rm_render.gml +++ b/scripts/node_rm_render/node_rm_render.gml @@ -1,13 +1,11 @@ function Node_RM_Render(_x, _y, _group = noone) : Node_RM(_x, _y, _group) constructor { name = "RM Render"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 1] = nodeValue("Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Perspective", "Orthographic" ]); + inputs[| 1] = nodeValue_Enum_Button("Projection", self, 0, [ "Perspective", "Orthographic" ]); inputs[| 2] = nodeValue("FOV", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 30) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }); @@ -30,7 +28,7 @@ function Node_RM_Render(_x, _y, _group = noone) : Node_RM(_x, _y, _group) constr inputs[| 9] = nodeValue("Light Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ -.4, -.5, 1 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 10] = nodeValue("Environment", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, false); + inputs[| 10] = nodeValue_Surface("Environment", self); inputs[| 11] = nodeValue("Camera Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 30, 45, 0 ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_rm_terrain/node_rm_terrain.gml b/scripts/node_rm_terrain/node_rm_terrain.gml index 1eab6cea9..3fa4d9361 100644 --- a/scripts/node_rm_terrain/node_rm_terrain.gml +++ b/scripts/node_rm_terrain/node_rm_terrain.gml @@ -1,10 +1,9 @@ function Node_RM_Terrain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "RM Terrain"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| 1] = nodeValue_Surface("Surface", self); inputs[| 2] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -31,11 +30,11 @@ function Node_RM_Terrain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 10] = nodeValue("Tile", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true) - inputs[| 11] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| 11] = nodeValue_Surface("Texture", self); inputs[| 12] = nodeValue("Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); - inputs[| 13] = nodeValue("Reflection", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| 13] = nodeValue_Surface("Reflection", self); inputs[| 14] = nodeValue("Sun Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ .5, 1, .5 ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_sampler/node_sampler.gml b/scripts/node_sampler/node_sampler.gml index 8a35113ec..0500d4cfb 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"; setDimension(96, 48); - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) diff --git a/scripts/node_scale/node_scale.gml b/scripts/node_scale/node_scale.gml index 4ff4516d6..adc1ca3de 100644 --- a/scripts/node_scale/node_scale.gml +++ b/scripts/node_scale/node_scale.gml @@ -4,12 +4,11 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1); - inputs[| 2] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Upscale", "Scale to fit" ]); + inputs[| 2] = nodeValue_Enum_Button("Mode", self, 0, [ "Upscale", "Scale to fit" ]); inputs[| 3] = nodeValue("Target dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, DEF_SURF) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_scale_algo/node_scale_algo.gml b/scripts/node_scale_algo/node_scale_algo.gml index b6761d233..e9773a657 100644 --- a/scripts/node_scale_algo/node_scale_algo.gml +++ b/scripts/node_scale_algo/node_scale_algo.gml @@ -16,10 +16,9 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Algorithm", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Scale2x", "Scale3x", "CleanEdge" ]); + inputs[| 1] = nodeValue_Enum_Scroll("Algorithm", self, 0, [ "Scale2x", "Scale3x", "CleanEdge" ]); inputs[| 2] = nodeValue("Tolerance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_scatter/node_scatter.gml b/scripts/node_scatter/node_scatter.gml index a4d09e7da..e01b166ed 100644 --- a/scripts/node_scatter/node_scatter.gml +++ b/scripts/node_scatter/node_scatter.gml @@ -12,10 +12,9 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c batch_output = false; dimension_index = 1; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 1] = nodeValue_Dimension(self); inputs[| 2] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 8) .setValidator(VV_min(0)); @@ -31,15 +30,13 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c .setUnitRef(onSurfaceSize, VALUE_UNIT.reference) .setDisplay(VALUE_DISPLAY.area, { onSurfaceSize }); - inputs[| 6] = nodeValue("Distribution", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 5) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Area", "Border", "Map", "Direct Data", "Path", "Full image + Tile" ]); + inputs[| 6] = nodeValue_Enum_Scroll("Distribution", self, 5, [ "Area", "Border", "Map", "Direct Data", "Path", "Full image + Tile" ]); inputs[| 7] = nodeValue("Point at center", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Rotate each copy to face the spawn center."); inputs[| 8] = nodeValue("Uniform scaling", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); - inputs[| 9] = nodeValue("Scatter", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Uniform", "Random" ]); + inputs[| 9] = nodeValue_Enum_Button("Scatter", self, 1, [ "Uniform", "Random" ]); inputs[| 10] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 10].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); @@ -50,7 +47,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, noone); + inputs[| 13] = nodeValue_Surface("Distribution map", self); inputs[| 14] = nodeValue("Distribution data", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, []) .setDisplay(VALUE_DISPLAY.vector); @@ -66,8 +63,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 17] = nodeValue("Use value", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, [ "Scale" ], "Apply the third value in each data point (if exist) on given properties.") .setDisplay(VALUE_DISPLAY.text_array, { data: [ "Scale", "Rotation", "Color" ] }); - inputs[| 18] = nodeValue("Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Normal", "Add", "Max" ]); + inputs[| 18] = nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Normal", "Add", "Max" ]); inputs[| 19] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone); @@ -83,13 +79,12 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 24] = nodeValue("Array indices", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, []) .setArrayDepth(1); - inputs[| 25] = nodeValue("Array texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 25] = nodeValue_Surface("Array texture", self); inputs[| 26] = nodeValue("Animated array", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.range, { linked : true }); - inputs[| 27] = nodeValue("Animated array end", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Loop", "Ping Pong" ]); + inputs[| 27] = nodeValue_Enum_Scroll("Animated array end", self, 0, [ "Loop", "Ping Pong" ]); ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -104,8 +99,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 31] = nodeValue("Auto amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 32] = nodeValue("Rotate per radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 32] = nodeValue_Rotation("Rotate per radius", self, 0); inputs[| 33] = nodeValue("Random position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector_range); @@ -121,8 +115,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 37] = nodeValue("Exact", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) - inputs[| 38] = nodeValue("Spacing", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "After", "Between", "Around" ]); + inputs[| 38] = nodeValue_Enum_Button("Spacing", self, 0, [ "After", "Between", "Around" ]); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_scatter_points/node_scatter_points.gml b/scripts/node_scatter_points/node_scatter_points.gml index f613a3370..e4925aca6 100644 --- a/scripts/node_scatter_points/node_scatter_points.gml +++ b/scripts/node_scatter_points/node_scatter_points.gml @@ -9,18 +9,16 @@ function Node_Scatter_Points(_x, _y, _group = noone) : Node(_x, _y, _group) cons .setUnitRef(onSurfaceSize, VALUE_UNIT.reference) .setDisplay(VALUE_DISPLAY.area, { onSurfaceSize }); - inputs[| 1] = nodeValue("Point distribution", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Area", "Border", "Map" ]) + inputs[| 1] = nodeValue_Enum_Button("Point distribution", self, 0, [ "Area", "Border", "Map" ]) .rejectArray(); - inputs[| 2] = nodeValue("Scatter", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Uniform", "Random" ]) + inputs[| 2] = nodeValue_Enum_Button("Scatter", self, 1, [ "Uniform", "Random" ]) .rejectArray(); 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, noone) + inputs[| 4] = nodeValue_Surface("Distribution map", self) .rejectArray(); inputs[| 5] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) @@ -32,12 +30,11 @@ 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, noone); + inputs[| 8] = nodeValue_Surface("Reference value", self); inputs[| 9] = nodeValue("Output 3D", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 10] = nodeValue("Normal", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "X", "Y", "Z" ]); + inputs[| 10] = nodeValue_Enum_Button("Normal", self, 0, [ "X", "Y", "Z" ]); inputs[| 11] = nodeValue("Plane position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); diff --git a/scripts/node_sdf/node_sdf.gml b/scripts/node_sdf/node_sdf.gml index 6e77a7324..78eb96b3b 100644 --- a/scripts/node_sdf/node_sdf.gml +++ b/scripts/node_sdf/node_sdf.gml @@ -8,13 +8,12 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; - inputs[| 2] = nodeValue("Side", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Inside", "Outside", "Both" ]); + inputs[| 2] = nodeValue_Enum_Button("Side", self, 2, [ "Inside", "Outside", "Both" ]); inputs[| 3] = nodeValue("Max distance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); diff --git a/scripts/node_segment_filter/node_segment_filter.gml b/scripts/node_segment_filter/node_segment_filter.gml index 6569d25ef..4aab4aff8 100644 --- a/scripts/node_segment_filter/node_segment_filter.gml +++ b/scripts/node_segment_filter/node_segment_filter.gml @@ -8,8 +8,7 @@ function Node_Segment_Filter(_x, _y, _group = noone) : Node(_x, _y, _group) cons .setVisible(true, true) .setArrayDepth(1); - inputs[| 1] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 1] = nodeValue_Rotation("Angle", self, 0); inputs[| 2] = nodeValue("Spread", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 15); diff --git a/scripts/node_seperate_shape/node_seperate_shape.gml b/scripts/node_seperate_shape/node_seperate_shape.gml index 84440657d..9329e1494 100644 --- a/scripts/node_seperate_shape/node_seperate_shape.gml +++ b/scripts/node_seperate_shape/node_seperate_shape.gml @@ -1,7 +1,7 @@ function Node_Seperate_Shape(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Separate Shape"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 0] = nodeValue_Surface("Surface in", self) .rejectArray(); inputs[| 1] = nodeValue("Tolerance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2) @@ -17,8 +17,7 @@ function Node_Seperate_Shape(_x, _y, _group = noone) : Node(_x, _y, _group) cons inputs[| 4] = nodeValue("Ignore blank", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true, "Skip empty and black shape.") .rejectArray(); - inputs[| 5] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "Alpha" ] ) + inputs[| 5] = nodeValue_Enum_Button("Mode", self, 0 , [ "Greyscale", "Alpha" ] ) outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_sequence_anim/node_sequence_anim.gml b/scripts/node_sequence_anim/node_sequence_anim.gml index d2fb6841e..0b8f6c1da 100644 --- a/scripts/node_sequence_anim/node_sequence_anim.gml +++ b/scripts/node_sequence_anim/node_sequence_anim.gml @@ -3,7 +3,7 @@ function Node_Sequence_Anim(_x, _y, _group = noone) : Node(_x, _y, _group) const update_on_frame = true; setAlwaysTimeline(new timelineItemNode_Sequence_Anim(self)); - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, []) + inputs[| 0] = nodeValue_Surface("Surface in", self, []) .setArrayDepth(1); inputs[| 1] = nodeValue("Speed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) @@ -13,8 +13,7 @@ function Node_Sequence_Anim(_x, _y, _group = noone) : Node(_x, _y, _group) const .setVisible(true, true) .setArrayDepth(1); - inputs[| 3] = nodeValue("Overflow", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Hold", "Loop", "Ping Pong", "Empty" ]); + inputs[| 3] = nodeValue_Enum_Scroll("Overflow", self, 0, [ "Hold", "Loop", "Ping Pong", "Empty" ]); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_shadow/node_shadow.gml b/scripts/node_shadow/node_shadow.gml index f8ff07441..1b281d81c 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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, 0.1] }); - inputs[| 6] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 6] = nodeValue_Surface("Mask", self); inputs[| 7] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -27,8 +27,7 @@ function Node_Shadow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co __init_mask_modifier(6); // inputs 9, 10 - inputs[| 11] = nodeValue("Positioning", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Shift", "Light" ]); + inputs[| 11] = nodeValue_Enum_Scroll("Positioning", self, 0, [ "Shift", "Light" ]); inputs[| 12] = nodeValue("Light Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) diff --git a/scripts/node_shadow_cast/node_shadow_cast.gml b/scripts/node_shadow_cast/node_shadow_cast.gml index 5f8ddaba9..aba435300 100644 --- a/scripts/node_shadow_cast/node_shadow_cast.gml +++ b/scripts/node_shadow_cast/node_shadow_cast.gml @@ -2,9 +2,9 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou name = "Cast Shadow"; batch_output = false; - inputs[| 0] = nodeValue("Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Background", self); - inputs[| 1] = nodeValue("Solid", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Solid", self); inputs[| 2] = nodeValue("Light Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -28,8 +28,7 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 4] = nodeValue("Light density", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); - inputs[| 5] = nodeValue("Light type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Point", s_node_shadow_type, 0), + inputs[| 5] = nodeValue_Enum_Scroll("Light type", self, 0, [ new scrollItem("Point", s_node_shadow_type, 0), new scrollItem("Sun", s_node_shadow_type, 1) ]); inputs[| 6] = nodeValue("Ambient color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_grey); @@ -51,10 +50,10 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 13] = nodeValue("Banding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.1] }); - inputs[| 14] = nodeValue("Attenuation", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "Control how light fade out over distance.") - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Quadratic", s_node_curve, 0), - new scrollItem("Invert quadratic", s_node_curve, 1), - new scrollItem("Linear", s_node_curve, 2), ]); + inputs[| 14] = nodeValue_Enum_Scroll("Attenuation", self, 0, [ new scrollItem("Quadratic", s_node_curve, 0), + new scrollItem("Invert quadratic", s_node_curve, 1), + new scrollItem("Linear", s_node_curve, 2), ]) + .setTooltip("Control how light fade out over distance."); inputs[| 15] = nodeValue("Ambient occlusion", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.1] }); diff --git a/scripts/node_shape/node_shape.gml b/scripts/node_shape/node_shape.gml index e9c148190..172769453 100644 --- a/scripts/node_shape/node_shape.gml +++ b/scripts/node_shape/node_shape.gml @@ -33,8 +33,7 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con onSurfaceSize = function() { return getInputData(0, DEF_SURF); }; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); @@ -53,8 +52,7 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con for( var i = 0, n = array_length(shape_types); i < n; i++ ) shape_types_str[i] = shape_types[i] == -1? -1 : new scrollItem(shape_types[i], s_node_shape_type, _ind++); - inputs[| 2] = nodeValue("Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, { data: shape_types_str, horizontal: true, text_pad: ui(16) }); + inputs[| 2] = nodeValue_Enum_Scroll("Shape", self, 0, { data: shape_types_str, horizontal: true, text_pad: ui(16) }); inputs[| 3] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, DEF_AREA_REF) .setUnitRef(onSurfaceSize, VALUE_UNIT.reference) @@ -69,8 +67,7 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 6] = nodeValue("Anti-aliasing", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 7] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 7] = nodeValue_Rotation("Rotation", self, 0); inputs[| 8] = nodeValue("Angle range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 180 ]) .setDisplay(VALUE_DISPLAY.rotation_range); @@ -93,8 +90,7 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 14] = nodeValue("Shape path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone) .setVisible(true, true); - inputs[| 15] = nodeValue("Positioning Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Area", "Center + Scale", "Full Image" ]) + inputs[| 15] = nodeValue_Enum_Scroll("Positioning Mode", self, 0, [ "Area", "Center + Scale", "Full Image" ]) inputs[| 16] = nodeValue("Center", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ] ) .setDisplay(VALUE_DISPLAY.vector) @@ -106,8 +102,7 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 18] = nodeValue("Tile", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 19] = nodeValue("Shape Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 19] = nodeValue_Rotation("Shape rotation", self, 0); inputs[| 20] = nodeValue("Level", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) .setDisplay(VALUE_DISPLAY.slider_range); @@ -128,8 +123,7 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 26] = nodeValue("Teeth Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.2, 0.2 ] ) .setDisplay(VALUE_DISPLAY.vector, { slideSpeed : 0.01 }); - inputs[| 27] = nodeValue("Teeth Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 27] = nodeValue_Rotation("Teeth Rotation", self, 0); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_shape_map/node_shape_map.gml b/scripts/node_shape_map/node_shape_map.gml index 823d110ee..5fed0bce2 100644 --- a/scripts/node_shape_map/node_shape_map.gml +++ b/scripts/node_shape_map/node_shape_map.gml @@ -1,13 +1,12 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; - inputs[| 2] = nodeValue("Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Circle", s_node_shape_circle, 0), + inputs[| 2] = nodeValue_Enum_Scroll("Shape", self, 0, [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Polygon", s_node_shape_misc, 1), ]); inputs[| 3] = nodeValue("Map Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 4, 1 ]) @@ -20,8 +19,7 @@ function Node_Shape_Map(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 6] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); - inputs[| 7] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 7] = nodeValue_Rotation("Angle", self, 0); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_shape_polygon/node_shape_polygon.gml b/scripts/node_shape_polygon/node_shape_polygon.gml index 94d227e1a..24637cf26 100644 --- a/scripts/node_shape_polygon/node_shape_polygon.gml +++ b/scripts/node_shape_polygon/node_shape_polygon.gml @@ -6,8 +6,7 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr for( var i = 0, n = array_length(shapesArray); i < n; i++ ) shapesArray[i] = new scrollItem(shapesArray[i], s_node_shape_poly_type, i); - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); @@ -15,15 +14,13 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 3] = nodeValue("Shape color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); - inputs[| 4] = nodeValue("Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, shapesArray); + inputs[| 4] = nodeValue_Enum_Scroll("Shape", self, 0, shapesArray); inputs[| 5] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[| 6] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 6] = nodeValue_Rotation("Rotation", self, 0); inputs[| 7] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) diff --git a/scripts/node_shard_noise/node_shard_noise.gml b/scripts/node_shard_noise/node_shard_noise.gml index ec6a5682c..be1e0bbaa 100644 --- a/scripts/node_shard_noise/node_shard_noise.gml +++ b/scripts/node_shard_noise/node_shard_noise.gml @@ -35,8 +35,7 @@ function Node_Shard_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y ////////////////////////////////////////////////////////////////////////////////// - inputs[| 9] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 9] = nodeValue_Rotation("Rotation", self, 0); addShaderProp(SHADER_UNIFORM.float, "rotation"); input_display_list = [ diff --git a/scripts/node_skew/node_skew.gml b/scripts/node_skew/node_skew.gml index 1d386a4b4..24113dd68 100644 --- a/scripts/node_skew/node_skew.gml +++ b/scripts/node_skew/node_skew.gml @@ -1,9 +1,8 @@ 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, noone); - inputs[| 1] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, ["x", "y"]); + inputs[| 0] = nodeValue_Surface("Surface in", self); + inputs[| 1] = nodeValue_Enum_Button("Axis", self, 0, ["x", "y"]); inputs[| 2] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }) @@ -16,10 +15,10 @@ function Node_Skew(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons .setIcon(THEME.anchor) .setTooltip(__txt("Set to center")) }); - 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[| 5] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 6] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 6] = nodeValue_Surface("Mask", self); inputs[| 7] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_slideshow/node_slideshow.gml b/scripts/node_slideshow/node_slideshow.gml index f702fe15b..37fcc30ec 100644 --- a/scripts/node_slideshow/node_slideshow.gml +++ b/scripts/node_slideshow/node_slideshow.gml @@ -10,8 +10,7 @@ function Node_Slideshow(_x, _y, _group = noone) : Node(_x, _y, _group) construct inputs[| 1] = nodeValue("Title", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); - inputs[| 2] = nodeValue("Anchor", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Center", "Top left" ]); + inputs[| 2] = nodeValue_Enum_Scroll("Anchor", self, 0, [ "Center", "Top left" ]); slide_title = ""; slide_anchor = 0; diff --git a/scripts/node_smear/node_smear.gml b/scripts/node_smear/node_smear.gml index db68e8f9c..90d322eab 100644 --- a/scripts/node_smear/node_smear.gml +++ b/scripts/node_smear/node_smear.gml @@ -1,17 +1,16 @@ function Node_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Smear"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) .setMappable(9); - inputs[| 2] = nodeValue("Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 2] = nodeValue_Rotation("Direction", self, 0) .setMappable(10); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 3] = nodeValue_Surface("Mask", self); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -32,11 +31,9 @@ function Node_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "Alpha" ]); + inputs[| 11] = nodeValue_Enum_Button("Mode", self, 0, [ "Greyscale", "Alpha" ]); - inputs[| 12] = nodeValue("Modulate strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Distance", "Color", "None" ]); + inputs[| 12] = nodeValue_Enum_Button("Modulate strength", self, 0, [ "Distance", "Color", "None" ]); inputs[| 13] = nodeValue("Spread", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.slider, { range : [ 0, 30, 1 ] }); diff --git a/scripts/node_smoke_add/node_smoke_add.gml b/scripts/node_smoke_add/node_smoke_add.gml index 734613c06..c7ca258fc 100644 --- a/scripts/node_smoke_add/node_smoke_add.gml +++ b/scripts/node_smoke_add/node_smoke_add.gml @@ -9,7 +9,7 @@ function Node_Smoke_Add(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) con inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) .setVisible(true, true); - inputs[| 1] = nodeValue("Fluid brush", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Fluid brush", self); inputs[| 2] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_smoke_add_collider/node_smoke_add_collider.gml b/scripts/node_smoke_add_collider/node_smoke_add_collider.gml index d36521bde..4febda26c 100644 --- a/scripts/node_smoke_add_collider/node_smoke_add_collider.gml +++ b/scripts/node_smoke_add_collider/node_smoke_add_collider.gml @@ -8,7 +8,7 @@ function Node_Smoke_Add_Collider(_x, _y, _group = noone) : Node_Smoke(_x, _y, _g inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) .setVisible(true, true); - inputs[| 1] = nodeValue("Collider", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Collider", self); inputs[| 2] = nodeValue("Area", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, DEF_AREA ) .setDisplay(VALUE_DISPLAY.area, { useShape : false }); diff --git a/scripts/node_smoke_apply_velocity/node_smoke_apply_velocity.gml b/scripts/node_smoke_apply_velocity/node_smoke_apply_velocity.gml index c9948cf46..435c87339 100644 --- a/scripts/node_smoke_apply_velocity/node_smoke_apply_velocity.gml +++ b/scripts/node_smoke_apply_velocity/node_smoke_apply_velocity.gml @@ -7,7 +7,7 @@ function Node_Smoke_Apply_Velocity(_x, _y, _group = noone) : Node_Smoke(_x, _y, inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) .setVisible(true, true); - inputs[| 1] = nodeValue("Brush", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Brush", self); inputs[| 2] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_smoke_domain/node_smoke_domain.gml b/scripts/node_smoke_domain/node_smoke_domain.gml index f66bf9ae8..18a07006b 100644 --- a/scripts/node_smoke_domain/node_smoke_domain.gml +++ b/scripts/node_smoke_domain/node_smoke_domain.gml @@ -5,19 +5,16 @@ function Node_Smoke_Domain(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) manual_ungroupable = false; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue("Collision", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Collision", self); - inputs[| 2] = nodeValue("Material dissipation type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Multiply", "Subtract" ]); + inputs[| 2] = nodeValue_Enum_Button("Material dissipation type", self, 1, [ "Multiply", "Subtract" ]); inputs[| 3] = nodeValue("Material dissipation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.02) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.01 ] }); - inputs[| 4] = nodeValue("Velocity dissipation type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Multiply", "Subtract" ]); + inputs[| 4] = nodeValue_Enum_Button("Velocity dissipation type", self, 1, [ "Multiply", "Subtract" ]); inputs[| 5] = nodeValue("Velocity dissipation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.00) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.01 ] }); diff --git a/scripts/node_smoke_group/node_smoke_group.gml b/scripts/node_smoke_group/node_smoke_group.gml index 77b49e35f..76032072f 100644 --- a/scripts/node_smoke_group/node_smoke_group.gml +++ b/scripts/node_smoke_group/node_smoke_group.gml @@ -12,19 +12,16 @@ function Node_Smoke_Group(_x, _y, _group = noone) : Node_Collection(_x, _y, _gro outputNode = noone; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); - inputs[| 1] = nodeValue("Collision", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Collision", self); - inputs[| 2] = nodeValue("Material dissipation type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Multiply", "Subtract" ]); + inputs[| 2] = nodeValue_Enum_Button("Material dissipation type", self, 1, [ "Multiply", "Subtract" ]); inputs[| 3] = nodeValue("Material dissipation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.02) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.01 ] }); - inputs[| 4] = nodeValue("Velocity dissipation type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Multiply", "Subtract" ]); + inputs[| 4] = nodeValue_Enum_Button("Velocity dissipation type", self, 1, [ "Multiply", "Subtract" ]); inputs[| 5] = nodeValue("Velocity dissipation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.00) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.01 ] }); diff --git a/scripts/node_smoke_render/node_smoke_render.gml b/scripts/node_smoke_render/node_smoke_render.gml index 073616e1f..5cc9ca4b3 100644 --- a/scripts/node_smoke_render/node_smoke_render.gml +++ b/scripts/node_smoke_render/node_smoke_render.gml @@ -9,8 +9,7 @@ function Node_Smoke_Render(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) .setVisible(true, true); - inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 1] = nodeValue_Dimension(self); inputs[| 2] = nodeValue("Interpolate", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); diff --git a/scripts/node_smoke_render_output/node_smoke_render_output.gml b/scripts/node_smoke_render_output/node_smoke_render_output.gml index 8067b8fc0..bc5b7a1b7 100644 --- a/scripts/node_smoke_render_output/node_smoke_render_output.gml +++ b/scripts/node_smoke_render_output/node_smoke_render_output.gml @@ -11,8 +11,7 @@ function Node_Smoke_Render_Output(_x, _y, _group = noone) : Node_Group_Output(_x inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) .setVisible(true, true); - inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 1] = nodeValue_Dimension(self); inputs[| 2] = nodeValue("Interpolate", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); diff --git a/scripts/node_smoke_repulse/node_smoke_repulse.gml b/scripts/node_smoke_repulse/node_smoke_repulse.gml index a7d798735..8b8f3697a 100644 --- a/scripts/node_smoke_repulse/node_smoke_repulse.gml +++ b/scripts/node_smoke_repulse/node_smoke_repulse.gml @@ -15,8 +15,7 @@ function Node_Smoke_Repulse(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) inputs[| 3] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.10) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[| 4] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Override", "Add" ]); + inputs[| 4] = nodeValue_Enum_Button("Mode", self, 0, [ "Override", "Add" ]); input_display_list = [ ["Domain", false], 0, diff --git a/scripts/node_smoke_turbulence/node_smoke_turbulence.gml b/scripts/node_smoke_turbulence/node_smoke_turbulence.gml index 1681cca39..c9d204af5 100644 --- a/scripts/node_smoke_turbulence/node_smoke_turbulence.gml +++ b/scripts/node_smoke_turbulence/node_smoke_turbulence.gml @@ -19,8 +19,7 @@ function Node_Smoke_Turbulence(_x, _y, _group = noone) : Node_Smoke(_x, _y, _gro inputs[| 4] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 4].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 5] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Override", "Add" ]); + inputs[| 5] = nodeValue_Enum_Button("Mode", self, 0, [ "Override", "Add" ]); input_display_list = [ ["Domain", false], 0, diff --git a/scripts/node_smoke_vortex/node_smoke_vortex.gml b/scripts/node_smoke_vortex/node_smoke_vortex.gml index f3d0ba769..fbfed5e81 100644 --- a/scripts/node_smoke_vortex/node_smoke_vortex.gml +++ b/scripts/node_smoke_vortex/node_smoke_vortex.gml @@ -18,8 +18,7 @@ function Node_Smoke_Vortex(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) inputs[| 4] = nodeValue("Attraction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[| 5] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Override", "Add" ]); + inputs[| 5] = nodeValue_Enum_Button("Mode", self, 0, [ "Override", "Add" ]); input_display_list = [ ["Domain", false], 0, diff --git a/scripts/node_solid/node_solid.gml b/scripts/node_solid/node_solid.gml index 4aa2a7501..023511e91 100644 --- a/scripts/node_solid/node_solid.gml +++ b/scripts/node_solid/node_solid.gml @@ -1,14 +1,13 @@ function Node_Solid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Solid"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, cola(c_white)); inputs[| 2] = nodeValue("Empty", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 3] = nodeValue_Surface("Mask", self); inputs[| 4] = nodeValue("Use mask dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); diff --git a/scripts/node_spherize/node_spherize.gml b/scripts/node_spherize/node_spherize.gml index 6550ebfef..cec082e52 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Center", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -15,10 +15,10 @@ function Node_Spherize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.slider) .setMappable(12); - 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[| 4] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 5] = nodeValue_Surface("Mask", self); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -33,10 +33,10 @@ function Node_Spherize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValue("Strength map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 11] = nodeValue_Surface("Strength map", self) .setVisible(false, false); - inputs[| 12] = nodeValue("Radius map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 12] = nodeValue_Surface("Radius map", self) .setVisible(false, false); ////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_spout_send/node_spout_send.gml b/scripts/node_spout_send/node_spout_send.gml index 345339168..6c590b286 100644 --- a/scripts/node_spout_send/node_spout_send.gml +++ b/scripts/node_spout_send/node_spout_send.gml @@ -3,7 +3,7 @@ function Node_Spout_Send(_x, _y, _group = noone) : Node(_x, _y, _group) construc inputs[| 0] = nodeValue("Sender name", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "PixelComposer"); - inputs[| 1] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Surface", self); outputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone) .setVisible(false); diff --git a/scripts/node_sprite_stack/node_sprite_stack.gml b/scripts/node_sprite_stack/node_sprite_stack.gml index 4ee7d7b8e..243890161 100644 --- a/scripts/node_sprite_stack/node_sprite_stack.gml +++ b/scripts/node_sprite_stack/node_sprite_stack.gml @@ -2,10 +2,9 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro name = "Sprite Stack"; dimension_index = 1; - inputs[| 0] = nodeValue("Base shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Base shape", self); - inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 1] = nodeValue_Dimension(self); inputs[| 2] = nodeValue("Stack amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4); @@ -16,8 +15,7 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro .setDisplay(VALUE_DISPLAY.vector) .setUnitRef(function(index) { return getDimension(index); }); - inputs[| 5] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 5] = nodeValue_Rotation("Rotation", self, 0); inputs[| 6] = nodeValue("Stack blend", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white ); @@ -26,8 +24,7 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 8] = nodeValue("Move base", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Make each copy move the original image." ); - inputs[| 9] = nodeValue("Highlight", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "None", "Color", "Inner pixel" ]); + inputs[| 9] = nodeValue_Enum_Scroll("Highlight", self, 0, [ "None", "Color", "Inner pixel" ]); inputs[| 10] = nodeValue("Highlight color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); diff --git a/scripts/node_stack/node_stack.gml b/scripts/node_stack/node_stack.gml index d12274ad7..365e2cd0b 100644 --- a/scripts/node_stack/node_stack.gml +++ b/scripts/node_stack/node_stack.gml @@ -1,14 +1,12 @@ function Node_Stack(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Stack"; - inputs[| 0] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Horizontal", s_node_alignment, 0), + inputs[| 0] = nodeValue_Enum_Scroll("Axis", self, 0, [ new scrollItem("Horizontal", s_node_alignment, 0), new scrollItem("Vertical", s_node_alignment, 1), new scrollItem("On top", s_node_alignment, 3), ]) .rejectArray(); - inputs[| 1] = nodeValue("Align", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Start", "Middle", "End"]) + inputs[| 1] = nodeValue_Enum_Button("Align", self, 1, [ "Start", "Middle", "End"]) .rejectArray(); inputs[| 2] = nodeValue("Spacing", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) @@ -26,7 +24,7 @@ function Node_Stack(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static createNewInput = function() { var index = ds_list_size(inputs); - inputs[| index] = nodeValue("Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, -1 ) + inputs[| index] = nodeValue_Surface("Input", self) .setVisible(true, true); return inputs[| index]; diff --git a/scripts/node_stagger/node_stagger.gml b/scripts/node_stagger/node_stagger.gml index bba33a578..1f1d03d8c 100644 --- a/scripts/node_stagger/node_stagger.gml +++ b/scripts/node_stagger/node_stagger.gml @@ -1,7 +1,7 @@ function Node_Stagger(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Stagger"; - inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface", self); inputs[| 1] = nodeValue("Delay Step", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1); @@ -9,8 +9,7 @@ function Node_Stagger(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 3] = nodeValue("Stagger Curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); - inputs[| 4] = nodeValue("Overflow", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Hide", "Clamp" ]); + inputs[| 4] = nodeValue_Enum_Button("Overflow", self, 0, [ "Hide", "Clamp" ]); outputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_statistic/node_statistic.gml b/scripts/node_statistic/node_statistic.gml index ccab616b2..75e3a2826 100644 --- a/scripts/node_statistic/node_statistic.gml +++ b/scripts/node_statistic/node_statistic.gml @@ -30,8 +30,7 @@ function Node_Statistic(_x, _y, _group = noone) : Node(_x, _y, _group) construct setDimension(96, 48); - inputs[| 0] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Sum", "Mean", "Median", "Max", "Min" ]) + inputs[| 0] = nodeValue_Enum_Scroll("Type", self, 0, [ "Sum", "Mean", "Median", "Max", "Min" ]) .rejectArray(); static createNewInput = function() { diff --git a/scripts/node_strand_create/node_strand_create.gml b/scripts/node_strand_create/node_strand_create.gml index d0021a877..13e1fe0ff 100644 --- a/scripts/node_strand_create/node_strand_create.gml +++ b/scripts/node_strand_create/node_strand_create.gml @@ -7,8 +7,7 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const update_on_frame = true; manual_ungroupable = false; - inputs[| 0] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Point", "Path", "Mesh" ]); + inputs[| 0] = nodeValue_Enum_Scroll("Type", self, 0, [ "Point", "Path", "Mesh" ]); inputs[| 1] = nodeValue("Density", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 8, "How many strands to generate."); @@ -25,8 +24,7 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const inputs[| 6] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 7] = nodeValue("Side", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Inner", "Outer", "Both" ]); + inputs[| 7] = nodeValue_Enum_Button("Side", self, 0, [ "Inner", "Outer", "Both" ]); inputs[| 8] = nodeValue("Spring", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.8, "Angular stiffness, the higher the value the easier it is to bend each segment.") .setDisplay(VALUE_DISPLAY.slider); @@ -44,8 +42,7 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const inputs[| 13] = nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone); - inputs[| 14] = nodeValue("Distribution", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Uniform", "Random" ]); + inputs[| 14] = nodeValue_Enum_Scroll("Distribution", self, 0, [ "Uniform", "Random" ]); inputs[| 15] = nodeValue("Bake hair", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, false, "Prevent strand reseting to apply manual modification. Unbaking will remove all changes.") .setDisplay(VALUE_DISPLAY.button, { name: "Bake", UI : true, onClick: function() { diff --git a/scripts/node_strand_gravity/node_strand_gravity.gml b/scripts/node_strand_gravity/node_strand_gravity.gml index cd8646672..ab2e90452 100644 --- a/scripts/node_strand_gravity/node_strand_gravity.gml +++ b/scripts/node_strand_gravity/node_strand_gravity.gml @@ -11,8 +11,7 @@ function Node_Strand_Gravity(_x, _y, _group = noone) : Node(_x, _y, _group) cons inputs[| 1] = nodeValue("Gravity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1); - inputs[| 2] = nodeValue("Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, -90) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 2] = nodeValue_Rotation("Direction", self, 0); outputs[| 0] = nodeValue("Strand", self, JUNCTION_CONNECT.output, VALUE_TYPE.strands, noone); diff --git a/scripts/node_strand_length_adjust/node_strand_length_adjust.gml b/scripts/node_strand_length_adjust/node_strand_length_adjust.gml index 448eb9ca6..2d276900e 100644 --- a/scripts/node_strand_length_adjust/node_strand_length_adjust.gml +++ b/scripts/node_strand_length_adjust/node_strand_length_adjust.gml @@ -6,8 +6,7 @@ function Node_Strand_Length_Adjust(_x, _y, _group = noone) : _Node_Strand_Affect manual_ungroupable = false; - inputs[| input_fix_len + 0] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Increase", "Decrease" ]); + inputs[| input_fix_len + 0] = nodeValue_Enum_Button("Type", self, 0, [ "Increase", "Decrease" ]); inputs[| input_fix_len + 1] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_strand_render/node_strand_render.gml b/scripts/node_strand_render/node_strand_render.gml index 4540e107a..5dfc3ccaf 100644 --- a/scripts/node_strand_render/node_strand_render.gml +++ b/scripts/node_strand_render/node_strand_render.gml @@ -6,8 +6,7 @@ function Node_Strand_Render(_x, _y, _group = noone) : Node(_x, _y, _group) const manual_ungroupable = false; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone) .setVisible(true, true); 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 fc0b700ea..f294eee42 100644 --- a/scripts/node_strand_render_texture/node_strand_render_texture.gml +++ b/scripts/node_strand_render_texture/node_strand_render_texture.gml @@ -6,8 +6,7 @@ function Node_Strand_Render_Texture(_x, _y, _group = noone) : Node(_x, _y, _grou manual_ungroupable = false; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone) .setVisible(true, true); @@ -17,7 +16,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(cola(c_white))); - inputs[| 4] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 4] = nodeValue_Surface("Texture", self); inputs[| 5] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); diff --git a/scripts/node_string_length/node_string_length.gml b/scripts/node_string_length/node_string_length.gml index 155168b65..e3d21f405 100644 --- a/scripts/node_string_length/node_string_length.gml +++ b/scripts/node_string_length/node_string_length.gml @@ -6,8 +6,7 @@ function Node_String_Length(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "") .setVisible(true, true); - inputs[| 1] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, ["Character", "Word"]); + inputs[| 1] = nodeValue_Enum_Scroll("Mode", self, 0, ["Character", "Word"]); outputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, ""); diff --git a/scripts/node_string_trim/node_string_trim.gml b/scripts/node_string_trim/node_string_trim.gml index ce66b6630..77311bf36 100644 --- a/scripts/node_string_trim/node_string_trim.gml +++ b/scripts/node_string_trim/node_string_trim.gml @@ -3,7 +3,6 @@ function Node_String_Trim(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou setDimension(96, 48); - inputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "") .setVisible(true, true); @@ -11,11 +10,10 @@ function Node_String_Trim(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 2] = nodeValue("Tail", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0); - inputs[| 3] = nodeValue("Trim", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, ["Character", "Word"]); + inputs[| 3] = nodeValue_Enum_Scroll("Trim", self, 0, ["Character", "Word"]); - inputs[| 4] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "Set to progress to use ratio, where 0 means no change and 1 means the entire length of the text.") - .setDisplay(VALUE_DISPLAY.enum_scroll, ["Counter", "Progress"]); + inputs[| 4] = nodeValue_Enum_Scroll("Mode", self, 0, ["Counter", "Progress"]) + .setTooltip("Set to progress to use ratio, where 0 means no change and 1 means the entire length of the text."); outputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, ""); diff --git a/scripts/node_stripe/node_stripe.gml b/scripts/node_stripe/node_stripe.gml index 29111c11e..7d302e7f7 100644 --- a/scripts/node_stripe/node_stripe.gml +++ b/scripts/node_stripe/node_stripe.gml @@ -1,19 +1,16 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Stripe"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }) .setMappable(11); - inputs[| 2] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 2] = nodeValue_Rotation("Angle", self, 0) .setMappable(12); - inputs[| 3] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Solid", "Smooth", "AA" ]); + inputs[| 3] = nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ]); inputs[| 4] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0, 0 ] ) .setDisplay(VALUE_DISPLAY.vector) @@ -23,8 +20,7 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co .setDisplay(VALUE_DISPLAY.slider) .setMappable(13); - inputs[| 6] = nodeValue("Coloring", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Alternate", "Palette", "Random" ]); + inputs[| 6] = nodeValue_Enum_Button("Coloring", self, 0, [ "Alternate", "Palette", "Random" ]); inputs[| 7] = nodeValue("Colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) .setMappable(15); diff --git a/scripts/node_surface_data/node_surface_data.gml b/scripts/node_surface_data/node_surface_data.gml index 0068ebc3d..48cc81366 100644 --- a/scripts/node_surface_data/node_surface_data.gml +++ b/scripts/node_surface_data/node_surface_data.gml @@ -2,9 +2,9 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface", self); - outputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, [ 1, 1 ]) + outputs[| 0] = nodeValue_Output("Dimension", self, VALUE_TYPE.integer, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); outputs[| 1] = nodeValue("Array length", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, 0); diff --git a/scripts/node_surface_replace/node_surface_replace.gml b/scripts/node_surface_replace/node_surface_replace.gml index dff9edce7..caf44c55e 100644 --- a/scripts/node_surface_replace/node_surface_replace.gml +++ b/scripts/node_surface_replace/node_surface_replace.gml @@ -1,12 +1,12 @@ function Node_Surface_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Replace Image"; - inputs[| 0] = nodeValue("Base Image", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + inputs[| 0] = nodeValue_Surface("Base Image", self); - inputs[| 1] = nodeValue("Target Image", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ) + inputs[| 1] = nodeValue_Surface("Target Image", self) .setArrayDepth(1); - inputs[| 2] = nodeValue("Replacement Image", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ) + inputs[| 2] = nodeValue_Surface("Replacement Image", self) .setArrayDepth(1); inputs[| 3] = nodeValue("Color Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1, "How similiar the color need to be in order to be count as matched." ) @@ -19,8 +19,7 @@ function Node_Surface_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _ inputs[| 6] = nodeValue("Pixel Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1, "How many pixel need to me matched to replace with replacement image." ) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 7] = nodeValue("Array mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Match index", "Randomized" ], update_hover: false }); + inputs[| 7] = nodeValue_Enum_Scroll("Array mode", self, 0, { data: [ "Match index", "Randomized" ], update_hover: false }); inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); diff --git a/scripts/node_surface_to_buffer/node_surface_to_buffer.gml b/scripts/node_surface_to_buffer/node_surface_to_buffer.gml index 6fee34cc4..a34c2a7f6 100644 --- a/scripts/node_surface_to_buffer/node_surface_to_buffer.gml +++ b/scripts/node_surface_to_buffer/node_surface_to_buffer.gml @@ -1,7 +1,7 @@ function Node_Surface_To_Buffer(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Buffer from Surface"; - inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface", self); outputs[| 0] = nodeValue("Buffer", self, JUNCTION_CONNECT.output, VALUE_TYPE.buffer, noone); diff --git a/scripts/node_surface_to_color/node_surface_to_color.gml b/scripts/node_surface_to_color/node_surface_to_color.gml index 19598b82d..6833edef3 100644 --- a/scripts/node_surface_to_color/node_surface_to_color.gml +++ b/scripts/node_surface_to_color/node_surface_to_color.gml @@ -1,7 +1,7 @@ function Node_Surface_To_Color(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Surface to Color"; - inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface", self); outputs[| 0] = nodeValue("Colors", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, []) .setDisplay(VALUE_DISPLAY.palette); diff --git a/scripts/node_text/node_text.gml b/scripts/node_text/node_text.gml index 8367095c5..335e7528b 100644 --- a/scripts/node_text/node_text.gml +++ b/scripts/node_text/node_text.gml @@ -21,14 +21,11 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons .setDisplay(VALUE_DISPLAY.vector) .setVisible(true, false); - inputs[| 7] = nodeValue("Horizontal alignment", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ THEME.inspector_text_halign, THEME.inspector_text_halign, THEME.inspector_text_halign]); + inputs[| 7] = nodeValue_Enum_Button("Horizontal alignment", self, 0 , [ THEME.inspector_text_halign, THEME.inspector_text_halign, THEME.inspector_text_halign]); - inputs[| 8] = nodeValue("Vertical alignment", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ THEME.inspector_text_valign, THEME.inspector_text_valign, THEME.inspector_text_valign ]); + inputs[| 8] = nodeValue_Enum_Button("Vertical alignment", self, 0 , [ THEME.inspector_text_valign, THEME.inspector_text_valign, THEME.inspector_text_valign ]); - inputs[| 9] = nodeValue("Output dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Fixed", "Dynamic" ]); + inputs[| 9] = nodeValue_Enum_Scroll("Output dimension", self, 1 , [ "Fixed", "Dynamic" ]); inputs[| 10] = nodeValue("Padding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0, 0, 0]) .setDisplay(VALUE_DISPLAY.padding); @@ -54,8 +51,7 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 20] = nodeValue("Wave scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 30); - inputs[| 21] = nodeValue("Wave phase", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 21] = nodeValue_Rotation("Wave phase", self, 0); inputs[| 22] = nodeValue("Wave shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 3, 0.01 ] }); @@ -65,8 +61,7 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 24] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) .setDisplay(VALUE_DISPLAY.slider_range); - inputs[| 25] = nodeValue("Trim type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Character", "Word", "Line" ]); + inputs[| 25] = nodeValue_Enum_Button("Trim type", self, 0 , [ "Character", "Word", "Line" ]); inputs[| 26] = nodeValue("Use full text size", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true ); diff --git a/scripts/node_texture_remap/node_texture_remap.gml b/scripts/node_texture_remap/node_texture_remap.gml index 35c72d9fa..eec532379 100644 --- a/scripts/node_texture_remap/node_texture_remap.gml +++ b/scripts/node_texture_remap/node_texture_remap.gml @@ -4,15 +4,14 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - 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[| 1] = nodeValue_Surface("RG Map", self, "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; - inputs[| 3] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Surface", "RG Map" ]); + inputs[| 3] = nodeValue_Enum_Button("Dimension Source", self, 0, [ "Surface", "RG Map" ]); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_threshold/node_threshold.gml b/scripts/node_threshold/node_threshold.gml index 859b007e9..c8439685c 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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, noone); + inputs[| 4] = nodeValue_Surface("Mask", self); 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 d03e65747..e3f3aebea 100644 --- a/scripts/node_tile/node_tile.gml +++ b/scripts/node_tile/node_tile.gml @@ -1,9 +1,9 @@ function Node_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Tile"; - inputs[| 0] = nodeValue("Base texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Base texture", self); - inputs[| 1] = nodeValue("Border texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Border texture", self); outputs[| 0] = nodeValue("", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_tile_random/node_tile_random.gml b/scripts/node_tile_random/node_tile_random.gml index 8e742461b..b79083953 100644 --- a/scripts/node_tile_random/node_tile_random.gml +++ b/scripts/node_tile_random/node_tile_random.gml @@ -2,10 +2,9 @@ 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 1] = nodeValue_Dimension(self); inputs[| 2] = nodeValue("Randomness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_time_remap/node_time_remap.gml b/scripts/node_time_remap/node_time_remap.gml index 386bebc30..6a301f976 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, noone) + inputs[| 0] = nodeValue_Surface("Surface in", self) .rejectArray(); - inputs[| 1] = nodeValue("Map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 1] = nodeValue_Surface("Map", self) .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 ef4cc7548..dfa4a1a58 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, noone); + inputs[| 0] = nodeValue_Surface("Surface", self); static update = function(frame = CURRENT_FRAME) { var _inSurf = getInputData(0); diff --git a/scripts/node_tonemap_ace/node_tonemap_ace.gml b/scripts/node_tonemap_ace/node_tonemap_ace.gml index 420f761d6..f3ea8832e 100644 --- a/scripts/node_tonemap_ace/node_tonemap_ace.gml +++ b/scripts/node_tonemap_ace/node_tonemap_ace.gml @@ -1,9 +1,9 @@ function Node_Tonemap_ACE(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "ACE"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 1] = nodeValue_Surface("Mask", self); inputs[| 2] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_trail/node_trail.gml b/scripts/node_trail/node_trail.gml index 2657033ad..c53e84c67 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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 1bfd39576..b5e80cbfc 100644 --- a/scripts/node_transform/node_transform.gml +++ b/scripts/node_transform/node_transform.gml @@ -8,18 +8,16 @@ enum OUTPUT_SCALING { function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Transform"; - inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); - inputs[| 1] = nodeValue("Output dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [1, 1]) - .setDisplay(VALUE_DISPLAY.vector) + inputs[| 1] = nodeValue_Vec2("Output dimension", self, [ 1, 1 ]) .setVisible(false); - inputs[| 2] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) - .setDisplay(VALUE_DISPLAY.vector) + inputs[| 2] = nodeValue_Vec2("Position", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[| 3] = nodeValue("Anchor", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) - .setDisplay(VALUE_DISPLAY.vector, { #region + inputs[| 3] = nodeValue_Vec2("Anchor", self, [ 0.5, 0.5 ]) + .setDisplay(VALUE_DISPLAY.vector, { side_button : new buttonAnchor(function(ind) { switch(ind) { case 0 : inputs[| 3].setValue([ 0.0, 0.0 ]); break; @@ -35,35 +33,31 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) case 8 : inputs[| 3].setValue([ 1.0, 1.0 ]); break; } }) - }); #endregion + }); - inputs[| 4] = nodeValue("Relative anchor", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); + inputs[| 4] = nodeValue_Bool("Relative anchor", self, true); - inputs[| 5] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 5] = nodeValue_Rotation("Rotation", self, 0); - inputs[| 6] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 6] = nodeValue_Vec2("Scale", self, [ 1, 1 ]); - inputs[| 7] = nodeValue("Render Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Normal", "Tile", "Wrap" ]); + inputs[| 7] = nodeValue_Enum_Button("Render Mode", self, 0, [ "Normal", "Tile", "Wrap" ]); - inputs[| 8] = nodeValue("Rotate by velocity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0, "Make the surface rotates to follow its movement.") + inputs[| 8] = nodeValue_Float("Rotate by velocity", self, 0, "Make the surface rotates to follow its movement.") .setDisplay(VALUE_DISPLAY.slider); - inputs[| 9] = nodeValue("Output dimension type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, OUTPUT_SCALING.same_as_input) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Same as input", "Constant", "Relative to input", "Transformed" ]); + inputs[| 9] = nodeValue_Enum_Scroll("Output dimension type", self, OUTPUT_SCALING.same_as_input, [ "Same as input", "Constant", "Relative to input", "Transformed" ]); - inputs[| 10] = nodeValue("Round position", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Round position to the nearest integer value to avoid jittering."); + inputs[| 10] = nodeValue_Bool("Round position", self, false, "Round position to the nearest integer value to avoid jittering."); - inputs[| 11] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); + inputs[| 11] = nodeValue_Bool("Active", self, true); active_index = 11; - inputs[| 12] = nodeValue("Echo", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); + inputs[| 12] = nodeValue_Bool("Echo", self, false); - inputs[| 13] = nodeValue("Echo amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 8); + inputs[| 13] = nodeValue_Int("Echo amount", self, 8); - inputs[| 14] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) + inputs[| 14] = nodeValue_Float("Alpha", self, 1) .setDisplay(VALUE_DISPLAY.slider); input_display_list = [ 11, 0, @@ -75,9 +69,9 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ["Echo", true, 12], 13, ]; - outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); + outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); - outputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, [ 1, 1 ]) + outputs[| 1] = nodeValue_Output("Dimension", self, VALUE_TYPE.integer, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector) .setVisible(false); @@ -88,7 +82,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) prev_pos = [ 0, 0 ]; prev_data = noone; - static getDimension = function(arr = 0) { #region + static getDimension = function(arr = 0) { var _surf = getSingleValue(0, arr); var _out_type = getSingleValue(9, arr); var _out = getSingleValue(1, arr); @@ -132,9 +126,9 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } return [ ww, hh ]; - } #endregion + } - static centerAnchor = function() { #region + static centerAnchor = function() { var _surf = getInputData(0); var _out_type = getInputData(9); @@ -148,9 +142,9 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 3].setValue([ 0.5, 0.5 ]); inputs[| 2].setValue([ surface_get_width_safe(_surf) / 2, surface_get_height_safe(_surf) / 2 ]); - } #endregion + } - static step = function() { #region + static step = function() { var pos = getSingleValue(2); var anc = getSingleValue(3); @@ -176,15 +170,16 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) vel = 0; prev_pos[0] = pos[0]; prev_pos[1] = pos[1]; + } else { vel = point_direction(prev_pos[0], prev_pos[1], pos[0], pos[1]); prev_pos[0] = pos[0]; prev_pos[1] = pos[1]; } - } #endregion + } - static processData = function(_outData, _data, _output_index, _array_index) { #region + static processData = function(_outData, _data, _output_index, _array_index) { var ins = _data[0]; var out_type = _data[9]; @@ -279,15 +274,15 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) draw_y = round(draw_y); } - if(mode == 1) { #region // Tile + if(mode == 1) { // Tile surface_set_shader(_outSurf); shader_set_interpolation(ins); draw_surface_tiled_ext_safe(ins, draw_x, draw_y, sca[0], sca[1], rot, c_white, alp); surface_reset_shader(); - #endregion - } else { #region // Normal or wrap + + } else { // Normal or wrap surface_set_shader(_outSurf); shader_set_interpolation(ins); @@ -325,7 +320,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) draw_surface_ext_safe(ins, draw_x + _ww, draw_y + _hh, sca[0], sca[1], rot, c_white, alp); } surface_reset_shader(); - #endregion + } prev_data[_array_index] = [ @@ -335,7 +330,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ]; return _outRes; - } #endregion + } overlay_dragging = 0; corner_dragging = 0; @@ -348,7 +343,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) overlay_drag_ma = 0; overlay_drag_sa = 0; - static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { PROCESSOR_OVERLAY_CHECK var _surf = current_data[0]; @@ -627,5 +622,5 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) draw_set_alpha(1); } #endregion - } #endregion + } } \ No newline at end of file diff --git a/scripts/node_transform_array/node_transform_array.gml b/scripts/node_transform_array/node_transform_array.gml index 31256d5de..f94a28028 100644 --- a/scripts/node_transform_array/node_transform_array.gml +++ b/scripts/node_transform_array/node_transform_array.gml @@ -8,8 +8,7 @@ function Node_Transform_Array(_x, _y, _group = noone) : Node_Processor(_x, _y, _ .setDisplay(VALUE_DISPLAY.vector) .setVisible(true, true); - inputs[| 1] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 1] = nodeValue_Rotation("Rotation", self, 0) .setVisible(true, true); inputs[| 2] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ] ) diff --git a/scripts/node_transform_single/node_transform_single.gml b/scripts/node_transform_single/node_transform_single.gml index 446e44880..0f39285c5 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); 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); diff --git a/scripts/node_trigger_bool/node_trigger_bool.gml b/scripts/node_trigger_bool/node_trigger_bool.gml index 1aada9c80..3663c7552 100644 --- a/scripts/node_trigger_bool/node_trigger_bool.gml +++ b/scripts/node_trigger_bool/node_trigger_bool.gml @@ -5,8 +5,7 @@ function Node_Trigger_Bool(_x, _y, _group = noone) : Node(_x, _y, _group) constr inputs[| 0] = nodeValue("Boolean", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 1] = nodeValue("Trigger condition", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("True frame", s_node_trigger_cond, 0), + inputs[| 1] = nodeValue_Enum_Scroll("Trigger condition", self, 0, [ new scrollItem("True frame", s_node_trigger_cond, 0), new scrollItem("False to True", s_node_trigger_cond, 1), new scrollItem("True to False", s_node_trigger_cond, 2), new scrollItem("Value changed", s_node_trigger_cond, 3), ]); diff --git a/scripts/node_twirl/node_twirl.gml b/scripts/node_twirl/node_twirl.gml index ae01b82f6..d6ab2feec 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Center", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) @@ -14,10 +14,10 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 3] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 16) .setMappable(12); - 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[| 4] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) + .setTooltip("How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture."); - inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 5] = nodeValue_Surface("Mask", self); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -32,10 +32,10 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con //////////////////////////////////////////////////////////////////////////////////////////// - inputs[| 11] = nodeValue("Strength map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 11] = nodeValue_Surface("Strength map", self) .setVisible(false, false); - inputs[| 12] = nodeValue("Radius map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) + inputs[| 12] = nodeValue_Surface("Radius map", self) .setVisible(false, false); //////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index 10b719a8b..6c0775b8e 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -256,6 +256,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru return self; } #endregion + static setTooltip = function(_tip) { tooltip = _tip; return self; } + static nonValidate = function() { #region validateValue = false; return self; @@ -1154,7 +1156,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru var val = __curr_get_val[0]; var nod = __curr_get_val[1]; - var typ = nod.type; + var typ = nod == undefined? VALUE_TYPE.any : nod.type; var dis = nod.display_type; if(connect_type == JUNCTION_CONNECT.output) return val; @@ -1510,16 +1512,15 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru for( var i = 0, n = array_length(value_to_loop); i < n; i++ ) value_to_loop[i].updateValue(); + if(!updated) return false; ///////////////////////////////////////////////////////////////////////////////// + if(connect_type == JUNCTION_CONNECT.input && self.index >= 0) { var _val = animator.getValue(time); - // setInputData(self.index, _val); - node.inputs_data[self.index] = _val; + node.inputs_data[self.index] = _val; // setInputData(self.index, _val); node.input_value_map[$ internalName] = _val; } - if(!updated) return false; - if(value_tag == "dimension") node.attributes.use_project_dimension = false; draw_junction_index = type; diff --git a/scripts/node_value_area/node_value_area.gml b/scripts/node_value_area/node_value_area.gml new file mode 100644 index 000000000..d9f7d881b --- /dev/null +++ b/scripts/node_value_area/node_value_area.gml @@ -0,0 +1,86 @@ +enum AREA_SHAPE { + rectangle, + elipse +} + +enum AREA_MODE { + area, + padding, + two_point, +} + +enum AREA_INDEX { + center_x, + center_y, + half_w, + half_h, + shape +} + +#macro DEF_AREA [ DEF_SURF_W / 2, DEF_SURF_H / 2, DEF_SURF_W / 2, DEF_SURF_H / 2, AREA_SHAPE.rectangle, AREA_MODE.area ] +#macro DEF_AREA_REF [ 0.5, 0.5, 0.5, 0.5, AREA_SHAPE.rectangle, AREA_MODE.area ] +#macro AREA_ARRAY_LENGTH 6 + +function nodeValue_Area(_name, _node, _value, _tooltip = "") { return new NodeValue_Area(_name, _node, _value, _tooltip); } + +function NodeValue_Area(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.float, _value, _tooltip) constructor { + setDisplay(VALUE_DISPLAY.area); + + /////============== GET ============= + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + + val = array_verify(val, AREA_ARRAY_LENGTH); + + if(!is_undefined(nod) && struct_has(nod.display_data, "onSurfaceSize")) { + var surf = nod.display_data.onSurfaceSize(); + var dispType = array_safe_get_fast(val, 5, AREA_MODE.area); + + switch(dispType) { + case AREA_MODE.area : + break; + + case AREA_MODE.padding : + var ww = unit.mode == VALUE_UNIT.reference? 1 : surf[0]; + var hh = unit.mode == VALUE_UNIT.reference? 1 : surf[1]; + + var cx = (ww - val[0] + val[2]) / 2 + var cy = (val[1] + hh - val[3]) / 2; + var sw = abs((ww - val[0]) - val[2]) / 2; + var sh = abs(val[1] - (hh - val[3])) / 2; + + val = [cx, cy, sw, sh, val[4], val[5]]; + break; + + case AREA_MODE.two_point : + var cx = (val[0] + val[2]) / 2 + var cy = (val[1] + val[3]) / 2; + var sw = abs(val[0] - val[2]) / 2; + var sh = abs(val[1] - val[3]) / 2; + + val = [cx, cy, sw, sh, val[4], val[5]]; + break; + } + } + + return applyUnit? unit.apply(val, arrIndex) : val; + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + + if(!is_anim) { + if(sep_axis) return array_create_ext(AREA_ARRAY_LENGTH, function(i) /*=>*/ {return animators[i].processType(animators[i].values[| 0].value)}); + return ds_list_empty(animator.values)? 0 : animator.processType(animator.values[| 0].value); + } + + if(sep_axis) { + __temp_time = _time; + return array_create_ext(AREA_ARRAY_LENGTH, function(i) /*=>*/ {return animators[i].getValue(__temp_time)}); + } + + return animator.getValue(_time); + } +} \ No newline at end of file diff --git a/scripts/node_value_area/node_value_area.yy b/scripts/node_value_area/node_value_area.yy new file mode 100644 index 000000000..da5f47826 --- /dev/null +++ b/scripts/node_value_area/node_value_area.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_area", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_area", + "parent":{ + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_armature/node_value_armature.gml b/scripts/node_value_armature/node_value_armature.gml new file mode 100644 index 000000000..823d8e77d --- /dev/null +++ b/scripts/node_value_armature/node_value_armature.gml @@ -0,0 +1,5 @@ +function nodeValue_Armature(_name, _node, _value, _tooltip = "") { return new NodeValue_Armature(_name, _node, _value, _tooltip); } + +function NodeValue_Armature(_name, _node, _value, _tooltip = "") : __NodeValue_Object(_name, _node, VALUE_TYPE.armature, _value, _tooltip) constructor { + +} \ No newline at end of file diff --git a/scripts/node_value_armature/node_value_armature.yy b/scripts/node_value_armature/node_value_armature.yy new file mode 100644 index 000000000..29cab8dcf --- /dev/null +++ b/scripts/node_value_armature/node_value_armature.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_armature", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_armature", + "parent":{ + "name":"object", + "path":"folders/nodes/values/types/object.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_audioBit/node_value_audioBit.gml b/scripts/node_value_audioBit/node_value_audioBit.gml new file mode 100644 index 000000000..0bf7f02d0 --- /dev/null +++ b/scripts/node_value_audioBit/node_value_audioBit.gml @@ -0,0 +1,5 @@ +function nodeValue_AudioBit(_name, _node, _value, _tooltip = "") { return new NodeValue_AudioBit(_name, _node, _value, _tooltip); } + +function NodeValue_AudioBit(_name, _node, _value, _tooltip = "") : __NodeValue_Object(_name, _node, VALUE_TYPE.audioBit, _value, _tooltip) constructor { + +} \ No newline at end of file diff --git a/scripts/node_value_audioBit/node_value_audioBit.yy b/scripts/node_value_audioBit/node_value_audioBit.yy new file mode 100644 index 000000000..c9617c713 --- /dev/null +++ b/scripts/node_value_audioBit/node_value_audioBit.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_audioBit", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_audioBit", + "parent":{ + "name":"object", + "path":"folders/nodes/values/types/object.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_bool/node_value_bool.gml b/scripts/node_value_bool/node_value_bool.gml new file mode 100644 index 000000000..853af8f7f --- /dev/null +++ b/scripts/node_value_bool/node_value_bool.gml @@ -0,0 +1,18 @@ +function nodeValue_Bool(_name, _node, _value, _tooltip = "") { return new NodeValue_Bool(_name, _node, _value, _tooltip); } + +function NodeValue_Bool(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, _value, _tooltip) constructor { + + /////============== GET ============= + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + return bool(val); + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + if(is_anim) return animator.getValue(_time); + return ds_list_empty(animator.values)? 0 : animator.values[| 0].value; + } +} \ No newline at end of file diff --git a/scripts/node_value_bool/node_value_bool.yy b/scripts/node_value_bool/node_value_bool.yy new file mode 100644 index 000000000..33345768d --- /dev/null +++ b/scripts/node_value_bool/node_value_bool.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_bool", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_bool", + "parent":{ + "name":"types", + "path":"folders/nodes/values/types.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_buffer/node_value_buffer.gml b/scripts/node_value_buffer/node_value_buffer.gml new file mode 100644 index 000000000..a5914b2bc --- /dev/null +++ b/scripts/node_value_buffer/node_value_buffer.gml @@ -0,0 +1,5 @@ +function nodeValue_Buffer(_name, _node, _value, _tooltip = "") { return new NodeValue_Buffer(_name, _node, _value, _tooltip); } + +function NodeValue_Buffer(_name, _node, _value, _tooltip = "") : __NodeValue_Object(_name, _node, VALUE_TYPE.buffer, _value, _tooltip) constructor { + +} \ No newline at end of file diff --git a/scripts/node_value_buffer/node_value_buffer.yy b/scripts/node_value_buffer/node_value_buffer.yy new file mode 100644 index 000000000..94c356828 --- /dev/null +++ b/scripts/node_value_buffer/node_value_buffer.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_buffer", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_buffer", + "parent":{ + "name":"object", + "path":"folders/nodes/values/types/object.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_color/node_value_color.gml b/scripts/node_value_color/node_value_color.gml new file mode 100644 index 000000000..a064f7357 --- /dev/null +++ b/scripts/node_value_color/node_value_color.gml @@ -0,0 +1,19 @@ +function nodeValue_Color(_name, _node, _value, _tooltip = "") { return new NodeValue_Color(_name, _node, _value, _tooltip); } + +function NodeValue_Color(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.color, _value, _tooltip) constructor { + + /////============== GET ============= + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + + return val >= 1? cola(val) : make_color_rgb(val * 255, val * 255, val * 255); + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + if(is_anim) return animator.getValue(_time); + return ds_list_empty(animator.values)? 0 : animator.values[| 0].value; + } +} \ No newline at end of file diff --git a/scripts/node_value_color/node_value_color.yy b/scripts/node_value_color/node_value_color.yy new file mode 100644 index 000000000..1e9091d6f --- /dev/null +++ b/scripts/node_value_color/node_value_color.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_color", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_color", + "parent":{ + "name":"colors", + "path":"folders/nodes/values/types/colors.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_corner/node_value_corner.gml b/scripts/node_value_corner/node_value_corner.gml new file mode 100644 index 000000000..8a106935c --- /dev/null +++ b/scripts/node_value_corner/node_value_corner.gml @@ -0,0 +1,5 @@ +function nodeValue_Corner(_name, _node, _value, _tooltip = "") { return new NodeValue_Corner(_name, _node, _value, _tooltip); } + +function NodeValue_Corner(_name, _node, _value, _tooltip = "") : NodeValue_Array(_name, _node, _value, _tooltip, 4) constructor { + setDisplay(VALUE_DISPLAY.corner); +} \ No newline at end of file diff --git a/scripts/node_value_corner/node_value_corner.yy b/scripts/node_value_corner/node_value_corner.yy new file mode 100644 index 000000000..4129e2ed9 --- /dev/null +++ b/scripts/node_value_corner/node_value_corner.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_corner", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_corner", + "parent":{ + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_d3_camera/node_value_d3_camera.gml b/scripts/node_value_d3_camera/node_value_d3_camera.gml new file mode 100644 index 000000000..bb1d523d0 --- /dev/null +++ b/scripts/node_value_d3_camera/node_value_d3_camera.gml @@ -0,0 +1,21 @@ +function nodeValue_D3Camera(_name, _node, _value, _tooltip = "") { return new NodeValue_D3Camera(_name, _node, _value, _tooltip); } + +function NodeValue_D3Camera(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.d3Camera, _value, _tooltip) constructor { + + animable = false; + + /////============== GET ============= + + static valueProcess = function(value, nodeFrom = undefined, applyUnit = true, arrIndex = 0) { return value; } + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + return val; + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + return ds_list_empty(animator.values)? 0 : animator.values[| 0].value; + } +} \ No newline at end of file diff --git a/scripts/node_value_d3_camera/node_value_d3_camera.yy b/scripts/node_value_d3_camera/node_value_d3_camera.yy new file mode 100644 index 000000000..4fd58a55f --- /dev/null +++ b/scripts/node_value_d3_camera/node_value_d3_camera.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_d3_camera", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_d3_camera", + "parent":{ + "name":"3d", + "path":"folders/nodes/values/types/3d.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_d3_light/node_value_d3_light.gml b/scripts/node_value_d3_light/node_value_d3_light.gml new file mode 100644 index 000000000..44013208d --- /dev/null +++ b/scripts/node_value_d3_light/node_value_d3_light.gml @@ -0,0 +1,21 @@ +function nodeValue_D3Light(_name, _node, _value, _tooltip = "") { return new NodeValue_D3Light(_name, _node, _value, _tooltip); } + +function NodeValue_D3Light(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.d3Light, _value, _tooltip) constructor { + + animable = false; + + /////============== GET ============= + + static valueProcess = function(value, nodeFrom = undefined, applyUnit = true, arrIndex = 0) { return value; } + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + return val; + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + return ds_list_empty(animator.values)? 0 : animator.values[| 0].value; + } +} \ No newline at end of file diff --git a/scripts/node_value_d3_light/node_value_d3_light.yy b/scripts/node_value_d3_light/node_value_d3_light.yy new file mode 100644 index 000000000..e3af5631f --- /dev/null +++ b/scripts/node_value_d3_light/node_value_d3_light.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_d3_light", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_d3_light", + "parent":{ + "name":"3d", + "path":"folders/nodes/values/types/3d.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_d3_material/node_value_d3_material.gml b/scripts/node_value_d3_material/node_value_d3_material.gml new file mode 100644 index 000000000..31a5eaba5 --- /dev/null +++ b/scripts/node_value_d3_material/node_value_d3_material.gml @@ -0,0 +1,38 @@ +function nodeValue_D3Material(_name, _node, _value, _tooltip = "") { return new NodeValue_D3Material(_name, _node, _value, _tooltip); } + +function NodeValue_D3Material(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.d3Material, _value, _tooltip) constructor { + + animable = false; + + /////============== GET ============= + + static valueProcess = function(value, nodeFrom = undefined, applyUnit = true, arrIndex = 0) { return value; } + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + + var typ = nod == undefined? VALUE_TYPE.any : nod.type; + var dis = nod.display_type; + + if(nod == self) + return def_val; + + if(typ == VALUE_TYPE.surface) { + if(!is_array(val)) return def_val.clone(val); + + var _val = array_create(array_length(val)); + for( var i = 0, n = array_length(val); i < n; i++ ) + _val[i] = def_val.clone(val[i]); + + return _val; + } + + return val; + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + return ds_list_empty(animator.values)? 0 : animator.values[| 0].value; + } +} \ No newline at end of file diff --git a/scripts/node_value_d3_material/node_value_d3_material.yy b/scripts/node_value_d3_material/node_value_d3_material.yy new file mode 100644 index 000000000..9380a7d27 --- /dev/null +++ b/scripts/node_value_d3_material/node_value_d3_material.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_d3_material", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_d3_material", + "parent":{ + "name":"3d", + "path":"folders/nodes/values/types/3d.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_d3_mesh/node_value_d3_mesh.gml b/scripts/node_value_d3_mesh/node_value_d3_mesh.gml new file mode 100644 index 000000000..54a0f9551 --- /dev/null +++ b/scripts/node_value_d3_mesh/node_value_d3_mesh.gml @@ -0,0 +1,21 @@ +function nodeValue_D3Mesh(_name, _node, _value, _tooltip = "") { return new NodeValue_D3Mesh(_name, _node, _value, _tooltip); } + +function NodeValue_D3Mesh(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.d3Material, _value, _tooltip) constructor { + + animable = false; + + /////============== GET ============= + + static valueProcess = function(value, nodeFrom = undefined, applyUnit = true, arrIndex = 0) { return value; } + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + return val; + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + return ds_list_empty(animator.values)? 0 : animator.values[| 0].value; + } +} \ No newline at end of file diff --git a/scripts/node_value_d3_mesh/node_value_d3_mesh.yy b/scripts/node_value_d3_mesh/node_value_d3_mesh.yy new file mode 100644 index 000000000..1634d3ed3 --- /dev/null +++ b/scripts/node_value_d3_mesh/node_value_d3_mesh.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_d3_mesh", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_d3_mesh", + "parent":{ + "name":"3d", + "path":"folders/nodes/values/types/3d.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_d3_scene/node_value_d3_scene.gml b/scripts/node_value_d3_scene/node_value_d3_scene.gml new file mode 100644 index 000000000..d42be1364 --- /dev/null +++ b/scripts/node_value_d3_scene/node_value_d3_scene.gml @@ -0,0 +1,21 @@ +function nodeValue_D3Scene(_name, _node, _value, _tooltip = "") { return new NodeValue_D3Scene(_name, _node, _value, _tooltip); } + +function NodeValue_D3Scene(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.d3Scene, _value, _tooltip) constructor { + + animable = false; + + /////============== GET ============= + + static valueProcess = function(value, nodeFrom = undefined, applyUnit = true, arrIndex = 0) { return value; } + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + return val; + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + return ds_list_empty(animator.values)? 0 : animator.values[| 0].value; + } +} \ No newline at end of file diff --git a/scripts/node_value_d3_scene/node_value_d3_scene.yy b/scripts/node_value_d3_scene/node_value_d3_scene.yy new file mode 100644 index 000000000..3c00dd373 --- /dev/null +++ b/scripts/node_value_d3_scene/node_value_d3_scene.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_d3_scene", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_d3_scene", + "parent":{ + "name":"3d", + "path":"folders/nodes/values/types/3d.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_dimension/node_value_dimension.gml b/scripts/node_value_dimension/node_value_dimension.gml new file mode 100644 index 000000000..803ccb6d3 --- /dev/null +++ b/scripts/node_value_dimension/node_value_dimension.gml @@ -0,0 +1,72 @@ +function nodeValue_Dimension(_node, _tooltip = "") { return new NodeValue_Dimension(_node, _tooltip); } + +function NodeValue_Dimension(_node, _tooltip = "") : NodeValue("Dimension", _node, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF, _tooltip) constructor { + setDisplay(VALUE_DISPLAY.vector, 2); + + /////============== GET ============= + + static valueProcess = function(value, nodeFrom = undefined, applyUnit = true, arrIndex = 0) { + var typeFrom = nodeFrom == undefined? VALUE_TYPE.any : nodeFrom.type; + + if(typeFrom == VALUE_TYPE.text) value = toNumber(value); + if(validator != noone) value = validator.validate(value); + + return applyUnit? unit.apply(value, arrIndex) : value; + } + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + + var typ = nod == undefined? VALUE_TYPE.any : nod.type; + var dis = nod.display_type; + + if(typ != VALUE_TYPE.surface) { + if(!is_array(val)) val = [ val, val ]; + if(array_length(val) != 2) val = [ array_safe_get_fast(val, 0), array_safe_get_fast(val, 1) ]; + + return valueProcess(val, nod, applyUnit, arrIndex); + } + + // Dimension conversion + if(is_array(val)) { + var eqSize = true; + var sArr = []; + var _osZ = 0; + + for( var i = 0, n = array_length(val); i < n; i++ ) { + if(!is_surface(val[i])) continue; + + var surfSz = surface_get_dimension(val[i]); + array_push(sArr, surfSz); + + if(i && !array_equals(surfSz, _osZ)) + eqSize = false; + + _osZ = surfSz; + } + + if(eqSize) return _osZ; + return sArr; + } else if (is_surface(val)) + return [ surface_get_width_safe(val), surface_get_height_safe(val) ]; + return [ 1, 1 ]; + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + if(node.attributes.use_project_dimension) return PROJECT.attributes.surface_dimension; + + if(!is_anim) { + if(sep_axis) return array_create_ext(2, function(i) /*=>*/ {return animators[i].processType(animators[i].values[| 0].value)}); + return ds_list_empty(animator.values)? 0 : animator.processType(animator.values[| 0].value); + } + + if(sep_axis) { + __temp_time = _time; + return array_create_ext(2, function(i) /*=>*/ {return animators[i].getValue(__temp_time)}); + } + + return animator.getValue(_time); + } +} \ No newline at end of file diff --git a/scripts/node_value_dimension/node_value_dimension.yy b/scripts/node_value_dimension/node_value_dimension.yy new file mode 100644 index 000000000..98f2cbd63 --- /dev/null +++ b/scripts/node_value_dimension/node_value_dimension.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_dimension", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_dimension", + "parent":{ + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_enum_button/node_value_enum_button.gml b/scripts/node_value_enum_button/node_value_enum_button.gml new file mode 100644 index 000000000..37300ab85 --- /dev/null +++ b/scripts/node_value_enum_button/node_value_enum_button.gml @@ -0,0 +1,23 @@ +function nodeValue_Enum_Button(_name, _node, _value, _data) { return new NodeValue_Enum_Button(_name, _node, _value, _data); } + +function NodeValue_Enum_Button(_name, _node, _value, _data) : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.integer, _value) constructor { + setDisplay(VALUE_DISPLAY.enum_button, _data); + + /////============== GET ============= + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + return val; + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + if(is_anim) return animator.getValue(_time); + return ds_list_empty(animator.values)? 0 : animator.values[| 0].value; + } +} + +//Replacement regex +// (nodeValue)(.*self,\s*)(JUNCTION_CONNECT\.input, VALUE_TYPE\.integer,)(.*(?=\)))(.*\n.*)(\.setDisplay\(VALUE_DISPLAY\.enum_button) +// nodeValue_Enum_Button$2$4 \ No newline at end of file diff --git a/scripts/node_value_enum_button/node_value_enum_button.yy b/scripts/node_value_enum_button/node_value_enum_button.yy new file mode 100644 index 000000000..2cdcdb24c --- /dev/null +++ b/scripts/node_value_enum_button/node_value_enum_button.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_enum_button", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_enum_button", + "parent":{ + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_enum_scroll/node_value_enum_scroll.gml b/scripts/node_value_enum_scroll/node_value_enum_scroll.gml new file mode 100644 index 000000000..7003ebcf1 --- /dev/null +++ b/scripts/node_value_enum_scroll/node_value_enum_scroll.gml @@ -0,0 +1,19 @@ +function nodeValue_Enum_Scroll(_name, _node, _value, _data) { return new NodeValue_Enum_Scroll(_name, _node, _value, _data); } + +function NodeValue_Enum_Scroll(_name, _node, _value, _data) : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.integer, _value) constructor { + setDisplay(VALUE_DISPLAY.enum_scroll, _data); + + /////============== GET ============= + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + return val; + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + if(is_anim) return animator.getValue(_time); + return ds_list_empty(animator.values)? 0 : animator.values[| 0].value; + } +} \ No newline at end of file diff --git a/scripts/node_value_enum_scroll/node_value_enum_scroll.yy b/scripts/node_value_enum_scroll/node_value_enum_scroll.yy new file mode 100644 index 000000000..3351808ed --- /dev/null +++ b/scripts/node_value_enum_scroll/node_value_enum_scroll.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_enum_scroll", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_enum_scroll", + "parent":{ + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_float/node_value_float.gml b/scripts/node_value_float/node_value_float.gml index 2100a00ca..7984abd93 100644 --- a/scripts/node_value_float/node_value_float.gml +++ b/scripts/node_value_float/node_value_float.gml @@ -1,33 +1,23 @@ -function nodeValue_Float(_name, _node, _connect, _type, _value, _tooltip = "") { return new NodeValue_Float(_name, _node, _connect, _type, _value, _tooltip); } +function nodeValue_Float(_name, _node, _value, _tooltip = "") { return new NodeValue_Float(_name, _node, _value, _tooltip); } -function NodeValue_Float(_name, _node, _connect, _type, _value, _tooltip = "") : NodeValue(_name, _node, _connect, _type, _value, _tooltip) constructor { +function NodeValue_Float(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.float, _value, _tooltip) constructor { /////============== GET ============= - static valueProcess = function(value, nodeFrom = undefined, applyUnit = true, arrIndex = 0) { - var typeFrom = nodeFrom == undefined? VALUE_TYPE.any : nodeFrom.type; - - if(typeFrom == VALUE_TYPE.text) value = toNumber(value); - if(validator != noone) value = validator.validate(value); - - return value; - } - static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value - draw_junction_index = type; - return _getValue(_time, applyUnit, arrIndex, log); - } - - static _getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, log = false) { - getValueRecursive(self.__curr_get_val, _time); var val = __curr_get_val[0]; var nod = __curr_get_val[1]; - var typ = nod.type; + var typ = nod == undefined? VALUE_TYPE.any : nod.type; var dis = nod.display_type; - if(typ != VALUE_TYPE.surface) return valueProcess(val, nod, applyUnit, arrIndex); + if(typ != VALUE_TYPE.surface) { + if(typ == VALUE_TYPE.text) val = toNumber(val); + if(validator != noone) val = validator.validate(val); + + return val; + } // Dimension conversion if(is_array(val)) { diff --git a/scripts/node_value_float/node_value_float.yy b/scripts/node_value_float/node_value_float.yy index 03dad6db5..ede32e081 100644 --- a/scripts/node_value_float/node_value_float.yy +++ b/scripts/node_value_float/node_value_float.yy @@ -5,8 +5,8 @@ "isDnD":false, "name":"node_value_float", "parent":{ - "name":"types", - "path":"folders/nodes/values/types.yy", + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", }, "resourceType":"GMScript", "resourceVersion":"2.0", diff --git a/scripts/node_value_gradient/node_value_gradient.gml b/scripts/node_value_gradient/node_value_gradient.gml new file mode 100644 index 000000000..bbaafcd19 --- /dev/null +++ b/scripts/node_value_gradient/node_value_gradient.gml @@ -0,0 +1,35 @@ +function nodeValue_Gradient(_name, _node, _value, _tooltip = "") { return new NodeValue_Gradient(_name, _node, _value, _tooltip); } + +function NodeValue_Gradient(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, _value, _tooltip) constructor { + setDisplay(VALUE_DISPLAY.palette); + + /////============== GET ============= + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + + if(is_instanceof(val, gradientObject)) return val; + if(typeFrom != VALUE_TYPE.color) return val; + + if(is_array(val)) { + var amo = array_length(val); + var grad = array_create(amo); + + for( var i = 0; i < amo; i++ ) + grad[i] = new gradientKey(i / amo, val[i]); + + var g = new gradientObject(); + g.keys = grad; + return g; + } + + return is_real(val)? new gradientObject(val) : new gradientObject(cola(c_black)); + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + if(is_anim) return animator.getValue(_time); + return ds_list_empty(animator.values)? 0 : animator.values[| 0].value; + } +} \ No newline at end of file diff --git a/scripts/node_value_gradient/node_value_gradient.yy b/scripts/node_value_gradient/node_value_gradient.yy new file mode 100644 index 000000000..e04d26feb --- /dev/null +++ b/scripts/node_value_gradient/node_value_gradient.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_gradient", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_gradient", + "parent":{ + "name":"colors", + "path":"folders/nodes/values/types/colors.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_int/node_value_int.gml b/scripts/node_value_int/node_value_int.gml new file mode 100644 index 000000000..9c9a7c114 --- /dev/null +++ b/scripts/node_value_int/node_value_int.gml @@ -0,0 +1,51 @@ +function nodeValue_Int(_name, _node, _value, _tooltip = "") { return new NodeValue_Int(_name, _node, _value, _tooltip); } + +function NodeValue_Int(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.integer, _value, _tooltip) constructor { + + /////============== GET ============= + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + + var typ = nod == undefined? VALUE_TYPE.any : nod.type; + var dis = nod.display_type; + + if(typ != VALUE_TYPE.surface) { + if(typ == VALUE_TYPE.text) val = toNumber(val); + if(validator != noone) val = validator.validate(val); + + return val; + } + + // Dimension conversion + if(is_array(val)) { + var eqSize = true; + var sArr = []; + var _osZ = 0; + + for( var i = 0, n = array_length(val); i < n; i++ ) { + if(!is_surface(val[i])) continue; + + var surfSz = surface_get_dimension(val[i]); + array_push(sArr, surfSz); + + if(i && !array_equals(surfSz, _osZ)) + eqSize = false; + + _osZ = surfSz; + } + + if(eqSize) return _osZ; + return sArr; + } else if (is_surface(val)) + return [ surface_get_width_safe(val), surface_get_height_safe(val) ]; + return [ 1, 1 ]; + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + if(is_anim) return animator.getValue(_time); + return ds_list_empty(animator.values)? 0 : animator.values[| 0].value; + } +} \ No newline at end of file diff --git a/scripts/node_value_int/node_value_int.yy b/scripts/node_value_int/node_value_int.yy new file mode 100644 index 000000000..006c9f5f1 --- /dev/null +++ b/scripts/node_value_int/node_value_int.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_int", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_int", + "parent":{ + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_output/node_value_output.gml b/scripts/node_value_output/node_value_output.gml index 392ee687d..74b41e218 100644 --- a/scripts/node_value_output/node_value_output.gml +++ b/scripts/node_value_output/node_value_output.gml @@ -1,6 +1,6 @@ -function nodeValue_Output(_name, _node, _connect, _type, _value, _tooltip = "") { return new NodeValue_Output(_name, _node, _connect, _type, _value, _tooltip); } +function nodeValue_Output(_name, _node, _type, _value, _tooltip = "") { return new NodeValue_Output(_name, _node, _type, _value, _tooltip); } -function NodeValue_Output(_name, _node, _connect, _type, _value, _tooltip = "") : NodeValue(_name, _node, _connect, _type, _value, _tooltip) constructor { +function NodeValue_Output(_name, _node, _type, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.output, _type, _value, _tooltip) constructor { /////============== GET ============= @@ -10,10 +10,6 @@ function NodeValue_Output(_name, _node, _connect, _type, _value, _tooltip = "") return output_value; } - static _getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value - return output_value; - } - static getValueRecursive = function(arr = __curr_get_val, _time = CURRENT_FRAME) { arr[@ 0] = output_value; arr[@ 1] = self; diff --git a/scripts/node_value_padding/node_value_padding.gml b/scripts/node_value_padding/node_value_padding.gml new file mode 100644 index 000000000..589c92e08 --- /dev/null +++ b/scripts/node_value_padding/node_value_padding.gml @@ -0,0 +1,5 @@ +function nodeValue_Padding(_name, _node, _value, _tooltip = "") { return new NodeValue_Padding(_name, _node, _value, _tooltip); } + +function NodeValue_Padding(_name, _node, _value, _tooltip = "") : NodeValue_Array(_name, _node, _value, _tooltip, 4) constructor { + setDisplay(VALUE_DISPLAY.padding); +} \ No newline at end of file diff --git a/scripts/node_value_padding/node_value_padding.yy b/scripts/node_value_padding/node_value_padding.yy new file mode 100644 index 000000000..5ace11978 --- /dev/null +++ b/scripts/node_value_padding/node_value_padding.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_padding", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_padding", + "parent":{ + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_palette/node_value_palette.gml b/scripts/node_value_palette/node_value_palette.gml new file mode 100644 index 000000000..6b7232d22 --- /dev/null +++ b/scripts/node_value_palette/node_value_palette.gml @@ -0,0 +1,21 @@ +function nodeValue_Palette(_name, _node, _value, _tooltip = "") { return new NodeValue_Palette(_name, _node, _value, _tooltip); } + +function NodeValue_Palette(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.color, _value, _tooltip) constructor { + setDisplay(VALUE_DISPLAY.palette); + + /////============== GET ============= + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + + if(!is_array(val)) val = [ val ]; + return val; + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + if(is_anim) return animator.getValue(_time); + return ds_list_empty(animator.values)? 0 : animator.values[| 0].value; + } +} \ No newline at end of file diff --git a/scripts/node_value_palette/node_value_palette.yy b/scripts/node_value_palette/node_value_palette.yy new file mode 100644 index 000000000..0aee0416d --- /dev/null +++ b/scripts/node_value_palette/node_value_palette.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_palette", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_palette", + "parent":{ + "name":"colors", + "path":"folders/nodes/values/types/colors.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_particle/node_value_particle.gml b/scripts/node_value_particle/node_value_particle.gml new file mode 100644 index 000000000..c24d49a38 --- /dev/null +++ b/scripts/node_value_particle/node_value_particle.gml @@ -0,0 +1,5 @@ +function nodeValue_Particle(_name, _node, _value, _tooltip = "") { return new NodeValue_Particle(_name, _node, _value, _tooltip); } + +function NodeValue_Particle(_name, _node, _value, _tooltip = "") : __NodeValue_Object(_name, _node, VALUE_TYPE.particle, _value, _tooltip) constructor { + +} \ No newline at end of file diff --git a/scripts/node_value_particle/node_value_particle.yy b/scripts/node_value_particle/node_value_particle.yy new file mode 100644 index 000000000..7e1b923a4 --- /dev/null +++ b/scripts/node_value_particle/node_value_particle.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_particle", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_particle", + "parent":{ + "name":"object", + "path":"folders/nodes/values/types/object.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_path_anchor/node_value_path_anchor.gml b/scripts/node_value_path_anchor/node_value_path_anchor.gml new file mode 100644 index 000000000..fb4b58a51 --- /dev/null +++ b/scripts/node_value_path_anchor/node_value_path_anchor.gml @@ -0,0 +1,5 @@ +function nodeValue_Path_Anchor(_name, _node, _value, _tooltip = "") { return new NodeValue_Path_Anchor(_name, _node, _value, _tooltip); } + +function NodeValue_Path_Anchor(_name, _node, _value, _tooltip = "") : NodeValue_Array(_name, _node, _value, _tooltip, _ANCHOR.amount) constructor { + setDisplay(VALUE_DISPLAY.path_anchor); +} \ No newline at end of file diff --git a/scripts/node_value_path_anchor/node_value_path_anchor.yy b/scripts/node_value_path_anchor/node_value_path_anchor.yy new file mode 100644 index 000000000..e4c3eb96b --- /dev/null +++ b/scripts/node_value_path_anchor/node_value_path_anchor.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_path_anchor", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_path_anchor", + "parent":{ + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_pathnode/node_value_pathnode.gml b/scripts/node_value_pathnode/node_value_pathnode.gml new file mode 100644 index 000000000..c8fd0ca1b --- /dev/null +++ b/scripts/node_value_pathnode/node_value_pathnode.gml @@ -0,0 +1,5 @@ +function nodeValue_PathNode(_name, _node, _value, _tooltip = "") { return new NodeValue_PathNode(_name, _node, _value, _tooltip); } + +function NodeValue_PathNode(_name, _node, _value, _tooltip = "") : __NodeValue_Object(_name, _node, VALUE_TYPE.pathnode, _value, _tooltip) constructor { + +} \ No newline at end of file diff --git a/scripts/node_value_pathnode/node_value_pathnode.yy b/scripts/node_value_pathnode/node_value_pathnode.yy new file mode 100644 index 000000000..ded362a08 --- /dev/null +++ b/scripts/node_value_pathnode/node_value_pathnode.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_pathnode", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_pathnode", + "parent":{ + "name":"object", + "path":"folders/nodes/values/types/object.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_quarterion/node_value_quarterion.gml b/scripts/node_value_quarterion/node_value_quarterion.gml new file mode 100644 index 000000000..8ed68d6d3 --- /dev/null +++ b/scripts/node_value_quarterion/node_value_quarterion.gml @@ -0,0 +1,20 @@ +function nodeValue_Quaternion(_name, _node, _value, _tooltip = "") { return new NodeValue_Quaternion(_name, _node, _value, _tooltip); } + +function NodeValue_Quaternion(_name, _node, _value, _tooltip = "") : NodeValue_Array(_name, _node, _value, _tooltip, 4) constructor { + setDisplay(VALUE_DISPLAY.d3quarternion); + + /////============== GET ============= + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + + var typ = nod == undefined? VALUE_TYPE.any : nod.type; + var dis = nod.display_type; + + if(applyUnit && display_data.angle_display == QUARTERNION_DISPLAY.euler) + return quarternionFromEuler(val[0], val[1], val[2]); + return val; + } +} \ No newline at end of file diff --git a/scripts/node_value_quarterion/node_value_quarterion.yy b/scripts/node_value_quarterion/node_value_quarterion.yy new file mode 100644 index 000000000..c12051186 --- /dev/null +++ b/scripts/node_value_quarterion/node_value_quarterion.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_quarterion", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_quarterion", + "parent":{ + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_range/node_value_range.gml b/scripts/node_value_range/node_value_range.gml new file mode 100644 index 000000000..5adf83683 --- /dev/null +++ b/scripts/node_value_range/node_value_range.gml @@ -0,0 +1,30 @@ +function nodeValue_Range(_name, _node, _value, _tooltip = "") { return new NodeValue_Range(_name, _node, _value, _tooltip); } + +function NodeValue_Range(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.float, _value, _tooltip) constructor { + setDisplay(VALUE_DISPLAY.range); + + /////============== GET ============= + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + + if(!is_array(val)) val = [ val, val ]; + return val; + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + if(!is_anim) { + if(sep_axis) return array_create_ext(2, function(i) /*=>*/ {return animators[i].processType(animators[i].values[| 0].value)}); + return ds_list_empty(animator.values)? 0 : animator.processType(animator.values[| 0].value); + } + + if(sep_axis) { + __temp_time = _time; + return array_create_ext(2, function(i) /*=>*/ {return animators[i].getValue(__temp_time)}); + } + + return animator.getValue(_time); + } +} \ No newline at end of file diff --git a/scripts/node_value_range/node_value_range.yy b/scripts/node_value_range/node_value_range.yy new file mode 100644 index 000000000..1587da9dc --- /dev/null +++ b/scripts/node_value_range/node_value_range.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_range", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_range", + "parent":{ + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_rotation/node_value_rotation.gml b/scripts/node_value_rotation/node_value_rotation.gml new file mode 100644 index 000000000..166a1ca65 --- /dev/null +++ b/scripts/node_value_rotation/node_value_rotation.gml @@ -0,0 +1,22 @@ +function nodeValue_Rotation_Random(_name, _node, _value, _tooltip = "") { return new NodeValue_Rotation_Random(_name, _node, _value, _tooltip); } + +function NodeValue_Rotation_Random(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.float, _value, _tooltip) constructor { + setDisplay(VALUE_DISPLAY.rotation); + + /////============== GET ============= + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + var typ = nod == undefined? VALUE_TYPE.any : nod.type; + + if(typ == VALUE_TYPE.text) val = toNumber(val); + return val; + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + if(is_anim) return animator.getValue(_time); + return ds_list_empty(animator.values)? 0 : animator.values[| 0].value; + } +} \ No newline at end of file diff --git a/scripts/node_value_rotation/node_value_rotation.yy b/scripts/node_value_rotation/node_value_rotation.yy new file mode 100644 index 000000000..2f5131ce6 --- /dev/null +++ b/scripts/node_value_rotation/node_value_rotation.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_rotation", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_rotation", + "parent":{ + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_rotation_random/node_value_rotation_random.gml b/scripts/node_value_rotation_random/node_value_rotation_random.gml new file mode 100644 index 000000000..521d35ffb --- /dev/null +++ b/scripts/node_value_rotation_random/node_value_rotation_random.gml @@ -0,0 +1,8 @@ +#macro ROTATION_RANDOM_LENGTH 5 + +function nodeValue_Rotation_Random(_name, _node, _value, _tooltip = "") { return new NodeValue_Rotation_Random(_name, _node, _value, _tooltip); } + +function NodeValue_Rotation_Random(_name, _node, _value, _tooltip = "") : NodeValue_Array(_name, _node, _value, _tooltip, ROTATION_RANDOM_LENGTH) constructor { + setDisplay(VALUE_DISPLAY.rotation_random); + +} \ No newline at end of file diff --git a/scripts/node_value_rotation_random/node_value_rotation_random.yy b/scripts/node_value_rotation_random/node_value_rotation_random.yy new file mode 100644 index 000000000..63dbbd35b --- /dev/null +++ b/scripts/node_value_rotation_random/node_value_rotation_random.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_rotation_random", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_rotation_random", + "parent":{ + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_rotation_range/node_value_rotation_range.gml b/scripts/node_value_rotation_range/node_value_rotation_range.gml new file mode 100644 index 000000000..4c5ed1c32 --- /dev/null +++ b/scripts/node_value_rotation_range/node_value_rotation_range.gml @@ -0,0 +1,6 @@ +function nodeValue_Rotation_Range(_name, _node, _value, _tooltip = "") { return new NodeValue_Rotation_Range(_name, _node, _value, _tooltip); } + +function NodeValue_Rotation_Range(_name, _node, _value, _tooltip = "") : NodeValue_Array(_name, _node, _value, _tooltip, 2) constructor { + setDisplay(VALUE_DISPLAY.rotation_range); + +} \ No newline at end of file diff --git a/scripts/node_value_rotation_range/node_value_rotation_range.yy b/scripts/node_value_rotation_range/node_value_rotation_range.yy new file mode 100644 index 000000000..ac19d3c55 --- /dev/null +++ b/scripts/node_value_rotation_range/node_value_rotation_range.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_rotation_range", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_rotation_range", + "parent":{ + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_sdf/node_value_sdf.gml b/scripts/node_value_sdf/node_value_sdf.gml new file mode 100644 index 000000000..b492b950e --- /dev/null +++ b/scripts/node_value_sdf/node_value_sdf.gml @@ -0,0 +1,5 @@ +function nodeValue_SDF(_name, _node, _value, _tooltip = "") { return new NodeValue_SDF(_name, _node, _value, _tooltip); } + +function NodeValue_SDF(_name, _node, _value, _tooltip = "") : __NodeValue_Object(_name, _node, VALUE_TYPE.sdf, _value, _tooltip) constructor { + +} \ No newline at end of file diff --git a/scripts/node_value_sdf/node_value_sdf.yy b/scripts/node_value_sdf/node_value_sdf.yy new file mode 100644 index 000000000..b1c860a3d --- /dev/null +++ b/scripts/node_value_sdf/node_value_sdf.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_sdf", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_sdf", + "parent":{ + "name":"object", + "path":"folders/nodes/values/types/object.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_slider_range/node_value_slider_range.gml b/scripts/node_value_slider_range/node_value_slider_range.gml new file mode 100644 index 000000000..a1c04f95a --- /dev/null +++ b/scripts/node_value_slider_range/node_value_slider_range.gml @@ -0,0 +1,6 @@ +function nodeValue_Slider_Range(_name, _node, _value, _tooltip = "") { return new NodeValue_Slider_Range(_name, _node, _value, _tooltip); } + +function NodeValue_Slider_Range(_name, _node, _value, _tooltip = "") : NodeValue_Array(_name, _node, _value, _tooltip, 2) constructor { + setDisplay(VALUE_DISPLAY.slider_range); + +} \ No newline at end of file diff --git a/scripts/node_value_slider_range/node_value_slider_range.yy b/scripts/node_value_slider_range/node_value_slider_range.yy new file mode 100644 index 000000000..f017a26a3 --- /dev/null +++ b/scripts/node_value_slider_range/node_value_slider_range.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_slider_range", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_slider_range", + "parent":{ + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_struct/node_value_struct.gml b/scripts/node_value_struct/node_value_struct.gml new file mode 100644 index 000000000..d82816359 --- /dev/null +++ b/scripts/node_value_struct/node_value_struct.gml @@ -0,0 +1,5 @@ +function nodeValue_Struct(_name, _node, _value, _tooltip = "") { return new NodeValue_Struct(_name, _node, _value, _tooltip); } + +function NodeValue_Struct(_name, _node, _value, _tooltip = "") : __NodeValue_Object(_name, _node, VALUE_TYPE.struct, _value, _tooltip) constructor { + +} \ No newline at end of file diff --git a/scripts/node_value_struct/node_value_struct.yy b/scripts/node_value_struct/node_value_struct.yy new file mode 100644 index 000000000..8998c449e --- /dev/null +++ b/scripts/node_value_struct/node_value_struct.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_struct", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_struct", + "parent":{ + "name":"object", + "path":"folders/nodes/values/types/object.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_surface/node_value_surface.gml b/scripts/node_value_surface/node_value_surface.gml new file mode 100644 index 000000000..0e39c022d --- /dev/null +++ b/scripts/node_value_surface/node_value_surface.gml @@ -0,0 +1,24 @@ +function nodeValue_Surface(_name, _node, _value = noone, _tooltip = "") { return new NodeValue_Surface(_name, _node, _value, _tooltip); } + +function NodeValue_Surface(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.surface, _value, _tooltip) constructor { + + animable = false; + + /////============== GET ============= + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + + draw_junction_index = VALUE_TYPE.surface; + if(is_instanceof(val, SurfaceAtlas) || (array_valid(val) && is_instanceof(val[0], SurfaceAtlas))) + draw_junction_index = VALUE_TYPE.atlas; + + return val; + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + return ds_list_empty(animator.values)? noone : animator.values[| 0].value; + } +} \ No newline at end of file diff --git a/scripts/node_value_surface/node_value_surface.yy b/scripts/node_value_surface/node_value_surface.yy new file mode 100644 index 000000000..fb511673d --- /dev/null +++ b/scripts/node_value_surface/node_value_surface.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_surface", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_surface", + "parent":{ + "name":"types", + "path":"folders/nodes/values/types.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_text/node_value_text.gml b/scripts/node_value_text/node_value_text.gml new file mode 100644 index 000000000..cd9edbc72 --- /dev/null +++ b/scripts/node_value_text/node_value_text.gml @@ -0,0 +1,18 @@ +function nodeValue_Text(_name, _node, _value, _tooltip = "") { return new NodeValue_Text(_name, _node, _value, _tooltip); } + +function NodeValue_Text(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.text, _value, _tooltip) constructor { + + /////============== GET ============= + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + return string(val); + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + if(is_anim) return animator.getValue(_time); + return ds_list_empty(animator.values)? 0 : animator.values[| 0].value; + } +} \ No newline at end of file diff --git a/scripts/node_value_text/node_value_text.yy b/scripts/node_value_text/node_value_text.yy new file mode 100644 index 000000000..62462d386 --- /dev/null +++ b/scripts/node_value_text/node_value_text.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_text", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_text", + "parent":{ + "name":"types", + "path":"folders/nodes/values/types.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_trigger/node_value_trigger.gml b/scripts/node_value_trigger/node_value_trigger.gml new file mode 100644 index 000000000..63772041b --- /dev/null +++ b/scripts/node_value_trigger/node_value_trigger.gml @@ -0,0 +1,17 @@ +function nodeValue_Trigger(_name, _node, _value, _tooltip = "") { return new NodeValue_Trigger(_name, _node, _value, _tooltip); } + +function NodeValue_Trigger(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, _value, _tooltip) constructor { + + /////============== GET ============= + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + return val; + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + return ds_list_empty(animator.values)? 0 : animator.values[| 0].value; + } +} \ No newline at end of file diff --git a/scripts/node_value_trigger/node_value_trigger.yy b/scripts/node_value_trigger/node_value_trigger.yy new file mode 100644 index 000000000..e563de780 --- /dev/null +++ b/scripts/node_value_trigger/node_value_trigger.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_trigger", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_trigger", + "parent":{ + "name":"types", + "path":"folders/nodes/values/types.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_types/node_value_types.gml b/scripts/node_value_types/node_value_types.gml index 8e65d7d59..efd856ef4 100644 --- a/scripts/node_value_types/node_value_types.gml +++ b/scripts/node_value_types/node_value_types.gml @@ -67,7 +67,7 @@ enum VALUE_DISPLAY { none, range, - //Int + //Number enum_scroll, enum_button, rotation, @@ -79,7 +79,7 @@ enum VALUE_DISPLAY { //Color palette, - //Int array + //Number array padding, vector, vector_range, diff --git a/scripts/node_value_vec2/node_value_vec2.gml b/scripts/node_value_vec2/node_value_vec2.gml new file mode 100644 index 000000000..347003e4c --- /dev/null +++ b/scripts/node_value_vec2/node_value_vec2.gml @@ -0,0 +1,70 @@ +function nodeValue_Vec2(_name, _node, _value, _tooltip = "") { return new NodeValue_Vec2(_name, _node, _value, _tooltip); } + +function NodeValue_Vec2(_name, _node, _value, _tooltip = "") : NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.float, _value, _tooltip) constructor { + setDisplay(VALUE_DISPLAY.vector, 2); + + /////============== GET ============= + + static valueProcess = function(value, nodeFrom = undefined, applyUnit = true, arrIndex = 0) { + var typeFrom = nodeFrom == undefined? VALUE_TYPE.any : nodeFrom.type; + + if(typeFrom == VALUE_TYPE.text) value = toNumber(value); + if(validator != noone) value = validator.validate(value); + + return applyUnit? unit.apply(value, arrIndex) : value; + } + + static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { //// Get value + getValueRecursive(self.__curr_get_val, _time); + var val = __curr_get_val[0]; + var nod = __curr_get_val[1]; + + var typ = nod == undefined? VALUE_TYPE.any : nod.type; + var dis = nod.display_type; + + if(typ != VALUE_TYPE.surface) { + if(!is_array(val)) val = [ val, val ]; + if(array_length(val) != 2) val = [ array_safe_get_fast(val, 0), array_safe_get_fast(val, 1) ]; + + return valueProcess(val, nod, applyUnit, arrIndex); + } + + // Dimension conversion + if(is_array(val)) { + var eqSize = true; + var sArr = []; + var _osZ = 0; + + for( var i = 0, n = array_length(val); i < n; i++ ) { + if(!is_surface(val[i])) continue; + + var surfSz = surface_get_dimension(val[i]); + array_push(sArr, surfSz); + + if(i && !array_equals(surfSz, _osZ)) + eqSize = false; + + _osZ = surfSz; + } + + if(eqSize) return _osZ; + return sArr; + } else if (is_surface(val)) + return [ surface_get_width_safe(val), surface_get_height_safe(val) ]; + return [ 1, 1 ]; + } + + static __getAnimValue = function(_time = CURRENT_FRAME) { + if(!is_anim) { + if(sep_axis) return array_create_ext(2, function(i) /*=>*/ {return animators[i].processType(animators[i].values[| 0].value)}); + return ds_list_empty(animator.values)? 0 : animator.processType(animator.values[| 0].value); + } + + if(sep_axis) { + __temp_time = _time; + return array_create_ext(2, function(i) /*=>*/ {return animators[i].getValue(__temp_time)}); + } + + return animator.getValue(_time); + } +} \ No newline at end of file diff --git a/scripts/node_value_vec2/node_value_vec2.yy b/scripts/node_value_vec2/node_value_vec2.yy new file mode 100644 index 000000000..16bb8e2d8 --- /dev/null +++ b/scripts/node_value_vec2/node_value_vec2.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_vec2", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_vec2", + "parent":{ + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_vec2_range/node_value_vec2_range.gml b/scripts/node_value_vec2_range/node_value_vec2_range.gml new file mode 100644 index 000000000..c649f70b4 --- /dev/null +++ b/scripts/node_value_vec2_range/node_value_vec2_range.gml @@ -0,0 +1,6 @@ +function nodeValue_Vec2_Range(_name, _node, _value, _tooltip = "") { return new NodeValue_Vec2_Range(_name, _node, _value, _tooltip); } + +function NodeValue_Vec2_Range(_name, _node, _value, _data, _tooltip = "") : NodeValue_Array(_name, _node, _value, _tooltip, 4) constructor { + setDisplay(VALUE_DISPLAY.vector_range, _data); + +} \ No newline at end of file diff --git a/scripts/node_value_vec2_range/node_value_vec2_range.yy b/scripts/node_value_vec2_range/node_value_vec2_range.yy new file mode 100644 index 000000000..50737dbc3 --- /dev/null +++ b/scripts/node_value_vec2_range/node_value_vec2_range.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_vec2_range", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_vec2_range", + "parent":{ + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_vec3/node_value_vec3.gml b/scripts/node_value_vec3/node_value_vec3.gml new file mode 100644 index 000000000..3b5f43b68 --- /dev/null +++ b/scripts/node_value_vec3/node_value_vec3.gml @@ -0,0 +1,5 @@ +function nodeValue_Vec3(_name, _node, _value, _tooltip = "") { return new NodeValue_Vec3(_name, _node, _value, _tooltip); } + +function NodeValue_Vec3(_name, _node, _value, _tooltip = "") : NodeValue_Array(_name, _node, _value, _tooltip, 3) constructor { + setDisplay(VALUE_DISPLAY.vector, 3); +} \ No newline at end of file diff --git a/scripts/node_value_vec3/node_value_vec3.yy b/scripts/node_value_vec3/node_value_vec3.yy new file mode 100644 index 000000000..c7d347ac7 --- /dev/null +++ b/scripts/node_value_vec3/node_value_vec3.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_vec3", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_vec3", + "parent":{ + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_vec3_range/node_value_vec3_range.gml b/scripts/node_value_vec3_range/node_value_vec3_range.gml new file mode 100644 index 000000000..87fabc91f --- /dev/null +++ b/scripts/node_value_vec3_range/node_value_vec3_range.gml @@ -0,0 +1,6 @@ +function nodeValue_Vec3_Range(_name, _node, _value, _tooltip = "") { return new NodeValue_Vec3_Range(_name, _node, _value, _tooltip); } + +function NodeValue_Vec3_Range(_name, _node, _value, _data, _tooltip = "") : NodeValue_Array(_name, _node, _value, _tooltip, 6) constructor { + setDisplay(VALUE_DISPLAY.vector_range, _data); + +} \ No newline at end of file diff --git a/scripts/node_value_vec3_range/node_value_vec3_range.yy b/scripts/node_value_vec3_range/node_value_vec3_range.yy new file mode 100644 index 000000000..23eb91d8a --- /dev/null +++ b/scripts/node_value_vec3_range/node_value_vec3_range.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_vec3_range", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_vec3_range", + "parent":{ + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_value_vec4/node_value_vec4.gml b/scripts/node_value_vec4/node_value_vec4.gml new file mode 100644 index 000000000..5d68cca55 --- /dev/null +++ b/scripts/node_value_vec4/node_value_vec4.gml @@ -0,0 +1,5 @@ +function nodeValue_Vec4(_name, _node, _value, _tooltip = "") { return new NodeValue_Vec4(_name, _node, _value, _tooltip); } + +function NodeValue_Vec4(_name, _node, _value, _tooltip = "") : NodeValue_Array(_name, _node, _value, _tooltip, 4) constructor { + setDisplay(VALUE_DISPLAY.vector, 4); +} \ No newline at end of file diff --git a/scripts/node_value_vec4/node_value_vec4.yy b/scripts/node_value_vec4/node_value_vec4.yy new file mode 100644 index 000000000..ee6e26bfb --- /dev/null +++ b/scripts/node_value_vec4/node_value_vec4.yy @@ -0,0 +1,13 @@ +{ + "$GMScript":"", + "%Name":"node_value_vec4", + "isCompatibility":false, + "isDnD":false, + "name":"node_value_vec4", + "parent":{ + "name":"numeric", + "path":"folders/nodes/values/types/numeric.yy", + }, + "resourceType":"GMScript", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/scripts/node_vector2/node_vector2.gml b/scripts/node_vector2/node_vector2.gml index ef12e382e..168333f2a 100644 --- a/scripts/node_vector2/node_vector2.gml +++ b/scripts/node_vector2/node_vector2.gml @@ -12,8 +12,7 @@ function Node_Vector2(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 2] = nodeValue("Integer", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 3] = nodeValue("Display", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Number", "Coordinate" ]); + inputs[| 3] = nodeValue_Enum_Scroll("Display", self, 0, [ "Number", "Coordinate" ]); outputs[| 0] = nodeValue("Vector", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_vignette/node_vignette.gml b/scripts/node_vignette/node_vignette.gml index 1f2ae5093..fbe829206 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; diff --git a/scripts/node_voronoi_extra/node_voronoi_extra.gml b/scripts/node_voronoi_extra/node_voronoi_extra.gml index e325218a2..0a89f3364 100644 --- a/scripts/node_voronoi_extra/node_voronoi_extra.gml +++ b/scripts/node_voronoi_extra/node_voronoi_extra.gml @@ -18,16 +18,14 @@ function Node_Voronoi_Extra(_x, _y, _group = noone) : Node_Shader_Generator(_x, inputs[| 4] = nodeValue("Progress", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) addShaderProp(SHADER_UNIFORM.float, "progress"); - inputs[| 5] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Block", "Triangle" ]); + inputs[| 5] = nodeValue_Enum_Scroll("Mode", self, 0, [ "Block", "Triangle" ]); addShaderProp(SHADER_UNIFORM.integer, "mode"); inputs[| 6] = nodeValue("Parameter A", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); addShaderProp(SHADER_UNIFORM.float, "paramA"); - inputs[| 7] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 7] = nodeValue_Rotation("Rotation", self, 0); addShaderProp(SHADER_UNIFORM.float, "rotation"); input_display_list = [ diff --git a/scripts/node_warp/node_warp.gml b/scripts/node_warp/node_warp.gml index 50f736c1b..a3d4bcf04 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Top left", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] ) .setDisplay(VALUE_DISPLAY.vector) @@ -24,8 +24,7 @@ function Node_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 6] = nodeValue("Use custom dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 7] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 7] = nodeValue_Dimension(self); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_wav_file_write/node_wav_file_write.gml b/scripts/node_wav_file_write/node_wav_file_write.gml index 65651239d..b235ee8bc 100644 --- a/scripts/node_wav_file_write/node_wav_file_write.gml +++ b/scripts/node_wav_file_write/node_wav_file_write.gml @@ -14,8 +14,7 @@ function Node_WAV_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) cons inputs[| 2] = nodeValue("Sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 44100); - inputs[| 3] = nodeValue("Bit Depth", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "8 bit positive", "16 bit integer" ]); + inputs[| 3] = nodeValue_Enum_Scroll("Bit Depth", self, 0, [ "8 bit positive", "16 bit integer" ]); inputs[| 4] = nodeValue("Remap Data", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) diff --git a/scripts/node_wavelet_noise/node_wavelet_noise.gml b/scripts/node_wavelet_noise/node_wavelet_noise.gml index 0c42fc7b4..048528edd 100644 --- a/scripts/node_wavelet_noise/node_wavelet_noise.gml +++ b/scripts/node_wavelet_noise/node_wavelet_noise.gml @@ -35,8 +35,7 @@ function Node_Wavelet_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, ////////////////////////////////////////////////////////////////////////////////// - inputs[| 9] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation); + inputs[| 9] = nodeValue_Rotation("Rotation", self, 0); addShaderProp(SHADER_UNIFORM.float, "rotation"); input_display_list = [ diff --git a/scripts/node_websocket_receiver/node_websocket_receiver.gml b/scripts/node_websocket_receiver/node_websocket_receiver.gml index d9f856e7b..19fa90b79 100644 --- a/scripts/node_websocket_receiver/node_websocket_receiver.gml +++ b/scripts/node_websocket_receiver/node_websocket_receiver.gml @@ -5,8 +5,7 @@ function Node_Websocket_Receiver(_x, _y, _group = noone) : Node(_x, _y, _group) inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); - inputs[| 2] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Client", "Server" ]); + inputs[| 2] = nodeValue_Enum_Button("Mode", self, 1, [ "Client", "Server" ]); inputs[| 3] = nodeValue("Url", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); diff --git a/scripts/node_websocket_sender/node_websocket_sender.gml b/scripts/node_websocket_sender/node_websocket_sender.gml index 52cfeadbe..0f5973319 100644 --- a/scripts/node_websocket_sender/node_websocket_sender.gml +++ b/scripts/node_websocket_sender/node_websocket_sender.gml @@ -3,12 +3,11 @@ function Node_Websocket_Sender(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[| 0] = nodeValue("Port", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 22800); - inputs[| 1] = nodeValue("Data type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Struct", "Surface", "File", "Buffer" ]); + inputs[| 1] = nodeValue_Enum_Scroll("Data type", self, 0, [ "Struct", "Surface", "File", "Buffer" ]); inputs[| 2] = nodeValue("Struct", self, JUNCTION_CONNECT.input, VALUE_TYPE.struct, {}); - inputs[| 3] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + inputs[| 3] = nodeValue_Surface("Surface", self); inputs[| 4] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") .setDisplay(VALUE_DISPLAY.path_load) diff --git a/scripts/node_widget_test/node_widget_test.gml b/scripts/node_widget_test/node_widget_test.gml index 205921240..51b8edc9c 100644 --- a/scripts/node_widget_test/node_widget_test.gml +++ b/scripts/node_widget_test/node_widget_test.gml @@ -42,7 +42,7 @@ function Node_Widget_Test(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 31] = nodeValue("textArea", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "") .setDisplay(VALUE_DISPLAY.codeHLSL) inputs[| 32] = nodeValue("textArrayBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, []) .setDisplay(VALUE_DISPLAY.text_array, { data: [ "Choice 1", "Choice 2" ] }) - inputs[| 33] = nodeValue("surfaceBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) .setDisplay(VALUE_DISPLAY._default) + inputs[| 33] = nodeValue_Surface("surfaceBox", self) .setDisplay(VALUE_DISPLAY._default) input_display_list = [ ["Number", false], 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, diff --git a/scripts/node_wrap_area/node_wrap_area.gml b/scripts/node_wrap_area/node_wrap_area.gml index 8f18bddbf..75c5b4e54 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); onSurfaceSize = function() { return surface_get_dimension(getInputData(0)); }; inputs[| 1] = nodeValue("Area", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, DEF_AREA_REF ) diff --git a/scripts/node_wrap_perspective/node_wrap_perspective.gml b/scripts/node_wrap_perspective/node_wrap_perspective.gml index 489f939e7..e03c04d36 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, noone); + inputs[| 0] = nodeValue_Surface("Surface in", self); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; diff --git a/scripts/node_zigzag/node_zigzag.gml b/scripts/node_zigzag/node_zigzag.gml index 4dd72ad83..c1630f483 100644 --- a/scripts/node_zigzag/node_zigzag.gml +++ b/scripts/node_zigzag/node_zigzag.gml @@ -1,8 +1,7 @@ function Node_Zigzag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Zigzag"; - inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) - .setDisplay(VALUE_DISPLAY.vector); + inputs[| 0] = nodeValue_Dimension(self); inputs[| 1] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }) @@ -16,8 +15,7 @@ function Node_Zigzag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 4] = nodeValue("Color 2", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); - inputs[| 5] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "Solid", "Smooth", "AA" ]); + inputs[| 5] = nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ]); ////////////////////////////////////////////////////////////////////////////////// @@ -27,8 +25,7 @@ function Node_Zigzag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co ////////////////////////////////////////////////////////////////////////////////// - inputs[| 8] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.rotation) + inputs[| 8] = nodeValue_Rotation("Angle", self, 0) .setMappable(7); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/panel_graph/panel_graph.gml b/scripts/panel_graph/panel_graph.gml index e1ea30bc2..1c4001756 100644 --- a/scripts/panel_graph/panel_graph.gml +++ b/scripts/panel_graph/panel_graph.gml @@ -1,4 +1,4 @@ -#region function calls +// function calls function __fnInit_Graph() { __registerFunction("graph_add_node", panel_graph_add_node); __registerFunction("graph_focus_content", panel_graph_focus_content); @@ -100,9 +100,9 @@ PANEL_GRAPH.graph_zooming_key = true; } -#endregion -function connectionParameter() constructor { #region + +function connectionParameter() constructor { // log = false; active = true; @@ -147,7 +147,7 @@ function connectionParameter() constructor { #region self.aa = _aa; self.bg = _bg; } -} #endregion +} //// ========== Graph Panel ========== @@ -167,7 +167,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { resetContext(); } - #region ---- display ---- + // ---- display ---- display_parameter = { show_grid : true, show_dimension : true, @@ -186,9 +186,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { bg_color = c_black; slider_width = 0; - #endregion - #region ---- position ---- + + // ---- position ---- graph_x = 0; graph_y = 0; graph_cx = 0; @@ -224,9 +224,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { drag_key = PREFERENCES.pan_mouse_key; drag_locking = false; - #endregion - #region ---- mouse ---- + + // ---- mouse ---- mouse_graph_x = 0; mouse_graph_y = 0; mouse_grid_x = 0; @@ -239,9 +239,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { mouse_on_graph = false; node_bg_hovering = false; - #endregion - #region ---- nodes ---- + + // ---- nodes ---- node_context = []; nodes_list = []; @@ -291,9 +291,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { frame_hovering = noone; _frame_hovering = noone; - #endregion - #region ---- minimap ---- + + // ---- minimap ---- minimap_show = false; minimap_w = ui(160); minimap_h = ui(160); @@ -305,17 +305,17 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { minimap_drag_sy = 0; minimap_drag_mx = 0; minimap_drag_my = 0; - #endregion - #region ---- context frame ---- + + // ---- context frame ---- context_framing = false; context_frame_progress = 0; context_frame_direct = 0; context_frame_sx = 0; context_frame_ex = 0; context_frame_sy = 0; context_frame_ey = 0; - #endregion - #region ---- search ---- + + // ---- search ---- is_searching = false; search_string = ""; search_index = 0; @@ -324,7 +324,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { tb_search = new textBox(TEXTBOX_INPUT.text, function(str) /*=>*/ { search_string = string(str); searchNodes(); }); tb_search.align = fa_left; tb_search.auto_update = true; - #endregion + toolbar_height = ui(40); @@ -374,7 +374,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { function initSize() { toCenterNode(); } - #region ++++ hotkeys ++++ + // ++++ hotkeys ++++ addHotkey("Graph", "Add node", "A", MOD_KEY.none, panel_graph_add_node); addHotkey("Graph", "Focus content", "F", MOD_KEY.none, panel_graph_focus_content); addHotkey("Graph", "Preview focusing node", "P", MOD_KEY.none, panel_graph_preview_focus); @@ -421,9 +421,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { addHotkey("Graph", "Auto Align", "L", MOD_KEY.none, panel_graph_auto_align); addHotkey("Graph", "Search", "F", MOD_KEY.ctrl, panel_graph_search); addHotkey("Graph", "Toggle Minimap", "M", MOD_KEY.ctrl, panel_graph_toggle_minimap); - #endregion - #region ++++ toolbars ++++ + + // ++++ toolbars ++++ tooltip_center = new tooltipHotkey(__txtx("panel_graph_center_to_nodes", "Center to nodes"), "Graph", "Focus content"); tooltip_search = new tooltipHotkey(__txt("Search"), "Graph", "Search"); tooltip_minimap = new tooltipHotkey(__txtx("panel_graph_toggle_minimap", "Toggle minimap"), "Graph", "Toggle Minimap"); @@ -491,7 +491,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { ]; toolbars = [ toolbars_general ]; - #endregion + //// =========== Get Set =========== @@ -603,7 +603,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { _canvas.inputs[| 0].setValue([surface_get_width_safe(surf), surface_get_height_safe(surf)]); _canvas.inputs[| 5].setValue(true); - var _blend = new Node_Blend(_node.x + _node.w + 64, _node.y, getCurrentContext()).skipDefault(); + var _blend = nodeBuild("Node_Blend", _node.x + _node.w + 64, _node.y).skipDefault(); _blend.inputs[| 0].setFrom(_outp); _blend.inputs[| 1].setFrom(_canvas.outputs[| 0]); } @@ -681,7 +681,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { menu_connection_tunnel = menuItem(__txtx("panel_graph_tunnel", "Create tunnels"), function() /*=>*/ { createTunnel(); }); - #region node color + // node color function setSelectingNodeColor(color) { __temp_color = color; @@ -710,9 +710,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { menu_node_color = menuItemGroup(__txt("Node Color"), _item); menu_node_color.spacing = ui(24); - #endregion - #region junction color + + // junction color __junction_hovering = noone; function setSelectingJuncColor(color) { @@ -751,7 +751,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { menu_junc_color = menuItemGroup(__txt("Connection Color"), _item); menu_junc_color.spacing = ui(24); - #endregion + //// ============ Project ============ @@ -768,14 +768,14 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { //// ============ Views ============ - function onFocusBegin() { #region + function onFocusBegin() { // PANEL_GRAPH = self; PROJECT = project; nodes_select_drag = 0; - } #endregion + } - function focusNode(_node) { #region + function focusNode(_node) { // if(_node == noone) { nodes_selecting = []; return; @@ -783,7 +783,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { nodes_selecting = [ _node ]; fullView(); - } #endregion + } function fullView() { INLINE @@ -1029,7 +1029,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { //// ============ Step ============ - function stepBegin() { #region + function stepBegin() { // var gr_x = graph_x * graph_s; var gr_y = graph_y * graph_s; var m_x = (mx - gr_x) / graph_s; @@ -1041,11 +1041,11 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { mouse_grid_y = round(m_y / project.graphGrid.size) * project.graphGrid.size; setTitle(); - } #endregion + } //// ============ Draw ============ - function drawGrid() { #region + function drawGrid() { // if(!display_parameter.show_grid) return; var gls = project.graphGrid.size; while(gls * graph_s < 8) gls *= 5; @@ -1080,9 +1080,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { yy += gr_ls; } draw_set_alpha(1); - } #endregion + } - function drawViewControl() { #region + function drawViewControl() { // if(h < ui(96)) return; view_hovering = false; @@ -1147,9 +1147,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { draw_circle_ui(_d3x, _d3y, d3_view_wz, _hv? 0 : 0.04, COLORS._main_icon, 0.3); draw_sprite_ui(THEME.view_zoom, 0, _d3x, _d3y, 1, 1, 0, view_zoom_tool? COLORS._main_accent : COLORS._main_icon, 1); - } #endregion + } - function drawBasePreview() { #region + function drawBasePreview() { // var gr_x = graph_x * graph_s; var gr_y = graph_y * graph_s; var _hov = false; @@ -1160,9 +1160,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { } return _hov; - } #endregion + } - function drawNodes() { #region + function drawNodes() { // if(selection_block-- > 0) return; var _focus = pFOCUS && !view_hovering; @@ -1191,7 +1191,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { } printIf(log, $"Predraw time: {get_timer() - t}"); t = get_timer(); - #region draw frame + // draw frame for(var i = 0; i < array_length(nodes_list); i++) { var _node = nodes_list[i]; if(!display_parameter.show_control && _node.is_controller) continue; @@ -1199,10 +1199,10 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { if(_node.drawNodeBG(gr_x, gr_y, mx, my, graph_s, display_parameter, self)) frame_hovering = _node; } - #endregion + printIf(log, $"Frame draw time: {get_timer() - t}"); t = get_timer(); - #region hover + // hover node_hovering = noone; if(pHOVER) for(var i = 0; i < array_length(nodes_list); i++) { @@ -1229,13 +1229,13 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { } if(node_hovering) node_hovering.onDrawHover(gr_x, gr_y, mx, my, graph_s); - #endregion + printIf(log, $"Hover time: {get_timer() - t}"); t = get_timer(); - #region ++++++++++++ interaction ++++++++++++ + // ++++++++++++ interaction ++++++++++++ if(mouse_on_graph && pHOVER) { - #region select + // select var _anc = nodes_select_anchor; if(mouse_press(mb_left, _focus)) _anc = noone; @@ -1317,9 +1317,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { } nodes_select_anchor = _anc; - #endregion - if(mouse_press(mb_right, _focus)) { #region + + if(mouse_press(mb_right, _focus)) { // node_hover = node_hovering; if(value_focus) { @@ -1428,19 +1428,19 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { _dia.passthrough = true; setFocus(_diaAdd, "Dialog"); } - } #endregion + } - if(is_instanceof(frame_hovering, Node_Collection_Inline) && DOUBLE_CLICK && array_empty(nodes_selecting)) { #region + if(is_instanceof(frame_hovering, Node_Collection_Inline) && DOUBLE_CLICK && array_empty(nodes_selecting)) { // nodes_selecting = [ frame_hovering ]; if(frame_hovering.onDoubleClick != -1) frame_hovering.onDoubleClick(self) if(frame_hovering.previewable) PANEL_PREVIEW.setNodePreview(frame_hovering); - } #endregion + } } - #endregion + printIf(log, $"Node selection time: {get_timer() - t}"); t = get_timer(); - #region draw active + // draw active for(var i = 0; i < array_length(nodes_selecting); i++) { var _node = nodes_selecting[i]; if(!_node) continue; @@ -1448,10 +1448,10 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { } if(nodes_select_anchor) nodes_select_anchor.active_draw_anchor = true; - #endregion + printIf(log, $"Draw active: {get_timer() - t}"); t = get_timer(); - #region draw connections + // draw connections var aa = floor(min(8192 / w, 8192 / h, PREFERENCES.connection_line_aa)); connection_surface = surface_verify(connection_surface, w * aa, h * aa); @@ -1513,10 +1513,10 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { BLEND_NORMAL junction_hovering = node_hovering == noone? hov : noone; - #endregion + printIf(log, $"Draw connection: {get_timer() - t}"); t = get_timer(); - #region draw node + // draw node _value_focus = value_focus; value_focus = noone; @@ -1564,10 +1564,10 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { if(PANEL_INSPECTOR && PANEL_INSPECTOR.prop_hover != noone) value_focus = PANEL_INSPECTOR.prop_hover; - #endregion + printIf(log, $"Draw node: {get_timer() - t}"); t = get_timer(); - #region dragging + // dragging if(mouse_press(mb_left)) node_dragging = noone; @@ -1623,10 +1623,10 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { if(mouse_release(mb_left)) node_dragging = noone; - #endregion + printIf(log, $"Drag node time : {get_timer() - t}"); t = get_timer(); - if(mouse_on_graph && _focus) { #region + if(mouse_on_graph && _focus) { // var _node = getFocusingNode(); if(_node && _node.draggable && value_focus == noone) { if(mouse_press(mb_left) && !key_mod_press(ALT)) { @@ -1645,13 +1645,13 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { var _mx = round(mouse_graph_x / project.graphGrid.size) * project.graphGrid.size; var _my = round(mouse_graph_y / project.graphGrid.size) * project.graphGrid.size; - var _pin = nodeBuild("Node_Pin", _mx, _my); + var _pin = nodeBuild("Node_Pin", _mx, _my).skipDefault(); _pin.inputs[| 0].setFrom(junction_hovering.value_from); junction_hovering.setFrom(_pin.outputs[| 0]); } - } #endregion + } - #region draw selection frame + // draw selection frame if(nodes_select_drag) { if(point_distance(nodes_select_mx, nodes_select_my, mx, my) > 16) nodes_select_drag = 2; @@ -1716,9 +1716,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { drag_locking = false; } - #endregion + printIf(log, $"Draw selection frame : {get_timer() - t}"); t = get_timer(); - } #endregion + } function connectDraggingValueTo(target) { var _connect = [ 0, noone, noone ]; @@ -1810,7 +1810,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { var junc_in = data.params.junc_in; var junc_out = data.params.junc_out; - var feed = nodeBuild("Node_Feedback_Inline", 0, 0); + var feed = nodeBuild("Node_Feedback_Inline", 0, 0).skipDefault(); // feed.connectJunctions(junc_in, junc_out); feed.attributes.junc_in = [ junc_in .node.node_id, junc_in .index ]; feed.attributes.junc_out = [ junc_out.node.node_id, junc_out.index ]; @@ -1822,7 +1822,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { var junc_in = data.params.junc_in; var junc_out = data.params.junc_out; - var feed = nodeBuild("Node_Iterate_Inline", 0, 0); + var feed = nodeBuild("Node_Iterate_Inline", 0, 0).skipDefault(); feed.attributes.junc_in = [ junc_in .node.node_id, junc_in .index ]; feed.attributes.junc_out = [ junc_out.node.node_id, junc_out.index ]; feed.scanJunc(); @@ -2010,7 +2010,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { } - function callAddDialog(ctx = getCurrentContext()) { #region + function callAddDialog(ctx = getCurrentContext()) { // var _dia = dialogCall(o_dialog_add_node, mouse_mx + 8, mouse_my + 8, { context: ctx }); with(_dia) { @@ -2025,9 +2025,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { } return _dia; - } #endregion + } - function drawContext() { #region + function drawContext() { // draw_set_text(f_p0, fa_left, fa_center); var xx = ui(16), tt, tw, th; var bh = toolbar_height - ui(12); @@ -2078,9 +2078,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { } return xx; - } #endregion + } - function drawToolBar() { #region + function drawToolBar() { // toolbar_height = ui(40); var ty = h - toolbar_height; @@ -2139,9 +2139,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { tbx -= ui(6); } - } #endregion + } - function drawMinimap() { #region + function drawMinimap() { // if(!minimap_show) return; var mx1 = w - ui(8); var my1 = h - toolbar_height - ui(8); @@ -2254,7 +2254,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { } } else draw_sprite_ui(THEME.node_resize, 0, mx0 + ui(10), my0 + ui(10), 0.5, 0.5, 180, c_white, 0.3); - } #endregion + } function drawSearch() { if(!is_searching) return; @@ -2406,7 +2406,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { } } - function drawContent(panel) { #region //// Main Draw + function drawContent(panel) { // //// Main Draw if(!project.active) return; dragGraph(); @@ -2509,7 +2509,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { } } - } #endregion + } //// ============ Action ============ @@ -2565,7 +2565,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { var _o = node.outputs[| 0]; if(_o.type == VALUE_TYPE.surface || _o.type == VALUE_TYPE.dynaSurface) { - var tr = nodeBuild("Node_Transform", node.x + node.w + 64, node.y); + var tr = nodeBuild("Node_Transform", node.x + node.w + 64, node.y).skipDefault(); tr.inputs[| 0].setFrom(_o); } } @@ -2600,7 +2600,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { var _nodeS = _pmap[$ _pkey]; CLONING_GROUP = _original; - var _newGroup = nodeBuild(_nodeS, _original.x, _original.y); + var _newGroup = nodeBuild(_nodeS, _original.x, _original.y).skipDefault(); APPEND_MAP[? _pkey] = _newGroup; } @@ -2649,7 +2649,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { CLONING = true; var _type = instanceof(node); - var _node = nodeBuild(_type, x, y); + var _node = nodeBuild(_type, x, y).skipDefault(); CLONING = false; _node.setInstance(node); @@ -2663,7 +2663,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { node_drag_ox = _nodeNew.x; node_drag_oy = _nodeNew.y; } - function doCopy() { #region + function doCopy() { // if(array_empty(nodes_selecting)) return; clipboard_set_text(""); @@ -2673,9 +2673,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { SAVE_NODE(_map.nodes, nodes_selecting[i],,,, getCurrentContext()); clipboard_set_text(json_stringify_minify(_map)); - } #endregion + } - function doPaste() { #region + function doPaste() { // var txt = clipboard_get_text(); var _map = json_try_parse(txt, noone); @@ -2739,9 +2739,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { args[0].doUpdate(); }, args]; } - } #endregion + } - function doBlend() { #region + function doBlend() { // if(array_length(nodes_selecting) != 2) return; var _n0 = nodes_selecting[0].y < nodes_selecting[1].y? nodes_selecting[0] : nodes_selecting[1]; @@ -2754,21 +2754,21 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { var _j1 = _n1.outputs[| 0]; if(_j0.type == VALUE_TYPE.surface && _j1.type == VALUE_TYPE.surface) { - var _blend = new Node_Blend(cx, cy, getCurrentContext()).skipDefault(); + var _blend = nodeBuild("Node_Blend", cx, cy, getCurrentContext()).skipDefault().skipDefault(); _blend.inputs[| 0].setFrom(_j0); _blend.inputs[| 1].setFrom(_j1); } else if((_j0.type == VALUE_TYPE.integer || _j0.type == VALUE_TYPE.float) && (_j1.type == VALUE_TYPE.integer || _j1.type == VALUE_TYPE.float)) { - var _blend = new Node_Math(cx, cy, getCurrentContext()).skipDefault(); + var _blend = nodeBuild("Node_Math", cx, cy, getCurrentContext()).skipDefault().skipDefault(); _blend.inputs[| 1].setFrom(_j0); _blend.inputs[| 2].setFrom(_j1); } nodes_selecting = []; - } #endregion + } - function doCompose() { #region + function doCompose() { // if(array_empty(nodes_selecting)) return; var cx = nodes_selecting[0].x; @@ -2793,7 +2793,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { cx = cx + 160; cy = round(cy / len / 32) * 32; - var _compose = new Node_Composite(cx, cy, getCurrentContext()).skipDefault(); + var _compose = nodeBuild("Node_Composite", cx, cy, getCurrentContext()).skipDefault(); repeat(len) { var _node = ds_priority_delete_min(pr); @@ -2802,9 +2802,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { nodes_selecting = []; ds_priority_destroy(pr); - } #endregion + } - function doArray() { #region + function doArray() { // if(array_empty(nodes_selecting)) return; var cx = nodes_selecting[0].x; @@ -2827,7 +2827,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { cx = cx + 160; cy = round(cy / len / 32) * 32; - var _array = nodeBuild("Node_Array", cx, cy); + var _array = nodeBuild("Node_Array", cx, cy).skipDefault(); repeat(len) { var _node = ds_priority_delete_min(pr); @@ -2836,22 +2836,22 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { nodes_selecting = []; ds_priority_destroy(pr); - } #endregion + } - function doGroup() { #region + function doGroup() { // if(array_empty(nodes_selecting)) return; groupNodes(nodes_selecting); - } #endregion + } - function doUngroup() { #region + function doUngroup() { // var _node = getFocusingNode(); if(_node == noone) return; if(!is_instanceof(_node, Node_Collection) || !_node.ungroupable) return; upgroupNode(_node); - } #endregion + } - function doFrame() { #region + function doFrame() { // var x0 = 999999, y0 = 999999, x1 = -999999, y1 = -999999; for( var i = 0; i < array_length(nodes_selecting); i++ ) { @@ -2867,11 +2867,11 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { x1 += 64; y1 += 64; - var f = new Node_Frame(x0, y0, getCurrentContext()).skipDefault(); + var f = nodeBuild("Node_Frame", x0, y0, getCurrentContext()).skipDefault(); f.inputs[| 0].setValue([x1 - x0, y1 - y0]); - } #endregion + } - function doDelete(_merge = false) { #region + function doDelete(_merge = false) { // __temp_merge = _merge; for(i = array_length(nodes_selecting) - 1; i >= 0; i--) { @@ -2880,15 +2880,15 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { _node.destroy(__temp_merge); } nodes_selecting = []; - } #endregion + } node_prop_clipboard = noone; - function doCopyProp() { #region + function doCopyProp() { // if(node_hover == noone) return; node_prop_clipboard = node_hover; - } #endregion + } - function doPasteProp() { #region + function doPasteProp() { // if(node_hover == noone) return; if(node_prop_clipboard == noone) return; if(!node_prop_clipboard.active) return; @@ -2910,65 +2910,65 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { node_hover.clearInputCache(); RENDER_PARTIAL - } #endregion + } - function dropFile(path) { #region + function dropFile(path) { // if(node_hovering && is_callable(node_hovering.on_drop_file)) return node_hovering.on_drop_file(path); return false; - } #endregion + } - static checkDropItem = function() { #region + static checkDropItem = function() { // var node = noone; switch(DRAGGING.type) { case "Color": - node = nodeBuild("Node_Color", mouse_grid_x, mouse_grid_y, getCurrentContext()); + node = nodeBuild("Node_Color", mouse_grid_x, mouse_grid_y).skipDefault(); node.inputs[| 0].setValue(DRAGGING.data); break; case "Palette": - node = nodeBuild("Node_Palette", mouse_grid_x, mouse_grid_y, getCurrentContext()); + node = nodeBuild("Node_Palette", mouse_grid_x, mouse_grid_y).skipDefault(); node.inputs[| 0].setValue(DRAGGING.data); break; case "Gradient": - node = nodeBuild("Node_Gradient_Out", mouse_grid_x, mouse_grid_y, getCurrentContext()); + node = nodeBuild("Node_Gradient_Out", mouse_grid_x, mouse_grid_y).skipDefault(); node.inputs[| 0].setValue(DRAGGING.data); break; case "Number": if(is_array(DRAGGING.data) && array_length(DRAGGING.data) <= 4) { switch(array_length(DRAGGING.data)) { - case 2 : node = nodeBuild("Node_Vector2", mouse_grid_x, mouse_grid_y, getCurrentContext()); break; - case 3 : node = nodeBuild("Node_Vector3", mouse_grid_x, mouse_grid_y, getCurrentContext()); break; - case 4 : node = nodeBuild("Node_Vector4", mouse_grid_x, mouse_grid_y, getCurrentContext()); break; + case 2 : node = nodeBuild("Node_Vector2", mouse_grid_x, mouse_grid_y).skipDefault(); break; + case 3 : node = nodeBuild("Node_Vector3", mouse_grid_x, mouse_grid_y).skipDefault(); break; + case 4 : node = nodeBuild("Node_Vector4", mouse_grid_x, mouse_grid_y).skipDefault(); break; } for( var i = 0, n = array_length(DRAGGING.data); i < n; i++ ) node.inputs[| i].setValue(DRAGGING.data[i]); } else { - node = nodeBuild("Node_Number", mouse_grid_x, mouse_grid_y, getCurrentContext()); + node = nodeBuild("Node_Number", mouse_grid_x, mouse_grid_y).skipDefault(); node.inputs[| 0].setValue(DRAGGING.data); } break; case "Bool": - node = nodeBuild("Node_Boolean", mouse_grid_x, mouse_grid_y, getCurrentContext()); + node = nodeBuild("Node_Boolean", mouse_grid_x, mouse_grid_y).skipDefault(); node.inputs[| 0].setValue(DRAGGING.data); break; case "Text": - node = nodeBuild("Node_String", mouse_grid_x, mouse_grid_y, getCurrentContext()); + node = nodeBuild("Node_String", mouse_grid_x, mouse_grid_y).skipDefault(); node.inputs[| 0].setValue(DRAGGING.data); break; case "Path": - node = nodeBuild("Node_Path", mouse_grid_x, mouse_grid_y, getCurrentContext()); + node = nodeBuild("Node_Path", mouse_grid_x, mouse_grid_y).skipDefault(); break; case "Struct": - node = nodeBuild("Node_Struct", mouse_grid_x, mouse_grid_y, getCurrentContext()); + node = nodeBuild("Node_Struct", mouse_grid_x, mouse_grid_y).skipDefault(); break; case "Asset": @@ -3015,14 +3015,14 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { for( var i = 0; i < ds_list_size(node.outputs); i++ ) if(DRAGGING.from.setFrom(node.outputs[| i])) break; } - } #endregion + } - static bringNodeToFront = function(node) { #region + static bringNodeToFront = function(node) { // if(!array_exists(nodes_list, node)) return; array_remove(nodes_list, node); array_push(nodes_list, node); - } #endregion + } static onFullScreen = function() { run_in(1, fullView); } @@ -3097,8 +3097,8 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { var _key = $"{__junction_hovering.name} {seed_random(3)}"; - var _ti = nodeBuild("Node_Tunnel_In", _jo.rx + 32, _jo.ry); - var _to = nodeBuild("Node_Tunnel_Out", _ji.rx - 32, _ji.ry); + var _ti = nodeBuild("Node_Tunnel_In", _jo.rx + 32, _jo.ry).skipDefault(); + var _to = nodeBuild("Node_Tunnel_Out", _ji.rx - 32, _ji.ry).skipDefault(); _to.inputs[| 0].setValue(_key); _ti.inputs[| 0].setValue(_key); @@ -3147,7 +3147,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { return self; } - function close() { #region + function close() { // var panels = findPanels("Panel_Graph"); for( var i = 0, n = array_length(panels); i < n; i++ ) { @@ -3168,7 +3168,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { var dia = dialogCall(o_dialog_save); dia.project = project; - } #endregion + } setProject(project); initSize();