From 0025f9ab1b66fcb2b9c3704565494122df66f6ce Mon Sep 17 00:00:00 2001 From: Tanasart Date: Sun, 18 Aug 2024 11:16:20 +0700 Subject: [PATCH] newinput thing --- .../__node_3d_displace/__node_3d_displace.gml | 20 ++--- scripts/__node_3d_export/__node_3d_export.gml | 2 +- .../__node_3d_extrude/__node_3d_extrude.gml | 24 +++--- scripts/__node_3d_light/__node_3d_light.gml | 4 +- scripts/__node_3d_obj/__node_3d_obj.gml | 14 ++-- scripts/__node_3d_object/__node_3d_object.gml | 6 +- scripts/__node_3d_plane/__node_3d_plane.gml | 18 ++--- .../__node_3d_prim_cone.gml | 24 +++--- .../__node_3d_prim_cube.gml | 34 ++++----- .../__node_3d_prim_cylinder.gml | 28 +++---- .../__node_3d_prim_sphere.gml | 20 ++--- scripts/__node_3d_render/__node_3d_render.gml | 8 +- scripts/__node_3d_repeat/__node_3d_repeat.gml | 30 ++++---- .../__node_3d_transform.gml | 16 ++-- .../__node_process_template.gml | 2 +- .../__node_shader_generator.gml | 2 +- .../__node_shader_processor.gml | 2 +- scripts/__node_template/__node_template.gml | 2 +- .../_node_VFX_spawner/_node_VFX_spawner.gml | 76 +++++++++---------- .../_node_strand_affector.gml | 8 +- scripts/mask_function/mask_function.gml | 2 +- .../nodd_mk_delay_machine.gml | 12 +-- scripts/node_2d_light/node_2d_light.gml | 14 ++-- scripts/node_3d_camera/node_3d_camera.gml | 34 ++++----- scripts/node_3d_depth/node_3d_depth.gml | 6 +- .../node_3d_instancer/node_3d_instancer.gml | 2 +- .../node_3d_light_directional.gml | 8 +- scripts/node_3d_material/node_3d_material.gml | 8 +- .../node_3d_mesh_cone/node_3d_mesh_cone.gml | 2 +- .../node_3d_mesh_cube/node_3d_mesh_cube.gml | 2 +- .../node_3d_mesh_cylinder.gml | 4 +- .../node_3d_mesh_export.gml | 4 +- .../node_3d_mesh_extrude.gml | 12 +-- .../node_3d_mesh_path_extrude.gml | 12 +-- .../node_3d_mesh_plane/node_3d_mesh_plane.gml | 2 +- .../node_3d_mesh_sphere_ico.gml | 2 +- .../node_3d_mesh_sphere_uv.gml | 2 +- .../node_3d_mesh_stack_slice.gml | 8 +- .../node_3d_mesh_terrain.gml | 10 +-- scripts/node_3d_particle/node_3d_particle.gml | 2 +- .../node_3d_point_affector.gml | 8 +- scripts/node_3d_repeat/node_3d_repeat.gml | 14 ++-- .../node_3d_mesh_plane.gml | 2 +- .../node_3d_transform_scene.gml | 6 +- scripts/node_3dsurf/node_3dsurf.gml | 4 +- scripts/node_9slice/node_9slice.gml | 6 +- scripts/node_FFT/node_FFT.gml | 2 +- .../node_FLIP_apply_force.gml | 4 +- .../node_FLIP_apply_velocity.gml | 6 +- .../node_FLIP_destroy/node_FLIP_destroy.gml | 4 +- scripts/node_FLIP_domain/node_FLIP_domain.gml | 18 ++--- scripts/node_FLIP_render/node_FLIP_render.gml | 20 ++--- scripts/node_FLIP_repel/node_FLIP_repel.gml | 2 +- .../node_FLIP_spawner/node_FLIP_spawner.gml | 18 ++--- scripts/node_FLIP_update/node_FLIP_update.gml | 6 +- scripts/node_FLIP_vortex/node_FLIP_vortex.gml | 2 +- scripts/node_FLIP_wall/node_FLIP_wall.gml | 2 +- scripts/node_FXAA/node_FXAA.gml | 4 +- scripts/node_FXAA/node_bw.gml | 6 +- .../node_PCX_array_get/node_PCX_array_get.gml | 4 +- .../node_PCX_array_set/node_PCX_array_set.gml | 6 +- .../node_PCX_condition/node_PCX_condition.gml | 6 +- .../node_PCX_equation/node_PCX_equation.gml | 2 +- scripts/node_PCX_fn_math/node_PCX_fn_math.gml | 6 +- .../node_PCX_fn_random/node_PCX_fn_random.gml | 6 +- .../node_PCX_fn_surface_height.gml | 2 +- .../node_PCX_fn_surface_width.gml | 2 +- scripts/node_PCX_fn_var/node_PCX_fn_var.gml | 2 +- scripts/node_PCX_var/node_PCX_var.gml | 4 +- scripts/node_VFX_attract/node_VFX_attract.gml | 2 +- .../node_VFX_oscillate/node_VFX_oscillate.gml | 6 +- .../node_VFX_override/node_VFX_override.gml | 10 +-- .../node_VFX_renderer/node_VFX_renderer.gml | 2 +- .../node_VFX_renderer_output.gml | 2 +- scripts/node_VFX_spawner/node_VFX_spawner.gml | 2 +- scripts/node_VFX_trail/node_VFX_trail.gml | 4 +- .../node_VFX_triangulate.gml | 10 +-- .../node_VFX_turbulence.gml | 4 +- scripts/node_VFX_vortex/node_VFX_vortex.gml | 6 +- .../node_active_canvas/node_active_canvas.gml | 16 ++-- .../node_alpha_cutoff/node_alpha_cutoff.gml | 6 +- scripts/node_alpha_grey/node_alpha_grey.gml | 4 +- scripts/node_alpha_hash/node_alpha_hash.gml | 2 +- scripts/node_anim_curve/node_anim_curve.gml | 8 +- .../node_animation_control.gml | 14 ++-- .../node_application_in.gml | 2 +- scripts/node_area/node_area.gml | 2 +- scripts/node_argument/node_argument.gml | 6 +- scripts/node_armature/node_armature.gml | 2 +- .../node_armature_bind/node_armature_bind.gml | 14 ++-- .../node_armature_sample.gml | 2 +- scripts/node_array_copy/node_array_copy.gml | 4 +- .../node_array_csv_parse.gml | 2 +- .../node_array_insert/node_array_insert.gml | 2 +- .../node_array_remove/node_array_remove.gml | 2 +- scripts/node_array_set/node_array_set.gml | 2 +- .../node_ase_file_read/node_ase_file_read.gml | 4 +- scripts/node_atlas/node_atlas.gml | 6 +- scripts/node_atlas_draw/node_atlas_draw.gml | 2 +- scripts/node_atlas_set/node_atlas_set.gml | 14 ++-- .../node_audio_window/node_audio_window.gml | 8 +- scripts/node_average/node_average.gml | 8 +- .../node_base_convert/node_base_convert.gml | 4 +- scripts/node_bend/node_bend.gml | 10 +-- scripts/node_bevel/node_bevel.gml | 12 +-- scripts/node_blend/node_blend.gml | 20 ++--- scripts/node_blend_edge/node_blend_edge.gml | 8 +- scripts/node_blobify/node_blobify.gml | 4 +- scripts/node_blobify/node_bw.gml | 6 +- scripts/node_bloom/node_bloom.gml | 14 ++-- scripts/node_blur/node_blur.gml | 16 ++-- scripts/node_blur_bokeh/node_blur_bokeh.gml | 10 +-- scripts/node_blur_bokeh/node_bw.gml | 6 +- .../node_blur_contrast/node_blur_contrast.gml | 10 +-- .../node_blur_directional.gml | 16 ++-- scripts/node_blur_directional/node_bw.gml | 6 +- scripts/node_blur_path/node_blur_path.gml | 16 ++-- scripts/node_blur_radial/node_blur_radial.gml | 12 +-- scripts/node_blur_radial/node_bw.gml | 6 +- scripts/node_blur_shape/node_blur_shape.gml | 16 ++-- scripts/node_blur_simple/node_blur_simple.gml | 22 +++--- scripts/node_blur_slope/node_blur_slope.gml | 14 ++-- scripts/node_blur_slope/node_bw.gml | 6 +- scripts/node_blur_zoom/node_blur_zoom.gml | 16 ++-- scripts/node_blur_zoom/node_bw.gml | 6 +- scripts/node_boolean/node_boolean.gml | 4 +- scripts/node_box_pattern/node_box_pattern.gml | 16 ++-- .../node_brush_linear/node_brush_linear.gml | 10 +-- scripts/node_bw/node_bw.gml | 12 +-- scripts/node_cache/node_cache.gml | 2 +- scripts/node_cache_array/node_cache_array.gml | 8 +- scripts/node_camera/node_camera.gml | 18 ++--- scripts/node_canvas/node_canvas.gml | 28 +++---- .../node_canvas_group/node_canvas_group.gml | 2 +- scripts/node_caustic/node_caustic.gml | 2 +- scripts/node_cellular/node_cellular.gml | 10 +-- scripts/node_checker/node_checker.gml | 12 +-- .../node_chromatic_aberration.gml | 6 +- scripts/node_color/node_color.gml | 2 +- .../node_color_adjust/node_color_adjust.gml | 16 ++-- scripts/node_color_data/node_color_data.gml | 2 +- scripts/node_color_hsv/node_color_hsv.gml | 2 +- scripts/node_color_mix/node_color_mix.gml | 6 +- .../node_color_remove/node_color_remove.gml | 14 ++-- .../node_color_replace/node_color_replace.gml | 22 +++--- scripts/node_color_rgb/node_color_rgb.gml | 2 +- scripts/node_colorize/node_colorize.gml | 16 ++-- .../node_colors_replace.gml | 8 +- scripts/node_combine_hsv/node_combine_hsv.gml | 10 +-- scripts/node_combine_rgb/node_combine_rgb.gml | 14 ++-- scripts/node_composite/node_composite.gml | 12 +-- scripts/node_condition/node_condition.gml | 4 +- scripts/node_convolution/node_convolution.gml | 8 +- scripts/node_corner/node_corner.gml | 8 +- scripts/node_counter/node_counter.gml | 4 +- scripts/node_crop/node_crop.gml | 12 +-- .../node_crop_content/node_crop_content.gml | 6 +- .../node_cross_section/node_cross_section.gml | 8 +- scripts/node_curve/node_curve.gml | 18 ++--- scripts/node_curve_hsv/node_curve_hsv.gml | 14 ++-- scripts/node_de_corner/node_de_corner.gml | 10 +-- scripts/node_de_stray/node_de_stray.gml | 10 +-- scripts/node_delay/node_delay.gml | 4 +- scripts/node_diffuse/node_diffuse.gml | 14 ++-- scripts/node_dilate/node_dilate.gml | 8 +- .../node_directory_search.gml | 4 +- scripts/node_displace/node_displace.gml | 16 ++-- .../node_display_text/node_display_text.gml | 2 +- scripts/node_dither/node_dither.gml | 18 ++--- scripts/node_dll/node_dll.gml | 6 +- scripts/node_dust/node_dust.gml | 2 +- .../node_dynasurf_out/node_dynasurf_out.gml | 16 ++-- .../node_dynasurf_out_height.gml | 2 +- .../node_dynasurf_out_width.gml | 2 +- scripts/node_edge_detect/node_edge_detect.gml | 10 +-- scripts/node_edge_shade/node_edge_shade.gml | 8 +- scripts/node_equation/node_equation.gml | 2 +- scripts/node_erode/node_erode.gml | 12 +-- scripts/node_export/node_export.gml | 12 +-- scripts/node_find_pixel/node_find_pixel.gml | 10 +-- scripts/node_flip/node_flip.gml | 6 +- scripts/node_flood_fill/node_flood_fill.gml | 14 ++-- scripts/node_flow_noise/node_flow_noise.gml | 6 +- scripts/node_fn/node_fn.gml | 2 +- scripts/node_fn_constant/node_fn_constant.gml | 2 +- scripts/node_fn_ease/node_fn_ease.gml | 6 +- scripts/node_fn_math/node_fn_math.gml | 2 +- .../node_fn_smoothstep/node_fn_smoothstep.gml | 2 +- .../node_fn_wave_table/node_fn_wave_table.gml | 2 +- scripts/node_fn_wiggler/node_fn_wiggler.gml | 4 +- scripts/node_fold_noise/node_fold_noise.gml | 8 +- scripts/node_gabor_noise/node_gabor_noise.gml | 12 +-- scripts/node_gamma_map/node_gamma_map.gml | 6 +- scripts/node_glow/node_glow.gml | 14 ++-- scripts/node_gradient/node_gradient.gml | 20 ++--- .../node_gradient_out/node_gradient_out.gml | 2 +- .../node_gradient_palette.gml | 4 +- .../node_gradient_points.gml | 14 ++-- .../node_gradient_replace_color.gml | 4 +- scripts/node_grain/node_grain.gml | 22 +++--- scripts/node_grey_alpha/node_grey_alpha.gml | 8 +- scripts/node_greyscale/node_greyscale.gml | 8 +- scripts/node_grid/node_grid.gml | 40 +++++----- scripts/node_grid_hex/node_grid_hex.gml | 30 ++++---- scripts/node_grid_noise/node_grid_noise.gml | 16 ++-- .../node_grid_pentagonal.gml | 24 +++--- scripts/node_grid_tri/node_grid_tri.gml | 30 ++++---- scripts/node_group_input/node_group_input.gml | 12 +-- .../node_herringbone_tile.gml | 30 ++++---- scripts/node_hlsl/node_hlsl.gml | 6 +- scripts/node_honey_noise/node_honey_noise.gml | 8 +- scripts/node_hsv_channel/node_hsv_channel.gml | 4 +- .../node_http_request/node_http_request.gml | 4 +- scripts/node_image/node_image.gml | 2 +- .../node_image_animated.gml | 4 +- scripts/node_image_gif/node_image_gif.gml | 10 +-- scripts/node_image_sheet/node_image_sheet.gml | 22 +++--- scripts/node_interlaced/node_interlaced.gml | 14 ++-- .../node_interpret_number.gml | 8 +- scripts/node_invert/node_invert.gml | 10 +-- scripts/node_isosurf/node_isosurf.gml | 2 +- scripts/node_jpeg/node_jpeg.gml | 14 ++-- scripts/node_kuwahara/node_kuwahara.gml | 10 +-- scripts/node_lerp/node_lerp.gml | 6 +- scripts/node_level/node_level.gml | 28 +++---- scripts/node_level_selector/node_level.gml | 6 +- .../node_level_selector.gml | 14 ++-- scripts/node_line/node_line.gml | 50 ++++++------ .../node_local_analyze/node_local_analyze.gml | 10 +-- scripts/node_lovify/node_lovify.gml | 2 +- scripts/node_lua_compute/node_lua_compute.gml | 4 +- scripts/node_lua_global/node_lua_global.gml | 2 +- scripts/node_lua_surface/node_lua_surface.gml | 4 +- scripts/node_math/node_math.gml | 6 +- .../node_mesh_create_path.gml | 4 +- .../node_mesh_transform.gml | 8 +- scripts/node_mesh_warp/node_mesh_warp.gml | 8 +- scripts/node_mirror/node_mirror.gml | 6 +- scripts/node_mk_blinker/node_mk_blinker.gml | 12 +-- scripts/node_mk_brownian/node_mk_brownian.gml | 26 +++---- scripts/node_mk_cable/node_mk_cable.gml | 6 +- scripts/node_mk_fall/node_mk_fall.gml | 40 +++++----- scripts/node_mk_flag/node_mk_flag.gml | 14 ++-- scripts/node_mk_flame/node_mk_flame.gml | 4 +- scripts/node_mk_flare/node_mk_flare.gml | 4 +- scripts/node_mk_fracture/node_mk_fracture.gml | 14 ++-- .../node_mk_gridballs/node_mk_gridballs.gml | 22 +++--- scripts/node_mk_gridflip/node_mk_gridflip.gml | 16 ++-- scripts/node_mk_rain/node_mk_rain.gml | 30 ++++---- scripts/node_mk_saber/node_mk_saber.gml | 14 ++-- scripts/node_mk_sparkle/node_mk_sparkle.gml | 12 +-- scripts/node_mk_tile/node_mk_tile.gml | 28 +++---- scripts/node_module_test/node_module_test.gml | 6 +- .../node_morph_surface/node_morph_surface.gml | 4 +- scripts/node_move_point/node_move_point.gml | 8 +- scripts/node_noise/node_noise.gml | 10 +-- scripts/node_noise_aniso/node_noise_aniso.gml | 8 +- .../node_noise_bubble/node_noise_bubble.gml | 8 +- .../node_noise_cristal/node_noise_cristal.gml | 10 +-- scripts/node_noise_fbm/node_noise_fbm.gml | 16 ++-- scripts/node_noise_hex/node_noise_hex.gml | 10 +-- .../node_noise_simplex/node_noise_simplex.gml | 18 ++--- .../node_noise_strand/node_noise_strand.gml | 12 +-- scripts/node_noise_tri/node_noise_tri.gml | 10 +-- scripts/node_normal/node_normal.gml | 6 +- .../node_normal_light/node_normal_light.gml | 20 ++--- scripts/node_normalize/node_normalize.gml | 4 +- scripts/node_number/node_number.gml | 10 +-- scripts/node_offset/node_offset.gml | 4 +- scripts/node_onion_skin/node_onion_skin.gml | 4 +- scripts/node_outline/node_outline.gml | 22 +++--- .../node_override_channel.gml | 12 +-- .../node_pack_sprites/node_pack_sprites.gml | 10 +-- scripts/node_padding/node_padding.gml | 14 ++-- scripts/node_palette/node_palette.gml | 4 +- .../node_palette_extract.gml | 2 +- .../node_palette_replace.gml | 4 +- .../node_palette_shift/node_palette_shift.gml | 10 +-- .../node_palette_sort/node_palette_sort.gml | 2 +- scripts/node_particle/node_particle.gml | 12 +-- scripts/node_path/node_path.gml | 2 +- scripts/node_path_3d/node_path_3d.gml | 2 +- scripts/node_path_anchor/node_path_anchor.gml | 6 +- scripts/node_path_bake/node_path_bake.gml | 4 +- .../node_path_builder/node_path_builder.gml | 2 +- .../node_path_from_mask.gml | 4 +- .../node_path_l_system/node_path_l_system.gml | 18 ++--- scripts/node_path_map/node_path_map.gml | 4 +- .../node_path_map_area/node_path_map_area.gml | 2 +- scripts/node_path_plot/node_path_plot.gml | 16 ++-- .../node_path_profile/node_path_profile.gml | 16 ++-- scripts/node_path_sample/node_path_sample.gml | 4 +- .../node_path_scatter/node_path_scatter.gml | 18 ++--- .../node_path_separate_folder.gml | 2 +- scripts/node_path_shift/node_path_shift.gml | 2 +- scripts/node_path_smooth/node_path_smooth.gml | 2 +- .../node_path_transform.gml | 8 +- scripts/node_path_trim/node_path_trim.gml | 2 +- scripts/node_path_wave/node_path_wave.gml | 16 ++-- .../node_pb_box_contract.gml | 4 +- .../node_pb_box_divide/node_pb_box_divide.gml | 8 +- .../node_pb_box_divide_grid.gml | 4 +- .../node_pb_box_inset/node_pb_box_inset.gml | 4 +- .../node_pb_box_mirror/node_pb_box_mirror.gml | 4 +- .../node_pb_box_split/node_pb_box_split.gml | 4 +- .../node_pb_box_transform.gml | 2 +- scripts/node_pb_draw/node_pb_draw.gml | 4 +- .../node_pb_draw_angle/node_pb_draw_angle.gml | 2 +- .../node_pb_draw_line/node_pb_draw_line.gml | 2 +- .../node_pb_draw_round_rectangle.gml | 8 +- .../node_pb_draw_semi_ellipse.gml | 2 +- .../node_pb_draw_trapezoid.gml | 4 +- scripts/node_pb_fx_brick/node_pb_fx_brick.gml | 10 +-- scripts/node_pb_fx_hash/node_pb_fx_hash.gml | 8 +- .../node_pb_fx_highlight.gml | 6 +- .../node_pb_fx_outline/node_pb_fx_outline.gml | 6 +- .../node_pb_fx_shading/node_pb_fx_shading.gml | 4 +- scripts/node_pb_fx_stack/node_pb_fx_stack.gml | 12 +-- scripts/node_pb_fx_strip/node_pb_fx_strip.gml | 8 +- scripts/node_pb_layer/node_pb_layer.gml | 2 +- scripts/node_perlin/node_perlin.gml | 18 ++--- .../node_perlin_extra/node_perlin_extra.gml | 22 +++--- .../node_perlin_smear/node_perlin_smear.gml | 8 +- .../node_pixel_builder/node_pixel_builder.gml | 2 +- scripts/node_pixel_cloud/node_pixel_cloud.gml | 14 ++-- .../node_pixel_sampler/node_pixel_sampler.gml | 12 +-- scripts/node_pixel_sort/node_pixel_sort.gml | 10 +-- scripts/node_plot_linear/node_plot_linear.gml | 50 ++++++------ .../node_point_in_area/node_point_in_area.gml | 6 +- scripts/node_polar/node_polar.gml | 12 +-- scripts/node_posterize/node_posterize.gml | 14 ++-- scripts/node_print/node_print.gml | 4 +- .../node_pytagorean_tile.gml | 30 ++++---- .../node_quasicrystal/node_quasicrystal.gml | 14 ++-- scripts/node_random/node_random.gml | 6 +- .../node_random_shape/node_random_shape.gml | 2 +- scripts/node_random_tile/node_random_tile.gml | 28 +++---- scripts/node_rate_remap/node_rate_remap.gml | 4 +- scripts/node_rd/node_rd.gml | 6 +- scripts/node_region_fill/node_region_fill.gml | 22 +++--- .../node_render_sprite_sheet.gml | 10 +-- scripts/node_repeat/node_repeat.gml | 40 +++++----- .../node_repeat_texture.gml | 6 +- scripts/node_rgb_channel/node_rgb_channel.gml | 8 +- .../node_rigid_global/node_rigid_global.gml | 2 +- .../node_rigid_group_inline.gml | 2 +- .../node_rigid_override.gml | 12 +-- .../node_rigid_render/node_rigid_render.gml | 2 +- scripts/node_rigid_wall/node_rigid_wall.gml | 8 +- scripts/node_rim/node_rim.gml | 2 +- scripts/node_rm_cloud/node_rm_cloud.gml | 14 ++-- scripts/node_rm_combine/node_rm_combine.gml | 22 +++--- .../node_rm_primitive/node_rm_primitive.gml | 70 ++++++++--------- scripts/node_rm_render/node_rm_render.gml | 18 ++--- scripts/node_rm_terrain/node_rm_terrain.gml | 20 ++--- scripts/node_sampler/node_sampler.gml | 4 +- scripts/node_scale/node_scale.gml | 12 +-- scripts/node_scale_algo/node_scale_algo.gml | 10 +-- scripts/node_scatter/node_scatter.gml | 60 +++++++-------- .../node_scatter_points.gml | 12 +-- scripts/node_sdf/node_sdf.gml | 6 +- .../node_segment_filter.gml | 6 +- .../node_sequence_anim/node_sequence_anim.gml | 2 +- scripts/node_shadow/node_shadow.gml | 10 +-- scripts/node_shadow_cast/node_shadow_cast.gml | 16 ++-- scripts/node_shape/node_shape.gml | 36 ++++----- scripts/node_shape_map/node_shape_map.gml | 12 +-- .../node_shape_polygon/node_shape_polygon.gml | 16 ++-- scripts/node_shard_noise/node_shard_noise.gml | 8 +- scripts/node_shell/node_shell.gml | 4 +- scripts/node_slideshow/node_slideshow.gml | 8 +- scripts/node_smear/node_bw.gml | 6 +- scripts/node_smear/node_smear.gml | 18 ++--- scripts/node_smoke_add/node_smoke_add.gml | 10 +-- .../node_smoke_add_collider.gml | 4 +- .../node_smoke_apply_velocity.gml | 8 +- .../node_smoke_domain/node_smoke_domain.gml | 14 ++-- scripts/node_smoke_group/node_smoke_group.gml | 14 ++-- .../node_smoke_render/node_smoke_render.gml | 8 +- .../node_smoke_render_output.gml | 8 +- .../node_smoke_repulse/node_smoke_repulse.gml | 6 +- .../node_smoke_turbulence.gml | 4 +- .../node_smoke_update/node_smoke_update.gml | 2 +- .../node_smoke_vortex/node_smoke_vortex.gml | 6 +- scripts/node_solid/node_solid.gml | 10 +-- scripts/node_spherize/node_spherize.gml | 8 +- scripts/node_spout_send/node_spout_send.gml | 4 +- .../node_sprite_stack/node_sprite_stack.gml | 18 ++--- scripts/node_stagger/node_stagger.gml | 10 +-- .../node_strand_create/node_strand_create.gml | 22 +++--- .../node_strand_force_apply.gml | 6 +- .../node_strand_gravity.gml | 4 +- .../node_strand_length_adjust.gml | 2 +- .../node_strand_render/node_strand_render.gml | 14 ++-- .../node_strand_render_texture.gml | 8 +- scripts/node_string/node_string.gml | 2 +- .../node_string_get_char.gml | 4 +- .../node_string_length/node_string_length.gml | 2 +- .../node_string_regex_match.gml | 2 +- .../node_string_regex_replace.gml | 4 +- .../node_string_regex_search.gml | 2 +- .../node_string_split/node_string_split.gml | 2 +- scripts/node_string_trim/node_string_trim.gml | 6 +- scripts/node_stripe/node_stripe.gml | 26 +++---- scripts/node_struct_get/node_struct_get.gml | 2 +- scripts/node_struct_set/node_struct_set.gml | 4 +- .../node_surface_data/node_surface_data.gml | 2 +- .../node_surface_from_color.gml | 2 +- .../node_surface_replace.gml | 8 +- .../node_surface_to_buffer.gml | 2 +- .../node_surface_to_color.gml | 2 +- scripts/node_svg/node_svg.gml | 2 +- scripts/node_text/node_text.gml | 46 +++++------ .../node_texture_remap/node_texture_remap.gml | 8 +- scripts/node_threshold/node_threshold.gml | 16 ++-- scripts/node_tile/node_tile.gml | 4 +- scripts/node_tile_random/node_tile_random.gml | 4 +- .../node_timeline_preview.gml | 2 +- scripts/node_tonemap_ace/node_tonemap_ace.gml | 8 +- scripts/node_trail/node_trail.gml | 14 ++-- scripts/node_transform/node_transform.gml | 20 ++--- .../node_transform_single.gml | 16 ++-- .../node_trigger_bool/node_trigger_bool.gml | 2 +- scripts/node_twirl/node_twirl.gml | 8 +- scripts/node_unicode/node_unicode.gml | 2 +- scripts/node_vector2/node_vector2.gml | 4 +- scripts/node_vector3/node_vector3.gml | 2 +- scripts/node_vector4/node_vector4.gml | 2 +- .../node_vector_swizzle.gml | 2 +- scripts/node_vignette/node_vignette.gml | 6 +- .../node_voronoi_extra/node_voronoi_extra.gml | 6 +- scripts/node_warp/node_warp.gml | 8 +- .../node_wav_file_read/node_wav_file_read.gml | 2 +- .../node_wav_file_write.gml | 6 +- .../node_wavelet_noise/node_wavelet_noise.gml | 8 +- .../node_websocket_receiver.gml | 8 +- .../node_websocket_sender.gml | 12 +-- scripts/node_wrap_area/node_wrap_area.gml | 4 +- .../node_wrap_perspective.gml | 4 +- scripts/node_zigzag/node_zigzag.gml | 12 +-- 440 files changed, 2118 insertions(+), 2118 deletions(-) diff --git a/scripts/__node_3d_displace/__node_3d_displace.gml b/scripts/__node_3d_displace/__node_3d_displace.gml index e889c0f9f..3cf9f2c42 100644 --- a/scripts/__node_3d_displace/__node_3d_displace.gml +++ b/scripts/__node_3d_displace/__node_3d_displace.gml @@ -2,20 +2,20 @@ function __Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr name = "3D Displace"; batch_output = false; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Vec3("Object position", self, [ 0, 0, 0 ]); + newInput(1, nodeValue_Vec3("Object position", self, [ 0, 0, 0 ])); - inputs[2] = nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ]); + newInput(2, nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ])); - inputs[3] = nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ]); + newInput(3, nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ])); inputs[4] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) .setUnitRef( function() { return getInputData(0); }, VALUE_UNIT.reference); - inputs[5] = nodeValue_Vec2("Render scale", self, [ 1, 1 ]); + newInput(5, nodeValue_Vec2("Render scale", self, [ 1, 1 ])); - inputs[6] = nodeValue_Rotation("Light direction", self, 0); + newInput(6, nodeValue_Rotation("Light direction", self, 0)); inputs[7] = nodeValue_Float("Light height", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); @@ -23,9 +23,9 @@ function __Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[8] = nodeValue_Float("Light intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[9] = nodeValue_Color("Light color", self, c_white); + newInput(9, nodeValue_Color("Light color", self, c_white)); - inputs[10] = nodeValue_Color("Ambient color", self, c_grey); + newInput(10, nodeValue_Color("Ambient color", self, c_grey)); inputs[11] = nodeValue("3D vertex", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3vertex, []) .setVisible(true, true); @@ -36,9 +36,9 @@ function __Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[13] = nodeValue_Float("Field of view", self, 60) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); - inputs[14] = nodeValue_Bool("Scale view with dimension", self, true); + newInput(14, nodeValue_Bool("Scale view with dimension", self, true)); - inputs[15] = nodeValue_Surface("Displacement map", self); + newInput(15, nodeValue_Surface("Displacement map", self)); inputs[16] = nodeValue_Float("Strength", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); diff --git a/scripts/__node_3d_export/__node_3d_export.gml b/scripts/__node_3d_export/__node_3d_export.gml index dc71b68b8..a73db22ea 100644 --- a/scripts/__node_3d_export/__node_3d_export.gml +++ b/scripts/__node_3d_export/__node_3d_export.gml @@ -7,7 +7,7 @@ function __Node_3D_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[1] = nodeValue_Path("Path", self, "", "Export location without '.obj' extension." ) .setDisplay(VALUE_DISPLAY.path_save, { filter: "3d object|*.obj" }); - inputs[2] = nodeValue_Bool("Export texture", self, true ); + newInput(2, nodeValue_Bool("Export texture", self, true )); input_display_list = [ 0, ["Export", false], 1, 2, diff --git a/scripts/__node_3d_extrude/__node_3d_extrude.gml b/scripts/__node_3d_extrude/__node_3d_extrude.gml index f2b1ce520..1d5011df6 100644 --- a/scripts/__node_3d_extrude/__node_3d_extrude.gml +++ b/scripts/__node_3d_extrude/__node_3d_extrude.gml @@ -2,27 +2,27 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro name = "3D Extrude"; batch_output = false; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Dimension(self); + newInput(1, nodeValue_Dimension(self)); - inputs[2] = nodeValue_Vec3("Object position", self, [ 0, 0, 0 ]); + newInput(2, nodeValue_Vec3("Object position", self, [ 0, 0, 0 ])); - inputs[3] = nodeValue_Vec3("Object rotation", self, [ 0, 180, 0 ]); + newInput(3, nodeValue_Vec3("Object rotation", self, [ 0, 180, 0 ])); - inputs[4] = nodeValue_Vec3("Object scale", self, [ 1, 1, 0.1 ]); + newInput(4, nodeValue_Vec3("Object scale", self, [ 1, 1, 0.1 ])); inputs[5] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) .setUnitRef( function() { return getInputData(1); }, VALUE_UNIT.reference); - inputs[6] = nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ]); + newInput(6, nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ])); - inputs[7] = nodeValue_Vec2("Render scale", self, [ 1, 1 ]); + newInput(7, nodeValue_Vec2("Render scale", self, [ 1, 1 ])); inputs[8] = nodeValue_Trigger("Manual generate", self, false ) .setDisplay(VALUE_DISPLAY.button, { name: "Generate", UI : true, onClick: function() { generateMesh(); doUpdate(); } }); - inputs[9] = nodeValue_Rotation("Light direction", self, 0); + newInput(9, nodeValue_Rotation("Light direction", self, 0)); inputs[10] = nodeValue_Float("Light height", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); @@ -30,12 +30,12 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[11] = nodeValue_Float("Light intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[12] = nodeValue_Color("Light color", self, c_white); - inputs[13] = nodeValue_Color("Ambient color", self, c_grey); + newInput(12, nodeValue_Color("Light color", self, c_white)); + newInput(13, nodeValue_Color("Ambient color", self, c_grey)); - inputs[14] = nodeValue_Surface("Height map", self); + newInput(14, nodeValue_Surface("Height map", self)); - inputs[15] = nodeValue_Bool("Always update", self, false); + newInput(15, nodeValue_Bool("Always update", self, false)); inputs[16] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); diff --git a/scripts/__node_3d_light/__node_3d_light.gml b/scripts/__node_3d_light/__node_3d_light.gml index 6f1469077..f985781e4 100644 --- a/scripts/__node_3d_light/__node_3d_light.gml +++ b/scripts/__node_3d_light/__node_3d_light.gml @@ -4,9 +4,9 @@ function Node_3D_Light(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) if(!LOADING && !APPENDING) inputs[0].setValue([ 0, 0, 1 ]); - inputs[in_d3d + 0] = nodeValue_Bool("Active", self, true); + newInput(in_d3d + 0, nodeValue_Bool("Active", self, true)); - inputs[in_d3d + 1] = nodeValue_Color("Color", self, c_white); + newInput(in_d3d + 1, nodeValue_Color("Color", self, c_white)); inputs[in_d3d + 2] = nodeValue_Float("Intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/__node_3d_obj/__node_3d_obj.gml b/scripts/__node_3d_obj/__node_3d_obj.gml index 2069e718b..4ec1bab49 100644 --- a/scripts/__node_3d_obj/__node_3d_obj.gml +++ b/scripts/__node_3d_obj/__node_3d_obj.gml @@ -11,14 +11,14 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo doUpdate(); } }); - inputs[2] = nodeValue_Dimension(self); + newInput(2, nodeValue_Dimension(self)); inputs[3] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) .setUnitRef( function() { return getInputData(2); }, VALUE_UNIT.reference); - inputs[4] = nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ]); + newInput(4, nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ])); - inputs[5] = nodeValue_Vec2("Render scale", self, [ 1, 1 ]); + newInput(5, nodeValue_Vec2("Render scale", self, [ 1, 1 ])); inputs[6] = nodeValue_Rotation("Light direction", self, 0) .rejectArray(); @@ -37,14 +37,14 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo inputs[10] = nodeValue_Color("Ambient color", self, c_grey) .rejectArray(); - inputs[11] = nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ]); + newInput(11, nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ])); inputs[12] = nodeValue_Bool("Flip UV", self, true, "Flip UV axis, can be use to fix some texture mapping error.") .rejectArray(); - inputs[13] = nodeValue_Vec3("Object rotation", self, [ 0, 0, 180 ]); + newInput(13, nodeValue_Vec3("Object rotation", self, [ 0, 0, 180 ])); - inputs[14] = nodeValue_Vec3("Object position", self, [ 0, 0, 0 ]); + newInput(14, nodeValue_Vec3("Object position", self, [ 0, 0, 0 ])); inputs[15] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); @@ -103,7 +103,7 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo function createMaterial(m_index) { var index = array_length(inputs); - inputs[index] = nodeValue_Surface(materialNames[m_index] + " texture", self, tex_surface); + newInput(index, nodeValue_Surface(materialNames[m_index] + " texture", self, tex_surface)); inputs[index].setVisible(true); input_display_list[input_display_len + m_index] = index; diff --git a/scripts/__node_3d_object/__node_3d_object.gml b/scripts/__node_3d_object/__node_3d_object.gml index d44f04e2c..c9e4c8b2d 100644 --- a/scripts/__node_3d_object/__node_3d_object.gml +++ b/scripts/__node_3d_object/__node_3d_object.gml @@ -8,11 +8,11 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr preview_channel = 0; apply_anchor = false; - inputs[0] = nodeValue_Vec3("Position", self, [ 0, 0, 0 ], { linkable: false }); + newInput(0, nodeValue_Vec3("Position", self, [ 0, 0, 0 ], { linkable: false })); - inputs[1] = nodeValue_Quaternion("Rotation", self, [ 0, 0, 0, 1 ]); + newInput(1, nodeValue_Quaternion("Rotation", self, [ 0, 0, 0, 1 ])); - inputs[2] = nodeValue_Vec3("Scale", self, [ 1, 1, 1 ]); + newInput(2, nodeValue_Vec3("Scale", self, [ 1, 1, 1 ])); inputs[3] = nodeValue_Vec3("Anchor", self, [ 0, 0, 0 ], { linkable: false, diff --git a/scripts/__node_3d_plane/__node_3d_plane.gml b/scripts/__node_3d_plane/__node_3d_plane.gml index fd93dcf7b..0340f3a4a 100644 --- a/scripts/__node_3d_plane/__node_3d_plane.gml +++ b/scripts/__node_3d_plane/__node_3d_plane.gml @@ -2,23 +2,23 @@ function __Node_3D_Plane(_x, _y, _group = noone) : Node_Processor(_x, _y, _group name = "3D Plane"; batch_output = false; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[2] = nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ]); + newInput(2, nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ])); - inputs[3] = nodeValue_Vec2("Render scale", self, [ 1, 1 ]); + newInput(3, nodeValue_Vec2("Render scale", self, [ 1, 1 ])); inputs[4] = nodeValue_Enum_Scroll("Output dimension", self, OUTPUT_SCALING.same_as_input, [ "Same as input", "Constant", "Relative to input" ]) .rejectArray(); - inputs[5] = nodeValue_Vec2("Constant dimension", self, DEF_SURF); + newInput(5, nodeValue_Vec2("Constant dimension", self, DEF_SURF)); - inputs[6] = nodeValue_Vec3("Object position", self, [ 0, 0, 0 ]); + newInput(6, nodeValue_Vec3("Object position", self, [ 0, 0, 0 ])); - inputs[7] = nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ]); + newInput(7, nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ])); inputs[8] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); @@ -26,13 +26,13 @@ function __Node_3D_Plane(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[9] = nodeValue_Float("Field of view", self, 60) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); - inputs[10] = nodeValue_Vec2("Texture scale", self, [ 1, 1 ]); + newInput(10, nodeValue_Vec2("Texture scale", self, [ 1, 1 ])); - inputs[11] = nodeValue_Vec2("Texture shift", self, [ 0, 0 ]); + newInput(11, nodeValue_Vec2("Texture shift", self, [ 0, 0 ])); inputs[12] = nodeValue_Int("Subdiviion", self, 1) - inputs[13] = nodeValue_Enum_Button("Normal axis", self, 2, [ "X", "Y", "Z" ]); + newInput(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 699ed32ab..412c638e9 100644 --- a/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml +++ b/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml @@ -2,18 +2,18 @@ function __Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) name = "3D Cone"; batch_output = false; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[2] = nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ]); + newInput(2, nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ])); - inputs[3] = nodeValue_Vec2("Render scale", self, [ 1, 1 ]); + newInput(3, nodeValue_Vec2("Render scale", self, [ 1, 1 ])); - inputs[4] = nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ]); + newInput(4, nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ])); - inputs[5] = nodeValue_Rotation("Light direction", self, 0); + newInput(5, nodeValue_Rotation("Light direction", self, 0)); inputs[6] = nodeValue_Float("Light height", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); @@ -21,12 +21,12 @@ function __Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[7] = nodeValue_Float("Light intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[8] = nodeValue_Color("Light color", self, c_white); - inputs[9] = nodeValue_Color("Ambient color", self, c_grey); + newInput(8, nodeValue_Color("Light color", self, c_white)); + newInput(9, nodeValue_Color("Ambient color", self, c_grey)); - inputs[10] = nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ]); + newInput(10, nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ])); - inputs[11] = nodeValue_Vec3("Object position", self, [ 0, 0, 0 ]); + newInput(11, nodeValue_Vec3("Object position", self, [ 0, 0, 0 ])); inputs[12] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); @@ -34,11 +34,11 @@ function __Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[13] = nodeValue_Float("Field of view", self, 60) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); - inputs[14] = nodeValue_Int("Sides", self, 16); + newInput(14, nodeValue_Int("Sides", self, 16)); - inputs[15] = nodeValue_Surface("Textures base", self); + newInput(15, nodeValue_Surface("Textures base", self)); - inputs[16] = nodeValue_Surface("Textures side", self); + newInput(16, nodeValue_Surface("Textures side", self)); inputs[17] = nodeValue_Bool("Scale view with dimension", self, 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 e09009325..b7214d728 100644 --- a/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml +++ b/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml @@ -3,29 +3,29 @@ function __Node_3D_Cube(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) batch_output = false; dimension_index = 1; - inputs[0] = nodeValue_Surface("Main texture", self); + newInput(0, nodeValue_Surface("Main texture", self)); - inputs[1] = nodeValue_Dimension(self); + newInput(1, nodeValue_Dimension(self)); inputs[2] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[3] = nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ]); + newInput(3, nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ])); - inputs[4] = nodeValue_Vec2("Render scale", self, [ 1, 1 ]); + newInput(4, nodeValue_Vec2("Render scale", self, [ 1, 1 ])); - inputs[5] = nodeValue_Bool("Textures per face", self, false); + newInput(5, nodeValue_Bool("Textures per face", self, 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); + newInput( 6, nodeValue_Surface("Textures 0", self).setVisible(false)); + newInput( 7, nodeValue_Surface("Textures 1", self).setVisible(false)); + newInput( 8, nodeValue_Surface("Textures 2", self).setVisible(false)); + newInput( 9, nodeValue_Surface("Textures 3", self).setVisible(false)); + newInput(10, nodeValue_Surface("Textures 4", self).setVisible(false)); + newInput(11, nodeValue_Surface("Textures 5", self).setVisible(false)); - inputs[12] = nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ]); + newInput(12, nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ])); - inputs[13] = nodeValue_Rotation("Light direction", self, 0); + newInput(13, nodeValue_Rotation("Light direction", self, 0)); inputs[14] = nodeValue_Float("Light height", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); @@ -33,13 +33,13 @@ function __Node_3D_Cube(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[15] = nodeValue_Float("Light intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[16] = nodeValue_Color("Light color", self, c_white); + newInput(16, nodeValue_Color("Light color", self, c_white)); - inputs[17] = nodeValue_Color("Ambient color", self, c_grey); + newInput(17, nodeValue_Color("Ambient color", self, c_grey)); - inputs[18] = nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ]); + newInput(18, nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ])); - inputs[19] = nodeValue_Vec3("Object position", self, [ 0, 0, 0 ]); + newInput(19, nodeValue_Vec3("Object position", self, [ 0, 0, 0 ])); inputs[20] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); 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 fc8525e2f..13cd2573f 100644 --- a/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml +++ b/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml @@ -3,26 +3,26 @@ function __Node_3D_Cylinder(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr batch_output = false; dimension_index = 2; - inputs[0] = nodeValue_Int("Sides", self, 16); + newInput(0, nodeValue_Int("Sides", self, 16)); - inputs[1] = nodeValue_Float("Thickness", self, 0.2); + newInput(1, nodeValue_Float("Thickness", self, 0.2)); - inputs[2] = nodeValue_Dimension(self); + newInput(2, nodeValue_Dimension(self)); inputs[3] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[4] = nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ]); + newInput(4, nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ])); - inputs[5] = nodeValue_Vec2("Render scale", self, [ 1, 1 ]); + newInput(5, nodeValue_Vec2("Render scale", self, [ 1, 1 ])); - inputs[6] = nodeValue_Surface("Textures top", self); - inputs[7] = nodeValue_Surface("Textures bottom", self); - inputs[8] = nodeValue_Surface("Textures side", self); + newInput(6, nodeValue_Surface("Textures top", self)); + newInput(7, nodeValue_Surface("Textures bottom", self)); + newInput(8, nodeValue_Surface("Textures side", self)); - inputs[9] = nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ]); + newInput(9, nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ])); - inputs[10] = nodeValue_Rotation("Light direction", self, 0); + newInput(10, nodeValue_Rotation("Light direction", self, 0)); inputs[11] = nodeValue_Float("Light height", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); @@ -30,12 +30,12 @@ function __Node_3D_Cylinder(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[12] = nodeValue_Float("Light intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[13] = nodeValue_Color("Light color", self, c_white); - inputs[14] = nodeValue_Color("Ambient color", self, c_grey); + newInput(13, nodeValue_Color("Light color", self, c_white)); + newInput(14, nodeValue_Color("Ambient color", self, c_grey)); - inputs[15] = nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ]); + newInput(15, nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ])); - inputs[16] = nodeValue_Vec3("Object position", self, [ 0, 0, 0 ]); + newInput(16, nodeValue_Vec3("Object position", self, [ 0, 0, 0 ])); inputs[17] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); 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 7a53bf97d..45340910b 100644 --- a/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml +++ b/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml @@ -6,20 +6,20 @@ function __Node_3D_Sphere(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[0] = nodeValue_Vec2("Subdivisions", self, [8, 4]) .setTooltip("Amount of polygon in X and Y axis."); - inputs[1] = nodeValue_Dimension(self); + newInput(1, nodeValue_Dimension(self)); inputs[2] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[3] = nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ]); + newInput(3, nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ])); - inputs[4] = nodeValue_Vec2("Render scale", self, [ 1, 1 ]); + newInput(4, nodeValue_Vec2("Render scale", self, [ 1, 1 ])); - inputs[5] = nodeValue_Surface("Textures", self); + newInput(5, nodeValue_Surface("Textures", self)); - inputs[6] = nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ]); + newInput(6, nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ])); - inputs[7] = nodeValue_Rotation("Light direction", self, 0); + newInput(7, nodeValue_Rotation("Light direction", self, 0)); inputs[8] = nodeValue_Float("Light height", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); @@ -27,12 +27,12 @@ function __Node_3D_Sphere(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[9] = nodeValue_Float("Light intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[10] = nodeValue_Color("Light color", self, c_white); - inputs[11] = nodeValue_Color("Ambient color", self, c_grey); + newInput(10, nodeValue_Color("Light color", self, c_white)); + newInput(11, nodeValue_Color("Ambient color", self, c_grey)); - inputs[12] = nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ]); + newInput(12, nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ])); - inputs[13] = nodeValue_Vec3("Object position", self, [ 0, 0, 0 ]); + newInput(13, nodeValue_Vec3("Object position", self, [ 0, 0, 0 ])); inputs[14] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); diff --git a/scripts/__node_3d_render/__node_3d_render.gml b/scripts/__node_3d_render/__node_3d_render.gml index 94fb6e706..a5588be5d 100644 --- a/scripts/__node_3d_render/__node_3d_render.gml +++ b/scripts/__node_3d_render/__node_3d_render.gml @@ -1,14 +1,14 @@ //function Node_3D_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { // name = "3D Render"; -// inputs[2] = nodeValue_Dimension(self); +// newInput(2, nodeValue_Dimension(self)); // inputs[3] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) // .setUnitRef( function() { return getInputData(2); }, VALUE_UNIT.reference); -// inputs[4] = nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ]); +// newInput(4, nodeValue_Vec3("Render rotation", self, [ 0, 0, 0 ])); -// inputs[5] = nodeValue_Vec2("Render scale", self, [ 1, 1 ]); +// newInput(5, nodeValue_Vec2("Render scale", self, [ 1, 1 ])); // inputs[6] = nodeValue_Float("Light direction", self, 0) // .setDisplay(VALUE_DISPLAY.rotation) @@ -81,7 +81,7 @@ // function createMaterial(m_index) { // var index = array_length(inputs); -// inputs[index] = nodeValue_Surface(materialNames[m_index] + " texture", self, tex_surface); +// newInput(index, nodeValue_Surface(materialNames[m_index] + " texture", self, tex_surface)); // inputs[index].setVisible(true); // input_display_list[input_display_len + m_index] = index; diff --git a/scripts/__node_3d_repeat/__node_3d_repeat.gml b/scripts/__node_3d_repeat/__node_3d_repeat.gml index cf1209358..dedcc255e 100644 --- a/scripts/__node_3d_repeat/__node_3d_repeat.gml +++ b/scripts/__node_3d_repeat/__node_3d_repeat.gml @@ -1,20 +1,20 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "3D Repeat"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Vec3("Object position", self, [ 0, 0, 0 ]); + newInput(1, nodeValue_Vec3("Object position", self, [ 0, 0, 0 ])); - inputs[2] = nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ]); + newInput(2, nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ])); - inputs[3] = nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ]); + newInput(3, nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ])); inputs[4] = nodeValue_Vec3("Render position", self, [ 0.5, 0.5 ]) .setUnitRef( function() { return getInputData(0); }, VALUE_UNIT.reference); - inputs[5] = nodeValue_Vec2("Render scale", self, [ 1, 1 ]); + newInput(5, nodeValue_Vec2("Render scale", self, [ 1, 1 ])); - inputs[6] = nodeValue_Rotation("Light direction", self, 0); + newInput(6, nodeValue_Rotation("Light direction", self, 0)); inputs[7] = nodeValue_Float("Light height", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); @@ -22,29 +22,29 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[8] = nodeValue_Float("Light intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[9] = nodeValue_Color("Light color", self, c_white); + newInput(9, nodeValue_Color("Light color", self, c_white)); - inputs[10] = nodeValue_Color("Ambient color", self, c_grey); + newInput(10, nodeValue_Color("Ambient color", self, c_grey)); inputs[11] = nodeValue("3D object", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3object, noone) .setVisible(true, true); - inputs[12] = nodeValue_Int("Repeat", self, 1, "Amount of copies to be generated."); + newInput(12, nodeValue_Int("Repeat", self, 1, "Amount of copies to be generated.")); - inputs[13] = nodeValue_Vec3("Repeat position", self, [ 1, 0, 0 ]); + newInput(13, nodeValue_Vec3("Repeat position", self, [ 1, 0, 0 ])); - inputs[14] = nodeValue_Vec3("Repeat rotation", self, [ 0, 0, 0 ]); + newInput(14, nodeValue_Vec3("Repeat rotation", self, [ 0, 0, 0 ])); - inputs[15] = nodeValue_Vec3("Repeat scale", self, [ 1, 1, 1 ]); + newInput(15, nodeValue_Vec3("Repeat scale", self, [ 1, 1, 1 ])); inputs[16] = nodeValue_Enum_Button("Repeat pattern", self, 0, [ "Linear", "Circular" ]) .rejectArray(); - inputs[17] = nodeValue_Enum_Button("Axis", self, 0, [ "x", "y", "z" ]); + newInput(17, nodeValue_Enum_Button("Axis", self, 0, [ "x", "y", "z" ])); - inputs[18] = nodeValue_Float("Radius", self, 1); + newInput(18, nodeValue_Float("Radius", self, 1)); - inputs[19] = nodeValue_Rotation_Range("Rotation", self, [ 0, 360 ]); + newInput(19, nodeValue_Rotation_Range("Rotation", self, [ 0, 360 ])); inputs[20] = nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]) .rejectArray(); diff --git a/scripts/__node_3d_transform/__node_3d_transform.gml b/scripts/__node_3d_transform/__node_3d_transform.gml index c76672a16..47f778f45 100644 --- a/scripts/__node_3d_transform/__node_3d_transform.gml +++ b/scripts/__node_3d_transform/__node_3d_transform.gml @@ -2,20 +2,20 @@ function __Node_3D_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _g name = "3D Transform"; batch_output = false; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Vec3("Object position", self, [ 0, 0, 0 ]); + newInput(1, nodeValue_Vec3("Object position", self, [ 0, 0, 0 ])); - inputs[2] = nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ]); + newInput(2, nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ])); - inputs[3] = nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ]); + newInput(3, nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ])); inputs[4] = nodeValue_Vec2("Render position", self, [ 0.5, 0.5 ]) .setUnitRef( function() { return getInputData(2); }, VALUE_UNIT.reference); - inputs[5] = nodeValue_Vec2("Render scale", self, [ 1, 1 ]); + newInput(5, nodeValue_Vec2("Render scale", self, [ 1, 1 ])); - inputs[6] = nodeValue_Rotation("Light direction", self, 0); + newInput(6, nodeValue_Rotation("Light direction", self, 0)); inputs[7] = nodeValue_Float("Light height", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); @@ -23,9 +23,9 @@ function __Node_3D_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _g inputs[8] = nodeValue_Float("Light intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[9] = nodeValue_Color("Light color", self, c_white); + newInput(9, nodeValue_Color("Light color", self, c_white)); - inputs[10] = nodeValue_Color("Ambient color", self, c_grey); + newInput(10, nodeValue_Color("Ambient color", self, c_grey)); inputs[11] = nodeValue("3D object", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3object, noone) .setVisible(true, true); diff --git a/scripts/__node_process_template/__node_process_template.gml b/scripts/__node_process_template/__node_process_template.gml index 563f38c21..0ff209cba 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_Surface("", self); + newInput(0, nodeValue_Surface("", self)); outputs[0] = nodeValue_Output("", self, 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 89ffb1160..1809414ec 100644 --- a/scripts/__node_shader_generator/__node_shader_generator.gml +++ b/scripts/__node_shader_generator/__node_shader_generator.gml @@ -1,7 +1,7 @@ function Node_Shader_Generator(_x, _y, _group = noone) : Node_Shader(_x, _y, _group) constructor { name = ""; - inputs[0] = nodeValue_Dimension(self); + newInput(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 ae8b7d8f3..32e060b06 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("Surface in", self); + newInput(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 18a634eab..ac39aaf7f 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_Surface("", self); + newInput(0, nodeValue_Surface("", self)); outputs[0] = nodeValue_Output("", self, VALUE_TYPE.surface, noone); diff --git a/scripts/_node_VFX_spawner/_node_VFX_spawner.gml b/scripts/_node_VFX_spawner/_node_VFX_spawner.gml index 7bb1a02e5..0ae3b542b 100644 --- a/scripts/_node_VFX_spawner/_node_VFX_spawner.gml +++ b/scripts/_node_VFX_spawner/_node_VFX_spawner.gml @@ -2,50 +2,50 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co name = "Spawner"; update_on_frame = true; - inputs[0] = nodeValue_Surface("Particle sprite", self); + newInput(0, nodeValue_Surface("Particle sprite", self)); - inputs[1] = nodeValue_Int("Spawn delay", self, 4, "Frames delay between each particle spawn." ); + newInput(1, nodeValue_Int("Spawn delay", self, 4, "Frames delay between each particle spawn." )); inputs[2] = nodeValue_Range("Spawn amount", self, [ 2, 2 ] , { linked : true }) .setTooltip("Amount of particle spawn in that frame."); - inputs[3] = nodeValue_Area("Spawn area", self, DEF_AREA ); + newInput(3, nodeValue_Area("Spawn area", self, DEF_AREA )); - inputs[4] = nodeValue_Enum_Scroll("Spawn distribution", self, 0, [ "Area", "Border", "Map" ] ); + newInput(4, nodeValue_Enum_Scroll("Spawn distribution", self, 0, [ "Area", "Border", "Map" ] )); - inputs[5] = nodeValue_Range("Lifespan", self, [ 20, 30 ] ); + newInput(5, nodeValue_Range("Lifespan", self, [ 20, 30 ] )); - inputs[6] = nodeValue_Rotation_Random("Spawn direction", self, [ 0, 45, 135, 0, 0 ] ); + newInput(6, nodeValue_Rotation_Random("Spawn direction", self, [ 0, 45, 135, 0, 0 ] )); - inputs[7] = nodeValue_Range("Acceleration", self, [ 0, 0 ] , { linked : true }); + newInput(7, nodeValue_Range("Acceleration", self, [ 0, 0 ] , { linked : true })); - inputs[8] = nodeValue_Rotation_Random("Orientation", self, [ 0, 0, 0, 0, 0 ] ); + newInput(8, nodeValue_Rotation_Random("Orientation", self, [ 0, 0, 0, 0, 0 ] )); - inputs[9] = nodeValue_Range("Rotational speed", self, [ 0, 0 ] , { linked : true }); + newInput(9, nodeValue_Range("Rotational speed", self, [ 0, 0 ] , { linked : true })); - inputs[10] = nodeValue_Vec2_Range("Spawn scale", self, [ 1, 1, 1, 1 ] , { linked : true }); + newInput(10, nodeValue_Vec2_Range("Spawn scale", self, [ 1, 1, 1, 1 ] , { linked : true })); - inputs[11] = nodeValue("Scale over time", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 ); + newInput(11, nodeValue("Scale over time", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 )); - inputs[12] = nodeValue_Gradient("Color over lifetime", self, new gradientObject(cola(c_white))); + newInput(12, nodeValue_Gradient("Color over lifetime", self, new gradientObject(cola(c_white)))); - inputs[13] = nodeValue_Range("Alpha", self, [ 1, 1 ], { linked : true }); + newInput(13, nodeValue_Range("Alpha", self, [ 1, 1 ], { linked : true })); - inputs[14] = nodeValue("Alpha over time", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + newInput(14, nodeValue("Alpha over time", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11)); - inputs[15] = nodeValue_Bool("Rotate by direction", self, false, "Make the particle rotates to follow its movement."); + newInput(15, nodeValue_Bool("Rotate by direction", self, false, "Make the particle rotates to follow its movement.")); - inputs[16] = nodeValue_Enum_Button("Spawn type", self, 0, [ "Stream", "Burst", "Trigger" ]); + newInput(16, nodeValue_Enum_Button("Spawn type", self, 0, [ "Stream", "Burst", "Trigger" ])); - inputs[17] = nodeValue_Range("Spawn size", self, [ 1, 1 ] , { linked : true }); + newInput(17, nodeValue_Range("Spawn size", self, [ 1, 1 ] , { linked : true })); - inputs[18] = nodeValue_Range("Spawn velocity", self, [ 1, 2 ] ); + newInput(18, nodeValue_Range("Spawn velocity", self, [ 1, 2 ] )); - inputs[19] = nodeValue_Range("Gravity", self, [ 0, 0 ] , { linked : true }); + newInput(19, nodeValue_Range("Gravity", self, [ 0, 0 ] , { linked : true })); - inputs[20] = nodeValue_Vec2("Direction wiggle", self, [ 0, 0 ] , { label: [ "Amplitude", "Period" ], linkable: false, per_line: true }); + newInput(20, nodeValue_Vec2("Direction wiggle", self, [ 0, 0 ] , { label: [ "Amplitude", "Period" ], linkable: false, per_line: true })); - inputs[21] = nodeValue_Bool("Loop", self, true ); + newInput(21, nodeValue_Bool("Loop", self, true )); 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.") @@ -54,7 +54,7 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[23] = nodeValue_Range("Animation speed", self, [ 1, 1 ] , { linked : true }) .setVisible(false); - inputs[24] = nodeValue_Enum_Button("Scatter", self, 1, [ "Uniform", "Random" ]); + newInput(24, nodeValue_Enum_Button("Scatter", self, 1, [ "Uniform", "Random" ])); inputs[25] = nodeValue_Int("Boundary data", self, []) .setArrayDepth(1) @@ -63,11 +63,11 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[26] = nodeValue_Enum_Button("On animation end", self, ANIM_END_ACTION.loop, [ "Loop", "Ping pong", "Destroy" ]) .setVisible(false); - inputs[27] = nodeValue_Bool("Spawn", self, true); + newInput(27, nodeValue_Bool("Spawn", self, true)); - inputs[28] = nodeValue_Gradient("Random blend", self, new gradientObject(cola(c_white))); + newInput(28, nodeValue_Gradient("Random blend", self, new gradientObject(cola(c_white)))); - inputs[29] = nodeValue_Bool("Directed from center", self, false, "Make particle move away from the spawn center."); + newInput(29, nodeValue_Bool("Directed from center", self, false, "Make particle move away from the spawn center.")); inputs[30] = nodeValue_Surface("Distribution map", self) @@ -77,17 +77,17 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[32] = nodeValue_Float("Seed", self, 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_Rotation("Gravity direction", self, -90); + newInput(33, nodeValue_Rotation("Gravity direction", self, -90)); - inputs[34] = nodeValue_Range("Turning", self, [ 0, 0 ] , { linked : true }); + newInput(34, nodeValue_Range("Turning", self, [ 0, 0 ] , { linked : true })); - inputs[35] = nodeValue_Bool("Turn both directions", self, false, "Apply randomized 1, -1 multiplier to the turning speed." ); + newInput(35, nodeValue_Bool("Turn both directions", self, false, "Apply randomized 1, -1 multiplier to the turning speed." )); - inputs[36] = nodeValue_Float("Turn scale with speed", self, false ); + newInput(36, nodeValue_Float("Turn scale with speed", self, false )); - inputs[37] = nodeValue_Bool("Collide ground", self, false ); + newInput(37, nodeValue_Bool("Collide ground", self, false )); - inputs[38] = nodeValue_Float("Ground offset", self, 0 ); + newInput(38, nodeValue_Float("Ground offset", self, 0 )); inputs[39] = nodeValue_Float("Bounce amount", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); @@ -95,25 +95,25 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[40] = nodeValue_Float("Bounce friction", self, 0.1, "Apply horizontal friction once particle stop bouncing." ) .setDisplay(VALUE_DISPLAY.slider); - inputs[41] = nodeValue_Vec2("Position wiggle", self, [ 0, 0 ] , { label: [ "Amplitude", "Period" ], linkable: false, per_line: true }); + newInput(41, nodeValue_Vec2("Position wiggle", self, [ 0, 0 ] , { label: [ "Amplitude", "Period" ], linkable: false, per_line: true })); - inputs[42] = nodeValue_Vec2("Rotation wiggle", self, [ 0, 0 ] , { label: [ "Amplitude", "Period" ], linkable: false, per_line: true }); + newInput(42, nodeValue_Vec2("Rotation wiggle", self, [ 0, 0 ] , { label: [ "Amplitude", "Period" ], linkable: false, per_line: true })); - inputs[43] = nodeValue_Vec2("Scale wiggle", self, [ 0, 0 ] , { label: [ "Amplitude", "Period" ], linkable: false, per_line: true }); + newInput(43, nodeValue_Vec2("Scale wiggle", self, [ 0, 0 ] , { label: [ "Amplitude", "Period" ], linkable: false, per_line: true })); inputs[44] = nodeValue_Trigger("Spawn", self, false ) .setDisplay(VALUE_DISPLAY.button, { name: "Trigger" }); - inputs[45] = nodeValue_Bool("Follow Path", self, false ); + newInput(45, nodeValue_Bool("Follow Path", self, false )); - inputs[46] = nodeValue_PathNode("Path", self, noone ); + newInput(46, nodeValue_PathNode("Path", self, noone )); - inputs[47] = nodeValue("Path Deviation", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 ); + newInput(47, nodeValue("Path Deviation", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 )); inputs[48] = nodeValue_Trigger("Reset Seed", self, false ) .setDisplay(VALUE_DISPLAY.button, { name: "Trigger" }) - inputs[49] = nodeValue_Bool("Stretch Animation", self, false ); + newInput(49, nodeValue_Bool("Stretch Animation", self, false )); for (var i = 2, n = array_length(inputs); i < n; i++) inputs[i].rejectArray(); diff --git a/scripts/_node_strand_affector/_node_strand_affector.gml b/scripts/_node_strand_affector/_node_strand_affector.gml index 704d8b38a..1eace7e53 100644 --- a/scripts/_node_strand_affector/_node_strand_affector.gml +++ b/scripts/_node_strand_affector/_node_strand_affector.gml @@ -43,13 +43,13 @@ 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_Enum_Scroll("Shape", self, 0, [ "Point", "Band" ]); + newInput(1, nodeValue_Enum_Scroll("Shape", self, 0, [ "Point", "Band" ])); - inputs[2] = nodeValue_Vec2("Position", self, [ 0, 0 ]); + newInput(2, nodeValue_Vec2("Position", self, [ 0, 0 ])); - inputs[3] = nodeValue_Float("Range", self, 4); + newInput(3, nodeValue_Float("Range", self, 4)); - inputs[4] = nodeValue_Rotation("Direction", self, 0); + newInput(4, nodeValue_Rotation("Direction", self, 0)); inputs[5] = nodeValue_Float("Falloff", self, 0.2) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/mask_function/mask_function.gml b/scripts/mask_function/mask_function.gml index 0e3a464ae..778b9c9c7 100644 --- a/scripts/mask_function/mask_function.gml +++ b/scripts/mask_function/mask_function.gml @@ -1,7 +1,7 @@ function __init_mask_modifier(_mask_index) { #region var _ind = array_length(inputs); - inputs[_ind + 0] = nodeValue_Bool("Invert mask", self, false); + newInput(_ind + 0, nodeValue_Bool("Invert mask", self, false)); inputs[_ind + 1] = nodeValue_Float("Mask feather", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 32, 0.1] }); 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 4f91ddd9d..87f9ac4e8 100644 --- a/scripts/nodd_mk_delay_machine/nodd_mk_delay_machine.gml +++ b/scripts/nodd_mk_delay_machine/nodd_mk_delay_machine.gml @@ -4,17 +4,17 @@ function Node_MK_Delay_Machine(_x, _y, _group = noone) : Node(_x, _y, _group) co is_simulation = true; - inputs[0] = nodeValue_Surface("Surface", self); + newInput(0, nodeValue_Surface("Surface", self)); - inputs[1] = nodeValue_Int("Delay Amounts", self, 4); + newInput(1, nodeValue_Int("Delay Amounts", self, 4)); - inputs[2] = nodeValue_Int("Delay Frames", self, 1); + newInput(2, nodeValue_Int("Delay Frames", self, 1)); - inputs[3] = nodeValue_Palette("Blend over Delay", self, [ c_white ]); + newInput(3, nodeValue_Palette("Blend over Delay", self, [ c_white ])); - inputs[4] = nodeValue("Alpha over Delay", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + newInput(4, nodeValue("Alpha over Delay", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11)); - inputs[5] = nodeValue_Enum_Scroll("Palette Select", self, 0, [ "Loop", "Pingpong", "Random" ]); + newInput(5, nodeValue_Enum_Scroll("Palette Select", self, 0, [ "Loop", "Pingpong", "Random" ])); inputs[6] = nodeValue_Int("Seed", self, 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 dc575eae4..337e3c945 100644 --- a/scripts/node_2d_light/node_2d_light.gml +++ b/scripts/node_2d_light/node_2d_light.gml @@ -15,7 +15,7 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) uniform_band = shader_get_uniform(shader, "band"); uniform_attn = shader_get_uniform(shader, "atten"); - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); 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), @@ -25,16 +25,16 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[2] = nodeValue_Vec2("Center", self, [ 16, 16 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[3] = nodeValue_Float("Range", self, 16); + newInput(3, nodeValue_Float("Range", self, 16)); inputs[4] = nodeValue_Float("Intensity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_Color("Color", self, c_white); + newInput(5, nodeValue_Color("Color", self, c_white)); - inputs[6] = nodeValue_Vec2("Start", self, [ 16, 16 ]); + newInput(6, nodeValue_Vec2("Start", self, [ 16, 16 ])); - inputs[7] = nodeValue_Vec2("Finish", self, [ 32, 16 ]); + newInput(7, nodeValue_Vec2("Finish", self, [ 32, 16 ])); inputs[8] = nodeValue_Int("Sweep", self, 15) .setDisplay(VALUE_DISPLAY.slider, { range: [-80, 80, 0.1] }); @@ -54,12 +54,12 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[12] = nodeValue_Int("Radial banding", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.1] }); - inputs[13] = nodeValue_Rotation("Radial start", self, 0); + newInput(13, nodeValue_Rotation("Radial start", self, 0)); inputs[14] = nodeValue_Float("Radial band ratio", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[15] = nodeValue_Bool("Active", self, true); + newInput(15, nodeValue_Bool("Active", self, true)); active_index = 15; outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_3d_camera/node_3d_camera.gml b/scripts/node_3d_camera/node_3d_camera.gml index 8e0514492..41dfc5008 100644 --- a/scripts/node_3d_camera/node_3d_camera.gml +++ b/scripts/node_3d_camera/node_3d_camera.gml @@ -21,46 +21,46 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) inputs[in_d3d + 0] = nodeValue_Int("FOV", self, 60 ) .setDisplay(VALUE_DISPLAY.slider, { range: [ 10, 90, 0.1 ] }); - inputs[in_d3d + 1] = nodeValue_Vec2("Clipping Distance", self, [ 1, 10 ] ); + newInput(in_d3d + 1, nodeValue_Vec2("Clipping Distance", self, [ 1, 10 ] )); - inputs[in_d3d + 2] = nodeValue_Dimension(self); + newInput(in_d3d + 2, nodeValue_Dimension(self)); - inputs[in_d3d + 3] = nodeValue_Enum_Button("Projection", self, 1 , [ "Perspective", "Orthographic" ]); + newInput(in_d3d + 3, nodeValue_Enum_Button("Projection", self, 1 , [ "Perspective", "Orthographic" ])); inputs[in_d3d + 4] = nodeValue_D3Scene("Scene", self, noone ) .setVisible(true, true); - inputs[in_d3d + 5] = nodeValue_Color("Ambient Light", self, c_dkgrey ); + newInput(in_d3d + 5, nodeValue_Color("Ambient Light", self, c_dkgrey )); - inputs[in_d3d + 6] = nodeValue_Bool("Show Background", self, false ); + newInput(in_d3d + 6, nodeValue_Bool("Show Background", self, false )); - inputs[in_d3d + 7] = nodeValue_Enum_Button("Backface Culling", self, 2 , [ "None", "CW", "CCW" ]); + newInput(in_d3d + 7, nodeValue_Enum_Button("Backface Culling", self, 2 , [ "None", "CW", "CCW" ])); inputs[in_d3d + 8] = nodeValue_Float("Orthographic Scale", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0.01, 4, 0.01 ] }); - inputs[in_d3d + 9] = nodeValue_Enum_Scroll("Postioning Mode", self, 2, [ "Position + Rotation", "Position + Lookat", "Lookat + Rotation" ] ); + newInput(in_d3d + 9, nodeValue_Enum_Scroll("Postioning Mode", self, 2, [ "Position + Rotation", "Position + Lookat", "Lookat + Rotation" ] )); - inputs[in_d3d + 10] = nodeValue_Vec3("Lookat Position", self, [ 0, 0, 0 ] ); + newInput(in_d3d + 10, nodeValue_Vec3("Lookat Position", self, [ 0, 0, 0 ] )); - inputs[in_d3d + 11] = nodeValue_Rotation("Roll", self, 0); + newInput(in_d3d + 11, nodeValue_Rotation("Roll", self, 0)); - inputs[in_d3d + 12] = nodeValue_Rotation("Horizontal Angle", self, 45 ); + newInput(in_d3d + 12, nodeValue_Rotation("Horizontal Angle", self, 45 )); inputs[in_d3d + 13] = nodeValue_Float("Vertical Angle", self, 30 ) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 0.1] }); - inputs[in_d3d + 14] = nodeValue_Float("Distance", self, 4 ); + newInput(in_d3d + 14, nodeValue_Float("Distance", self, 4 )); - inputs[in_d3d + 15] = nodeValue_Bool("Gamma Adjust", self, false ); + newInput(in_d3d + 15, nodeValue_Bool("Gamma Adjust", self, false )); - inputs[in_d3d + 16] = nodeValue_Surface("Environment Texture", self); + newInput(in_d3d + 16, nodeValue_Surface("Environment Texture", self)); - inputs[in_d3d + 17] = nodeValue_Bool("Ambient Occlusion", self, false ); + newInput(in_d3d + 17, nodeValue_Bool("Ambient Occlusion", self, false )); - inputs[in_d3d + 18] = nodeValue_Float("AO Radius", self, 0.25 ); + newInput(in_d3d + 18, nodeValue_Float("AO Radius", self, 0.25 )); - inputs[in_d3d + 19] = nodeValue_Float("AO Bias", self, 0.05 ); + newInput(in_d3d + 19, nodeValue_Float("AO Bias", self, 0.05 )); inputs[in_d3d + 20] = nodeValue_Float("AO Strength", self, 1. ) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0.01, 4, 0.01 ] }); @@ -68,7 +68,7 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) inputs[in_d3d + 21] = nodeValue_Int("Round Normal", self, 0 ) .setWindows(); - inputs[in_d3d + 22] = nodeValue_Enum_Button("Blend mode", self, 0 , [ "Normal", "Additive" ]); + newInput(in_d3d + 22, nodeValue_Enum_Button("Blend mode", self, 0 , [ "Normal", "Additive" ])); in_cam = array_length(inputs); diff --git a/scripts/node_3d_depth/node_3d_depth.gml b/scripts/node_3d_depth/node_3d_depth.gml index 1a6b0c0cf..ab2b922c4 100644 --- a/scripts/node_3d_depth/node_3d_depth.gml +++ b/scripts/node_3d_depth/node_3d_depth.gml @@ -1,11 +1,11 @@ function Node_3D_Depth(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "3D Depth"; - inputs[0] = nodeValue_Surface("Base Texture", self); + newInput(0, nodeValue_Surface("Base Texture", self)); - inputs[1] = nodeValue_Surface("Depth", self); + newInput(1, nodeValue_Surface("Depth", self)); - inputs[2] = nodeValue_Vec3("Rotation", self, [0, 0, 0] ); + newInput(2, nodeValue_Vec3("Rotation", self, [0, 0, 0] )); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_3d_instancer/node_3d_instancer.gml b/scripts/node_3d_instancer/node_3d_instancer.gml index 7c240f866..48c426a08 100644 --- a/scripts/node_3d_instancer/node_3d_instancer.gml +++ b/scripts/node_3d_instancer/node_3d_instancer.gml @@ -1,7 +1,7 @@ function Node_3D_Instancer(_x, _y, _group = noone) : Node_3D_Modifier(_x, _y, _group) constructor { name = "3D Instancer"; - inputs[in_mesh + 0] = nodeValue_Int("Amounts", self, 1); + newInput(in_mesh + 0, nodeValue_Int("Amounts", self, 1)); inputs[in_mesh + 1] = nodeValue_Vec3("Positions", self, [ 0, 0, 0 ]) .setArrayDepth(1); diff --git a/scripts/node_3d_light_directional/node_3d_light_directional.gml b/scripts/node_3d_light_directional/node_3d_light_directional.gml index 88b927eb4..4d75b8b16 100644 --- a/scripts/node_3d_light_directional/node_3d_light_directional.gml +++ b/scripts/node_3d_light_directional/node_3d_light_directional.gml @@ -3,13 +3,13 @@ function Node_3D_Light_Directional(_x, _y, _group = noone) : Node_3D_Light(_x, _ object_class = __3dLightDirectional; - inputs[in_light + 0] = nodeValue_Bool("Cast Shadow", self, false); + newInput(in_light + 0, nodeValue_Bool("Cast Shadow", self, false)); - inputs[in_light + 1] = nodeValue_Int("Shadow Map Size", self, 1024); + newInput(in_light + 1, nodeValue_Int("Shadow Map Size", self, 1024)); - inputs[in_light + 2] = nodeValue_Int("Shadow Map Scale", self, 4); + newInput(in_light + 2, nodeValue_Int("Shadow Map Scale", self, 4)); - inputs[in_light + 3] = nodeValue_Float("Shadow Bias", self, .001); + newInput(in_light + 3, nodeValue_Float("Shadow Bias", self, .001)); input_display_list = [ ["Transform", false], 0, diff --git a/scripts/node_3d_material/node_3d_material.gml b/scripts/node_3d_material/node_3d_material.gml index f30417dbb..bb1dcaf35 100644 --- a/scripts/node_3d_material/node_3d_material.gml +++ b/scripts/node_3d_material/node_3d_material.gml @@ -11,11 +11,11 @@ function Node_3D_Material(_x, _y, _group = noone) : Node_3D(_x, _y, _group) cons inputs[2] = nodeValue_Float("Specular", self, 0 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[3] = nodeValue_Float("Shininess", self, 1 ); + newInput(3, nodeValue_Float("Shininess", self, 1 )); - inputs[4] = nodeValue_Bool("Metalic", self, false ); + newInput(4, nodeValue_Bool("Metalic", self, false )); - inputs[5] = nodeValue_Surface("Normal Map", self); + newInput(5, nodeValue_Surface("Normal Map", self)); inputs[6] = nodeValue_Float("Normal Strength", self, 1 ) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); @@ -23,7 +23,7 @@ function Node_3D_Material(_x, _y, _group = noone) : Node_3D(_x, _y, _group) cons inputs[7] = nodeValue_Float("Roughness", self, 1 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[8] = nodeValue_Bool("Anti aliasing", self, false ); + newInput(8, nodeValue_Bool("Anti aliasing", self, false )); outputs[0] = nodeValue_Output("Material", self, VALUE_TYPE.d3Material, noone); diff --git a/scripts/node_3d_mesh_cone/node_3d_mesh_cone.gml b/scripts/node_3d_mesh_cone/node_3d_mesh_cone.gml index 2f99b9a50..81ecd893c 100644 --- a/scripts/node_3d_mesh_cone/node_3d_mesh_cone.gml +++ b/scripts/node_3d_mesh_cone/node_3d_mesh_cone.gml @@ -12,7 +12,7 @@ function Node_3D_Mesh_Cone(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group inputs[in_mesh + 2] = nodeValue_D3Material("Material Side", self, new __d3dMaterial()) .setVisible(true, true); - inputs[in_mesh + 3] = nodeValue_Bool("Smooth Side", self, false ); + newInput(in_mesh + 3, nodeValue_Bool("Smooth Side", self, false )); input_display_list = [ __d3d_input_list_mesh, in_mesh + 0, in_mesh + 3, diff --git a/scripts/node_3d_mesh_cube/node_3d_mesh_cube.gml b/scripts/node_3d_mesh_cube/node_3d_mesh_cube.gml index 2fb3896a8..c738ce5f7 100644 --- a/scripts/node_3d_mesh_cube/node_3d_mesh_cube.gml +++ b/scripts/node_3d_mesh_cube/node_3d_mesh_cube.gml @@ -2,7 +2,7 @@ function Node_3D_Mesh_Cube(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group name = "3D Cube"; object_class = noone; - inputs[in_mesh + 0] = nodeValue_Bool("Material per side", self, false ); + newInput(in_mesh + 0, nodeValue_Bool("Material per side", self, false )); inputs[in_mesh + 1] = nodeValue_D3Material("Material", self, new __d3dMaterial()) .setVisible(true, true); diff --git a/scripts/node_3d_mesh_cylinder/node_3d_mesh_cylinder.gml b/scripts/node_3d_mesh_cylinder/node_3d_mesh_cylinder.gml index e4cec2d56..739b4a2d5 100644 --- a/scripts/node_3d_mesh_cylinder/node_3d_mesh_cylinder.gml +++ b/scripts/node_3d_mesh_cylinder/node_3d_mesh_cylinder.gml @@ -15,9 +15,9 @@ function Node_3D_Mesh_Cylinder(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _g inputs[in_mesh + 3] = nodeValue_D3Material("Material Side", self, new __d3dMaterial()) .setVisible(true, true); - inputs[in_mesh + 4] = nodeValue_Bool("Smooth Side", self, false ); + newInput(in_mesh + 4, nodeValue_Bool("Smooth Side", self, false )); - inputs[in_mesh + 5] = nodeValue_Bool("End caps", self, true ); + newInput(in_mesh + 5, nodeValue_Bool("End caps", self, true )); input_display_list = [ __d3d_input_list_mesh, in_mesh + 0, in_mesh + 4, in_mesh + 5, diff --git a/scripts/node_3d_mesh_export/node_3d_mesh_export.gml b/scripts/node_3d_mesh_export/node_3d_mesh_export.gml index 9c0fff8b0..3474a0313 100644 --- a/scripts/node_3d_mesh_export/node_3d_mesh_export.gml +++ b/scripts/node_3d_mesh_export/node_3d_mesh_export.gml @@ -8,9 +8,9 @@ function Node_3D_Mesh_Export(_x, _y, _group = noone) : Node(_x, _y, _group) cons .setDisplay(VALUE_DISPLAY.path_save, { filter: "Obj (.obj)|*.obj" }) .setVisible(true); - inputs[2] = nodeValue_Bool("Export Texture", self, true); + newInput(2, nodeValue_Bool("Export Texture", self, true)); - inputs[3] = nodeValue_Bool("Invert UV", self, false); + newInput(3, nodeValue_Bool("Invert UV", self, false)); input_display_list = [ 0, ["Export", false], 1, 2, 3, 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 b5029d237..87612d181 100644 --- a/scripts/node_3d_mesh_extrude/node_3d_mesh_extrude.gml +++ b/scripts/node_3d_mesh_extrude/node_3d_mesh_extrude.gml @@ -6,22 +6,22 @@ function Node_3D_Mesh_Extrude(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _gr inputs[in_mesh + 0] = nodeValue_D3Material("Front Surface", self, new __d3dMaterial()) .setVisible(true, true); - inputs[in_mesh + 1] = nodeValue_Surface("Front Height", self); + newInput(in_mesh + 1, nodeValue_Surface("Front Height", self)); inputs[in_mesh + 2] = nodeValue_Bool("Smooth", self, false) - inputs[in_mesh + 3] = nodeValue_Bool("Always update", self, false); + newInput(in_mesh + 3, nodeValue_Bool("Always update", self, false)); - inputs[in_mesh + 4] = nodeValue_Bool("Double Side", self, false); + newInput(in_mesh + 4, nodeValue_Bool("Double Side", self, false)); inputs[in_mesh + 5] = nodeValue_D3Material("Back Surface", self, new __d3dMaterial()) .setVisible(true, true); - inputs[in_mesh + 6] = nodeValue_Surface("Back Height", self); + newInput(in_mesh + 6, nodeValue_Surface("Back Height", self)); - inputs[in_mesh + 7] = nodeValue_Slider_Range("Front Height Level", self, [ 0, 1 ]); + newInput(in_mesh + 7, nodeValue_Slider_Range("Front Height Level", self, [ 0, 1 ])); - inputs[in_mesh + 8] = nodeValue_Slider_Range("Back Height Level", self, [ 0, 1 ]); + newInput(in_mesh + 8, nodeValue_Slider_Range("Back Height Level", self, [ 0, 1 ])); input_display_list = [ in_mesh + 3, __d3d_input_list_mesh, diff --git a/scripts/node_3d_mesh_path_extrude/node_3d_mesh_path_extrude.gml b/scripts/node_3d_mesh_path_extrude/node_3d_mesh_path_extrude.gml index 416cef53b..a7ec8901e 100644 --- a/scripts/node_3d_mesh_path_extrude/node_3d_mesh_path_extrude.gml +++ b/scripts/node_3d_mesh_path_extrude/node_3d_mesh_path_extrude.gml @@ -15,9 +15,9 @@ function Node_3D_Mesh_Path_Extrude(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y inputs[in_mesh + 3] = nodeValue_D3Material("Material Cap", self, new __d3dMaterial()) .setVisible(true, true); - inputs[in_mesh + 4] = nodeValue_Bool("Smooth", self, false ); + newInput(in_mesh + 4, nodeValue_Bool("Smooth", self, false )); - inputs[in_mesh + 5] = nodeValue_Bool("End caps", self, true ); + newInput(in_mesh + 5, nodeValue_Bool("End caps", self, true )); inputs[in_mesh + 6] = nodeValue_Int("Subdivision", self, 8 ) .setValidator(VV_min(2)); @@ -25,13 +25,13 @@ function Node_3D_Mesh_Path_Extrude(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y inputs[in_mesh + 7] = nodeValue_Float("Radius", self, 0.25 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[in_mesh + 8] = nodeValue("Radius Over Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 ); + newInput(in_mesh + 8, nodeValue("Radius Over Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 )); - inputs[in_mesh + 9] = nodeValue_Vec2("Texture Scale", self, [ 1, 1 ] ); + newInput(in_mesh + 9, nodeValue_Vec2("Texture Scale", self, [ 1, 1 ] )); - inputs[in_mesh + 10] = nodeValue_Bool("Loop", self, false ); + newInput(in_mesh + 10, nodeValue_Bool("Loop", self, false )); - inputs[in_mesh + 11] = nodeValue_Bool("Inverted", self, false ); + newInput(in_mesh + 11, nodeValue_Bool("Inverted", self, false )); input_display_list = [ ["Path", false], in_mesh + 0, in_mesh + 10, 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 5fc76e543..fb9b0cd88 100644 --- a/scripts/node_3d_mesh_plane/node_3d_mesh_plane.gml +++ b/scripts/node_3d_mesh_plane/node_3d_mesh_plane.gml @@ -6,7 +6,7 @@ function Node_3D_Mesh_Plane(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _grou inputs[in_mesh + 0] = nodeValue_D3Material("Material", self, new __d3dMaterial()) .setVisible(true, true); - inputs[in_mesh + 1] = nodeValue_Enum_Button("Normal", self, 2 , [ "X", "Y", "Z" ]); + newInput(in_mesh + 1, nodeValue_Enum_Button("Normal", self, 2 , [ "X", "Y", "Z" ])); inputs[in_mesh + 2] = nodeValue_Bool("Both side", self, false ) .rejectArray(); diff --git a/scripts/node_3d_mesh_sphere_ico/node_3d_mesh_sphere_ico.gml b/scripts/node_3d_mesh_sphere_ico/node_3d_mesh_sphere_ico.gml index 1078d63e8..131109f2c 100644 --- a/scripts/node_3d_mesh_sphere_ico/node_3d_mesh_sphere_ico.gml +++ b/scripts/node_3d_mesh_sphere_ico/node_3d_mesh_sphere_ico.gml @@ -9,7 +9,7 @@ function Node_3D_Mesh_Sphere_Ico(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, inputs[in_mesh + 1] = nodeValue_D3Material("Material", self, new __d3dMaterial()) .setVisible(true, true); - inputs[in_mesh + 2] = nodeValue_Bool("Smooth Normal", self, false ); + newInput(in_mesh + 2, nodeValue_Bool("Smooth Normal", self, false )); input_display_list = [ __d3d_input_list_mesh, in_mesh + 0, in_mesh + 2, diff --git a/scripts/node_3d_mesh_sphere_uv/node_3d_mesh_sphere_uv.gml b/scripts/node_3d_mesh_sphere_uv/node_3d_mesh_sphere_uv.gml index 34e15c2e3..528b3b509 100644 --- a/scripts/node_3d_mesh_sphere_uv/node_3d_mesh_sphere_uv.gml +++ b/scripts/node_3d_mesh_sphere_uv/node_3d_mesh_sphere_uv.gml @@ -12,7 +12,7 @@ function Node_3D_Mesh_Sphere_UV(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _ inputs[in_mesh + 2] = nodeValue_D3Material("Material", self, new __d3dMaterial()) .setVisible(true, true); - inputs[in_mesh + 3] = nodeValue_Bool("Smooth Normal", self, false ); + newInput(in_mesh + 3, nodeValue_Bool("Smooth Normal", self, false )); input_display_list = [ __d3d_input_list_mesh, in_mesh + 0, in_mesh + 1, in_mesh + 3, diff --git a/scripts/node_3d_mesh_stack_slice/node_3d_mesh_stack_slice.gml b/scripts/node_3d_mesh_stack_slice/node_3d_mesh_stack_slice.gml index 4ce79c35b..aed1570c1 100644 --- a/scripts/node_3d_mesh_stack_slice/node_3d_mesh_stack_slice.gml +++ b/scripts/node_3d_mesh_stack_slice/node_3d_mesh_stack_slice.gml @@ -4,13 +4,13 @@ function Node_3D_Mesh_Stack_Slice(_x, _y, _group = noone) : Node(_x, _y, _group) inputs[0] = nodeValue_D3Mesh("Mesh", self, noone) .setVisible(true, true); - inputs[1] = nodeValue_Vec2("Output Dimension", self, [ 16, 16 ]); + newInput(1, nodeValue_Vec2("Output Dimension", self, [ 16, 16 ])); - inputs[2] = nodeValue_Float("Scale", self, 1); + newInput(2, nodeValue_Float("Scale", self, 1)); - inputs[3] = nodeValue_Int("Slices", self, 4); + newInput(3, nodeValue_Int("Slices", self, 4)); - inputs[4] = nodeValue_Vec3("BBOX Padding", self, [ 0, 0, 0 ]); + newInput(4, nodeValue_Vec3("BBOX Padding", self, [ 0, 0, 0 ])); outputs[0] = nodeValue_Output("Outputs", self, VALUE_TYPE.surface, []) .setArrayDepth(1); 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 a7a86d43e..059a18f5b 100644 --- a/scripts/node_3d_mesh_terrain/node_3d_mesh_terrain.gml +++ b/scripts/node_3d_mesh_terrain/node_3d_mesh_terrain.gml @@ -6,18 +6,18 @@ function Node_3D_Mesh_Terrain(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _gr inputs[in_mesh + 0] = nodeValue_D3Material("Material", self, new __d3dMaterial()) .setVisible(true, true); - inputs[in_mesh + 1] = nodeValue_Enum_Button("Input type", self, 0 , [ "Surface", "Array" ]); + newInput(in_mesh + 1, nodeValue_Enum_Button("Input type", self, 0 , [ "Surface", "Array" ])); - inputs[in_mesh + 2] = nodeValue_Surface("Height map", self); + newInput(in_mesh + 2, nodeValue_Surface("Height map", self)); - inputs[in_mesh + 3] = nodeValue_Int("Subdivision", self, 4 ); + newInput(in_mesh + 3, nodeValue_Int("Subdivision", self, 4 )); inputs[in_mesh + 4] = nodeValue_Float("Height array", self, [] ) .setArrayDepth(2); - inputs[in_mesh + 5] = nodeValue_Bool("Smooth", self, false ); + newInput(in_mesh + 5, nodeValue_Bool("Smooth", self, false )); - inputs[in_mesh + 6] = nodeValue_Slider_Range("Front Height Level", self, [ 0, 1 ]); + newInput(in_mesh + 6, nodeValue_Slider_Range("Front Height Level", self, [ 0, 1 ])); input_display_list = [ __d3d_input_list_transform, diff --git a/scripts/node_3d_particle/node_3d_particle.gml b/scripts/node_3d_particle/node_3d_particle.gml index 89a958e8f..566c3d686 100644 --- a/scripts/node_3d_particle/node_3d_particle.gml +++ b/scripts/node_3d_particle/node_3d_particle.gml @@ -2,7 +2,7 @@ function Node_3D_Particle(_x, _y, _group = noone) : Node_3D_Modifier(_x, _y, _gr name = "3D Particle"; update_on_frame = true; - inputs[in_mesh + 0] = nodeValue_Int("Amounts", self, 1); + newInput(in_mesh + 0, nodeValue_Int("Amounts", self, 1)); part_pool_size = 128; parts = array_create(part_pool_size); 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 156ece34e..42e5a2d39 100644 --- a/scripts/node_3d_point_affector/node_3d_point_affector.gml +++ b/scripts/node_3d_point_affector/node_3d_point_affector.gml @@ -8,13 +8,13 @@ function Node_3D_Point_Affector(_x, _y, _group = noone) : Node_3D_Object(_x, _y, inputs[in_d3d + 0] = nodeValue_Vec3("Points", self, [ 0, 0, 0 ]) .setVisible(true, true); - inputs[in_d3d + 1] = nodeValue_Vec3("Initial value", self, [ 0, 0, 0 ]); + newInput(in_d3d + 1, nodeValue_Vec3("Initial value", self, [ 0, 0, 0 ])); - inputs[in_d3d + 2] = nodeValue_Vec3("Final value", self, [ 0, 0, 0 ]); + newInput(in_d3d + 2, nodeValue_Vec3("Final value", self, [ 0, 0, 0 ])); - inputs[in_d3d + 3] = nodeValue_Float("Falloff distance", self, 0.5); + newInput(in_d3d + 3, nodeValue_Float("Falloff distance", self, 0.5)); - inputs[in_d3d + 4] = nodeValue("Falloff curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + newInput(in_d3d + 4, nodeValue("Falloff curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01)); 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), ]); diff --git a/scripts/node_3d_repeat/node_3d_repeat.gml b/scripts/node_3d_repeat/node_3d_repeat.gml index 47f35a703..ff00ddd78 100644 --- a/scripts/node_3d_repeat/node_3d_repeat.gml +++ b/scripts/node_3d_repeat/node_3d_repeat.gml @@ -8,19 +8,19 @@ function Node_3D_Repeat(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr inputs[1] = nodeValue_Enum_Button("Object Mode", self, 0 , [ "Duplicate", "Array" ] ) .rejectArray(); - inputs[2] = nodeValue_Int("Amount", self, 1 ); + newInput(2, nodeValue_Int("Amount", self, 1 )); - inputs[3] = nodeValue_Vec3("Starting Position", self, [ 0, 0, 0 ] ); + newInput(3, nodeValue_Vec3("Starting Position", self, [ 0, 0, 0 ] )); - inputs[4] = nodeValue_Quaternion("Starting Rotation", self, [ 0, 0, 0, 1 ] ); + newInput(4, nodeValue_Quaternion("Starting Rotation", self, [ 0, 0, 0, 1 ] )); - inputs[5] = nodeValue_Vec3("Starting Scale", self, [ 1, 1, 1 ] ); + newInput(5, nodeValue_Vec3("Starting Scale", self, [ 1, 1, 1 ] )); - inputs[6] = nodeValue_Vec3("Shift Position", self, [ 0, 0, 0 ] ); + newInput(6, nodeValue_Vec3("Shift Position", self, [ 0, 0, 0 ] )); - inputs[7] = nodeValue_Quaternion("Shift Rotation", self, [ 0, 0, 0, 1 ] ); + newInput(7, nodeValue_Quaternion("Shift Rotation", self, [ 0, 0, 0, 1 ] )); - inputs[8] = nodeValue_Vec3("Shift Scale", self, [ 0, 0, 0 ] ); + newInput(8, nodeValue_Vec3("Shift Scale", self, [ 0, 0, 0 ] )); inputs[9] = nodeValue_Float("Positions", self, [] ) .setArrayDepth(2); 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 4215bc47c..77f3f9ea9 100644 --- a/scripts/node_3d_transform_image/node_3d_mesh_plane.gml +++ b/scripts/node_3d_transform_image/node_3d_mesh_plane.gml @@ -6,7 +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_Enum_Button("Normal", self, 2 , [ "X", "Y", "Z" ]); + newInput(| in_mesh + 1, nodeValue_Enum_Button("Normal", self, 2 , [ "X", "Y", "Z" ])); inputs[| in_mesh + 2] = nodeValue_Bool("Both side", self, false ) 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 87db32f92..9a7b17e45 100644 --- a/scripts/node_3d_transform_scene/node_3d_transform_scene.gml +++ b/scripts/node_3d_transform_scene/node_3d_transform_scene.gml @@ -13,11 +13,11 @@ function Node_3D_Transform_Scene(_x, _y, _group = noone) : Node_3D(_x, _y, _grou inputs[3] = nodeValue_Float("Scale", self, []) .setArrayDepth(2); - inputs[4] = nodeValue_Enum_Scroll("Positioning type", self, 0, [ "Additive", "Override" ]); + newInput(4, nodeValue_Enum_Scroll("Positioning type", self, 0, [ "Additive", "Override" ])); - inputs[5] = nodeValue_Enum_Scroll("Rotating type", self, 0, [ "Additive", "Override" ]); + newInput(5, nodeValue_Enum_Scroll("Rotating type", self, 0, [ "Additive", "Override" ])); - inputs[6] = nodeValue_Enum_Scroll("Scaling type", self, 0, [ "Additive", "Multiplicative", "Override" ]); + newInput(6, nodeValue_Enum_Scroll("Scaling type", self, 0, [ "Additive", "Multiplicative", "Override" ])); outputs[0] = nodeValue_Output("Scene", self, VALUE_TYPE.d3Scene, noone); diff --git a/scripts/node_3dsurf/node_3dsurf.gml b/scripts/node_3dsurf/node_3dsurf.gml index 0941b81df..161a78307 100644 --- a/scripts/node_3dsurf/node_3dsurf.gml +++ b/scripts/node_3dsurf/node_3dsurf.gml @@ -6,12 +6,12 @@ function Node_3DSurf(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[0] = nodeValue_D3Scene("Scene", self, noone) .setVisible(true, true); - inputs[1] = nodeValue_Vec2("Base Dimension", self, DEF_SURF); + newInput(1, nodeValue_Vec2("Base Dimension", self, DEF_SURF)); inputs[2] = nodeValue_Float("Vertical Angle", self, 45 ) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 0.1] }); - inputs[3] = nodeValue_Float("Distance", self, 4 ); + newInput(3, nodeValue_Float("Distance", self, 4 )); outputs[0] = nodeValue_Output("3DSurf", self, VALUE_TYPE.dynaSurface, noone); diff --git a/scripts/node_9slice/node_9slice.gml b/scripts/node_9slice/node_9slice.gml index 26c7edac4..c8eb2555d 100644 --- a/scripts/node_9slice/node_9slice.gml +++ b/scripts/node_9slice/node_9slice.gml @@ -1,14 +1,14 @@ function Node_9Slice(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Nine Slice"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Dimension(self); + newInput(1, nodeValue_Dimension(self)); inputs[2] = nodeValue_Padding("Splice", self, [ 0, 0, 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[3] = nodeValue_Enum_Scroll("Filling modes", self, 0, [ "Scale", "Repeat" ]); + newInput(3, nodeValue_Enum_Scroll("Filling modes", self, 0, [ "Scale", "Repeat" ])); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_FFT/node_FFT.gml b/scripts/node_FFT/node_FFT.gml index e509834c5..4d7f3cf63 100644 --- a/scripts/node_FFT/node_FFT.gml +++ b/scripts/node_FFT/node_FFT.gml @@ -6,7 +6,7 @@ function Node_FFT(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const .setArrayDepth(1) .setVisible(true, true); - inputs[1] = nodeValue_Enum_Scroll("Preprocess Function", self, 0, [ "None", "Hann" ]); + newInput(1, nodeValue_Enum_Scroll("Preprocess Function", self, 0, [ "None", "Hann" ])); outputs[0] = nodeValue_Output("Array", self, 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 01156f835..455731263 100644 --- a/scripts/node_FLIP_apply_force/node_FLIP_apply_force.gml +++ b/scripts/node_FLIP_apply_force/node_FLIP_apply_force.gml @@ -31,9 +31,9 @@ function Node_FLIP_Apply_Force(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[2] = nodeValue_Float("Radius", self, 4 ) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); - inputs[3] = nodeValue_Enum_Scroll("Shape", self, 0 , [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Rectangle", s_node_shape_rectangle, 0), ]); + newInput(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_Vec2("Size", self, [ 4, 4 ] ); + newInput(4, nodeValue_Vec2("Size", self, [ 4, 4 ] )); inputs[5] = nodeValue_Surface("Texture", self) 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 65d459ac3..41bc6cd2a 100644 --- a/scripts/node_FLIP_apply_velocity/node_FLIP_apply_velocity.gml +++ b/scripts/node_FLIP_apply_velocity/node_FLIP_apply_velocity.gml @@ -15,11 +15,11 @@ function Node_FLIP_Apply_Velocity(_x, _y, _group = noone) : Node(_x, _y, _group) inputs[2] = nodeValue_Float("Radius", self, 4 ) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); - inputs[3] = nodeValue_Vec2("Velocity", self, [ 0, 0 ] ); + newInput(3, nodeValue_Vec2("Velocity", self, [ 0, 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) ]); + newInput(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_Vec2("Size", self, [ 4, 4 ] ); + newInput(5, nodeValue_Vec2("Size", self, [ 4, 4 ] )); input_display_list = [ 0, ["Velocity", false], 4, 1, 2, 5, 3, diff --git a/scripts/node_FLIP_destroy/node_FLIP_destroy.gml b/scripts/node_FLIP_destroy/node_FLIP_destroy.gml index b87448c27..f45127127 100644 --- a/scripts/node_FLIP_destroy/node_FLIP_destroy.gml +++ b/scripts/node_FLIP_destroy/node_FLIP_destroy.gml @@ -12,12 +12,12 @@ function Node_FLIP_Destroy(_x, _y, _group = noone) : Node(_x, _y, _group) constr inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(); }); - inputs[2] = nodeValue_Enum_Scroll("Shape", self, 0 , [ new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Rectangle", s_node_shape_rectangle, 0), ]); + newInput(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_Float("Radius", self, 4 ) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); - inputs[4] = nodeValue_Vec2("Size", self, [ 4, 4 ] ); + newInput(4, nodeValue_Vec2("Size", self, [ 4, 4 ] )); inputs[5] = nodeValue_Float("Ratio", self, 1 ) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_FLIP_domain/node_FLIP_domain.gml b/scripts/node_FLIP_domain/node_FLIP_domain.gml index 45c41bd1a..5dd9db002 100644 --- a/scripts/node_FLIP_domain/node_FLIP_domain.gml +++ b/scripts/node_FLIP_domain/node_FLIP_domain.gml @@ -7,27 +7,27 @@ 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); + newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Int("Particle Size", self, 1); + newInput(1, nodeValue_Int("Particle Size", self, 1)); - inputs[2] = nodeValue_Int("Particle Density", self, 10); + newInput(2, nodeValue_Int("Particle Density", self, 10)); inputs[3] = nodeValue_Float("FLIP Ratio", self, 0.8) .setDisplay(VALUE_DISPLAY.slider); - inputs[4] = nodeValue_Float("Resolve accelerator", self, 1.5); + newInput(4, nodeValue_Float("Resolve accelerator", self, 1.5)); - inputs[5] = nodeValue_Int("Iteration", self, 8); + newInput(5, nodeValue_Int("Iteration", self, 8)); inputs[6] = nodeValue_Float("Damping", self, 0.8) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Float("Gravity", self, 5); + newInput(7, nodeValue_Float("Gravity", self, 5)); - inputs[8] = nodeValue_Float("Time Step", self, 0.05); + newInput(8, nodeValue_Float("Time Step", self, 0.05)); - inputs[9] = nodeValue_Toggle("Wall", self, 0b1111, { data: [ "T", "B", "L", "R" ] }); + newInput(9, nodeValue_Toggle("Wall", self, 0b1111, { data: [ "T", "B", "L", "R" ] })); inputs[10] = nodeValue_Float("Viscosity", self, 0.) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); @@ -38,7 +38,7 @@ function Node_FLIP_Domain(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[12] = nodeValue_Float("Wall Elasticity", self, 0.) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); - inputs[13] = nodeValue_Rotation("Gravity Direction", self, 0); + newInput(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 158e432f7..704d45e21 100644 --- a/scripts/node_FLIP_render/node_FLIP_render.gml +++ b/scripts/node_FLIP_render/node_FLIP_render.gml @@ -11,28 +11,28 @@ function Node_FLIP_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[1] = nodeValue_Float("Merge threshold", self, 0.75) .setDisplay(VALUE_DISPLAY.slider); - inputs[2] = nodeValue_Range("Lifespan", self, [ 0, 0 ], { linked : true }); + newInput(2, nodeValue_Range("Lifespan", self, [ 0, 0 ], { linked : true })); - inputs[3] = nodeValue_Float("Particle expansion", self, 20); + newInput(3, nodeValue_Float("Particle expansion", self, 20)); - inputs[4] = nodeValue_Bool("Draw obstracles", self, true); + newInput(4, nodeValue_Bool("Draw obstracles", self, true)); - inputs[5] = nodeValue_Surface("Fluid particle", self); + newInput(5, nodeValue_Surface("Fluid particle", self)); 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_Bool("Threshold", self, true); + newInput(7, nodeValue_Bool("Threshold", self, true)); - inputs[8] = nodeValue_Bool("Additive", self, true); + newInput(8, nodeValue_Bool("Additive", self, true)); - inputs[9] = nodeValue_Slider_Range("Alpha", self, [ 1, 1 ]); + newInput(9, nodeValue_Slider_Range("Alpha", self, [ 1, 1 ])); - inputs[10] = nodeValue_Int("Segments", self, 1); + newInput(10, nodeValue_Int("Segments", self, 1)); - inputs[11] = nodeValue_Gradient("Color Over Velocity", self, new gradientObject(cola(c_white))); + newInput(11, nodeValue_Gradient("Color Over Velocity", self, new gradientObject(cola(c_white)))); - inputs[12] = nodeValue_Range("Velocity Map", self, [ 0, 10 ]); + newInput(12, nodeValue_Range("Velocity Map", self, [ 0, 10 ])); input_display_list = [ 0, 5, ["Rendering", false], 6, 10, 3, 4, 9, diff --git a/scripts/node_FLIP_repel/node_FLIP_repel.gml b/scripts/node_FLIP_repel/node_FLIP_repel.gml index a1ad1829a..be8999e93 100644 --- a/scripts/node_FLIP_repel/node_FLIP_repel.gml +++ b/scripts/node_FLIP_repel/node_FLIP_repel.gml @@ -12,7 +12,7 @@ function Node_FLIP_Repel(_x, _y, _group = noone) : Node(_x, _y, _group) construc inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(); }); - inputs[2] = nodeValue_Float("Radius", self, 4 ); + newInput(2, nodeValue_Float("Radius", self, 4 )); inputs[3] = nodeValue_Float("Strength", self, 4 ) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 16, 0.1 ] }); diff --git a/scripts/node_FLIP_spawner/node_FLIP_spawner.gml b/scripts/node_FLIP_spawner/node_FLIP_spawner.gml index 6eb5f8489..f587e44c4 100644 --- a/scripts/node_FLIP_spawner/node_FLIP_spawner.gml +++ b/scripts/node_FLIP_spawner/node_FLIP_spawner.gml @@ -9,20 +9,20 @@ function Node_FLIP_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group) constr inputs[0] = nodeValue_Fdomain("Domain", self, noone ) .setVisible(true, true); - 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" ]); + newInput(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_Vec2("Spawn Position", self, [ 0.5, 0.25 ] ) .setUnitRef(function(index) { return getDimension(); }, VALUE_UNIT.reference); - inputs[3] = nodeValue_Enum_Button("Spawn Type", self, 0 , [ "Stream", "Splash" ]); + newInput(3, nodeValue_Enum_Button("Spawn Type", self, 0 , [ "Stream", "Splash" ])); - inputs[4] = nodeValue_Int("Spawn Frame", self, 0 ); + newInput(4, nodeValue_Int("Spawn Frame", self, 0 )); - inputs[5] = nodeValue_Float("Spawn Amount", self, 8 ); + newInput(5, nodeValue_Float("Spawn Amount", self, 8 )); - inputs[6] = nodeValue_Range("Spawn Velocity", self, [ 0, 0 ] ); + newInput(6, nodeValue_Range("Spawn Velocity", self, [ 0, 0 ] )); - inputs[7] = nodeValue_Surface("Spawn Surface", self); + newInput(7, nodeValue_Surface("Spawn Surface", self)); inputs[8] = nodeValue_Float("Spawn Radius", self, 2 ) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); @@ -30,14 +30,14 @@ function Node_FLIP_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group) constr inputs[9] = nodeValue_Int("Seed", self, 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) }); - inputs[10] = nodeValue_Rotation_Random("Spawn Direction", self, [ 0, 45, 135, 0, 0 ] ); + newInput(10, nodeValue_Rotation_Random("Spawn Direction", self, [ 0, 45, 135, 0, 0 ] )); inputs[11] = nodeValue_Float("Inherit Velocity", self, 0 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[12] = nodeValue_Int("Spawn Duration", self, 1 ); + newInput(12, nodeValue_Int("Spawn Duration", self, 1 )); - inputs[13] = nodeValue_Vec2("Spawn Szie", self, [ 2, 2 ] ); + newInput(13, nodeValue_Vec2("Spawn Szie", self, [ 2, 2 ] )); input_display_list = [ 0, 9, ["Spawner", false], 1, 7, 8, 13, 2, 3, 4, 12, 5, diff --git a/scripts/node_FLIP_update/node_FLIP_update.gml b/scripts/node_FLIP_update/node_FLIP_update.gml index 631e5c5ca..4f3997820 100644 --- a/scripts/node_FLIP_update/node_FLIP_update.gml +++ b/scripts/node_FLIP_update/node_FLIP_update.gml @@ -9,11 +9,11 @@ function Node_FLIP_Update(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[0] = nodeValue_Fdomain("Domain", self, noone) .setVisible(true, true); - inputs[1] = nodeValue_Bool("Update", self, true); + newInput(1, nodeValue_Bool("Update", self, true)); - inputs[2] = nodeValue_Bool("Override timestep", self, false); + newInput(2, nodeValue_Bool("Override timestep", self, false)); - inputs[3] = nodeValue_Float("Timestep", self, 0.01); + newInput(3, nodeValue_Float("Timestep", self, 0.01)); input_display_list = [ 0, 1, ["Timestep", false], 2, 3, diff --git a/scripts/node_FLIP_vortex/node_FLIP_vortex.gml b/scripts/node_FLIP_vortex/node_FLIP_vortex.gml index 4553b09ce..8c94b2485 100644 --- a/scripts/node_FLIP_vortex/node_FLIP_vortex.gml +++ b/scripts/node_FLIP_vortex/node_FLIP_vortex.gml @@ -12,7 +12,7 @@ function Node_FLIP_Vortex(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(); }); - inputs[2] = nodeValue_Float("Radius", self, 4 ); + newInput(2, nodeValue_Float("Radius", self, 4 )); inputs[3] = nodeValue_Float("Strength", self, 4 ) .setDisplay(VALUE_DISPLAY.slider, { range: [ -8, 8, 0.01 ] }); diff --git a/scripts/node_FLIP_wall/node_FLIP_wall.gml b/scripts/node_FLIP_wall/node_FLIP_wall.gml index 34e924f88..b93c20625 100644 --- a/scripts/node_FLIP_wall/node_FLIP_wall.gml +++ b/scripts/node_FLIP_wall/node_FLIP_wall.gml @@ -9,7 +9,7 @@ function Node_FLIP_Wall(_x, _y, _group = noone) : Node(_x, _y, _group) construct inputs[0] = nodeValue_Fdomain("Domain", self, noone ) .setVisible(true, true); - inputs[1] = nodeValue_Area("Area", self, DEF_AREA , { useShape : false }); + newInput(1, nodeValue_Area("Area", self, DEF_AREA , { useShape : false })); input_display_list = [ 0, ["Collider", false], 1 diff --git a/scripts/node_FXAA/node_FXAA.gml b/scripts/node_FXAA/node_FXAA.gml index 7bc769676..9c62778cf 100644 --- a/scripts/node_FXAA/node_FXAA.gml +++ b/scripts/node_FXAA/node_FXAA.gml @@ -1,9 +1,9 @@ function Node_FXAA(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "FXAA"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Bool("Active", self, true); + newInput(1, nodeValue_Bool("Active", self, true)); inputs[2] = nodeValue_Float("Distance", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_FXAA/node_bw.gml b/scripts/node_FXAA/node_bw.gml index 1d28185b4..a1f9d9cd6 100644 --- a/scripts/node_FXAA/node_bw.gml +++ b/scripts/node_FXAA/node_bw.gml @@ -10,11 +10,11 @@ function Node_BW(_x, _y) : Node_Processor(_x, _y) constructor { uniform_exp = shader_get_uniform(sh_bw, "brightness"); uniform_con = shader_get_uniform(sh_bw, "contrast"); - inputs[| 0] = new NodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); - inputs[| 1] = new NodeValue_Float(1, "Brightness", self, 0); + newInput(| 0, NodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0)); + newInput(| 1, NodeValue_Float(1, "Brightness", self, 0)); inputs[| 1].setDisplay(VALUE_DISPLAY.slider, [ -1, 1, 0.01]); - inputs[| 2] = new NodeValue_Float(2, "Contrast", self, 1); + newInput(| 2, NodeValue_Float(2, "Contrast", self, 1)); inputs[| 2].setDisplay(VALUE_DISPLAY.slider, [ -1, 4, 0.01]); outputs[| 0] = new nodeValue_Output(0, "Surface out", self, VALUE_TYPE.surface, surface_create(1, 1)); diff --git a/scripts/node_PCX_array_get/node_PCX_array_get.gml b/scripts/node_PCX_array_get/node_PCX_array_get.gml index 5b10f1707..93e4e3d44 100644 --- a/scripts/node_PCX_array_get/node_PCX_array_get.gml +++ b/scripts/node_PCX_array_get/node_PCX_array_get.gml @@ -1,9 +1,9 @@ function Node_PCX_Array_Get(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor { name = "Array Get"; - inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(0, nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); - inputs[1] = nodeValue("Index", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(1, nodeValue("Index", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); diff --git a/scripts/node_PCX_array_set/node_PCX_array_set.gml b/scripts/node_PCX_array_set/node_PCX_array_set.gml index 0e38fdddd..a8477ae82 100644 --- a/scripts/node_PCX_array_set/node_PCX_array_set.gml +++ b/scripts/node_PCX_array_set/node_PCX_array_set.gml @@ -1,11 +1,11 @@ function Node_PCX_Array_Set(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor { name = "Array Set"; - inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(0, nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); - inputs[1] = nodeValue("Index", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(1, nodeValue("Index", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); - inputs[2] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(2, nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); diff --git a/scripts/node_PCX_condition/node_PCX_condition.gml b/scripts/node_PCX_condition/node_PCX_condition.gml index f4632bbf3..b2413d4c7 100644 --- a/scripts/node_PCX_condition/node_PCX_condition.gml +++ b/scripts/node_PCX_condition/node_PCX_condition.gml @@ -1,11 +1,11 @@ function Node_PCX_Condition(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor { name = "Condition"; - inputs[0] = nodeValue("Condition", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(0, nodeValue("Condition", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); - inputs[1] = nodeValue("True", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(1, nodeValue("True", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); - inputs[2] = nodeValue("False", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(2, nodeValue("False", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); diff --git a/scripts/node_PCX_equation/node_PCX_equation.gml b/scripts/node_PCX_equation/node_PCX_equation.gml index d4509fea5..e69b76d4d 100644 --- a/scripts/node_PCX_equation/node_PCX_equation.gml +++ b/scripts/node_PCX_equation/node_PCX_equation.gml @@ -4,7 +4,7 @@ function Node_PCX_Equation(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) co setDimension(96, 48); ast = noone; - inputs[0] = nodeValue_Text("Equation", self, ""); + newInput(0, nodeValue_Text("Equation", self, "")); outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.PCXnode, noone ); 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 0de791f12..1d0c413ce 100644 --- a/scripts/node_PCX_fn_math/node_PCX_fn_math.gml +++ b/scripts/node_PCX_fn_math/node_PCX_fn_math.gml @@ -7,11 +7,11 @@ function Node_PCX_fn_Math(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) con "Min", "Max", "Clamp", -1, "Lerp" ]); - inputs[1] = nodeValue("x", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(1, nodeValue("x", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); - inputs[2] = nodeValue("y", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(2, nodeValue("y", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); - inputs[3] = nodeValue("z", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(3, nodeValue("z", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); diff --git a/scripts/node_PCX_fn_random/node_PCX_fn_random.gml b/scripts/node_PCX_fn_random/node_PCX_fn_random.gml index 0f24cba8c..cb54b32eb 100644 --- a/scripts/node_PCX_fn_random/node_PCX_fn_random.gml +++ b/scripts/node_PCX_fn_random/node_PCX_fn_random.gml @@ -1,11 +1,11 @@ function Node_PCX_fn_Random(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor { name = "Random"; - inputs[0] = nodeValue("Min", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(0, nodeValue("Min", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); - inputs[1] = nodeValue("Max", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(1, nodeValue("Max", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); - inputs[2] = nodeValue_Bool("Integer", self, false); + newInput(2, nodeValue_Bool("Integer", self, false)); outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); diff --git a/scripts/node_PCX_fn_surface_height/node_PCX_fn_surface_height.gml b/scripts/node_PCX_fn_surface_height/node_PCX_fn_surface_height.gml index 0c24aa7a7..0bc330aee 100644 --- a/scripts/node_PCX_fn_surface_height/node_PCX_fn_surface_height.gml +++ b/scripts/node_PCX_fn_surface_height/node_PCX_fn_surface_height.gml @@ -1,7 +1,7 @@ function Node_PCX_fn_Surface_Height(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor { name = "Surface Height"; - inputs[0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(0, nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); diff --git a/scripts/node_PCX_fn_surface_width/node_PCX_fn_surface_width.gml b/scripts/node_PCX_fn_surface_width/node_PCX_fn_surface_width.gml index 95f61b6ff..179fa413e 100644 --- a/scripts/node_PCX_fn_surface_width/node_PCX_fn_surface_width.gml +++ b/scripts/node_PCX_fn_surface_width/node_PCX_fn_surface_width.gml @@ -1,7 +1,7 @@ function Node_PCX_fn_Surface_Width(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor { name = "Surface Width"; - inputs[0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(0, nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); diff --git a/scripts/node_PCX_fn_var/node_PCX_fn_var.gml b/scripts/node_PCX_fn_var/node_PCX_fn_var.gml index 86c892f8f..3f57e3559 100644 --- a/scripts/node_PCX_fn_var/node_PCX_fn_var.gml +++ b/scripts/node_PCX_fn_var/node_PCX_fn_var.gml @@ -2,7 +2,7 @@ function Node_PCX_fn_var(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) cons name = "Fn Variable"; w = 64; - inputs[0] = nodeValue("Default Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0); + newInput(0, nodeValue("Default Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)); outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); diff --git a/scripts/node_PCX_var/node_PCX_var.gml b/scripts/node_PCX_var/node_PCX_var.gml index 7a5aefe30..79d8008c5 100644 --- a/scripts/node_PCX_var/node_PCX_var.gml +++ b/scripts/node_PCX_var/node_PCX_var.gml @@ -1,9 +1,9 @@ function Node_PCX_var(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor { name = "Variable"; - inputs[0] = nodeValue_Text("Name", self, ""); + newInput(0, nodeValue_Text("Name", self, "")); - inputs[1] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1); + newInput(1, nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1)); outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone); diff --git a/scripts/node_VFX_attract/node_VFX_attract.gml b/scripts/node_VFX_attract/node_VFX_attract.gml index fd778003c..0b2e8a0e7 100644 --- a/scripts/node_VFX_attract/node_VFX_attract.gml +++ b/scripts/node_VFX_attract/node_VFX_attract.gml @@ -4,7 +4,7 @@ function Node_VFX_Attract(_x, _y, _group = noone) : Node_VFX_effector(_x, _y, _g inputs[4].setVisible(false, false); - inputs[effector_input_length + 0] = nodeValue_Bool("Destroy when reach middle", self, false ); + newInput(effector_input_length + 0, nodeValue_Bool("Destroy when reach middle", self, false )); array_push(input_display_list, effector_input_length + 0); diff --git a/scripts/node_VFX_oscillate/node_VFX_oscillate.gml b/scripts/node_VFX_oscillate/node_VFX_oscillate.gml index 5b568248a..704cf5eb3 100644 --- a/scripts/node_VFX_oscillate/node_VFX_oscillate.gml +++ b/scripts/node_VFX_oscillate/node_VFX_oscillate.gml @@ -6,11 +6,11 @@ function Node_VFX_Oscillate(_x, _y, _group = noone) : Node_VFX_effector(_x, _y, inputs[6].setVisible(false, false); inputs[7].setVisible(false, false); - inputs[effector_input_length + 0] = nodeValue_Float("Amplitude", self, 2 ); + newInput(effector_input_length + 0, nodeValue_Float("Amplitude", self, 2 )); - inputs[effector_input_length + 1] = nodeValue_Float("Frequency", self, 0.2 ); + newInput(effector_input_length + 1, nodeValue_Float("Frequency", self, 0.2 )); - inputs[effector_input_length + 2] = nodeValue_Bool("Multiply by speed", self, false ); + newInput(effector_input_length + 2, nodeValue_Bool("Multiply by speed", self, false )); array_push(input_display_list, effector_input_length + 0, effector_input_length + 1, effector_input_length + 2); diff --git a/scripts/node_VFX_override/node_VFX_override.gml b/scripts/node_VFX_override/node_VFX_override.gml index 2da2b9c01..d0af77dce 100644 --- a/scripts/node_VFX_override/node_VFX_override.gml +++ b/scripts/node_VFX_override/node_VFX_override.gml @@ -10,15 +10,15 @@ function Node_VFX_Override(_x, _y, _group = noone) : Node(_x, _y, _group) constr inputs[0] = nodeValue_Particle("Particles", self, -1 ) .setVisible(true, true); - inputs[1] = nodeValue_Float("Positions", self, noone ); + newInput(1, nodeValue_Float("Positions", self, noone )); - inputs[2] = nodeValue_Float("Rotations", self, noone ); + newInput(2, nodeValue_Float("Rotations", self, noone )); - inputs[3] = nodeValue_Float("Scales", self, noone ); + newInput(3, nodeValue_Float("Scales", self, noone )); - inputs[4] = nodeValue_Color("Blend", self, noone ); + newInput(4, nodeValue_Color("Blend", self, noone )); - inputs[5] = nodeValue_Float("Alpha", self, noone ); + newInput(5, nodeValue_Float("Alpha", self, noone )); inputs[6] = nodeValue_Surface("Surface", self) .setVisible(true, false); diff --git a/scripts/node_VFX_renderer/node_VFX_renderer.gml b/scripts/node_VFX_renderer/node_VFX_renderer.gml index 877bd7e8c..75f7911f0 100644 --- a/scripts/node_VFX_renderer/node_VFX_renderer.gml +++ b/scripts/node_VFX_renderer/node_VFX_renderer.gml @@ -6,7 +6,7 @@ function Node_VFX_Renderer(_x, _y, _group = noone) : Node(_x, _y, _group) constr manual_ungroupable = false; - inputs[0] = nodeValue_Vec2("Output dimension", self, DEF_SURF ); + newInput(0, nodeValue_Vec2("Output dimension", self, DEF_SURF )); inputs[1] = nodeValue_Bool("Round position", self, true, "Round position to the closest integer value to avoid jittering.") .rejectArray(); 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 fdc34b120..ce5bc7e91 100644 --- a/scripts/node_VFX_renderer_output/node_VFX_renderer_output.gml +++ b/scripts/node_VFX_renderer_output/node_VFX_renderer_output.gml @@ -7,7 +7,7 @@ function Node_VFX_Renderer_Output(_x, _y, _group = noone) : Node_Group_Output(_x manual_ungroupable = false; previewable = true; - inputs[0] = nodeValue_Vec2("Output dimension", self, DEF_SURF); + newInput(0, nodeValue_Vec2("Output dimension", self, DEF_SURF)); inputs[1] = nodeValue_Bool("Round position", self, true, "Round position to the closest integer value to avoid jittering.") .rejectArray(); diff --git a/scripts/node_VFX_spawner/node_VFX_spawner.gml b/scripts/node_VFX_spawner/node_VFX_spawner.gml index 796b81dd2..899a8ee85 100644 --- a/scripts/node_VFX_spawner/node_VFX_spawner.gml +++ b/scripts/node_VFX_spawner/node_VFX_spawner.gml @@ -15,7 +15,7 @@ function Node_VFX_Spawner(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y inputs[input_len + 0] = nodeValue("Spawn trigger", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, false) .setVisible(true, true); - inputs[input_len + 1] = nodeValue_Int("Step interval", self, 1, "How often the 'on step' event is triggered.\nWith 1 being trigger every frame, 2 means triggered once every 2 frames."); + newInput(input_len + 1, nodeValue_Int("Step interval", self, 1, "How often the 'on step' event is triggered.\nWith 1 being trigger every frame, 2 means triggered once every 2 frames.")); outputs[0] = nodeValue_Output("Particles", self, VALUE_TYPE.particle, [] ); outputs[1] = nodeValue_Output("On create", self, VALUE_TYPE.node, noone ); diff --git a/scripts/node_VFX_trail/node_VFX_trail.gml b/scripts/node_VFX_trail/node_VFX_trail.gml index 1cecc4450..b3a55fed8 100644 --- a/scripts/node_VFX_trail/node_VFX_trail.gml +++ b/scripts/node_VFX_trail/node_VFX_trail.gml @@ -13,9 +13,9 @@ function Node_VFX_Trail(_x, _y, _group = noone) : Node(_x, _y, _group) construct inputs[0] = nodeValue_Particle("Particles", self, -1 ) .setVisible(true, true); - inputs[1] = nodeValue_Int("Life", self, 4 ); + newInput(1, nodeValue_Int("Life", self, 4 )); - inputs[2] = nodeValue_Bool("Color", self, false ); + newInput(2, nodeValue_Bool("Color", self, false )); outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); diff --git a/scripts/node_VFX_triangulate/node_VFX_triangulate.gml b/scripts/node_VFX_triangulate/node_VFX_triangulate.gml index 3133f66ec..be4c9176d 100644 --- a/scripts/node_VFX_triangulate/node_VFX_triangulate.gml +++ b/scripts/node_VFX_triangulate/node_VFX_triangulate.gml @@ -14,18 +14,18 @@ function Node_VFX_Triangulate(_x, _y, _group = noone) : Node(_x, _y, _group) con manual_ungroupable = false; - inputs[0] = nodeValue_Vec2("Output dimension", self, DEF_SURF ); + newInput(0, nodeValue_Vec2("Output dimension", self, DEF_SURF )); inputs[1] = nodeValue_Particle("Particles", self, -1 ) .setVisible(true, true); - inputs[2] = nodeValue_Float("Thickness", self, 1 ); + newInput(2, nodeValue_Float("Thickness", self, 1 )); - inputs[3] = nodeValue_Color("Color", self, c_white ); + newInput(3, nodeValue_Color("Color", self, c_white )); - inputs[4] = nodeValue_Bool("Inherit Thickness", self, false ); + newInput(4, nodeValue_Bool("Inherit Thickness", self, false )); - inputs[5] = nodeValue_Bool("Inherit Color", self, false ); + newInput(5, nodeValue_Bool("Inherit Color", self, false )); outputs[0] = nodeValue_Output("Triangles", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_VFX_turbulence/node_VFX_turbulence.gml b/scripts/node_VFX_turbulence/node_VFX_turbulence.gml index 134686992..b9eca3c16 100644 --- a/scripts/node_VFX_turbulence/node_VFX_turbulence.gml +++ b/scripts/node_VFX_turbulence/node_VFX_turbulence.gml @@ -4,9 +4,9 @@ function Node_VFX_Turbulence(_x, _y, _group = noone) : Node_VFX_effector(_x, _y, inputs[4].setVisible(false, false); - inputs[effector_input_length + 0] = nodeValue_Float("Turbulence scale", self, 1 ); + newInput(effector_input_length + 0, nodeValue_Float("Turbulence scale", self, 1 )); - inputs[effector_input_length + 1] = nodeValue_Bool("Constant seed", self, false ); + newInput(effector_input_length + 1, nodeValue_Bool("Constant seed", self, false )); array_push(input_display_list, effector_input_length + 0, effector_input_length + 1); diff --git a/scripts/node_VFX_vortex/node_VFX_vortex.gml b/scripts/node_VFX_vortex/node_VFX_vortex.gml index e28c89321..780563e32 100644 --- a/scripts/node_VFX_vortex/node_VFX_vortex.gml +++ b/scripts/node_VFX_vortex/node_VFX_vortex.gml @@ -4,11 +4,11 @@ function Node_VFX_Vortex(_x, _y, _group = noone) : Node_VFX_effector(_x, _y, _gr inputs[4].setVisible(false, false); - inputs[effector_input_length + 0] = nodeValue_Float("Attraction force", self, 2 ); + newInput(effector_input_length + 0, nodeValue_Float("Attraction force", self, 2 )); - inputs[effector_input_length + 1] = nodeValue_Bool("Clockwise", self, true ); + newInput(effector_input_length + 1, nodeValue_Bool("Clockwise", self, true )); - inputs[effector_input_length + 2] = nodeValue_Bool("Destroy when reach middle", self, false ); + newInput(effector_input_length + 2, nodeValue_Bool("Destroy when reach middle", self, false )); array_push(input_display_list, effector_input_length + 0, effector_input_length + 1, effector_input_length + 2); diff --git a/scripts/node_active_canvas/node_active_canvas.gml b/scripts/node_active_canvas/node_active_canvas.gml index e5d64860a..f539e05a4 100644 --- a/scripts/node_active_canvas/node_active_canvas.gml +++ b/scripts/node_active_canvas/node_active_canvas.gml @@ -1,24 +1,24 @@ function Node_Active_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Active Canvas"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Surface("Texture", self); + newInput(1, nodeValue_Surface("Texture", self)); - inputs[2] = nodeValue_Vec2("Position", self, [ 0, 0 ] ); + newInput(2, nodeValue_Vec2("Position", self, [ 0, 0 ] )); - inputs[3] = nodeValue_Rotation("Rotation", self, 0); + newInput(3, nodeValue_Rotation("Rotation", self, 0)); - inputs[4] = nodeValue_Vec2("Scale", self, [ 1, 1 ] ); + newInput(4, nodeValue_Vec2("Scale", self, [ 1, 1 ] )); - inputs[5] = nodeValue_Color("Color", self, c_white ); + newInput(5, nodeValue_Color("Color", self, c_white )); inputs[6] = nodeValue_Float("Alpha", self, 1 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Bool("Active", self, true ); + newInput(7, nodeValue_Bool("Active", self, true )); - inputs[8] = nodeValue_Range("Distance", self, [ 1, 1 ] , { linked : true }); + newInput(8, nodeValue_Range("Distance", self, [ 1, 1 ] , { linked : true })); outputs[0] = nodeValue_Output("Output", self, VALUE_TYPE.surface, noone ); diff --git a/scripts/node_alpha_cutoff/node_alpha_cutoff.gml b/scripts/node_alpha_cutoff/node_alpha_cutoff.gml index 5e14f06e8..393a26e5e 100644 --- a/scripts/node_alpha_cutoff/node_alpha_cutoff.gml +++ b/scripts/node_alpha_cutoff/node_alpha_cutoff.gml @@ -1,17 +1,17 @@ function Node_Alpha_Cutoff(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Alpha Cutoff"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Float("Minimum", self, 0.2, "Any pixel with less alpha (more transparent) than this will be removed.") .setDisplay(VALUE_DISPLAY.slider); - inputs[2] = nodeValue_Surface("Mask", self); + newInput(2, nodeValue_Surface("Mask", self)); inputs[3] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[4] = nodeValue_Bool("Active", self, true); + newInput(4, nodeValue_Bool("Active", self, true)); active_index = 4; __init_mask_modifier(2); // inputs 5, 6, diff --git a/scripts/node_alpha_grey/node_alpha_grey.gml b/scripts/node_alpha_grey/node_alpha_grey.gml index ced4d412a..bcb307dc2 100644 --- a/scripts/node_alpha_grey/node_alpha_grey.gml +++ b/scripts/node_alpha_grey/node_alpha_grey.gml @@ -1,9 +1,9 @@ function Node_Alpha_Grey(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Alpha to Grey"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Bool("Active", self, true); + newInput(1, nodeValue_Bool("Active", self, true)); active_index = 1; outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_alpha_hash/node_alpha_hash.gml b/scripts/node_alpha_hash/node_alpha_hash.gml index 80f17f3af..59f09652d 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_anim_curve/node_anim_curve.gml b/scripts/node_anim_curve/node_anim_curve.gml index 7cedf23d3..b81e77431 100644 --- a/scripts/node_anim_curve/node_anim_curve.gml +++ b/scripts/node_anim_curve/node_anim_curve.gml @@ -4,14 +4,14 @@ function Node_Anim_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group setDimension(96, 48); - inputs[0] = nodeValue("Curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + newInput(0, nodeValue("Curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01)); inputs[1] = nodeValue_Float("Progress", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[2] = nodeValue_Float("Minimum", self, 0); - inputs[3] = nodeValue_Float("Maximum", self, 1); + newInput(2, nodeValue_Float("Minimum", self, 0)); + newInput(3, nodeValue_Float("Maximum", self, 1)); - inputs[4] = nodeValue_Bool("Animated", self, false); + newInput(4, nodeValue_Bool("Animated", self, false)); outputs[0] = nodeValue_Output("Curve", self, VALUE_TYPE.float, []); diff --git a/scripts/node_animation_control/node_animation_control.gml b/scripts/node_animation_control/node_animation_control.gml index 013196352..dddf800a7 100644 --- a/scripts/node_animation_control/node_animation_control.gml +++ b/scripts/node_animation_control/node_animation_control.gml @@ -2,19 +2,19 @@ function Node_Animation_Control(_x, _y, _group = noone) : Node(_x, _y, _group) c name = "Animation Control"; setDimension(96, 96); - inputs[0] = nodeValue_Trigger("Toggle Play / Pause", self, false ); + newInput(0, nodeValue_Trigger("Toggle Play / Pause", self, false )); - inputs[1] = nodeValue_Trigger("Pause", self, false ); + newInput(1, nodeValue_Trigger("Pause", self, false )); - inputs[2] = nodeValue_Trigger("Resume", self, false ); + newInput(2, nodeValue_Trigger("Resume", self, false )); - inputs[3] = nodeValue_Trigger("Play From Beginning", self, false ); + newInput(3, nodeValue_Trigger("Play From Beginning", self, false )); - inputs[4] = nodeValue_Trigger("Play once", self, false ); + newInput(4, nodeValue_Trigger("Play once", self, false )); - inputs[5] = nodeValue_Trigger("Skip Frames", self, false ); + newInput(5, nodeValue_Trigger("Skip Frames", self, false )); - inputs[6] = nodeValue_Int("Skip Frames Count", self, 1); + newInput(6, nodeValue_Int("Skip Frames Count", self, 1)); static step = function() { if(getInputData(0)) diff --git a/scripts/node_application_in/node_application_in.gml b/scripts/node_application_in/node_application_in.gml index 1e9549f77..75026f2c7 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_Surface("GUI", self); + newInput(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 deaf67614..36139e5ec 100644 --- a/scripts/node_area/node_area.gml +++ b/scripts/node_area/node_area.gml @@ -14,7 +14,7 @@ function Node_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons new scrollItem("Elipse", s_node_shape_circle, 0) ]); - inputs[3] = nodeValue_Enum_Scroll("Type", self, 0, [ "Center Span", "Two Point" ]); + newInput(3, nodeValue_Enum_Scroll("Type", self, 0, [ "Center Span", "Two Point" ])); outputs[0] = nodeValue_Output("Area", self, 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 2ae7e5318..a9cbbcbaf 100644 --- a/scripts/node_argument/node_argument.gml +++ b/scripts/node_argument/node_argument.gml @@ -4,11 +4,11 @@ function Node_Argument(_x, _y, _group = noone) : Node(_x, _y, _group) constructo draw_padding = 8; - inputs[0] = nodeValue_Text("Tag", self, ""); + newInput(0, nodeValue_Text("Tag", self, "")); - inputs[1] = nodeValue_Enum_Scroll("Type", self, 0, [ "String", "Number" ]); + newInput(1, nodeValue_Enum_Scroll("Type", self, 0, [ "String", "Number" ])); - inputs[2] = nodeValue_Text("Default value", self, ""); + newInput(2, nodeValue_Text("Default value", self, "")); outputs[0] = nodeValue_Output("Value", self, VALUE_TYPE.text, ""); diff --git a/scripts/node_armature/node_armature.gml b/scripts/node_armature/node_armature.gml index 17fb7a6f9..547cf5dd0 100644 --- a/scripts/node_armature/node_armature.gml +++ b/scripts/node_armature/node_armature.gml @@ -2,7 +2,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo name = "Armature Create"; setDimension(96, 72); - //inputs[0] = nodeValue_Int("Axis", self, 0); + //newInput(0, nodeValue_Int("Axis", self, 0)); bone_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { #region var _b = attributes.bones; diff --git a/scripts/node_armature_bind/node_armature_bind.gml b/scripts/node_armature_bind/node_armature_bind.gml index 00e6a2ec1..e19fd4e43 100644 --- a/scripts/node_armature_bind/node_armature_bind.gml +++ b/scripts/node_armature_bind/node_armature_bind.gml @@ -12,7 +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); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Armature("Armature", self, noone) .setVisible(true, true) @@ -22,7 +22,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr .setVisible(true, true) .setArrayDepth(1); - inputs[3] = nodeValue_Vec2("Bone transform", self, [ 0, 0 ]); + newInput(3, nodeValue_Vec2("Bone transform", self, [ 0, 0 ])); inputs[4] = nodeValue_Float("Bone scale", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0.1, 2, 0.01 ] }); @@ -395,18 +395,18 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr var index = array_length(inputs); var _s = floor((index - input_fix_len) / data_length); - inputs[index + 0] = nodeValue_Surface("Surface", self); + newInput(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 = ""; inputs[index + 1] = nodeValue_Float("Transform", self, [ 0, 0, 0, 1, 1 ] ) .setDisplay(VALUE_DISPLAY.transform); - inputs[index + 2] = nodeValue_Bool("Inherit Rotation", self, true ); - inputs[index + 3] = nodeValue_Bool("Apply Bone Rotation", self, false ); + newInput(index + 2, nodeValue_Bool("Inherit Rotation", self, true )); + newInput(index + 3, nodeValue_Bool("Apply Bone Rotation", self, false )); - inputs[index + 4] = nodeValue_Bool("Inherit Scale", self, false ); - inputs[index + 5] = nodeValue_Bool("Apply Bone Scale", self, false ); + newInput(index + 4, nodeValue_Bool("Inherit Scale", self, false )); + newInput(index + 5, nodeValue_Bool("Apply Bone Scale", self, false )); for( var i = 0; i < data_length; i++ ) array_push(input_display_list, index + i); diff --git a/scripts/node_armature_sample/node_armature_sample.gml b/scripts/node_armature_sample/node_armature_sample.gml index b80e98ca3..e5bc0da34 100644 --- a/scripts/node_armature_sample/node_armature_sample.gml +++ b/scripts/node_armature_sample/node_armature_sample.gml @@ -6,7 +6,7 @@ function Node_Armature_Sample(_x, _y, _group = noone) : Node(_x, _y, _group) con .setVisible(true, true) .rejectArray(); - inputs[1] = nodeValue_Text("Bone name", self, ""); + newInput(1, nodeValue_Text("Bone name", self, "")); inputs[2] = nodeValue_Float("Sample point", self, 0) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_array_copy/node_array_copy.gml b/scripts/node_array_copy/node_array_copy.gml index 18686025f..b5dc61893 100644 --- a/scripts/node_array_copy/node_array_copy.gml +++ b/scripts/node_array_copy/node_array_copy.gml @@ -6,9 +6,9 @@ function Node_Array_Copy(_x, _y, _group = noone) : Node(_x, _y, _group) construc .setArrayDepth(1) .setVisible(true, true); - inputs[1] = nodeValue_Int("Starting Index", self, 0); + newInput(1, nodeValue_Int("Starting Index", self, 0)); - inputs[2] = nodeValue_Int("Size", self, 1); + newInput(2, nodeValue_Int("Size", self, 1)); outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0) .setArrayDepth(1); diff --git a/scripts/node_array_csv_parse/node_array_csv_parse.gml b/scripts/node_array_csv_parse/node_array_csv_parse.gml index 1937fc9ad..60fe89e62 100644 --- a/scripts/node_array_csv_parse/node_array_csv_parse.gml +++ b/scripts/node_array_csv_parse/node_array_csv_parse.gml @@ -5,7 +5,7 @@ function Node_Array_CSV_Parse(_x, _y, _group = noone) : Node(_x, _y, _group) con inputs[0] = nodeValue_Text("CSV string", self, 0) .setVisible(true, true); - inputs[1] = nodeValue_Int("Skip line", self, 0); + newInput(1, nodeValue_Int("Skip line", self, 0)); outputs[0] = nodeValue_Output("Array", self, VALUE_TYPE.any, 0) .setArrayDepth(1); diff --git a/scripts/node_array_insert/node_array_insert.gml b/scripts/node_array_insert/node_array_insert.gml index d21839168..32d724163 100644 --- a/scripts/node_array_insert/node_array_insert.gml +++ b/scripts/node_array_insert/node_array_insert.gml @@ -5,7 +5,7 @@ function Node_Array_Insert(_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_Int("Index", self, 0); + newInput(1, nodeValue_Int("Index", self, 0)); inputs[2] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setVisible(true, true); diff --git a/scripts/node_array_remove/node_array_remove.gml b/scripts/node_array_remove/node_array_remove.gml index be919caea..ac637c1fa 100644 --- a/scripts/node_array_remove/node_array_remove.gml +++ b/scripts/node_array_remove/node_array_remove.gml @@ -8,7 +8,7 @@ function Node_Array_Remove(_x, _y, _group = noone) : Node(_x, _y, _group) constr inputs[1] = nodeValue_Enum_Button("Type", self, 0, [ "Index", "Value" ]) .rejectArray(); - inputs[2] = nodeValue_Int("Index", self, 0); + newInput(2, nodeValue_Int("Index", self, 0)); inputs[3] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setVisible(true, true); diff --git a/scripts/node_array_set/node_array_set.gml b/scripts/node_array_set/node_array_set.gml index 0905e2442..e3836ccac 100644 --- a/scripts/node_array_set/node_array_set.gml +++ b/scripts/node_array_set/node_array_set.gml @@ -5,7 +5,7 @@ function Node_Array_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construct inputs[0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setVisible(true, true); - inputs[1] = nodeValue_Int("Index", self, 0); + newInput(1, nodeValue_Int("Index", self, 0)); inputs[2] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) .setVisible(true, true); diff --git a/scripts/node_ase_file_read/node_ase_file_read.gml b/scripts/node_ase_file_read/node_ase_file_read.gml index 71cd23b05..9334d2cff 100644 --- a/scripts/node_ase_file_read/node_ase_file_read.gml +++ b/scripts/node_ase_file_read/node_ase_file_read.gml @@ -35,9 +35,9 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const inputs[1] = nodeValue_Trigger("Generate layers", self, false ) .setDisplay(VALUE_DISPLAY.button, { name: "Generate", UI : true, onClick: function() { refreshLayers(); } }); - inputs[2] = nodeValue_Text("Current tag", self, ""); + newInput(2, nodeValue_Text("Current tag", self, "")); - inputs[3] = nodeValue_Bool("Use cel dimension", self, false); + newInput(3, nodeValue_Bool("Use cel dimension", self, false)); outputs[0] = nodeValue_Output("Output", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_atlas/node_atlas.gml b/scripts/node_atlas/node_atlas.gml index 3d2b16104..6067465d6 100644 --- a/scripts/node_atlas/node_atlas.gml +++ b/scripts/node_atlas/node_atlas.gml @@ -1,12 +1,12 @@ function Node_Atlas(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Pixel Expand"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Bool("Active", self, true); + newInput(1, nodeValue_Bool("Active", self, true)); active_index = 1; - inputs[2] = nodeValue_Enum_Scroll("Method", self, 0, [ "Radial", "Scan" ]); + newInput(2, nodeValue_Enum_Scroll("Method", self, 0, [ "Radial", "Scan" ])); outputs[0] = nodeValue_Output("Surface out", self, 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 3a0960ef7..2c449a480 100644 --- a/scripts/node_atlas_draw/node_atlas_draw.gml +++ b/scripts/node_atlas_draw/node_atlas_draw.gml @@ -2,7 +2,7 @@ function Node_Atlas_Draw(_x, _y, _group = noone) : Node(_x, _y, _group) construc name = "Draw Atlas"; previewable = true; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Surface("Atlas", self) .setVisible(true, true); diff --git a/scripts/node_atlas_set/node_atlas_set.gml b/scripts/node_atlas_set/node_atlas_set.gml index 751f315ab..02c18cba9 100644 --- a/scripts/node_atlas_set/node_atlas_set.gml +++ b/scripts/node_atlas_set/node_atlas_set.gml @@ -5,19 +5,19 @@ function Node_Atlas_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construct inputs[0] = nodeValue_Surface("Atlas", self) .setVisible(true, true); - inputs[1] = nodeValue_Surface("Surface", self); + newInput(1, nodeValue_Surface("Surface", self)); - inputs[2] = nodeValue_Vec2("Position", self, [ 0, 0 ]); + newInput(2, nodeValue_Vec2("Position", self, [ 0, 0 ])); - inputs[3] = nodeValue_Rotation("Rotation", self, 0); + newInput(3, nodeValue_Rotation("Rotation", self, 0)); - inputs[4] = nodeValue_Vec2("Scale", self, [ 0, 0 ]); + newInput(4, nodeValue_Vec2("Scale", self, [ 0, 0 ])); - inputs[5] = nodeValue_Color("Blend", self, c_white); + newInput(5, nodeValue_Color("Blend", self, c_white)); - inputs[6] = nodeValue_Float("Alpha", self, 1); + newInput(6, nodeValue_Float("Alpha", self, 1)); - inputs[7] = nodeValue_Bool("Recalculate Position", self, true); + newInput(7, nodeValue_Bool("Recalculate Position", self, true)); outputs[0] = nodeValue_Output("Atlas", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_audio_window/node_audio_window.gml b/scripts/node_audio_window/node_audio_window.gml index b5b2b9c80..112c8bb28 100644 --- a/scripts/node_audio_window/node_audio_window.gml +++ b/scripts/node_audio_window/node_audio_window.gml @@ -4,7 +4,7 @@ function Node_Audio_Window(_x, _y, _group = noone) : Node(_x, _y, _group) constr inputs[0] = nodeValue_AudioBit("Audio data", self, noone) .setVisible(true, true); - inputs[1] = nodeValue_Int("Width", self, 4096, "Amount of bits to extract."); + newInput(1, nodeValue_Int("Width", self, 4096, "Amount of bits to extract.")); inputs[2] = nodeValue_Float("Location", self, 0) .setDisplay(VALUE_DISPLAY._default, { unit: 0, side_button: button(function() { @@ -16,11 +16,11 @@ function Node_Audio_Window(_x, _y, _group = noone) : Node(_x, _y, _group) constr } ); - inputs[3] = nodeValue_Enum_Button("Cursor location", self, 1, [ "Start", "Middle", "End" ]); + newInput(3, nodeValue_Enum_Button("Cursor location", self, 1, [ "Start", "Middle", "End" ])); - inputs[4] = nodeValue_Int("Step", self, 16); + newInput(4, nodeValue_Int("Step", self, 16)); - inputs[5] = nodeValue_Bool("Match timeline", self, true, "Set window cursor to match animation timeline."); + newInput(5, nodeValue_Bool("Match timeline", self, true, "Set window cursor to match animation timeline.")); outputs[0] = nodeValue_Output("Bit Array", self, VALUE_TYPE.float, []) .setArrayDepth(1); diff --git a/scripts/node_average/node_average.gml b/scripts/node_average/node_average.gml index 3f415f5dc..91db817c7 100644 --- a/scripts/node_average/node_average.gml +++ b/scripts/node_average/node_average.gml @@ -1,17 +1,17 @@ function Node_Average(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Average"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Surface("Mask", self); + newInput(1, nodeValue_Surface("Mask", self)); inputs[2] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[3] = nodeValue_Bool("Active", self, true); + newInput(3, nodeValue_Bool("Active", self, true)); active_index = 3; - inputs[4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(4, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(1); // inputs 5, 6, diff --git a/scripts/node_base_convert/node_base_convert.gml b/scripts/node_base_convert/node_base_convert.gml index b8f34c8f1..d3715a586 100644 --- a/scripts/node_base_convert/node_base_convert.gml +++ b/scripts/node_base_convert/node_base_convert.gml @@ -7,9 +7,9 @@ function Node_Base_Convert(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[0] = nodeValue_Text("Value", self, "") .setVisible(true, true); - inputs[1] = nodeValue_Int("Base from", self, 10); + newInput(1, nodeValue_Int("Base from", self, 10)); - inputs[2] = nodeValue_Int("Base to", self, 10); + newInput(2, nodeValue_Int("Base to", self, 10)); outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.text, ""); diff --git a/scripts/node_bend/node_bend.gml b/scripts/node_bend/node_bend.gml index bc7813396..9a19d1d18 100644 --- a/scripts/node_bend/node_bend.gml +++ b/scripts/node_bend/node_bend.gml @@ -1,22 +1,22 @@ function Node_Bend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Bend"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Bool("Active", self, true); + newInput(1, nodeValue_Bool("Active", self, true)); active_index = 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_Enum_Button("Axis", self, 0, [ "x", "y" ]); + newInput(3, nodeValue_Enum_Button("Axis", self, 0, [ "x", "y" ])); inputs[4] = nodeValue_Float("Amount", self, 0.25) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[5] = nodeValue_Float("Scale", self, 1); + newInput(5, nodeValue_Float("Scale", self, 1)); - inputs[6] = nodeValue_Float("Shift", self, 0.); + newInput(6, nodeValue_Float("Shift", self, 0.)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_bevel/node_bevel.gml b/scripts/node_bevel/node_bevel.gml index 08705b483..7f26d36ba 100644 --- a/scripts/node_bevel/node_bevel.gml +++ b/scripts/node_bevel/node_bevel.gml @@ -1,25 +1,25 @@ function Node_Bevel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Bevel"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Int("Height", self, 4) .setMappable(11); - inputs[2] = nodeValue_Vec2("Shift", self, [ 0, 0 ]); + newInput(2, nodeValue_Vec2("Shift", self, [ 0, 0 ])); - inputs[3] = nodeValue_Vec2("Scale", self, [ 1, 1 ] ); + newInput(3, nodeValue_Vec2("Scale", self, [ 1, 1 ] )); 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_Surface("Mask", self); + newInput(5, nodeValue_Surface("Mask", self)); inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Bool("Active", self, true); + newInput(7, nodeValue_Bool("Active", self, true)); active_index = 7; inputs[8] = nodeValue_Enum_Scroll("Oversample mode", self, 0, [ "Empty", "Clamp", "Repeat" ]) @@ -29,7 +29,7 @@ function Node_Bevel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[11] = nodeValueMap("Height map", self); + newInput(11, nodeValueMap("Height map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_blend/node_blend.gml b/scripts/node_blend/node_blend.gml index 9cf4d01e5..5f51ee7e8 100644 --- a/scripts/node_blend/node_blend.gml +++ b/scripts/node_blend/node_blend.gml @@ -34,27 +34,27 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con name = "Blend"; manage_atlas = false; - inputs[0] = nodeValue_Surface("Background", self); - inputs[1] = nodeValue_Surface("Foreground", self); + newInput(0, nodeValue_Surface("Background", self)); + newInput(1, nodeValue_Surface("Foreground", self)); - inputs[2] = nodeValue_Enum_Scroll("Blend mode", self, 0, BLEND_TYPES ); + newInput(2, nodeValue_Enum_Scroll("Blend mode", self, 0, BLEND_TYPES )); inputs[3] = nodeValue_Float("Opacity", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[4] = nodeValue_Surface("Mask", self); + newInput(4, nodeValue_Surface("Mask", self)); - inputs[5] = nodeValue_Enum_Scroll("Fill mode", self, 0, [ "None", "Stretch", "Tile" ]); + newInput(5, nodeValue_Enum_Scroll("Fill mode", self, 0, [ "None", "Stretch", "Tile" ])); inputs[6] = nodeValue_Enum_Scroll("Output dimension", self, 0, [ "Background", "Forground", "Mask", "Maximum", "Constant" ]) .rejectArray(); - inputs[7] = nodeValue_Vec2("Constant dimension", self, DEF_SURF); + newInput(7, nodeValue_Vec2("Constant dimension", self, DEF_SURF)); - inputs[8] = nodeValue_Bool("Active", self, true); + newInput(8, nodeValue_Bool("Active", self, true)); active_index = 8; - inputs[9] = nodeValue_Bool("Preserve alpha", self, false); + newInput(9, nodeValue_Bool("Preserve alpha", self, false)); inputs[10] = nodeValue_Enum_Button("Horizontal Align", self, 0, [ THEME.inspector_surface_halign, THEME.inspector_surface_halign, THEME.inspector_surface_halign]); @@ -62,12 +62,12 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[11] = nodeValue_Enum_Button("Vertical Align", self, 0, [ THEME.inspector_surface_valign, THEME.inspector_surface_valign, THEME.inspector_surface_valign]); - inputs[12] = nodeValue_Bool("Invert mask", self, false); + newInput(12, nodeValue_Bool("Invert mask", self, false)); inputs[13] = nodeValue_Float("Mask feather", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); - inputs[14] = nodeValue_Vec2("Position", self, [ 0.5, 0.5 ]); + newInput(14, nodeValue_Vec2("Position", self, [ 0.5, 0.5 ])); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_blend_edge/node_blend_edge.gml b/scripts/node_blend_edge/node_blend_edge.gml index b8270713d..cdab539eb 100644 --- a/scripts/node_blend_edge/node_blend_edge.gml +++ b/scripts/node_blend_edge/node_blend_edge.gml @@ -1,18 +1,18 @@ function Node_Blend_Edge(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Blend Edge"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Float("Width", self, 0.1) .setDisplay(VALUE_DISPLAY.slider) .setMappable(5); - inputs[2] = nodeValue_Enum_Button("Types",self, 0, [ "Both", "Horizontal", "Vertical" ]); + newInput(2, nodeValue_Enum_Button("Types",self, 0, [ "Both", "Horizontal", "Vertical" ])); - inputs[3] = nodeValue_Bool("Active", self, true); + newInput(3, nodeValue_Bool("Active", self, true)); active_index = 3; - inputs[4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(4, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); ///////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_blobify/node_blobify.gml b/scripts/node_blobify/node_blobify.gml index 9a09dcd5d..8f6e2c904 100644 --- a/scripts/node_blobify/node_blobify.gml +++ b/scripts/node_blobify/node_blobify.gml @@ -1,9 +1,9 @@ function Node_Blobify(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Blobify"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Bool("Active", self, true); + newInput(1, nodeValue_Bool("Active", self, true)); inputs[2] = nodeValue_Int("Radius", self, 3) .setValidator(VV_min(0)); diff --git a/scripts/node_blobify/node_bw.gml b/scripts/node_blobify/node_bw.gml index 1d28185b4..a1f9d9cd6 100644 --- a/scripts/node_blobify/node_bw.gml +++ b/scripts/node_blobify/node_bw.gml @@ -10,11 +10,11 @@ function Node_BW(_x, _y) : Node_Processor(_x, _y) constructor { uniform_exp = shader_get_uniform(sh_bw, "brightness"); uniform_con = shader_get_uniform(sh_bw, "contrast"); - inputs[| 0] = new NodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); - inputs[| 1] = new NodeValue_Float(1, "Brightness", self, 0); + newInput(| 0, NodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0)); + newInput(| 1, NodeValue_Float(1, "Brightness", self, 0)); inputs[| 1].setDisplay(VALUE_DISPLAY.slider, [ -1, 1, 0.01]); - inputs[| 2] = new NodeValue_Float(2, "Contrast", self, 1); + newInput(| 2, NodeValue_Float(2, "Contrast", self, 1)); inputs[| 2].setDisplay(VALUE_DISPLAY.slider, [ -1, 4, 0.01]); outputs[| 0] = new nodeValue_Output(0, "Surface out", self, VALUE_TYPE.surface, surface_create(1, 1)); diff --git a/scripts/node_bloom/node_bloom.gml b/scripts/node_bloom/node_bloom.gml index 633d84ecc..de085b3a1 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Float("Size", self, 3, "Bloom blur radius.") .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] }); @@ -11,26 +11,26 @@ function Node_Bloom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[3] = nodeValue_Float("Strength", self, .25, "Blend intensity.") .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] }); - inputs[4] = nodeValue_Surface("Bloom mask", self); + newInput(4, nodeValue_Surface("Bloom mask", self)); - inputs[5] = nodeValue_Surface("Mask", self); + newInput(5, nodeValue_Surface("Mask", self)); inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Bool("Active", self, true); + newInput(7, nodeValue_Bool("Active", self, true)); active_index = 7; - inputs[8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(8, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(5); // inputs 9, 10 inputs[11] = nodeValue_Float("Aspect Ratio", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[12] = nodeValue_Rotation("Direction", self, 0); + newInput(12, nodeValue_Rotation("Direction", self, 0)); - inputs[13] = nodeValue_Enum_Scroll("Types", self, 0, [ "Gaussian", "Zoom" ]); + newInput(13, nodeValue_Enum_Scroll("Types", self, 0, [ "Gaussian", "Zoom" ])); inputs[14] = nodeValue_Vec2("Zoom Origin", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); diff --git a/scripts/node_blur/node_blur.gml b/scripts/node_blur/node_blur.gml index c7002b166..a845c81da 100644 --- a/scripts/node_blur/node_blur.gml +++ b/scripts/node_blur/node_blur.gml @@ -1,35 +1,35 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Blur"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Int("Size", self, 3) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 32, 0.1 ] }); 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_Bool("Override color", self, false, "Replace all color while keeping the alpha. Used to\nfix grey outline when bluring transparent pixel."); + newInput(3, nodeValue_Bool("Override color", self, false, "Replace all color while keeping the alpha. Used to\nfix grey outline when bluring transparent pixel.")); - inputs[4] = nodeValue_Color("Color", self, c_black); + newInput(4, nodeValue_Color("Color", self, c_black)); - inputs[5] = nodeValue_Surface("Mask", self); + newInput(5, nodeValue_Surface("Mask", self)); inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Bool("Active", self, true); + newInput(7, nodeValue_Bool("Active", self, true)); active_index = 7; - inputs[8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(8, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(5); // inputs 9, 10 - inputs[11] = nodeValue_Bool("Gamma Correction", self, false); + newInput(11, nodeValue_Bool("Gamma Correction", self, false)); inputs[12] = nodeValue_Float("Aspect Ratio", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[13] = nodeValue_Rotation("Direction", self, 0); + newInput(13, nodeValue_Rotation("Direction", self, 0)); outputs[0] = nodeValue_Output("Surface out", self, 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 a6e0217a7..54659d6de 100644 --- a/scripts/node_blur_bokeh/node_blur_bokeh.gml +++ b/scripts/node_blur_bokeh/node_blur_bokeh.gml @@ -1,27 +1,27 @@ function Node_Blur_Bokeh(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Lens Blur"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Float("Strength", self, 0.2) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.01] }) .setMappable(8); - inputs[2] = nodeValue_Surface("Mask", self); + newInput(2, nodeValue_Surface("Mask", self)); inputs[3] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[4] = nodeValue_Bool("Active", self, true); + newInput(4, nodeValue_Bool("Active", self, true)); active_index = 4; - inputs[5] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(5, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(2); // inputs 6, 7 ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[8] = nodeValueMap("Strength map", self); + newInput(8, nodeValueMap("Strength map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_blur_bokeh/node_bw.gml b/scripts/node_blur_bokeh/node_bw.gml index 1d28185b4..a1f9d9cd6 100644 --- a/scripts/node_blur_bokeh/node_bw.gml +++ b/scripts/node_blur_bokeh/node_bw.gml @@ -10,11 +10,11 @@ function Node_BW(_x, _y) : Node_Processor(_x, _y) constructor { uniform_exp = shader_get_uniform(sh_bw, "brightness"); uniform_con = shader_get_uniform(sh_bw, "contrast"); - inputs[| 0] = new NodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); - inputs[| 1] = new NodeValue_Float(1, "Brightness", self, 0); + newInput(| 0, NodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0)); + newInput(| 1, NodeValue_Float(1, "Brightness", self, 0)); inputs[| 1].setDisplay(VALUE_DISPLAY.slider, [ -1, 1, 0.01]); - inputs[| 2] = new NodeValue_Float(2, "Contrast", self, 1); + newInput(| 2, NodeValue_Float(2, "Contrast", self, 1)); inputs[| 2].setDisplay(VALUE_DISPLAY.slider, [ -1, 4, 0.01]); outputs[| 0] = new nodeValue_Output(0, "Surface out", self, VALUE_TYPE.surface, surface_create(1, 1)); diff --git a/scripts/node_blur_contrast/node_blur_contrast.gml b/scripts/node_blur_contrast/node_blur_contrast.gml index ba6752367..61bceecca 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Float("Size", self, 3) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] }); @@ -9,19 +9,19 @@ function Node_Blur_Contrast(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[2] = nodeValue_Float("Threshold", self, 0.2, "Brightness different to be blur together.") .setDisplay(VALUE_DISPLAY.slider); - inputs[3] = nodeValue_Surface("Mask", self); + newInput(3, nodeValue_Surface("Mask", self)); inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_Bool("Active", self, true); + newInput(5, nodeValue_Bool("Active", self, true)); active_index = 5; - inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(6, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(3); // inputs 7, 8 - inputs[9] = nodeValue_Bool("Gamma Correction", self, false); + newInput(9, nodeValue_Bool("Gamma Correction", self, false)); input_display_list = [ 5, 6, ["Surfaces", true], 0, 3, 4, 7, 8, diff --git a/scripts/node_blur_directional/node_blur_directional.gml b/scripts/node_blur_directional/node_blur_directional.gml index 5df2fa616..0ef71b57d 100644 --- a/scripts/node_blur_directional/node_blur_directional.gml +++ b/scripts/node_blur_directional/node_blur_directional.gml @@ -1,7 +1,7 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Directional Blur"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Float("Strength", self, 0.2) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) @@ -10,29 +10,29 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y, inputs[2] = nodeValue_Rotation("Direction", self, 0) .setMappable(10); - inputs[3] = nodeValue_Surface("Mask", self); + newInput(3, nodeValue_Surface("Mask", self)); inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_Bool("Active", self, true); + newInput(5, nodeValue_Bool("Active", self, true)); active_index = 5; - inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(6, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(3); // inputs 7, 8 ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[ 9] = nodeValueMap("Strength map", self); + newInput( 9, nodeValueMap("Strength map", self)); - inputs[10] = nodeValueMap("Direction map", self); + newInput(10, nodeValueMap("Direction map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[11] = nodeValue_Bool("Single direction", self, false); + newInput(11, nodeValue_Bool("Single direction", self, false)); - inputs[12] = nodeValue_Bool("Gamma Correction", self, false); + newInput(12, nodeValue_Bool("Gamma Correction", self, false)); input_display_list = [ 5, 6, ["Surfaces", true], 0, 3, 4, 7, 8, diff --git a/scripts/node_blur_directional/node_bw.gml b/scripts/node_blur_directional/node_bw.gml index 1d28185b4..a1f9d9cd6 100644 --- a/scripts/node_blur_directional/node_bw.gml +++ b/scripts/node_blur_directional/node_bw.gml @@ -10,11 +10,11 @@ function Node_BW(_x, _y) : Node_Processor(_x, _y) constructor { uniform_exp = shader_get_uniform(sh_bw, "brightness"); uniform_con = shader_get_uniform(sh_bw, "contrast"); - inputs[| 0] = new NodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); - inputs[| 1] = new NodeValue_Float(1, "Brightness", self, 0); + newInput(| 0, NodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0)); + newInput(| 1, NodeValue_Float(1, "Brightness", self, 0)); inputs[| 1].setDisplay(VALUE_DISPLAY.slider, [ -1, 1, 0.01]); - inputs[| 2] = new NodeValue_Float(2, "Contrast", self, 1); + newInput(| 2, NodeValue_Float(2, "Contrast", self, 1)); inputs[| 2].setDisplay(VALUE_DISPLAY.slider, [ -1, 4, 0.01]); outputs[| 0] = new nodeValue_Output(0, "Surface out", self, VALUE_TYPE.surface, surface_create(1, 1)); diff --git a/scripts/node_blur_path/node_blur_path.gml b/scripts/node_blur_path/node_blur_path.gml index db1b945fb..34a491f67 100644 --- a/scripts/node_blur_path/node_blur_path.gml +++ b/scripts/node_blur_path/node_blur_path.gml @@ -1,29 +1,29 @@ function Node_Blur_Path(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Path Blur"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_PathNode("Blur Path", self, noone) .setVisible(true, true); - inputs[2] = nodeValue_Int("Resolution", self, 32); + newInput(2, nodeValue_Int("Resolution", self, 32)); - inputs[3] = nodeValue_Surface("Mask", self); + newInput(3, nodeValue_Surface("Mask", self)); inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_Bool("Active", self, true); + newInput(5, nodeValue_Bool("Active", self, true)); active_index = 5; - inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(6, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(3); // inputs 7, 8 - inputs[9] = nodeValue_Float("Intensity", self, 1); + newInput(9, nodeValue_Float("Intensity", self, 1)); - inputs[10] = nodeValue("Intensity Along Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + newInput(10, nodeValue("Intensity Along Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11)); - inputs[11] = nodeValue_Slider_Range("Range", self, [ 0, 1 ]); + newInput(11, nodeValue_Slider_Range("Range", self, [ 0, 1 ])); inputs[12] = nodeValue_Float("Path Origin", self, 0) .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 2fd863ce0..9061ab86b 100644 --- a/scripts/node_blur_radial/node_blur_radial.gml +++ b/scripts/node_blur_radial/node_blur_radial.gml @@ -1,7 +1,7 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Radial Blur"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Rotation("Strength", self, 45) .setMappable(10); @@ -12,25 +12,25 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou 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_Surface("Mask", self); + newInput(4, nodeValue_Surface("Mask", self)); inputs[5] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[6] = nodeValue_Bool("Active", self, true); + newInput(6, nodeValue_Bool("Active", self, true)); active_index = 6; - inputs[7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(7, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(4); // inputs 8, 9, ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[10] = nodeValueMap("Strength map", self); + newInput(10, nodeValueMap("Strength map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[11] = nodeValue_Bool("Gamma Correction", self, false); + newInput(11, nodeValue_Bool("Gamma Correction", self, false)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_blur_radial/node_bw.gml b/scripts/node_blur_radial/node_bw.gml index 1d28185b4..a1f9d9cd6 100644 --- a/scripts/node_blur_radial/node_bw.gml +++ b/scripts/node_blur_radial/node_bw.gml @@ -10,11 +10,11 @@ function Node_BW(_x, _y) : Node_Processor(_x, _y) constructor { uniform_exp = shader_get_uniform(sh_bw, "brightness"); uniform_con = shader_get_uniform(sh_bw, "contrast"); - inputs[| 0] = new NodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); - inputs[| 1] = new NodeValue_Float(1, "Brightness", self, 0); + newInput(| 0, NodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0)); + newInput(| 1, NodeValue_Float(1, "Brightness", self, 0)); inputs[| 1].setDisplay(VALUE_DISPLAY.slider, [ -1, 1, 0.01]); - inputs[| 2] = new NodeValue_Float(2, "Contrast", self, 1); + newInput(| 2, NodeValue_Float(2, "Contrast", self, 1)); inputs[| 2].setDisplay(VALUE_DISPLAY.slider, [ -1, 4, 0.01]); outputs[| 0] = new nodeValue_Output(0, "Surface out", self, VALUE_TYPE.surface, surface_create(1, 1)); diff --git a/scripts/node_blur_shape/node_blur_shape.gml b/scripts/node_blur_shape/node_blur_shape.gml index 82d1451ab..ecf6a369b 100644 --- a/scripts/node_blur_shape/node_blur_shape.gml +++ b/scripts/node_blur_shape/node_blur_shape.gml @@ -1,26 +1,26 @@ function Node_Blur_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Shape Blur"; - inputs[0] = nodeValue_Surface("Surface in", self); - inputs[1] = nodeValue_Surface("Blur Shape", self); + newInput(0, nodeValue_Surface("Surface in", self)); + newInput(1, nodeValue_Surface("Blur Shape", self)); - inputs[2] = nodeValue_Surface("Blur mask", self); + newInput(2, nodeValue_Surface("Blur mask", self)); - inputs[3] = nodeValue_Surface("Mask", self); + newInput(3, nodeValue_Surface("Mask", self)); inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_Bool("Active", self, true); + newInput(5, nodeValue_Bool("Active", self, true)); active_index = 5; - inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(6, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); - inputs[7] = nodeValue_Enum_Button("Mode", self, 0, [ "Blur", "Max" ]); + newInput(7, nodeValue_Enum_Button("Mode", self, 0, [ "Blur", "Max" ])); __init_mask_modifier(3); // inputs 8, 9, - inputs[10] = nodeValue_Bool("Gamma Correction", self, false); + newInput(10, nodeValue_Bool("Gamma Correction", self, false)); input_display_list = [ 5, 6, ["Surfaces", true], 0, 3, 4, 8, 9, diff --git a/scripts/node_blur_simple/node_blur_simple.gml b/scripts/node_blur_simple/node_blur_simple.gml index f4d98c159..22ba9a36b 100644 --- a/scripts/node_blur_simple/node_blur_simple.gml +++ b/scripts/node_blur_simple/node_blur_simple.gml @@ -1,41 +1,41 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Non-Uniform Blur"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Float("Size", self, 3) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] }); 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_Surface("Blur mask", self); + newInput(3, nodeValue_Surface("Blur mask", self)); - inputs[4] = nodeValue_Bool("Override color", self, false, "Replace all color while keeping the alpha. Used to\nfix grey outline when bluring transparent pixel."); + newInput(4, nodeValue_Bool("Override color", self, false, "Replace all color while keeping the alpha. Used to\nfix grey outline when bluring transparent pixel.")); - inputs[5] = nodeValue_Color("Color", self, c_black); + newInput(5, nodeValue_Color("Color", self, c_black)); - inputs[6] = nodeValue_Surface("Mask", self); + newInput(6, nodeValue_Surface("Mask", self)); inputs[7] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[8] = nodeValue_Bool("Active", self, true); + newInput(8, nodeValue_Bool("Active", self, true)); active_index = 8; - inputs[9] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(9, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(6); // inputs 10, 11, inputs[12] = nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ])) .setMappable(13); - inputs[13] = nodeValueMap("Gradient map", self); + newInput(13, nodeValueMap("Gradient map", self)); - inputs[14] = nodeValueGradientRange("Gradient map range", self, inputs[1]); + newInput(14, nodeValueGradientRange("Gradient map range", self, inputs[1])); - inputs[15] = nodeValue_Bool("Use Gradient", self, false); + newInput(15, nodeValue_Bool("Use Gradient", self, false)); - inputs[16] = nodeValue_Bool("Gamma Correction", self, false); + newInput(16, nodeValue_Bool("Gamma Correction", self, false)); input_display_list = [ 8, 9, ["Surfaces", true], 0, 6, 7, 10, 11, diff --git a/scripts/node_blur_slope/node_blur_slope.gml b/scripts/node_blur_slope/node_blur_slope.gml index 66434da5f..a18c541ee 100644 --- a/scripts/node_blur_slope/node_blur_slope.gml +++ b/scripts/node_blur_slope/node_blur_slope.gml @@ -1,36 +1,36 @@ function Node_Blur_Slope(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Slope Blur"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Float("Strength", self, 4) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 32, 0.1 ] }) .setMappable(9); - inputs[2] = nodeValue_Surface("Slope Map", self); + newInput(2, nodeValue_Surface("Slope Map", self)); - inputs[3] = nodeValue_Surface("Mask", self); + newInput(3, nodeValue_Surface("Mask", self)); inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_Bool("Active", self, true); + newInput(5, nodeValue_Bool("Active", self, true)); active_index = 5; - inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(6, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(3); // inputs 7, 8 ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[ 9] = nodeValueMap("Strength map", self); + newInput( 9, nodeValueMap("Strength map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// inputs[10] = nodeValue_Float("Step", self, 0.1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 1, 0.01] }); - inputs[11] = nodeValue_Bool("Gamma Correction", self, false); + newInput(11, nodeValue_Bool("Gamma Correction", self, false)); input_display_list = [ 5, 6, ["Surfaces", true], 0, 3, 4, 7, 8, diff --git a/scripts/node_blur_slope/node_bw.gml b/scripts/node_blur_slope/node_bw.gml index 1d28185b4..a1f9d9cd6 100644 --- a/scripts/node_blur_slope/node_bw.gml +++ b/scripts/node_blur_slope/node_bw.gml @@ -10,11 +10,11 @@ function Node_BW(_x, _y) : Node_Processor(_x, _y) constructor { uniform_exp = shader_get_uniform(sh_bw, "brightness"); uniform_con = shader_get_uniform(sh_bw, "contrast"); - inputs[| 0] = new NodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); - inputs[| 1] = new NodeValue_Float(1, "Brightness", self, 0); + newInput(| 0, NodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0)); + newInput(| 1, NodeValue_Float(1, "Brightness", self, 0)); inputs[| 1].setDisplay(VALUE_DISPLAY.slider, [ -1, 1, 0.01]); - inputs[| 2] = new NodeValue_Float(2, "Contrast", self, 1); + newInput(| 2, NodeValue_Float(2, "Contrast", self, 1)); inputs[| 2].setDisplay(VALUE_DISPLAY.slider, [ -1, 4, 0.01]); outputs[| 0] = new nodeValue_Output(0, "Surface out", self, VALUE_TYPE.surface, surface_create(1, 1)); diff --git a/scripts/node_blur_zoom/node_blur_zoom.gml b/scripts/node_blur_zoom/node_blur_zoom.gml index 4fb2dec26..b24cc666e 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Float("Strength", self, 0.2) .setMappable(12); @@ -12,29 +12,29 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) 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_Enum_Scroll("Zoom mode", self, 1, [ "Start", "Middle", "End" ]); + newInput(4, nodeValue_Enum_Scroll("Zoom mode", self, 1, [ "Start", "Middle", "End" ])); - inputs[5] = nodeValue_Surface("Blur mask", self); + newInput(5, nodeValue_Surface("Blur mask", self)); - inputs[6] = nodeValue_Surface("Mask", self); + newInput(6, nodeValue_Surface("Mask", self)); inputs[7] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[8] = nodeValue_Bool("Active", self, true); + newInput(8, nodeValue_Bool("Active", self, true)); active_index = 8; - inputs[9] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(9, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(6); // inputs 10, 11 ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[12] = nodeValueMap("Strength map", self); + newInput(12, nodeValueMap("Strength map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[13] = nodeValue_Bool("Gamma Correction", self, false); + newInput(13, nodeValue_Bool("Gamma Correction", self, false)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_blur_zoom/node_bw.gml b/scripts/node_blur_zoom/node_bw.gml index 1d28185b4..a1f9d9cd6 100644 --- a/scripts/node_blur_zoom/node_bw.gml +++ b/scripts/node_blur_zoom/node_bw.gml @@ -10,11 +10,11 @@ function Node_BW(_x, _y) : Node_Processor(_x, _y) constructor { uniform_exp = shader_get_uniform(sh_bw, "brightness"); uniform_con = shader_get_uniform(sh_bw, "contrast"); - inputs[| 0] = new NodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); - inputs[| 1] = new NodeValue_Float(1, "Brightness", self, 0); + newInput(| 0, NodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0)); + newInput(| 1, NodeValue_Float(1, "Brightness", self, 0)); inputs[| 1].setDisplay(VALUE_DISPLAY.slider, [ -1, 1, 0.01]); - inputs[| 2] = new NodeValue_Float(2, "Contrast", self, 1); + newInput(| 2, NodeValue_Float(2, "Contrast", self, 1)); inputs[| 2].setDisplay(VALUE_DISPLAY.slider, [ -1, 4, 0.01]); outputs[| 0] = new nodeValue_Output(0, "Surface out", self, VALUE_TYPE.surface, surface_create(1, 1)); diff --git a/scripts/node_boolean/node_boolean.gml b/scripts/node_boolean/node_boolean.gml index 06cf3d542..75ebc316e 100644 --- a/scripts/node_boolean/node_boolean.gml +++ b/scripts/node_boolean/node_boolean.gml @@ -11,9 +11,9 @@ function Node_Boolean(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[0] = nodeValue_Bool("Value", self, false) .setVisible(true, true); - inputs[1] = nodeValue_Bool("Hide Background", self, false); + newInput(1, nodeValue_Bool("Hide Background", self, false)); - inputs[2] = nodeValue_Enum_Button("Name location", self, 1, [ "Top", "Bottom" ]); + newInput(2, nodeValue_Enum_Button("Name location", self, 1, [ "Top", "Bottom" ])); outputs[0] = nodeValue_Output("Boolean", self, 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 3c2e34a9c..49b60f4ff 100644 --- a/scripts/node_box_pattern/node_box_pattern.gml +++ b/scripts/node_box_pattern/node_box_pattern.gml @@ -1,7 +1,7 @@ function Node_Box_Pattern(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Box Pattern"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Float("Scale", self, 2) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }) @@ -13,27 +13,27 @@ function Node_Box_Pattern(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[3] = nodeValue_Vec2("Position", self, [0, 0] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[4] = nodeValue_Color("Color 1", self, c_white); + newInput(4, nodeValue_Color("Color 1", self, c_white)); - inputs[5] = nodeValue_Color("Color 2", self, c_black); + newInput(5, nodeValue_Color("Color 2", self, c_black)); ////////////////////////////////////////////////////////////////////////////////// - inputs[6] = nodeValueMap("Amount map", self); + newInput(6, nodeValueMap("Amount map", self)); - inputs[7] = nodeValueMap("Angle map", self); + newInput(7, nodeValueMap("Angle map", self)); ////////////////////////////////////////////////////////////////////////////////// - inputs[8] = nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ]); + newInput(8, nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ])); inputs[9] = nodeValue_Float("Width", self, 0.25) .setDisplay(VALUE_DISPLAY.slider) .setMappable(10); - inputs[10] = nodeValueMap("Width map", self); + newInput(10, nodeValueMap("Width map", self)); - inputs[11] = nodeValue_Enum_Button("Pattern", self, 0, [ "Cross", "Xor" ]); + newInput(11, nodeValue_Enum_Button("Pattern", self, 0, [ "Cross", "Xor" ])); inputs[12] = nodeValue_Int("Iteration", self, 4) diff --git a/scripts/node_brush_linear/node_brush_linear.gml b/scripts/node_brush_linear/node_brush_linear.gml index 784a4a234..56917b8fa 100644 --- a/scripts/node_brush_linear/node_brush_linear.gml +++ b/scripts/node_brush_linear/node_brush_linear.gml @@ -1,9 +1,9 @@ function Node_Brush_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Brush"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Bool("Active", self, true); + newInput(1, nodeValue_Bool("Active", self, true)); active_index = 1; inputs[2] = nodeValue_Int("Iteration", self, 10) @@ -12,7 +12,7 @@ function Node_Brush_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[3] = nodeValue_Float("Seed", self, 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_Float("Length", self, 10); + newInput(4, nodeValue_Float("Length", self, 10)); inputs[5] = nodeValue_Float("Attenuation", self, 0.99) .setDisplay(VALUE_DISPLAY.slider); @@ -20,12 +20,12 @@ function Node_Brush_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[6] = nodeValue_Float("Circulation", self, 0.8) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Surface("Mask", self); + newInput(7, nodeValue_Surface("Mask", self)); inputs[8] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[9] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(9, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(7); // inputs 10, 11 diff --git a/scripts/node_bw/node_bw.gml b/scripts/node_bw/node_bw.gml index f498a9808..f16523fe7 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Float("Brightness", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01] }) @@ -11,23 +11,23 @@ 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_Surface("Mask", self); + newInput(3, nodeValue_Surface("Mask", self)); inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_Bool("Active", self, true); + newInput(5, nodeValue_Bool("Active", self, true)); active_index = 5; - inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(6, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(3); // inputs 7, 8 //////////////////////////////////////////////////////////////////////////////////////////////// - inputs[9] = nodeValueMap("Brightness map", self); + newInput(9, nodeValueMap("Brightness map", self)); - inputs[10] = nodeValueMap("Contrast map", self); + newInput(10, nodeValueMap("Contrast map", self)); //////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_cache/node_cache.gml b/scripts/node_cache/node_cache.gml index 31171b1e7..1ad5b3da7 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); outputs[0] = nodeValue_Output("Cache surface", self, 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 8387adc07..5c024306e 100644 --- a/scripts/node_cache_array/node_cache_array.gml +++ b/scripts/node_cache_array/node_cache_array.gml @@ -2,13 +2,13 @@ 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Int("Start frame", self, -1, "Frame index to start caching, set to -1 to start at the first frame."); + newInput(1, nodeValue_Int("Start frame", self, -1, "Frame index to start caching, set to -1 to start at the first frame.")); - inputs[2] = nodeValue_Int("Stop frame", self, -1, "Frame index to stop caching (inclusive), set to -1 to stop at the last frame."); + newInput(2, nodeValue_Int("Stop frame", self, -1, "Frame index to stop caching (inclusive), set to -1 to stop at the last frame.")); - inputs[3] = nodeValue_Int("Step", self, 1, "Cache every N frames, set to 1 to cache every frame."); + newInput(3, nodeValue_Int("Step", self, 1, "Cache every N frames, set to 1 to cache every frame.")); outputs[0] = nodeValue_Output("Cache array", self, VALUE_TYPE.surface, []); diff --git a/scripts/node_camera/node_camera.gml b/scripts/node_camera/node_camera.gml index 7a3706936..a5394280f 100644 --- a/scripts/node_camera/node_camera.gml +++ b/scripts/node_camera/node_camera.gml @@ -3,18 +3,18 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co preview_alpha = 0.5; onSurfaceSize = function() { return surface_get_dimension(getInputData(0)); }; - inputs[0] = nodeValue_Area("Focus area", self, DEF_AREA, { onSurfaceSize, useShape : false }); + newInput(0, nodeValue_Area("Focus area", self, DEF_AREA, { onSurfaceSize, useShape : false })); inputs[1] = nodeValue_Float("Zoom", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0.01, 4, 0.01 ] }); - inputs[2] = nodeValue_Bool("Depth of Field", self, false); + newInput(2, nodeValue_Bool("Depth of Field", self, false)); - inputs[3] = nodeValue_Float("Focal distance", self, 0); + newInput(3, nodeValue_Float("Focal distance", self, 0)); - inputs[4] = nodeValue_Float("Defocus", self, 1); + newInput(4, nodeValue_Float("Defocus", self, 1)); - inputs[5] = nodeValue_Float("Focal range", self, 0); + newInput(5, nodeValue_Float("Focal range", self, 0)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); @@ -34,9 +34,9 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co if(_s) array_push(input_display_list, new Inspector_Spacer(20, true)); - inputs[index + 0] = nodeValue_Surface($"Element {_s}", self, noone); + newInput(index + 0, nodeValue_Surface($"Element {_s}", self, noone)); - inputs[index + 1] = nodeValue_Enum_Button($"Positioning {_s}", self, false, [ "Space", "Camera" ]); + newInput(index + 1, nodeValue_Enum_Button($"Positioning {_s}", self, false, [ "Space", "Camera" ])); inputs[index + 2] = nodeValue_Vec2($"Position {_s}", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(index); }); @@ -46,9 +46,9 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co new scrollItem("Repeat X", s_node_camera_repeat, 2), new scrollItem("Repeat Y", s_node_camera_repeat, 3), ]); - inputs[index + 4] = nodeValue_Vec2($"Parallax {_s}", self, [ 0, 0 ]); + newInput(index + 4, nodeValue_Vec2($"Parallax {_s}", self, [ 0, 0 ])); - inputs[index + 5] = nodeValue($"Depth {_s}", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); + newInput(index + 5, nodeValue($"Depth {_s}", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)); for( var i = 0; i < data_length; i++ ) array_push(input_display_list, index + i); diff --git a/scripts/node_canvas/node_canvas.gml b/scripts/node_canvas/node_canvas.gml index 4de11a580..ab6e6d45a 100644 --- a/scripts/node_canvas/node_canvas.gml +++ b/scripts/node_canvas/node_canvas.gml @@ -3,47 +3,47 @@ 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); + newInput( 0, nodeValue_Dimension(self)); - inputs[ 1] = nodeValue_Color("Color", self, c_white ); + newInput( 1, nodeValue_Color("Color", self, c_white )); inputs[ 2] = nodeValue_Int("Brush size", self, 1 ) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] }); inputs[ 3] = nodeValue_Float("Fill threshold", self, 0.) .setDisplay(VALUE_DISPLAY.slider); - inputs[ 4] = nodeValue_Enum_Scroll("Fill type", self, 0, ["4 connect", "8 connect", "Entire canvas"]); + newInput( 4, nodeValue_Enum_Scroll("Fill type", self, 0, ["4 connect", "8 connect", "Entire canvas"])); - inputs[ 5] = nodeValue_Bool("Draw preview overlay", self, true); + newInput( 5, nodeValue_Bool("Draw preview overlay", self, true)); inputs[ 6] = nodeValue_Surface("Brush", self) .setVisible(true, false); - inputs[ 7] = nodeValue_Int("Surface amount", self, 1); + newInput( 7, nodeValue_Int("Surface amount", self, 1)); - inputs[ 8] = nodeValue_Surface("Background", self); + newInput( 8, nodeValue_Surface("Background", self)); inputs[ 9] = nodeValue_Float("Background alpha", self, 1.) .setDisplay(VALUE_DISPLAY.slider); - inputs[10] = nodeValue_Bool("Render background", self, true); + newInput(10, nodeValue_Bool("Render background", self, true)); inputs[11] = nodeValue_Float("Alpha", self, 1 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[12] = nodeValue_Bool("Frames animation", self, true ); + newInput(12, nodeValue_Bool("Frames animation", self, true )); - inputs[13] = nodeValue_Float("Animation speed", self, 1 ); + newInput(13, nodeValue_Float("Animation speed", self, 1 )); - inputs[14] = nodeValue_Bool("Use background dimension", self, true ); + newInput(14, nodeValue_Bool("Use background dimension", self, true )); - inputs[15] = nodeValue_Range("Brush distance", self, [ 1, 1 ] , { linked : true }); + newInput(15, nodeValue_Range("Brush distance", self, [ 1, 1 ] , { linked : true })); - inputs[16] = nodeValue_Bool("Rotate brush by direction", self, false ); + newInput(16, nodeValue_Bool("Rotate brush by direction", self, false )); - inputs[17] = nodeValue_Rotation_Random("Random direction", self, [ 0, 0, 0, 0, 0 ] ); + newInput(17, nodeValue_Rotation_Random("Random direction", self, [ 0, 0, 0, 0, 0 ] )); - inputs[18] = nodeValue_Enum_Scroll("Animation Type", self, 0, [ "Loop", "Hold", "Clear" ]); + newInput(18, nodeValue_Enum_Scroll("Animation Type", self, 0, [ "Loop", "Hold", "Clear" ])); outputs[0] = nodeValue_Output("Surface out", self, 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 e2f7cedd8..2b81c40b7 100644 --- a/scripts/node_canvas_group/node_canvas_group.gml +++ b/scripts/node_canvas_group/node_canvas_group.gml @@ -8,7 +8,7 @@ function Node_Canvas_Group(_x, _y, _group) : Node_Collection(_x, _y, _group) con modifiable = false; - inputs[ 0] = nodeValue_Dimension(self); + newInput( 0, nodeValue_Dimension(self)); custom_input_index = array_length(inputs); diff --git a/scripts/node_caustic/node_caustic.gml b/scripts/node_caustic/node_caustic.gml index cccc7f642..f206bc77e 100644 --- a/scripts/node_caustic/node_caustic.gml +++ b/scripts/node_caustic/node_caustic.gml @@ -6,7 +6,7 @@ function Node_Caustic(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, _g .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[2] = nodeValue_Vec2("Scale", self, [ 4, 4 ]); + newInput(2, nodeValue_Vec2("Scale", self, [ 4, 4 ])); addShaderProp(SHADER_UNIFORM.float, "scale"); inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) diff --git a/scripts/node_cellular/node_cellular.gml b/scripts/node_cellular/node_cellular.gml index 561062b79..10037ce04 100644 --- a/scripts/node_cellular/node_cellular.gml +++ b/scripts/node_cellular/node_cellular.gml @@ -1,7 +1,7 @@ function Node_Cellular(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Cellular Noise"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Vec2("Position", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2]) .setUnitRef(function(index) { return getDimension(index); }); @@ -12,12 +12,12 @@ function Node_Cellular(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[3] = nodeValue_Float("Seed", self, 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_Enum_Scroll("Type", self, 0, [ "Point", "Edge", "Cell", "Crystal" ]); + newInput(4, nodeValue_Enum_Scroll("Type", self, 0, [ "Point", "Edge", "Cell", "Crystal" ])); inputs[5] = nodeValue_Float("Contrast", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 4, 0.01] }); - inputs[6] = nodeValue_Enum_Button("Pattern", self, 0, [ "Tiled", "Uniform", "Radial" ]); + newInput(6, nodeValue_Enum_Button("Pattern", self, 0, [ "Tiled", "Uniform", "Radial" ])); inputs[7] = nodeValue_Float("Middle", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [0., 1., 0.01] }); @@ -33,11 +33,11 @@ function Node_Cellular(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ////////////////////////////////////////////////////////////////////////////////// - inputs[11] = nodeValueMap("Scale map", self); + newInput(11, nodeValueMap("Scale map", self)); ////////////////////////////////////////////////////////////////////////////////// - inputs[12] = nodeValue_Rotation("Rotation", self, 0); + newInput(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 74d5fd0e4..781454f4b 100644 --- a/scripts/node_checker/node_checker.gml +++ b/scripts/node_checker/node_checker.gml @@ -1,7 +1,7 @@ function Node_Checker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Checker"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Float("Amount", self, 2) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }) @@ -13,19 +13,19 @@ function Node_Checker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[3] = nodeValue_Vec2("Position", self, [0, 0] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[4] = nodeValue_Color("Color 1", self, c_white); + newInput(4, nodeValue_Color("Color 1", self, c_white)); - inputs[5] = nodeValue_Color("Color 2", self, c_black); + newInput(5, nodeValue_Color("Color 2", self, c_black)); ////////////////////////////////////////////////////////////////////////////////// - inputs[6] = nodeValueMap("Amount map", self); + newInput(6, nodeValueMap("Amount map", self)); - inputs[7] = nodeValueMap("Angle map", self); + newInput(7, nodeValueMap("Angle map", self)); ////////////////////////////////////////////////////////////////////////////////// - inputs[8] = nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ]); + newInput(8, nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ])); outputs[0] = nodeValue_Output("Surface out", self, 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 402878759..bd8b4058f 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Vec2("Center", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); @@ -10,12 +10,12 @@ function Node_Chromatic_Aberration(_x, _y, _group = noone) : Node_Processor(_x, .setDisplay(VALUE_DISPLAY.slider, { range: [-16, 16, 0.01] }) .setMappable(4); - inputs[3] = nodeValue_Bool("Active", self, true); + newInput(3, nodeValue_Bool("Active", self, true)); active_index = 3; ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[4] = nodeValueMap("Strength map", self); + newInput(4, nodeValueMap("Strength map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_color/node_color.gml b/scripts/node_color/node_color.gml index 88a27a297..0a9244cc5 100644 --- a/scripts/node_color/node_color.gml +++ b/scripts/node_color/node_color.gml @@ -2,7 +2,7 @@ function Node_Color(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con name = "Color"; setDimension(96, 48); - inputs[0] = nodeValue_Color("Color", self, c_white); + newInput(0, nodeValue_Color("Color", self, c_white)); outputs[0] = nodeValue_Output("Color", self, VALUE_TYPE.color, c_white); diff --git a/scripts/node_color_adjust/node_color_adjust.gml b/scripts/node_color_adjust/node_color_adjust.gml index 2ccd161b5..96d075c75 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Float("Brightness", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }) @@ -24,13 +24,13 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }) .setMappable(22); - inputs[6] = nodeValue_Color("Blend", self, cola(c_white)); + newInput(6, nodeValue_Color("Blend", self, cola(c_white))); inputs[7] = nodeValue_Float("Blend amount", self, 0) .setDisplay(VALUE_DISPLAY.slider) .setMappable(23); - inputs[8] = nodeValue_Surface("Mask", self); + newInput(8, nodeValue_Surface("Mask", self)); inputs[9] = nodeValue_Float("Alpha", self, 1) .setDisplay(VALUE_DISPLAY.slider) @@ -40,19 +40,19 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }) .setMappable(25); - inputs[11] = nodeValue_Bool("Active", self, true); + newInput(11, nodeValue_Bool("Active", self, true)); active_index = 11; - inputs[12] = nodeValue_Enum_Button("Input Type", self, 0, [ "Surface", "Color" ]); + newInput(12, nodeValue_Enum_Button("Input Type", self, 0, [ "Surface", "Color" ])); inputs[13] = nodeValue_Palette("Color", self, array_clone(DEF_PALETTE)) .setVisible(true, true); - inputs[14] = nodeValue_Enum_Scroll("Blend mode", self, 0, BLEND_TYPES); + newInput(14, nodeValue_Enum_Scroll("Blend mode", self, 0, BLEND_TYPES)); - inputs[15] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(15, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); - inputs[16] = nodeValue_Bool("Invert mask", self, false); + newInput(16, nodeValue_Bool("Invert mask", self, false)); inputs[17] = nodeValue_Float("Mask feather", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); diff --git a/scripts/node_color_data/node_color_data.gml b/scripts/node_color_data/node_color_data.gml index 373a8cbd6..5bd0966f6 100644 --- a/scripts/node_color_data/node_color_data.gml +++ b/scripts/node_color_data/node_color_data.gml @@ -6,7 +6,7 @@ function Node_Color_Data(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[0] = nodeValue_Color("Color", self, c_white) .setVisible(true, true); - inputs[1] = nodeValue_Bool("Normalize", self, true); + newInput(1, nodeValue_Bool("Normalize", self, true)); outputs[0] = nodeValue_Output("Red", self, VALUE_TYPE.float, 0); outputs[1] = nodeValue_Output("Green", self, VALUE_TYPE.float, 0); diff --git a/scripts/node_color_hsv/node_color_hsv.gml b/scripts/node_color_hsv/node_color_hsv.gml index 496ab3207..1b3653f9e 100644 --- a/scripts/node_color_hsv/node_color_hsv.gml +++ b/scripts/node_color_hsv/node_color_hsv.gml @@ -14,7 +14,7 @@ function Node_Color_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.slider) .setVisible(true, true); - inputs[3] = nodeValue_Bool("Normalized", self, 1); + newInput(3, nodeValue_Bool("Normalized", self, 1)); inputs[4] = nodeValue_Float("Alpha", self, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_color_mix/node_color_mix.gml b/scripts/node_color_mix/node_color_mix.gml index 2895b231b..678fe141d 100644 --- a/scripts/node_color_mix/node_color_mix.gml +++ b/scripts/node_color_mix/node_color_mix.gml @@ -2,14 +2,14 @@ function Node_Color_Mix(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) name = "Mix Color"; setDimension(96, 48);; - inputs[0] = nodeValue_Color("Color from", self, c_white); + newInput(0, nodeValue_Color("Color from", self, c_white)); - inputs[1] = nodeValue_Color("Color to", self, c_white); + newInput(1, nodeValue_Color("Color to", self, c_white)); inputs[2] = nodeValue_Float("Mix", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[3] = nodeValue_Enum_Button("Color space", self, 0, [ "RGB", "HSV", "OKLAB" ]); + newInput(3, nodeValue_Enum_Button("Color space", self, 0, [ "RGB", "HSV", "OKLAB" ])); outputs[0] = nodeValue_Output("Color", self, 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 38333cbaa..a2d6cd8a9 100644 --- a/scripts/node_color_remove/node_color_remove.gml +++ b/scripts/node_color_remove/node_color_remove.gml @@ -1,31 +1,31 @@ function Node_Color_Remove(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Remove Color"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Palette("Colors", self, array_clone(DEF_PALETTE)); + newInput(1, nodeValue_Palette("Colors", self, array_clone(DEF_PALETTE))); inputs[2] = nodeValue_Float("Threshold", self, 0.1) .setDisplay(VALUE_DISPLAY.slider) .setMappable(10); - inputs[3] = nodeValue_Surface("Mask", self); + newInput(3, nodeValue_Surface("Mask", self)); inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_Bool("Active", self, true); + newInput(5, nodeValue_Bool("Active", self, true)); active_index = 5; - inputs[6] = nodeValue_Bool("Invert", self, false, "Keep the selected colors and remove the rest."); + newInput(6, nodeValue_Bool("Invert", self, false, "Keep the selected colors and remove the rest.")); - inputs[7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(7, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(3); // inputs 8, 9, ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[10] = nodeValueMap("Threshold map", self); + newInput(10, nodeValueMap("Threshold map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_color_replace/node_color_replace.gml b/scripts/node_color_replace/node_color_replace.gml index 2579936c0..1cfcf1572 100644 --- a/scripts/node_color_replace/node_color_replace.gml +++ b/scripts/node_color_replace/node_color_replace.gml @@ -1,35 +1,35 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Replace Palette"; - inputs[0] = nodeValue_Surface("Surface in", self); - inputs[1] = nodeValue_Palette("Palette from", self, array_clone(DEF_PALETTE), "Color to be replaced."); + newInput(0, nodeValue_Surface("Surface in", self)); + newInput(1, nodeValue_Palette("Palette from", self, array_clone(DEF_PALETTE), "Color to be replaced.")); - inputs[2] = nodeValue_Palette("Palette to", self, array_clone(DEF_PALETTE), "Palette to be replaced to."); + newInput(2, nodeValue_Palette("Palette to", self, array_clone(DEF_PALETTE), "Palette to be replaced to.")); inputs[3] = nodeValue_Float("Threshold", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); - inputs[4] = nodeValue_Bool("Set others to black", self, false, "Set pixel that doesn't match any color in 'palette from' to black."); + newInput(4, nodeValue_Bool("Set others to black", self, false, "Set pixel that doesn't match any color in 'palette from' to black.")); - inputs[5] = nodeValue_Bool("Multiply alpha", self, true); + newInput(5, nodeValue_Bool("Multiply alpha", self, true)); - inputs[6] = nodeValue_Bool("Hard replace", self, true, "Completely override pixel with new color instead of blending between it."); + newInput(6, nodeValue_Bool("Hard replace", self, true, "Completely override pixel with new color instead of blending between it.")); - inputs[7] = nodeValue_Surface("Mask", self); + newInput(7, nodeValue_Surface("Mask", self)); inputs[8] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[9] = nodeValue_Bool("Active", self, true); + newInput(9, nodeValue_Bool("Active", self, true)); active_index = 9; - inputs[10] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(10, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(7); // inputs 11, 12 - inputs[13] = nodeValue_Enum_Scroll("Mode", self, 0, [ "Closet", "Random" ]); + newInput(13, nodeValue_Enum_Scroll("Mode", self, 0, [ "Closet", "Random" ])); - inputs[14] = nodeValueSeed(self, VALUE_TYPE.float); + newInput(14, nodeValueSeed(self, VALUE_TYPE.float)); input_display_list = [ 9, 10, 14, ["Surfaces", true], 0, 7, 8, 11, 12, diff --git a/scripts/node_color_rgb/node_color_rgb.gml b/scripts/node_color_rgb/node_color_rgb.gml index 300c967ca..8ed5c64a0 100644 --- a/scripts/node_color_rgb/node_color_rgb.gml +++ b/scripts/node_color_rgb/node_color_rgb.gml @@ -15,7 +15,7 @@ function Node_Color_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.slider) .setVisible(true, true); - inputs[3] = nodeValue_Bool("Normalized", self, 1); + newInput(3, nodeValue_Bool("Normalized", self, 1)); inputs[4] = nodeValue_Float("Alpha", self, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_colorize/node_colorize.gml b/scripts/node_colorize/node_colorize.gml index 9641ae396..b5122e853 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ])) .setMappable(11); @@ -10,27 +10,27 @@ 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_Surface("Mask", self); + newInput(3, nodeValue_Surface("Mask", self)); inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_Bool("Active", self, true); + newInput(5, nodeValue_Bool("Active", self, true)); active_index = 5; - inputs[6] = nodeValue_Bool("Multiply alpha", self, true); + newInput(6, nodeValue_Bool("Multiply alpha", self, true)); - inputs[7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(7, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(3); // inputs 8, 9, ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[10] = nodeValueMap("Gradient shift map", self); + newInput(10, nodeValueMap("Gradient shift map", self)); - inputs[11] = nodeValueMap("Gradient map", self); + newInput(11, nodeValueMap("Gradient map", self)); - inputs[12] = nodeValueGradientRange("Gradient map range", self, inputs[1]); + newInput(12, nodeValueGradientRange("Gradient map range", self, inputs[1])); ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_colors_replace/node_colors_replace.gml b/scripts/node_colors_replace/node_colors_replace.gml index 19252b69d..5cc541672 100644 --- a/scripts/node_colors_replace/node_colors_replace.gml +++ b/scripts/node_colors_replace/node_colors_replace.gml @@ -1,8 +1,8 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Replace Colors"; - inputs[0] = nodeValue_Surface("Surface in", self); - inputs[1] = nodeValue_Palette("Palette from", self, []); + newInput(0, nodeValue_Surface("Surface in", self)); + newInput(1, nodeValue_Palette("Palette from", self, [])); inputs[2] = nodeValue_Palette("Palette to", self, []) .setVisible(false, false); @@ -10,12 +10,12 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g inputs[3] = nodeValue_Float("Threshold", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); - inputs[4] = nodeValue_Surface("Mask", self); + newInput(4, nodeValue_Surface("Mask", self)); inputs[5] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[6] = nodeValue_Bool("Active", self, true); + newInput(6, nodeValue_Bool("Active", self, true)); active_index = 6; __init_mask_modifier(4); // inputs 7, 8, diff --git a/scripts/node_combine_hsv/node_combine_hsv.gml b/scripts/node_combine_hsv/node_combine_hsv.gml index 73f65c46c..061c03fe1 100644 --- a/scripts/node_combine_hsv/node_combine_hsv.gml +++ b/scripts/node_combine_hsv/node_combine_hsv.gml @@ -1,12 +1,12 @@ function Node_Combine_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "HSV Combine"; - inputs[0] = nodeValue_Surface("Hue", self); - inputs[1] = nodeValue_Surface("Saturation", self); - inputs[2] = nodeValue_Surface("Value", self); - inputs[3] = nodeValue_Surface("Alpha", self); + newInput(0, nodeValue_Surface("Hue", self)); + newInput(1, nodeValue_Surface("Saturation", self)); + newInput(2, nodeValue_Surface("Value", self)); + newInput(3, nodeValue_Surface("Alpha", self)); - inputs[4] = nodeValue_Bool("Array Input", self, false); + newInput(4, nodeValue_Bool("Array Input", self, false)); inputs[5] = nodeValue_Surface("HSV Array", self, []) .setArrayDepth(1); diff --git a/scripts/node_combine_rgb/node_combine_rgb.gml b/scripts/node_combine_rgb/node_combine_rgb.gml index 8803c1af8..334751acd 100644 --- a/scripts/node_combine_rgb/node_combine_rgb.gml +++ b/scripts/node_combine_rgb/node_combine_rgb.gml @@ -2,12 +2,12 @@ function Node_Combine_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou name = "RGB Combine"; dimension_index = -1; - inputs[0] = nodeValue_Surface("Red", self); - inputs[1] = nodeValue_Surface("Green", self); - inputs[2] = nodeValue_Surface("Blue", self); - inputs[3] = nodeValue_Surface("Alpha", self); + newInput(0, nodeValue_Surface("Red", self)); + newInput(1, nodeValue_Surface("Green", self)); + newInput(2, nodeValue_Surface("Blue", self)); + newInput(3, nodeValue_Surface("Alpha", self)); - inputs[4] = nodeValue_Enum_Scroll("Sampling type", self, 0, ["Channel value", "Greyscale"]); + newInput(4, nodeValue_Enum_Scroll("Sampling type", self, 0, ["Channel value", "Greyscale"])); inputs[5] = nodeValue_Float("Base value", self, 0, "Set value to the unconnected color channels.") .setDisplay(VALUE_DISPLAY.slider) @@ -15,11 +15,11 @@ function Node_Combine_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[6] = nodeValueMap("Base value", self); + newInput(6, nodeValueMap("Base value", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[7] = nodeValue_Bool("Array Input", self, false); + newInput(7, nodeValue_Bool("Array Input", self, false)); inputs[8] = nodeValue_Surface("RGBA Array", self, []) .setArrayDepth(1); diff --git a/scripts/node_composite/node_composite.gml b/scripts/node_composite/node_composite.gml index 13e3f5d2e..87795ecbf 100644 --- a/scripts/node_composite/node_composite.gml +++ b/scripts/node_composite/node_composite.gml @@ -13,9 +13,9 @@ enum COMPOSE_OUTPUT_SCALING { function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Composite"; - inputs[0] = nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ]); + newInput(0, nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ])); - inputs[1] = nodeValue_Enum_Scroll("Output dimension", self, COMPOSE_OUTPUT_SCALING.first, [ "First surface", "Largest surface", "Constant" ]); + newInput(1, nodeValue_Enum_Scroll("Output dimension", self, COMPOSE_OUTPUT_SCALING.first, [ "First surface", "Largest surface", "Constant" ])); inputs[2] = nodeValue_Dimension(self) .setVisible(false); @@ -412,17 +412,17 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var index = array_length(inputs); var _s = floor((index - input_fix_len) / data_length); - inputs[index + 0] = nodeValue_Surface($"Surface {_s}", self, noone); + newInput(index + 0, nodeValue_Surface($"Surface {_s}", self, noone)); inputs[index + 0].hover_effect = 0; inputs[index + 1] = nodeValue_Vec2($"Position {_s}", self, [ 0, 0 ] ) .setUnitRef(function(index) { return [ overlay_w, overlay_h ]; }); - inputs[index + 2] = nodeValue_Rotation($"Rotation {_s}", self, 0); + newInput(index + 2, nodeValue_Rotation($"Rotation {_s}", self, 0)); - inputs[index + 3] = nodeValue_Vec2($"Scale {_s}", self, [ 1, 1 ] ); + newInput(index + 3, nodeValue_Vec2($"Scale {_s}", self, [ 1, 1 ] )); - inputs[index + 4] = nodeValue_Enum_Scroll($"Blend {_s}", self, 0, BLEND_TYPES ); + newInput(index + 4, nodeValue_Enum_Scroll($"Blend {_s}", self, 0, BLEND_TYPES )); inputs[index + 5] = nodeValue_Float($"Opacity {_s}", self, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_condition/node_condition.gml b/scripts/node_condition/node_condition.gml index 03fe51c6c..062ae1600 100644 --- a/scripts/node_condition/node_condition.gml +++ b/scripts/node_condition/node_condition.gml @@ -30,9 +30,9 @@ function Node_Condition(_x, _y, _group = noone) : Node(_x, _y, _group) construct .setVisible(true, true) .rejectArray(); - inputs[7] = nodeValue_Text("Text 1", self, "" ); + newInput(7, nodeValue_Text("Text 1", self, "" )); - inputs[8] = nodeValue_Text("Text 2", self, "" ); + newInput(8, nodeValue_Text("Text 2", self, "" )); input_display_list = [ 5, ["Condition", false], 0, 1, 2, 6, 7, 8, diff --git a/scripts/node_convolution/node_convolution.gml b/scripts/node_convolution/node_convolution.gml index 27bb39e8e..69bc93efb 100644 --- a/scripts/node_convolution/node_convolution.gml +++ b/scripts/node_convolution/node_convolution.gml @@ -1,7 +1,7 @@ function Node_Convolution(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Convolution"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Float("Kernel", self, array_create(9)) .setDisplay(VALUE_DISPLAY.matrix, { size: 3 }); @@ -9,15 +9,15 @@ function Node_Convolution(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou 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_Surface("Mask", self); + newInput(3, nodeValue_Surface("Mask", self)); inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_Bool("Active", self, true); + newInput(5, nodeValue_Bool("Active", self, true)); active_index = 5; - inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(6, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(3); // inputs 7, 8, diff --git a/scripts/node_corner/node_corner.gml b/scripts/node_corner/node_corner.gml index f4f164697..81f71a258 100644 --- a/scripts/node_corner/node_corner.gml +++ b/scripts/node_corner/node_corner.gml @@ -1,20 +1,20 @@ function Node_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Round corner"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Float("Radius", self, 2) .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 0.1] }); - inputs[2] = nodeValue_Surface("Mask", self); + newInput(2, nodeValue_Surface("Mask", self)); inputs[3] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[4] = nodeValue_Bool("Active", self, true); + newInput(4, nodeValue_Bool("Active", self, true)); active_index = 4; - inputs[5] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(5, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(2); // inputs 6, 7 diff --git a/scripts/node_counter/node_counter.gml b/scripts/node_counter/node_counter.gml index 21fbe7078..a1fb8e52a 100644 --- a/scripts/node_counter/node_counter.gml +++ b/scripts/node_counter/node_counter.gml @@ -4,9 +4,9 @@ function Node_Counter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c setDimension(96, 48); - inputs[0] = nodeValue_Float("Start", self, 1); + newInput(0, nodeValue_Float("Start", self, 1)); - inputs[1] = nodeValue_Float("Speed", self, 1); + newInput(1, nodeValue_Float("Speed", self, 1)); inputs[2] = nodeValue_Int("Mode", self, 0, @"Counting mode - Frame count: Count value up/down per frame. diff --git a/scripts/node_crop/node_crop.gml b/scripts/node_crop/node_crop.gml index d42b69e0d..dfbc7208d 100644 --- a/scripts/node_crop/node_crop.gml +++ b/scripts/node_crop/node_crop.gml @@ -2,24 +2,24 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons name = "Crop"; preview_alpha = 0.5; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Padding("Crop", self, [ 0, 0, 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[2] = nodeValue_Bool("Active", self, true); + newInput(2, nodeValue_Bool("Active", self, true)); active_index = 2; - inputs[3] = nodeValue_Enum_Scroll("Aspect Ratio", self, 0, [ "None", "Manual", "1:1", "3:2", "4:3", "16:9" ]); + newInput(3, nodeValue_Enum_Scroll("Aspect Ratio", self, 0, [ "None", "Manual", "1:1", "3:2", "4:3", "16:9" ])); - inputs[4] = nodeValue_Vec2("Ratio", self, [ 1, 1 ]); + newInput(4, nodeValue_Vec2("Ratio", self, [ 1, 1 ])); inputs[5] = nodeValue_Vec2("Center", self, [ .5, .5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[6] = nodeValue_Float("Width", self, 8 ); + newInput(6, nodeValue_Float("Width", self, 8 )); - inputs[7] = nodeValue_Enum_Scroll("Fit Mode", self, 0, [ "Manual", "Width", "Height", "Minimum" ]); + newInput(7, nodeValue_Enum_Scroll("Fit Mode", self, 0, [ "Manual", "Width", "Height", "Minimum" ])); outputs[0] = nodeValue_Output("Surface out", self, 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 dd812daa5..6e82c7445 100644 --- a/scripts/node_crop_content/node_crop_content.gml +++ b/scripts/node_crop_content/node_crop_content.gml @@ -1,14 +1,14 @@ function Node_Crop_Content(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Crop Content"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Bool("Active", self, true); + newInput(1, nodeValue_Bool("Active", self, true)); 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("Padding", self, [ 0, 0, 0, 0 ], "Add padding back after crop."); + newInput(3, nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ], "Add padding back after crop.")); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_cross_section/node_cross_section.gml b/scripts/node_cross_section/node_cross_section.gml index 07a991b29..ff9837ec2 100644 --- a/scripts/node_cross_section/node_cross_section.gml +++ b/scripts/node_cross_section/node_cross_section.gml @@ -1,16 +1,16 @@ function Node_Cross_Section(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Draw Cross Section"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ]); + newInput(1, nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ])); inputs[2] = nodeValue_Float("Position", self, 0 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[3] = nodeValue_Bool("Anti Aliasing", self, false ); + newInput(3, nodeValue_Bool("Anti Aliasing", self, false )); - inputs[4] = nodeValue_Enum_Button("Mode", self, 0 , [ "BW", "Colored" ]); + newInput(4, nodeValue_Enum_Button("Mode", self, 0 , [ "BW", "Colored" ])); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone ); diff --git a/scripts/node_curve/node_curve.gml b/scripts/node_curve/node_curve.gml index 91d560dd8..8429a7961 100644 --- a/scripts/node_curve/node_curve.gml +++ b/scripts/node_curve/node_curve.gml @@ -1,29 +1,29 @@ function Node_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Curve"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue("Brightness", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + newInput(1, nodeValue("Brightness", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01)); - inputs[2] = nodeValue("Red", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + newInput(2, nodeValue("Red", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01)); - inputs[3] = nodeValue("Green", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + newInput(3, nodeValue("Green", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01)); - inputs[4] = nodeValue("Blue", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + newInput(4, nodeValue("Blue", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01)); - inputs[5] = nodeValue_Surface("Mask", self); + newInput(5, nodeValue_Surface("Mask", self)); inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Bool("Active", self, true); + newInput(7, nodeValue_Bool("Active", self, true)); active_index = 7; - inputs[8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(8, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(5); // inputs 9, 10 - inputs[11] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + newInput(11, nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_curve_hsv/node_curve_hsv.gml b/scripts/node_curve_hsv/node_curve_hsv.gml index 2240a775f..095d51d4f 100644 --- a/scripts/node_curve_hsv/node_curve_hsv.gml +++ b/scripts/node_curve_hsv/node_curve_hsv.gml @@ -1,23 +1,23 @@ function Node_Curve_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "HSV Curve"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue("Hue", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + newInput(1, nodeValue("Hue", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01)); - inputs[2] = nodeValue("Saturation", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + newInput(2, nodeValue("Saturation", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01)); - inputs[3] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + newInput(3, nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01)); - inputs[4] = nodeValue_Surface("Mask", self); + newInput(4, nodeValue_Surface("Mask", self)); inputs[5] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[6] = nodeValue_Bool("Active", self, true); + newInput(6, nodeValue_Bool("Active", self, true)); active_index = 6; - inputs[7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(7, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(4); // inputs 8, 9, diff --git a/scripts/node_de_corner/node_de_corner.gml b/scripts/node_de_corner/node_de_corner.gml index bb43db231..f77f70f7b 100644 --- a/scripts/node_de_corner/node_de_corner.gml +++ b/scripts/node_de_corner/node_de_corner.gml @@ -1,9 +1,9 @@ function Node_De_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "De-Corner"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Bool("Active", self, true); + newInput(1, nodeValue_Bool("Active", self, true)); active_index = 1; inputs[2] = nodeValue_Float("Tolerance", self, 0) @@ -11,16 +11,16 @@ function Node_De_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[3] = nodeValue_Int("Iteration", self, 2) - inputs[4] = nodeValue_Enum_Button("Type", self, 0, [ "Double", "Diagonal" ]); + newInput(4, nodeValue_Enum_Button("Type", self, 0, [ "Double", "Diagonal" ])); - inputs[5] = nodeValue_Surface("Mask", self); + newInput(5, nodeValue_Surface("Mask", self)); inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); __init_mask_modifier(5); // inputs 7, 8, - inputs[9] = nodeValue_Toggle("Include", self, 0b11, { data: [ "Inner", "Side" ] }); + newInput(9, nodeValue_Toggle("Include", self, 0b11, { data: [ "Inner", "Side" ] })); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_de_stray/node_de_stray.gml b/scripts/node_de_stray/node_de_stray.gml index 5ea554ff7..863926641 100644 --- a/scripts/node_de_stray/node_de_stray.gml +++ b/scripts/node_de_stray/node_de_stray.gml @@ -1,26 +1,26 @@ function Node_De_Stray(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "De-Stray"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Float("Tolerance", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[2] = nodeValue_Bool("Active", self, true); + newInput(2, nodeValue_Bool("Active", self, true)); active_index = 2; inputs[3] = nodeValue_Int("Iteration", self, 2) - inputs[4] = nodeValue_Enum_Button("Strictness", self, 0, [ "Low", "High", "Stray-only" ]); + newInput(4, nodeValue_Enum_Button("Strictness", self, 0, [ "Low", "High", "Stray-only" ])); - inputs[5] = nodeValue_Surface("Mask", self); + newInput(5, nodeValue_Surface("Mask", self)); inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); __init_mask_modifier(5); // inputs 7, 8, - inputs[9] = nodeValue_Bool("Fill Empty", self, false); + newInput(9, nodeValue_Bool("Fill Empty", self, false)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_delay/node_delay.gml b/scripts/node_delay/node_delay.gml index 5f75a84df..ba2891d49 100644 --- a/scripts/node_delay/node_delay.gml +++ b/scripts/node_delay/node_delay.gml @@ -3,9 +3,9 @@ function Node_Delay(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con is_simulation = true; - inputs[0] = nodeValue_Surface("Surface", self); + newInput(0, nodeValue_Surface("Surface", self)); - inputs[1] = nodeValue_Int("Frames", self, 1); + newInput(1, nodeValue_Int("Frames", self, 1)); outputs[0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_diffuse/node_diffuse.gml b/scripts/node_diffuse/node_diffuse.gml index 937de883b..2e4e2232c 100644 --- a/scripts/node_diffuse/node_diffuse.gml +++ b/scripts/node_diffuse/node_diffuse.gml @@ -1,33 +1,33 @@ function Node_Diffuse(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Diffuse"; - inputs[0] = nodeValue_Surface("Density field", self); + newInput(0, nodeValue_Surface("Density field", self)); inputs[1] = nodeValue_Float("Dissipation", self, 0.05) .setDisplay(VALUE_DISPLAY.slider, { range: [ -0.2, 0.2, 0.001] }); - inputs[2] = nodeValue_Float("Scale", self, 1); + newInput(2, nodeValue_Float("Scale", self, 1)); - inputs[3] = nodeValue_Float("Randomness", self, 1); + newInput(3, nodeValue_Float("Randomness", self, 1)); inputs[4] = nodeValue_Float("Flow rate", self, 0.5) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 1, 0.01] }); - inputs[5] = nodeValue_Slider_Range("Threshold", self, [ 0.5, 0.7 ]); + newInput(5, nodeValue_Slider_Range("Threshold", self, [ 0.5, 0.7 ])); inputs[6] = nodeValue_Int("Seed", self, 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_Surface("External", self); + newInput(7, nodeValue_Surface("External", self)); inputs[8] = nodeValue_Float("External Strength", self, 0.1) .setDisplay(VALUE_DISPLAY.slider, { range: [ -0.25, 0.25, 0.01] }); inputs[9] = nodeValue_Int("Detail", self, 1) - inputs[10] = nodeValue_Enum_Scroll("External Type", self, 0, [ "Point", "Vector" ]); + newInput(10, nodeValue_Enum_Scroll("External Type", self, 0, [ "Point", "Vector" ])); - inputs[11] = nodeValue_Rotation("External Direction", self, 0); + newInput(11, nodeValue_Rotation("External Direction", self, 0)); outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_dilate/node_dilate.gml b/scripts/node_dilate/node_dilate.gml index 15c4e4c1f..63e1b2b23 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Vec2("Center", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); @@ -16,15 +16,15 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co 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_Surface("Mask", self); + newInput(5, nodeValue_Surface("Mask", self)); inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Bool("Active", self, true); + newInput(7, nodeValue_Bool("Active", self, true)); active_index = 7; - inputs[8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(8, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(5); // inputs 9, 10 diff --git a/scripts/node_directory_search/node_directory_search.gml b/scripts/node_directory_search/node_directory_search.gml index 91d94318d..8bf433c52 100644 --- a/scripts/node_directory_search/node_directory_search.gml +++ b/scripts/node_directory_search/node_directory_search.gml @@ -29,9 +29,9 @@ function Node_Directory_Search(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[0] = nodeValue_Path("Path", self, "") .setDisplay(VALUE_DISPLAY.path_load, { filter: "dir" }); - inputs[1] = nodeValue_Text("Extensions", self, ".png"); + newInput(1, nodeValue_Text("Extensions", self, ".png")); - inputs[2] = nodeValue_Enum_Scroll("Type", self, 0, [ "Surface", "Text" ]); + newInput(2, nodeValue_Enum_Scroll("Type", self, 0, [ "Surface", "Text" ])); inputs[3] = nodeValue_Bool("Recursive", self, false) diff --git a/scripts/node_displace/node_displace.gml b/scripts/node_displace/node_displace.gml index 5d12dac57..817b375cd 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Surface("Displace map", self); + newInput(1, nodeValue_Surface("Displace map", self)); inputs[2] = nodeValue_Vec2("Position", self, [ 1, 0 ] ) .setTooltip("Vector to displace pixel by.") @@ -28,17 +28,17 @@ If set, then strength value control how many times the effect applies on itself. 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_Surface("Mask", self); + newInput(8, nodeValue_Surface("Mask", self)); inputs[9] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[10] = nodeValue_Bool("Active", self, true); + newInput(10, nodeValue_Bool("Active", self, true)); active_index = 10; - inputs[11] = nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Overwrite", "Min", "Max" ]); + newInput(11, nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Overwrite", "Min", "Max" ])); - inputs[12] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(12, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(8); // inputs 13, 14 @@ -49,9 +49,9 @@ If set, then strength value control how many times the effect applies on itself. //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[16] = nodeValue_Bool("Separate axis", self, false); + newInput(16, nodeValue_Bool("Separate axis", self, false)); - inputs[17] = nodeValue_Surface("Displace map 2", self); + newInput(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 8ea928f4a..20fd517a5 100644 --- a/scripts/node_display_text/node_display_text.gml +++ b/scripts/node_display_text/node_display_text.gml @@ -20,7 +20,7 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr inputs[0] = nodeValue_Color("Color", self, c_white ) .rejectArray(); - inputs[1] = nodeValue_Text("Text", self, "Text"); + newInput(1, nodeValue_Text("Text", self, "Text")); inputs[2] = nodeValue_Enum_Scroll("Style", self, 2, [ "Header", "Sub header", "Normal" ]) .rejectArray(); diff --git a/scripts/node_dither/node_dither.gml b/scripts/node_dither/node_dither.gml index 7401e17df..1d00d29d7 100644 --- a/scripts/node_dither/node_dither.gml +++ b/scripts/node_dither/node_dither.gml @@ -16,11 +16,11 @@ function Node_Dither(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co name = "Dither"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE)); + newInput(1, nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE))); - inputs[2] = nodeValue_Enum_Scroll("Pattern", self, 0, [ "2 x 2 Bayer", "4 x 4 Bayer", "8 x 8 Bayer", "White Noise", "Custom" ]); + newInput(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_Surface("Dither map", self) .setVisible(false); @@ -28,26 +28,26 @@ function Node_Dither(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[4] = nodeValue_Float("Contrast", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 5, 0.1] }); - inputs[5] = nodeValue_Surface("Contrast map", self); + newInput(5, nodeValue_Surface("Contrast map", self)); - inputs[6] = nodeValue_Enum_Button("Mode", self, 0, [ "Color", "Alpha" ]); + newInput(6, nodeValue_Enum_Button("Mode", self, 0, [ "Color", "Alpha" ])); - inputs[7] = nodeValue_Surface("Mask", self); + newInput(7, nodeValue_Surface("Mask", self)); inputs[8] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[9] = nodeValue_Bool("Active", self, true); + newInput(9, nodeValue_Bool("Active", self, true)); active_index = 9; - inputs[10] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(10, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(7); // inputs 11, 12, inputs[13] = nodeValue_Int("Seed", self, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[13].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[14] = nodeValue_Bool("Use palette", self, true); + newInput(14, nodeValue_Bool("Use palette", self, true)); inputs[15] = nodeValue_Int("Steps", self, 4) .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 0.1] }); diff --git a/scripts/node_dll/node_dll.gml b/scripts/node_dll/node_dll.gml index 233fd92a1..69ae899c0 100644 --- a/scripts/node_dll/node_dll.gml +++ b/scripts/node_dll/node_dll.gml @@ -6,9 +6,9 @@ function Node_DLL(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { .setDisplay(VALUE_DISPLAY.path_load, { filter: "Dynamic-link library (.dll)|*.dll" }) .setVisible(true, false); - inputs[1] = nodeValue_Text("Function name", self, ""); + newInput(1, nodeValue_Text("Function name", self, "")); - inputs[2] = nodeValue_Enum_Button("Return type", self, 0, [ "Number", "Buffer" ]); + newInput(2, nodeValue_Enum_Button("Return type", self, 0, [ "Number", "Buffer" ])); outputs[0] = nodeValue_Output("Return Value", self, VALUE_TYPE.float, 0); @@ -45,7 +45,7 @@ function Node_DLL(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static createNewInput = function() { var index = array_length(inputs); - inputs[index + 0] = nodeValue_Enum_Button("Parameter type", self, 0, [ "Number", "Buffer" ]); + newInput(index + 0, nodeValue_Enum_Button("Parameter type", self, 0, [ "Number", "Buffer" ])); inputs[index + 1] = nodeValue_Float("Parameter value", self, 0 ) .setVisible(true, true); diff --git a/scripts/node_dust/node_dust.gml b/scripts/node_dust/node_dust.gml index 26701dbc5..37d9d4f80 100644 --- a/scripts/node_dust/node_dust.gml +++ b/scripts/node_dust/node_dust.gml @@ -79,7 +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); + newInput(0, nodeValue_Dimension(self)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_dynasurf_out/node_dynasurf_out.gml b/scripts/node_dynasurf_out/node_dynasurf_out.gml index 4b804b807..409c3f5d3 100644 --- a/scripts/node_dynasurf_out/node_dynasurf_out.gml +++ b/scripts/node_dynasurf_out/node_dynasurf_out.gml @@ -5,21 +5,21 @@ function Node_DynaSurf_Out(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) co manual_deletable = false; destroy_when_upgroup = true; - inputs[0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(0, nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); - inputs[1] = nodeValue("x", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(1, nodeValue("x", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); - inputs[2] = nodeValue("y", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(2, nodeValue("y", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); - inputs[3] = nodeValue("sx", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(3, nodeValue("sx", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); - inputs[4] = nodeValue("sy", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(4, nodeValue("sy", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); - inputs[5] = nodeValue("angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(5, nodeValue("angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); - inputs[6] = nodeValue("color", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(6, nodeValue("color", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); - inputs[7] = nodeValue("alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(7, nodeValue("alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone) .setVisible(false); diff --git a/scripts/node_dynasurf_out_height/node_dynasurf_out_height.gml b/scripts/node_dynasurf_out_height/node_dynasurf_out_height.gml index 8734cd5fd..557bf29ed 100644 --- a/scripts/node_dynasurf_out_height/node_dynasurf_out_height.gml +++ b/scripts/node_dynasurf_out_height/node_dynasurf_out_height.gml @@ -5,7 +5,7 @@ function Node_DynaSurf_Out_Height(_x, _y, _group = noone) : Node_PCX(_x, _y, _gr manual_deletable = false; destroy_when_upgroup = true; - inputs[0] = nodeValue("Height", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(0, nodeValue("Height", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone) .setVisible(false); diff --git a/scripts/node_dynasurf_out_width/node_dynasurf_out_width.gml b/scripts/node_dynasurf_out_width/node_dynasurf_out_width.gml index c34635ec7..cc2993349 100644 --- a/scripts/node_dynasurf_out_width/node_dynasurf_out_width.gml +++ b/scripts/node_dynasurf_out_width/node_dynasurf_out_width.gml @@ -5,7 +5,7 @@ function Node_DynaSurf_Out_Width(_x, _y, _group = noone) : Node_PCX(_x, _y, _gro manual_deletable = false; destroy_when_upgroup = true; - inputs[0] = nodeValue("Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + newInput(0, nodeValue("Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone)); outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone) .setVisible(false); diff --git a/scripts/node_edge_detect/node_edge_detect.gml b/scripts/node_edge_detect/node_edge_detect.gml index c5b917d41..ef25bdb1e 100644 --- a/scripts/node_edge_detect/node_edge_detect.gml +++ b/scripts/node_edge_detect/node_edge_detect.gml @@ -6,22 +6,22 @@ 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("Surface in self"); + newInput(0, nodeValue_Surface("Surface in self")); - inputs[1] = nodeValue_Enum_Scroll("Algorithm", self, 0, ["Sobel", "Prewitt", "Laplacian", "Neighbor max diff"] ); + newInput(1, nodeValue_Enum_Scroll("Algorithm", self, 0, ["Sobel", "Prewitt", "Laplacian", "Neighbor max diff"] )); 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_Surface("Mask", self); + newInput(3, nodeValue_Surface("Mask", self)); inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_Bool("Active", self, true); + newInput(5, nodeValue_Bool("Active", self, true)); active_index = 5; - inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(6, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(3); // inputs 7, 8 diff --git a/scripts/node_edge_shade/node_edge_shade.gml b/scripts/node_edge_shade/node_edge_shade.gml index 02d7e6a1f..a1d177de5 100644 --- a/scripts/node_edge_shade/node_edge_shade.gml +++ b/scripts/node_edge_shade/node_edge_shade.gml @@ -1,9 +1,9 @@ function Node_Edge_Shade(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Edge Shade"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Bool("Active", self, true); + newInput(1, nodeValue_Bool("Active", self, true)); active_index = 1; inputs[2] = nodeValue_Gradient("Colors", self, new gradientObject( [ cola(c_black), cola(c_white) ] )) @@ -11,9 +11,9 @@ function Node_Edge_Shade(_x, _y, _group = noone) : Node_Processor(_x, _y, _group ////////////////////////////////////////////////////////////////////////////////// - inputs[3] = nodeValueMap("Gradient map", self); + newInput(3, nodeValueMap("Gradient map", self)); - inputs[4] = nodeValueGradientRange("Gradient map range", self, inputs[2]); + newInput(4, nodeValueGradientRange("Gradient map range", self, inputs[2])); ////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_equation/node_equation.gml b/scripts/node_equation/node_equation.gml index 3f0ad92a9..5fdcb9894 100644 --- a/scripts/node_equation/node_equation.gml +++ b/scripts/node_equation/node_equation.gml @@ -39,7 +39,7 @@ function Node_Equation(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attributes.size = 0; - inputs[0] = nodeValue_Text("Equation", self, ""); + newInput(0, nodeValue_Text("Equation", self, "")); outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.float, 0); diff --git a/scripts/node_erode/node_erode.gml b/scripts/node_erode/node_erode.gml index e50824e26..7f5740f49 100644 --- a/scripts/node_erode/node_erode.gml +++ b/scripts/node_erode/node_erode.gml @@ -1,25 +1,25 @@ function Node_Erode(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Erode"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Int("Width", self, 1) .setValidator(VV_min(0)) .setMappable(10); - inputs[2] = nodeValue_Bool("Preserve border",self, false); + newInput(2, nodeValue_Bool("Preserve border",self, false)); - inputs[3] = nodeValue_Bool("Use alpha", self, true); + newInput(3, nodeValue_Bool("Use alpha", self, true)); - inputs[4] = nodeValue_Surface("Mask", self); + newInput(4, nodeValue_Surface("Mask", self)); inputs[5] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[6] = nodeValue_Bool("Active", self, true); + newInput(6, nodeValue_Bool("Active", self, true)); active_index = 6; - inputs[7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(7, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(4); // inputs 8, 9, diff --git a/scripts/node_export/node_export.gml b/scripts/node_export/node_export.gml index 1ead46189..c09826075 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("Surface", self); + newInput(0, nodeValue_Surface("Surface", self)); inputs[1] = nodeValue_Path("Paths", self, "") .setDisplay(VALUE_DISPLAY.path_save, _format_still) @@ -63,7 +63,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor inputs[3] = nodeValue_Enum_Scroll("Type", self, 0, { data: format_single, update_hover: false }) .rejectArray(); - inputs[4] = nodeValue_Int("Template guides", self, 0); + newInput(4, nodeValue_Int("Template guides", self, 0)); inputs[5] = nodeValue_Bool("Loop", self, true) .setVisible(false) @@ -91,14 +91,14 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 100, 0.1 ] }) .rejectArray(); - inputs[11] = nodeValue_Int("Sequence begin", self, 0); + newInput(11, nodeValue_Int("Sequence begin", self, 0)); - inputs[12] = nodeValue_Slider_Range("Frame range", self, [0, -1], { range: [0, TOTAL_FRAMES, 0.1] }); + newInput(12, nodeValue_Slider_Range("Frame range", self, [0, -1], { range: [0, TOTAL_FRAMES, 0.1] })); png_format = [ "INDEX4", "INDEX8", "Default (PNG32)" ]; - inputs[13] = nodeValue_Enum_Scroll("Subformat", self, 2, { data: png_format, update_hover: false }); + newInput(13, nodeValue_Enum_Scroll("Subformat", self, 2, { data: png_format, update_hover: false })); - inputs[14] = nodeValue_Int("Frame step", self, 1); + newInput(14, nodeValue_Int("Frame step", self, 1)); inputs[15] = nodeValue_Bool("Custom Range", self, false) .rejectArray(); diff --git a/scripts/node_find_pixel/node_find_pixel.gml b/scripts/node_find_pixel/node_find_pixel.gml index 05d16a3e0..7b892e1a3 100644 --- a/scripts/node_find_pixel/node_find_pixel.gml +++ b/scripts/node_find_pixel/node_find_pixel.gml @@ -2,21 +2,21 @@ function Node_Find_Pixel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group name = "Find pixel"; setDimension(96, 48); - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Color("Search color", self, c_black); + newInput(1, nodeValue_Color("Search color", self, c_black)); inputs[2] = nodeValue_Float("Tolerance", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[3] = nodeValue_Bool("Find all", self, false); + newInput(3, nodeValue_Bool("Find all", self, false)); - inputs[4] = nodeValue_Bool("Include alpha", self, false); + newInput(4, nodeValue_Bool("Include alpha", self, false)); inputs[5] = nodeValue_Float("Alpha tolerance", self, 0.2) .setDisplay(VALUE_DISPLAY.slider); - // inputs[6] = nodeValue_Enum_Button("Axis", self, 1, [ "X", "Y" ]); + // newInput(6, nodeValue_Enum_Button("Axis", self, 1, [ "X", "Y" ])); outputs[0] = nodeValue_Output("Position", self, 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 67d139247..a641ccf2c 100644 --- a/scripts/node_flip/node_flip.gml +++ b/scripts/node_flip/node_flip.gml @@ -1,11 +1,11 @@ function Node_Flip(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Flip"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Enum_Button("Axis", self, 0, [ "x", "y" ]); + newInput(1, nodeValue_Enum_Button("Axis", self, 0, [ "x", "y" ])); - inputs[2] = nodeValue_Bool("Active", self, true); + newInput(2, nodeValue_Bool("Active", self, true)); active_index = 2; input_display_list = [ 2, diff --git a/scripts/node_flood_fill/node_flood_fill.gml b/scripts/node_flood_fill/node_flood_fill.gml index bdc26fdbb..60653281c 100644 --- a/scripts/node_flood_fill/node_flood_fill.gml +++ b/scripts/node_flood_fill/node_flood_fill.gml @@ -1,28 +1,28 @@ function Node_Flood_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Flood Fill"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Surface("Mask", self); + newInput(1, nodeValue_Surface("Mask", self)); inputs[2] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[3] = nodeValue_Bool("Active", self, true); + newInput(3, nodeValue_Bool("Active", self, true)); active_index = 3; - inputs[4] = nodeValue_Vec2("Position", self, [ 1, 1 ]); + newInput(4, nodeValue_Vec2("Position", self, [ 1, 1 ])); - inputs[5] = nodeValue_Color("Colors", self, cola(c_black) ); + newInput(5, nodeValue_Color("Colors", self, cola(c_black) )); inputs[6] = nodeValue_Float("Threshold", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Bool("Diagonal", self, false); + newInput(7, nodeValue_Bool("Diagonal", self, false)); __init_mask_modifier(1); // inputs 8, 9 - inputs[10] = nodeValue_Enum_Scroll("Blend", self, 0, [ "Override", "Multiply" ]); + newInput(10, nodeValue_Enum_Scroll("Blend", self, 0, [ "Override", "Multiply" ])); outputs[0] = nodeValue_Output("Surface out", self, 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 84877ca09..bf0c0209f 100644 --- a/scripts/node_flow_noise/node_flow_noise.gml +++ b/scripts/node_flow_noise/node_flow_noise.gml @@ -6,16 +6,16 @@ function Node_Flow_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[2] = nodeValue_Vec2("Scale", self, [ 2, 2 ]); + newInput(2, nodeValue_Vec2("Scale", self, [ 2, 2 ])); addShaderProp(SHADER_UNIFORM.float, "scale"); inputs[3] = nodeValue_Float("Progress", self, 0) addShaderProp(SHADER_UNIFORM.float, "progress"); - inputs[4] = nodeValue_Slider_Range("Detail", self, [ 1, 8 ], { range: [ 1, 16, 0.1 ] }); + newInput(4, nodeValue_Slider_Range("Detail", self, [ 1, 8 ], { range: [ 1, 16, 0.1 ] })); addShaderProp(SHADER_UNIFORM.float, "detail"); - inputs[5] = nodeValue_Rotation("Rotation", self, 0); + newInput(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 d697612f2..cbc41ef82 100644 --- a/scripts/node_fn/node_fn.gml +++ b/scripts/node_fn/node_fn.gml @@ -4,7 +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_Enum_Scroll("Display", self, 1 , [ "Number", "Graph" ]); + newInput(0, nodeValue_Enum_Scroll("Display", self, 1 , [ "Number", "Graph" ])); outputs[0] = nodeValue_Output("Output", self, VALUE_TYPE.float, 0); diff --git a/scripts/node_fn_constant/node_fn_constant.gml b/scripts/node_fn_constant/node_fn_constant.gml index 3ebfb6b0d..48c6ca3b7 100644 --- a/scripts/node_fn_constant/node_fn_constant.gml +++ b/scripts/node_fn_constant/node_fn_constant.gml @@ -1,7 +1,7 @@ function Node_Fn_Constant(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) constructor { name = "Constant"; - inputs[inl + 0] = nodeValue_Float("Value", self, 0 ); + newInput(inl + 0, nodeValue_Float("Value", self, 0 )); array_append(input_display_list, [ ["Value", false], inl + 0 diff --git a/scripts/node_fn_ease/node_fn_ease.gml b/scripts/node_fn_ease/node_fn_ease.gml index bd87ba4ea..dfc73373c 100644 --- a/scripts/node_fn_ease/node_fn_ease.gml +++ b/scripts/node_fn_ease/node_fn_ease.gml @@ -1,11 +1,11 @@ function Node_Fn_Ease(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) constructor { name = "Ease"; - inputs[inl + 0] = nodeValue_Slider_Range("Range", self, [ 0, 1 ] ); + newInput(inl + 0, nodeValue_Slider_Range("Range", self, [ 0, 1 ] )); - inputs[inl + 1] = nodeValue_Slider_Range("Amount", self, [ 0.1, 0.9 ] ); + newInput(inl + 1, nodeValue_Slider_Range("Amount", self, [ 0.1, 0.9 ] )); - inputs[inl + 2] = nodeValue_Enum_Scroll("Smooth", self, 0 , [ "Cubic poly", "Quadratic rat", "Cubic rat", "Cosine" ] ); + newInput(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 be85e7edb..52a011387 100644 --- a/scripts/node_fn_math/node_fn_math.gml +++ b/scripts/node_fn_math/node_fn_math.gml @@ -2,7 +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_Enum_Scroll("Operation", self, 2 , [ "Add", "Minus", "Multiply" ] ); + newInput(inl + 0, nodeValue_Enum_Scroll("Operation", self, 2 , [ "Add", "Minus", "Multiply" ] )); inputs[inl + 1] = nodeValue_Float("Value 1", self, 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 bc9f74ac3..c791fb845 100644 --- a/scripts/node_fn_smoothstep/node_fn_smoothstep.gml +++ b/scripts/node_fn_smoothstep/node_fn_smoothstep.gml @@ -5,7 +5,7 @@ function Node_Fn_SmoothStep(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) co inputs[inl + 0] = nodeValue_Float("Value", self, 0 ) .setVisible(true, true); - inputs[inl + 1] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Cubic poly", "Quadratic rat", "Cubic rat", "Cosine" ] ); + newInput(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_fn_wave_table/node_fn_wave_table.gml b/scripts/node_fn_wave_table/node_fn_wave_table.gml index f04d2616f..c2669da5a 100644 --- a/scripts/node_fn_wave_table/node_fn_wave_table.gml +++ b/scripts/node_fn_wave_table/node_fn_wave_table.gml @@ -4,7 +4,7 @@ function Node_Fn_WaveTable(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) con inputs[inl + 0] = nodeValue_Float("Pattern", self, 0 ) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 3, 0.01] }); - inputs[inl + 1] = nodeValue_Vec2("Range", self, [ 0, 1 ]); + newInput(inl + 1, nodeValue_Vec2("Range", self, [ 0, 1 ])); inputs[inl + 2] = nodeValue_Float("Frequency", self, 2 ) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 8, 0.01] }); diff --git a/scripts/node_fn_wiggler/node_fn_wiggler.gml b/scripts/node_fn_wiggler/node_fn_wiggler.gml index 0ebf31c4f..42a1bfbdc 100644 --- a/scripts/node_fn_wiggler/node_fn_wiggler.gml +++ b/scripts/node_fn_wiggler/node_fn_wiggler.gml @@ -1,7 +1,7 @@ function Node_Wiggler(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) constructor { name = "Wiggler"; - inputs[inl + 0] = nodeValue_Vec2("Range", self, [ 0, 1 ]); + newInput(inl + 0, nodeValue_Vec2("Range", self, [ 0, 1 ])); inputs[inl + 1] = nodeValue_Int("Frequency", self, 4 ) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] }); @@ -9,7 +9,7 @@ function Node_Wiggler(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) construc inputs[inl + 2] = nodeValue_Float("Seed", self, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[inl + 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[inl + 3] = nodeValue_Toggle("Clip", self, 0b11 , { data : [ "Start", "End" ] }); + newInput(inl + 3, nodeValue_Toggle("Clip", self, 0b11 , { data : [ "Start", "End" ] })); array_append(input_display_list, [ ["Wiggle", false], inl + 2, inl + 0, inl + 1, inl + 3, diff --git a/scripts/node_fold_noise/node_fold_noise.gml b/scripts/node_fold_noise/node_fold_noise.gml index c4c9c7714..47778e7ce 100644 --- a/scripts/node_fold_noise/node_fold_noise.gml +++ b/scripts/node_fold_noise/node_fold_noise.gml @@ -6,24 +6,24 @@ function Node_Fold_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[2] = nodeValue_Vec2("Scale", self, [ 2, 2 ]); + newInput(2, nodeValue_Vec2("Scale", self, [ 2, 2 ])); addShaderProp(SHADER_UNIFORM.float, "scale"); inputs[3] = nodeValue_Int("Iteration", self, 2) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 6, 0.1] }); addShaderProp(SHADER_UNIFORM.integer, "iteration"); - inputs[4] = nodeValue_Float("Stretch", self, 2); + newInput(4, nodeValue_Float("Stretch", self, 2)); addShaderProp(SHADER_UNIFORM.float, "stretch"); inputs[5] = nodeValue_Float("Amplitude", self, 1.3) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] }); addShaderProp(SHADER_UNIFORM.float, "amplitude"); - inputs[6] = nodeValue_Enum_Button("Mode", self, 0, [ "Greyscale", "Map" ]); + newInput(6, nodeValue_Enum_Button("Mode", self, 0, [ "Greyscale", "Map" ])); addShaderProp(SHADER_UNIFORM.integer, "mode"); - inputs[7] = nodeValue_Rotation("Rotation", self, 0); + newInput(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 57b472d65..07ccd8af0 100644 --- a/scripts/node_gabor_noise/node_gabor_noise.gml +++ b/scripts/node_gabor_noise/node_gabor_noise.gml @@ -24,7 +24,7 @@ function Node_Gabor_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y .setMappable(10); addShaderProp(SHADER_UNIFORM.float, "sharpness"); - inputs[6] = nodeValue_Vec2("Augment", self, [ 11, 31 ]); + newInput(6, nodeValue_Vec2("Augment", self, [ 11, 31 ])); addShaderProp(SHADER_UNIFORM.float, "augment"); inputs[7] = nodeValue_Rotation("Phase", self, 0) @@ -33,17 +33,17 @@ function Node_Gabor_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y ////////////////////////////////////////////////////////////////////////////////// - inputs[ 8] = nodeValueMap("Scale map", self); addShaderProp(); + newInput( 8, nodeValueMap("Scale map", self)); addShaderProp(); - inputs[ 9] = nodeValueMap("Density map", self); addShaderProp(); + newInput( 9, nodeValueMap("Density map", self)); addShaderProp(); - inputs[10] = nodeValueMap("Sharpness map", self); addShaderProp(); + newInput(10, nodeValueMap("Sharpness map", self)); addShaderProp(); - inputs[11] = nodeValueMap("Phase map", self); addShaderProp(); + newInput(11, nodeValueMap("Phase map", self)); addShaderProp(); ////////////////////////////////////////////////////////////////////////////////// - inputs[12] = nodeValue_Rotation("Rotation", self, 0); + newInput(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 d2865d377..b77359620 100644 --- a/scripts/node_gamma_map/node_gamma_map.gml +++ b/scripts/node_gamma_map/node_gamma_map.gml @@ -1,11 +1,11 @@ function Node_Gamma_Map(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Gamma Map"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Bool("Invert", self, false); + newInput(1, nodeValue_Bool("Invert", self, false)); - inputs[2] = nodeValue_Bool("Active", self, true); + newInput(2, nodeValue_Bool("Active", self, true)); active_index = 2; input_display_list = [ 2, 0, 1, ]; diff --git a/scripts/node_glow/node_glow.gml b/scripts/node_glow/node_glow.gml index 2236889a0..26b6f9521 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Float("Border", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 4, 0.1] }); @@ -12,23 +12,23 @@ function Node_Glow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[3] = nodeValue_Float("Strength", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ]}); - inputs[4] = nodeValue_Color("Color", self, c_white); + newInput(4, nodeValue_Color("Color", self, c_white)); - inputs[5] = nodeValue_Surface("Mask", self); + newInput(5, nodeValue_Surface("Mask", self)); inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Bool("Active", self, true); + newInput(7, nodeValue_Bool("Active", self, true)); active_index = 7; __init_mask_modifier(5); // inputs 8, 9, - inputs[10] = nodeValue_Enum_Button("Mode", self, 0, [ "Greyscale", "Alpha" ]); + newInput(10, nodeValue_Enum_Button("Mode", self, 0, [ "Greyscale", "Alpha" ])); - inputs[11] = nodeValue_Bool("Draw original", self, true); + newInput(11, nodeValue_Bool("Draw original", self, true)); - inputs[12] = nodeValue_Enum_Button("Side", self, 0, [ "Outer", "Inner" ]); + newInput(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 bcf3c991e..c4a7ecce2 100644 --- a/scripts/node_gradient/node_gradient.gml +++ b/scripts/node_gradient/node_gradient.gml @@ -1,7 +1,7 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Draw Gradient"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ])) .setMappable(15); @@ -23,9 +23,9 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[6] = nodeValue_Vec2("Center", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[7] = nodeValue_Enum_Button("Loop", self, 0, [ "None", "Loop", "Pingpong" ]); + newInput(7, nodeValue_Enum_Button("Loop", self, 0, [ "None", "Loop", "Pingpong" ])); - inputs[8] = nodeValue_Surface("Mask", self); + newInput(8, nodeValue_Surface("Mask", self)); inputs[9] = nodeValue_Float("Scale", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 2, 0.01] }) @@ -33,23 +33,23 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[10] = nodeValueMap("Angle map", self); + newInput(10, nodeValueMap("Angle map", self)); - inputs[11] = nodeValueMap("Radius map", self); + newInput(11, nodeValueMap("Radius map", self)); - inputs[12] = nodeValueMap("Shift map", self); + newInput(12, nodeValueMap("Shift map", self)); - inputs[13] = nodeValueMap("Scale map", self); + newInput(13, nodeValueMap("Scale map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[14] = nodeValue_Bool("Uniform ratio", self, true); + newInput(14, nodeValue_Bool("Uniform ratio", self, true)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[15] = nodeValueMap("Gradient map", self); + newInput(15, nodeValueMap("Gradient map", self)); - inputs[16] = nodeValueGradientRange("Gradient map range", self, inputs[1]); + newInput(16, nodeValueGradientRange("Gradient map range", self, inputs[1])); ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_gradient_out/node_gradient_out.gml b/scripts/node_gradient_out/node_gradient_out.gml index 14c7a9b72..cdd0b20c4 100644 --- a/scripts/node_gradient_out/node_gradient_out.gml +++ b/scripts/node_gradient_out/node_gradient_out.gml @@ -3,7 +3,7 @@ function Node_Gradient_Out(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro batch_output = false; setDimension(96); - inputs[0] = nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ])); + newInput(0, nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ]))); inputs[1] = nodeValue_Float("Sample", self, 0, "Position to sample a color from the gradient.") .setDisplay(VALUE_DISPLAY.slider) diff --git a/scripts/node_gradient_palette/node_gradient_palette.gml b/scripts/node_gradient_palette/node_gradient_palette.gml index a55569b64..fd16d7505 100644 --- a/scripts/node_gradient_palette/node_gradient_palette.gml +++ b/scripts/node_gradient_palette/node_gradient_palette.gml @@ -5,13 +5,13 @@ function Node_Gradient_Palette(_x, _y, _group = noone) : Node_Processor(_x, _y, inputs[0] = nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE)) .setVisible(true, true); - inputs[1] = nodeValue_Bool("Custom positions", self, false); + newInput(1, nodeValue_Bool("Custom positions", self, false)); inputs[2] = nodeValue_Float("Positions", self, [], "Array of number indicating color position (0 - 1).") .setVisible(true, true); inputs[2].array_depth = 1; - inputs[3] = nodeValue_Enum_Button("Interpolation", self, 1, [ "None", "RGB", "HSV", "OKLAB", "sRGB" ]); + newInput(3, nodeValue_Enum_Button("Interpolation", self, 1, [ "None", "RGB", "HSV", "OKLAB", "sRGB" ])); outputs[0] = nodeValue_Output("Gradient", self, 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 d26b541f2..a20e78cd5 100644 --- a/scripts/node_gradient_points/node_gradient_points.gml +++ b/scripts/node_gradient_points/node_gradient_points.gml @@ -1,27 +1,27 @@ function Node_Gradient_Points(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Draw 4 Points Gradient"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Vec2("Center 1", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[2] = nodeValue_Color("Color 1", self, c_white ); + newInput(2, nodeValue_Color("Color 1", self, c_white )); inputs[3] = nodeValue_Vec2("Center 2", self, [ DEF_SURF_W, 0 ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[4] = nodeValue_Color("Color 2", self, c_white ); + newInput(4, nodeValue_Color("Color 2", self, c_white )); inputs[5] = nodeValue_Vec2("Center 3", self, [ 0, DEF_SURF_H ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[6] = nodeValue_Color("Color 3", self, c_white ); + newInput(6, nodeValue_Color("Color 3", self, c_white )); inputs[7] = nodeValue_Vec2("Center 4", self, DEF_SURF , { useGlobal : false }) .setUnitRef(function(index) { return getDimension(index); }); - inputs[8] = nodeValue_Color("Color 4", self, c_white ); + newInput(8, nodeValue_Color("Color 4", self, c_white )); - inputs[9] = nodeValue_Bool("Use palette", self, false ); + newInput(9, nodeValue_Bool("Use palette", self, false )); - inputs[10] = nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE)); + newInput(10, nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE))); inputs[11] = nodeValue_Float("Falloff 1", self, 6 ) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 0.1 ] }); diff --git a/scripts/node_gradient_replace_color/node_gradient_replace_color.gml b/scripts/node_gradient_replace_color/node_gradient_replace_color.gml index 34bc22743..21a124620 100644 --- a/scripts/node_gradient_replace_color/node_gradient_replace_color.gml +++ b/scripts/node_gradient_replace_color/node_gradient_replace_color.gml @@ -5,9 +5,9 @@ function Node_Gradient_Replace_Color(_x, _y, _group = noone) : Node_Processor(_x inputs[0] = nodeValue_Gradient("Gradient", self, new gradientObject(cola(c_white))) .setVisible(true, true); - inputs[1] = nodeValue_Palette("Color from", self, array_clone(DEF_PALETTE)); + newInput(1, nodeValue_Palette("Color from", self, array_clone(DEF_PALETTE))); - inputs[2] = nodeValue_Palette("Color to", self, array_clone(DEF_PALETTE)); + newInput(2, nodeValue_Palette("Color to", self, array_clone(DEF_PALETTE))); inputs[3] = nodeValue_Float("Threshold", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_grain/node_grain.gml b/scripts/node_grain/node_grain.gml index 8e4a09114..838e8d083 100644 --- a/scripts/node_grain/node_grain.gml +++ b/scripts/node_grain/node_grain.gml @@ -1,17 +1,17 @@ function Node_Grain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Grain"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Surface("Mask", self); + newInput(1, nodeValue_Surface("Mask", self)); inputs[2] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[3] = nodeValue_Bool("Active", self, true); + newInput(3, nodeValue_Bool("Active", self, true)); active_index = 3; - inputs[4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(4, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(1); // inputs 5, 6 @@ -19,7 +19,7 @@ function Node_Grain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con .setDisplay(VALUE_DISPLAY.slider) .setMappable(8); - inputs[8] = nodeValueMap("Brightness map", self); + newInput(8, nodeValueMap("Brightness map", self)); inputs[9] = nodeValue_Float("Seed", self, 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) }); @@ -30,19 +30,19 @@ function Node_Grain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con .setDisplay(VALUE_DISPLAY.slider) .setMappable(11); - inputs[11] = nodeValueMap("Red map", self); + newInput(11, nodeValueMap("Red map", self)); inputs[12] = nodeValue_Float("Green", self, 0) .setDisplay(VALUE_DISPLAY.slider) .setMappable(13); - inputs[13] = nodeValueMap("Green map", self); + newInput(13, nodeValueMap("Green map", self)); inputs[14] = nodeValue_Float("Blue", self, 0) .setDisplay(VALUE_DISPLAY.slider) .setMappable(15); - inputs[15] = nodeValueMap("Blue map", self); + newInput(15, nodeValueMap("Blue map", self)); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -50,19 +50,19 @@ function Node_Grain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con .setDisplay(VALUE_DISPLAY.slider) .setMappable(17); - inputs[17] = nodeValueMap("Hue map", self); + newInput(17, nodeValueMap("Hue map", self)); inputs[18] = nodeValue_Float("Saturation", self, 0) .setDisplay(VALUE_DISPLAY.slider) .setMappable(19); - inputs[19] = nodeValueMap("Saturation map", self); + newInput(19, nodeValueMap("Saturation map", self)); inputs[20] = nodeValue_Float("Value", self, 0) .setDisplay(VALUE_DISPLAY.slider) .setMappable(21); - inputs[21] = nodeValueMap("Value map", self); + newInput(21, nodeValueMap("Value map", self)); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_grey_alpha/node_grey_alpha.gml b/scripts/node_grey_alpha/node_grey_alpha.gml index f7ac269e5..aa24d698b 100644 --- a/scripts/node_grey_alpha/node_grey_alpha.gml +++ b/scripts/node_grey_alpha/node_grey_alpha.gml @@ -1,13 +1,13 @@ function Node_Grey_Alpha(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Grey to Alpha"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Bool("Replace color", self, true, "Replace output with solid color."); + newInput(1, nodeValue_Bool("Replace color", self, true, "Replace output with solid color.")); - inputs[2] = nodeValue_Color("Color", self, c_white); + newInput(2, nodeValue_Color("Color", self, c_white)); - inputs[3] = nodeValue_Bool("Active", self, true); + newInput(3, nodeValue_Bool("Active", self, true)); active_index = 3; outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_greyscale/node_greyscale.gml b/scripts/node_greyscale/node_greyscale.gml index 5dd10186c..16e73abb3 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Float("Brightness", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01] }) @@ -11,15 +11,15 @@ 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_Surface("Mask", self); + newInput(3, nodeValue_Surface("Mask", self)); inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_Bool("Active", self, true); + newInput(5, nodeValue_Bool("Active", self, true)); active_index = 5; - inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(6, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(3); // inputs 7, 8 diff --git a/scripts/node_grid/node_grid.gml b/scripts/node_grid/node_grid.gml index 38d628130..0509ee595 100644 --- a/scripts/node_grid/node_grid.gml +++ b/scripts/node_grid/node_grid.gml @@ -1,7 +1,7 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Grid"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); @@ -19,56 +19,56 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) .setMappable(20); - inputs[6] = nodeValue_Color("Gap color", self, c_black); + newInput(6, nodeValue_Color("Gap color", self, c_black)); - inputs[7] = nodeValue_Surface("Texture", self); + newInput(7, nodeValue_Surface("Texture", self)); inputs[8] = nodeValue_Float("Shift", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-0.5, 0.5, 0.01] }) .setMappable(16); - inputs[9] = nodeValue_Enum_Button("Shift axis", self, 0, ["X", "Y"]); + newInput(9, nodeValue_Enum_Button("Shift axis", self, 0, ["X", "Y"])); - inputs[10] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Colored tile (Accurate)", "Height map", "Texture grid", "Texture sample"]); + newInput(10, nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Colored tile (Accurate)", "Height map", "Texture grid", "Texture sample"])); inputs[11] = nodeValue_Float("Seed", self, 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) }); - inputs[12] = nodeValue_Bool("Anti aliasing", self, false); + newInput(12, nodeValue_Bool("Anti aliasing", self, false)); - inputs[13] = nodeValueMap("Scale map", self); + newInput(13, nodeValueMap("Scale map", self)); - inputs[14] = nodeValueMap("Gap map", self); + newInput(14, nodeValueMap("Gap map", self)); - inputs[15] = nodeValueMap("Angle map", self); + newInput(15, nodeValueMap("Angle map", self)); - inputs[16] = nodeValueMap("Shift map", self); + newInput(16, nodeValueMap("Shift map", self)); - inputs[17] = nodeValue_Bool("Truchet", self, false); + newInput(17, nodeValue_Bool("Truchet", self, false)); - inputs[18] = nodeValue_Int("Truchet seed", self, seed_random()); + newInput(18, nodeValue_Int("Truchet seed", self, seed_random())); inputs[19] = nodeValue_Float("Flip horizontal", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[20] = nodeValueMap("Gradient map", self); + newInput(20, nodeValueMap("Gradient map", self)); - inputs[21] = nodeValueGradientRange("Gradient map range", self, inputs[5]); + newInput(21, nodeValueGradientRange("Gradient map range", self, inputs[5])); inputs[22] = nodeValue_Float("Flip vertical", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[23] = nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ]); + newInput(23, nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ])); - inputs[24] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); + newInput(24, nodeValue_Slider_Range("Level", self, [ 0, 1 ])); - inputs[25] = nodeValue_Bool("Use Texture Dimension", self, true); + newInput(25, nodeValue_Bool("Use Texture Dimension", self, true)); - inputs[26] = nodeValue_Float("Gap Width", self, 1); + newInput(26, nodeValue_Float("Gap Width", self, 1)); - inputs[27] = nodeValue_Bool("Diagonal", self, false); + newInput(27, nodeValue_Bool("Diagonal", self, false)); - inputs[28] = nodeValue_Bool("Uniform height", self, true); + newInput(28, nodeValue_Bool("Uniform height", self, true)); input_display_list = [ ["Output", false], 0, diff --git a/scripts/node_grid_hex/node_grid_hex.gml b/scripts/node_grid_hex/node_grid_hex.gml index c3f13beb9..249db4767 100644 --- a/scripts/node_grid_hex/node_grid_hex.gml +++ b/scripts/node_grid_hex/node_grid_hex.gml @@ -1,7 +1,7 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Hexagonal Grid"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); @@ -19,47 +19,47 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) .setMappable(17); - inputs[6] = nodeValue_Color("Gap color", self, c_black); + newInput(6, nodeValue_Color("Gap color", self, c_black)); - inputs[7] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid", "Texture sample"]); + newInput(7, nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid", "Texture sample"])); inputs[8] = nodeValue_Float("Seed", self, 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_Surface("Texture", self); + newInput(9, nodeValue_Surface("Texture", self)); - inputs[10] = nodeValue_Bool("Anti aliasing", self, false); + newInput(10, nodeValue_Bool("Anti aliasing", self, false)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[11] = nodeValueMap("Scale map", self); + newInput(11, nodeValueMap("Scale map", self)); - inputs[12] = nodeValueMap("Angle map", self); + newInput(12, nodeValueMap("Angle map", self)); - inputs[13] = nodeValueMap("Gap map", self); + newInput(13, nodeValueMap("Gap map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[14] = nodeValue_Bool("Truchet", self, false); + newInput(14, nodeValue_Bool("Truchet", self, false)); - inputs[15] = nodeValue_Int("Truchet seed", self, seed_random()); + newInput(15, nodeValue_Int("Truchet seed", self, seed_random())); inputs[16] = nodeValue_Float("Truchet threshold", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[17] = nodeValueMap("Gradient map", self); + newInput(17, nodeValueMap("Gradient map", self)); - inputs[18] = nodeValueGradientRange("Gradient map range", self, inputs[5]); + newInput(18, nodeValueGradientRange("Gradient map range", self, inputs[5])); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[19] = nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ]); + newInput(19, nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ])); - inputs[20] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); + newInput(20, nodeValue_Slider_Range("Level", self, [ 0, 1 ])); - inputs[21] = nodeValue_Bool("Use Texture Dimension", self, true); + newInput(21, nodeValue_Bool("Use Texture Dimension", self, true)); input_display_list = [ ["Output", false], 0, diff --git a/scripts/node_grid_noise/node_grid_noise.gml b/scripts/node_grid_noise/node_grid_noise.gml index cf1eb7afb..d6511f541 100644 --- a/scripts/node_grid_noise/node_grid_noise.gml +++ b/scripts/node_grid_noise/node_grid_noise.gml @@ -1,12 +1,12 @@ function Node_Grid_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Grid Noise"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[2] = nodeValue_Vec2("Scale", self, [ 8, 8 ]); + newInput(2, nodeValue_Vec2("Scale", self, [ 8, 8 ])); inputs[3] = nodeValue_Float("Seed", self, 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) }); @@ -14,17 +14,17 @@ function Node_Grid_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[4] = nodeValue_Float("Shift", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-0.5, 0.5, 0.01] }); - inputs[5] = nodeValue_Surface("Texture sample", self); + newInput(5, nodeValue_Surface("Texture sample", self)); - inputs[6] = nodeValue_Enum_Button("Shift axis", self, 0, ["x", "y"]); + newInput(6, nodeValue_Enum_Button("Shift axis", self, 0, ["x", "y"])); - inputs[7] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); + newInput(7, nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ])); - inputs[8] = nodeValue_Slider_Range("Color R range", self, [ 0, 1 ]); + newInput(8, nodeValue_Slider_Range("Color R range", self, [ 0, 1 ])); - inputs[9] = nodeValue_Slider_Range("Color G range", self, [ 0, 1 ]); + newInput(9, nodeValue_Slider_Range("Color G range", self, [ 0, 1 ])); - inputs[10] = nodeValue_Slider_Range("Color B range", self, [ 0, 1 ]); + newInput(10, nodeValue_Slider_Range("Color B range", self, [ 0, 1 ])); input_display_list = [ ["Output", false], 0, diff --git a/scripts/node_grid_pentagonal/node_grid_pentagonal.gml b/scripts/node_grid_pentagonal/node_grid_pentagonal.gml index d2becd15b..be2c51a3b 100644 --- a/scripts/node_grid_pentagonal/node_grid_pentagonal.gml +++ b/scripts/node_grid_pentagonal/node_grid_pentagonal.gml @@ -1,7 +1,7 @@ function Node_Grid_Pentagonal(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Pentagonal Grid"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); @@ -19,34 +19,34 @@ function Node_Grid_Pentagonal(_x, _y, _group = noone) : Node_Processor(_x, _y, _ inputs[5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) .setMappable(14); - inputs[6] = nodeValue_Color("Gap color", self, c_black); + newInput(6, nodeValue_Color("Gap color", self, c_black)); - inputs[7] = nodeValue_Surface("Texture", self); + newInput(7, nodeValue_Surface("Texture", self)); - inputs[8] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]); + newInput(8, nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"])); inputs[9] = nodeValue_Float("Seed", self, 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) }); - inputs[10] = nodeValue_Bool("Anti aliasing", self, false); + newInput(10, nodeValue_Bool("Anti aliasing", self, false)); ///////////////////////////////////////////////////////////////////// - inputs[11] = nodeValueMap("Scale map", self); + newInput(11, nodeValueMap("Scale map", self)); - inputs[12] = nodeValueMap("Gap map", self); + newInput(12, nodeValueMap("Gap map", self)); - inputs[13] = nodeValueMap("Angle map", self); + newInput(13, nodeValueMap("Angle map", self)); - inputs[14] = nodeValueMap("Gradient map", self); + newInput(14, nodeValueMap("Gradient map", self)); - inputs[15] = nodeValueGradientRange("Gradient map range", self, inputs[5]); + newInput(15, nodeValueGradientRange("Gradient map range", self, inputs[5])); ///////////////////////////////////////////////////////////////////// - inputs[16] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); + newInput(16, nodeValue_Slider_Range("Level", self, [ 0, 1 ])); - inputs[17] = nodeValue_Bool("Use Texture Dimension", self, true); + newInput(17, nodeValue_Bool("Use Texture Dimension", self, true)); input_display_list = [ ["Output", false], 0, diff --git a/scripts/node_grid_tri/node_grid_tri.gml b/scripts/node_grid_tri/node_grid_tri.gml index 03ab287a2..ac88604fa 100644 --- a/scripts/node_grid_tri/node_grid_tri.gml +++ b/scripts/node_grid_tri/node_grid_tri.gml @@ -1,7 +1,7 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Triangle Grid"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); @@ -19,47 +19,47 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) .setMappable(17); - inputs[6] = nodeValue_Color("Gap color", self, c_black); + newInput(6, nodeValue_Color("Gap color", self, c_black)); - inputs[7] = nodeValue_Surface("Texture", self); + newInput(7, nodeValue_Surface("Texture", self)); - inputs[8] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid", "Texture sample"]); + newInput(8, nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid", "Texture sample"])); inputs[9] = nodeValue_Float("Seed", self, 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) }); - inputs[10] = nodeValue_Bool("Anti aliasing", self, false); + newInput(10, nodeValue_Bool("Anti aliasing", self, false)); ////////////////////////////////////////////////////////////////////////////////// - inputs[11] = nodeValueMap("Scale map", self); + newInput(11, nodeValueMap("Scale map", self)); - inputs[12] = nodeValueMap("Gap map", self); + newInput(12, nodeValueMap("Gap map", self)); - inputs[13] = nodeValueMap("Angle map", self); + newInput(13, nodeValueMap("Angle map", self)); ////////////////////////////////////////////////////////////////////////////////// - inputs[14] = nodeValue_Bool("Truchet", self, false); + newInput(14, nodeValue_Bool("Truchet", self, false)); - inputs[15] = nodeValue_Int("Truchet seed", self, seed_random()); + newInput(15, nodeValue_Int("Truchet seed", self, seed_random())); inputs[16] = nodeValue_Float("Truchet threshold", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[17] = nodeValueMap("Gradient map", self); + newInput(17, nodeValueMap("Gradient map", self)); - inputs[18] = nodeValueGradientRange("Gradient map range", self, inputs[5]); + newInput(18, nodeValueGradientRange("Gradient map range", self, inputs[5])); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[19] = nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ]); + newInput(19, nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ])); - inputs[20] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); + newInput(20, nodeValue_Slider_Range("Level", self, [ 0, 1 ])); - inputs[21] = nodeValue_Bool("Use Texture Dimension", self, true); + newInput(21, nodeValue_Bool("Use Texture Dimension", self, true)); input_display_list = [ ["Output", false], 0, diff --git a/scripts/node_group_input/node_group_input.gml b/scripts/node_group_input/node_group_input.gml index 016a180ab..5279bd112 100644 --- a/scripts/node_group_input/node_group_input.gml +++ b/scripts/node_group_input/node_group_input.gml @@ -78,12 +78,12 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru skipDefault(); setDimension(96, 32 + 24); - inputs[0] = nodeValue_Enum_Scroll("Display type", self, 0, { data: GROUP_IO_DISPLAY[11], update_hover: false }); + newInput(0, nodeValue_Enum_Scroll("Display type", self, 0, { data: GROUP_IO_DISPLAY[11], update_hover: false })); inputs[1] = nodeValue_Range("Range", self, [ 0, 1 ]) .setVisible(false); - inputs[2] = nodeValue_Enum_Scroll("Input type", self, 11, { data: GROUP_IO_TYPE_NAME, update_hover: false }); + newInput(2, nodeValue_Enum_Scroll("Input type", self, 11, { data: GROUP_IO_TYPE_NAME, update_hover: false })); inputs[3] = nodeValue_Text("Enum label", self, "") .setVisible(false); @@ -91,9 +91,9 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[4] = nodeValue_Enum_Button("Vector size", self, 0, [ "2", "3", "4" ]) .setVisible(false); - inputs[5] = nodeValue_Int("Order", self, 0); + newInput(5, nodeValue_Int("Order", self, 0)); - inputs[6] = nodeValue_Bool("Display preview gizmo", self, true); + newInput(6, nodeValue_Bool("Display preview gizmo", self, true)); inputs[7] = nodeValue_Float("Step", self, 0.01) .setVisible(false); @@ -108,9 +108,9 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru /* 6 */ new scrollItem("Lesser", s_node_condition_type, 2), /* 7 */ new scrollItem("Lesser or equal", s_node_condition_type, 3), ]); - inputs[10] = nodeValue_Float("Visible Check", self, 0); + newInput(10, nodeValue_Float("Visible Check", self, 0)); - inputs[11] = nodeValue_Float("Visible Check To", self, 0); + newInput(11, nodeValue_Float("Visible Check To", self, 0)); inputs[10].setFrom_condition = function(_valueFrom) { if(is_instanceof(_valueFrom.node, Node_Group_Input)) return true; diff --git a/scripts/node_herringbone_tile/node_herringbone_tile.gml b/scripts/node_herringbone_tile/node_herringbone_tile.gml index dc9c41fa9..f71adaed4 100644 --- a/scripts/node_herringbone_tile/node_herringbone_tile.gml +++ b/scripts/node_herringbone_tile/node_herringbone_tile.gml @@ -1,7 +1,7 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Herringbone Tile"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); @@ -19,47 +19,47 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, inputs[5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) .setMappable(18); - inputs[6] = nodeValue_Color("Gap color", self, c_black); + newInput(6, nodeValue_Color("Gap color", self, c_black)); - inputs[7] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]); + newInput(7, nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"])); inputs[8] = nodeValue_Float("Seed", self, 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_Surface("Texture", self); + newInput(9, nodeValue_Surface("Texture", self)); - inputs[10] = nodeValue_Bool("Anti aliasing", self, false); + newInput(10, nodeValue_Bool("Anti aliasing", self, false)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[11] = nodeValueMap("Scale map", self); + newInput(11, nodeValueMap("Scale map", self)); - inputs[12] = nodeValueMap("Angle map", self); + newInput(12, nodeValueMap("Angle map", self)); - inputs[13] = nodeValueMap("Gap map", self); + newInput(13, nodeValueMap("Gap map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[14] = nodeValue_Bool("Truchet", self, false); + newInput(14, nodeValue_Bool("Truchet", self, false)); - inputs[15] = nodeValue_Int("Truchet seed", self, seed_random()); + newInput(15, nodeValue_Int("Truchet seed", self, seed_random())); inputs[16] = nodeValue_Float("Truchet threshold", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) - inputs[17] = nodeValue_Float("Tile length", self, 2); + newInput(17, nodeValue_Float("Tile length", self, 2)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[18] = nodeValueMap("Gradient map", self); + newInput(18, nodeValueMap("Gradient map", self)); - inputs[19] = nodeValueGradientRange("Gradient map range", self, inputs[5]); + newInput(19, nodeValueGradientRange("Gradient map range", self, inputs[5])); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[20] = nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ]); + newInput(20, nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ])); - inputs[21] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); + newInput(21, nodeValue_Slider_Range("Level", self, [ 0, 1 ])); input_display_list = [ ["Output", false], 0, diff --git a/scripts/node_hlsl/node_hlsl.gml b/scripts/node_hlsl/node_hlsl.gml index e0f354157..bfab99306 100644 --- a/scripts/node_hlsl/node_hlsl.gml +++ b/scripts/node_hlsl/node_hlsl.gml @@ -30,15 +30,15 @@ output.color = surfaceColor;") .setDisplay(VALUE_DISPLAY.codeHLSL) .rejectArray(); - inputs[2] = nodeValue_Surface("Base Texture", self); + newInput(2, nodeValue_Surface("Base Texture", self)); outputs[0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone ); static createNewInput = function() { var index = array_length(inputs); - inputs[index + 0] = nodeValue_Text("Argument name", self, "" ); + newInput(index + 0, nodeValue_Text("Argument name", self, "" )); - inputs[index + 1] = nodeValue_Enum_Scroll("Argument type", self, 0 , { data: [ "Float", "Int", "Vec2", "Vec3", "Vec4", "Mat3", "Mat4", "Sampler2D", "Color" ], update_hover: false }); + newInput(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 90360bf15..a42030636 100644 --- a/scripts/node_honey_noise/node_honey_noise.gml +++ b/scripts/node_honey_noise/node_honey_noise.gml @@ -6,20 +6,20 @@ function Node_Honeycomb_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[2] = nodeValue_Vec2("Scale", self, [ 2, 2 ]); + newInput(2, nodeValue_Vec2("Scale", self, [ 2, 2 ])); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[3] = nodeValue_Rotation("Rotation", self, 0); + newInput(3, nodeValue_Rotation("Rotation", self, 0)); addShaderProp(SHADER_UNIFORM.float, "rotation"); - inputs[4] = nodeValue_Enum_Button("Mode", self, 0, [ "Hexagon", "Star" ]); + newInput(4, nodeValue_Enum_Button("Mode", self, 0, [ "Hexagon", "Star" ])); addShaderProp(SHADER_UNIFORM.integer, "mode"); inputs[5] = nodeValue_Float("Seed", self, 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) }) addShaderProp(SHADER_UNIFORM.float, "seed"); - inputs[6] = nodeValue_Int("Iteration", self, 1); + newInput(6, nodeValue_Int("Iteration", self, 1)); addShaderProp(SHADER_UNIFORM.integer, "iteration"); input_display_list = [ 5, diff --git a/scripts/node_hsv_channel/node_hsv_channel.gml b/scripts/node_hsv_channel/node_hsv_channel.gml index 1e8e36e4a..fd7abbb37 100644 --- a/scripts/node_hsv_channel/node_hsv_channel.gml +++ b/scripts/node_hsv_channel/node_hsv_channel.gml @@ -2,9 +2,9 @@ function Node_HSV_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou name = "HSV Extract"; batch_output = false; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Bool("Output Array", self, false); + newInput(1, nodeValue_Bool("Output Array", self, false)); outputs[0] = nodeValue_Output("Hue", self, VALUE_TYPE.surface, noone); outputs[1] = nodeValue_Output("Saturation", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_http_request/node_http_request.gml b/scripts/node_http_request/node_http_request.gml index d2a07493a..d3e0305ce 100644 --- a/scripts/node_http_request/node_http_request.gml +++ b/scripts/node_http_request/node_http_request.gml @@ -2,9 +2,9 @@ function Node_HTTP_request(_x, _y, _group = noone) : Node(_x, _y, _group) constr name = "HTTP"; setDimension(96, 72); - inputs[0] = nodeValue_Text("Address", self, ""); + newInput(0, nodeValue_Text("Address", self, "")); - inputs[1] = nodeValue_Enum_Scroll("Type", self, 0, [ "Get", "Post" ]); + newInput(1, nodeValue_Enum_Scroll("Type", self, 0, [ "Get", "Post" ])); inputs[2] = nodeValue_Text("Content", self, "") diff --git a/scripts/node_image/node_image.gml b/scripts/node_image/node_image.gml index 236f7434a..082a7d6ea 100644 --- a/scripts/node_image/node_image.gml +++ b/scripts/node_image/node_image.gml @@ -29,7 +29,7 @@ function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { inputs[0] = nodeValue_Path("Path", self, "") .setDisplay(VALUE_DISPLAY.path_load, { filter: "image|*.png;*.jpg" }); - inputs[1] = nodeValue_Padding("Padding", self, [0, 0, 0, 0]); + newInput(1, nodeValue_Padding("Padding", self, [0, 0, 0, 0])); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); outputs[1] = nodeValue_Output("Path", self, VALUE_TYPE.path, "") diff --git a/scripts/node_image_animated/node_image_animated.gml b/scripts/node_image_animated/node_image_animated.gml index 852d5f6af..4752fef0f 100644 --- a/scripts/node_image_animated/node_image_animated.gml +++ b/scripts/node_image_animated/node_image_animated.gml @@ -59,9 +59,9 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons TOTAL_FRAMES = array_length(spr); } }); - inputs[6] = nodeValue_Bool("Custom frame order", self, false); + newInput(6, nodeValue_Bool("Custom frame order", self, false)); - inputs[7] = nodeValue_Int("Frame", self, 0); + newInput(7, nodeValue_Int("Frame", self, 0)); inputs[8] = nodeValue_Enum_Scroll("Canvas size", self, 2, [ "First", "Minimum", "Maximum" ]) .rejectArray(); diff --git a/scripts/node_image_gif/node_image_gif.gml b/scripts/node_image_gif/node_image_gif.gml index 531160089..35a9c9660 100644 --- a/scripts/node_image_gif/node_image_gif.gml +++ b/scripts/node_image_gif/node_image_gif.gml @@ -40,18 +40,18 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct PROJECT.animator.framerate = 12; } }); - inputs[2] = nodeValue_Bool("Output as array", self, false); + newInput(2, nodeValue_Bool("Output as array", self, false)); inputs[3] = nodeValue_Enum_Scroll("Loop modes", self, 0, ["Loop", "Ping pong", "Hold last frame", "Hide"]) .rejectArray(); - inputs[4] = nodeValue_Int("Start frame", self, 0); + newInput(4, nodeValue_Int("Start frame", self, 0)); - inputs[5] = nodeValue_Bool("Custom frame order", self, false); + newInput(5, nodeValue_Bool("Custom frame order", self, false)); - inputs[6] = nodeValue_Int("Frame", self, 0); + newInput(6, nodeValue_Int("Frame", self, 0)); - inputs[7] = nodeValue_Float("Animation speed", self, 1); + newInput(7, nodeValue_Float("Animation speed", self, 1)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); outputs[1] = nodeValue_Output("Path", self, VALUE_TYPE.path, "") diff --git a/scripts/node_image_sheet/node_image_sheet.gml b/scripts/node_image_sheet/node_image_sheet.gml index a8f409408..4780a5600 100644 --- a/scripts/node_image_sheet/node_image_sheet.gml +++ b/scripts/node_image_sheet/node_image_sheet.gml @@ -1,22 +1,22 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Splice Spritesheet"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Vec2("Sprite size", self, [ 32, 32 ]); + newInput(1, nodeValue_Vec2("Sprite size", self, [ 32, 32 ])); - inputs[2] = nodeValue_Int("Row", self, 1); //unused - inputs[3] = nodeValue_Vec2("Amount", self, [ 1, 1 ]); + newInput(2, nodeValue_Int("Row", self, 1)); //unused + newInput(3, nodeValue_Vec2("Amount", self, [ 1, 1 ])); - inputs[4] = nodeValue_Vec2("Offset", self, [ 0, 0 ]); + newInput(4, nodeValue_Vec2("Offset", self, [ 0, 0 ])); - inputs[5] = nodeValue_Vec2("Spacing", self, [ 0, 0 ]); + newInput(5, nodeValue_Vec2("Spacing", self, [ 0, 0 ])); - inputs[6] = nodeValue_Padding("Padding", self, [0, 0, 0, 0]); + newInput(6, nodeValue_Padding("Padding", self, [0, 0, 0, 0])); - inputs[7] = nodeValue_Enum_Scroll("Output", self, 1, [ "Animation", "Array" ]); + newInput(7, nodeValue_Enum_Scroll("Output", self, 1, [ "Animation", "Array" ])); - inputs[8] = nodeValue_Float("Animation speed", self, 1); + newInput(8, nodeValue_Float("Animation speed", self, 1)); inputs[9] = nodeValue_Enum_Scroll("Main Axis", self, 0, [ new scrollItem("Horizontal", s_node_alignment, 0), new scrollItem("Vertical", s_node_alignment, 1), ]); @@ -50,9 +50,9 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru TOTAL_FRAMES = max(1, _spd == 0? 1 : ceil(array_length(_atl) / _spd)); } }); - inputs[12] = nodeValue_Bool("Filter empty output", self, false); + newInput(12, nodeValue_Bool("Filter empty output", self, false)); - inputs[13] = nodeValue_Enum_Scroll("Filtered Pixel", self, 0, [ "Transparent", "Color" ]); + newInput(13, nodeValue_Enum_Scroll("Filtered Pixel", self, 0, [ "Transparent", "Color" ])); inputs[14] = nodeValue_Color("Filtered Color", self, c_black) diff --git a/scripts/node_interlaced/node_interlaced.gml b/scripts/node_interlaced/node_interlaced.gml index 6172b7c9d..971438abe 100644 --- a/scripts/node_interlaced/node_interlaced.gml +++ b/scripts/node_interlaced/node_interlaced.gml @@ -1,25 +1,25 @@ function Node_Interlaced(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Interlace"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Bool("Active", self, true); + newInput(1, nodeValue_Bool("Active", self, true)); active_index = 1; - inputs[2] = nodeValue_Surface("Mask", self); + newInput(2, nodeValue_Surface("Mask", self)); inputs[3] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(4, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(2); // inputs 5, 6 - inputs[7] = nodeValue_Enum_Button("Axis", self, 0, [ "X", "Y" ]); + newInput(7, nodeValue_Enum_Button("Axis", self, 0, [ "X", "Y" ])); - inputs[8] = nodeValue_Float("Size", self, 1); + newInput(8, nodeValue_Float("Size", self, 1)); - inputs[9] = nodeValue_Bool("Invert", self, false); + newInput(9, nodeValue_Bool("Invert", self, false)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_interpret_number/node_interpret_number.gml b/scripts/node_interpret_number/node_interpret_number.gml index 23aae0d64..308c25886 100644 --- a/scripts/node_interpret_number/node_interpret_number.gml +++ b/scripts/node_interpret_number/node_interpret_number.gml @@ -6,18 +6,18 @@ function Node_Interpret_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, .setVisible(true, true) .setArrayDepth(1); - inputs[1] = nodeValue_Enum_Button("Mode", self, 0, [ "Greyscale", "Gradient" ]); + newInput(1, nodeValue_Enum_Button("Mode", self, 0, [ "Greyscale", "Gradient" ])); - inputs[2] = nodeValue_Range("Range", self, [ 0, 1 ] ); + newInput(2, nodeValue_Range("Range", self, [ 0, 1 ] )); inputs[3] = nodeValue_Gradient("Gradient", self, new gradientObject(cola(c_white))) .setMappable(4); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[4] = nodeValueMap("Gradient map", self); + newInput(4, nodeValueMap("Gradient map", self)); - inputs[5] = nodeValueGradientRange("Gradient map range", self, inputs[3]); + newInput(5, nodeValueGradientRange("Gradient map range", self, inputs[3])); ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_invert/node_invert.gml b/scripts/node_invert/node_invert.gml index bdf099249..c4be5ecdd 100644 --- a/scripts/node_invert/node_invert.gml +++ b/scripts/node_invert/node_invert.gml @@ -1,21 +1,21 @@ function Node_Invert(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Invert"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Surface("Mask", self); + newInput(1, nodeValue_Surface("Mask", self)); inputs[2] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[3] = nodeValue_Bool("Active", self, true); + newInput(3, nodeValue_Bool("Active", self, true)); active_index = 3; - inputs[4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(4, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(1); // inputs 5, 6 - inputs[7] = nodeValue_Bool("Include Alpha", self, false); + newInput(7, nodeValue_Bool("Include Alpha", self, false)); input_display_list = [ 3, 4, 7, ["Surfaces", true], 0, 1, 2, 5, 6, diff --git a/scripts/node_isosurf/node_isosurf.gml b/scripts/node_isosurf/node_isosurf.gml index db75309d5..acdd610c0 100644 --- a/scripts/node_isosurf/node_isosurf.gml +++ b/scripts/node_isosurf/node_isosurf.gml @@ -8,7 +8,7 @@ function Node_IsoSurf(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c .setVisible(true, true) .setArrayDepth(1); - inputs[2] = nodeValue_Rotation("Angle Shift", self, 0); + newInput(2, nodeValue_Rotation("Angle Shift", self, 0)); inputs[3] = nodeValue_Float("Angle Split", self, [ 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 ac6a107c2..efa1a64f9 100644 --- a/scripts/node_jpeg/node_jpeg.gml +++ b/scripts/node_jpeg/node_jpeg.gml @@ -1,31 +1,31 @@ function Node_JPEG(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "JPEG"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Bool("Active", self, true); + newInput(1, nodeValue_Bool("Active", self, true)); active_index = 1; inputs[2] = nodeValue_Int("Patch Size", self, 8) .setValidator(VV_min(1)); - inputs[3] = nodeValue_Float("Compression", self, 10); + newInput(3, nodeValue_Float("Compression", self, 10)); inputs[4] = nodeValue_Int("Reconstruction", self, 8) .setValidator(VV_min(0)); - inputs[5] = nodeValue_Surface("Mask", self); + newInput(5, nodeValue_Surface("Mask", self)); inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(7, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(5); // inputs 8, 9 - inputs[10] = nodeValue_Enum_Scroll("Transformation", self, 0, [ "Cosine", "Zigzag", "Smooth Zigzag", "Step" ]); + newInput(10, nodeValue_Enum_Scroll("Transformation", self, 0, [ "Cosine", "Zigzag", "Smooth Zigzag", "Step" ])); - inputs[11] = nodeValue_Rotation("Phase", self, 0); + newInput(11, nodeValue_Rotation("Phase", self, 0)); inputs[12] = nodeValue_Bool("Deconstruct Only", self, false) diff --git a/scripts/node_kuwahara/node_kuwahara.gml b/scripts/node_kuwahara/node_kuwahara.gml index e4442d4a0..81c7484b7 100644 --- a/scripts/node_kuwahara/node_kuwahara.gml +++ b/scripts/node_kuwahara/node_kuwahara.gml @@ -1,23 +1,23 @@ function Node_Kuwahara(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Kuwahara"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Bool("Active", self, true); + newInput(1, nodeValue_Bool("Active", self, true)); active_index = 1; inputs[2] = nodeValue_Int("Radius", self, 2) .setValidator(VV_min(1)); - inputs[3] = nodeValue_Surface("Mask", self); + newInput(3, nodeValue_Surface("Mask", self)); inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_Bool("Active", self, true); + newInput(5, nodeValue_Bool("Active", self, true)); active_index = 5; - inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(6, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(3); // inputs 7, 8 diff --git a/scripts/node_lerp/node_lerp.gml b/scripts/node_lerp/node_lerp.gml index ee161b5ef..50299d7a4 100644 --- a/scripts/node_lerp/node_lerp.gml +++ b/scripts/node_lerp/node_lerp.gml @@ -4,9 +4,9 @@ function Node_Lerp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons setDimension(96, 48); - inputs[0] = nodeValue_Float("a", self, 0); - inputs[1] = nodeValue_Float("b", self, 0); - inputs[2] = nodeValue_Slider_Range("Progress", self, 0); + newInput(0, nodeValue_Float("a", self, 0)); + newInput(1, nodeValue_Float("b", self, 0)); + newInput(2, nodeValue_Slider_Range("Progress", self, 0)); outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.float, 0); diff --git a/scripts/node_level/node_level.gml b/scripts/node_level/node_level.gml index 1c3d5dcf9..68a661589 100644 --- a/scripts/node_level/node_level.gml +++ b/scripts/node_level/node_level.gml @@ -1,39 +1,39 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Level"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Slider_Range("White in", self, [0, 1]); + newInput(1, nodeValue_Slider_Range("White in", self, [0, 1])); - inputs[2] = nodeValue_Slider_Range("Red in", self, [0, 1]); + newInput(2, nodeValue_Slider_Range("Red in", self, [0, 1])); - inputs[3] = nodeValue_Slider_Range("Green in", self, [0, 1]); + newInput(3, nodeValue_Slider_Range("Green in", self, [0, 1])); - inputs[4] = nodeValue_Slider_Range("Blue in", self, [0, 1]); + newInput(4, nodeValue_Slider_Range("Blue in", self, [0, 1])); - inputs[5] = nodeValue_Slider_Range("Alpha in", self, [0, 1]); + newInput(5, nodeValue_Slider_Range("Alpha in", self, [0, 1])); - inputs[6] = nodeValue_Surface("Mask", self); + newInput(6, nodeValue_Surface("Mask", self)); inputs[7] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[8] = nodeValue_Bool("Active", self, true); + newInput(8, nodeValue_Bool("Active", self, true)); active_index = 8; - inputs[9] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(9, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(6); // inputs 10, 11 - inputs[12] = nodeValue_Slider_Range("White out", self, [0, 1]); + newInput(12, nodeValue_Slider_Range("White out", self, [0, 1])); - inputs[13] = nodeValue_Slider_Range("Red out", self, [0, 1]); + newInput(13, nodeValue_Slider_Range("Red out", self, [0, 1])); - inputs[14] = nodeValue_Slider_Range("Green out", self, [0, 1]); + newInput(14, nodeValue_Slider_Range("Green out", self, [0, 1])); - inputs[15] = nodeValue_Slider_Range("Blue out", self, [0, 1]); + newInput(15, nodeValue_Slider_Range("Blue out", self, [0, 1])); - inputs[16] = nodeValue_Slider_Range("Alpha out", self, [0, 1]); + newInput(16, nodeValue_Slider_Range("Alpha out", self, [0, 1])); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_level_selector/node_level.gml b/scripts/node_level_selector/node_level.gml index 9fff29599..a7f5d2b28 100644 --- a/scripts/node_level_selector/node_level.gml +++ b/scripts/node_level_selector/node_level.gml @@ -10,12 +10,12 @@ function Node_Level(_x, _y) : Node_Processor(_x, _y) constructor { uniform_black = shader_get_uniform(sh_level, "black"); uniform_white = shader_get_uniform(sh_level, "white"); - inputs[| 0] = new NodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + newInput(| 0, NodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0)); - inputs[| 1] = new NodeValue_Float(1, "Black", self, 0); + newInput(| 1, NodeValue_Float(1, "Black", self, 0)); inputs[| 1].setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01]); - inputs[| 2] = new NodeValue_Float(2, "White", self, 1); + newInput(| 2, NodeValue_Float(2, "White", self, 1)); inputs[| 2].setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01]); outputs[| 0] = new nodeValue_Output(0, "Surface out", self, VALUE_TYPE.surface, surface_create(1, 1)); diff --git a/scripts/node_level_selector/node_level_selector.gml b/scripts/node_level_selector/node_level_selector.gml index 4c591f005..39442fc24 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Float("Midpoint", self, 0) .setDisplay(VALUE_DISPLAY.slider) @@ -11,27 +11,27 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g .setDisplay(VALUE_DISPLAY.slider) .setMappable(10); - inputs[3] = nodeValue_Surface("Mask", self); + newInput(3, nodeValue_Surface("Mask", self)); inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_Bool("Active", self, true); + newInput(5, nodeValue_Bool("Active", self, true)); active_index = 5; - inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(6, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(3); // inputs 7, 8, ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[ 9] = nodeValueMap("Midpoint map", self); + newInput( 9, nodeValueMap("Midpoint map", self)); - inputs[10] = nodeValueMap("Range map", self); + newInput(10, nodeValueMap("Range map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[11] = nodeValue_Bool("Keep Original", self, false); + newInput(11, nodeValue_Bool("Keep Original", self, false)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_line/node_line.gml b/scripts/node_line/node_line.gml index 3e88bbbf9..06ec99ca3 100644 --- a/scripts/node_line/node_line.gml +++ b/scripts/node_line/node_line.gml @@ -1,21 +1,21 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Draw Line"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Bool("Background", self, false); + newInput(1, nodeValue_Bool("Background", self, false)); inputs[2] = nodeValue_Int("Segment", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] }); - inputs[3] = nodeValue_Vec2("Width", self, [ 2, 2 ]); + newInput(3, nodeValue_Vec2("Width", self, [ 2, 2 ])); inputs[4] = nodeValue_Float("Wiggle", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.01] }); - inputs[5] = nodeValue_Float("Random seed", self, 0); + newInput(5, nodeValue_Float("Random seed", self, 0)); - inputs[6] = nodeValue_Rotation("Rotation", self, 0); + newInput(6, nodeValue_Rotation("Rotation", self, 0)); inputs[7] = nodeValue_PathNode("Path", self, noone, "Draw line along path.") .setVisible(true, true); @@ -23,51 +23,51 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[8] = nodeValue_Slider_Range("Range", self, [0, 1]) .setTooltip("Range of the path to draw."); - inputs[9] = nodeValue_Float("Shift", self, 0); + newInput(9, nodeValue_Float("Shift", self, 0)); - inputs[10] = nodeValue_Gradient("Color over length", self, new gradientObject(cola(c_white))); + newInput(10, nodeValue_Gradient("Color over length", self, new gradientObject(cola(c_white)))); - inputs[11] = nodeValue("Width over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + newInput(11, nodeValue("Width over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11)); - inputs[12] = nodeValue_Bool("Span width over path", self, false, "Apply the full 'width over length' to the trimmed path."); + newInput(12, nodeValue_Bool("Span width over path", self, false, "Apply the full 'width over length' to the trimmed path.")); - inputs[13] = nodeValue_Bool("Round cap", self, false); + newInput(13, nodeValue_Bool("Round cap", self, false)); inputs[14] = nodeValue_Int("Round segment", self, 4) .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 0.1] }); - inputs[15] = nodeValue_Bool("Span color over path", self, false, "Apply the full 'color over length' to the trimmed path."); + newInput(15, nodeValue_Bool("Span color over path", self, false, "Apply the full 'color over length' to the trimmed path.")); - inputs[16] = nodeValue_Bool("Width pass", self, false); + newInput(16, nodeValue_Bool("Width pass", self, false)); - inputs[17] = nodeValue_Bool("1px mode", self, false, "Render pixel perfect 1px line."); + newInput(17, nodeValue_Bool("1px mode", self, false, "Render pixel perfect 1px line.")); - inputs[18] = nodeValue_Surface("Texture", self); + newInput(18, nodeValue_Surface("Texture", self)); - inputs[19] = nodeValue_Bool("Fix length", self, false, "Fix length of each segment instead of segment count."); + newInput(19, nodeValue_Bool("Fix length", self, false, "Fix length of each segment instead of segment count.")); - inputs[20] = nodeValue_Float("Segment length", self, 4); + newInput(20, nodeValue_Float("Segment length", self, 4)); - inputs[21] = nodeValue_Vec2("Texture position", self, [ 0, 0 ]); + newInput(21, nodeValue_Vec2("Texture position", self, [ 0, 0 ])); - inputs[22] = nodeValue_Rotation("Texture Rotation", self, 0); + newInput(22, nodeValue_Rotation("Texture Rotation", self, 0)); - inputs[23] = nodeValue_Vec2("Texture scale", self, [ 1, 1 ]); + newInput(23, nodeValue_Vec2("Texture scale", self, [ 1, 1 ])); - inputs[24] = nodeValue_Gradient("Random Blend", self, new gradientObject(cola(c_white))); + newInput(24, nodeValue_Gradient("Random Blend", self, new gradientObject(cola(c_white)))); - inputs[25] = nodeValue_Bool("Invert", self, false ); + newInput(25, nodeValue_Bool("Invert", self, false )); - inputs[26] = nodeValue_Bool("Clamp range", self, false ); + newInput(26, nodeValue_Bool("Clamp range", self, false )); - inputs[27] = nodeValue_Enum_Scroll("Data Type", self, 1, [ "None", "Path", "Segments" ]); + newInput(27, nodeValue_Enum_Scroll("Data Type", self, 1, [ "None", "Path", "Segments" ])); inputs[28] = nodeValue_Vector("Segments", self, [[]]) .setArrayDepth(2); - inputs[29] = nodeValue_Bool("Scale texture to length", self, true ); + newInput(29, nodeValue_Bool("Scale texture to length", self, true )); - inputs[30] = nodeValue_Bool("Use Path Bounding box", self, false ); + newInput(30, nodeValue_Bool("Use Path Bounding box", self, false )); inputs[31] = nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ]) diff --git a/scripts/node_local_analyze/node_local_analyze.gml b/scripts/node_local_analyze/node_local_analyze.gml index c92687399..e8f3e2831 100644 --- a/scripts/node_local_analyze/node_local_analyze.gml +++ b/scripts/node_local_analyze/node_local_analyze.gml @@ -1,9 +1,9 @@ function Node_Local_Analyze(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Local Analyze"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Enum_Scroll("Algorithm", self, 0, [ "Average (Blur)", "Maximum", "Minimum" ]); + newInput(1, nodeValue_Enum_Scroll("Algorithm", self, 0, [ "Average (Blur)", "Maximum", "Minimum" ])); inputs[2] = nodeValue_Float("Size", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 16, 0.1] }); @@ -15,15 +15,15 @@ function Node_Local_Analyze(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr new scrollItem("Circle", s_node_shape_circle, 0), new scrollItem("Diamond", s_node_shape_misc, 0) ]); - inputs[5] = nodeValue_Surface("Mask", self); + newInput(5, nodeValue_Surface("Mask", self)); inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Bool("Active", self, true); + newInput(7, nodeValue_Bool("Active", self, true)); active_index = 7; - inputs[8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(8, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(5); // inputs 9, 10 diff --git a/scripts/node_lovify/node_lovify.gml b/scripts/node_lovify/node_lovify.gml index 276d0a428..4fa5080ad 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Int("Seed", self, 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 989715352..80be96c7a 100644 --- a/scripts/node_lua_compute/node_lua_compute.gml +++ b/scripts/node_lua_compute/node_lua_compute.gml @@ -2,9 +2,9 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru name = "Lua Compute"; update_on_frame = true; - inputs[0] = nodeValue_Text("Function name", self, "render" + string(irandom_range(100000, 999999))); + newInput(0, nodeValue_Text("Function name", self, "render" + string(irandom_range(100000, 999999)))); - inputs[1] = nodeValue_Enum_Scroll("Return type", self, 0, { data: [ "Number", "String", "Struct" ], update_hover: false }); + newInput(1, nodeValue_Enum_Scroll("Return type", self, 0, { data: [ "Number", "String", "Struct" ], update_hover: false })); inputs[2] = nodeValue_Text("Lua code", self, "", o_dialog_lua_reference) .setDisplay(VALUE_DISPLAY.codeLUA); diff --git a/scripts/node_lua_global/node_lua_global.gml b/scripts/node_lua_global/node_lua_global.gml index e4c0e56c1..752a9d8e2 100644 --- a/scripts/node_lua_global/node_lua_global.gml +++ b/scripts/node_lua_global/node_lua_global.gml @@ -5,7 +5,7 @@ function Node_Lua_Global(_x, _y, _group = noone) : Node(_x, _y, _group) construc inputs[0] = nodeValue_Text("Lua code", self, "", o_dialog_lua_reference) .setDisplay(VALUE_DISPLAY.codeLUA); - inputs[1] = nodeValue_Enum_Scroll("Run order", self, 0, [ "On start", "Every frame" ]); + newInput(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 03dd213a0..7c69d6e24 100644 --- a/scripts/node_lua_surface/node_lua_surface.gml +++ b/scripts/node_lua_surface/node_lua_surface.gml @@ -3,9 +3,9 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru preview_channel = 1; update_on_frame = true; - inputs[0] = nodeValue_Text("Function name", self, "render" + string(irandom_range(100000, 999999))); + newInput(0, nodeValue_Text("Function name", self, "render" + string(irandom_range(100000, 999999)))); - inputs[1] = nodeValue_Vec2("Output dimension", self, DEF_SURF); + newInput(1, nodeValue_Vec2("Output dimension", self, DEF_SURF)); inputs[2] = nodeValue_Text("Lua code", self, "", o_dialog_lua_reference) .setDisplay(VALUE_DISPLAY.codeLUA); diff --git a/scripts/node_math/node_math.gml b/scripts/node_math/node_math.gml index 37a1c577f..0a5613b0f 100644 --- a/scripts/node_math/node_math.gml +++ b/scripts/node_math/node_math.gml @@ -90,11 +90,11 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { inputs[2] = nodeValue_Float("b", self, 0) .setVisible(true, true); - inputs[3] = nodeValue_Bool("Degree angle", self, true); + newInput(3, nodeValue_Bool("Degree angle", self, true)); - inputs[4] = nodeValue_Bool("To integer", self, false); + newInput(4, nodeValue_Bool("To integer", self, false)); - inputs[5] = nodeValue_Float("Amount", self, 0); + newInput(5, nodeValue_Float("Amount", self, 0)); input_display_list = [ 0, 1, 2, 5, 3, 4, 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 6fc6270d4..384d85d4f 100644 --- a/scripts/node_mesh_create_path/node_mesh_create_path.gml +++ b/scripts/node_mesh_create_path/node_mesh_create_path.gml @@ -6,9 +6,9 @@ function Node_Mesh_Create_Path(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[0] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - inputs[1] = nodeValue_Int("Sample", self, 8); + newInput(1, nodeValue_Int("Sample", self, 8)); - inputs[2] = nodeValue_Enum_Scroll("Algorithm", self, 0, [ "Ear Clipping", "Convex Fan", "Delaunay" ]); + newInput(2, nodeValue_Enum_Scroll("Algorithm", self, 0, [ "Ear Clipping", "Convex Fan", "Delaunay" ])); outputs[0] = nodeValue_Output("Mesh", self, 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 4ace9322b..f1ee31509 100644 --- a/scripts/node_mesh_transform/node_mesh_transform.gml +++ b/scripts/node_mesh_transform/node_mesh_transform.gml @@ -5,13 +5,13 @@ function Node_Mesh_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) cons inputs[0] = nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone) .setVisible(true, true); - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]); + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])); - inputs[2] = nodeValue_Rotation("Rotation", self, 0); + newInput(2, nodeValue_Rotation("Rotation", self, 0)); - inputs[3] = nodeValue_Vec2("Scale", self, [ 1, 1 ]); + newInput(3, nodeValue_Vec2("Scale", self, [ 1, 1 ])); - inputs[4] = nodeValue_Vec2("Anchor", self, [ 0, 0 ]); + newInput(4, nodeValue_Vec2("Anchor", self, [ 0, 0 ])); outputs[0] = nodeValue_Output("Mesh", self, VALUE_TYPE.mesh, noone); diff --git a/scripts/node_mesh_warp/node_mesh_warp.gml b/scripts/node_mesh_warp/node_mesh_warp.gml index 0b5e865b4..c540439a8 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Int("Sample", self, 8, "Amount of grid subdivision. Higher number means more grid, detail.") .setDisplay(VALUE_DISPLAY.slider, { range: [ 2, 32, 0.1 ] }); @@ -165,15 +165,15 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[3] = nodeValue_Trigger("Mesh", self, false ) .setDisplay(VALUE_DISPLAY.button, { name: "Generate", UI : true, onClick: function() { Mesh_setTriangle(); } }); - inputs[4] = nodeValue_Bool("Diagonal Link", self, false, "Include diagonal link to prevent drastic grid deformation."); + newInput(4, nodeValue_Bool("Diagonal Link", self, false, "Include diagonal link to prevent drastic grid deformation.")); - inputs[5] = nodeValue_Bool("Active", self, true); + newInput(5, nodeValue_Bool("Active", self, true)); active_index = 5; inputs[6] = nodeValue_Float("Link Strength", self, 0, "Link length preservation, setting it to 1 will prevent any stretching, contraction.") .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Bool("Full Mesh", self, false); + newInput(7, nodeValue_Bool("Full Mesh", self, false)); 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), ] ); diff --git a/scripts/node_mirror/node_mirror.gml b/scripts/node_mirror/node_mirror.gml index 41ee02edf..ab45d4425 100644 --- a/scripts/node_mirror/node_mirror.gml +++ b/scripts/node_mirror/node_mirror.gml @@ -2,14 +2,14 @@ function Node_Mirror(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co name = "Mirror"; batch_output = false; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Vec2("Position", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[2] = nodeValue_Rotation("Angle", self, 0); + newInput(2, nodeValue_Rotation("Angle", self, 0)); - inputs[3] = nodeValue_Bool("Active", self, true); + newInput(3, nodeValue_Bool("Active", self, true)); active_index = 3; outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_mk_blinker/node_mk_blinker.gml b/scripts/node_mk_blinker/node_mk_blinker.gml index d8d9407d1..245dfd4a1 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Surface("Mask", self); + newInput(1, nodeValue_Surface("Mask", self)); inputs[2] = nodeValue_Int("Seed", self, 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) }); @@ -12,17 +12,17 @@ function Node_MK_Blinker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[3] = nodeValue_Float("Amount", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[4] = nodeValue_Palette("Target Colors", self, [ c_black ] ); + newInput(4, nodeValue_Palette("Target Colors", self, [ c_black ] )); - inputs[5] = nodeValue_Palette("Light Colors", self, [ c_white ] ); + newInput(5, nodeValue_Palette("Light Colors", self, [ c_white ] )); - inputs[6] = nodeValue_Bool("Active", self, true); + newInput(6, nodeValue_Bool("Active", self, true)); active_index = 6; inputs[7] = nodeValue_Float("Tolerance", self, 0.1 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[8] = nodeValue_Bool("Glow", self, false); + newInput(8, nodeValue_Bool("Glow", self, false)); inputs[9] = nodeValue_Float("Size", self, 4 ) .setDisplay(VALUE_DISPLAY.slider, { range : [ 1, 8, 0.1 ] }); diff --git a/scripts/node_mk_brownian/node_mk_brownian.gml b/scripts/node_mk_brownian/node_mk_brownian.gml index dce8cc399..9b339076b 100644 --- a/scripts/node_mk_brownian/node_mk_brownian.gml +++ b/scripts/node_mk_brownian/node_mk_brownian.gml @@ -2,34 +2,34 @@ function Node_MK_Brownian(_x, _y, _group = noone) : Node(_x, _y, _group) constru name = "MK Brownian"; update_on_frame = true; - inputs[0] = nodeValue_Surface("Background", self); + newInput(0, nodeValue_Surface("Background", self)); - inputs[1] = nodeValue_Surface("Sprite", self); + newInput(1, nodeValue_Surface("Sprite", self)); - inputs[2] = nodeValue_Int("Amount", self, 10); + newInput(2, nodeValue_Int("Amount", self, 10)); - inputs[3] = nodeValue_Area("Area", self, DEF_AREA); + newInput(3, nodeValue_Area("Area", self, DEF_AREA)); - inputs[4] = nodeValue_Rotation_Random("Direction", self, [ 0, 45, 135, 0, 0 ] ); + newInput(4, nodeValue_Rotation_Random("Direction", self, [ 0, 45, 135, 0, 0 ] )); - inputs[5] = nodeValue_Range("Speed", self, [ 1, 1 ]); + newInput(5, nodeValue_Range("Speed", self, [ 1, 1 ])); - inputs[6] = nodeValue_Gradient("Color", self, new gradientObject(cola(c_white))); + newInput(6, nodeValue_Gradient("Color", self, new gradientObject(cola(c_white)))); - inputs[7] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + newInput(7, nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11)); inputs[8] = nodeValue_Int("Seed", self, 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_Range("Angular speed", self, [ -45, 45 ]); + newInput(9, nodeValue_Range("Angular speed", self, [ -45, 45 ])); - inputs[10] = nodeValue_Range("Angular acceleration", self, [ -2, 2 ]); + newInput(10, nodeValue_Range("Angular acceleration", self, [ -2, 2 ])); - inputs[11] = nodeValue_Bool("Turn", self, false); + newInput(11, nodeValue_Bool("Turn", self, false)); - inputs[12] = nodeValue_Dimension(self); + newInput(12, nodeValue_Dimension(self)); - inputs[13] = nodeValue_Range("Size", self, [ 1, 1 ], { linked : true }); + newInput(13, nodeValue_Range("Size", self, [ 1, 1 ], { linked : true })); outputs[0] = nodeValue_Output("Output", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_mk_cable/node_mk_cable.gml b/scripts/node_mk_cable/node_mk_cable.gml index ce74c395e..a0a0148f1 100644 --- a/scripts/node_mk_cable/node_mk_cable.gml +++ b/scripts/node_mk_cable/node_mk_cable.gml @@ -1,11 +1,11 @@ function Node_MK_Cable(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "MK Cable"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Vec2("Point 1", self, [ 0, 0 ]); + newInput(1, nodeValue_Vec2("Point 1", self, [ 0, 0 ])); - inputs[2] = nodeValue_Vec2("Point 2", self, [ 16, 16 ]); + newInput(2, nodeValue_Vec2("Point 2", self, [ 16, 16 ])); input_display_list = [ new Inspector_Sprite(s_MKFX), 0, ["Saber", false], 1, 2, diff --git a/scripts/node_mk_fall/node_mk_fall.gml b/scripts/node_mk_fall/node_mk_fall.gml index f99fd7843..5528a5e03 100644 --- a/scripts/node_mk_fall/node_mk_fall.gml +++ b/scripts/node_mk_fall/node_mk_fall.gml @@ -2,53 +2,53 @@ function Node_MK_Fall(_x, _y, _group = noone) : Node(_x, _y, _group) constructor name = "MK Fall"; update_on_frame = true; - inputs[0] = nodeValue_Surface("Background", self); + newInput(0, nodeValue_Surface("Background", self)); - inputs[1] = nodeValue_Dimension(self); + newInput(1, nodeValue_Dimension(self)); inputs[2] = nodeValue_Int("Seed", self, 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) }); - inputs[3] = nodeValue_Area("Area", self, DEF_AREA); + newInput(3, nodeValue_Area("Area", self, DEF_AREA)); - inputs[4] = nodeValue_Int("Amount", self, 10); + newInput(4, nodeValue_Int("Amount", self, 10)); - inputs[5] = nodeValue_Float("Gravity", self, 0); + newInput(5, nodeValue_Float("Gravity", self, 0)); - inputs[6] = nodeValue_Range("X Swing", self, [ 1, 1 ], { linked : true }); + newInput(6, nodeValue_Range("X Swing", self, [ 1, 1 ], { linked : true })); - inputs[7] = nodeValue_Range("Y Swing", self, [ 0.25, 0.25 ], { linked : true }); + newInput(7, nodeValue_Range("Y Swing", self, [ 0.25, 0.25 ], { linked : true })); - inputs[8] = nodeValue_Range("Swing frequency", self, [ 1, 1 ], { linked : true }); + newInput(8, nodeValue_Range("Swing frequency", self, [ 1, 1 ], { linked : true })); - inputs[9] = nodeValue_Vec2("Size", self, [ 4, 2 ]); + newInput(9, nodeValue_Vec2("Size", self, [ 4, 2 ])); - inputs[10] = nodeValue_Range("Speed", self, [ 1, 1 ], { linked : true }); + newInput(10, nodeValue_Range("Speed", self, [ 1, 1 ], { linked : true })); - inputs[11] = nodeValue_Range("X Momentum", self, [ 0, 0 ], { linked : true }); + newInput(11, nodeValue_Range("X Momentum", self, [ 0, 0 ], { linked : true })); - inputs[12] = nodeValue_Vec2("Wind", self, [ 0, 0 ]); + newInput(12, nodeValue_Vec2("Wind", self, [ 0, 0 ])); inputs[13] = nodeValue_Gradient("Color", self, new gradientObject(cola(c_white))) - inputs[14] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + newInput(14, nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11)); - inputs[15] = nodeValue_Bool("Ground", self, false); + newInput(15, nodeValue_Bool("Ground", self, false)); - inputs[16] = nodeValue_Range("Ground levels", self, [ DEF_SURF_H / 2, DEF_SURF_H ]); + newInput(16, nodeValue_Range("Ground levels", self, [ DEF_SURF_H / 2, DEF_SURF_H ])); - inputs[17] = nodeValue_Range("Y Momentum", self, [ 0, 0 ], { linked : true }); + newInput(17, nodeValue_Range("Y Momentum", self, [ 0, 0 ], { linked : true })); - inputs[18] = nodeValue_Bool("Twist", self, false); + newInput(18, nodeValue_Bool("Twist", self, false)); inputs[19] = nodeValue_Float("Twist Rate", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); - inputs[20] = nodeValue_Range("Twist Speed", self, [ 5, 10 ]); + newInput(20, nodeValue_Range("Twist Speed", self, [ 5, 10 ])); - inputs[21] = nodeValue_Range("Scale", self, [ 1, 1 ], { linked : true }); + newInput(21, nodeValue_Range("Scale", self, [ 1, 1 ], { linked : true })); - 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) ]); + newInput(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_Float("Twist Radius", self, 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 ee8c379fc..98acde27b 100644 --- a/scripts/node_mk_flag/node_mk_flag.gml +++ b/scripts/node_mk_flag/node_mk_flag.gml @@ -2,17 +2,17 @@ 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); + newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Surface("Texture", self); + newInput(1, nodeValue_Surface("Texture", self)); - inputs[2] = nodeValue_Vec2("Position", self, [ 0, 0 ]); + newInput(2, nodeValue_Vec2("Position", self, [ 0, 0 ])); - inputs[3] = nodeValue_Enum_Button("Pin side", self, 0, [ "Left", "Right", "Up", "Down" ]); + newInput(3, nodeValue_Enum_Button("Pin side", self, 0, [ "Left", "Right", "Up", "Down" ])); - inputs[4] = nodeValue_Int("Subdivision", self, 8); + newInput(4, nodeValue_Int("Subdivision", self, 8)); - inputs[5] = nodeValue_Float("Wind speed", self, 2); + newInput(5, nodeValue_Float("Wind speed", self, 2)); inputs[6] = nodeValue_Float("Wave width", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 4, 0.1] }); @@ -32,7 +32,7 @@ function Node_MK_Flag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[11] = nodeValue_Float("Shadow threshold", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-0.1, 0.1, 0.001] }); - inputs[12] = nodeValue_Bool("Invert shadow", self, 0); + newInput(12, nodeValue_Bool("Invert shadow", self, 0)); input_display_list = [ new Inspector_Sprite(s_MKFX), 0, ["Flag", false], 4, 1, 2, 3, diff --git a/scripts/node_mk_flame/node_mk_flame.gml b/scripts/node_mk_flame/node_mk_flame.gml index 310efa9b0..e0bb2adc3 100644 --- a/scripts/node_mk_flame/node_mk_flame.gml +++ b/scripts/node_mk_flame/node_mk_flame.gml @@ -2,9 +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); + newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Rotation("Direction", self, 45); + newInput(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 1ba3bf484..5d1184312 100644 --- a/scripts/node_mk_flare/node_mk_flare.gml +++ b/scripts/node_mk_flare/node_mk_flare.gml @@ -25,12 +25,12 @@ function Node_MK_Flare(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) name = "MK Lens Flare"; batch_output = false; - inputs[0] = nodeValue_Surface("Background", self); + newInput(0, nodeValue_Surface("Background", self)); inputs[1] = nodeValue_Vec2("Origin", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[2] = nodeValue_Dimension(self); + newInput(2, nodeValue_Dimension(self)); inputs[3] = nodeValue_Float("Scale", self, 1) diff --git a/scripts/node_mk_fracture/node_mk_fracture.gml b/scripts/node_mk_fracture/node_mk_fracture.gml index 74f6a564a..c6d0f23dc 100644 --- a/scripts/node_mk_fracture/node_mk_fracture.gml +++ b/scripts/node_mk_fracture/node_mk_fracture.gml @@ -1,15 +1,15 @@ function Node_MK_Fracture(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "MK Fracture"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Vec2("Subdivision", self, [ 4, 4 ]); + newInput(1, nodeValue_Vec2("Subdivision", self, [ 4, 4 ])); inputs[2] = nodeValue_Float("Progress", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) .setMappable(3); - inputs[3] = nodeValueMap("Progress map", self); + newInput(3, nodeValueMap("Progress map", self)); inputs[4] = nodeValue_Vec2("Movement", self, [ 0, 0 ]) .setMappable(9, true); @@ -23,11 +23,11 @@ function Node_MK_Fracture(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[7] = nodeValue_Float("Alpha", self, 1.) .setDisplay(VALUE_DISPLAY.slider); - inputs[8] = nodeValue_Float("Gravity", self, 0.); + newInput(8, nodeValue_Float("Gravity", self, 0.)); - inputs[9] = nodeValueMap("Movement map", self); + newInput(9, nodeValueMap("Movement map", self)); - inputs[10] = nodeValueMap("Rotation map", self); + newInput(10, nodeValueMap("Rotation map", self)); inputs[11] = nodeValue_Float("Brick Shift", self, 0.) .setDisplay(VALUE_DISPLAY.slider); @@ -35,7 +35,7 @@ function Node_MK_Fracture(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[12] = nodeValue_Float("Skew", self, 0.) .setDisplay(VALUE_DISPLAY.slider, { range : [ -1, 1, 0.01 ] }); - inputs[13] = nodeValue_Enum_Button("Brick Axis", self, 0, [ "X", "Y" ]); + newInput(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 99ca1cabf..bfea9fc85 100644 --- a/scripts/node_mk_gridballs/node_mk_gridballs.gml +++ b/scripts/node_mk_gridballs/node_mk_gridballs.gml @@ -1,15 +1,15 @@ function Node_MK_GridBalls(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "MK GridBalls"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Dimension(self); + newInput(1, nodeValue_Dimension(self)); - inputs[2] = nodeValue_Vec2("Amount", self, [ 4, 4 ]); + newInput(2, nodeValue_Vec2("Amount", self, [ 4, 4 ])); - inputs[3] = nodeValue_Rotation("Light", self, 0); + newInput(3, nodeValue_Rotation("Light", self, 0)); - inputs[4] = nodeValue_Float("Scatter", self, 0); + newInput(4, nodeValue_Float("Scatter", self, 0)); inputs[5] = nodeValue_Int("Seed", self, 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) }); @@ -17,13 +17,13 @@ function Node_MK_GridBalls(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[6] = nodeValue_Float("Shading", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Rotation("Scatter direction", self, 0); + newInput(7, nodeValue_Rotation("Scatter direction", self, 0)); - inputs[8] = nodeValue_Vec2("Shift", self, [ 0, 0 ]); + newInput(8, nodeValue_Vec2("Shift", self, [ 0, 0 ])); - inputs[9] = nodeValue_Float("Stretch", self, 0); + newInput(9, nodeValue_Float("Stretch", self, 0)); - inputs[10] = nodeValue_Rotation("Stretch direction", self, 0); + newInput(10, nodeValue_Rotation("Stretch direction", self, 0)); inputs[11] = nodeValue_Float("Stretch shift", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); @@ -31,9 +31,9 @@ function Node_MK_GridBalls(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[12] = nodeValue_Float("Roundness", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[13] = nodeValue_Float("Twist", self, 0); + newInput(13, nodeValue_Float("Twist", self, 0)); - inputs[14] = nodeValue_Rotation("Twist axis", self, 0); + newInput(14, nodeValue_Rotation("Twist axis", self, 0)); inputs[15] = nodeValue_Float("Twist shift", self, 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 6e948bd81..ca88bc8c7 100644 --- a/scripts/node_mk_gridflip/node_mk_gridflip.gml +++ b/scripts/node_mk_gridflip/node_mk_gridflip.gml @@ -1,24 +1,24 @@ function Node_MK_GridFlip(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "MK GridFlip"; - inputs[0] = nodeValue_Surface("Surface front", self); + newInput(0, nodeValue_Surface("Surface front", self)); - inputs[1] = nodeValue_Dimension(self); + newInput(1, nodeValue_Dimension(self)); - inputs[2] = nodeValue_Vec2("Amount", self, [ 4, 4 ]); + newInput(2, nodeValue_Vec2("Amount", self, [ 4, 4 ])); inputs[3] = nodeValue_Int("Seed", self, 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("Surface back", self); + newInput(4, nodeValue_Surface("Surface back", self)); - inputs[5] = nodeValue_Rotation("Rotation", self, 0); + newInput(5, nodeValue_Rotation("Rotation", self, 0)); - inputs[6] = nodeValue_Enum_Button("Axis", self, 0, [ "X", "Y" ]); + newInput(6, nodeValue_Enum_Button("Axis", self, 0, [ "X", "Y" ])); - inputs[7] = nodeValue_Float("Sweep", self, 0); + newInput(7, nodeValue_Float("Sweep", self, 0)); - inputs[8] = nodeValue_Rotation("Sweep direction", self, 0); + newInput(8, nodeValue_Rotation("Sweep direction", self, 0)); inputs[9] = nodeValue_Float("Sweep shift", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); diff --git a/scripts/node_mk_rain/node_mk_rain.gml b/scripts/node_mk_rain/node_mk_rain.gml index 23837ac04..eaefc121e 100644 --- a/scripts/node_mk_rain/node_mk_rain.gml +++ b/scripts/node_mk_rain/node_mk_rain.gml @@ -2,21 +2,21 @@ 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Rotation("Direction", self, 45); + newInput(1, nodeValue_Rotation("Direction", self, 45)); - inputs[2] = nodeValue_Float("Density", self, 5); + newInput(2, nodeValue_Float("Density", self, 5)); - inputs[3] = nodeValue_Range("Raindrop width", self, [ 1, 1 ]); + newInput(3, nodeValue_Range("Raindrop width", self, [ 1, 1 ])); - inputs[4] = nodeValue_Range("Raindrop length", self, [ 5, 10 ]); + newInput(4, nodeValue_Range("Raindrop length", self, [ 5, 10 ])); - inputs[5] = nodeValue_Gradient("Color", self, new gradientObject(cola(c_white))); + newInput(5, nodeValue_Gradient("Color", self, new gradientObject(cola(c_white)))); - inputs[6] = nodeValue_Slider_Range("Alpha", self, [ 0.5, 1 ]); + newInput(6, nodeValue_Slider_Range("Alpha", self, [ 0.5, 1 ])); - inputs[7] = nodeValue_Range("Velocity", self, [ 1, 2 ]); + newInput(7, nodeValue_Range("Velocity", self, [ 1, 2 ])); inputs[8] = nodeValue_Int("Seed", self, 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) }); @@ -25,22 +25,22 @@ function Node_MK_Rain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c new scrollItem("Snow", s_node_mk_rain_type, 1), new scrollItem("Texture", s_node_mk_rain_type, 2) ]); - inputs[10] = nodeValue_Range("Snow size", self, [ 3, 4 ]); + newInput(10, nodeValue_Range("Snow size", self, [ 3, 4 ])); - inputs[11] = nodeValue_Surface("Texture", self); + newInput(11, nodeValue_Surface("Texture", self)); - inputs[12] = nodeValue_Slider_Range("Track extension", self, [ 0, 0 ], { range: [ 0, 10, 0.01 ] }); + newInput(12, nodeValue_Slider_Range("Track extension", self, [ 0, 0 ], { range: [ 0, 10, 0.01 ] })); - inputs[13] = nodeValue("Size over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + newInput(13, nodeValue("Size over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11)); - inputs[14] = nodeValue_Bool("Limited lifespan", self, false); + newInput(14, nodeValue_Bool("Limited lifespan", self, false)); inputs[15] = nodeValue_Slider_Range("Lifespan", self, [ 0, 1 ]) .setTooltip("Lifespan of a droplet as a ratio of the entire animation."); - inputs[16] = nodeValue("Alpha over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + newInput(16, nodeValue("Alpha over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11)); - inputs[17] = nodeValue_Bool("Fade alpha", self, false); + newInput(17, nodeValue_Bool("Fade alpha", self, false)); input_display_list = [ new Inspector_Sprite(s_MKFX), 0, 8, ["Shape", false], 9, 3, 4, 10, 11, diff --git a/scripts/node_mk_saber/node_mk_saber.gml b/scripts/node_mk_saber/node_mk_saber.gml index 83956632f..33d79fb46 100644 --- a/scripts/node_mk_saber/node_mk_saber.gml +++ b/scripts/node_mk_saber/node_mk_saber.gml @@ -1,26 +1,26 @@ function Node_MK_Saber(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "MK Saber"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Vec2("Point 1", self, [ 0, 0 ]); + newInput(1, nodeValue_Vec2("Point 1", self, [ 0, 0 ])); - inputs[2] = nodeValue_Vec2("Point 2", self, [ 16, 16 ]); + newInput(2, nodeValue_Vec2("Point 2", self, [ 16, 16 ])); inputs[3] = nodeValue_Int("Thickness", self, 2) inputs[4] = nodeValue_Gradient("Color", self, new gradientObject(cola(c_white))) - inputs[5] = nodeValue_Int("Trace", self, 0); + newInput(5, nodeValue_Int("Trace", self, 0)); - inputs[6] = nodeValue_Bool("Fix length", self, false); + newInput(6, nodeValue_Bool("Fix length", self, false)); - inputs[7] = nodeValue_Int("Gradient step", self, 1); + newInput(7, nodeValue_Int("Gradient step", self, 1)); inputs[8] = nodeValue_Float("Glow intensity", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[9] = nodeValue_Int("Glow radius", self, 0); + newInput(9, nodeValue_Int("Glow radius", self, 0)); inputs[10] = nodeValue_Surface("Trace texture", self) .setVisible(true, true); diff --git a/scripts/node_mk_sparkle/node_mk_sparkle.gml b/scripts/node_mk_sparkle/node_mk_sparkle.gml index debd67cc1..aaeb91986 100644 --- a/scripts/node_mk_sparkle/node_mk_sparkle.gml +++ b/scripts/node_mk_sparkle/node_mk_sparkle.gml @@ -6,14 +6,14 @@ function Node_MK_Sparkle(_x, _y, _group = noone) : Node_Processor(_x, _y, _group dimension_index = -1; update_on_frame = true; - inputs[0] = nodeValue_Int("Size", self, 5); + newInput(0, nodeValue_Int("Size", self, 5)); - inputs[1] = nodeValueSeed(self, VALUE_TYPE.float); + newInput(1, nodeValueSeed(self, VALUE_TYPE.float)); inputs[2] = nodeValue_Float("Speed", self, 1) .setDisplay(VALUE_DISPLAY.slider) - inputs[3] = nodeValue_Bool("Shade", self, false); + newInput(3, nodeValue_Bool("Shade", self, false)); inputs[4] = nodeValue_Float("Amount", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) @@ -149,7 +149,7 @@ function __Node_MK_Sparkle(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro dimension_index = -1; update_on_frame = true; - inputs[0] = nodeValue_Int("Size", self, 5); + newInput(0, nodeValue_Int("Size", self, 5)); inputs[1] = nodeValue_Float("Sparkle", self, [ [ MKSPARK_DIRR.main, 0, 0, 2, 1, 0, 0 ], @@ -158,9 +158,9 @@ function __Node_MK_Sparkle(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro .setArrayDepth(2) .setArrayDynamic(); - inputs[2] = nodeValue_Int("Start frame", self, 0); + newInput(2, nodeValue_Int("Start frame", self, 0)); - inputs[3] = nodeValue_Float("Speed", self, 1); + newInput(3, nodeValue_Float("Speed", self, 1)); inputs[4] = nodeValue_Int("Loop", self, []) .setArrayDepth(1) diff --git a/scripts/node_mk_tile/node_mk_tile.gml b/scripts/node_mk_tile/node_mk_tile.gml index 60595f34d..aaffebeb1 100644 --- a/scripts/node_mk_tile/node_mk_tile.gml +++ b/scripts/node_mk_tile/node_mk_tile.gml @@ -2,30 +2,30 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c name = "MK Tile"; dimension_index = -1; - inputs[0] = nodeValue_Surface("Texture", self); + newInput(0, nodeValue_Surface("Texture", self)); - inputs[1] = nodeValue_Surface("Background texture", self); + newInput(1, nodeValue_Surface("Background texture", self)); - inputs[2] = nodeValue_Enum_Button("Type", self, 0, [ "GMS Corner (18 sprites)", "GMS Corner + Side (55 sprites)", "Godot Blob (48 sprites)" ] ); + newInput(2, nodeValue_Enum_Button("Type", self, 0, [ "GMS Corner (18 sprites)", "GMS Corner + Side (55 sprites)", "Godot Blob (48 sprites)" ] )); - inputs[3] = nodeValue_Enum_Button("Output type", self, 0, [ "Sheet", "Array" ] ); + newInput(3, nodeValue_Enum_Button("Output type", self, 0, [ "Sheet", "Array" ] )); - inputs[4] = nodeValue_Padding("Crop", self, [ 8, 8, 8, 8 ]); + newInput(4, nodeValue_Padding("Crop", self, [ 8, 8, 8, 8 ])); - inputs[5] = nodeValue_Enum_Button("Edge type", self, 0, [ "Uniform", "Individual" ] ); + newInput(5, nodeValue_Enum_Button("Edge type", self, 0, [ "Uniform", "Individual" ] )); - 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); + newInput(6, nodeValue_Surface("Edge", self)); + newInput(7, nodeValue_Surface("Edge bottom", self)); + newInput(8, nodeValue_Surface("Edge left", self)); + newInput(9, nodeValue_Surface("Edge right", self)); - inputs[10] = nodeValue_Padding("Edge shift", self, [ 0, 0, 0, 0 ]); + newInput(10, nodeValue_Padding("Edge shift", self, [ 0, 0, 0, 0 ])); - inputs[11] = nodeValue_Toggle("Full edge", self, 0, { data: [ "T", "B", "L", "R" ] }); + newInput(11, nodeValue_Toggle("Full edge", self, 0, { data: [ "T", "B", "L", "R" ] })); - inputs[12] = nodeValue_Enum_Scroll("Edge sprite", self, 0, [ "Single", "Side + Center", "Side + Center + Side" ] ); + newInput(12, nodeValue_Enum_Scroll("Edge sprite", self, 0, [ "Single", "Side + Center", "Side + Center + Side" ] )); - inputs[13] = nodeValue_Enum_Button("Edge transform", self, 0, [ "Flip", "Rotate" ] ); + newInput(13, nodeValue_Enum_Button("Edge transform", self, 0, [ "Flip", "Rotate" ] )); inputs[14] = nodeValue_Bool("Sort array by bit", self, true) diff --git a/scripts/node_module_test/node_module_test.gml b/scripts/node_module_test/node_module_test.gml index 76bbe3e7b..7fa59025f 100644 --- a/scripts/node_module_test/node_module_test.gml +++ b/scripts/node_module_test/node_module_test.gml @@ -1,13 +1,13 @@ function Node_Module_SubModule(parent) : NodeModule(parent) constructor { - inputs[0] = nodeValue_Surface("Module input 0", parent); + newInput(0, nodeValue_Surface("Module input 0", parent)); - inputs[1] = nodeValue("Module input 1", parent, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); + newInput(1, nodeValue("Module input 1", parent, JUNCTION_CONNECT.input, VALUE_TYPE.text, "")); } function Node_Module_Test(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Module test"; - inputs[0] = nodeValue_Float("Static input", self, 0); + newInput(0, nodeValue_Float("Static input", self, 0)); outputs[0] = nodeValue_Output("Output", self, VALUE_TYPE.float, 0); diff --git a/scripts/node_morph_surface/node_morph_surface.gml b/scripts/node_morph_surface/node_morph_surface.gml index 876f418d7..3ae779c1f 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("Surface from", self); + newInput(0, nodeValue_Surface("Surface from", self)); - inputs[1] = nodeValue_Surface("Surface to", self); + newInput(1, nodeValue_Surface("Surface to", self)); inputs[2] = nodeValue_Float("Morph amount", self, 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 6cf576e11..02527b219 100644 --- a/scripts/node_move_point/node_move_point.gml +++ b/scripts/node_move_point/node_move_point.gml @@ -7,13 +7,13 @@ function Node_Move_Point(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[0] = nodeValue_Vec2("Point", self, [ 0, 0, ]) .setVisible(true, true); - inputs[1] = nodeValue_Enum_Scroll("Mode", self, 0, [ "XY Shift", "Direction + Distance" ]); + newInput(1, nodeValue_Enum_Scroll("Mode", self, 0, [ "XY Shift", "Direction + Distance" ])); - inputs[2] = nodeValue_Vec2("Shift", self, [ 0, 0 ]); + newInput(2, nodeValue_Vec2("Shift", self, [ 0, 0 ])); - inputs[3] = nodeValue_Rotation("Direction", self, 0); + newInput(3, nodeValue_Rotation("Direction", self, 0)); - inputs[4] = nodeValue_Float("Distance", self, 4 ); + newInput(4, nodeValue_Float("Distance", self, 4 )); outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_noise/node_noise.gml b/scripts/node_noise/node_noise.gml index 1172bf537..9c7a08377 100644 --- a/scripts/node_noise/node_noise.gml +++ b/scripts/node_noise/node_noise.gml @@ -1,18 +1,18 @@ function Node_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Noise"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Float("Seed", self, 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_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); + newInput(2, nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ])); - inputs[3] = nodeValue_Slider_Range("Color R range", self, [ 0, 1 ]); + newInput(3, nodeValue_Slider_Range("Color R range", self, [ 0, 1 ])); - inputs[4] = nodeValue_Slider_Range("Color G range", self, [ 0, 1 ]); + newInput(4, nodeValue_Slider_Range("Color G range", self, [ 0, 1 ])); - inputs[5] = nodeValue_Slider_Range("Color B range", self, [ 0, 1 ]); + newInput(5, nodeValue_Slider_Range("Color B range", self, [ 0, 1 ])); input_display_list = [ ["Output", false], 0, diff --git a/scripts/node_noise_aniso/node_noise_aniso.gml b/scripts/node_noise_aniso/node_noise_aniso.gml index bed0af4b1..45b2accb8 100644 --- a/scripts/node_noise_aniso/node_noise_aniso.gml +++ b/scripts/node_noise_aniso/node_noise_aniso.gml @@ -1,7 +1,7 @@ function Node_Noise_Aniso(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Anisotropic Noise"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Float("X Amount", self, 2) .setMappable(6); @@ -20,11 +20,11 @@ function Node_Noise_Aniso(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[6] = nodeValueMap("X Amount map", self); + newInput(6, nodeValueMap("X Amount map", self)); - inputs[7] = nodeValueMap("Y Amount map", self); + newInput(7, nodeValueMap("Y Amount map", self)); - inputs[8] = nodeValueMap("Rotation map", self); + newInput(8, nodeValueMap("Rotation map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_noise_bubble/node_noise_bubble.gml b/scripts/node_noise_bubble/node_noise_bubble.gml index d5cfb49e3..23049c3a2 100644 --- a/scripts/node_noise_bubble/node_noise_bubble.gml +++ b/scripts/node_noise_bubble/node_noise_bubble.gml @@ -10,20 +10,20 @@ function Node_Noise_Bubble(_x, _y, _group = noone) : Node_Shader_Generator(_x, _ .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); addShaderProp(SHADER_UNIFORM.float, "seed"); - inputs[3] = nodeValue_Slider_Range("Scale", self, [ 0.5, 0.8 ] ); + newInput(3, nodeValue_Slider_Range("Scale", self, [ 0.5, 0.8 ] )); addShaderProp(SHADER_UNIFORM.float, "scale"); inputs[4] = nodeValue_Float("Thickness", self, 0 ) .setDisplay(VALUE_DISPLAY.slider); addShaderProp(SHADER_UNIFORM.float, "thickness"); - inputs[5] = nodeValue_Enum_Button("Mode", self, 0 , [ "Line", "Fill" ] ); + newInput(5, nodeValue_Enum_Button("Mode", self, 0 , [ "Line", "Fill" ] )); addShaderProp(SHADER_UNIFORM.integer, "mode"); - inputs[6] = nodeValue_Slider_Range("Opacity", self, [ 0., 1. ] ); + newInput(6, nodeValue_Slider_Range("Opacity", self, [ 0., 1. ] )); addShaderProp(SHADER_UNIFORM.float, "alpha"); - inputs[7] = nodeValue_Enum_Scroll("Blending", self, 0 , [ "Max", "Add" ] ); + newInput(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 5c8fcb178..9d62586da 100644 --- a/scripts/node_noise_cristal/node_noise_cristal.gml +++ b/scripts/node_noise_cristal/node_noise_cristal.gml @@ -2,27 +2,27 @@ function Node_Noise_Cristal(_x, _y, _group = noone) : Node_Shader_Generator(_x, name = "Cristal Noise"; shader = sh_noise_cristal; - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ] ); + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ] )); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[2] = nodeValue_Vec2("Scale", self, [ 1, 1 ] ); + newInput(2, nodeValue_Vec2("Scale", self, [ 1, 1 ] )); addShaderProp(SHADER_UNIFORM.float, "scale"); inputs[3] = nodeValue_Float("Seed", self, 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) }); addShaderProp(SHADER_UNIFORM.float, "seed"); - inputs[4] = nodeValue_Int("Iteration", self, 15 ); + newInput(4, nodeValue_Int("Iteration", self, 15 )); addShaderProp(SHADER_UNIFORM.integer, "iteration"); - inputs[5] = nodeValue_Color("Color", self, c_white ); + newInput(5, nodeValue_Color("Color", self, c_white )); addShaderProp(SHADER_UNIFORM.color, "color"); inputs[6] = nodeValue_Float("Gamma", self, 1 ) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); addShaderProp(SHADER_UNIFORM.float, "gamma"); - inputs[7] = nodeValue_Rotation("Phase", self, 0); + newInput(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 30c0948ad..3ff2c4483 100644 --- a/scripts/node_noise_fbm/node_noise_fbm.gml +++ b/scripts/node_noise_fbm/node_noise_fbm.gml @@ -1,24 +1,24 @@ function Node_Noise_FBM(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "FBM Noise"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Float("Seed", self, 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_Vec2("Position", self, [ 0, 0 ]); + newInput(2, nodeValue_Vec2("Position", self, [ 0, 0 ])); - inputs[3] = nodeValue_Vec2("Scale", self, [ 4, 4 ]); + newInput(3, nodeValue_Vec2("Scale", self, [ 4, 4 ])); - inputs[4] = nodeValue_Int("Iteration", self, 4); + newInput(4, nodeValue_Int("Iteration", self, 4)); - inputs[5] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); + newInput(5, nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ])); - inputs[6] = nodeValue_Slider_Range("Color R range", self, [ 0, 1 ]); + newInput(6, nodeValue_Slider_Range("Color R range", self, [ 0, 1 ])); - inputs[7] = nodeValue_Slider_Range("Color G range", self, [ 0, 1 ]); + newInput(7, nodeValue_Slider_Range("Color G range", self, [ 0, 1 ])); - inputs[8] = nodeValue_Slider_Range("Color B range", self, [ 0, 1 ]); + newInput(8, nodeValue_Slider_Range("Color B range", self, [ 0, 1 ])); input_display_list = [ ["Output", false], 0, diff --git a/scripts/node_noise_hex/node_noise_hex.gml b/scripts/node_noise_hex/node_noise_hex.gml index b4282f517..34a0908e8 100644 --- a/scripts/node_noise_hex/node_noise_hex.gml +++ b/scripts/node_noise_hex/node_noise_hex.gml @@ -11,18 +11,18 @@ 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); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Float("Seed", self, 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_Vec2("Position", self, [ 0, 0] ); + newInput(2, nodeValue_Vec2("Position", self, [ 0, 0] )); - inputs[3] = nodeValue_Vec2("Scale", self, [ 8, 8 ] ); + newInput(3, nodeValue_Vec2("Scale", self, [ 8, 8 ] )); - inputs[4] = nodeValue_Surface("Texture sample", self); + newInput(4, nodeValue_Surface("Texture sample", self)); - inputs[5] = nodeValue_Enum_Scroll("Oversample mode", self, 2, [ "Empty", "Clamp", "Repeat" ]); + newInput(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 141029d71..a5f3928ae 100644 --- a/scripts/node_noise_simplex/node_noise_simplex.gml +++ b/scripts/node_noise_simplex/node_noise_simplex.gml @@ -1,9 +1,9 @@ function Node_Noise_Simplex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Simplex Noise"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Vec3("Position", self, [ 0, 0, 0 ] ); + newInput(1, nodeValue_Vec3("Position", self, [ 0, 0, 0 ] )); inputs[2] = nodeValue_Vec2("Scale", self, [ 1, 1 ] ) .setMappable(8); @@ -12,23 +12,23 @@ 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_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); + newInput(4, nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ])); - inputs[5] = nodeValue_Slider_Range("Color R range", self, [ 0, 1 ]); + newInput(5, nodeValue_Slider_Range("Color R range", self, [ 0, 1 ])); - inputs[6] = nodeValue_Slider_Range("Color G range", self, [ 0, 1 ]); + newInput(6, nodeValue_Slider_Range("Color G range", self, [ 0, 1 ])); - inputs[7] = nodeValue_Slider_Range("Color B range", self, [ 0, 1 ]); + newInput(7, nodeValue_Slider_Range("Color B range", self, [ 0, 1 ])); ////////////////////////////////////////////////////////////////////////////////// - inputs[8] = nodeValueMap("Scale map", self); + newInput(8, nodeValueMap("Scale map", self)); - inputs[9] = nodeValueMap("Iteration map", self); + newInput(9, nodeValueMap("Iteration map", self)); ////////////////////////////////////////////////////////////////////////////////// - inputs[10] = nodeValue_Rotation("Rotation", self, 0); + newInput(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 003bb7e7f..bc55a7387 100644 --- a/scripts/node_noise_strand/node_noise_strand.gml +++ b/scripts/node_noise_strand/node_noise_strand.gml @@ -18,26 +18,26 @@ function Node_Noise_Strand(_x, _y, _group = noone) : Node_Shader_Generator(_x, _ .setDisplay(VALUE_DISPLAY.slider); addShaderProp(SHADER_UNIFORM.float, "slope"); - inputs[5] = nodeValue_Slider_Range("Curve", self, [ 0, 0 ] , { range: [ 0, 4, 0.01 ] }); + newInput(5, nodeValue_Slider_Range("Curve", self, [ 0, 0 ] , { range: [ 0, 4, 0.01 ] })); addShaderProp(SHADER_UNIFORM.float, "curve"); - inputs[6] = nodeValue_Float("Curve scale", self, 1 ); + newInput(6, nodeValue_Float("Curve scale", self, 1 )); addShaderProp(SHADER_UNIFORM.float, "curveDetail"); inputs[7] = nodeValue_Float("Thickness", self, 0 ) .setDisplay(VALUE_DISPLAY.slider); addShaderProp(SHADER_UNIFORM.float, "thickness"); - inputs[8] = nodeValue_Float("Curve shift", self, 0 ); + newInput(8, nodeValue_Float("Curve shift", self, 0 )); addShaderProp(SHADER_UNIFORM.float, "curveShift"); - inputs[9] = nodeValue_Enum_Button("Axis", self, 0 , [ "x", "y" ] ); + newInput(9, nodeValue_Enum_Button("Axis", self, 0 , [ "x", "y" ] )); addShaderProp(SHADER_UNIFORM.integer, "axis"); - inputs[10] = nodeValue_Enum_Button("Mode", self, 0 , [ "Line", "Area" ] ); + newInput(10, nodeValue_Enum_Button("Mode", self, 0 , [ "Line", "Area" ] )); addShaderProp(SHADER_UNIFORM.integer, "mode"); - inputs[11] = nodeValue_Slider_Range("Opacity", self, [ 0., 1. ] ); + newInput(11, nodeValue_Slider_Range("Opacity", self, [ 0., 1. ] )); addShaderProp(SHADER_UNIFORM.float, "alpha"); input_display_list = [ 3, diff --git a/scripts/node_noise_tri/node_noise_tri.gml b/scripts/node_noise_tri/node_noise_tri.gml index 001452fd4..d4efc60a8 100644 --- a/scripts/node_noise_tri/node_noise_tri.gml +++ b/scripts/node_noise_tri/node_noise_tri.gml @@ -11,18 +11,18 @@ 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); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Float("Seed", self, 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_Vec2("Position", self, [ 0, 0] ); + newInput(2, nodeValue_Vec2("Position", self, [ 0, 0] )); - inputs[3] = nodeValue_Vec2("Scale", self, [ 4, 4 ] ); + newInput(3, nodeValue_Vec2("Scale", self, [ 4, 4 ] )); - inputs[4] = nodeValue_Surface("Texture sample", self); + newInput(4, nodeValue_Surface("Texture sample", self)); - inputs[5] = nodeValue_Enum_Scroll("Oversample mode", self, 2, [ "Empty", "Clamp", "Repeat" ]); + newInput(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 fab3be5e4..d007b8f5d 100644 --- a/scripts/node_normal/node_normal.gml +++ b/scripts/node_normal/node_normal.gml @@ -1,14 +1,14 @@ function Node_Normal(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Normal"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("Height", self, 1); + newInput(1, nodeValue_Float("Height", self, 1)); inputs[2] = nodeValue_Float("Smooth", self, 0, "Include diagonal pixel in normal calculation, which leads to smoother output.") .setDisplay(VALUE_DISPLAY.slider, { range : [ 0, 4, 0.1] }); - inputs[3] = nodeValue_Bool("Active", self, true); + newInput(3, nodeValue_Bool("Active", self, true)); active_index = 3; input_display_list = [ 3, diff --git a/scripts/node_normal_light/node_normal_light.gml b/scripts/node_normal_light/node_normal_light.gml index 6bddcbab0..0a27a4028 100644 --- a/scripts/node_normal_light/node_normal_light.gml +++ b/scripts/node_normal_light/node_normal_light.gml @@ -1,29 +1,29 @@ function Node_Normal_Light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Normal Light"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Surface("Normal map", self); + newInput(1, nodeValue_Surface("Normal map", self)); - inputs[2] = nodeValue_Float("Normal intensity", self, 1); + newInput(2, nodeValue_Float("Normal intensity", self, 1)); - inputs[3] = nodeValue_Color("Ambient", self, c_black); + newInput(3, nodeValue_Color("Ambient", self, c_black)); inputs[4] = nodeValue_Vec2("Light position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[5] = nodeValue_Float("Light range", self, 16); + newInput(5, nodeValue_Float("Light range", self, 16)); - inputs[6] = nodeValue_Float("Light intensity", self, 32); + newInput(6, nodeValue_Float("Light intensity", self, 32)); - inputs[7] = nodeValue_Color("Light color", self, c_white); + newInput(7, nodeValue_Color("Light color", self, c_white)); - inputs[8] = nodeValue_Enum_Button("Light type", self, 0, ["Point", "Sun"]); + newInput(8, nodeValue_Enum_Button("Light type", self, 0, ["Point", "Sun"])); - inputs[9] = nodeValue_Bool("Active", self, true); + newInput(9, nodeValue_Bool("Active", self, true)); active_index = 9; - inputs[10] = nodeValue_Float("Light height", self, 1); + newInput(10, nodeValue_Float("Light height", self, 1)); input_display_list = [ 9, 0, ["Normal", false], 1, 2, diff --git a/scripts/node_normalize/node_normalize.gml b/scripts/node_normalize/node_normalize.gml index 3e3d21a9e..2a0c2b92b 100644 --- a/scripts/node_normalize/node_normalize.gml +++ b/scripts/node_normalize/node_normalize.gml @@ -1,9 +1,9 @@ function Node_Normalize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Normalize"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Enum_Button("Mode", self, 0, [ "BW", "RGB" ]); + newInput(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 d178ea0b9..28f95ef4f 100644 --- a/scripts/node_number/node_number.gml +++ b/scripts/node_number/node_number.gml @@ -22,15 +22,15 @@ function Node_Number(_x, _y, _group = noone) : Node(_x, _y, _group) constructor inputs[0] = nodeValue_Float("Value", self, 0) .setVisible(true, true); - inputs[1] = nodeValue_Bool("Integer", self, false); + newInput(1, nodeValue_Bool("Integer", self, false)); - inputs[2] = nodeValue_Enum_Scroll("Display", self, 0, { data: [ "Number", "Slider", "Rotator" ], update_hover: false }); + newInput(2, nodeValue_Enum_Scroll("Display", self, 0, { data: [ "Number", "Slider", "Rotator" ], update_hover: false })); - inputs[3] = nodeValue_Range("Range", self, [ 0, 1 ]); + newInput(3, nodeValue_Range("Range", self, [ 0, 1 ])); - inputs[4] = nodeValue_Float("Step", self, 0.01); + newInput(4, nodeValue_Float("Step", self, 0.01)); - inputs[5] = nodeValue_Bool("Clamp to range", self, true); + newInput(5, nodeValue_Bool("Clamp to range", self, true)); outputs[0] = nodeValue_Output("Number", self, VALUE_TYPE.float, 0); diff --git a/scripts/node_offset/node_offset.gml b/scripts/node_offset/node_offset.gml index ff9cf2a84..a96ff9391 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Float("X Offset", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); @@ -9,7 +9,7 @@ function Node_Offset(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[2] = nodeValue_Float("Y Offset", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[3] = nodeValue_Bool("Active", self, true); + newInput(3, nodeValue_Bool("Active", self, true)); active_index = 3; input_display_list = [ 3, diff --git a/scripts/node_onion_skin/node_onion_skin.gml b/scripts/node_onion_skin/node_onion_skin.gml index 110b9a244..0d28b1877 100644 --- a/scripts/node_onion_skin/node_onion_skin.gml +++ b/scripts/node_onion_skin/node_onion_skin.gml @@ -3,9 +3,9 @@ function Node_Onion_Skin(_x, _y, _group = noone) : Node(_x, _y, _group) construc use_cache = CACHE_USE.manual; clearCacheOnChange = false; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Slider_Range("Range", self, [-1, 1], { range: [ -16, 16, 0.1 ] }); + newInput(1, nodeValue_Slider_Range("Range", self, [-1, 1], { range: [ -16, 16, 0.1 ] })); inputs[2] = nodeValue_Float("Alpha", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_outline/node_outline.gml b/scripts/node_outline/node_outline.gml index 185f5341c..b69052ad0 100644 --- a/scripts/node_outline/node_outline.gml +++ b/scripts/node_outline/node_outline.gml @@ -12,24 +12,24 @@ function Node_Outline(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c triggerRender(); }); - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Int("Width", self, 0) .setDisplay(VALUE_DISPLAY._default, { front_button : filter_button }) .setValidator(VV_min(0)) .setMappable(15); - inputs[2] = nodeValue_Color("Color", self, c_white); + newInput(2, nodeValue_Color("Color", self, c_white)); - inputs[3] = nodeValue_Bool("Blend", self, 0, "Blend outline color with the original color."); + newInput(3, nodeValue_Bool("Blend", self, 0, "Blend outline color with the original color.")); inputs[4] = nodeValue_Float("Blend alpha", self, 1) .setDisplay(VALUE_DISPLAY.slider) .setMappable(16); - inputs[5] = nodeValue_Enum_Button("Position", self, 1, ["Inside", "Outside"]); + newInput(5, nodeValue_Enum_Button("Position", self, 1, ["Inside", "Outside"])); - inputs[6] = nodeValue_Bool("Anti aliasing", self, 0); + newInput(6, nodeValue_Bool("Anti aliasing", self, 0)); 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."); @@ -37,25 +37,25 @@ function Node_Outline(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[8] = nodeValue_Int("Start", self, 0, "Shift outline inside, outside the shape.") .setMappable(17); - inputs[9] = nodeValue_Surface("Mask", self); + newInput(9, nodeValue_Surface("Mask", self)); inputs[10] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[11] = nodeValue_Bool("Active", self, true); + newInput(11, nodeValue_Bool("Active", self, true)); active_index = 11; - inputs[12] = nodeValue_Bool("Crop border", self, false); + newInput(12, nodeValue_Bool("Crop border", self, false)); __init_mask_modifier(9); // inputs 13, 14 ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[15] = nodeValueMap("Width map", self); + newInput(15, nodeValueMap("Width map", self)); - inputs[16] = nodeValueMap("Blend alpha map", self); + newInput(16, nodeValueMap("Blend alpha map", self)); - inputs[17] = nodeValueMap("Start map", self); + newInput(17, nodeValueMap("Start map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_override_channel/node_override_channel.gml b/scripts/node_override_channel/node_override_channel.gml index 362c571c2..f00a821a8 100644 --- a/scripts/node_override_channel/node_override_channel.gml +++ b/scripts/node_override_channel/node_override_channel.gml @@ -1,14 +1,14 @@ function Node_Override_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Override Channel"; - inputs[0] = nodeValue_Surface("Surface", self); + newInput(0, nodeValue_Surface("Surface", self)); - inputs[1] = nodeValue_Surface("Red", self); - inputs[2] = nodeValue_Surface("Green", self); - inputs[3] = nodeValue_Surface("Blue", self); - inputs[4] = nodeValue_Surface("Alpha", self); + newInput(1, nodeValue_Surface("Red", self)); + newInput(2, nodeValue_Surface("Green", self)); + newInput(3, nodeValue_Surface("Blue", self)); + newInput(4, nodeValue_Surface("Alpha", self)); - inputs[5] = nodeValue_Enum_Scroll("Sampling type", self, 0, ["Brightness", "Channel value"]); + newInput(5, nodeValue_Enum_Scroll("Sampling type", self, 0, ["Brightness", "Channel value"])); outputs[0] = nodeValue_Output("Surface out", self, 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 a7003bd22..1267150d3 100644 --- a/scripts/node_pack_sprites/node_pack_sprites.gml +++ b/scripts/node_pack_sprites/node_pack_sprites.gml @@ -1,15 +1,15 @@ function Node_Pack_Sprites(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Pack Sprites"; - inputs[0] = nodeValue_Surface("Sprites", self); + newInput(0, nodeValue_Surface("Sprites", self)); - inputs[1] = nodeValue_Enum_Scroll("Algorithm", self, 0, { data: [ "Skyline", "Shelf", "Top left", "Best fit" ], update_hover: false }); + newInput(1, nodeValue_Enum_Scroll("Algorithm", self, 0, { data: [ "Skyline", "Shelf", "Top left", "Best fit" ], update_hover: false })); - inputs[2] = nodeValue_Int("Max width", self, 128); + newInput(2, nodeValue_Int("Max width", self, 128)); - inputs[3] = nodeValue_Int("Max height", self, 128); + newInput(3, nodeValue_Int("Max height", self, 128)); - inputs[4] = nodeValue_Int("Spacing", self, 0); + newInput(4, nodeValue_Int("Spacing", self, 0)); outputs[0] = nodeValue_Output("Packed image", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_padding/node_padding.gml b/scripts/node_padding/node_padding.gml index 885b6970b..ee9dd372f 100644 --- a/scripts/node_padding/node_padding.gml +++ b/scripts/node_padding/node_padding.gml @@ -2,25 +2,25 @@ function Node_Padding(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c name = "Padding"; dimension_index = -1; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Padding("Padding", self, [0, 0, 0, 0]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[2] = nodeValue_Enum_Scroll("Fill method", self, 0, [ "Empty", "Solid" ]); + newInput(2, nodeValue_Enum_Scroll("Fill method", self, 0, [ "Empty", "Solid" ])); - inputs[3] = nodeValue_Color("Fill color", self, c_black); + newInput(3, nodeValue_Color("Fill color", self, c_black)); - inputs[4] = nodeValue_Bool("Active", self, true); + newInput(4, nodeValue_Bool("Active", self, true)); active_index = 4; - inputs[5] = nodeValue_Enum_Button("Pad mode", self, 0, [ "Pad out", "Pad to size" ]); + newInput(5, nodeValue_Enum_Button("Pad mode", self, 0, [ "Pad out", "Pad to size" ])); inputs[6] = nodeValue_Vec2("Target dimension", self, DEF_SURF) - inputs[7] = nodeValue_Enum_Button("Horizontal alignment", self, 0 , [ THEME.inspector_surface_halign, THEME.inspector_surface_halign, THEME.inspector_surface_halign]); + newInput(7, nodeValue_Enum_Button("Horizontal alignment", self, 0 , [ THEME.inspector_surface_halign, THEME.inspector_surface_halign, THEME.inspector_surface_halign])); - inputs[8] = nodeValue_Enum_Button("Vertical alignment", self, 0 , [ THEME.inspector_surface_valign, THEME.inspector_surface_valign, THEME.inspector_surface_valign ]); + newInput(8, nodeValue_Enum_Button("Vertical alignment", self, 0 , [ THEME.inspector_surface_valign, THEME.inspector_surface_valign, THEME.inspector_surface_valign ])); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_palette/node_palette.gml b/scripts/node_palette/node_palette.gml index 5373cf351..79136ea35 100644 --- a/scripts/node_palette/node_palette.gml +++ b/scripts/node_palette/node_palette.gml @@ -2,9 +2,9 @@ function Node_Palette(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c name = "Palette"; setDimension(96); - inputs[0] = nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE)); + newInput(0, nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE))); - inputs[1] = nodeValue_Slider_Range("Trim range", self, [ 0, 1 ]); + newInput(1, nodeValue_Slider_Range("Trim range", self, [ 0, 1 ])); outputs[0] = nodeValue_Output("Palette", self, VALUE_TYPE.color, []) .setDisplay(VALUE_DISPLAY.palette); diff --git a/scripts/node_palette_extract/node_palette_extract.gml b/scripts/node_palette_extract/node_palette_extract.gml index 0ca8a27ea..aca0f646d 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Int("Max colors", self, 5, "Amount of color in a palette.") .rejectArray(); diff --git a/scripts/node_palette_replace/node_palette_replace.gml b/scripts/node_palette_replace/node_palette_replace.gml index 33c0bf654..83e19f738 100644 --- a/scripts/node_palette_replace/node_palette_replace.gml +++ b/scripts/node_palette_replace/node_palette_replace.gml @@ -5,9 +5,9 @@ function Node_Palette_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _ inputs[0] = nodeValue_Palette("Palette in", self, array_clone(DEF_PALETTE)) .setVisible(true, true); - inputs[1] = nodeValue_Palette("Palette from", self, array_clone(DEF_PALETTE)); + newInput(1, nodeValue_Palette("Palette from", self, array_clone(DEF_PALETTE))); - inputs[2] = nodeValue_Palette("Palette to", self, array_clone(DEF_PALETTE)); + newInput(2, nodeValue_Palette("Palette to", self, array_clone(DEF_PALETTE))); inputs[3] = nodeValue_Float("Threshold", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_palette_shift/node_palette_shift.gml b/scripts/node_palette_shift/node_palette_shift.gml index 1fa06263d..43b03555f 100644 --- a/scripts/node_palette_shift/node_palette_shift.gml +++ b/scripts/node_palette_shift/node_palette_shift.gml @@ -1,22 +1,22 @@ function Node_Palette_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Palette Shift"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE)); + newInput(1, nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE))); inputs[2] = nodeValue_Int("Shift", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.1] }); - inputs[3] = nodeValue_Surface("Mask", self); + newInput(3, nodeValue_Surface("Mask", self)); inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_Bool("Active", self, true); + newInput(5, nodeValue_Bool("Active", self, true)); active_index = 5; - inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(6, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(3); // inputs 7, 8 diff --git a/scripts/node_palette_sort/node_palette_sort.gml b/scripts/node_palette_sort/node_palette_sort.gml index 7f868ce4c..92ec2542d 100644 --- a/scripts/node_palette_sort/node_palette_sort.gml +++ b/scripts/node_palette_sort/node_palette_sort.gml @@ -8,7 +8,7 @@ function Node_Palette_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro 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_Bool("Reverse", self, false); + newInput(2, nodeValue_Bool("Reverse", self, false)); inputs[3] = nodeValue_Text("Sort Order", self, "RGB", @"Compose sorting algorithm using string. - RGB: Red/Green/Blur channel diff --git a/scripts/node_particle/node_particle.gml b/scripts/node_particle/node_particle.gml index e1cbd0c81..2b210f7cb 100644 --- a/scripts/node_particle/node_particle.gml +++ b/scripts/node_particle/node_particle.gml @@ -7,17 +7,17 @@ function Node_Particle(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y, _ return [ _inp[0], _inp[1] ]; }; - inputs[input_len + 0] = nodeValue_Vec2("Output dimension", self, DEF_SURF); + newInput(input_len + 0, nodeValue_Vec2("Output dimension", self, DEF_SURF)); - inputs[input_len + 1] = nodeValue_Bool("Round position", self, true, "Round position to the closest integer value to avoid jittering."); + newInput(input_len + 1, nodeValue_Bool("Round position", self, true, "Round position to the closest integer value to avoid jittering.")); - inputs[input_len + 2] = nodeValue_Enum_Scroll("Blend mode", self, 0 , [ "Normal", "Alpha", "Additive" ]); + newInput(input_len + 2, nodeValue_Enum_Scroll("Blend mode", self, 0 , [ "Normal", "Alpha", "Additive" ])); - inputs[input_len + 3] = nodeValue_Surface("Background", self); + newInput(input_len + 3, nodeValue_Surface("Background", self)); - inputs[input_len + 4] = nodeValue_Enum_Button("Render Type", self, PARTICLE_RENDER_TYPE.surface , [ "Surface", "Line" ]); + newInput(input_len + 4, nodeValue_Enum_Button("Render Type", self, PARTICLE_RENDER_TYPE.surface , [ "Surface", "Line" ])); - inputs[input_len + 5] = nodeValue_Int("Line life", self, 4 ); + newInput(input_len + 5, nodeValue_Int("Line life", self, 4 )); inputs[3].setUnitRef(onSurfaceSize, VALUE_UNIT.reference); inputs[3].setDefValue( DEF_AREA_REF ); diff --git a/scripts/node_path/node_path.gml b/scripts/node_path/node_path.gml index 0298ee310..f1ce13394 100644 --- a/scripts/node_path/node_path.gml +++ b/scripts/node_path/node_path.gml @@ -105,7 +105,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static createNewInput = function(_x = 0, _y = 0, _dxx = 0, _dxy = 0, _dyx = 0, _dyy = 0, rec = true) { #region var index = array_length(inputs); - inputs[index] = nodeValue_Path_Anchor("Anchor", self, [ _x, _y, _dxx, _dxy, _dyx, _dyy, false ]); + newInput(index, nodeValue_Path_Anchor("Anchor", self, [ _x, _y, _dxx, _dxy, _dyx, _dyy, false ])); if(rec) { recordAction(ACTION_TYPE.list_insert, inputs, [ inputs[index], index, $"add path anchor point {index}" ]); diff --git a/scripts/node_path_3d/node_path_3d.gml b/scripts/node_path_3d/node_path_3d.gml index 92875c3b7..f0a2e95d1 100644 --- a/scripts/node_path_3d/node_path_3d.gml +++ b/scripts/node_path_3d/node_path_3d.gml @@ -114,7 +114,7 @@ function Node_Path_3D(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var index = array_length(inputs); - inputs[index] = nodeValue_Path_Anchor_3D("Anchor", self, [ _x, _y, _z, _dxx, _dxy, _dxz, _dyx, _dyy, _dyz, false ]); + newInput(index, nodeValue_Path_Anchor_3D("Anchor", self, [ _x, _y, _z, _dxx, _dxy, _dxz, _dyx, _dyy, _dyz, false ])); if(!rec) return inputs[index]; diff --git a/scripts/node_path_anchor/node_path_anchor.gml b/scripts/node_path_anchor/node_path_anchor.gml index 5e6275c71..662d804db 100644 --- a/scripts/node_path_anchor/node_path_anchor.gml +++ b/scripts/node_path_anchor/node_path_anchor.gml @@ -6,11 +6,11 @@ function Node_Path_Anchor(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[0] = nodeValue_Vec2("Postion", self, [ 0, 0 ] ) .setVisible(true, true); - inputs[1] = nodeValue_Vec2("Control point 1", self, [ -16, 0 ] ); + newInput(1, nodeValue_Vec2("Control point 1", self, [ -16, 0 ] )); - inputs[2] = nodeValue_Vec2("Control point 2", self, [ 16, 0 ] ); + newInput(2, nodeValue_Vec2("Control point 2", self, [ 16, 0 ] )); - inputs[3] = nodeValue_Bool("Mirror control point", self, true ); + newInput(3, nodeValue_Bool("Mirror control point", self, true )); outputs[0] = nodeValue_Output("Anchor", self, VALUE_TYPE.float, [ 0, 0, 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_path_bake/node_path_bake.gml b/scripts/node_path_bake/node_path_bake.gml index 6666e497b..585b54ff7 100644 --- a/scripts/node_path_bake/node_path_bake.gml +++ b/scripts/node_path_bake/node_path_bake.gml @@ -5,9 +5,9 @@ function Node_Path_Bake(_x, _y, _group = noone) : Node(_x, _y, _group) construct inputs[0] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - inputs[1] = nodeValue_Float("Segment length", self, 1); + newInput(1, nodeValue_Float("Segment length", self, 1)); - inputs[2] = nodeValue_Bool("Spread single path", self, true); + newInput(2, nodeValue_Bool("Spread single path", self, true)); outputs[0] = nodeValue_Output("Segments", self, VALUE_TYPE.float, [[]]) .setDisplay(VALUE_DISPLAY.vector) diff --git a/scripts/node_path_builder/node_path_builder.gml b/scripts/node_path_builder/node_path_builder.gml index e361a7243..e01b69ab3 100644 --- a/scripts/node_path_builder/node_path_builder.gml +++ b/scripts/node_path_builder/node_path_builder.gml @@ -21,7 +21,7 @@ function Node_Path_Builder(_x, _y, _group = noone) : Node(_x, _y, _group) constr .setVisible(true, true) .setArrayDepth(2); - inputs[1] = nodeValue_Bool("Loop", self, false); + newInput(1, nodeValue_Bool("Loop", self, false)); outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); 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 4161b7997..c48c136de 100644 --- a/scripts/node_path_from_mask/node_path_from_mask.gml +++ b/scripts/node_path_from_mask/node_path_from_mask.gml @@ -1,9 +1,9 @@ function Node_Path_From_Mask(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Path from Mask"; - inputs[0] = nodeValue_Surface("Mask", self); + newInput(0, nodeValue_Surface("Mask", self)); - inputs[1] = nodeValue_Float("Smooth angle", self, 15); + newInput(1, nodeValue_Float("Smooth angle", self, 15)); outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); 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 d70e229db..1a18d0ce2 100644 --- a/scripts/node_path_l_system/node_path_l_system.gml +++ b/scripts/node_path_l_system/node_path_l_system.gml @@ -14,27 +14,27 @@ function Node_Path_L_System(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr name = "L System"; setDimension(96, 48); - inputs[0] = nodeValue_Float("Length", self, 8); + newInput(0, nodeValue_Float("Length", self, 8)); - inputs[1] = nodeValue_Rotation("Angle", self, 45); + newInput(1, nodeValue_Rotation("Angle", self, 45)); - inputs[2] = nodeValue_Vec2("Starting position", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ]); + newInput(2, nodeValue_Vec2("Starting position", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ])); - inputs[3] = nodeValue_Int("Iteration", self, 4); + newInput(3, nodeValue_Int("Iteration", self, 4)); - inputs[4] = nodeValue_Text("Starting rule", self, "", o_dialog_l_system); + newInput(4, nodeValue_Text("Starting rule", self, "", o_dialog_l_system)); - inputs[5] = nodeValue_Text("End replacement", self, "", "Replace symbol of the last generated rule, for example a=F to replace all a with F. Use comma to separate different replacements."); + newInput(5, nodeValue_Text("End replacement", self, "", "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_Rotation("Starting Angle", self, 90); + newInput(6, nodeValue_Rotation("Starting Angle", self, 90)); inputs[7] = nodeValue_Int("Seed", self, 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) }); static createNewInput = function() { var index = array_length(inputs); - inputs[index + 0] = nodeValue_Text("Name " + string(index - input_fix_len), self, "" ); - inputs[index + 1] = nodeValue_Text("Rule " + string(index - input_fix_len), self, "" ); + newInput(index + 0, nodeValue_Text("Name " + string(index - input_fix_len), self, "" )); + newInput(index + 1, nodeValue_Text("Rule " + string(index - input_fix_len), self, "" )); return inputs[index + 0]; } diff --git a/scripts/node_path_map/node_path_map.gml b/scripts/node_path_map/node_path_map.gml index 24396a1e8..cf2e28cc8 100644 --- a/scripts/node_path_map/node_path_map.gml +++ b/scripts/node_path_map/node_path_map.gml @@ -5,9 +5,9 @@ function Node_Path_Map(_x, _y, _group = noone) : Node(_x, _y, _group) constructo .setVisible(true, true) .rejectArray(); - inputs[1] = nodeValue_Dimension(self); + newInput(1, nodeValue_Dimension(self)); - inputs[2] = nodeValue_Surface("Texture", self); + newInput(2, nodeValue_Surface("Texture", self)); inputs[3] = nodeValue_Int("Subdivision", self, 16) .setValidator(VV_min(2)) diff --git a/scripts/node_path_map_area/node_path_map_area.gml b/scripts/node_path_map_area/node_path_map_area.gml index 37b6f13a5..cd239404e 100644 --- a/scripts/node_path_map_area/node_path_map_area.gml +++ b/scripts/node_path_map_area/node_path_map_area.gml @@ -5,7 +5,7 @@ function Node_Path_Map_Area(_x, _y, _group = noone) : Node(_x, _y, _group) const inputs[0] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - inputs[1] = nodeValue_Area("Area", self, DEF_AREA, { useShape : false }); + newInput(1, nodeValue_Area("Area", self, DEF_AREA, { useShape : false })); inputs[1].editWidget.adjust_shape = false; outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); diff --git a/scripts/node_path_plot/node_path_plot.gml b/scripts/node_path_plot/node_path_plot.gml index db06774a6..d6897cd6f 100644 --- a/scripts/node_path_plot/node_path_plot.gml +++ b/scripts/node_path_plot/node_path_plot.gml @@ -3,25 +3,25 @@ function Node_Path_Plot(_x, _y, _group = noone) : Node(_x, _y, _group) construct length = 0; setDimension(96, 48);; - inputs[0] = nodeValue_Vec2("Output scale", self, [ 8, 8 ]); + newInput(0, nodeValue_Vec2("Output scale", self, [ 8, 8 ])); 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_Enum_Scroll("Equation type", self, 0, eq_type_car); + newInput(2, nodeValue_Enum_Scroll("Equation type", self, 0, eq_type_car)); - inputs[3] = nodeValue_Text("0 function", self, ""); - inputs[4] = nodeValue_Text("1 function", self, ""); + newInput(3, nodeValue_Text("0 function", self, "")); + newInput(4, nodeValue_Text("1 function", self, "")); - inputs[5] = nodeValue_Vec2("Origin", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ] ); + newInput(5, nodeValue_Vec2("Origin", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ] )); - inputs[6] = nodeValue_Slider_Range("Range", self, [ 0, 1 ], { range: [ -1, 1, 0.01 ] }); + newInput(6, nodeValue_Slider_Range("Range", self, [ 0, 1 ], { range: [ -1, 1, 0.01 ] })); - inputs[7] = nodeValue_Vec2("Input scale", self, [ 1, 1 ]); + newInput(7, nodeValue_Vec2("Input scale", self, [ 1, 1 ])); - inputs[8] = nodeValue_Vec2("Input shift", self, [ 0, 0 ]); + newInput(8, nodeValue_Vec2("Input shift", self, [ 0, 0 ])); outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); diff --git a/scripts/node_path_profile/node_path_profile.gml b/scripts/node_path_profile/node_path_profile.gml index 131e62450..9a002cad9 100644 --- a/scripts/node_path_profile/node_path_profile.gml +++ b/scripts/node_path_profile/node_path_profile.gml @@ -1,24 +1,24 @@ function Node_Path_Profile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Draw Path Profile"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_PathNode("Path", self, noone ) .setVisible(true, true); - inputs[2] = nodeValue_Int("Resolution", self, 64 ); + newInput(2, nodeValue_Int("Resolution", self, 64 )); - inputs[3] = nodeValue_Enum_Button("Side", self, 0 , [ "L", "R", "T", "D" ]); + newInput(3, nodeValue_Enum_Button("Side", self, 0 , [ "L", "R", "T", "D" ])); - inputs[4] = nodeValue_Bool("Mirror", self, false ); + newInput(4, nodeValue_Bool("Mirror", self, false )); - inputs[5] = nodeValue_Color("Color", self, c_white ); + newInput(5, nodeValue_Color("Color", self, c_white )); - inputs[6] = nodeValue_Bool("Anti Aliasing", self, false ); + newInput(6, nodeValue_Bool("Anti Aliasing", self, false )); - inputs[7] = nodeValue_Bool("Background", self, false ); + newInput(7, nodeValue_Bool("Background", self, false )); - inputs[8] = nodeValue_Color("BG Color", self, c_black ); + newInput(8, nodeValue_Color("BG Color", self, c_black )); outputs[0] = nodeValue_Output("Output", self, VALUE_TYPE.surface, noone ); diff --git a/scripts/node_path_sample/node_path_sample.gml b/scripts/node_path_sample/node_path_sample.gml index 4efdf38b9..4b99fecfb 100644 --- a/scripts/node_path_sample/node_path_sample.gml +++ b/scripts/node_path_sample/node_path_sample.gml @@ -6,9 +6,9 @@ function Node_Path_Sample(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[0] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - inputs[1] = nodeValue_Float("Ratio", self, 0); + newInput(1, nodeValue_Float("Ratio", self, 0)); - inputs[2] = nodeValue_Enum_Scroll("Type", self, 0, [ "Loop", "Ping pong" ]); + newInput(2, nodeValue_Enum_Scroll("Type", self, 0, [ "Loop", "Ping pong" ])); outputs[0] = nodeValue_Output("Position", self, 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 553ed2eb2..d390368f7 100644 --- a/scripts/node_path_scatter/node_path_scatter.gml +++ b/scripts/node_path_scatter/node_path_scatter.gml @@ -8,29 +8,29 @@ function Node_Path_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[1] = nodeValue_PathNode("Scatter Path", self, noone) .setVisible(true, true); - inputs[2] = nodeValue_Slider_Range("Range", self, [ 0, 1 ]); + newInput(2, nodeValue_Slider_Range("Range", self, [ 0, 1 ])); - inputs[3] = nodeValue_Int("Amount", self, 4); + newInput(3, nodeValue_Int("Amount", self, 4)); - inputs[4] = nodeValue_Slider_Range("Scale", self, [ 0.5, 1 ]); + newInput(4, nodeValue_Slider_Range("Scale", self, [ 0.5, 1 ])); inputs[5] = nodeValue_Float("Seed", self, 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("Scale over Length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + newInput(6, nodeValue("Scale over Length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11)); - inputs[7] = nodeValue_Rotation_Random("Rotation", self, [ 0, 45, 135, 0, 0 ] ); + newInput(7, nodeValue_Rotation_Random("Rotation", self, [ 0, 45, 135, 0, 0 ] )); - inputs[8] = nodeValue_Enum_Scroll("Distribution", self, 0 , [ "Uniform", "Random" ]); + newInput(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); + newInput(9, nodeValue("Trim over Length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11)); inputs[10] = nodeValue_Float("Range", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[11] = nodeValue_Bool("Flip if Negative", self, false ); + newInput(11, nodeValue_Bool("Flip if Negative", self, false )); - inputs[12] = nodeValue_Enum_Scroll("Origin", self, 0 , [ "Individual", "First", "Zero" ]); + newInput(12, nodeValue_Enum_Scroll("Origin", self, 0 , [ "Individual", "First", "Zero" ])); outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); diff --git a/scripts/node_path_separate_folder/node_path_separate_folder.gml b/scripts/node_path_separate_folder/node_path_separate_folder.gml index 7d34a396c..0c84e54cf 100644 --- a/scripts/node_path_separate_folder/node_path_separate_folder.gml +++ b/scripts/node_path_separate_folder/node_path_separate_folder.gml @@ -6,7 +6,7 @@ function Node_Path_Separate_Folder(_x, _y, _group = noone) : Node_Processor(_x, inputs[0] = nodeValue_Path("Path", self, "") .setVisible(true, true); - inputs[1] = nodeValue_Bool("Keep extension", self, true); + newInput(1, nodeValue_Bool("Keep extension", self, true)); outputs[0] = nodeValue_Output("Directory", self, VALUE_TYPE.path, ""); diff --git a/scripts/node_path_shift/node_path_shift.gml b/scripts/node_path_shift/node_path_shift.gml index 796715942..eaf5d71ee 100644 --- a/scripts/node_path_shift/node_path_shift.gml +++ b/scripts/node_path_shift/node_path_shift.gml @@ -5,7 +5,7 @@ function Node_Path_Shift(_x, _y, _group = noone) : Node(_x, _y, _group) construc inputs[0] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - inputs[1] = nodeValue_Float("Distance", self, 0); + newInput(1, nodeValue_Float("Distance", self, 0)); outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); diff --git a/scripts/node_path_smooth/node_path_smooth.gml b/scripts/node_path_smooth/node_path_smooth.gml index 1b60239a8..f6411f3b8 100644 --- a/scripts/node_path_smooth/node_path_smooth.gml +++ b/scripts/node_path_smooth/node_path_smooth.gml @@ -57,7 +57,7 @@ function Node_Path_Smooth(_x, _y, _group = noone) : Node(_x, _y, _group) constru static createNewInput = function(_x = 0, _y = 0) { #region var index = array_length(inputs); - inputs[index] = nodeValue_Vec2("Anchor", self, [ _x, _y ]); + newInput(index, nodeValue_Vec2("Anchor", self, [ _x, _y ])); recordAction(ACTION_TYPE.list_insert, inputs, [ inputs[index], index, "add path anchor point" ]); resetDisplayList(); diff --git a/scripts/node_path_transform/node_path_transform.gml b/scripts/node_path_transform/node_path_transform.gml index 840eb67fe..7a586957e 100644 --- a/scripts/node_path_transform/node_path_transform.gml +++ b/scripts/node_path_transform/node_path_transform.gml @@ -5,13 +5,13 @@ function Node_Path_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) cons inputs[0] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]); + newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ])); - inputs[2] = nodeValue_Rotation("Rotation", self, 0); + newInput(2, nodeValue_Rotation("Rotation", self, 0)); - inputs[3] = nodeValue_Vec2("Scale", self, [ 1, 1 ]); + newInput(3, nodeValue_Vec2("Scale", self, [ 1, 1 ])); - inputs[4] = nodeValue_Vec2("Anchor", self, [ 0, 0 ]); + newInput(4, nodeValue_Vec2("Anchor", self, [ 0, 0 ])); outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); diff --git a/scripts/node_path_trim/node_path_trim.gml b/scripts/node_path_trim/node_path_trim.gml index d5204e9ab..2a1ca419f 100644 --- a/scripts/node_path_trim/node_path_trim.gml +++ b/scripts/node_path_trim/node_path_trim.gml @@ -5,7 +5,7 @@ function Node_Path_Trim(_x, _y, _group = noone) : Node(_x, _y, _group) construct inputs[0] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - inputs[1] = nodeValue_Slider_Range("Range", self, [ 0, 1 ]); + newInput(1, nodeValue_Slider_Range("Range", self, [ 0, 1 ])); outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); diff --git a/scripts/node_path_wave/node_path_wave.gml b/scripts/node_path_wave/node_path_wave.gml index 67fe71097..b5a494746 100644 --- a/scripts/node_path_wave/node_path_wave.gml +++ b/scripts/node_path_wave/node_path_wave.gml @@ -5,24 +5,24 @@ function Node_Path_Wave(_x, _y, _group = noone) : Node(_x, _y, _group) construct inputs[0] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - inputs[1] = nodeValue_Range("Frequency", self, [ 4, 4 ], { linked : true }); + newInput(1, nodeValue_Range("Frequency", self, [ 4, 4 ], { linked : true })); - inputs[2] = nodeValue_Range("Amplitude", self, [ 4, 4 ], { linked : true }); + newInput(2, nodeValue_Range("Amplitude", self, [ 4, 4 ], { linked : true })); - inputs[3] = nodeValue_Range("Shift", self, [ 0, 0 ], { linked : true }); + newInput(3, nodeValue_Range("Shift", self, [ 0, 0 ], { linked : true })); - inputs[4] = nodeValue_Bool("Smooth", self, false); + newInput(4, nodeValue_Bool("Smooth", self, false)); inputs[5] = nodeValue_Float("Seed", self, 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_Bool("Wiggle", self, false); + newInput(6, nodeValue_Bool("Wiggle", self, false)); - inputs[7] = nodeValue_Range("Wiggle Amplitude", self, [ -2, 2 ]); + newInput(7, nodeValue_Range("Wiggle Amplitude", self, [ -2, 2 ])); - inputs[8] = nodeValue_Float("Wiggle Frequency", self, 8); + newInput(8, nodeValue_Float("Wiggle Frequency", self, 8)); - inputs[9] = nodeValue("Amplitude over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + newInput(9, nodeValue("Amplitude over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11)); outputs[0] = nodeValue_Output("Path", self, VALUE_TYPE.pathnode, self); 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 84286b6d5..32be87e38 100644 --- a/scripts/node_pb_box_contract/node_pb_box_contract.gml +++ b/scripts/node_pb_box_contract/node_pb_box_contract.gml @@ -5,14 +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_Enum_Scroll("Type", self, 0 , [ "Ratio", "Fix" ]); + newInput(2, nodeValue_Enum_Scroll("Type", self, 0 , [ "Ratio", "Fix" ])); inputs[3] = nodeValue_Float("Ratio", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); inputs[4] = nodeValue_Int("Fix Width", self, 8 ) - inputs[5] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ]); + newInput(5, nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ])); outputs[0] = nodeValue_Output("pBox Center", self, 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 a1b1fbc46..50356e145 100644 --- a/scripts/node_pb_box_divide/node_pb_box_divide.gml +++ b/scripts/node_pb_box_divide/node_pb_box_divide.gml @@ -5,15 +5,15 @@ function Node_PB_Box_Divide(_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_Int("Amount", self, 2 ); + newInput(2, nodeValue_Int("Amount", self, 2 )); - inputs[3] = nodeValue_Int("Spacing", self, 1 ); + newInput(3, nodeValue_Int("Spacing", self, 1 )); - inputs[4] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ]); + newInput(4, nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ])); inputs[5] = nodeValue_Bool("Mirror", self, 0 ) - inputs[6] = nodeValue_Enum_Button("Spacing", self, 0 , [ "Space Between", "Space Around", "Begin", "End" ]); + newInput(6, nodeValue_Enum_Button("Spacing", self, 0 , [ "Space Between", "Space Around", "Begin", "End" ])); outputs[0] = nodeValue_Output("pBox Content", self, VALUE_TYPE.pbBox, [ noone ] ); diff --git a/scripts/node_pb_box_divide_grid/node_pb_box_divide_grid.gml b/scripts/node_pb_box_divide_grid/node_pb_box_divide_grid.gml index 0d8d9096e..c494145fc 100644 --- a/scripts/node_pb_box_divide_grid/node_pb_box_divide_grid.gml +++ b/scripts/node_pb_box_divide_grid/node_pb_box_divide_grid.gml @@ -4,9 +4,9 @@ function Node_PB_Box_Divide_Grid(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _ inputs[1] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) .setVisible(true, true); - inputs[2] = nodeValue_Vec2("Amount", self, [ 2, 2 ] ); + newInput(2, nodeValue_Vec2("Amount", self, [ 2, 2 ] )); - inputs[3] = nodeValue_Int("Spacing", self, 1 ); + newInput(3, nodeValue_Int("Spacing", self, 1 )); inputs[4] = nodeValue_Bool("Mirror", self, 0 ) 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 f203ae7a7..01adddad3 100644 --- a/scripts/node_pb_box_inset/node_pb_box_inset.gml +++ b/scripts/node_pb_box_inset/node_pb_box_inset.gml @@ -5,9 +5,9 @@ function Node_PB_Box_Inset(_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_Padding("Inset", self, [ 2, 2, 2, 2 ] ); + newInput(2, nodeValue_Padding("Inset", self, [ 2, 2, 2, 2 ] )); - inputs[3] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Padding", "Ratio" ]); + newInput(3, nodeValue_Enum_Scroll("Type", self, 0 , [ "Padding", "Ratio" ])); inputs[4] = nodeValue_Float("Width", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_pb_box_mirror/node_pb_box_mirror.gml b/scripts/node_pb_box_mirror/node_pb_box_mirror.gml index b737d4db7..0b8b82472 100644 --- a/scripts/node_pb_box_mirror/node_pb_box_mirror.gml +++ b/scripts/node_pb_box_mirror/node_pb_box_mirror.gml @@ -4,9 +4,9 @@ function Node_PB_Box_Mirror(_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_Bool("Horizontal", self, false ); + newInput(2, nodeValue_Bool("Horizontal", self, false )); - inputs[3] = nodeValue_Bool("Vertical", self, false ); + newInput(3, nodeValue_Bool("Vertical", self, false )); outputs[0] = nodeValue_Output("pBox", self, VALUE_TYPE.pbBox, noone ); 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 aa4272d81..d35587d8e 100644 --- a/scripts/node_pb_box_split/node_pb_box_split.gml +++ b/scripts/node_pb_box_split/node_pb_box_split.gml @@ -5,14 +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_Enum_Scroll("Type", self, 0 , [ "Ratio", "Fix Left", "Fix Right" ]); + newInput(2, nodeValue_Enum_Scroll("Type", self, 0 , [ "Ratio", "Fix Left", "Fix Right" ])); inputs[3] = nodeValue_Float("Ratio", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); inputs[4] = nodeValue_Int("Fix width", self, 8 ) - inputs[5] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ]); + newInput(5, nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ])); inputs[6] = nodeValue_Bool("Mirror", self, 0 ) diff --git a/scripts/node_pb_box_transform/node_pb_box_transform.gml b/scripts/node_pb_box_transform/node_pb_box_transform.gml index 2011cb44e..058ef617c 100644 --- a/scripts/node_pb_box_transform/node_pb_box_transform.gml +++ b/scripts/node_pb_box_transform/node_pb_box_transform.gml @@ -4,7 +4,7 @@ function Node_PB_Box_Transform(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _gr inputs[1] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) .setVisible(true, true); - inputs[2] = nodeValue_Vec2("Translate", self, [ 0, 0 ] ); + newInput(2, nodeValue_Vec2("Translate", self, [ 0, 0 ] )); outputs[0] = nodeValue_Output("pBox", self, VALUE_TYPE.pbBox, noone ); diff --git a/scripts/node_pb_draw/node_pb_draw.gml b/scripts/node_pb_draw/node_pb_draw.gml index edf243713..3553e3ef5 100644 --- a/scripts/node_pb_draw/node_pb_draw.gml +++ b/scripts/node_pb_draw/node_pb_draw.gml @@ -4,9 +4,9 @@ function Node_PB_Draw(_x, _y, _group = noone) : Node_PB(_x, _y, _group) construc inputs[0] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) .setVisible(true, true); - inputs[1] = nodeValue_Color("Color", self, c_white ); + newInput(1, nodeValue_Color("Color", self, c_white )); - inputs[2] = nodeValue_Bool("Apply Mask", self, true ); + newInput(2, nodeValue_Bool("Apply Mask", self, true )); outputs[0] = nodeValue_Output("pBox", self, VALUE_TYPE.pbBox, noone); 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 842c3b66c..54ac9313b 100644 --- a/scripts/node_pb_draw_angle/node_pb_draw_angle.gml +++ b/scripts/node_pb_draw_angle/node_pb_draw_angle.gml @@ -1,7 +1,7 @@ function Node_PB_Draw_Angle(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group) constructor { name = "Angle"; - inputs[3] = nodeValue_Enum_Button("Side", self, 0 , array_create(4, THEME.obj_angle) ); + newInput(3, nodeValue_Enum_Button("Side", self, 0 , array_create(4, THEME.obj_angle) )); inputs[4] = nodeValue_Bool("Round", self, 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 294355ee6..5f2e7a1d1 100644 --- a/scripts/node_pb_draw_line/node_pb_draw_line.gml +++ b/scripts/node_pb_draw_line/node_pb_draw_line.gml @@ -1,7 +1,7 @@ function Node_PB_Draw_Line(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group) constructor { name = "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 ] ); + newInput(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_Int("Thickness", self, 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 69f577c32..86c7de633 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,16 +1,16 @@ function Node_PB_Draw_Round_Rectangle(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group) constructor { name = "Round Rectangle"; - inputs[3] = nodeValue_Enum_Scroll("Type", self, 0 , [ "Uniform", "Per Corner" ]); + newInput(3, nodeValue_Enum_Scroll("Type", self, 0 , [ "Uniform", "Per Corner" ])); - inputs[4] = nodeValue_Int("Corner Radius", self, 1 ); + newInput(4, nodeValue_Int("Corner Radius", self, 1 )); inputs[5] = nodeValue_Corner("Corner Radius", self, [ 1, 1, 1, 1 ] ) .setArrayDepth(1); - inputs[6] = nodeValue_Bool("Relative", self, false ); + newInput(6, nodeValue_Bool("Relative", self, false )); - inputs[7] = nodeValue_Bool("Cut Corner", self, false ); + newInput(7, nodeValue_Bool("Cut Corner", self, false )); input_display_list = [ ["Draw", false], 0, 1, 2, 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 148351ca7..09197c3f0 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,7 +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_Enum_Button("Side", self, 0 , array_create(4, THEME.obj_hemicircle) ); + newInput(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 ea121c0cc..3e8765eac 100644 --- a/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml +++ b/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml @@ -4,7 +4,7 @@ function Node_PB_Draw_Trapezoid(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _ 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_Enum_Scroll("Type", self, 0 , [ "Symmetric", "Independent" ]); + newInput(4, nodeValue_Enum_Scroll("Type", self, 0 , [ "Symmetric", "Independent" ])); inputs[5] = nodeValue_Float("Bevel", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); @@ -15,7 +15,7 @@ function Node_PB_Draw_Trapezoid(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _ inputs[7] = nodeValue_Float("Bevel 2", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[8] = nodeValue_Bool("Invert", self, false ); + newInput(8, nodeValue_Bool("Invert", self, false )); input_display_list = [ ["Draw", false], 0, 1, 2, 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 43cc7dd88..c3e272911 100644 --- a/scripts/node_pb_fx_brick/node_pb_fx_brick.gml +++ b/scripts/node_pb_fx_brick/node_pb_fx_brick.gml @@ -1,20 +1,20 @@ function Node_PB_Fx_Brick(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { name = "Brick"; - inputs[1] = nodeValue_Vec2("Scale", self, [ 4, 1 ] ); + newInput(1, nodeValue_Vec2("Scale", self, [ 4, 1 ] )); - inputs[2] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ] ); + newInput(2, nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ] )); - inputs[3] = nodeValue_Int("Shift", self, 0); + newInput(3, nodeValue_Int("Shift", self, 0)); - inputs[4] = nodeValue_Color("Color", self, c_white ); + newInput(4, nodeValue_Color("Color", self, c_white )); inputs[5] = nodeValue_Float("Dissolve", self, 0. ) .setDisplay(VALUE_DISPLAY.slider) inputs[6] = nodeValue_Int("Detail", self, 1 ) - inputs[7] = nodeValue_Vec2("Dissolve Scale", self, [ 4, 4 ] ); + newInput(7, nodeValue_Vec2("Dissolve Scale", self, [ 4, 4 ] )); input_display_list = [ 0, ["Effect", false], 1, 2, 3, 4, diff --git a/scripts/node_pb_fx_hash/node_pb_fx_hash.gml b/scripts/node_pb_fx_hash/node_pb_fx_hash.gml index 8871ac705..ffc0e2f21 100644 --- a/scripts/node_pb_fx_hash/node_pb_fx_hash.gml +++ b/scripts/node_pb_fx_hash/node_pb_fx_hash.gml @@ -1,18 +1,18 @@ function Node_PB_Fx_Hash(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { name = "Hash"; - inputs[1] = nodeValue_Color("Color", self, c_white ); + newInput(1, nodeValue_Color("Color", self, c_white )); - inputs[2] = nodeValue_Float("Hash", self, 2. ); + newInput(2, nodeValue_Float("Hash", self, 2. )); - inputs[3] = nodeValue_Bool("Invert", self, false ); + newInput(3, nodeValue_Bool("Invert", self, false )); inputs[4] = nodeValue_Float("Dissolve", self, 0. ) .setDisplay(VALUE_DISPLAY.slider) inputs[5] = nodeValue_Int("Detail", self, 1 ) - inputs[6] = nodeValue_Vec2("Dissolve Scale", self, [ 4, 4 ] ); + newInput(6, nodeValue_Vec2("Dissolve Scale", self, [ 4, 4 ] )); input_display_list = [ 0, ["Effect", false], 2, 1, 3, diff --git a/scripts/node_pb_fx_highlight/node_pb_fx_highlight.gml b/scripts/node_pb_fx_highlight/node_pb_fx_highlight.gml index b3d9178e9..46d3cdd37 100644 --- a/scripts/node_pb_fx_highlight/node_pb_fx_highlight.gml +++ b/scripts/node_pb_fx_highlight/node_pb_fx_highlight.gml @@ -4,14 +4,14 @@ function Node_PB_Fx_Highlight(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _grou inputs[1] = nodeValue_Int("Highlight Area", self, array_create(9) ) .setDisplay(VALUE_DISPLAY.matrix, { size: 3 }); - inputs[2] = nodeValue_Color("Light Color", self, c_white ); + newInput(2, nodeValue_Color("Light Color", self, c_white )); - inputs[3] = nodeValue_Color("Shadow Color", self, c_black ); + newInput(3, nodeValue_Color("Shadow Color", self, c_black )); inputs[4] = nodeValue_Float("Roughness", self, 0 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_Float("Roughness Scale", self, 1 ); + newInput(5, nodeValue_Float("Roughness Scale", self, 1 )); inputs[6] = nodeValue_Float("Seed", self, 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_pb_fx_outline/node_pb_fx_outline.gml b/scripts/node_pb_fx_outline/node_pb_fx_outline.gml index 7203e49c8..b713657e6 100644 --- a/scripts/node_pb_fx_outline/node_pb_fx_outline.gml +++ b/scripts/node_pb_fx_outline/node_pb_fx_outline.gml @@ -1,11 +1,11 @@ function Node_PB_Fx_Outline(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { name = "Outline"; - inputs[1] = nodeValue_Bool("Corner", self, false ); + newInput(1, nodeValue_Bool("Corner", self, false )); - inputs[2] = nodeValue_Color("Color", self, c_white ); + newInput(2, nodeValue_Color("Color", self, c_white )); - inputs[3] = nodeValue_Enum_Button("Side", self, 0, [ "Inside", "Outside" ]); + newInput(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_shading/node_pb_fx_shading.gml b/scripts/node_pb_fx_shading/node_pb_fx_shading.gml index d9a66bcee..66610e24c 100644 --- a/scripts/node_pb_fx_shading/node_pb_fx_shading.gml +++ b/scripts/node_pb_fx_shading/node_pb_fx_shading.gml @@ -1,9 +1,9 @@ function Node_PB_Fx_Shading(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { name = "Shading"; - inputs[1] = nodeValue_Padding("Width", self, [ 1, 1, 1, 1 ] ); + newInput(1, nodeValue_Padding("Width", self, [ 1, 1, 1, 1 ] )); - inputs[2] = nodeValue_Color("Color", self, c_white ); + newInput(2, nodeValue_Color("Color", self, c_white )); input_display_list = [ 0, ["Effect", false], 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 95b91538a..382d4f870 100644 --- a/scripts/node_pb_fx_stack/node_pb_fx_stack.gml +++ b/scripts/node_pb_fx_stack/node_pb_fx_stack.gml @@ -1,17 +1,17 @@ function Node_PB_Fx_Stack(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { name = "Stack"; - inputs[1] = nodeValue_Int("Amount", self, 4 ); + newInput(1, nodeValue_Int("Amount", self, 4 )); - inputs[2] = nodeValue_Enum_Button("Direction", self, 0 , array_create(4, THEME.obj_direction) ); + newInput(2, nodeValue_Enum_Button("Direction", self, 0 , array_create(4, THEME.obj_direction) )); - inputs[3] = nodeValue_Color("Color", self, c_white ); + newInput(3, nodeValue_Color("Color", self, c_white )); - inputs[4] = nodeValue_Bool("Highlight", self, false ); + newInput(4, nodeValue_Bool("Highlight", self, false )); - inputs[5] = nodeValue_Color("Highlight Color", self, c_white ); + newInput(5, nodeValue_Color("Highlight Color", self, c_white )); - inputs[6] = nodeValue_Bool("Invert", self, false ); + newInput(6, nodeValue_Bool("Invert", self, false )); input_display_list = [ 0, ["Effect", false], 1, 2, 6, 3, 4, 5, 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 45eb06e61..1d1e6987f 100644 --- a/scripts/node_pb_fx_strip/node_pb_fx_strip.gml +++ b/scripts/node_pb_fx_strip/node_pb_fx_strip.gml @@ -1,13 +1,13 @@ function Node_PB_Fx_Strip(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { name = "Strip"; - inputs[1] = nodeValue_Int("Scale", self, 1 ); + newInput(1, nodeValue_Int("Scale", self, 1 )); - inputs[2] = nodeValue_Color("Color", self, c_white ); + newInput(2, nodeValue_Color("Color", self, c_white )); - inputs[3] = nodeValue_Int("Shift", self, 0 ); + newInput(3, nodeValue_Int("Shift", self, 0 )); - inputs[4] = nodeValue_Enum_Button("Axis", self, 0 , [ "X", "Y" ]); + newInput(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_layer/node_pb_layer.gml b/scripts/node_pb_layer/node_pb_layer.gml index 4aa0d13e7..82dd40a4c 100644 --- a/scripts/node_pb_layer/node_pb_layer.gml +++ b/scripts/node_pb_layer/node_pb_layer.gml @@ -2,7 +2,7 @@ function Node_PB_Layer(_x, _y, _group = noone) : Node(_x, _y, _group) constructo name = "PB Layer"; icon = THEME.pixel_builder; - inputs[0] = nodeValue_Int("Layer", self, 0 ); + newInput(0, nodeValue_Int("Layer", self, 0 )); outputs[0] = nodeValue_Output("pBox", self, VALUE_TYPE.pbBox, noone ); diff --git a/scripts/node_perlin/node_perlin.gml b/scripts/node_perlin/node_perlin.gml index d17e6f532..46f32b89a 100644 --- a/scripts/node_perlin/node_perlin.gml +++ b/scripts/node_perlin/node_perlin.gml @@ -1,7 +1,7 @@ function Node_Perlin(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Perlin Noise"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); @@ -9,28 +9,28 @@ function Node_Perlin(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[2] = nodeValue_Vec2("Scale", self, [ 5, 5 ]) .setMappable(10); - inputs[3] = nodeValue_Int("Iteration", self, 4); + newInput(3, nodeValue_Int("Iteration", self, 4)); - inputs[4] = nodeValue_Bool("Tile", self, true); + newInput(4, nodeValue_Bool("Tile", self, true)); inputs[5] = nodeValue_Float("Seed", self, 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_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); + newInput(6, nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ])); - inputs[7] = nodeValue_Slider_Range("Color R range", self, [ 0, 1 ]); + newInput(7, nodeValue_Slider_Range("Color R range", self, [ 0, 1 ])); - inputs[8] = nodeValue_Slider_Range("Color G range", self, [ 0, 1 ]); + newInput(8, nodeValue_Slider_Range("Color G range", self, [ 0, 1 ])); - inputs[9] = nodeValue_Slider_Range("Color B range", self, [ 0, 1 ]); + newInput(9, nodeValue_Slider_Range("Color B range", self, [ 0, 1 ])); ////////////////////////////////////////////////////////////////////////////////// - inputs[10] = nodeValueMap("Scale map", self); + newInput(10, nodeValueMap("Scale map", self)); ////////////////////////////////////////////////////////////////////////////////// - inputs[11] = nodeValue_Rotation("Rotation", self, 0); + newInput(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 44acdf8f9..93fb540bd 100644 --- a/scripts/node_perlin_extra/node_perlin_extra.gml +++ b/scripts/node_perlin_extra/node_perlin_extra.gml @@ -10,29 +10,29 @@ function Node_Perlin_Extra(_x, _y, _group = noone) : Node_Shader_Generator(_x, _ .setMappable(13); addShaderProp(SHADER_UNIFORM.float, "scale"); - inputs[3] = nodeValue_Int("Iteration", self, 2); + newInput(3, nodeValue_Int("Iteration", self, 2)); addShaderProp(SHADER_UNIFORM.integer, "iteration"); - inputs[4] = nodeValue_Bool("Tile", self, true, "Tiling only works with integer scale, and some effect type doesn't support tiling."); + newInput(4, nodeValue_Bool("Tile", self, true, "Tiling only works with integer scale, and some effect type doesn't support tiling.")); addShaderProp(SHADER_UNIFORM.integer, "tile"); inputs[5] = nodeValue_Float("Seed", self, 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) }); addShaderProp(SHADER_UNIFORM.float, "seed"); - inputs[6] = nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ]); + newInput(6, nodeValue_Enum_Button("Color mode", self, 0, [ "Greyscale", "RGB", "HSV" ])); addShaderProp(SHADER_UNIFORM.integer, "colored"); - inputs[7] = nodeValue_Slider_Range("Color R range", self, [ 0, 1 ]); + newInput(7, nodeValue_Slider_Range("Color R range", self, [ 0, 1 ])); addShaderProp(SHADER_UNIFORM.float, "colorRanR"); - inputs[8] = nodeValue_Slider_Range("Color G range", self, [ 0, 1 ]); + newInput(8, nodeValue_Slider_Range("Color G range", self, [ 0, 1 ])); addShaderProp(SHADER_UNIFORM.float, "colorRanG"); - inputs[9] = nodeValue_Slider_Range("Color B range", self, [ 0, 1 ]); + newInput(9, nodeValue_Slider_Range("Color B range", self, [ 0, 1 ])); addShaderProp(SHADER_UNIFORM.float, "colorRanB"); - inputs[10] = nodeValue_Enum_Scroll("Noise type", self, 0, [ "Absolute worley", "Fluid", "Noisy", "Camo", "Blocky", "Max", "Vine" ]); + newInput(10, nodeValue_Enum_Scroll("Noise type", self, 0, [ "Absolute worley", "Fluid", "Noisy", "Camo", "Blocky", "Max", "Vine" ])); addShaderProp(SHADER_UNIFORM.integer, "type"); inputs[11] = nodeValue_Float("Parameter A", self, 0) @@ -46,15 +46,15 @@ function Node_Perlin_Extra(_x, _y, _group = noone) : Node_Shader_Generator(_x, _ ////////////////////////////////////////////////////////////////////////////////// - inputs[13] = nodeValueMap("Scale map", self); addShaderProp(); + newInput(13, nodeValueMap("Scale map", self)); addShaderProp(); - inputs[14] = nodeValueMap("Parameter A map", self); addShaderProp(); + newInput(14, nodeValueMap("Parameter A map", self)); addShaderProp(); - inputs[15] = nodeValueMap("Parameter B map", self); addShaderProp(); + newInput(15, nodeValueMap("Parameter B map", self)); addShaderProp(); ////////////////////////////////////////////////////////////////////////////////// - inputs[16] = nodeValue_Rotation("Rotation", self, 0); + newInput(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 7991f4074..e41c8c3ef 100644 --- a/scripts/node_perlin_smear/node_perlin_smear.gml +++ b/scripts/node_perlin_smear/node_perlin_smear.gml @@ -1,19 +1,19 @@ function Node_Perlin_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Smear noise"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); - inputs[2] = nodeValue_Vec2("Scale", self, [ 4, 6 ]); + newInput(2, nodeValue_Vec2("Scale", self, [ 4, 6 ])); - inputs[3] = nodeValue_Int("Iteration", self, 3); + newInput(3, nodeValue_Int("Iteration", self, 3)); inputs[4] = nodeValue_Float("Brightness", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_Rotation("Rotation", self, 0); + newInput(5, nodeValue_Rotation("Rotation", self, 0)); outputs[0] = nodeValue_Output("Surface out", self, 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 c6eb5c38b..2132ac8ef 100644 --- a/scripts/node_pixel_builder/node_pixel_builder.gml +++ b/scripts/node_pixel_builder/node_pixel_builder.gml @@ -5,7 +5,7 @@ function Node_Pixel_Builder(_x, _y, _group = noone) : Node_Collection(_x, _y, _g reset_all_child = true; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); outputs[0] = nodeValue_Output("Surface Out", self, 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 bf329a4d0..3de589616 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Int("Seed", self, 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,26 +9,26 @@ function Node_Pixel_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[2] = nodeValue_Float("Strength", self, 0.1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] }); - inputs[3] = nodeValue_Surface("Strength map", self); + newInput(3, nodeValue_Surface("Strength map", self)); inputs[4] = nodeValue_Gradient("Color over lifetime", self, new gradientObject(cola(c_white))) .setMappable(9); - inputs[5] = nodeValue_Float("Distance", self, 1); + newInput(5, nodeValue_Float("Distance", self, 1)); - inputs[6] = nodeValue("Alpha over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + newInput(6, nodeValue("Alpha over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11)); inputs[7] = nodeValue_Float("Random blending", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); - inputs[8] = nodeValue_Bool("Active", self, true); + newInput(8, nodeValue_Bool("Active", self, true)); active_index = 8; ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[9] = nodeValueMap("Gradient map", self); + newInput(9, nodeValueMap("Gradient map", self)); - inputs[10] = nodeValueGradientRange("Gradient map range", self, inputs[4]); + newInput(10, nodeValueGradientRange("Gradient map range", self, inputs[4])); ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_pixel_sampler/node_pixel_sampler.gml b/scripts/node_pixel_sampler/node_pixel_sampler.gml index 2dd82b872..032853571 100644 --- a/scripts/node_pixel_sampler/node_pixel_sampler.gml +++ b/scripts/node_pixel_sampler/node_pixel_sampler.gml @@ -1,11 +1,11 @@ function Node_Pixel_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Pixel Sampler"; - inputs[0] = nodeValue_Surface("Base Texture", self); + newInput(0, nodeValue_Surface("Base Texture", self)); - inputs[1] = nodeValue_Enum_Button("Sample Mode", self, 0 , [ "Keep Size", "Expand" ]); + newInput(1, nodeValue_Enum_Button("Sample Mode", self, 0 , [ "Keep Size", "Expand" ])); - inputs[2] = nodeValue_Enum_Button("Match Mode", self, 0 , [ "Brightness", "RGB", "Hue" ]); + newInput(2, nodeValue_Enum_Button("Match Mode", self, 0 , [ "Brightness", "RGB", "Hue" ])); inputs[3] = nodeValue_Surface("Surfaces", self, [ noone ]) .setArrayDepth(1); @@ -13,11 +13,11 @@ function Node_Pixel_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[4] = nodeValue_Gradient("Gradient", self, new gradientObject([ cola(c_black), cola(c_white) ])) .setMappable(5); - inputs[5] = nodeValueMap("Gradient map", self); + newInput(5, nodeValueMap("Gradient map", self)); - inputs[6] = nodeValueGradientRange("Gradient map range", self, inputs[4]); + newInput(6, nodeValueGradientRange("Gradient map range", self, inputs[4])); - inputs[7] = nodeValue_Enum_Scroll("Color Blending", self, 0 , [ "None", "Multiply" ]); + newInput(7, nodeValue_Enum_Scroll("Color Blending", self, 0 , [ "None", "Multiply" ])); inputs[8] = nodeValue_Float("Blending Intensity", self, 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 03f8a22e1..1c5fd17e2 100644 --- a/scripts/node_pixel_sort/node_pixel_sort.gml +++ b/scripts/node_pixel_sort/node_pixel_sort.gml @@ -7,9 +7,9 @@ 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Int("Iteration", self, 2); + newInput(1, nodeValue_Int("Iteration", self, 2)); inputs[2] = nodeValue_Float("Threshold", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); @@ -17,15 +17,15 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[3] = nodeValue_Int("Direction", self, 0) .setDisplay(VALUE_DISPLAY.rotation, { step: 90 }); - inputs[4] = nodeValue_Surface("Mask", self); + newInput(4, nodeValue_Surface("Mask", self)); inputs[5] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[6] = nodeValue_Bool("Active", self, true); + newInput(6, nodeValue_Bool("Active", self, true)); active_index = 6; - inputs[7] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(7, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(4); // inputs 8, 9 diff --git a/scripts/node_plot_linear/node_plot_linear.gml b/scripts/node_plot_linear/node_plot_linear.gml index 1851dda84..10a3f7165 100644 --- a/scripts/node_plot_linear/node_plot_linear.gml +++ b/scripts/node_plot_linear/node_plot_linear.gml @@ -19,56 +19,56 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Draw Bar / Graph"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Float("Data", self, []) .setArrayDepth(1) .setVisible(true, true); - inputs[2] = nodeValue_Slider_Range("Range", self, [ 0, 1 ]); + newInput(2, nodeValue_Slider_Range("Range", self, [ 0, 1 ])); - inputs[3] = nodeValue_Float("Sample frequency", self, 1); + newInput(3, nodeValue_Float("Sample frequency", self, 1)); - inputs[4] = nodeValue_Vec2("Origin", self, [ 0, DEF_SURF_H / 2 ]); + newInput(4, nodeValue_Vec2("Origin", self, [ 0, DEF_SURF_H / 2 ])); - inputs[5] = nodeValue_Float("Scale", self, DEF_SURF_W / 2); + newInput(5, nodeValue_Float("Scale", self, DEF_SURF_W / 2)); - inputs[6] = nodeValue_Color("Base Color", self, c_white); + newInput(6, nodeValue_Color("Base Color", self, c_white)); - inputs[7] = nodeValue_Float("Graph Thickness", self, 1); + newInput(7, nodeValue_Float("Graph Thickness", self, 1)); - inputs[8] = nodeValue_Bool("Background", self, false); + newInput(8, nodeValue_Bool("Background", self, false)); - inputs[9] = nodeValue_Color("Background color", self, c_black); + newInput(9, nodeValue_Color("Background color", self, c_black)); - inputs[10] = nodeValue_Rotation("Direction", self, 0); + newInput(10, nodeValue_Rotation("Direction", self, 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_Float("Value Offset", self, 0); + newInput(12, nodeValue_Float("Value Offset", self, 0)); inputs[13] = nodeValue_Gradient("Color Over Sample", self, new gradientObject(cola(c_white))) .setMappable(27); - inputs[14] = nodeValue_Enum_Scroll("Trim mode", self, 0, [ "Range", "Window" ]); + newInput(14, nodeValue_Enum_Scroll("Trim mode", self, 0, [ "Range", "Window" ])); - inputs[15] = nodeValue_Int("Window Size", self, 8); + newInput(15, nodeValue_Int("Window Size", self, 8)); - inputs[16] = nodeValue_Float("Window Offset", self, 0); + newInput(16, nodeValue_Float("Window Offset", self, 0)); - inputs[17] = nodeValue_Float("Spacing", self, 1); + newInput(17, nodeValue_Float("Spacing", self, 1)); - inputs[18] = nodeValue_Float("Bar Width", self, 4); + newInput(18, nodeValue_Float("Bar Width", self, 4)); - inputs[19] = nodeValue_Bool("Rounded Bar", self, false); + newInput(19, nodeValue_Bool("Rounded Bar", self, false)); inputs[20] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - inputs[21] = nodeValue_Bool("Flip Value", self, false); + newInput(21, nodeValue_Bool("Flip Value", self, false)); - inputs[22] = nodeValue_Bool("Loop", self, false); + newInput(22, nodeValue_Bool("Loop", self, false)); inputs[23] = nodeValue_Float("Smooth", self, 0) .setDisplay(VALUE_DISPLAY.slider); @@ -76,19 +76,19 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[24] = nodeValue_Gradient("Color Over Value", self, new gradientObject(cola(c_white))) .setMappable(29); - inputs[25] = nodeValue_Range("Value range", self, [ 0, 1 ] ); + newInput(25, nodeValue_Range("Value range", self, [ 0, 1 ] )); - inputs[26] = nodeValue_Bool("Absolute", self, false); + newInput(26, nodeValue_Bool("Absolute", self, false)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[27] = nodeValueMap("Sample Gradient map", self); + newInput(27, nodeValueMap("Sample Gradient map", self)); - inputs[28] = nodeValueGradientRange("Sample Gradient map range", self, inputs[13]); + newInput(28, nodeValueGradientRange("Sample Gradient map range", self, inputs[13])); - inputs[29] = nodeValueMap("Value Gradient map", self); + newInput(29, nodeValueMap("Value Gradient map", self)); - inputs[30] = nodeValueGradientRange("Value Gradient map range", self, inputs[24]); + newInput(30, nodeValueGradientRange("Value Gradient map range", self, inputs[24])); ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_point_in_area/node_point_in_area.gml b/scripts/node_point_in_area/node_point_in_area.gml index 4ad40e02e..71d57c0b9 100644 --- a/scripts/node_point_in_area/node_point_in_area.gml +++ b/scripts/node_point_in_area/node_point_in_area.gml @@ -3,11 +3,11 @@ function Node_Point_In_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr color = COLORS.node_blend_number; setDimension(96, 48); - inputs[0] = nodeValue_Area("Area", self, DEF_AREA ); + newInput(0, nodeValue_Area("Area", self, DEF_AREA )); - inputs[1] = nodeValue_Vec2("Point", self, [ 0, 0 ] ); + newInput(1, nodeValue_Vec2("Point", self, [ 0, 0 ] )); - inputs[2] = nodeValue_Bool("Include Boundary", self, true ); + newInput(2, nodeValue_Bool("Include Boundary", self, true )); outputs[0] = nodeValue_Output("Is in", self, VALUE_TYPE.boolean, false ); diff --git a/scripts/node_polar/node_polar.gml b/scripts/node_polar/node_polar.gml index f38a30db7..e733f93c8 100644 --- a/scripts/node_polar/node_polar.gml +++ b/scripts/node_polar/node_polar.gml @@ -1,17 +1,17 @@ function Node_Polar(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Polar"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Surface("Mask", self); + newInput(1, nodeValue_Surface("Mask", self)); inputs[2] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[3] = nodeValue_Bool("Active", self, true); + newInput(3, nodeValue_Bool("Active", self, true)); active_index = 3; - inputs[4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(4, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); inputs[5] = nodeValue_Bool("Invert", self, false) @@ -29,11 +29,11 @@ function Node_Polar(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[11] = nodeValueMap("Blend map", self); + newInput(11, nodeValueMap("Blend map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[12] = nodeValue_Vec2("Tile", self, [ 1, 1 ] ); + newInput(12, nodeValue_Vec2("Tile", self, [ 1, 1 ] )); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_posterize/node_posterize.gml b/scripts/node_posterize/node_posterize.gml index fdaace377..d8a22dbcf 100644 --- a/scripts/node_posterize/node_posterize.gml +++ b/scripts/node_posterize/node_posterize.gml @@ -1,11 +1,11 @@ function Node_Posterize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Posterize"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE)); + newInput(1, nodeValue_Palette("Palette", self, array_clone(DEF_PALETTE))); - inputs[2] = nodeValue_Bool("Use palette", self, true); + newInput(2, nodeValue_Bool("Use palette", self, true)); inputs[3] = nodeValue_Int("Steps", self, 4) .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 0.1] }); @@ -14,18 +14,18 @@ function Node_Posterize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 2, 0.01] }) .setMappable(7); - inputs[5] = nodeValue_Bool("Active", self, true); + newInput(5, nodeValue_Bool("Active", self, true)); active_index = 5; - inputs[6] = nodeValue_Bool("Posterize alpha", self, true); + newInput(6, nodeValue_Bool("Posterize alpha", self, true)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[7] = nodeValueMap("Gamma map", self); + newInput(7, nodeValueMap("Gamma map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[8] = nodeValue_Enum_Button("Space", self, 0, [ "RGB", "LAB" ]); + newInput(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_print/node_print.gml b/scripts/node_print/node_print.gml index 52bd31fcc..b134167c9 100644 --- a/scripts/node_print/node_print.gml +++ b/scripts/node_print/node_print.gml @@ -4,9 +4,9 @@ function Node_Print(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { draw_padding = 8; - inputs[0] = nodeValue_Bool("Active", self, true); + newInput(0, nodeValue_Bool("Active", self, true)); - inputs[1] = nodeValue_Text("Text", self, ""); + newInput(1, nodeValue_Text("Text", self, "")); static update = function() { var act = getInputData(0); diff --git a/scripts/node_pytagorean_tile/node_pytagorean_tile.gml b/scripts/node_pytagorean_tile/node_pytagorean_tile.gml index 61c2db29c..79d216282 100644 --- a/scripts/node_pytagorean_tile/node_pytagorean_tile.gml +++ b/scripts/node_pytagorean_tile/node_pytagorean_tile.gml @@ -1,7 +1,7 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Pytagorean Tile"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); @@ -19,47 +19,47 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _ inputs[5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) .setMappable(18); - inputs[6] = nodeValue_Color("Gap color", self, c_black); + newInput(6, nodeValue_Color("Gap color", self, c_black)); - inputs[7] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]); + newInput(7, nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"])); inputs[8] = nodeValue_Float("Seed", self, 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_Surface("Texture", self); + newInput(9, nodeValue_Surface("Texture", self)); - inputs[10] = nodeValue_Bool("Anti aliasing", self, false); + newInput(10, nodeValue_Bool("Anti aliasing", self, false)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[11] = nodeValueMap("Scale map", self); + newInput(11, nodeValueMap("Scale map", self)); - inputs[12] = nodeValueMap("Angle map", self); + newInput(12, nodeValueMap("Angle map", self)); - inputs[13] = nodeValueMap("Gap map", self); + newInput(13, nodeValueMap("Gap map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[14] = nodeValue_Bool("Truchet", self, false); + newInput(14, nodeValue_Bool("Truchet", self, false)); - inputs[15] = nodeValue_Int("Truchet seed", self, seed_random()); + newInput(15, nodeValue_Int("Truchet seed", self, seed_random())); inputs[16] = nodeValue_Float("Truchet threshold", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) - inputs[17] = nodeValue_Rotation("Phase", self, 90); + newInput(17, nodeValue_Rotation("Phase", self, 90)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[18] = nodeValueMap("Gradient map", self); + newInput(18, nodeValueMap("Gradient map", self)); - inputs[19] = nodeValueGradientRange("Gradient map range", self, inputs[5]); + newInput(19, nodeValueGradientRange("Gradient map range", self, inputs[5])); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[20] = nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ]); + newInput(20, nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ])); - inputs[21] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); + newInput(21, nodeValue_Slider_Range("Level", self, [ 0, 1 ])); input_display_list = [ ["Output", false], 0, diff --git a/scripts/node_quasicrystal/node_quasicrystal.gml b/scripts/node_quasicrystal/node_quasicrystal.gml index 2d2d675c3..ce05bc231 100644 --- a/scripts/node_quasicrystal/node_quasicrystal.gml +++ b/scripts/node_quasicrystal/node_quasicrystal.gml @@ -1,7 +1,7 @@ function Node_Quasicrystal(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Quasicrystal"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Float("Scale", self, 16) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 64, 0.1] }) @@ -13,15 +13,15 @@ function Node_Quasicrystal(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[3] = nodeValue_Vec2("Position", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[4] = nodeValue_Color("Color 1", self, c_white); + newInput(4, nodeValue_Color("Color 1", self, c_white)); - inputs[5] = nodeValue_Color("Color 2", self, c_black); + newInput(5, nodeValue_Color("Color 2", self, c_black)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[6] = nodeValueMap("Scale map", self); + newInput(6, nodeValueMap("Scale map", self)); - inputs[7] = nodeValueMap("Angle map", self); + newInput(7, nodeValueMap("Angle map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -29,9 +29,9 @@ function Node_Quasicrystal(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro .setDisplay(VALUE_DISPLAY.slider) .setMappable(8); - inputs[9] = nodeValueMap("Phasemap", self); + newInput(9, nodeValueMap("Phasemap", self)); - inputs[10] = nodeValue_Rotation_Range("Angle Range", self, [ 0, 180 ]); + newInput(10, nodeValue_Rotation_Range("Angle Range", self, [ 0, 180 ])); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_random/node_random.gml b/scripts/node_random/node_random.gml index d353bbd92..df01c4ea8 100644 --- a/scripts/node_random/node_random.gml +++ b/scripts/node_random/node_random.gml @@ -4,11 +4,11 @@ function Node_Random(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co setDimension(96, 48); - inputs[0] = nodeValue_Int("seed", self, irandom(99999)); + newInput(0, nodeValue_Int("seed", self, irandom(99999))); - inputs[1] = nodeValue_Float("from", self, 0); + newInput(1, nodeValue_Float("from", self, 0)); - inputs[2] = nodeValue_Float("to", self, 1); + newInput(2, nodeValue_Float("to", self, 1)); outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.float, 0); diff --git a/scripts/node_random_shape/node_random_shape.gml b/scripts/node_random_shape/node_random_shape.gml index ecfc832b6..e9e15e205 100644 --- a/scripts/node_random_shape/node_random_shape.gml +++ b/scripts/node_random_shape/node_random_shape.gml @@ -1,7 +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); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Int("Seed", self, 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 eb4e6291b..e071cdc4d 100644 --- a/scripts/node_random_tile/node_random_tile.gml +++ b/scripts/node_random_tile/node_random_tile.gml @@ -1,7 +1,7 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Random Tile"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); @@ -19,45 +19,45 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[5] = nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))) .setMappable(17); - inputs[6] = nodeValue_Color("Gap color", self, c_black); + newInput(6, nodeValue_Color("Gap color", self, c_black)); - inputs[7] = nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]); + newInput(7, nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"])); inputs[8] = nodeValue_Float("Seed", self, 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_Surface("Texture", self); + newInput(9, nodeValue_Surface("Texture", self)); - inputs[10] = nodeValue_Bool("Anti aliasing", self, false); + newInput(10, nodeValue_Bool("Anti aliasing", self, false)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[11] = nodeValueMap("Scale map", self); + newInput(11, nodeValueMap("Scale map", self)); - inputs[12] = nodeValueMap("Angle map", self); + newInput(12, nodeValueMap("Angle map", self)); - inputs[13] = nodeValueMap("Gap map", self); + newInput(13, nodeValueMap("Gap map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[14] = nodeValue_Bool("Truchet", self, false); + newInput(14, nodeValue_Bool("Truchet", self, false)); - inputs[15] = nodeValue_Int("Truchet seed", self, seed_random()); + newInput(15, nodeValue_Int("Truchet seed", self, seed_random())); inputs[16] = nodeValue_Float("Truchet threshold", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[17] = nodeValueMap("Gradient map", self); + newInput(17, nodeValueMap("Gradient map", self)); - inputs[18] = nodeValueGradientRange("Gradient map range", self, inputs[5]); + newInput(18, nodeValueGradientRange("Gradient map range", self, inputs[5])); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[19] = nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ]); + newInput(19, nodeValue_Rotation_Range("Texture angle", self, [ 0, 0 ])); - inputs[20] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); + newInput(20, nodeValue_Slider_Range("Level", self, [ 0, 1 ])); input_display_list = [ ["Output", false], 0, diff --git a/scripts/node_rate_remap/node_rate_remap.gml b/scripts/node_rate_remap/node_rate_remap.gml index cb10e97c8..17d919762 100644 --- a/scripts/node_rate_remap/node_rate_remap.gml +++ b/scripts/node_rate_remap/node_rate_remap.gml @@ -2,12 +2,12 @@ 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("Surface", self); + newInput(0, nodeValue_Surface("Surface", self)); inputs[1] = nodeValue_Float("Framerate", self, 10) .setValidator(VV_min(1)); - inputs[2] = nodeValue_Bool("Active", self, true); + newInput(2, nodeValue_Bool("Active", self, true)); active_index = 2; outputs[0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_rd/node_rd.gml b/scripts/node_rd/node_rd.gml index cf20bf9fe..fe922e646 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_Surface("Seed", self); + newInput(0, nodeValue_Surface("Seed", self)); inputs[1] = nodeValue_Float("Kill rate", self, 0.058) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.001] }) @@ -14,7 +14,7 @@ function Node_RD(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { inputs[3] = nodeValue_Float("Timestep", self, 1) .setMappable(10); - inputs[4] = nodeValue_Int("Iteration", self, 16); + newInput(4, nodeValue_Int("Iteration", self, 16)); inputs[5] = nodeValue_Float("Diffusion A", self, 1.) .setDisplay(VALUE_DISPLAY.slider) @@ -24,7 +24,7 @@ function Node_RD(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { .setDisplay(VALUE_DISPLAY.slider) .setMappable(12); - inputs[7] = nodeValue_Surface("Add B", self); + newInput(7, nodeValue_Surface("Add B", self)); ////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_region_fill/node_region_fill.gml b/scripts/node_region_fill/node_region_fill.gml index dcb13c1b0..8a31d2c65 100644 --- a/scripts/node_region_fill/node_region_fill.gml +++ b/scripts/node_region_fill/node_region_fill.gml @@ -1,30 +1,30 @@ function Node_Region_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Region Fill"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Surface("Mask", self); + newInput(1, nodeValue_Surface("Mask", self)); - inputs[2] = nodeValue_Palette("Fill Colors", self, array_clone(DEF_PALETTE)); + newInput(2, nodeValue_Palette("Fill Colors", self, array_clone(DEF_PALETTE))); - inputs[3] = nodeValue_Bool("Fill", self, true); + newInput(3, nodeValue_Bool("Fill", self, true)); inputs[4] = nodeValue_Int("Seed", self, 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_Color("Target Color", self, c_white); + newInput(5, nodeValue_Color("Target Color", self, c_white)); - inputs[6] = nodeValue_Bool("Inner only", self, false, "Only fill regions with surrounding pixels."); + newInput(6, nodeValue_Bool("Inner only", self, false, "Only fill regions with surrounding pixels.")); - inputs[7] = nodeValue_Enum_Scroll("Draw original", self, 0, [ "None", "Above", "Behind" ]); + newInput(7, nodeValue_Enum_Scroll("Draw original", self, 0, [ "None", "Above", "Behind" ])); - inputs[8] = nodeValue_Enum_Scroll("Fill type", self, 0, [ "Random", "Color map", "Texture map" ]); + newInput(8, nodeValue_Enum_Scroll("Fill type", self, 0, [ "Random", "Color map", "Texture map" ])); - inputs[9] = nodeValue_Surface("Color map", self); + newInput(9, nodeValue_Surface("Color map", self)); - inputs[10] = nodeValue_Surface("Texture map", self); + newInput(10, nodeValue_Surface("Texture map", self)); - inputs[11] = nodeValue_Bool("Color Filter", self, false); + newInput(11, nodeValue_Bool("Color Filter", self, false)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); 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 dec2cf2cd..57d37a06f 100644 --- a/scripts/node_render_sprite_sheet/node_render_sprite_sheet.gml +++ b/scripts/node_render_sprite_sheet/node_render_sprite_sheet.gml @@ -15,7 +15,7 @@ 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_Surface("Sprites", self); + newInput(0, nodeValue_Surface("Sprites", self)); inputs[1] = nodeValue_Enum_Scroll("Sprite set", self, 0, [ "Animation", "Sprite array" ]) .rejectArray(); @@ -34,18 +34,18 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) inputs[5] = nodeValue_Enum_Button("Alignment", self, 0, [ "First", "Middle", "Last" ]) .rejectArray(); - inputs[6] = nodeValue_Int("Spacing", self, 0); + newInput(6, nodeValue_Int("Spacing", self, 0)); inputs[7] = nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ]) inputs[8] = nodeValue_Slider_Range("Range", self, [ 0, 0 ]) .setTooltip("Starting/ending frames, set end to 0 to default to last frame.") - inputs[9] = nodeValue_Vec2("Spacing", self, [ 0, 0 ]); + newInput(9, nodeValue_Vec2("Spacing", self, [ 0, 0 ])); - inputs[10] = nodeValue_Bool("Overlappable", self, false); + newInput(10, nodeValue_Bool("Overlappable", self, false)); - inputs[11] = nodeValue_Bool("Custom Range", self, false); + newInput(11, nodeValue_Bool("Custom Range", self, false)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_repeat/node_repeat.gml b/scripts/node_repeat/node_repeat.gml index 36ab970e9..70311d01d 100644 --- a/scripts/node_repeat/node_repeat.gml +++ b/scripts/node_repeat/node_repeat.gml @@ -20,9 +20,9 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co name = "Repeat"; dimension_index = 1; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Dimension(self); + newInput(1, nodeValue_Dimension(self)); inputs[2] = nodeValue_Int("Amount", self, 2) .rejectArray(); @@ -34,18 +34,18 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[4] = nodeValue_Vec2("Shift position", self, [ DEF_SURF_W / 2, 0 ]) .setUnitRef(function() { return getDimension(); }); - inputs[5] = nodeValue_Rotation_Range("Repeat rotation", self, [0, 0]); + newInput(5, nodeValue_Rotation_Range("Repeat rotation", self, [0, 0])); - inputs[6] = nodeValue_Float("Scale multiply", self, 1); + newInput(6, nodeValue_Float("Scale multiply", self, 1)); - inputs[7] = nodeValue_Rotation_Range("Angle range", self, [0, 360]); + newInput(7, nodeValue_Rotation_Range("Angle range", self, [0, 360])); - inputs[8] = nodeValue_Float("Radius", self, 1); + newInput(8, nodeValue_Float("Radius", self, 1)); inputs[9] = nodeValue_Vec2("Start position", self, [0, 0]) .setUnitRef(function(index) { return getInputData(1); }); - inputs[10] = nodeValue("Scale over copy", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 ); + newInput(10, nodeValue("Scale over copy", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 )); inputs[11] = nodeValue_PathNode("Path", self, noone, "Make each copy follow along path." ) .setVisible(true, true); @@ -53,12 +53,12 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[12] = nodeValue_Slider_Range("Path range", self, [0, 1]) .setTooltip("Range of the path to follow."); - inputs[13] = nodeValue_Float("Path shift", self, 0); + newInput(13, nodeValue_Float("Path shift", self, 0)); inputs[14] = nodeValue_Gradient("Color over copy", self, new gradientObject(cola(c_white))) .setMappable(30); - inputs[15] = nodeValue("Alpha over copy", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 ); + newInput(15, nodeValue("Alpha over copy", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 )); 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."); @@ -66,7 +66,7 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[17] = nodeValue_Int("Seed", self, 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) }); - inputs[18] = nodeValue_Int("Column", self, 4); + newInput(18, nodeValue_Int("Column", self, 4)); inputs[19] = nodeValue_Vec2("Column shift", self, [0, DEF_SURF_H / 2]) .setUnitRef(function() { return getDimension(); }); @@ -77,18 +77,18 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[21] = nodeValue_Float("Animator range", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); - inputs[22] = nodeValue_Vec2("Animator position", self, [ 0, 0 ]); + newInput(22, nodeValue_Vec2("Animator position", self, [ 0, 0 ])); - inputs[23] = nodeValue_Rotation("Animator rotation", self, 0); + newInput(23, nodeValue_Rotation("Animator rotation", self, 0)); - inputs[24] = nodeValue_Vec2("Animator scale", self, [ 0, 0 ]); + newInput(24, nodeValue_Vec2("Animator scale", self, [ 0, 0 ])); - inputs[25] = nodeValue("Animator falloff", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_10); + newInput(25, nodeValue("Animator falloff", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_10)); 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_Color("Animator blend", self, cola(c_white)); + newInput(27, nodeValue_Color("Animator blend", self, cola(c_white))); inputs[28] = nodeValue_Float("Animator alpha", self, 1) .setDisplay(VALUE_DISPLAY.slider); @@ -97,17 +97,17 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[30] = nodeValueMap("Gradient map", self); + newInput(30, nodeValueMap("Gradient map", self)); - inputs[31] = nodeValueGradientRange("Gradient map range", self, inputs[14]); + newInput(31, nodeValueGradientRange("Gradient map range", self, inputs[14])); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[32] = nodeValue_Rotation("Start rotation", self, 0); + newInput(32, nodeValue_Rotation("Start rotation", self, 0)); - inputs[33] = nodeValue_Rotation("Rotation", self, 0); + newInput(33, nodeValue_Rotation("Rotation", self, 0)); - inputs[34] = nodeValue_Enum_Scroll("Blend Mode", self, 0, [ "Normal", "Additive", "Maximum" ]); + newInput(34, nodeValue_Enum_Scroll("Blend Mode", self, 0, [ "Normal", "Additive", "Maximum" ])); outputs[0] = nodeValue_Output("Surface out", self, 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 a98bca1d4..738d9975f 100644 --- a/scripts/node_repeat_texture/node_repeat_texture.gml +++ b/scripts/node_repeat_texture/node_repeat_texture.gml @@ -2,11 +2,11 @@ function Node_Repeat_Texture(_x, _y, _group = noone) : Node_Processor(_x, _y, _g name = "Repeat Texture"; dimension_index = 1; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Vec2("Target dimension", self, DEF_SURF); + newInput(1, nodeValue_Vec2("Target dimension", self, DEF_SURF)); - inputs[2] = nodeValue_Enum_Scroll("Type", self, 1, [ "Tile", "Scatter", "Cell" ]); + newInput(2, nodeValue_Enum_Scroll("Type", self, 1, [ "Tile", "Scatter", "Cell" ])); inputs[3] = nodeValue_Float("Seed", self, 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 2a474fc45..053600083 100644 --- a/scripts/node_rgb_channel/node_rgb_channel.gml +++ b/scripts/node_rgb_channel/node_rgb_channel.gml @@ -2,13 +2,13 @@ function Node_RGB_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou name = "RGBA Extract"; batch_output = false; - inputs[0] = nodeValue_Surface("Surface In", self); + newInput(0, nodeValue_Surface("Surface In", self)); - inputs[1] = nodeValue_Enum_Scroll("Output Type", self, 0, [ "Channel value", "Greyscale" ]); + newInput(1, nodeValue_Enum_Scroll("Output Type", self, 0, [ "Channel value", "Greyscale" ])); - inputs[2] = nodeValue_Bool("Keep Alpha", self, false); + newInput(2, nodeValue_Bool("Keep Alpha", self, false)); - inputs[3] = nodeValue_Bool("Output Array", self, false); + newInput(3, nodeValue_Bool("Output Array", self, false)); outputs[0] = nodeValue_Output("Red", self, VALUE_TYPE.surface, noone); outputs[1] = nodeValue_Output("Green", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_rigid_global/node_rigid_global.gml b/scripts/node_rigid_global/node_rigid_global.gml index 5cd9af17f..89538545c 100644 --- a/scripts/node_rigid_global/node_rigid_global.gml +++ b/scripts/node_rigid_global/node_rigid_global.gml @@ -8,7 +8,7 @@ function Node_Rigid_Global(_x, _y, _group = noone) : Node(_x, _y, _group) constr object = noone; - inputs[0] = nodeValue_Vec2("Gravity", self, [ 0, 10 ]); + newInput(0, nodeValue_Vec2("Gravity", self, [ 0, 10 ])); current_gra = [0, 0]; diff --git a/scripts/node_rigid_group_inline/node_rigid_group_inline.gml b/scripts/node_rigid_group_inline/node_rigid_group_inline.gml index 2421e9c30..60cb33df9 100644 --- a/scripts/node_rigid_group_inline/node_rigid_group_inline.gml +++ b/scripts/node_rigid_group_inline/node_rigid_group_inline.gml @@ -6,7 +6,7 @@ function Node_Rigid_Group_Inline(_x, _y, _group = noone) : Node_Collection_Inlin is_simulation = true; manual_ungroupable = false; - inputs[0] = nodeValue_Vec2("Gravity", self, [ 0, 10 ]); + newInput(0, nodeValue_Vec2("Gravity", self, [ 0, 10 ])); if(NODE_NEW_MANUAL) { var _object = nodeBuild("Node_Rigid_Object", x, y); diff --git a/scripts/node_rigid_override/node_rigid_override.gml b/scripts/node_rigid_override/node_rigid_override.gml index 2356b4c5b..af54669b6 100644 --- a/scripts/node_rigid_override/node_rigid_override.gml +++ b/scripts/node_rigid_override/node_rigid_override.gml @@ -10,17 +10,17 @@ function Node_Rigid_Override(_x, _y, _group = noone) : Node(_x, _y, _group) cons inputs[0] = nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone ) .setVisible(true, true); - inputs[1] = nodeValue_Vec2("Positions", self, [0, 0] ); + newInput(1, nodeValue_Vec2("Positions", self, [0, 0] )); - inputs[2] = nodeValue_Vec2("Scales", self, [0, 0] ); + newInput(2, nodeValue_Vec2("Scales", self, [0, 0] )); - inputs[3] = nodeValue_Float("Rotations", self, 0 ); + newInput(3, nodeValue_Float("Rotations", self, 0 )); - inputs[4] = nodeValue_Color("Blends", self, 0 ); + newInput(4, nodeValue_Color("Blends", self, 0 )); - inputs[5] = nodeValue_Float("Alpha", self, 0 ); + newInput(5, nodeValue_Float("Alpha", self, 0 )); - inputs[6] = nodeValue_Vec2("Velocity", self, [0, 0] ); + newInput(6, nodeValue_Vec2("Velocity", self, [0, 0] )); outputs[0] = nodeValue_Output("Object", self, VALUE_TYPE.rigid, noone ); diff --git a/scripts/node_rigid_render/node_rigid_render.gml b/scripts/node_rigid_render/node_rigid_render.gml index d6b3533b7..1082197ee 100644 --- a/scripts/node_rigid_render/node_rigid_render.gml +++ b/scripts/node_rigid_render/node_rigid_render.gml @@ -8,7 +8,7 @@ function Node_Rigid_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constr //use_cache = CACHE_USE.auto; update_on_frame = true; - inputs[0] = nodeValue_Vec2("Render dimension", self, DEF_SURF); + newInput(0, nodeValue_Vec2("Render dimension", self, DEF_SURF)); inputs[1] = nodeValue_Bool("Round position", self, false) diff --git a/scripts/node_rigid_wall/node_rigid_wall.gml b/scripts/node_rigid_wall/node_rigid_wall.gml index 882a1874b..9da746d76 100644 --- a/scripts/node_rigid_wall/node_rigid_wall.gml +++ b/scripts/node_rigid_wall/node_rigid_wall.gml @@ -8,13 +8,13 @@ function Node_Rigid_Wall(_x, _y, _group = noone) : Node(_x, _y, _group) construc object = []; - inputs[0] = nodeValue_Toggle("Sides", self, 0b0010, { data : [ "T", "B", "L", "R" ] }); + newInput(0, nodeValue_Toggle("Sides", self, 0b0010, { data : [ "T", "B", "L", "R" ] })); - inputs[1] = nodeValue_Float("Contact Friction", self, 0.2); + newInput(1, nodeValue_Float("Contact Friction", self, 0.2)); - inputs[2] = nodeValue_Dimension(self); + newInput(2, nodeValue_Dimension(self)); - inputs[3] = nodeValue_Int("Collision Group", self, 1); + newInput(3, nodeValue_Int("Collision Group", self, 1)); input_display_list = [ 3, 0, 2, ["Physics", false], 1 diff --git a/scripts/node_rim/node_rim.gml b/scripts/node_rim/node_rim.gml index 30e8479ca..60bd64f51 100644 --- a/scripts/node_rim/node_rim.gml +++ b/scripts/node_rim/node_rim.gml @@ -2,7 +2,7 @@ function Node_Rim(_x, _y, _group = noone) : Node_Shader_Processor(_x, _y, _group name = "Rim"; shader = sh_rim; - inputs[1] = nodeValue_Rotation("Angle", self, 0); + newInput(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 bd91d8414..4dbd1aa41 100644 --- a/scripts/node_rm_cloud/node_rm_cloud.gml +++ b/scripts/node_rm_cloud/node_rm_cloud.gml @@ -1,11 +1,11 @@ function Node_RM_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "RM CLoud"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Vec3("Position", self, [ 0, 0, 0 ]); + newInput(1, nodeValue_Vec3("Position", self, [ 0, 0, 0 ])); - inputs[2] = nodeValue_Vec3("Rotation", self, [ 0, 0, 0 ]); + newInput(2, nodeValue_Vec3("Rotation", self, [ 0, 0, 0 ])); inputs[3] = nodeValue_Float("Scale", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); @@ -13,22 +13,22 @@ function Node_RM_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[4] = nodeValue_Float("FOV", self, 30) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }); - inputs[5] = nodeValue_Vec2("View Range", self, [ 0, 6 ]); + newInput(5, nodeValue_Vec2("View Range", self, [ 0, 6 ])); inputs[6] = nodeValue_Float("Density", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Int("Detail", self, 8); + newInput(7, nodeValue_Int("Detail", self, 8)); inputs[8] = nodeValue_Float("Threshold", self, 0.4) .setDisplay(VALUE_DISPLAY.slider); - inputs[9] = nodeValue_Float("Detail Scaling", self, 2.); + newInput(9, nodeValue_Float("Detail Scaling", self, 2.)); inputs[10] = nodeValue_Float("Detail Attenuation", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[11] = nodeValue_Enum_Scroll("Shape", self, 0, [ "Volume", "Plane" ]); + newInput(11, nodeValue_Enum_Scroll("Shape", self, 0, [ "Volume", "Plane" ])); inputs[12] = nodeValue_Bool("Use Fog", self, 0) diff --git a/scripts/node_rm_combine/node_rm_combine.gml b/scripts/node_rm_combine/node_rm_combine.gml index 5b80489dc..47969d597 100644 --- a/scripts/node_rm_combine/node_rm_combine.gml +++ b/scripts/node_rm_combine/node_rm_combine.gml @@ -1,34 +1,34 @@ function Node_RM_Combine(_x, _y, _group = noone) : Node_RM(_x, _y, _group) constructor { name = "RM Combine"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[1] = nodeValue_Enum_Button("Projection", self, 0, [ "Perspective", "Orthographic" ]); + newInput(1, nodeValue_Enum_Button("Projection", self, 0, [ "Perspective", "Orthographic" ])); inputs[2] = nodeValue_Float("FOV", self, 30) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }); inputs[3] = nodeValue_Float("Ortho Scale", self, 5.) - inputs[4] = nodeValue_Vec2("View Range", self, [ 3, 6 ]); + newInput(4, nodeValue_Vec2("View Range", self, [ 3, 6 ])); inputs[5] = nodeValue_Float("Depth", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[6] = nodeValue_Bool("Draw BG", self, false); + newInput(6, nodeValue_Bool("Draw BG", self, false)); - inputs[7] = nodeValue_Color("Background", self, c_black); + newInput(7, nodeValue_Color("Background", self, c_black)); inputs[8] = nodeValue_Float("Ambient Level", self, 0.2) .setDisplay(VALUE_DISPLAY.slider); - inputs[9] = nodeValue_Vec3("Light Position", self, [ -.4, -.5, 1 ]); + newInput(9, nodeValue_Vec3("Light Position", self, [ -.4, -.5, 1 ])); - inputs[10] = nodeValue_Surface("Environment", self); + newInput(10, nodeValue_Surface("Environment", self)); - inputs[11] = nodeValue_Vec3("Camera Rotation", self, [ 30, 45, 0 ]); + newInput(11, nodeValue_Vec3("Camera Rotation", self, [ 30, 45, 0 ])); inputs[12] = nodeValue_Float("Camera Scale", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); @@ -43,14 +43,14 @@ function Node_RM_Combine(_x, _y, _group = noone) : Node_RM(_x, _y, _group) const //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[15] = nodeValue_Enum_Scroll("Type", self, 0, [ "Place", "Union", "Subtract", "Intersect" ]); + newInput(15, nodeValue_Enum_Scroll("Type", self, 0, [ "Place", "Union", "Subtract", "Intersect" ])); inputs[16] = nodeValue_Float("Merge", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); - inputs[17] = nodeValue_Bool("Render", self, true); + newInput(17, nodeValue_Bool("Render", self, true)); - inputs[18] = nodeValue_Bool("Env Interpolation", self, false); + newInput(18, nodeValue_Bool("Env Interpolation", self, false)); outputs[0] = nodeValue_Output("Surface Out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_rm_primitive/node_rm_primitive.gml b/scripts/node_rm_primitive/node_rm_primitive.gml index 0d4fb2be8..e37194881 100644 --- a/scripts/node_rm_primitive/node_rm_primitive.gml +++ b/scripts/node_rm_primitive/node_rm_primitive.gml @@ -1,7 +1,7 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) constructor { name = "RM Primitive"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); shape_types = [ "Plane", "Box", "Box Frame", "Box Round", @@ -18,11 +18,11 @@ 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_Enum_Scroll("Shape", self, 1, { data: shape_types_str, horizontal: true, text_pad: ui(16) }); + newInput(1, nodeValue_Enum_Scroll("Shape", self, 1, { data: shape_types_str, horizontal: true, text_pad: ui(16) })); - inputs[2] = nodeValue_Vec3("Position", self, [ 0, 0, 0 ]); + newInput(2, nodeValue_Vec3("Position", self, [ 0, 0, 0 ])); - inputs[3] = nodeValue_Vec3("Rotation", self, [ 0, 0, 0 ]); + newInput(3, nodeValue_Vec3("Rotation", self, [ 0, 0, 0 ])); inputs[4] = nodeValue_Float("Scale", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); @@ -30,43 +30,43 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con inputs[5] = nodeValue_Float("FOV", self, 30) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }); - inputs[6] = nodeValue_Vec2("View Range", self, [ 3, 6 ]); + newInput(6, nodeValue_Vec2("View Range", self, [ 3, 6 ])); inputs[7] = nodeValue_Float("Depth", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[8] = nodeValue_Vec3("Light Position", self, [ -.4, -.5, 1 ]); + newInput(8, nodeValue_Vec3("Light Position", self, [ -.4, -.5, 1 ])); - inputs[9] = nodeValue_Color("Base Color", self, c_white); + newInput(9, nodeValue_Color("Base Color", self, c_white)); inputs[10] = nodeValue_Float("Ambient Level", self, 0.2) .setDisplay(VALUE_DISPLAY.slider); - inputs[11] = nodeValue_Vec3("Elongate", self, [ 0, 0, 0 ]); + newInput(11, nodeValue_Vec3("Elongate", self, [ 0, 0, 0 ])); inputs[12] = nodeValue_Float("Rounded", self, 0.) .setDisplay(VALUE_DISPLAY.slider); - inputs[13] = nodeValue_Enum_Button("Projection", self, 0, [ "Perspective", "Orthographic" ]); + newInput(13, nodeValue_Enum_Button("Projection", self, 0, [ "Perspective", "Orthographic" ])); inputs[14] = nodeValue_Float("Ortho Scale", self, 1.) - inputs[15] = nodeValue_Vec3("Wave Amplitude", self, [ 4, 4, 4 ]); + newInput(15, nodeValue_Vec3("Wave Amplitude", self, [ 4, 4, 4 ])); - inputs[16] = nodeValue_Vec3("Wave Intensity", self, [ 0, 0, 0 ]); + newInput(16, nodeValue_Vec3("Wave Intensity", self, [ 0, 0, 0 ])); - inputs[17] = nodeValue_Vec3("Wave Phase", self, [ 0, 0, 0 ]); + newInput(17, nodeValue_Vec3("Wave Phase", self, [ 0, 0, 0 ])); - inputs[18] = nodeValue_Enum_Button("Twist Axis", self, 0, [ "X", "Y", "Z" ]); + newInput(18, nodeValue_Enum_Button("Twist Axis", self, 0, [ "X", "Y", "Z" ])); inputs[19] = nodeValue_Float("Twist Amount", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 8, 0.1 ] }); - inputs[20] = nodeValue_Vec3("Tile Distance", self, [ 1, 1, 1 ]); + newInput(20, nodeValue_Vec3("Tile Distance", self, [ 1, 1, 1 ])); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[21] = nodeValue_Vec3("Size", self, [ 1, 1, 1 ]); + newInput(21, nodeValue_Vec3("Size", self, [ 1, 1, 1 ])); inputs[22] = nodeValue_Float("Radius", self, .7) .setDisplay(VALUE_DISPLAY.slider); @@ -77,73 +77,73 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con inputs[24] = nodeValue_Float("Crop", self, 0.) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); - inputs[25] = nodeValue_Rotation("Angle", self, 30); + newInput(25, nodeValue_Rotation("Angle", self, 30)); inputs[26] = nodeValue_Float("Height", self, .5) .setDisplay(VALUE_DISPLAY.slider); - inputs[27] = nodeValue_Slider_Range("Radius Range", self, [ .7, .1 ]); + newInput(27, nodeValue_Slider_Range("Radius Range", self, [ .7, .1 ])); inputs[28] = nodeValue_Float("Uniform Size", self, 1) .setDisplay(VALUE_DISPLAY.slider); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[29] = nodeValue_Vec3("Tile Amount", self, [ 1, 1, 1 ]); + newInput(29, nodeValue_Vec3("Tile Amount", self, [ 1, 1, 1 ])); - inputs[30] = nodeValue_Color("Background", self, c_black); + newInput(30, nodeValue_Color("Background", self, c_black)); - inputs[31] = nodeValue_Bool("Draw BG", self, false); + newInput(31, nodeValue_Bool("Draw BG", self, false)); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[32] = nodeValue_Bool("Volumetric", self, false); + newInput(32, nodeValue_Bool("Volumetric", self, false)); inputs[33] = nodeValue_Float("Density", self, 0.3) .setDisplay(VALUE_DISPLAY.slider); - inputs[34] = nodeValue_Surface("Environment", self); + newInput(34, nodeValue_Surface("Environment", self)); inputs[35] = nodeValue_Float("Reflective", self, 0.) .setDisplay(VALUE_DISPLAY.slider); - inputs[36] = nodeValue_Surface("Texture", self); + newInput(36, nodeValue_Surface("Texture", self)); inputs[37] = nodeValue_Float("Triplanar Smoothing", self, 1.) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 10, 0.1 ] }); - inputs[38] = nodeValue_Float("Texture Scale", self, 1.); + newInput(38, nodeValue_Float("Texture Scale", self, 1.)); - inputs[39] = nodeValue_Vec4("Corner", self, [ 0.25, 0.25, 0.25, 0.25 ]); + newInput(39, nodeValue_Vec4("Corner", self, [ 0.25, 0.25, 0.25, 0.25 ])); - inputs[40] = nodeValue_Vec2("2D Size", self, [ 0.5, 0.5 ]); + newInput(40, nodeValue_Vec2("2D Size", self, [ 0.5, 0.5 ])); - inputs[41] = nodeValue_Int("Side", self, 3); + newInput(41, nodeValue_Int("Side", self, 3)); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[42] = nodeValue_Vec3("Camera Rotation", self, [ 30, 45, 0 ]); + newInput(42, nodeValue_Vec3("Camera Rotation", self, [ 30, 45, 0 ])); inputs[43] = nodeValue_Float("Camera Scale", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); - inputs[44] = nodeValue_Bool("Render", self, true); + newInput(44, nodeValue_Bool("Render", self, true)); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[45] = nodeValue_Bool("Tile", self, false); + newInput(45, nodeValue_Bool("Tile", self, false)); - inputs[46] = nodeValue_Vec3("Tiled Shift", self, [ 0, 0, 0 ]); + newInput(46, nodeValue_Vec3("Tiled Shift", self, [ 0, 0, 0 ])); - inputs[47] = nodeValue_Vec3("Tiled Rotation", self, [ 0, 0, 0 ]); + newInput(47, nodeValue_Vec3("Tiled Rotation", self, [ 0, 0, 0 ])); - inputs[48] = nodeValue_Float("Tiled Scale", self, 0); + newInput(48, nodeValue_Float("Tiled Scale", self, 0)); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[49] = nodeValue_Bool("Env Interpolation", self, false); + newInput(49, nodeValue_Bool("Env Interpolation", self, false)); - inputs[50] = nodeValue_Bool("Texture Interpolation", self, false); + newInput(50, nodeValue_Bool("Texture Interpolation", self, false)); outputs[0] = nodeValue_Output("Surface Out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_rm_render/node_rm_render.gml b/scripts/node_rm_render/node_rm_render.gml index eb4f3591b..ef0b0d155 100644 --- a/scripts/node_rm_render/node_rm_render.gml +++ b/scripts/node_rm_render/node_rm_render.gml @@ -1,34 +1,34 @@ function Node_RM_Render(_x, _y, _group = noone) : Node_RM(_x, _y, _group) constructor { name = "RM Render"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[1] = nodeValue_Enum_Button("Projection", self, 0, [ "Perspective", "Orthographic" ]); + newInput(1, nodeValue_Enum_Button("Projection", self, 0, [ "Perspective", "Orthographic" ])); inputs[2] = nodeValue_Float("FOV", self, 30) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }); inputs[3] = nodeValue_Float("Ortho Scale", self, 5.) - inputs[4] = nodeValue_Vec2("View Range", self, [ 3, 6 ]); + newInput(4, nodeValue_Vec2("View Range", self, [ 3, 6 ])); inputs[5] = nodeValue_Float("Depth", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[6] = nodeValue_Bool("Draw BG", self, false); + newInput(6, nodeValue_Bool("Draw BG", self, false)); - inputs[7] = nodeValue_Color("Background", self, c_black); + newInput(7, nodeValue_Color("Background", self, c_black)); inputs[8] = nodeValue_Float("Ambient Level", self, 0.2) .setDisplay(VALUE_DISPLAY.slider); - inputs[9] = nodeValue_Vec3("Light Position", self, [ -.4, -.5, 1 ]); + newInput(9, nodeValue_Vec3("Light Position", self, [ -.4, -.5, 1 ])); - inputs[10] = nodeValue_Surface("Environment", self); + newInput(10, nodeValue_Surface("Environment", self)); - inputs[11] = nodeValue_Vec3("Camera Rotation", self, [ 30, 45, 0 ]); + newInput(11, nodeValue_Vec3("Camera Rotation", self, [ 30, 45, 0 ])); inputs[12] = nodeValue_Float("Camera Scale", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); @@ -40,7 +40,7 @@ function Node_RM_Render(_x, _y, _group = noone) : Node_RM(_x, _y, _group) constr //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[14] = nodeValue_Bool("Env Interpolation", self, false); + newInput(14, nodeValue_Bool("Env Interpolation", self, false)); outputs[0] = nodeValue_Output("Surface Out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_rm_terrain/node_rm_terrain.gml b/scripts/node_rm_terrain/node_rm_terrain.gml index 0ec69e28d..9b8b36bd3 100644 --- a/scripts/node_rm_terrain/node_rm_terrain.gml +++ b/scripts/node_rm_terrain/node_rm_terrain.gml @@ -1,13 +1,13 @@ function Node_RM_Terrain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "RM Terrain"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Surface("Surface", self); + newInput(1, nodeValue_Surface("Surface", self)); - inputs[2] = nodeValue_Vec3("Position", self, [ 0, 0, 0 ]); + newInput(2, nodeValue_Vec3("Position", self, [ 0, 0, 0 ])); - inputs[3] = nodeValue_Vec3("Rotation", self, [ 30, 45, 0 ]); + newInput(3, nodeValue_Vec3("Rotation", self, [ 30, 45, 0 ])); inputs[4] = nodeValue_Float("Scale", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); @@ -15,25 +15,25 @@ function Node_RM_Terrain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[5] = nodeValue_Float("FOV", self, 30) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }); - inputs[6] = nodeValue_Vec2("View Range", self, [ 0, 6 ]); + newInput(6, nodeValue_Vec2("View Range", self, [ 0, 6 ])); inputs[7] = nodeValue_Float("BG Bleed", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[8] = nodeValue_Color("Ambient", self, c_white); + newInput(8, nodeValue_Color("Ambient", self, c_white)); inputs[9] = nodeValue_Float("Height", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); inputs[10] = nodeValue_Bool("Tile", self, true) - inputs[11] = nodeValue_Surface("Texture", self); + newInput(11, nodeValue_Surface("Texture", self)); - inputs[12] = nodeValue_Color("Background", self, c_black); + newInput(12, nodeValue_Color("Background", self, c_black)); - inputs[13] = nodeValue_Surface("Reflection", self); + newInput(13, nodeValue_Surface("Reflection", self)); - inputs[14] = nodeValue_Vec3("Sun Position", self, [ .5, 1, .5 ]); + newInput(14, nodeValue_Vec3("Sun Position", self, [ .5, 1, .5 ])); inputs[15] = nodeValue_Float("Shadow", self, 0.2) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_sampler/node_sampler.gml b/scripts/node_sampler/node_sampler.gml index d20a857ac..93473a034 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Vec2("Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); @@ -10,7 +10,7 @@ function Node_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[2] = nodeValue_Int("Sampling size", self, 1, "Size of square around the position to sample and average pixel color.") .setDisplay(VALUE_DISPLAY.slider, { range: [1, 3, 0.1] }); - inputs[3] = nodeValue_Bool("Alpha", self, false); + newInput(3, nodeValue_Bool("Alpha", self, false)); outputs[0] = nodeValue_Output("Color", self, VALUE_TYPE.color, c_white); diff --git a/scripts/node_scale/node_scale.gml b/scripts/node_scale/node_scale.gml index 78bd26b18..9ae34e646 100644 --- a/scripts/node_scale/node_scale.gml +++ b/scripts/node_scale/node_scale.gml @@ -4,18 +4,18 @@ function Node_Scale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con manage_atlas = false; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("Scale", self, 1); + newInput(1, nodeValue_Float("Scale", self, 1)); - inputs[2] = nodeValue_Enum_Button("Mode", self, 0, [ "Upscale", "Scale to fit" ]); + newInput(2, nodeValue_Enum_Button("Mode", self, 0, [ "Upscale", "Scale to fit" ])); - inputs[3] = nodeValue_Vec2("Target dimension", self, DEF_SURF); + newInput(3, nodeValue_Vec2("Target dimension", self, DEF_SURF)); - inputs[4] = nodeValue_Bool("Active", self, true); + newInput(4, nodeValue_Bool("Active", self, true)); active_index = 4; - inputs[5] = nodeValue_Bool("Scale atlas position", self, true); + newInput(5, nodeValue_Bool("Scale atlas position", self, true)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_scale_algo/node_scale_algo.gml b/scripts/node_scale_algo/node_scale_algo.gml index 9a399150a..49b343372 100644 --- a/scripts/node_scale_algo/node_scale_algo.gml +++ b/scripts/node_scale_algo/node_scale_algo.gml @@ -16,19 +16,19 @@ function Node_Scale_Algo(_x, _y, _group = noone) : Node_Processor(_x, _y, _group manage_atlas = false; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Enum_Scroll("Algorithm", self, 0, [ "Scale2x", "Scale3x", "CleanEdge" ]); + newInput(1, nodeValue_Enum_Scroll("Algorithm", self, 0, [ "Scale2x", "Scale3x", "CleanEdge" ])); inputs[2] = nodeValue_Float("Tolerance", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[3] = nodeValue_Bool("Active", self, true); + newInput(3, nodeValue_Bool("Active", self, true)); active_index = 3; - inputs[4] = nodeValue_Bool("Scale atlas position", self, true); + newInput(4, nodeValue_Bool("Scale atlas position", self, true)); - inputs[5] = nodeValue_Float("Scale", self, 4); + newInput(5, nodeValue_Float("Scale", self, 4)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_scatter/node_scatter.gml b/scripts/node_scatter/node_scatter.gml index 14f4df1f1..63c3dcf7d 100644 --- a/scripts/node_scatter/node_scatter.gml +++ b/scripts/node_scatter/node_scatter.gml @@ -12,28 +12,28 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c batch_output = false; dimension_index = 1; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Dimension(self); + newInput(1, nodeValue_Dimension(self)); inputs[2] = nodeValue_Int("Amount", self, 8) .setValidator(VV_min(0)); - inputs[3] = nodeValue_Vec2_Range("Scale", self, [ 1, 1, 1, 1 ] , { linked : true }); + newInput(3, nodeValue_Vec2_Range("Scale", self, [ 1, 1, 1, 1 ] , { linked : true })); - inputs[4] = nodeValue_Rotation_Random("Angle", self, [ 0, 0, 0, 0, 0 ] ); + newInput(4, nodeValue_Rotation_Random("Angle", self, [ 0, 0, 0, 0, 0 ] )); onSurfaceSize = function() { return getInputData(1, DEF_SURF); }; inputs[5] = nodeValue_Area("Area", self, DEF_AREA_REF, { onSurfaceSize }) .setUnitRef(onSurfaceSize, VALUE_UNIT.reference); - inputs[6] = nodeValue_Enum_Scroll("Distribution", self, 5, [ "Area", "Border", "Map", "Direct Data", "Path", "Full image + Tile" ]); + newInput(6, nodeValue_Enum_Scroll("Distribution", self, 5, [ "Area", "Border", "Map", "Direct Data", "Path", "Full image + Tile" ])); - inputs[7] = nodeValue_Bool("Point at center", self, false, "Rotate each copy to face the spawn center."); + newInput(7, nodeValue_Bool("Point at center", self, false, "Rotate each copy to face the spawn center.")); - inputs[8] = nodeValue_Bool("Uniform scaling", self, true); + newInput(8, nodeValue_Bool("Uniform scaling", self, true)); - inputs[9] = nodeValue_Enum_Button("Scatter", self, 1, [ "Uniform", "Random" ]); + newInput(9, nodeValue_Enum_Button("Scatter", self, 1, [ "Uniform", "Random" ])); inputs[10] = nodeValue_Float("Seed", self, 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) }); @@ -41,11 +41,11 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[11] = nodeValue_Gradient("Random blend", self, new gradientObject(cola(c_white))) .setMappable(28); - inputs[12] = nodeValue_Slider_Range("Alpha", self, [ 1, 1 ]); + newInput(12, nodeValue_Slider_Range("Alpha", self, [ 1, 1 ])); - inputs[13] = nodeValue_Surface("Distribution map", self); + newInput(13, nodeValue_Surface("Distribution map", self)); - inputs[14] = nodeValue_Vector("Distribution data", self, []); + newInput(14, nodeValue_Vector("Distribution data", self, [])); inputs[14].array_depth = 1; inputs[15] = nodeValue_Int("Array", self, 0, @"What to do when input array of surface. @@ -53,58 +53,58 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c - Mixed: Create single output scattering multiple images.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Spread output", "Index", "Random", "Data", "Texture" ]); - inputs[16] = nodeValue_Bool("Multiply alpha", self, true); + newInput(16, nodeValue_Bool("Multiply alpha", self, true)); inputs[17] = nodeValue_Text("Use value", self, [ "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_Enum_Scroll("Blend mode", self, 0, [ "Normal", "Add", "Max" ]); + newInput(18, nodeValue_Enum_Scroll("Blend mode", self, 0, [ "Normal", "Add", "Max" ])); - inputs[19] = nodeValue_PathNode("Path", self, noone); + newInput(19, nodeValue_PathNode("Path", self, noone)); - inputs[20] = nodeValue_Bool("Rotate along path", self, true); + newInput(20, nodeValue_Bool("Rotate along path", self, true)); inputs[21] = nodeValue_Float("Path Shift", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[22] = nodeValue_Float("Scatter Distance", self, 0); + newInput(22, nodeValue_Float("Scatter Distance", self, 0)); - inputs[23] = nodeValue_Bool("Sort Y", self, false); + newInput(23, nodeValue_Bool("Sort Y", self, false)); inputs[24] = nodeValue_Int("Array indices", self, []) .setArrayDepth(1); - inputs[25] = nodeValue_Surface("Array texture", self); + newInput(25, nodeValue_Surface("Array texture", self)); - inputs[26] = nodeValue_Range("Animated array", self, [ 0, 0 ], { linked : true }); + newInput(26, nodeValue_Range("Animated array", self, [ 0, 0 ], { linked : true })); - inputs[27] = nodeValue_Enum_Scroll("Animated array end", self, 0, [ "Loop", "Ping Pong" ]); + newInput(27, nodeValue_Enum_Scroll("Animated array end", self, 0, [ "Loop", "Ping Pong" ])); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[28] = nodeValueMap("Gradient map", self); + newInput(28, nodeValueMap("Gradient map", self)); - inputs[29] = nodeValueGradientRange("Gradient map range", self, inputs[11]); + newInput(29, nodeValueGradientRange("Gradient map range", self, inputs[11])); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[30] = nodeValue_Vec2("Uniform amount", self, [ 4, 4 ]); + newInput(30, nodeValue_Vec2("Uniform amount", self, [ 4, 4 ])); - inputs[31] = nodeValue_Bool("Auto amount", self, false); + newInput(31, nodeValue_Bool("Auto amount", self, false)); - inputs[32] = nodeValue_Rotation("Rotate per radius", self, 0); + newInput(32, nodeValue_Rotation("Rotate per radius", self, 0)); - inputs[33] = nodeValue_Vec2_Range("Random position", self, [ 0, 0, 0, 0 ]); + newInput(33, nodeValue_Vec2_Range("Random position", self, [ 0, 0, 0, 0 ])); - inputs[34] = nodeValue_Vec2("Scale per radius", self, [ 0, 0 ]); + newInput(34, nodeValue_Vec2("Scale per radius", self, [ 0, 0 ])); - inputs[35] = nodeValue_Rotation_Range("Angle range", self, [ 0, 360 ]); + newInput(35, nodeValue_Rotation_Range("Angle range", self, [ 0, 360 ])); - inputs[36] = nodeValue_Vec2("Shift position", self, [ 0, 0 ]); + newInput(36, nodeValue_Vec2("Shift position", self, [ 0, 0 ])); inputs[37] = nodeValue_Bool("Exact", self, false) - inputs[38] = nodeValue_Enum_Button("Spacing", self, 0, [ "After", "Between", "Around" ]); + newInput(38, nodeValue_Enum_Button("Spacing", self, 0, [ "After", "Between", "Around" ])); outputs[0] = nodeValue_Output("Surface out", self, 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 ba4f021b1..87c02effe 100644 --- a/scripts/node_scatter_points/node_scatter_points.gml +++ b/scripts/node_scatter_points/node_scatter_points.gml @@ -24,17 +24,17 @@ function Node_Scatter_Points(_x, _y, _group = noone) : Node(_x, _y, _group) cons .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }) .rejectArray(); - inputs[6] = nodeValue_Bool("Fixed position", self, false, "Fix point position, and only select point in the area."); + newInput(6, nodeValue_Bool("Fixed position", self, false, "Fix point position, and only select point in the area.")); - inputs[7] = nodeValue_Vec2("Reference dimension", self, DEF_SURF); + newInput(7, nodeValue_Vec2("Reference dimension", self, DEF_SURF)); - inputs[8] = nodeValue_Surface("Reference value", self); + newInput(8, nodeValue_Surface("Reference value", self)); - inputs[9] = nodeValue_Bool("Output 3D", self, false); + newInput(9, nodeValue_Bool("Output 3D", self, false)); - inputs[10] = nodeValue_Enum_Button("Normal", self, 0, [ "X", "Y", "Z" ]); + newInput(10, nodeValue_Enum_Button("Normal", self, 0, [ "X", "Y", "Z" ])); - inputs[11] = nodeValue_Float("Plane position", self, 0); + newInput(11, nodeValue_Float("Plane position", self, 0)); input_display_list = [ ["Base", false], 5, 6, 7, diff --git a/scripts/node_sdf/node_sdf.gml b/scripts/node_sdf/node_sdf.gml index d0c6aeac5..510de2373 100644 --- a/scripts/node_sdf/node_sdf.gml +++ b/scripts/node_sdf/node_sdf.gml @@ -8,12 +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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Bool("Active", self, true); + newInput(1, nodeValue_Bool("Active", self, true)); active_index = 1; - inputs[2] = nodeValue_Enum_Button("Side", self, 2, [ "Inside", "Outside", "Both" ]); + newInput(2, nodeValue_Enum_Button("Side", self, 2, [ "Inside", "Outside", "Both" ])); inputs[3] = nodeValue_Float("Max distance", self, 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 4f6241cc6..987379f5e 100644 --- a/scripts/node_segment_filter/node_segment_filter.gml +++ b/scripts/node_segment_filter/node_segment_filter.gml @@ -7,11 +7,11 @@ function Node_Segment_Filter(_x, _y, _group = noone) : Node(_x, _y, _group) cons .setVisible(true, true) .setArrayDepth(1); - inputs[1] = nodeValue_Rotation("Angle", self, 0); + newInput(1, nodeValue_Rotation("Angle", self, 0)); - inputs[2] = nodeValue_Float("Spread", self, 15); + newInput(2, nodeValue_Float("Spread", self, 15)); - inputs[3] = nodeValue_Bool("Both side", self, true); + newInput(3, nodeValue_Bool("Both side", self, true)); outputs[0] = nodeValue_Output("Segments", self, VALUE_TYPE.float, [[]]) .setDisplay(VALUE_DISPLAY.vector) diff --git a/scripts/node_sequence_anim/node_sequence_anim.gml b/scripts/node_sequence_anim/node_sequence_anim.gml index 66ce2273a..e57e8e627 100644 --- a/scripts/node_sequence_anim/node_sequence_anim.gml +++ b/scripts/node_sequence_anim/node_sequence_anim.gml @@ -13,7 +13,7 @@ function Node_Sequence_Anim(_x, _y, _group = noone) : Node(_x, _y, _group) const .setVisible(true, true) .setArrayDepth(1); - inputs[3] = nodeValue_Enum_Scroll("Overflow", self, 0, [ "Hold", "Loop", "Ping Pong", "Empty" ]); + newInput(3, nodeValue_Enum_Scroll("Overflow", self, 0, [ "Hold", "Loop", "Ping Pong", "Empty" ])); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_shadow/node_shadow.gml b/scripts/node_shadow/node_shadow.gml index 3e4c3f281..e838d255d 100644 --- a/scripts/node_shadow/node_shadow.gml +++ b/scripts/node_shadow/node_shadow.gml @@ -1,8 +1,8 @@ function Node_Shadow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Shadow"; - inputs[0] = nodeValue_Surface("Surface in", self); - inputs[1] = nodeValue_Color("Color", self, c_black); + newInput(0, nodeValue_Surface("Surface in", self)); + newInput(1, nodeValue_Color("Color", self, c_black)); inputs[2] = nodeValue_Float("Strength", self, .5) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] }); @@ -16,17 +16,17 @@ function Node_Shadow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[5] = nodeValue_Float("Blur", self, 3) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); - inputs[6] = nodeValue_Surface("Mask", self); + newInput(6, nodeValue_Surface("Mask", self)); inputs[7] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[8] = nodeValue_Bool("Active", self, true); + newInput(8, nodeValue_Bool("Active", self, true)); active_index = 8; __init_mask_modifier(6); // inputs 9, 10 - inputs[11] = nodeValue_Enum_Scroll("Positioning", self, 0, [ "Shift", "Light" ]); + newInput(11, nodeValue_Enum_Scroll("Positioning", self, 0, [ "Shift", "Light" ])); inputs[12] = nodeValue_Vec2("Light Position", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); diff --git a/scripts/node_shadow_cast/node_shadow_cast.gml b/scripts/node_shadow_cast/node_shadow_cast.gml index 9021a8d1c..244981a14 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_Surface("Background", self); + newInput(0, nodeValue_Surface("Background", self)); - inputs[1] = nodeValue_Surface("Solid", self); + newInput(1, nodeValue_Surface("Solid", self)); inputs[2] = nodeValue_Vec2("Light Position", self, [ 0, 0 ]) .setUnitRef(function(index) { @@ -30,15 +30,15 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou 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_Color("Ambient color", self, c_grey); + newInput(6, nodeValue_Color("Ambient color", self, c_grey)); - inputs[7] = nodeValue_Color("Light color", self, c_white); + newInput(7, nodeValue_Color("Light color", self, c_white)); - inputs[8] = nodeValue_Float("Light radius", self, 16); + newInput(8, nodeValue_Float("Light radius", self, 16)); - inputs[9] = nodeValue_Bool("Render solid", self, true); + newInput(9, nodeValue_Bool("Render solid", self, true)); - inputs[10] = nodeValue_Bool("Use BG color", self, false, "If checked, background color will be used as shadow caster."); + newInput(10, nodeValue_Bool("Use BG color", self, false, "If checked, background color will be used as shadow caster.")); inputs[11] = nodeValue_Float("BG threshold", self, 0.1) .setDisplay(VALUE_DISPLAY.slider); @@ -60,7 +60,7 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[16] = nodeValue_Float("Ambient occlusion strength", self, 0.1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }); - inputs[17] = nodeValue_Bool("Active", self, true); + newInput(17, nodeValue_Bool("Active", self, true)); active_index = 17; outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_shape/node_shape.gml b/scripts/node_shape/node_shape.gml index 477baefe1..dab5e3f14 100644 --- a/scripts/node_shape/node_shape.gml +++ b/scripts/node_shape/node_shape.gml @@ -33,9 +33,9 @@ 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); + newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Bool("Background", self, false); + newInput(1, nodeValue_Bool("Background", self, false)); shape_types = [ "Rectangle", "Diamond", "Trapezoid", "Parallelogram", @@ -52,7 +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_Enum_Scroll("Shape", self, 0, { data: shape_types_str, horizontal: true, text_pad: ui(16) }); + newInput(2, nodeValue_Enum_Scroll("Shape", self, 0, { data: shape_types_str, horizontal: true, text_pad: ui(16) })); inputs[3] = nodeValue_Area("Position", self, DEF_AREA_REF, { onSurfaceSize, useShape : false }) .setUnitRef(onSurfaceSize, VALUE_UNIT.reference); @@ -64,22 +64,22 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con .setDisplay(VALUE_DISPLAY.slider) .setVisible(false); - inputs[6] = nodeValue_Bool("Anti-aliasing", self, false); + newInput(6, nodeValue_Bool("Anti-aliasing", self, false)); - inputs[7] = nodeValue_Rotation("Rotation", self, 0); + newInput(7, nodeValue_Rotation("Rotation", self, 0)); - inputs[8] = nodeValue_Rotation_Range("Angle range", self, [ 0, 180 ]); + newInput(8, nodeValue_Rotation_Range("Angle range", self, [ 0, 180 ])); inputs[9] = nodeValue_Float("Corner radius", self, 0) .setValidator(VV_clamp(0, .5)) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }); inputs[9].overlay_draw_text = false; - inputs[10] = nodeValue_Color("Shape color", self, c_white); + newInput(10, nodeValue_Color("Shape color", self, c_white)); - inputs[11] = nodeValue_Color("Background color", self, c_black); + newInput(11, nodeValue_Color("Background color", self, c_black)); - inputs[12] = nodeValue_Bool("Height", self, false); + newInput(12, nodeValue_Bool("Height", self, false)); inputs[13] = nodeValue_Float("Start radius", self, 0.1) .setDisplay(VALUE_DISPLAY.slider) @@ -96,26 +96,26 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[17] = nodeValue_Vec2("Half Size", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ] ) .setUnitRef(onSurfaceSize); - inputs[18] = nodeValue_Bool("Tile", self, false); + newInput(18, nodeValue_Bool("Tile", self, false)); - inputs[19] = nodeValue_Rotation("Shape rotation", self, 0); + newInput(19, nodeValue_Rotation("Shape rotation", self, 0)); - inputs[20] = nodeValue_Slider_Range("Level", self, [ 0, 1 ]); + newInput(20, nodeValue_Slider_Range("Level", self, [ 0, 1 ])); - inputs[21] = nodeValue_Slider_Range("Angles", self, [ 0.5, 1.0 ]); + newInput(21, nodeValue_Slider_Range("Angles", self, [ 0.5, 1.0 ])); inputs[22] = nodeValue_Float("Skew", self, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); - inputs[23] = nodeValue_Slider_Range("Arrow Sizes", self, [ 0.2, 0.3 ] ); + newInput(23, nodeValue_Slider_Range("Arrow Sizes", self, [ 0.2, 0.3 ] )); - inputs[24] = nodeValue_Float("Arrow Head", self, 3 ); + newInput(24, nodeValue_Float("Arrow Head", self, 3 )); - inputs[25] = nodeValue_Int("Teeth Amount", self, 6 ); + newInput(25, nodeValue_Int("Teeth Amount", self, 6 )); - inputs[26] = nodeValue_Vec2("Teeth Size", self, [ 0.2, 0.2 ] , { slideSpeed : 0.01 }); + newInput(26, nodeValue_Vec2("Teeth Size", self, [ 0.2, 0.2 ] , { slideSpeed : 0.01 })); - inputs[27] = nodeValue_Rotation("Teeth Rotation", self, 0); + newInput(27, nodeValue_Rotation("Teeth Rotation", self, 0)); outputs[0] = nodeValue_Output("Surface out", self, 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 2ca8da598..5158abdb6 100644 --- a/scripts/node_shape_map/node_shape_map.gml +++ b/scripts/node_shape_map/node_shape_map.gml @@ -1,24 +1,24 @@ function Node_Shape_Map(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Shape Map"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Bool("Active", self, true); + newInput(1, nodeValue_Bool("Active", self, true)); active_index = 1; 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_Vec2("Map Scale", self, [ 4, 1 ]); + newInput(3, nodeValue_Vec2("Map Scale", self, [ 4, 1 ])); - inputs[4] = nodeValue_Float("Radius", self, 0.5); + newInput(4, nodeValue_Float("Radius", self, 0.5)); - inputs[5] = nodeValue_Int("Sides", self, 4); + newInput(5, nodeValue_Int("Sides", self, 4)); inputs[6] = nodeValue_Float("Scale", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); - inputs[7] = nodeValue_Rotation("Angle", self, 0); + newInput(7, nodeValue_Rotation("Angle", self, 0)); outputs[0] = nodeValue_Output("Surface out", self, 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 5ce8e2ec2..78b37d304 100644 --- a/scripts/node_shape_polygon/node_shape_polygon.gml +++ b/scripts/node_shape_polygon/node_shape_polygon.gml @@ -6,20 +6,20 @@ 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); + newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Bool("Background", self, false); + newInput(1, nodeValue_Bool("Background", self, false)); - inputs[2] = nodeValue_Color("Background color", self, c_black); + newInput(2, nodeValue_Color("Background color", self, c_black)); - inputs[3] = nodeValue_Color("Shape color", self, c_white); + newInput(3, nodeValue_Color("Shape color", self, c_white)); - inputs[4] = nodeValue_Enum_Scroll("Shape", self, 0, shapesArray); + newInput(4, nodeValue_Enum_Scroll("Shape", self, 0, shapesArray)); inputs[5] = nodeValue_Vec2("Position", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[6] = nodeValue_Rotation("Rotation", self, 0); + newInput(6, nodeValue_Rotation("Rotation", self, 0)); inputs[7] = nodeValue_Vec2("Scale", self, [ 0.5, 0.5 ]) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); @@ -42,9 +42,9 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[13] = nodeValue_Float("Teeth taper", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-0.5, 0.5, 0.01] }); - inputs[14] = nodeValue_Rotation_Range("Angle range", self, [ 0, 360 ]); + newInput(14, nodeValue_Rotation_Range("Angle range", self, [ 0, 360 ])); - inputs[15] = nodeValue_Bool("Round cap", self, false); + newInput(15, nodeValue_Bool("Round cap", self, false)); inputs[16] = nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone) .setVisible(true, true); diff --git a/scripts/node_shard_noise/node_shard_noise.gml b/scripts/node_shard_noise/node_shard_noise.gml index ed95b22c0..4e0d043d5 100644 --- a/scripts/node_shard_noise/node_shard_noise.gml +++ b/scripts/node_shard_noise/node_shard_noise.gml @@ -25,15 +25,15 @@ function Node_Shard_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y ////////////////////////////////////////////////////////////////////////////////// - inputs[ 6] = nodeValueMap("Scale map", self); addShaderProp(); + newInput( 6, nodeValueMap("Scale map", self)); addShaderProp(); - inputs[ 7] = nodeValueMap("Sharpness map", self); addShaderProp(); + newInput( 7, nodeValueMap("Sharpness map", self)); addShaderProp(); - inputs[ 8] = nodeValueMap("Progress map", self); addShaderProp(); + newInput( 8, nodeValueMap("Progress map", self)); addShaderProp(); ////////////////////////////////////////////////////////////////////////////////// - inputs[9] = nodeValue_Rotation("Rotation", self, 0); + newInput(9, nodeValue_Rotation("Rotation", self, 0)); addShaderProp(SHADER_UNIFORM.float, "rotation"); input_display_list = [ diff --git a/scripts/node_shell/node_shell.gml b/scripts/node_shell/node_shell.gml index abf8a1a61..f9c8b12f0 100644 --- a/scripts/node_shell/node_shell.gml +++ b/scripts/node_shell/node_shell.gml @@ -2,9 +2,9 @@ function Node_Shell(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Execute Shell"; setDimension(96, 32 + 24 * 1); - inputs[0] = nodeValue_Path("Path", self, ""); + newInput(0, nodeValue_Path("Path", self, "")); - inputs[1] = nodeValue_Text("Script", self, ""); + newInput(1, nodeValue_Text("Script", self, "")); insp1UpdateTooltip = "Run"; insp1UpdateIcon = [ THEME.sequence_control, 1, COLORS._main_value_positive ]; diff --git a/scripts/node_slideshow/node_slideshow.gml b/scripts/node_slideshow/node_slideshow.gml index 66ebaad39..edb067e75 100644 --- a/scripts/node_slideshow/node_slideshow.gml +++ b/scripts/node_slideshow/node_slideshow.gml @@ -6,13 +6,13 @@ function Node_Slideshow(_x, _y, _group = noone) : Node(_x, _y, _group) construct setDimension(128, 32); - inputs[0] = nodeValue_Int("Order", self, 0); + newInput(0, nodeValue_Int("Order", self, 0)); - inputs[1] = nodeValue_Text("Title", self, ""); + newInput(1, nodeValue_Text("Title", self, "")); - inputs[2] = nodeValue_Enum_Scroll("Anchor", self, 0, [ "Center", "Top left" ]); + newInput(2, nodeValue_Enum_Scroll("Anchor", self, 0, [ "Center", "Top left" ])); - inputs[3] = nodeValue_Float("Arrival Speed", self, 4); + newInput(3, nodeValue_Float("Arrival Speed", self, 4)); slide_title = ""; slide_anchor = 0; diff --git a/scripts/node_smear/node_bw.gml b/scripts/node_smear/node_bw.gml index 1d28185b4..a1f9d9cd6 100644 --- a/scripts/node_smear/node_bw.gml +++ b/scripts/node_smear/node_bw.gml @@ -10,11 +10,11 @@ function Node_BW(_x, _y) : Node_Processor(_x, _y) constructor { uniform_exp = shader_get_uniform(sh_bw, "brightness"); uniform_con = shader_get_uniform(sh_bw, "contrast"); - inputs[| 0] = new NodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); - inputs[| 1] = new NodeValue_Float(1, "Brightness", self, 0); + newInput(| 0, NodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0)); + newInput(| 1, NodeValue_Float(1, "Brightness", self, 0)); inputs[| 1].setDisplay(VALUE_DISPLAY.slider, [ -1, 1, 0.01]); - inputs[| 2] = new NodeValue_Float(2, "Contrast", self, 1); + newInput(| 2, NodeValue_Float(2, "Contrast", self, 1)); inputs[| 2].setDisplay(VALUE_DISPLAY.slider, [ -1, 4, 0.01]); outputs[| 0] = new nodeValue_Output(0, "Surface out", self, VALUE_TYPE.surface, surface_create(1, 1)); diff --git a/scripts/node_smear/node_smear.gml b/scripts/node_smear/node_smear.gml index 1cbe46001..9cf2b1ae6 100644 --- a/scripts/node_smear/node_smear.gml +++ b/scripts/node_smear/node_smear.gml @@ -1,7 +1,7 @@ function Node_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Smear"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Float("Strength", self, 0.2) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) @@ -10,34 +10,34 @@ function Node_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[2] = nodeValue_Rotation("Direction", self, 0) .setMappable(10); - inputs[3] = nodeValue_Surface("Mask", self); + newInput(3, nodeValue_Surface("Mask", self)); inputs[4] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_Bool("Active", self, true); + newInput(5, nodeValue_Bool("Active", self, true)); active_index = 5; - inputs[6] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(6, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(3); // inputs 7, 8 ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[ 9] = nodeValueMap("Strength map", self); + newInput( 9, nodeValueMap("Strength map", self)); - inputs[10] = nodeValueMap("Direction map", self); + newInput(10, nodeValueMap("Direction map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[11] = nodeValue_Enum_Button("Mode", self, 0, [ "Greyscale", "Alpha" ]); + newInput(11, nodeValue_Enum_Button("Mode", self, 0, [ "Greyscale", "Alpha" ])); - inputs[12] = nodeValue_Enum_Button("Modulate strength", self, 0, [ "Distance", "Color", "None" ]); + newInput(12, nodeValue_Enum_Button("Modulate strength", self, 0, [ "Distance", "Color", "None" ])); inputs[13] = nodeValue_Int("Spread", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range : [ 0, 30, 1 ] }); - inputs[14] = nodeValue_Bool("Invert", self, false); + newInput(14, nodeValue_Bool("Invert", self, false)); input_display_list = [ 5, 6, ["Surfaces", true], 0, 3, 4, 7, 8, diff --git a/scripts/node_smoke_add/node_smoke_add.gml b/scripts/node_smoke_add/node_smoke_add.gml index 644b9f543..0e487eb14 100644 --- a/scripts/node_smoke_add/node_smoke_add.gml +++ b/scripts/node_smoke_add/node_smoke_add.gml @@ -9,11 +9,11 @@ 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_Surface("Fluid brush", self); + newInput(1, nodeValue_Surface("Fluid brush", self)); - inputs[2] = nodeValue_Vec2("Position", self, [0, 0]); + newInput(2, nodeValue_Vec2("Position", self, [0, 0])); - inputs[3] = nodeValue_Bool("Active", self, true); + newInput(3, nodeValue_Bool("Active", self, true)); inputs[4] = nodeValue_Float("Inherit velocity", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); @@ -21,9 +21,9 @@ function Node_Smoke_Add(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) con inputs[5] = nodeValue_Float("Density", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[6] = nodeValue_Int("Expand velocity mask", self, 0); + newInput(6, nodeValue_Int("Expand velocity mask", self, 0)); - inputs[7] = nodeValue_Vec2("Velocity", self, [0, 0]); + newInput(7, nodeValue_Vec2("Velocity", self, [0, 0])); input_display_list = [ ["Domain", false], 0, 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 386de4b3f..796c56715 100644 --- a/scripts/node_smoke_add_collider/node_smoke_add_collider.gml +++ b/scripts/node_smoke_add_collider/node_smoke_add_collider.gml @@ -8,9 +8,9 @@ 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_Surface("Collider", self); + newInput(1, nodeValue_Surface("Collider", self)); - inputs[2] = nodeValue_Area("Area", self, DEF_AREA , { useShape : false }); + newInput(2, nodeValue_Area("Area", self, DEF_AREA , { useShape : false })); input_display_list = [ ["Domain", false], 0, 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 e04dbea5a..380d055e2 100644 --- a/scripts/node_smoke_apply_velocity/node_smoke_apply_velocity.gml +++ b/scripts/node_smoke_apply_velocity/node_smoke_apply_velocity.gml @@ -7,13 +7,13 @@ 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_Surface("Brush", self); + newInput(1, nodeValue_Surface("Brush", self)); - inputs[2] = nodeValue_Vec2("Position", self, [0, 0]); + newInput(2, nodeValue_Vec2("Position", self, [0, 0])); - inputs[3] = nodeValue_Vec2("Velocity", self, [0, 0]); + newInput(3, nodeValue_Vec2("Velocity", self, [0, 0])); - inputs[4] = nodeValue_Bool("Active", self, true); + newInput(4, nodeValue_Bool("Active", self, true)); input_display_list = [ ["Domain", false], 0, diff --git a/scripts/node_smoke_domain/node_smoke_domain.gml b/scripts/node_smoke_domain/node_smoke_domain.gml index 17b320cc1..ee91b9bb2 100644 --- a/scripts/node_smoke_domain/node_smoke_domain.gml +++ b/scripts/node_smoke_domain/node_smoke_domain.gml @@ -5,23 +5,23 @@ function Node_Smoke_Domain(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) manual_ungroupable = false; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Surface("Collision", self); + newInput(1, nodeValue_Surface("Collision", self)); - inputs[2] = nodeValue_Enum_Button("Material dissipation type", self, 1, [ "Multiply", "Subtract" ]); + newInput(2, nodeValue_Enum_Button("Material dissipation type", self, 1, [ "Multiply", "Subtract" ])); inputs[3] = nodeValue_Float("Material dissipation", self, 0.02) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.01 ] }); - inputs[4] = nodeValue_Enum_Button("Velocity dissipation type", self, 1, [ "Multiply", "Subtract" ]); + newInput(4, nodeValue_Enum_Button("Velocity dissipation type", self, 1, [ "Multiply", "Subtract" ])); inputs[5] = nodeValue_Float("Velocity dissipation", self, 0.00) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.01 ] }); - inputs[6] = nodeValue_Vec2("Acceleration", self, [ 0, 0 ]); + newInput(6, nodeValue_Vec2("Acceleration", self, [ 0, 0 ])); - inputs[7] = nodeValue_Vec2("Material intertia", self, [ 1, -0.2 ]); + newInput(7, nodeValue_Vec2("Material intertia", self, [ 1, -0.2 ])); inputs[8] = nodeValue_Float("Initial pressure", self, 0.75) .setDisplay(VALUE_DISPLAY.slider); @@ -32,7 +32,7 @@ function Node_Smoke_Domain(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) inputs[10] = nodeValue_Float("Velocity Maccormack weight", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[11] = nodeValue_Bool("Wrap", self, false); + newInput(11, nodeValue_Bool("Wrap", self, false)); outputs[0] = nodeValue_Output("Domain", self, VALUE_TYPE.sdomain, noone); diff --git a/scripts/node_smoke_group/node_smoke_group.gml b/scripts/node_smoke_group/node_smoke_group.gml index 0f51aab48..ce2f7f788 100644 --- a/scripts/node_smoke_group/node_smoke_group.gml +++ b/scripts/node_smoke_group/node_smoke_group.gml @@ -12,23 +12,23 @@ function Node_Smoke_Group(_x, _y, _group = noone) : Node_Collection(_x, _y, _gro outputNode = noone; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Surface("Collision", self); + newInput(1, nodeValue_Surface("Collision", self)); - inputs[2] = nodeValue_Enum_Button("Material dissipation type", self, 1, [ "Multiply", "Subtract" ]); + newInput(2, nodeValue_Enum_Button("Material dissipation type", self, 1, [ "Multiply", "Subtract" ])); inputs[3] = nodeValue_Float("Material dissipation", self, 0.02) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.01 ] }); - inputs[4] = nodeValue_Enum_Button("Velocity dissipation type", self, 1, [ "Multiply", "Subtract" ]); + newInput(4, nodeValue_Enum_Button("Velocity dissipation type", self, 1, [ "Multiply", "Subtract" ])); inputs[5] = nodeValue_Float("Velocity dissipation", self, 0.00) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.01 ] }); - inputs[6] = nodeValue_Vec2("Acceleration", self, [ 0, 0 ]); + newInput(6, nodeValue_Vec2("Acceleration", self, [ 0, 0 ])); - inputs[7] = nodeValue_Vec2("Material intertia", self, [ 1, -0.2 ]); + newInput(7, nodeValue_Vec2("Material intertia", self, [ 1, -0.2 ])); inputs[8] = nodeValue_Float("Initial pressure", self, 0.75) .setDisplay(VALUE_DISPLAY.slider); @@ -39,7 +39,7 @@ function Node_Smoke_Group(_x, _y, _group = noone) : Node_Collection(_x, _y, _gro inputs[10] = nodeValue_Float("Velocity Maccormack weight", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[11] = nodeValue_Bool("Wrap", self, false); + newInput(11, nodeValue_Bool("Wrap", self, false)); input_display_list_def = [ ["Domain", false], 0, 11, 1, diff --git a/scripts/node_smoke_render/node_smoke_render.gml b/scripts/node_smoke_render/node_smoke_render.gml index e2f9b964f..212688f3c 100644 --- a/scripts/node_smoke_render/node_smoke_render.gml +++ b/scripts/node_smoke_render/node_smoke_render.gml @@ -9,13 +9,13 @@ 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); + newInput(1, nodeValue_Dimension(self)); - inputs[2] = nodeValue_Bool("Interpolate", self, false); + newInput(2, nodeValue_Bool("Interpolate", self, false)); - inputs[3] = nodeValue_Bool("Draw Domain", self, false); + newInput(3, nodeValue_Bool("Draw Domain", self, false)); - inputs[4] = nodeValue_Bool("Auto Update", self, true); + newInput(4, nodeValue_Bool("Auto Update", self, true)); input_display_list = [ ["Domain", false], 0, 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 ccbe6a102..d32394ab9 100644 --- a/scripts/node_smoke_render_output/node_smoke_render_output.gml +++ b/scripts/node_smoke_render_output/node_smoke_render_output.gml @@ -11,13 +11,13 @@ 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); + newInput(1, nodeValue_Dimension(self)); - inputs[2] = nodeValue_Bool("Interpolate", self, false); + newInput(2, nodeValue_Bool("Interpolate", self, false)); - inputs[3] = nodeValue_Bool("Draw Domain", self, false); + newInput(3, nodeValue_Bool("Draw Domain", self, false)); - inputs[4] = nodeValue_Bool("Auto Update", self, true); + newInput(4, nodeValue_Bool("Auto Update", self, true)); input_display_list = [ ["Domain", false], 0, diff --git a/scripts/node_smoke_repulse/node_smoke_repulse.gml b/scripts/node_smoke_repulse/node_smoke_repulse.gml index 808a0fefc..86656ea0e 100644 --- a/scripts/node_smoke_repulse/node_smoke_repulse.gml +++ b/scripts/node_smoke_repulse/node_smoke_repulse.gml @@ -7,14 +7,14 @@ function Node_Smoke_Repulse(_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_Vec2("Position", self, [0, 0]); + newInput(1, nodeValue_Vec2("Position", self, [0, 0])); - inputs[2] = nodeValue_Float("Radius", self, 8); + newInput(2, nodeValue_Float("Radius", self, 8)); inputs[3] = nodeValue_Float("Strength", self, 0.10) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[4] = nodeValue_Enum_Button("Mode", self, 0, [ "Override", "Add" ]); + newInput(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 f1c54bc19..3d12efb96 100644 --- a/scripts/node_smoke_turbulence/node_smoke_turbulence.gml +++ b/scripts/node_smoke_turbulence/node_smoke_turbulence.gml @@ -7,7 +7,7 @@ function Node_Smoke_Turbulence(_x, _y, _group = noone) : Node_Smoke(_x, _y, _gro inputs[0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone) .setVisible(true, true); - inputs[1] = nodeValue_Area("Effect area", self, DEF_AREA, { useShape : false }); + newInput(1, nodeValue_Area("Effect area", self, DEF_AREA, { useShape : false })); inputs[2] = nodeValue_Float("Strength", self, 0.10) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); @@ -18,7 +18,7 @@ function Node_Smoke_Turbulence(_x, _y, _group = noone) : Node_Smoke(_x, _y, _gro inputs[4] = nodeValue_Float("Seed", self, 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_Enum_Button("Mode", self, 0, [ "Override", "Add" ]); + newInput(5, nodeValue_Enum_Button("Mode", self, 0, [ "Override", "Add" ])); input_display_list = [ ["Domain", false], 0, diff --git a/scripts/node_smoke_update/node_smoke_update.gml b/scripts/node_smoke_update/node_smoke_update.gml index d5c4041a6..efe4e3e06 100644 --- a/scripts/node_smoke_update/node_smoke_update.gml +++ b/scripts/node_smoke_update/node_smoke_update.gml @@ -9,7 +9,7 @@ function Node_Smoke_Update(_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_Bool("Active", self, true); + newInput(1, nodeValue_Bool("Active", self, true)); 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 261f7a15e..0f087ef9b 100644 --- a/scripts/node_smoke_vortex/node_smoke_vortex.gml +++ b/scripts/node_smoke_vortex/node_smoke_vortex.gml @@ -7,9 +7,9 @@ function Node_Smoke_Vortex(_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_Vec2("Position", self, [0, 0]); + newInput(1, nodeValue_Vec2("Position", self, [0, 0])); - inputs[2] = nodeValue_Float("Radius", self, 8); + newInput(2, nodeValue_Float("Radius", self, 8)); inputs[3] = nodeValue_Float("Strength", self, 0.10) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); @@ -17,7 +17,7 @@ function Node_Smoke_Vortex(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) inputs[4] = nodeValue_Float("Attraction", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); - inputs[5] = nodeValue_Enum_Button("Mode", self, 0, [ "Override", "Add" ]); + newInput(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 3fe758a4b..bb796ac6c 100644 --- a/scripts/node_solid/node_solid.gml +++ b/scripts/node_solid/node_solid.gml @@ -1,15 +1,15 @@ function Node_Solid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Solid"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); - inputs[1] = nodeValue_Color("Color", self, cola(c_white)); + newInput(1, nodeValue_Color("Color", self, cola(c_white))); - inputs[2] = nodeValue_Bool("Empty", self, false); + newInput(2, nodeValue_Bool("Empty", self, false)); - inputs[3] = nodeValue_Surface("Mask", self); + newInput(3, nodeValue_Surface("Mask", self)); - inputs[4] = nodeValue_Bool("Use mask dimension", self, true); + newInput(4, nodeValue_Bool("Use mask dimension", self, true)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_spherize/node_spherize.gml b/scripts/node_spherize/node_spherize.gml index c539cea54..b2da6c011 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Vec2("Center", self, [ DEF_SURF_W / 2, DEF_SURF_H / 2 ]) .setUnitRef(function(index) { return getDimension(index); }); @@ -17,15 +17,15 @@ function Node_Spherize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) 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_Surface("Mask", self); + newInput(5, nodeValue_Surface("Mask", self)); inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Bool("Active", self, true); + newInput(7, nodeValue_Bool("Active", self, true)); active_index = 7; - inputs[8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(8, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(5); // inputs 9, 10 diff --git a/scripts/node_spout_send/node_spout_send.gml b/scripts/node_spout_send/node_spout_send.gml index 3486dc24b..255734a96 100644 --- a/scripts/node_spout_send/node_spout_send.gml +++ b/scripts/node_spout_send/node_spout_send.gml @@ -1,9 +1,9 @@ function Node_Spout_Send(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Spout Send"; - inputs[0] = nodeValue_Text("Sender name", self, "PixelComposer"); + newInput(0, nodeValue_Text("Sender name", self, "PixelComposer")); - inputs[1] = nodeValue_Surface("Surface", self); + newInput(1, nodeValue_Surface("Surface", self)); outputs[0] = nodeValue_Output("Surface", self, 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 c2f2d1bfd..5807169bd 100644 --- a/scripts/node_sprite_stack/node_sprite_stack.gml +++ b/scripts/node_sprite_stack/node_sprite_stack.gml @@ -2,29 +2,29 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro name = "Sprite Stack"; dimension_index = 1; - inputs[0] = nodeValue_Surface("Base shape", self); + newInput(0, nodeValue_Surface("Base shape", self)); - inputs[1] = nodeValue_Dimension(self); + newInput(1, nodeValue_Dimension(self)); - inputs[2] = nodeValue_Int("Stack amount", self, 4); + newInput(2, nodeValue_Int("Stack amount", self, 4)); - inputs[3] = nodeValue_Vec2("Stack shift", self, [ 0, 1 ] ); + newInput(3, nodeValue_Vec2("Stack shift", self, [ 0, 1 ] )); inputs[4] = nodeValue_Vec2("Position", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[5] = nodeValue_Rotation("Rotation", self, 0); + newInput(5, nodeValue_Rotation("Rotation", self, 0)); - inputs[6] = nodeValue_Color("Stack blend", self, c_white ); + newInput(6, nodeValue_Color("Stack blend", self, c_white )); inputs[7] = nodeValue_Float("Alpha end", self, 1, "Alpha value for the last copy." ) .setDisplay(VALUE_DISPLAY.slider); - inputs[8] = nodeValue_Bool("Move base", self, false, "Make each copy move the original image." ); + newInput(8, nodeValue_Bool("Move base", self, false, "Make each copy move the original image." )); - inputs[9] = nodeValue_Enum_Scroll("Highlight", self, 0, [ "None", "Color", "Inner pixel" ]); + newInput(9, nodeValue_Enum_Scroll("Highlight", self, 0, [ "None", "Color", "Inner pixel" ])); - inputs[10] = nodeValue_Color("Highlight color", self, c_white); + newInput(10, nodeValue_Color("Highlight color", self, c_white)); inputs[11] = nodeValue_Float("Highlight alpha", self, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_stagger/node_stagger.gml b/scripts/node_stagger/node_stagger.gml index 71b95e9ad..698f23ef6 100644 --- a/scripts/node_stagger/node_stagger.gml +++ b/scripts/node_stagger/node_stagger.gml @@ -1,15 +1,15 @@ function Node_Stagger(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Stagger"; - inputs[0] = nodeValue_Surface("Surface", self); + newInput(0, nodeValue_Surface("Surface", self)); - inputs[1] = nodeValue_Int("Delay Step", self, 1); + newInput(1, nodeValue_Int("Delay Step", self, 1)); - inputs[2] = nodeValue_Int("Delay Amount", self, 1); + newInput(2, nodeValue_Int("Delay Amount", self, 1)); - inputs[3] = nodeValue("Stagger Curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); + newInput(3, nodeValue("Stagger Curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01)); - inputs[4] = nodeValue_Enum_Button("Overflow", self, 0, [ "Hide", "Clamp" ]); + newInput(4, nodeValue_Enum_Button("Overflow", self, 0, [ "Hide", "Clamp" ])); outputs[0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_strand_create/node_strand_create.gml b/scripts/node_strand_create/node_strand_create.gml index dae13e0ad..bd316dcc6 100644 --- a/scripts/node_strand_create/node_strand_create.gml +++ b/scripts/node_strand_create/node_strand_create.gml @@ -7,22 +7,22 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const update_on_frame = true; manual_ungroupable = false; - inputs[0] = nodeValue_Enum_Scroll("Type", self, 0, [ "Point", "Path", "Mesh" ]); + newInput(0, nodeValue_Enum_Scroll("Type", self, 0, [ "Point", "Path", "Mesh" ])); - inputs[1] = nodeValue_Int("Density", self, 8, "How many strands to generate."); + newInput(1, nodeValue_Int("Density", self, 8, "How many strands to generate.")); - inputs[2] = nodeValue_Vec2("Length", self, [ 4, 4 ]); + newInput(2, nodeValue_Vec2("Length", self, [ 4, 4 ])); - inputs[3] = nodeValue_Int("Segment", self, 4); + newInput(3, nodeValue_Int("Segment", self, 4)); inputs[4] = nodeValue_Float("Elasticity", self, 0.05, "Length preservation, the higher the value the easier it is to stretch each segment.") .setDisplay(VALUE_DISPLAY.slider); - inputs[5] = nodeValue_PathNode("Path", self, noone); + newInput(5, nodeValue_PathNode("Path", self, noone)); - inputs[6] = nodeValue_Vec2("Position", self, [ 0, 0 ]); + newInput(6, nodeValue_Vec2("Position", self, [ 0, 0 ])); - inputs[7] = nodeValue_Enum_Button("Side", self, 0, [ "Inner", "Outer", "Both" ]); + newInput(7, nodeValue_Enum_Button("Side", self, 0, [ "Inner", "Outer", "Both" ])); inputs[8] = nodeValue_Float("Spring", self, 0.8, "Angular stiffness, the higher the value the easier it is to bend each segment.") .setDisplay(VALUE_DISPLAY.slider); @@ -33,14 +33,14 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const inputs[10] = nodeValue_Int("Seed", self, 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) }); - inputs[11] = nodeValue_Float("Curl frequency", self, 0); + newInput(11, nodeValue_Float("Curl frequency", self, 0)); inputs[12] = nodeValue_Float("Curliness", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[13] = nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone); + newInput(13, nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone)); - inputs[14] = nodeValue_Enum_Scroll("Distribution", self, 0, [ "Uniform", "Random" ]); + newInput(14, nodeValue_Enum_Scroll("Distribution", self, 0, [ "Uniform", "Random" ])); inputs[15] = nodeValue_Trigger("Bake hair", self, false, "Prevent strand reseting to apply manual modification. Unbaking will remove all changes.") .setDisplay(VALUE_DISPLAY.button, { name: "Bake", UI : true, onClick: function() { @@ -50,7 +50,7 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const strandUpdate(true); } }); - inputs[16] = nodeValue_Bool("View fix hair", self, false); + newInput(16, nodeValue_Bool("View fix hair", self, false)); inputs[17] = nodeValue_Vec2("Root strength", self, [-1, -1]) .setTooltip("The force required to break strand from its root. Set to -1 to make strand infinitely strong."); diff --git a/scripts/node_strand_force_apply/node_strand_force_apply.gml b/scripts/node_strand_force_apply/node_strand_force_apply.gml index 698b219f3..451a9878a 100644 --- a/scripts/node_strand_force_apply/node_strand_force_apply.gml +++ b/scripts/node_strand_force_apply/node_strand_force_apply.gml @@ -9,14 +9,14 @@ function Node_Strand_Force_Apply(_x, _y, _group = noone) : _Node_Strand_Affector inputs[input_fix_len + 0] = nodeValue_Float("Strength", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 5, 0.01 ] }); - inputs[input_fix_len + 1] = nodeValue_Float("Turbulence", self, 0); + newInput(input_fix_len + 1, nodeValue_Float("Turbulence", self, 0)); inputs[input_fix_len + 2] = nodeValue_Int("Seed", self, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[input_fix_len + 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[input_fix_len + 3] = nodeValue_Float("Turbulence frequency", self, 0.5); + newInput(input_fix_len + 3, nodeValue_Float("Turbulence frequency", self, 0.5)); - inputs[input_fix_len + 4] = nodeValue_Int("Turbulence detail", self, 2); + newInput(input_fix_len + 4, nodeValue_Int("Turbulence detail", self, 2)); array_push(input_display_list, ["Force", false], input_fix_len + 0, input_fix_len + 2, input_fix_len + 1, input_fix_len + 3, input_fix_len + 4 diff --git a/scripts/node_strand_gravity/node_strand_gravity.gml b/scripts/node_strand_gravity/node_strand_gravity.gml index 9da017069..3e9db3d4d 100644 --- a/scripts/node_strand_gravity/node_strand_gravity.gml +++ b/scripts/node_strand_gravity/node_strand_gravity.gml @@ -9,9 +9,9 @@ function Node_Strand_Gravity(_x, _y, _group = noone) : Node(_x, _y, _group) cons inputs[0] = nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone) .setVisible(true, true); - inputs[1] = nodeValue_Float("Gravity", self, 1); + newInput(1, nodeValue_Float("Gravity", self, 1)); - inputs[2] = nodeValue_Rotation("Direction", self, 0); + newInput(2, nodeValue_Rotation("Direction", self, 0)); outputs[0] = nodeValue_Output("Strand", self, 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 eecad68ee..c3409c5d0 100644 --- a/scripts/node_strand_length_adjust/node_strand_length_adjust.gml +++ b/scripts/node_strand_length_adjust/node_strand_length_adjust.gml @@ -6,7 +6,7 @@ function Node_Strand_Length_Adjust(_x, _y, _group = noone) : _Node_Strand_Affect manual_ungroupable = false; - inputs[input_fix_len + 0] = nodeValue_Enum_Button("Type", self, 0, [ "Increase", "Decrease" ]); + newInput(input_fix_len + 0, nodeValue_Enum_Button("Type", self, 0, [ "Increase", "Decrease" ])); inputs[input_fix_len + 1] = nodeValue_Float("Strength", self, 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 fdc7d07de..93db5c7de 100644 --- a/scripts/node_strand_render/node_strand_render.gml +++ b/scripts/node_strand_render/node_strand_render.gml @@ -6,25 +6,25 @@ function Node_Strand_Render(_x, _y, _group = noone) : Node(_x, _y, _group) const manual_ungroupable = false; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone) .setVisible(true, true); - inputs[2] = nodeValue_Range("Thickness", self, [ 1, 1 ], { linked : true }); + newInput(2, nodeValue_Range("Thickness", self, [ 1, 1 ], { linked : true })); - inputs[3] = nodeValue("Thickness over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + newInput(3, nodeValue("Thickness over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11)); - inputs[4] = nodeValue_Gradient("Random color", self, new gradientObject(cola(c_white))); + newInput(4, nodeValue_Gradient("Random color", self, new gradientObject(cola(c_white)))); - inputs[5] = nodeValue_Gradient("Color over length", self, new gradientObject(cola(c_white))); + newInput(5, nodeValue_Gradient("Color over length", self, new gradientObject(cola(c_white)))); inputs[6] = nodeValue_Float("Seed", self, 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_Float("Child", self, 0, "Render extra strands between the real strands."); + newInput(7, nodeValue_Float("Child", self, 0, "Render extra strands between the real strands.")); - inputs[8] = nodeValue_Int("Update quality", self, 4); + newInput(8, nodeValue_Int("Update quality", self, 4)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); 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 a0f6d58e3..6d0daa218 100644 --- a/scripts/node_strand_render_texture/node_strand_render_texture.gml +++ b/scripts/node_strand_render_texture/node_strand_render_texture.gml @@ -6,16 +6,16 @@ function Node_Strand_Render_Texture(_x, _y, _group = noone) : Node(_x, _y, _grou manual_ungroupable = false; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue("Strand", self, JUNCTION_CONNECT.input, VALUE_TYPE.strands, noone) .setVisible(true, true); - inputs[2] = nodeValue_Range("Thickness", self, [ 8, 8 ], { linked : true }); + newInput(2, nodeValue_Range("Thickness", self, [ 8, 8 ], { linked : true })); - inputs[3] = nodeValue_Gradient("Random color", self, new gradientObject(cola(c_white))); + newInput(3, nodeValue_Gradient("Random color", self, new gradientObject(cola(c_white)))); - inputs[4] = nodeValue_Surface("Texture", self); + newInput(4, nodeValue_Surface("Texture", self)); inputs[5] = nodeValue_Float("Seed", self, 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/node_string.gml b/scripts/node_string/node_string.gml index d32aa65ea..8f49b1ba8 100644 --- a/scripts/node_string/node_string.gml +++ b/scripts/node_string/node_string.gml @@ -2,7 +2,7 @@ function Node_String(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co name = "Text"; setDimension(96, 48);; - inputs[0] = nodeValue_Text("Text", self, ""); + newInput(0, nodeValue_Text("Text", self, "")); outputs[0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); diff --git a/scripts/node_string_get_char/node_string_get_char.gml b/scripts/node_string_get_char/node_string_get_char.gml index b9463e953..bc6e8b8ed 100644 --- a/scripts/node_string_get_char/node_string_get_char.gml +++ b/scripts/node_string_get_char/node_string_get_char.gml @@ -5,9 +5,9 @@ function Node_String_Get_Char(_x, _y, _group = noone) : Node_Processor(_x, _y, _ inputs[0] = nodeValue_Text("Text", self, "") .setVisible(true, true); - inputs[1] = nodeValue_Int("Index", self, 1); + newInput(1, nodeValue_Int("Index", self, 1)); - inputs[2] = nodeValue_Int("Amount", self, 1); + newInput(2, nodeValue_Int("Amount", self, 1)); outputs[0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); diff --git a/scripts/node_string_length/node_string_length.gml b/scripts/node_string_length/node_string_length.gml index 0084d0e6e..30b24cae9 100644 --- a/scripts/node_string_length/node_string_length.gml +++ b/scripts/node_string_length/node_string_length.gml @@ -6,7 +6,7 @@ function Node_String_Length(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[0] = nodeValue_Text("Text", self, "") .setVisible(true, true); - inputs[1] = nodeValue_Enum_Scroll("Mode", self, 0, ["Character", "Word"]); + newInput(1, nodeValue_Enum_Scroll("Mode", self, 0, ["Character", "Word"])); outputs[0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); diff --git a/scripts/node_string_regex_match/node_string_regex_match.gml b/scripts/node_string_regex_match/node_string_regex_match.gml index d599385af..cc85ece86 100644 --- a/scripts/node_string_regex_match/node_string_regex_match.gml +++ b/scripts/node_string_regex_match/node_string_regex_match.gml @@ -6,7 +6,7 @@ function Node_String_Regex_Match(_x, _y, _group = noone) : Node_Processor(_x, _y inputs[0] = nodeValue_Text("Text", self, "") .setVisible(true, true); - inputs[1] = nodeValue_Text("Regex", self, ""); + newInput(1, nodeValue_Text("Regex", self, "")); outputs[0] = nodeValue_Output("Results", self, VALUE_TYPE.boolean, false); diff --git a/scripts/node_string_regex_replace/node_string_regex_replace.gml b/scripts/node_string_regex_replace/node_string_regex_replace.gml index d28a1c36a..4197159e8 100644 --- a/scripts/node_string_regex_replace/node_string_regex_replace.gml +++ b/scripts/node_string_regex_replace/node_string_regex_replace.gml @@ -6,9 +6,9 @@ function Node_String_Regex_Replace(_x, _y, _group = noone) : Node_Processor(_x, inputs[0] = nodeValue_Text("Text", self, "") .setVisible(true, true); - inputs[1] = nodeValue_Text("Regex", self, ""); + newInput(1, nodeValue_Text("Regex", self, "")); - inputs[2] = nodeValue_Text("Replacement", self, ""); + newInput(2, nodeValue_Text("Replacement", self, "")); outputs[0] = nodeValue_Output("Results", self, VALUE_TYPE.text, ""); diff --git a/scripts/node_string_regex_search/node_string_regex_search.gml b/scripts/node_string_regex_search/node_string_regex_search.gml index 483c8ece1..db0ca401d 100644 --- a/scripts/node_string_regex_search/node_string_regex_search.gml +++ b/scripts/node_string_regex_search/node_string_regex_search.gml @@ -6,7 +6,7 @@ function Node_String_Regex_Search(_x, _y, _group = noone) : Node_Processor(_x, _ inputs[0] = nodeValue_Text("Text", self, "") .setVisible(true, true); - inputs[1] = nodeValue_Text("Regex", self, ""); + newInput(1, nodeValue_Text("Regex", self, "")); outputs[0] = nodeValue_Output("Results", self, VALUE_TYPE.text, []); diff --git a/scripts/node_string_split/node_string_split.gml b/scripts/node_string_split/node_string_split.gml index ccce6fdae..f885e533f 100644 --- a/scripts/node_string_split/node_string_split.gml +++ b/scripts/node_string_split/node_string_split.gml @@ -4,7 +4,7 @@ function Node_String_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[0] = nodeValue_Text("Text", self, "") .setVisible(true, true); - inputs[1] = nodeValue_Text("Delimiter", self, " ", "Character that used to split text,\nleave blank to create character array."); + newInput(1, nodeValue_Text("Delimiter", self, " ", "Character that used to split text,\nleave blank to create character array.")); inputs[1].editWidget.format = TEXT_AREA_FORMAT.delimiter; outputs[0] = nodeValue_Output("Text", self, VALUE_TYPE.text, ""); diff --git a/scripts/node_string_trim/node_string_trim.gml b/scripts/node_string_trim/node_string_trim.gml index 3aa9faaac..91d7d6fbf 100644 --- a/scripts/node_string_trim/node_string_trim.gml +++ b/scripts/node_string_trim/node_string_trim.gml @@ -6,11 +6,11 @@ function Node_String_Trim(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[0] = nodeValue_Text("Text", self, "") .setVisible(true, true); - inputs[1] = nodeValue_Int("Head", self, 0); + newInput(1, nodeValue_Int("Head", self, 0)); - inputs[2] = nodeValue_Int("Tail", self, 0); + newInput(2, nodeValue_Int("Tail", self, 0)); - inputs[3] = nodeValue_Enum_Scroll("Trim", self, 0, ["Character", "Word"]); + newInput(3, nodeValue_Enum_Scroll("Trim", self, 0, ["Character", "Word"])); 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."); diff --git a/scripts/node_stripe/node_stripe.gml b/scripts/node_stripe/node_stripe.gml index e54ee3ec9..918a65cc4 100644 --- a/scripts/node_stripe/node_stripe.gml +++ b/scripts/node_stripe/node_stripe.gml @@ -1,7 +1,7 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Stripe"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Float("Amount", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }) @@ -10,7 +10,7 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[2] = nodeValue_Rotation("Angle", self, 0) .setMappable(12); - inputs[3] = nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ]); + newInput(3, nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ])); inputs[4] = nodeValue_Vec2("Position", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(index); }); @@ -19,14 +19,14 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co .setDisplay(VALUE_DISPLAY.slider) .setMappable(13); - inputs[6] = nodeValue_Enum_Button("Coloring", self, 0, [ "Alternate", "Palette", "Random" ]); + newInput(6, nodeValue_Enum_Button("Coloring", self, 0, [ "Alternate", "Palette", "Random" ])); inputs[7] = nodeValue_Gradient("Colors", self, new gradientObject(cola(c_white))) .setMappable(15); - inputs[8] = nodeValue_Color("Color 1", self, c_white); + newInput(8, nodeValue_Color("Color 1", self, c_white)); - inputs[9] = nodeValue_Color("Color 2", self, c_black); + newInput(9, nodeValue_Color("Color 2", self, c_black)); inputs[10] = nodeValue_Float("Strip ratio", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) @@ -34,26 +34,26 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[11] = nodeValueMap("Amount map", self); + newInput(11, nodeValueMap("Amount map", self)); - inputs[12] = nodeValueMap("Angle map", self); + newInput(12, nodeValueMap("Angle map", self)); - inputs[13] = nodeValueMap("Random map", self); + newInput(13, nodeValueMap("Random map", self)); - inputs[14] = nodeValueMap("Ratio map", self); + newInput(14, nodeValueMap("Ratio map", self)); - inputs[15] = nodeValueMap("Gradient map", self); + newInput(15, nodeValueMap("Gradient map", self)); - inputs[16] = nodeValueGradientRange("Gradient map range", self, inputs[7]); + newInput(16, nodeValueGradientRange("Gradient map range", self, inputs[7])); ////////////////////////////////////////////////////////////////////////////////////////////////// inputs[17] = nodeValue_Float("Progress", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); - inputs[18] = nodeValue_Palette("Colors", self, [ c_black, c_white ] ); + newInput(18, nodeValue_Palette("Colors", self, [ c_black, c_white ] )); - inputs[19] = nodeValueSeed(self, VALUE_TYPE.float); + newInput(19, nodeValueSeed(self, VALUE_TYPE.float)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_struct_get/node_struct_get.gml b/scripts/node_struct_get/node_struct_get.gml index f9a07af10..86aa05ec0 100644 --- a/scripts/node_struct_get/node_struct_get.gml +++ b/scripts/node_struct_get/node_struct_get.gml @@ -6,7 +6,7 @@ function Node_Struct_Get(_x, _y, _group = noone) : Node(_x, _y, _group) construc inputs[0] = nodeValue_Struct("Struct", self, {}) .setVisible(true, true); - inputs[1] = nodeValue_Text("Key", self, ""); + newInput(1, nodeValue_Text("Key", self, "")); outputs[0] = nodeValue_Output("Struct", self, VALUE_TYPE.struct, {}); diff --git a/scripts/node_struct_set/node_struct_set.gml b/scripts/node_struct_set/node_struct_set.gml index 363f41207..f3538d339 100644 --- a/scripts/node_struct_set/node_struct_set.gml +++ b/scripts/node_struct_set/node_struct_set.gml @@ -6,9 +6,9 @@ function Node_Struct_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construc inputs[0] = nodeValue_Struct("Struct", self, {}) .setVisible(true, true); - inputs[1] = nodeValue_Text("Key", self, ""); + newInput(1, nodeValue_Text("Key", self, "")); - inputs[2] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0); + newInput(2, nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)); outputs[0] = nodeValue_Output("Struct", self, VALUE_TYPE.struct, {}); diff --git a/scripts/node_surface_data/node_surface_data.gml b/scripts/node_surface_data/node_surface_data.gml index 1b42657f1..076ac7578 100644 --- a/scripts/node_surface_data/node_surface_data.gml +++ b/scripts/node_surface_data/node_surface_data.gml @@ -2,7 +2,7 @@ function Node_Surface_data(_x, _y, _group = noone) : Node(_x, _y, _group) constr name = "Surface data"; color = COLORS.node_blend_number; - inputs[0] = nodeValue_Surface("Surface", self); + newInput(0, nodeValue_Surface("Surface", self)); outputs[0] = nodeValue_Output("Dimension", self, VALUE_TYPE.integer, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_surface_from_color/node_surface_from_color.gml b/scripts/node_surface_from_color/node_surface_from_color.gml index 24911752c..14c48c594 100644 --- a/scripts/node_surface_from_color/node_surface_from_color.gml +++ b/scripts/node_surface_from_color/node_surface_from_color.gml @@ -1,7 +1,7 @@ function Node_Surface_From_Color(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Surface from Color"; - inputs[0] = nodeValue_Palette("Color", self, array_clone(DEF_PALETTE)); + newInput(0, nodeValue_Palette("Color", self, array_clone(DEF_PALETTE))); outputs[0] = nodeValue_Output("Surface", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_surface_replace/node_surface_replace.gml b/scripts/node_surface_replace/node_surface_replace.gml index 9918d3875..4213daa85 100644 --- a/scripts/node_surface_replace/node_surface_replace.gml +++ b/scripts/node_surface_replace/node_surface_replace.gml @@ -1,7 +1,7 @@ function Node_Surface_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Replace Image"; - inputs[0] = nodeValue_Surface("Base Image", self); + newInput(0, nodeValue_Surface("Base Image", self)); inputs[1] = nodeValue_Surface("Target Image", self) .setArrayDepth(1); @@ -12,14 +12,14 @@ function Node_Surface_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _ inputs[3] = nodeValue_Float("Color Threshold", self, 0.1, "How similiar the color need to be in order to be count as matched." ) .setDisplay(VALUE_DISPLAY.slider); - inputs[4] = nodeValue_Bool("Draw Base Image", self, true ); + newInput(4, nodeValue_Bool("Draw Base Image", self, true )); - inputs[5] = nodeValue_Bool("Fast Mode", self, true ); + newInput(5, nodeValue_Bool("Fast Mode", self, true )); inputs[6] = nodeValue_Float("Pixel Threshold", self, 0.1, "How many pixel need to me matched to replace with replacement image." ) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Enum_Scroll("Array mode", self, 0, { data: [ "Match index", "Randomized" ], update_hover: false }); + newInput(7, nodeValue_Enum_Scroll("Array mode", self, 0, { data: [ "Match index", "Randomized" ], update_hover: false })); inputs[8] = nodeValue_Float("Seed", self, 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 d28c9923f..8073cecec 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("Surface", self); + newInput(0, nodeValue_Surface("Surface", self)); outputs[0] = nodeValue_Output("Buffer", self, 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 7392e3649..d74082640 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("Surface", self); + newInput(0, nodeValue_Surface("Surface", self)); outputs[0] = nodeValue_Output("Colors", self, VALUE_TYPE.color, []) .setDisplay(VALUE_DISPLAY.palette); diff --git a/scripts/node_svg/node_svg.gml b/scripts/node_svg/node_svg.gml index e329a529f..b8387b8d8 100644 --- a/scripts/node_svg/node_svg.gml +++ b/scripts/node_svg/node_svg.gml @@ -14,7 +14,7 @@ function Node_SVG(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { inputs[0] = nodeValue_Path("Path", self, "") .setDisplay(VALUE_DISPLAY.path_load, { filter: "Scalable Vector Graphics|*.svg" }); - inputs[1] = nodeValue_Float("Scale", self, 1); + newInput(1, nodeValue_Float("Scale", self, 1)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_text/node_text.gml b/scripts/node_text/node_text.gml index b86ba826e..0db116187 100644 --- a/scripts/node_text/node_text.gml +++ b/scripts/node_text/node_text.gml @@ -8,60 +8,60 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[1] = nodeValue_Text("Font", self, "") .setDisplay(VALUE_DISPLAY.path_font); - inputs[2] = nodeValue_Int("Size", self, 16); + newInput(2, nodeValue_Int("Size", self, 16)); - inputs[3] = nodeValue_Bool("Anti-Aliasing ", self, false); + newInput(3, nodeValue_Bool("Anti-Aliasing ", self, false)); - inputs[4] = nodeValue_Vec2("Character range", self, [ 32, 128 ]); + newInput(4, nodeValue_Vec2("Character range", self, [ 32, 128 ])); - inputs[5] = nodeValue_Color("Color", self, c_white); + newInput(5, nodeValue_Color("Color", self, c_white)); inputs[6] = nodeValue_Vec2("Fixed dimension", self, DEF_SURF ) .setVisible(true, false); - inputs[7] = nodeValue_Enum_Button("Horizontal alignment", self, 0 , [ THEME.inspector_text_halign, THEME.inspector_text_halign, THEME.inspector_text_halign]); + newInput(7, nodeValue_Enum_Button("Horizontal alignment", self, 0 , [ THEME.inspector_text_halign, THEME.inspector_text_halign, THEME.inspector_text_halign])); - inputs[8] = nodeValue_Enum_Button("Vertical alignment", self, 0 , [ THEME.inspector_text_valign, THEME.inspector_text_valign, THEME.inspector_text_valign ]); + newInput(8, nodeValue_Enum_Button("Vertical alignment", self, 0 , [ THEME.inspector_text_valign, THEME.inspector_text_valign, THEME.inspector_text_valign ])); - inputs[9] = nodeValue_Enum_Scroll("Output dimension", self, 1 , [ "Fixed", "Dynamic" ]); + newInput(9, nodeValue_Enum_Scroll("Output dimension", self, 1 , [ "Fixed", "Dynamic" ])); - inputs[10] = nodeValue_Padding("Padding", self, [0, 0, 0, 0]); + newInput(10, nodeValue_Padding("Padding", self, [0, 0, 0, 0])); - inputs[11] = nodeValue_Float("Letter spacing", self, 0); + newInput(11, nodeValue_Float("Letter spacing", self, 0)); - inputs[12] = nodeValue_Float("Line height", self, 0); + newInput(12, nodeValue_Float("Line height", self, 0)); inputs[13] = nodeValue_PathNode("Path", self, noone) .setVisible(true, true); - inputs[14] = nodeValue_Float("Path shift", self, 0); + newInput(14, nodeValue_Float("Path shift", self, 0)); - inputs[15] = nodeValue_Bool("Scale to fit", self, false); + newInput(15, nodeValue_Bool("Scale to fit", self, false)); - inputs[16] = nodeValue_Bool("Render background", self, false); + newInput(16, nodeValue_Bool("Render background", self, false)); - inputs[17] = nodeValue_Color("BG Color", self, c_black); + newInput(17, nodeValue_Color("BG Color", self, c_black)); - inputs[18] = nodeValue_Bool("Wave", self, false); + newInput(18, nodeValue_Bool("Wave", self, false)); - inputs[19] = nodeValue_Float("Wave amplitude", self, 4); + newInput(19, nodeValue_Float("Wave amplitude", self, 4)); - inputs[20] = nodeValue_Float("Wave scale", self, 30); + newInput(20, nodeValue_Float("Wave scale", self, 30)); - inputs[21] = nodeValue_Rotation("Wave phase", self, 0); + newInput(21, nodeValue_Rotation("Wave phase", self, 0)); inputs[22] = nodeValue_Float("Wave shape", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 3, 0.01 ] }); - inputs[23] = nodeValue_Bool("Typewriter", self, false); + newInput(23, nodeValue_Bool("Typewriter", self, false)); - inputs[24] = nodeValue_Slider_Range("Range", self, [ 0, 1 ]); + newInput(24, nodeValue_Slider_Range("Range", self, [ 0, 1 ])); - inputs[25] = nodeValue_Enum_Button("Trim type", self, 0 , [ "Character", "Word", "Line" ]); + newInput(25, nodeValue_Enum_Button("Trim type", self, 0 , [ "Character", "Word", "Line" ])); - inputs[26] = nodeValue_Bool("Use full text size", self, true ); + newInput(26, nodeValue_Bool("Use full text size", self, true )); - inputs[27] = nodeValue_Int("Max line width", self, 0 ); + newInput(27, nodeValue_Int("Max line width", self, 0 )); input_display_list = [ ["Output", true], 9, 6, 10, diff --git a/scripts/node_texture_remap/node_texture_remap.gml b/scripts/node_texture_remap/node_texture_remap.gml index a89108426..97185c57f 100644 --- a/scripts/node_texture_remap/node_texture_remap.gml +++ b/scripts/node_texture_remap/node_texture_remap.gml @@ -4,14 +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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Surface("RG Map", self, "Displacement map where red retermine the X position, and green determine the Y position."); + newInput(1, nodeValue_Surface("RG Map", self, "Displacement map where red retermine the X position, and green determine the Y position.")); - inputs[2] = nodeValue_Bool("Active", self, true); + newInput(2, nodeValue_Bool("Active", self, true)); active_index = 2; - inputs[3] = nodeValue_Enum_Button("Dimension Source", self, 0, [ "Surface", "RG Map" ]); + newInput(3, nodeValue_Enum_Button("Dimension Source", self, 0, [ "Surface", "RG Map" ])); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_threshold/node_threshold.gml b/scripts/node_threshold/node_threshold.gml index e8037352e..f8e5ca242 100644 --- a/scripts/node_threshold/node_threshold.gml +++ b/scripts/node_threshold/node_threshold.gml @@ -1,9 +1,9 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Threshold"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Bool("Brightness", self, false); + newInput(1, nodeValue_Bool("Brightness", self, false)); inputs[2] = nodeValue_Float("Brightness Threshold", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) @@ -12,15 +12,15 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[3] = nodeValue_Float("Brightness Smoothness", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[4] = nodeValue_Surface("Mask", self); + newInput(4, nodeValue_Surface("Mask", self)); inputs[5] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[6] = nodeValue_Bool("Active", self, true); + newInput(6, nodeValue_Bool("Active", self, true)); active_index = 6; - inputs[7] = nodeValue_Bool("Alpha", self, false); + newInput(7, nodeValue_Bool("Alpha", self, false)); inputs[8] = nodeValue_Float("Alpha Threshold", self, 0.5) .setDisplay(VALUE_DISPLAY.slider) @@ -29,15 +29,15 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[9] = nodeValue_Float("Alpha Smoothness", self, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[10] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(10, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(4); // inputs 11, 12 ////////////////////////////////////////////////////////////////////////////////////////////////// - inputs[13] = nodeValueMap("Brightness map", self); + newInput(13, nodeValueMap("Brightness map", self)); - inputs[14] = nodeValueMap("Alpha map", self); + newInput(14, nodeValueMap("Alpha map", self)); ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_tile/node_tile.gml b/scripts/node_tile/node_tile.gml index 164f7c42a..52ad330ec 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_Surface("Base texture", self); + newInput(0, nodeValue_Surface("Base texture", self)); - inputs[1] = nodeValue_Surface("Border texture", self); + newInput(1, nodeValue_Surface("Border texture", self)); outputs[0] = nodeValue_Output("", self, 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 38c7a6fab..7f4fbba45 100644 --- a/scripts/node_tile_random/node_tile_random.gml +++ b/scripts/node_tile_random/node_tile_random.gml @@ -2,9 +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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Dimension(self); + newInput(1, nodeValue_Dimension(self)); inputs[2] = nodeValue_Float("Randomness", self, 0.5) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_timeline_preview/node_timeline_preview.gml b/scripts/node_timeline_preview/node_timeline_preview.gml index f8ebdec05..e9d3b6bf0 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("Surface", self); + newInput(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 0d154c94c..e652580bd 100644 --- a/scripts/node_tonemap_ace/node_tonemap_ace.gml +++ b/scripts/node_tonemap_ace/node_tonemap_ace.gml @@ -1,17 +1,17 @@ function Node_Tonemap_ACE(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "ACE"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Surface("Mask", self); + newInput(1, nodeValue_Surface("Mask", self)); inputs[2] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[3] = nodeValue_Bool("Active", self, true); + newInput(3, nodeValue_Bool("Active", self, true)); active_index = 3; - inputs[4] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(4, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(1); // inputs 5, 6 diff --git a/scripts/node_trail/node_trail.gml b/scripts/node_trail/node_trail.gml index 455742409..436ccb48b 100644 --- a/scripts/node_trail/node_trail.gml +++ b/scripts/node_trail/node_trail.gml @@ -3,19 +3,19 @@ function Node_Trail(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { use_cache = CACHE_USE.manual; clearCacheOnChange = false; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Int("Max life", self, 5); + newInput(1, nodeValue_Int("Max life", self, 5)); - inputs[2] = nodeValue_Bool("Loop", self, false); + newInput(2, nodeValue_Bool("Loop", self, false)); - inputs[3] = nodeValue_Int("Max distance", self, -1, "Maximum distance to search for movement, set to -1 to search the entire image."); + newInput(3, nodeValue_Int("Max distance", self, -1, "Maximum distance to search for movement, set to -1 to search the entire image.")); - inputs[4] = nodeValue_Bool("Match color", self, true, "Make trail track pixels of the same color, instead of the closet pixels."); + newInput(4, nodeValue_Bool("Match color", self, true, "Make trail track pixels of the same color, instead of the closet pixels.")); - inputs[5] = nodeValue_Bool("Blend color", self, true, "Blend color between two pixel smoothly."); + newInput(5, nodeValue_Bool("Blend color", self, true, "Blend color between two pixel smoothly.")); - inputs[6] = nodeValue("Alpha over life", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); + newInput(6, nodeValue("Alpha over life", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_transform/node_transform.gml b/scripts/node_transform/node_transform.gml index d668ab520..531e9bee4 100644 --- a/scripts/node_transform/node_transform.gml +++ b/scripts/node_transform/node_transform.gml @@ -8,7 +8,7 @@ enum OUTPUT_SCALING { function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Transform"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Vec2("Output dimension", self, [ 1, 1 ]) .setVisible(false); @@ -35,27 +35,27 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) }) }); - inputs[4] = nodeValue_Bool("Relative anchor", self, true); + newInput(4, nodeValue_Bool("Relative anchor", self, true)); - inputs[5] = nodeValue_Rotation("Rotation", self, 0); + newInput(5, nodeValue_Rotation("Rotation", self, 0)); - inputs[6] = nodeValue_Vec2("Scale", self, [ 1, 1 ]); + newInput(6, nodeValue_Vec2("Scale", self, [ 1, 1 ])); - inputs[7] = nodeValue_Enum_Button("Render Mode", self, 0, [ "Normal", "Tile", "Wrap" ]); + newInput(7, nodeValue_Enum_Button("Render Mode", self, 0, [ "Normal", "Tile", "Wrap" ])); inputs[8] = nodeValue_Float("Rotate by velocity", self, 0, "Make the surface rotates to follow its movement.") .setDisplay(VALUE_DISPLAY.slider); - inputs[9] = nodeValue_Enum_Scroll("Output dimension type", self, OUTPUT_SCALING.same_as_input, [ "Same as input", "Constant", "Relative to input", "Transformed" ]); + newInput(9, nodeValue_Enum_Scroll("Output dimension type", self, OUTPUT_SCALING.same_as_input, [ "Same as input", "Constant", "Relative to input", "Transformed" ])); - inputs[10] = nodeValue_Bool("Round position", self, false, "Round position to the nearest integer value to avoid jittering."); + newInput(10, nodeValue_Bool("Round position", self, false, "Round position to the nearest integer value to avoid jittering.")); - inputs[11] = nodeValue_Bool("Active", self, true); + newInput(11, nodeValue_Bool("Active", self, true)); active_index = 11; - inputs[12] = nodeValue_Bool("Echo", self, false); + newInput(12, nodeValue_Bool("Echo", self, false)); - inputs[13] = nodeValue_Int("Echo amount", self, 8); + newInput(13, nodeValue_Int("Echo amount", self, 8)); inputs[14] = nodeValue_Float("Alpha", self, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_transform_single/node_transform_single.gml b/scripts/node_transform_single/node_transform_single.gml index 83c1bd766..777ddba1c 100644 --- a/scripts/node_transform_single/node_transform_single.gml +++ b/scripts/node_transform_single/node_transform_single.gml @@ -1,15 +1,15 @@ function Node_Transform_Single(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Transform single"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Float("Position x", self, 0); - inputs[2] = nodeValue_Float("Position y", self, 0); - inputs[3] = nodeValue_Float("Anchor x", self, 0); - inputs[4] = nodeValue_Float("Anchor y", self, 0); - inputs[5] = nodeValue_Float("Rotation", self, 0); - inputs[6] = nodeValue_Float("Scale x", self, 1); - inputs[7] = nodeValue_Float("Scale y", self, 1); + newInput(1, nodeValue_Float("Position x", self, 0)); + newInput(2, nodeValue_Float("Position y", self, 0)); + newInput(3, nodeValue_Float("Anchor x", self, 0)); + newInput(4, nodeValue_Float("Anchor y", self, 0)); + newInput(5, nodeValue_Float("Rotation", self, 0)); + newInput(6, nodeValue_Float("Scale x", self, 1)); + newInput(7, nodeValue_Float("Scale y", self, 1)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_trigger_bool/node_trigger_bool.gml b/scripts/node_trigger_bool/node_trigger_bool.gml index af6414838..7bdd7a64d 100644 --- a/scripts/node_trigger_bool/node_trigger_bool.gml +++ b/scripts/node_trigger_bool/node_trigger_bool.gml @@ -3,7 +3,7 @@ function Node_Trigger_Bool(_x, _y, _group = noone) : Node(_x, _y, _group) constr update_on_frame = true; setDimension(96, 32 + 24 * 1); - inputs[0] = nodeValue_Bool("Boolean", self, false); + newInput(0, nodeValue_Bool("Boolean", self, false)); 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), diff --git a/scripts/node_twirl/node_twirl.gml b/scripts/node_twirl/node_twirl.gml index 9523b6e49..e406dd229 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Vec2("Center", self, [ 0, 0 ]) .setUnitRef(function(index) { return getDimension(index); }); @@ -16,15 +16,15 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con 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_Surface("Mask", self); + newInput(5, nodeValue_Surface("Mask", self)); inputs[6] = nodeValue_Float("Mix", self, 1) .setDisplay(VALUE_DISPLAY.slider); - inputs[7] = nodeValue_Bool("Active", self, true); + newInput(7, nodeValue_Bool("Active", self, true)); active_index = 7; - inputs[8] = nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) }); + newInput(8, nodeValue_Toggle("Channel", self, 0b1111, { data: array_create(4, THEME.inspector_channel) })); __init_mask_modifier(5); // inputs 9, 10 diff --git a/scripts/node_unicode/node_unicode.gml b/scripts/node_unicode/node_unicode.gml index 17e7cb276..6de3e9ab3 100644 --- a/scripts/node_unicode/node_unicode.gml +++ b/scripts/node_unicode/node_unicode.gml @@ -5,7 +5,7 @@ function Node_Unicode(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c setDimension(96, 48); - inputs[0] = nodeValue_Int("Unicode", self, 64); + newInput(0, nodeValue_Int("Unicode", self, 64)); outputs[0] = nodeValue_Output("Character", self, VALUE_TYPE.text, 0); diff --git a/scripts/node_vector2/node_vector2.gml b/scripts/node_vector2/node_vector2.gml index b5e756362..5eb68ce93 100644 --- a/scripts/node_vector2/node_vector2.gml +++ b/scripts/node_vector2/node_vector2.gml @@ -10,9 +10,9 @@ function Node_Vector2(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[1] = nodeValue_Float("y", self, 0) .setVisible(true, true); - inputs[2] = nodeValue_Bool("Integer", self, false); + newInput(2, nodeValue_Bool("Integer", self, false)); - inputs[3] = nodeValue_Enum_Scroll("Display", self, 0, [ "Number", "Coordinate" ]); + newInput(3, nodeValue_Enum_Scroll("Display", self, 0, [ "Number", "Coordinate" ])); outputs[0] = nodeValue_Output("Vector", self, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_vector3/node_vector3.gml b/scripts/node_vector3/node_vector3.gml index c0e0c92a5..85c305ff0 100644 --- a/scripts/node_vector3/node_vector3.gml +++ b/scripts/node_vector3/node_vector3.gml @@ -12,7 +12,7 @@ function Node_Vector3(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[2] = nodeValue_Float("z", self, 0) .setVisible(true, true); - inputs[3] = nodeValue_Bool("Integer", self, false); + newInput(3, nodeValue_Bool("Integer", self, false)); outputs[0] = nodeValue_Output("Vector", self, VALUE_TYPE.float, [ 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_vector4/node_vector4.gml b/scripts/node_vector4/node_vector4.gml index cea4f7894..f56c31624 100644 --- a/scripts/node_vector4/node_vector4.gml +++ b/scripts/node_vector4/node_vector4.gml @@ -15,7 +15,7 @@ function Node_Vector4(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[3] = nodeValue_Float("w", self, 0) .setVisible(true, true); - inputs[4] = nodeValue_Bool("Integer", self, false); + newInput(4, nodeValue_Bool("Integer", self, false)); outputs[0] = nodeValue_Output("Vector", self, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_vector_swizzle/node_vector_swizzle.gml b/scripts/node_vector_swizzle/node_vector_swizzle.gml index d75241902..a46650e4b 100644 --- a/scripts/node_vector_swizzle/node_vector_swizzle.gml +++ b/scripts/node_vector_swizzle/node_vector_swizzle.gml @@ -7,7 +7,7 @@ function Node_Vector_Swizzle(_x, _y, _group = noone) : Node_Processor(_x, _y, _g .setArrayDepth(1) .setVisible(true, true); - inputs[1] = nodeValue_Text("Swizzle", self, ""); + newInput(1, nodeValue_Text("Swizzle", self, "")); outputs[0] = nodeValue_Output("Result", self, VALUE_TYPE.float, [] ); diff --git a/scripts/node_vignette/node_vignette.gml b/scripts/node_vignette/node_vignette.gml index febf17ba6..67e6acc7f 100644 --- a/scripts/node_vignette/node_vignette.gml +++ b/scripts/node_vignette/node_vignette.gml @@ -1,12 +1,12 @@ function Node_Vignette(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Vignette"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Bool("Active", self, true); + newInput(1, nodeValue_Bool("Active", self, true)); active_index = 1; - inputs[2] = nodeValue_Float("Exposure", self, 15); + newInput(2, nodeValue_Float("Exposure", self, 15)); inputs[3] = nodeValue_Float("Strength", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); diff --git a/scripts/node_voronoi_extra/node_voronoi_extra.gml b/scripts/node_voronoi_extra/node_voronoi_extra.gml index e3e4dae01..4a970e33f 100644 --- a/scripts/node_voronoi_extra/node_voronoi_extra.gml +++ b/scripts/node_voronoi_extra/node_voronoi_extra.gml @@ -6,7 +6,7 @@ function Node_Voronoi_Extra(_x, _y, _group = noone) : Node_Shader_Generator(_x, .setUnitRef(function(index) { return getDimension(index); }); addShaderProp(SHADER_UNIFORM.float, "position"); - inputs[2] = nodeValue_Vec2("Scale", self, [ 4, 4 ]); + newInput(2, nodeValue_Vec2("Scale", self, [ 4, 4 ])); addShaderProp(SHADER_UNIFORM.float, "scale"); inputs[3] = nodeValue_Float("Seed", self, seed_random(6)) @@ -16,14 +16,14 @@ function Node_Voronoi_Extra(_x, _y, _group = noone) : Node_Shader_Generator(_x, inputs[4] = nodeValue_Float("Progress", self, 0) addShaderProp(SHADER_UNIFORM.float, "progress"); - inputs[5] = nodeValue_Enum_Scroll("Mode", self, 0, [ "Block", "Triangle" ]); + newInput(5, nodeValue_Enum_Scroll("Mode", self, 0, [ "Block", "Triangle" ])); addShaderProp(SHADER_UNIFORM.integer, "mode"); inputs[6] = nodeValue_Float("Parameter A", self, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); addShaderProp(SHADER_UNIFORM.float, "paramA"); - inputs[7] = nodeValue_Rotation("Rotation", self, 0); + newInput(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 0d6b89558..ba6120398 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("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); inputs[1] = nodeValue_Vec2("Top left", self, [ 0, 0 ] ) .setUnitRef(function(index) { return getDimension(index); }); @@ -15,12 +15,12 @@ function Node_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[4] = nodeValue_Vec2("Bottom right", self, DEF_SURF ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[5] = nodeValue_Bool("Active", self, true); + newInput(5, nodeValue_Bool("Active", self, true)); active_index = 5; - inputs[6] = nodeValue_Bool("Use custom dimension", self, false); + newInput(6, nodeValue_Bool("Use custom dimension", self, false)); - inputs[7] = nodeValue_Dimension(self); + newInput(7, nodeValue_Dimension(self)); outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_wav_file_read/node_wav_file_read.gml b/scripts/node_wav_file_read/node_wav_file_read.gml index 6c466fb69..e725075a4 100644 --- a/scripts/node_wav_file_read/node_wav_file_read.gml +++ b/scripts/node_wav_file_read/node_wav_file_read.gml @@ -37,7 +37,7 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const TOTAL_FRAMES = max(1, ceil(content.duration * PROJECT.animator.framerate)); } }); - inputs[2] = nodeValue_Bool("Mono", self, false); + newInput(2, nodeValue_Bool("Mono", self, false)); outputs[0] = nodeValue_Output("Data", self, VALUE_TYPE.audioBit, noone) .setArrayDepth(1); 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 11e25f9af..c13e2448e 100644 --- a/scripts/node_wav_file_write/node_wav_file_write.gml +++ b/scripts/node_wav_file_write/node_wav_file_write.gml @@ -12,13 +12,13 @@ function Node_WAV_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) cons .setArrayDepth(1) .setVisible(true, true); - inputs[2] = nodeValue_Int("Sample", self, 44100); + newInput(2, nodeValue_Int("Sample", self, 44100)); - inputs[3] = nodeValue_Enum_Scroll("Bit Depth", self, 0, [ "8 bit positive", "16 bit integer" ]); + newInput(3, nodeValue_Enum_Scroll("Bit Depth", self, 0, [ "8 bit positive", "16 bit integer" ])); inputs[4] = nodeValue_Bool("Remap Data", self, false) - inputs[5] = nodeValue_Vec2("Data Range", self, [ 0, 1 ]); + newInput(5, nodeValue_Vec2("Data Range", self, [ 0, 1 ])); input_display_list = [ [ "Data", false], 1, 0, 4, 5, diff --git a/scripts/node_wavelet_noise/node_wavelet_noise.gml b/scripts/node_wavelet_noise/node_wavelet_noise.gml index 035d22772..bb70cec20 100644 --- a/scripts/node_wavelet_noise/node_wavelet_noise.gml +++ b/scripts/node_wavelet_noise/node_wavelet_noise.gml @@ -25,15 +25,15 @@ function Node_Wavelet_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, ////////////////////////////////////////////////////////////////////////////////// - inputs[ 6] = nodeValueMap("Scale map", self); addShaderProp(); + newInput( 6, nodeValueMap("Scale map", self)); addShaderProp(); - inputs[ 7] = nodeValueMap("Progress map", self); addShaderProp(); + newInput( 7, nodeValueMap("Progress map", self)); addShaderProp(); - inputs[ 8] = nodeValueMap("Detail map", self); addShaderProp(); + newInput( 8, nodeValueMap("Detail map", self)); addShaderProp(); ////////////////////////////////////////////////////////////////////////////////// - inputs[9] = nodeValue_Rotation("Rotation", self, 0); + newInput(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 774405b65..84d04108f 100644 --- a/scripts/node_websocket_receiver/node_websocket_receiver.gml +++ b/scripts/node_websocket_receiver/node_websocket_receiver.gml @@ -1,13 +1,13 @@ function Node_Websocket_Receiver(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Websocket Receiver"; - inputs[0] = nodeValue_Int("Port", self, 22400); + newInput(0, nodeValue_Int("Port", self, 22400)); - inputs[1] = nodeValue_Bool("Active", self, true); + newInput(1, nodeValue_Bool("Active", self, true)); - inputs[2] = nodeValue_Enum_Button("Mode", self, 1, [ "Client", "Server" ]); + newInput(2, nodeValue_Enum_Button("Mode", self, 1, [ "Client", "Server" ])); - inputs[3] = nodeValue_Text("Url", self, ""); + newInput(3, nodeValue_Text("Url", self, "")); outputs[0] = nodeValue_Output("Data", self, VALUE_TYPE.struct, {}); diff --git a/scripts/node_websocket_sender/node_websocket_sender.gml b/scripts/node_websocket_sender/node_websocket_sender.gml index d1bb2d3c3..431968461 100644 --- a/scripts/node_websocket_sender/node_websocket_sender.gml +++ b/scripts/node_websocket_sender/node_websocket_sender.gml @@ -1,21 +1,21 @@ function Node_Websocket_Sender(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "Websocket Sender"; - inputs[0] = nodeValue_Int("Port", self, 22800); + newInput(0, nodeValue_Int("Port", self, 22800)); - inputs[1] = nodeValue_Enum_Scroll("Data type", self, 0, [ "Struct", "Surface", "File", "Buffer" ]); + newInput(1, nodeValue_Enum_Scroll("Data type", self, 0, [ "Struct", "Surface", "File", "Buffer" ])); - inputs[2] = nodeValue_Struct("Struct", self, {}); + newInput(2, nodeValue_Struct("Struct", self, {})); - inputs[3] = nodeValue_Surface("Surface", self); + newInput(3, nodeValue_Surface("Surface", self)); inputs[4] = nodeValue_Path("Path", self, "") .setDisplay(VALUE_DISPLAY.path_load) .nonValidate(); - inputs[5] = nodeValue_Text("Target", self, "127.0.0.1"); + newInput(5, nodeValue_Text("Target", self, "127.0.0.1")); - inputs[6] = nodeValue_Buffer("Buffer", self, noone); + newInput(6, nodeValue_Buffer("Buffer", self, noone)); input_display_list = [ 5, 0, 1, 2, 3, 4, 6 ]; diff --git a/scripts/node_wrap_area/node_wrap_area.gml b/scripts/node_wrap_area/node_wrap_area.gml index d8162cfcb..f7f4bff0c 100644 --- a/scripts/node_wrap_area/node_wrap_area.gml +++ b/scripts/node_wrap_area/node_wrap_area.gml @@ -1,13 +1,13 @@ function Node_Wrap_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Area Warp"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); onSurfaceSize = function() { return surface_get_dimension(getInputData(0)); }; inputs[1] = nodeValue_Area("Area", self, DEF_AREA_REF, { onSurfaceSize, useShape : false }) .setUnitRef(onSurfaceSize, VALUE_UNIT.reference); - inputs[2] = nodeValue_Bool("Active", self, true); + newInput(2, nodeValue_Bool("Active", self, true)); active_index = 2; outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone); diff --git a/scripts/node_wrap_perspective/node_wrap_perspective.gml b/scripts/node_wrap_perspective/node_wrap_perspective.gml index 80c76e118..16f09c724 100644 --- a/scripts/node_wrap_perspective/node_wrap_perspective.gml +++ b/scripts/node_wrap_perspective/node_wrap_perspective.gml @@ -1,9 +1,9 @@ function Node_Warp_Perspective(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Perspective Warp"; - inputs[0] = nodeValue_Surface("Surface in", self); + newInput(0, nodeValue_Surface("Surface in", self)); - inputs[1] = nodeValue_Bool("Active", self, true); + newInput(1, nodeValue_Bool("Active", self, true)); active_index = 1; inputs[2] = nodeValue_Vec2("Top left", self, [ 0, 0 ] ) diff --git a/scripts/node_zigzag/node_zigzag.gml b/scripts/node_zigzag/node_zigzag.gml index bf4485176..52d65df96 100644 --- a/scripts/node_zigzag/node_zigzag.gml +++ b/scripts/node_zigzag/node_zigzag.gml @@ -1,7 +1,7 @@ function Node_Zigzag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Zigzag"; - inputs[0] = nodeValue_Dimension(self); + newInput(0, nodeValue_Dimension(self)); inputs[1] = nodeValue_Int("Amount", self, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }) @@ -10,17 +10,17 @@ function Node_Zigzag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[2] = nodeValue_Vec2("Position", self, [0, 0] ) .setUnitRef(function(index) { return getDimension(index); }); - inputs[3] = nodeValue_Color("Color 1", self, c_white); + newInput(3, nodeValue_Color("Color 1", self, c_white)); - inputs[4] = nodeValue_Color("Color 2", self, c_black); + newInput(4, nodeValue_Color("Color 2", self, c_black)); - inputs[5] = nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ]); + newInput(5, nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ])); ////////////////////////////////////////////////////////////////////////////////// - inputs[6] = nodeValueMap("Amount map", self); + newInput(6, nodeValueMap("Amount map", self)); - inputs[7] = nodeValueMap("Angle map", self); + newInput(7, nodeValueMap("Angle map", self)); //////////////////////////////////////////////////////////////////////////////////