From 387105fb535b4fc640651adebb52131ee06176ea Mon Sep 17 00:00:00 2001 From: MakhamDev Date: Mon, 2 Oct 2023 13:57:44 +0700 Subject: [PATCH] Input prefetct, structurize display data, --- .../o_dialog_image_array_edit/Create_0.gml | 8 +- objects/o_dialog_image_array_edit/Draw_64.gml | 2 +- scripts/__3D/__3D.gml | 10 +- .../__node_3d_combine/__node_3d_combine.gml | 44 ++++---- .../__node_3d_displace/__node_3d_displace.gml | 18 +-- scripts/__node_3d_export/__node_3d_export.gml | 8 +- .../__node_3d_extrude/__node_3d_extrude.gml | 15 +-- scripts/__node_3d_light/__node_3d_light.gml | 2 +- scripts/__node_3d_obj/__node_3d_obj.gml | 58 +++++----- scripts/__node_3d_plane/__node_3d_plane.gml | 2 +- .../__node_3d_prim_cone.gml | 6 +- .../__node_3d_prim_cube.gml | 6 +- .../__node_3d_prim_cylinder.gml | 8 +- .../__node_3d_prim_sphere.gml | 6 +- scripts/__node_3d_render/__node_3d_render.gml | 52 ++++----- scripts/__node_3d_repeat/__node_3d_repeat.gml | 66 +++++------ .../__node_3d_transform.gml | 18 +-- .../_node_VFX_spawner/_node_VFX_spawner.gml | 38 +++---- .../_node_strand_affector.gml | 26 ++--- scripts/areaBox/areaBox.gml | 8 +- scripts/argumentRenderer/argumentRenderer.gml | 2 +- scripts/biterator/biterator.gml | 16 +-- scripts/hlsl_server/hlsl_server.gml | 4 +- scripts/nodeValue_drawer/nodeValue_drawer.gml | 6 +- scripts/node_2d_light/node_2d_light.gml | 16 +-- scripts/node_3d_camera/node_3d_camera.gml | 18 +-- scripts/node_3d_material/node_3d_material.gml | 8 +- .../node_3d_mesh_cube/node_3d_mesh_cube.gml | 2 +- scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml | 4 +- scripts/node_3dsurf/node_3dsurf.gml | 2 +- scripts/node_9slice/node_9slice.gml | 2 +- .../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 | 12 +- scripts/node_PCX_fn_math/node_PCX_fn_math.gml | 8 +- .../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_VCT/node_VCT.gml | 10 +- .../node_VFX_effect_wind.gml | 8 +- .../node_VFX_effector/node_VFX_effector.gml | 17 +-- .../node_VFX_override/node_VFX_override.gml | 14 +-- .../node_VFX_renderer/node_VFX_renderer.gml | 2 +- scripts/node_VFX_spawner/node_VFX_spawner.gml | 10 +- .../node_VFX_variable/node_VFX_variable.gml | 2 +- .../node_alpha_cutoff/node_alpha_cutoff.gml | 4 +- .../node_animate_curve/node_animate_curve.gml | 2 +- .../node_animation_control.gml | 14 +-- .../node_armature_bind/node_armature_bind.gml | 40 +++---- .../node_armature_pose/node_armature_pose.gml | 10 +- .../node_armature_sample.gml | 10 +- .../node_armature_to_path.gml | 4 +- scripts/node_array/node_array.gml | 8 +- scripts/node_array_add/node_array_add.gml | 6 +- scripts/node_array_copy/node_array_copy.gml | 6 +- .../node_array_csv_parse.gml | 4 +- scripts/node_array_find/node_array_find.gml | 4 +- scripts/node_array_get/node_array_get.gml | 8 +- .../node_array_insert/node_array_insert.gml | 10 +- .../node_array_length/node_array_length.gml | 2 +- scripts/node_array_range/node_array_range.gml | 12 +- .../node_array_remove/node_array_remove.gml | 12 +- .../node_array_reverse/node_array_reverse.gml | 2 +- scripts/node_array_set/node_array_set.gml | 8 +- scripts/node_array_shift/node_array_shift.gml | 4 +- .../node_array_shuffle/node_array_shuffle.gml | 4 +- scripts/node_array_sort/node_array_sort.gml | 4 +- scripts/node_array_zip/node_array_zip.gml | 4 +- .../node_ase_file_read/node_ase_file_read.gml | 16 +-- scripts/node_ase_layer/node_ase_layer.gml | 6 +- scripts/node_atlas_draw/node_atlas_draw.gml | 4 +- scripts/node_atlas_get/node_atlas_get.gml | 2 +- scripts/node_atlas_set/node_atlas_set.gml | 14 +-- .../node_audio_window/node_audio_window.gml | 6 +- scripts/node_average/node_average.gml | 2 +- scripts/node_bevel/node_bevel.gml | 2 +- scripts/node_blend/node_blend.gml | 2 +- scripts/node_blinker/node_blinker.gml | 2 +- scripts/node_bloom/node_bloom.gml | 8 +- scripts/node_blur/node_blur.gml | 4 +- scripts/node_blur_bokeh/node_blur_bokeh.gml | 4 +- .../node_blur_contrast/node_blur_contrast.gml | 6 +- .../node_blur_directional.gml | 4 +- scripts/node_blur_radial/node_blur_radial.gml | 4 +- scripts/node_blur_simple/node_blur_simple.gml | 4 +- scripts/node_blur_zoom/node_blur_zoom.gml | 4 +- scripts/node_boolean/node_boolean.gml | 12 +- scripts/node_bw/node_bw.gml | 6 +- scripts/node_cache/node_cache.gml | 2 +- scripts/node_cache_array/node_cache_array.gml | 8 +- scripts/node_camera/node_camera.gml | 8 +- scripts/node_canvas/node_canvas.gml | 48 ++++---- .../node_checkerboard/node_checkerboard.gml | 4 +- .../node_chromatic_aberration.gml | 4 +- scripts/node_collection/node_collection.gml | 2 +- scripts/node_color/node_color.gml | 2 +- .../node_color_adjustment.gml | 20 ++-- .../node_color_from_hsv.gml | 20 ++-- .../node_color_from_rgb.gml | 20 ++-- scripts/node_color_mix/node_color_mix.gml | 2 +- .../node_color_palette_replacement.gml | 4 +- .../node_color_remove/node_color_remove.gml | 4 +- .../node_color_replacement.gml | 10 +- .../node_color_sampler/node_color_sampler.gml | 4 +- scripts/node_colorize/node_colorize.gml | 4 +- scripts/node_compare/node_compare.gml | 8 +- scripts/node_composite/node_composite.gml | 6 +- scripts/node_condition/node_condition.gml | 20 ++-- scripts/node_convolution/node_convolution.gml | 4 +- scripts/node_corner/node_corner.gml | 4 +- scripts/node_counter/node_counter.gml | 2 +- scripts/node_crop/node_crop.gml | 2 +- .../node_crop_content/node_crop_content.gml | 8 +- .../node_csv_file_read/node_csv_file_read.gml | 8 +- .../node_csv_file_write.gml | 8 +- scripts/node_curve/node_curve.gml | 2 +- scripts/node_data/node_data.gml | 36 ++++-- scripts/node_de_corner/node_de_corner.gml | 2 +- scripts/node_de_stray/node_de_stray.gml | 2 +- scripts/node_dilate/node_dilate.gml | 6 +- .../node_displacement/node_displacement.gml | 5 +- .../node_display_image/node_display_image.gml | 6 +- .../node_display_text/node_display_text.gml | 14 +-- scripts/node_dither/node_dither.gml | 4 +- scripts/node_dust/node_dust.gml | 2 +- .../node_dynamic_surface_out.gml | 16 +-- .../node_dynamic_surface_out_height.gml | 2 +- .../node_dynamic_surface_out_width.gml | 2 +- scripts/node_edge_detect/node_edge_detect.gml | 2 +- scripts/node_equation/node_equation.gml | 6 +- scripts/node_erode/node_erode.gml | 2 +- scripts/node_export/node_export.gml | 100 ++++++++--------- .../node_feedback_output.gml | 2 +- scripts/node_find_pixel/node_find_pixel.gml | 4 +- scripts/node_flood_fill/node_flood_fill.gml | 4 +- scripts/node_fluid_add/node_fluid_add.gml | 10 +- .../node_fluid_add_collider.gml | 6 +- .../node_fluid_apply_velo.gml | 6 +- .../node_fluid_domain/node_fluid_domain.gml | 12 +- .../node_fluid_domain_queue.gml | 2 +- .../node_fluid_render/node_fluid_render.gml | 2 +- .../node_fluid_repulse/node_fluid_repulse.gml | 6 +- .../node_fluid_turbulence.gml | 4 +- .../node_fluid_update/node_fluid_update.gml | 2 +- .../node_fluid_vortex/node_fluid_vortex.gml | 8 +- scripts/node_frame/node_frame.gml | 8 +- scripts/node_functions/node_functions.gml | 6 +- scripts/node_global/node_global.gml | 10 +- scripts/node_glow/node_glow.gml | 8 +- scripts/node_gradient/node_gradient.gml | 4 +- .../node_gradient_extract.gml | 2 +- .../node_gradient_output.gml | 2 +- .../node_gradient_points.gml | 10 +- .../node_gradient_replace.gml | 2 +- .../node_gradient_shift.gml | 4 +- .../node_grey_to_alpha/node_grey_to_alpha.gml | 6 +- scripts/node_greyscale/node_greyscale.gml | 6 +- scripts/node_grid/node_grid.gml | 4 +- scripts/node_grid_hex/node_grid_hex.gml | 2 +- scripts/node_grid_tri/node_grid_tri.gml | 2 +- scripts/node_group_input/node_group_input.gml | 32 +++--- .../node_group_output/node_group_output.gml | 2 +- scripts/node_hlsl/node_hlsl.gml | 20 ++-- scripts/node_image/node_image.gml | 8 +- .../node_image_animated.gml | 26 ++--- scripts/node_image_gif/node_image_gif.gml | 28 ++--- .../node_image_sequence.gml | 12 +- .../node_image_splice_sheet.gml | 72 ++++++------ scripts/node_invert/node_invert.gml | 2 +- scripts/node_isosurf/node_isosurf.gml | 6 +- scripts/node_iterate/node_iterate.gml | 2 +- .../node_iterate_each/node_iterate_each.gml | 4 +- .../node_iterate_filter.gml | 4 +- .../node_iterate_sort/node_iterate_sort.gml | 2 +- .../node_iterator_each_input.gml | 2 +- .../node_iterator_each_output.gml | 2 +- .../node_iterator_each_size.gml | 2 +- .../node_iterator_filter_input.gml | 2 +- .../node_iterator_filter_output.gml | 4 +- .../node_iterator_length.gml | 2 +- .../node_iterator_output.gml | 2 +- .../node_iterator_sort_input.gml | 2 +- .../node_iterator_sort_output.gml | 2 +- .../node_json_file_read.gml | 10 +- .../node_json_file_write.gml | 16 +-- scripts/node_lerp/node_lerp.gml | 2 +- scripts/node_level/node_level.gml | 14 +-- .../node_level_selector.gml | 10 +- scripts/node_line/node_line.gml | 14 +-- .../node_local_analyze/node_local_analyze.gml | 4 +- .../node_logic_operate/node_logic_operate.gml | 20 ++-- scripts/node_lua_compute/node_lua_compute.gml | 30 ++--- scripts/node_lua_global/node_lua_global.gml | 6 +- scripts/node_lua_surface/node_lua_surface.gml | 26 ++--- scripts/node_math/node_math.gml | 16 +-- .../node_mesh_create_path.gml | 6 +- .../node_mesh_to_path/node_mesh_to_path.gml | 4 +- .../node_mesh_transform.gml | 12 +- scripts/node_mirror/node_mirror.gml | 4 +- .../node_morph_surface/node_morph_surface.gml | 4 +- scripts/node_noise/node_noise.gml | 8 +- scripts/node_noise_cell/node_noise_cell.gml | 6 +- scripts/node_noise_fbm/node_noise_fbm.gml | 8 +- scripts/node_noise_grid/node_noise_grid.gml | 8 +- .../node_noise_simplex/node_noise_simplex.gml | 10 +- .../node_normal_light/node_normal_light.gml | 2 +- scripts/node_number/node_number.gml | 6 +- scripts/node_onion_skin/node_onion_skin.gml | 18 +-- scripts/node_outline/node_outline.gml | 6 +- .../node_pack_sprites/node_pack_sprites.gml | 20 ++-- scripts/node_padding/node_padding.gml | 2 +- scripts/node_palette/node_palette.gml | 2 +- .../node_palette_extract.gml | 12 +- .../node_palette_replacement.gml | 2 +- .../node_palette_shift/node_palette_shift.gml | 4 +- .../node_palette_sort/node_palette_sort.gml | 10 +- scripts/node_particle/node_particle.gml | 11 +- scripts/node_path/node_path.gml | 60 +++++----- scripts/node_path_anchor/node_path_anchor.gml | 8 +- scripts/node_path_array/node_path_array.gml | 14 +-- scripts/node_path_blend/node_path_blend.gml | 34 +++--- .../node_path_builder/node_path_builder.gml | 24 ++-- .../node_path_l_system/node_path_l_system.gml | 22 ++-- .../node_path_map_area/node_path_map_area.gml | 14 +-- scripts/node_path_plot/node_path_plot.gml | 25 ++--- .../node_path_reverse/node_path_reverse.gml | 12 +- scripts/node_path_shift/node_path_shift.gml | 14 +-- .../node_path_transform.gml | 38 +++---- scripts/node_path_trim/node_path_trim.gml | 16 +-- scripts/node_path_wave/node_path_wave.gml | 33 +++--- .../node_pb_box_contract.gml | 2 +- .../node_pb_box_inset/node_pb_box_inset.gml | 8 +- .../node_pb_box_split/node_pb_box_split.gml | 2 +- .../node_pb_draw_blob/node_pb_draw_blob.gml | 6 +- .../node_pb_draw_roundrectangle.gml | 4 +- .../node_pb_draw_trapezoid.gml | 6 +- scripts/node_pb_fx_brick/node_pb_fx_brick.gml | 2 +- scripts/node_pb_fx_hash/node_pb_fx_hash.gml | 2 +- .../node_pb_fx_highlight.gml | 6 +- scripts/node_perlin/node_perlin.gml | 8 +- .../node_perlin_smear/node_perlin_smear.gml | 2 +- .../node_pixel_builder/node_pixel_builder.gml | 6 +- scripts/node_pixel_cloud/node_pixel_cloud.gml | 4 +- scripts/node_pixel_sort/node_pixel_sort.gml | 4 +- scripts/node_plot_linear/node_plot_linear.gml | 4 +- scripts/node_point_move/node_point_move.gml | 2 +- scripts/node_polar/node_polar.gml | 2 +- .../node_polygonal_shape.gml | 12 +- scripts/node_posterize/node_posterize.gml | 6 +- scripts/node_print/node_print.gml | 6 +- scripts/node_processor/node_processor.gml | 2 - scripts/node_region_fill/node_region_fill.gml | 2 +- .../node_render_sprite_sheet.gml | 46 ++++---- scripts/node_repeat/node_repeat.gml | 80 ++++++------- .../node_rigid_activation.gml | 6 +- .../node_rigid_force_apply.gml | 30 ++--- .../node_rigid_global/node_rigid_global.gml | 2 +- .../node_rigid_object/node_rigid_object.gml | 52 ++++----- .../node_rigid_object_spawner.gml | 28 ++--- .../node_rigid_override.gml | 14 +-- .../node_rigid_render/node_rigid_render.gml | 6 +- .../node_rigid_variable.gml | 2 +- scripts/node_scale/node_scale.gml | 2 +- scripts/node_scale_algo/node_scale_algo.gml | 2 +- scripts/node_scatter/node_scatter.gml | 17 +-- .../node_scatter_points.gml | 21 ++-- scripts/node_sdf/node_sdf.gml | 2 +- .../node_seperate_shapes.gml | 12 +- .../node_sequence_to_anim.gml | 12 +- scripts/node_shadow/node_shadow.gml | 8 +- scripts/node_shadow_cast/node_shadow_cast.gml | 16 +-- scripts/node_shell/node_shell.gml | 6 +- .../node_simple_shape/node_simple_shape.gml | 11 +- scripts/node_skew/node_skew.gml | 4 +- .../node_sprite_stack/node_sprite_stack.gml | 8 +- scripts/node_stack/node_stack.gml | 12 +- scripts/node_statistic/node_statistic.gml | 14 +-- .../node_strand_break/node_strand_break.gml | 6 +- .../node_strand_collision.gml | 6 +- .../node_strand_create/node_strand_create.gml | 56 ++++----- .../node_strand_force_apply.gml | 16 +-- .../node_strand_gravity.gml | 6 +- .../node_strand_length_adjust.gml | 6 +- .../node_strand_render/node_strand_render.gml | 19 ++-- .../node_strand_render_texture.gml | 14 +-- .../node_strand_update/node_strand_update.gml | 4 +- scripts/node_string/node_string.gml | 2 +- .../node_string_get_char.gml | 2 +- scripts/node_string_join/node_string_join.gml | 4 +- .../node_string_merge/node_string_merge.gml | 2 +- .../node_string_regex_match.gml | 2 +- .../node_string_split/node_string_split.gml | 2 +- scripts/node_string_trim/node_string_trim.gml | 2 +- scripts/node_stripe/node_stripe.gml | 6 +- scripts/node_struct/node_struct.gml | 10 +- scripts/node_struct_get/node_struct_get.gml | 6 +- .../node_struct_json_parse.gml | 2 +- .../node_surface_data/node_surface_data.gml | 2 +- .../node_surface_replace.gml | 14 +-- scripts/node_switch/node_switch.gml | 21 ++-- .../node_text_file_read.gml | 6 +- .../node_text_file_write.gml | 10 +- scripts/node_threshold/node_threshold.gml | 14 +-- scripts/node_time_remap/node_time_remap.gml | 8 +- .../node_timeline_preview.gml | 2 +- scripts/node_trail/node_trail.gml | 16 +-- scripts/node_transform/node_transform.gml | 14 +-- .../node_transform_array.gml | 2 +- scripts/node_trigger/node_trigger.gml | 4 +- .../node_trigger_bool/node_trigger_bool.gml | 4 +- scripts/node_tunnel_in/node_tunnel_in.gml | 16 +-- scripts/node_tunnel_out/node_tunnel_out.gml | 14 +-- scripts/node_twirl/node_twirl.gml | 6 +- scripts/node_value/node_value.gml | 106 ++++++++++-------- .../node_wav_file_read/node_wav_file_read.gml | 10 +- .../node_wav_file_write.gml | 16 +-- .../node_websocket_receiver.gml | 8 +- .../node_websocket_sender.gml | 20 ++-- scripts/node_widget_test/node_widget_test.gml | 12 +- scripts/node_wiggler/node_wiggler.gml | 2 +- scripts/node_wrap/node_wrap.gml | 2 +- scripts/node_wrap_area/node_wrap_area.gml | 7 +- scripts/node_wrap_mesh/node_wrap_mesh.gml | 32 +++--- scripts/node_zigzag/node_zigzag.gml | 2 +- .../notification_system.gml | 1 + .../panel_array_sequence.gml | 4 +- .../panel_node_data_gen.gml | 4 +- .../preview_overlay_area.gml | 2 +- scripts/quarternionBox/quarternionBox.gml | 8 +- scripts/rangeBox/rangeBox.gml | 30 ++--- scripts/struct_functions/struct_functions.gml | 19 +++- scripts/vectorBox/vectorBox.gml | 41 +++---- scripts/vectorRangeBox/vectorRangeBox.gml | 34 +++--- scripts/widget/widget.gml | 5 +- 337 files changed, 1798 insertions(+), 1770 deletions(-) diff --git a/objects/o_dialog_image_array_edit/Create_0.gml b/objects/o_dialog_image_array_edit/Create_0.gml index 7e68fb679..991d044e9 100644 --- a/objects/o_dialog_image_array_edit/Create_0.gml +++ b/objects/o_dialog_image_array_edit/Create_0.gml @@ -35,7 +35,7 @@ event_inherited(); var hh = ui(100); var pad = ui(16); - var arr = target.inputs[| 0].getValue(); + var arr = target.getInputData(0); if(array_length(arr) != array_length(target.spr)) target.updatePaths(arr); @@ -112,7 +112,7 @@ event_inherited(); if(menu > -1) { menuCall("image_array_edit_menu",,, [ menuItem(__txt("Remove"), function() { - var arr = target.inputs[| 0].getValue(); + var arr = target.getInputData(0); array_delete(arr, menuOn, 1); target.inputs[| 0].setValue(arr); }) @@ -127,7 +127,7 @@ event_inherited(); function rearrange(oldindex, newindex) { if(oldindex == newindex) return; - var arr = target.inputs[| 0].getValue(); + var arr = target.getInputData(0); var val = arr[oldindex]; array_delete(arr, oldindex, 1); array_insert(arr, newindex, val); @@ -138,7 +138,7 @@ event_inherited(); sortAsc = true; function sortByName() { if(!target) return 0; - var arr = target.inputs[| 0].getValue(); + var arr = target.getInputData(0); array_sort(arr, bool(sortAsc)); sortAsc = !sortAsc; diff --git a/objects/o_dialog_image_array_edit/Draw_64.gml b/objects/o_dialog_image_array_edit/Draw_64.gml index 4e3c278b5..e556b02af 100644 --- a/objects/o_dialog_image_array_edit/Draw_64.gml +++ b/objects/o_dialog_image_array_edit/Draw_64.gml @@ -33,7 +33,7 @@ if !target exit; key_release(); if(path != "") { var paths = paths_to_array(path); - var arr = target.inputs[| 0].getValue(); + var arr = target.getInputData(0); for( var i = 0, n = array_length(paths); i < n; i++ ) array_push(arr, paths[i]); diff --git a/scripts/__3D/__3D.gml b/scripts/__3D/__3D.gml index 344ca3d9b..4151c82d9 100644 --- a/scripts/__3D/__3D.gml +++ b/scripts/__3D/__3D.gml @@ -292,12 +292,12 @@ enum CAMERA_PROJ { } function _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var _gpos = inputs[| global_pos].getValue(); - var _gsca = inputs[| global_sca].getValue(); + var _gpos = getInputData(global_pos); + var _gsca = getInputData(global_sca); - var _pos = inputs[| input_pos].getValue(); - var _rot = inputs[| input_rot].getValue(); - var _sca = inputs[| input_sca].getValue(); + var _pos = getInputData(input_pos); + var _rot = getInputData(input_rot); + var _sca = getInputData(input_sca); var cx = _x + _gpos[0] * _s; var cy = _y + _gpos[1] * _s; diff --git a/scripts/__node_3d_combine/__node_3d_combine.gml b/scripts/__node_3d_combine/__node_3d_combine.gml index ef5c5582e..ec264fae1 100644 --- a/scripts/__node_3d_combine/__node_3d_combine.gml +++ b/scripts/__node_3d_combine/__node_3d_combine.gml @@ -19,7 +19,7 @@ function __Node_3D_Combine(_x, _y, _group = noone) : Node(_x, _y, _group) constr inputs[| 4] = nodeValue("Render position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) - .setUnitRef( function() { return inputs[| 2].getValue(); }, VALUE_UNIT.reference) + .setUnitRef( function() { return getInputData(2); }, VALUE_UNIT.reference) .rejectArray(); inputs[| 5] = nodeValue("Render scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) @@ -31,11 +31,11 @@ function __Node_3D_Combine(_x, _y, _group = noone) : Node(_x, _y, _group) constr .rejectArray(); inputs[| 7] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [-1, 1, 0.01]) + .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }) .rejectArray(); inputs[| 8] = nodeValue("Light intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]) + .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); inputs[| 9] = nodeValue("Light color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white) @@ -49,7 +49,7 @@ function __Node_3D_Combine(_x, _y, _group = noone) : Node(_x, _y, _group) constr .rejectArray(); inputs[| 12] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 90, 1 ]) + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }) .rejectArray(); inputs[| 13] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true) @@ -124,14 +124,14 @@ function __Node_3D_Combine(_x, _y, _group = noone) : Node(_x, _y, _group) constr } static submit_vertex = function() { - var _lpos = inputs[| 1].getValue(); - var _lrot = inputs[| 2].getValue(); - var _lsca = inputs[| 3].getValue(); + var _lpos = getInputData(1); + var _lrot = getInputData(2); + var _lsca = getInputData(3); _3d_local_transform(_lpos, _lrot, _lsca); for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i++ ) { - var sv = inputs[| i].getValue(); + var sv = getInputData(i); if(is_array(sv)) { for( var j = 0; j < array_length(sv); j++ ) { @@ -146,23 +146,23 @@ function __Node_3D_Combine(_x, _y, _group = noone) : Node(_x, _y, _group) constr } static update = function(frame = PROJECT.animator.current_frame) { - var _dim = inputs[| 0].getValue(); - var _lpos = inputs[| 1].getValue(); - var _lrot = inputs[| 2].getValue(); - var _lsca = inputs[| 3].getValue(); + var _dim = getInputData(0); + var _lpos = getInputData(1); + var _lrot = getInputData(2); + var _lsca = getInputData(3); - var _pos = inputs[| 4].getValue(); - var _sca = inputs[| 5].getValue(); + var _pos = getInputData(4); + var _sca = getInputData(5); - var _ldir = inputs[| 6].getValue(); - var _lhgt = inputs[| 7].getValue(); - var _lint = inputs[| 8].getValue(); - var _lclr = inputs[| 9].getValue(); - var _aclr = inputs[| 10].getValue(); + var _ldir = getInputData( 6); + var _lhgt = getInputData( 7); + var _lint = getInputData( 8); + var _lclr = getInputData( 9); + var _aclr = getInputData(10); - var _proj = inputs[| 11].getValue(); - var _fov = inputs[| 12].getValue(); - var _dimS = inputs[| 13].getValue(); + var _proj = getInputData(11); + var _fov = getInputData(12); + var _dimS = getInputData(13); inputs[| 12].setVisible(_proj); diff --git a/scripts/__node_3d_displace/__node_3d_displace.gml b/scripts/__node_3d_displace/__node_3d_displace.gml index bb126fb51..b7fbea0dc 100644 --- a/scripts/__node_3d_displace/__node_3d_displace.gml +++ b/scripts/__node_3d_displace/__node_3d_displace.gml @@ -15,7 +15,7 @@ function __Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 4] = nodeValue("Render position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) - .setUnitRef( function() { return inputs[| 0].getValue(); }, VALUE_UNIT.reference); + .setUnitRef( function() { return getInputData(0); }, VALUE_UNIT.reference); inputs[| 5] = nodeValue("Render scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -24,10 +24,10 @@ function __Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr .setDisplay(VALUE_DISPLAY.rotation); inputs[| 7] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [-1, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); inputs[| 8] = nodeValue("Light intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 9] = nodeValue("Light color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); @@ -41,14 +41,14 @@ function __Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr .rejectArray(); inputs[| 13] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, [ 1, 90, 1 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 1 ] }); inputs[| 14] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 15] = nodeValue("Displacement map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 16] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 4, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); input_display_list = [ 11, ["Output", true], 0, 14, @@ -85,9 +85,9 @@ function __Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr } static submit_vertex = function() { - var _lpos = inputs[| 1].getValue(); - var _lrot = inputs[| 2].getValue(); - var _lsca = inputs[| 3].getValue(); + var _lpos = getInputData(1); + var _lrot = getInputData(2); + var _lsca = getInputData(3); _3d_local_transform(_lpos, _lrot, _lsca); @@ -98,7 +98,7 @@ function __Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr } static step = function() { - var _proj = inputs[| 12].getValue(); + var _proj = getInputData(12); inputs[| 13].setVisible(_proj); } diff --git a/scripts/__node_3d_export/__node_3d_export.gml b/scripts/__node_3d_export/__node_3d_export.gml index b19b81571..0efdb013a 100644 --- a/scripts/__node_3d_export/__node_3d_export.gml +++ b/scripts/__node_3d_export/__node_3d_export.gml @@ -5,7 +5,7 @@ function __Node_3D_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constru .setVisible(true, true); inputs[| 1] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "", "Export location without '.obj' extension." ) - .setDisplay(VALUE_DISPLAY.path_save, ["*.obj", ""]); + .setDisplay(VALUE_DISPLAY.path_save, { filter: "*.obj" }); inputs[| 2] = nodeValue("Export texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true ); @@ -19,9 +19,9 @@ function __Node_3D_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constru static onInspector1Update = function() { export(); } static export = function() { - var vert = inputs[| 0].getValue(); - var path = inputs[| 1].getValue(); - var text = inputs[| 2].getValue(); + var vert = getInputData(0); + var path = getInputData(1); + var text = getInputData(2); if(array_length(vert) == 0) return; diff --git a/scripts/__node_3d_extrude/__node_3d_extrude.gml b/scripts/__node_3d_extrude/__node_3d_extrude.gml index 168fe40f0..c100230c5 100644 --- a/scripts/__node_3d_extrude/__node_3d_extrude.gml +++ b/scripts/__node_3d_extrude/__node_3d_extrude.gml @@ -17,7 +17,7 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 5] = nodeValue("Render position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) - .setUnitRef( function() { return inputs[| 1].getValue(); }, VALUE_UNIT.reference); + .setUnitRef( function() { return getInputData(1); }, VALUE_UNIT.reference); inputs[| 6] = nodeValue("Render rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -26,19 +26,16 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro .setDisplay(VALUE_DISPLAY.vector); inputs[| 8] = nodeValue("Manual generate", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, 0) - .setDisplay(VALUE_DISPLAY.button, [ function() { - generateMesh(); - doUpdate(); - }, "Generate"] ); + .setDisplay(VALUE_DISPLAY.button, { name: "Generate", onClick: function() { generateMesh(); doUpdate(); } }); inputs[| 9] = nodeValue("Light direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.rotation); inputs[| 10] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [-1, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); inputs[| 11] = nodeValue("Light intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 12] = nodeValue("Light color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); inputs[| 13] = nodeValue("Ambient color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_grey); @@ -52,7 +49,7 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro .rejectArray(); inputs[| 17] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, [ 1, 90, 1 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 1 ] }); inputs[| 18] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true) @@ -108,7 +105,7 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro } static generateMesh = function() { - var _ins = inputs[| 0].getValue(); + var _ins = getInputData(0); if(!is_array(_ins)) _ins = [ _ins ]; for( var i = 0, n = array_length(vertexObjects); i < n; i++ ) { diff --git a/scripts/__node_3d_light/__node_3d_light.gml b/scripts/__node_3d_light/__node_3d_light.gml index 672a8fd73..ea8392b42 100644 --- a/scripts/__node_3d_light/__node_3d_light.gml +++ b/scripts/__node_3d_light/__node_3d_light.gml @@ -9,7 +9,7 @@ function Node_3D_Light(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) inputs[| in_d3d + 1] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); inputs[| in_d3d + 2] = nodeValue("Intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); in_light = ds_list_size(inputs); diff --git a/scripts/__node_3d_obj/__node_3d_obj.gml b/scripts/__node_3d_obj/__node_3d_obj.gml index 2c8ac8e56..8db09f2ac 100644 --- a/scripts/__node_3d_obj/__node_3d_obj.gml +++ b/scripts/__node_3d_obj/__node_3d_obj.gml @@ -2,21 +2,21 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo name = "3D Object"; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_load, [ "*.obj", "" ]) + .setDisplay(VALUE_DISPLAY.path_load, { filter: "*.obj" }) .rejectArray(); inputs[| 1] = nodeValue("Generate", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, 0) - .setDisplay(VALUE_DISPLAY.button, [ function() { + .setDisplay(VALUE_DISPLAY.button, { name: "Generate", onClick: function() { updateObj(); doUpdate(); - }, "Generate"] ); + } }); inputs[| 2] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) .setDisplay(VALUE_DISPLAY.vector); inputs[| 3] = nodeValue("Render position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) - .setUnitRef( function() { return inputs[| 2].getValue(); }, VALUE_UNIT.reference); + .setUnitRef( function() { return getInputData(2); }, VALUE_UNIT.reference); inputs[| 4] = nodeValue("Render rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -29,11 +29,11 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo .rejectArray(); inputs[| 7] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [-1, 1, 0.01]) + .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }) .rejectArray(); inputs[| 8] = nodeValue("Light intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]) + .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); inputs[| 9] = nodeValue("Light color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white) @@ -59,7 +59,7 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo .rejectArray(); inputs[| 16] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 90, 1 ]) + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }) .rejectArray(); inputs[| 17] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true) @@ -137,10 +137,10 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo } static updateObj = function(updateMat = true) { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); if(!file_exists(_path)) return; - var _flip = inputs[| 12].getValue(); + var _flip = getInputData(12); var _dir = filename_dir(_path); var _pathMtl = string_copy(_path, 1, string_length(_path) - 4) + ".mtl"; @@ -175,9 +175,9 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo } static submit_vertex = function() { - var _lpos = inputs[| 14].getValue(); - var _lrot = inputs[| 13].getValue(); - var _lsca = inputs[| 11].getValue(); + var _lpos = getInputData(14); + var _lrot = getInputData(13); + var _lsca = getInputData(11); _3d_local_transform(_lpos, _lrot, _lsca); @@ -185,7 +185,7 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo if(i >= array_length(materialIndex)) continue; var mIndex = materialIndex[i]; - var tex = inputs[| input_length + mIndex].getValue(); + var tex = getInputData(input_length + mIndex); if(!is_surface(tex)) continue; vertex_submit(VB[i], pr_trianglelist, surface_get_texture(tex)); @@ -208,24 +208,24 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo do_reset_material = false; } - var _dim = inputs[| 2].getValue(); - var _pos = inputs[| 3].getValue(); - //var _rot = inputs[| 4].getValue(); - var _sca = inputs[| 5].getValue(); + var _dim = getInputData(2); + var _pos = getInputData(3); + //var _rot = getInputData(4); + var _sca = getInputData(5); - var _ldir = inputs[| 6].getValue(); - var _lhgt = inputs[| 7].getValue(); - var _lint = inputs[| 8].getValue(); - var _lclr = inputs[| 9].getValue(); - var _aclr = inputs[| 10].getValue(); + var _ldir = getInputData(6); + var _lhgt = getInputData(7); + var _lint = getInputData(8); + var _lclr = getInputData(9); + var _aclr = getInputData(10); - var _lpos = inputs[| 14].getValue(); - var _lrot = inputs[| 13].getValue(); - var _lsca = inputs[| 11].getValue(); + var _lpos = getInputData(14); + var _lrot = getInputData(13); + var _lsca = getInputData(11); - var _proj = inputs[| 15].getValue(); - var _fov = inputs[| 16].getValue(); - var _dimS = inputs[| 17].getValue(); + var _proj = getInputData(15); + var _fov = getInputData(16); + var _dimS = getInputData(17); inputs[| 16].setVisible(_proj == 1); @@ -248,7 +248,7 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo if(j >= array_length(materialIndex)) continue; var mIndex = materialIndex[j]; - var tex = inputs[| input_length + mIndex].getValue(); + var tex = getInputData(input_length + mIndex); if(!is_surface(tex)) continue; vertex_submit(VB[j], pr_trianglelist, surface_get_texture(tex)); diff --git a/scripts/__node_3d_plane/__node_3d_plane.gml b/scripts/__node_3d_plane/__node_3d_plane.gml index 581ff1b5d..0daa79f15 100644 --- a/scripts/__node_3d_plane/__node_3d_plane.gml +++ b/scripts/__node_3d_plane/__node_3d_plane.gml @@ -31,7 +31,7 @@ function __Node_3D_Plane(_x, _y, _group = noone) : Node_Processor(_x, _y, _group .rejectArray(); inputs[| 9] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, [ 1, 90, 1 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 1 ] }); inputs[| 10] = nodeValue("Texture scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); 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 01250d7e6..534310b3e 100644 --- a/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml +++ b/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml @@ -21,10 +21,10 @@ function __Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.rotation); inputs[| 6] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [-1, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); inputs[| 7] = nodeValue("Light intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 8] = nodeValue("Light color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); inputs[| 9] = nodeValue("Ambient color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_grey); @@ -40,7 +40,7 @@ function __Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .rejectArray(); inputs[| 13] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, [ 1, 90, 1 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 1 ] }); inputs[| 14] = nodeValue("Sides", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 16); 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 5f8bd359b..4bdeedec1 100644 --- a/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml +++ b/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml @@ -33,10 +33,10 @@ function __Node_3D_Cube(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.rotation); inputs[| 14] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [-1, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); inputs[| 15] = nodeValue("Light intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 16] = nodeValue("Light color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); @@ -53,7 +53,7 @@ function __Node_3D_Cube(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .rejectArray(); inputs[| 21] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, [ 1, 90, 1 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 1 ] }); inputs[| 22] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true) 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 122a5fc5c..fb2a2cf97 100644 --- a/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml +++ b/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml @@ -30,10 +30,10 @@ function __Node_3D_Cylinder(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr .setDisplay(VALUE_DISPLAY.rotation); inputs[| 11] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [-1, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); inputs[| 12] = nodeValue("Light intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 13] = nodeValue("Light color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); inputs[| 14] = nodeValue("Ambient color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_grey); @@ -49,10 +49,10 @@ function __Node_3D_Cylinder(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr .rejectArray(); inputs[| 18] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, [ 1, 90, 1 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 1 ] }); inputs[| 19] = nodeValue("Taper", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 20] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true) 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 f76732574..22fed03c7 100644 --- a/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml +++ b/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml @@ -27,10 +27,10 @@ function __Node_3D_Sphere(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou .setDisplay(VALUE_DISPLAY.rotation); inputs[| 8] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [-1, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); inputs[| 9] = nodeValue("Light intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 10] = nodeValue("Light color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); inputs[| 11] = nodeValue("Ambient color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_grey); @@ -46,7 +46,7 @@ function __Node_3D_Sphere(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou .rejectArray(); inputs[| 15] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, [ 1, 90, 1 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 1 ] }); inputs[| 16] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true) diff --git a/scripts/__node_3d_render/__node_3d_render.gml b/scripts/__node_3d_render/__node_3d_render.gml index 741561db3..bd93d69ca 100644 --- a/scripts/__node_3d_render/__node_3d_render.gml +++ b/scripts/__node_3d_render/__node_3d_render.gml @@ -6,7 +6,7 @@ // inputs[| 3] = nodeValue("Render position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) // .setDisplay(VALUE_DISPLAY.vector) -// .setUnitRef( function() { return inputs[| 2].getValue(); }, VALUE_UNIT.reference); +// .setUnitRef( function() { return getInputData(2); }, VALUE_UNIT.reference); // inputs[| 4] = nodeValue("Render rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ]) // .setDisplay(VALUE_DISPLAY.vector); @@ -19,11 +19,11 @@ // .rejectArray(); // inputs[| 7] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) -// .setDisplay(VALUE_DISPLAY.slider, [-1, 1, 0.01]) +// .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }) // .rejectArray(); // inputs[| 8] = nodeValue("Light intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) -// .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]) +// .setDisplay(VALUE_DISPLAY.slider) // .rejectArray(); // inputs[| 9] = nodeValue("Light color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white) @@ -37,7 +37,7 @@ // .rejectArray(); // inputs[| 16] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) -// .setDisplay(VALUE_DISPLAY.slider, [ 0, 90, 1 ]) +// .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }) // .rejectArray(); // inputs[| 17] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true) @@ -115,8 +115,8 @@ // materials = []; // static updateObj = function(updateMat = true) { -// var _path = inputs[| 0].getValue(); -// var _flip = inputs[| 12].getValue(); +// var _path = getInputData(0); +// var _flip = getInputData(12); // var _dir = filename_dir(_path); // var _pathMtl = string_copy(_path, 1, string_length(_path) - 4) + ".mtl"; @@ -151,9 +151,9 @@ // } // static submit_vertex = function() { -// var _lpos = inputs[| 14].getValue(); -// var _lrot = inputs[| 13].getValue(); -// var _lsca = inputs[| 11].getValue(); +// var _lpos = getInputData(14); +// var _lrot = getInputData(13); +// var _lsca = getInputData(11); // _3d_local_transform(_lpos, _lrot, _lsca); @@ -161,7 +161,7 @@ // if(i >= array_length(materialIndex)) continue; // var mIndex = materialIndex[i]; -// var tex = inputs[| input_length + mIndex].getValue(); +// var tex = getInputData(input_length + mIndex); // if(!is_surface(tex)) continue; // vertex_submit(VB[i], pr_trianglelist, surface_get_texture(tex)); @@ -184,24 +184,24 @@ // do_reset_material = false; // } -// var _dim = inputs[| 2].getValue(); -// var _pos = inputs[| 3].getValue(); -// //var _rot = inputs[| 4].getValue(); -// var _sca = inputs[| 5].getValue(); +// var _dim = getInputData(2); +// var _pos = getInputData(3); +// //var _rot = getInputData(4); +// var _sca = getInputData(5); -// var _ldir = inputs[| 6].getValue(); -// var _lhgt = inputs[| 7].getValue(); -// var _lint = inputs[| 8].getValue(); -// var _lclr = inputs[| 9].getValue(); -// var _aclr = inputs[| 10].getValue(); +// var _ldir = getInputData(6); +// var _lhgt = getInputData(7); +// var _lint = getInputData(8); +// var _lclr = getInputData(9); +// var _aclr = getInputData(10); -// var _lpos = inputs[| 14].getValue(); -// var _lrot = inputs[| 13].getValue(); -// var _lsca = inputs[| 11].getValue(); +// var _lpos = getInputData(14); +// var _lrot = getInputData(13); +// var _lsca = getInputData(11); -// var _proj = inputs[| 15].getValue(); -// var _fov = inputs[| 16].getValue(); -// var _dimS = inputs[| 17].getValue(); +// var _proj = getInputData(15); +// var _fov = getInputData(16); +// var _dimS = getInputData(17); // inputs[| 16].setVisible(_proj == 1); @@ -224,7 +224,7 @@ // if(i >= array_length(materialIndex)) continue; // var mIndex = materialIndex[i]; -// var tex = inputs[| input_length + mIndex].getValue(); +// var tex = getInputData(input_length + mIndex); // if(!is_surface(tex)) continue; // vertex_submit(VB[i], pr_trianglelist, surface_get_texture(tex)); diff --git a/scripts/__node_3d_repeat/__node_3d_repeat.gml b/scripts/__node_3d_repeat/__node_3d_repeat.gml index 13158d928..1b9c1c797 100644 --- a/scripts/__node_3d_repeat/__node_3d_repeat.gml +++ b/scripts/__node_3d_repeat/__node_3d_repeat.gml @@ -15,7 +15,7 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 4] = nodeValue("Render position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) - .setUnitRef( function() { return inputs[| 0].getValue(); }, VALUE_UNIT.reference); + .setUnitRef( function() { return getInputData(0); }, VALUE_UNIT.reference); inputs[| 5] = nodeValue("Render scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -24,10 +24,10 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constru .setDisplay(VALUE_DISPLAY.rotation); inputs[| 7] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [-1, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); inputs[| 8] = nodeValue("Light intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 9] = nodeValue("Light color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); @@ -64,7 +64,7 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constru .rejectArray(); inputs[| 21] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, [ 1, 90, 1 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 1 ] }); inputs[| 22] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true) @@ -94,24 +94,24 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constru } static submit_vertex = function() { - var _lpos = inputs[| 1].getValue(); - var _lrot = inputs[| 2].getValue(); - var _lsca = inputs[| 3].getValue(); + var _lpos = getInputData(1); + var _lrot = getInputData(2); + var _lsca = getInputData(3); - var sv = inputs[| 11].getValue(); + var sv = getInputData(11); if(sv == noone) return; - var _samo = inputs[| 12].getValue(); - var _patt = inputs[| 16].getValue(); + var _samo = getInputData(12); + var _patt = getInputData(16); - var _srot = inputs[| 14].getValue(); - var _ssca = inputs[| 15].getValue(); + var _srot = getInputData(14); + var _ssca = getInputData(15); - var _spos = inputs[| 13].getValue(); + var _spos = getInputData(13); - var _raxs = inputs[| 17].getValue(); - var _rrad = inputs[| 18].getValue(); - var _rrot = inputs[| 19].getValue(); + var _raxs = getInputData(17); + var _rrad = getInputData(18); + var _rrot = getInputData(19); _3d_local_transform(_lpos, _lrot, _lsca); for( var i = 0; i < _samo; i++ ) { @@ -151,8 +151,8 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constru } static step = function() { - var _proj = inputs[| 20].getValue(); - var _patt = inputs[| 16].getValue(); + var _proj = getInputData(20); + var _patt = getInputData(16); inputs[| 13].setVisible(_patt == 0); @@ -163,25 +163,25 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constru } static update = function(frame = PROJECT.animator.current_frame) { - var _dim = inputs[| 0].getValue(); - var _lpos = inputs[| 1].getValue(); - var _lrot = inputs[| 2].getValue(); - var _lsca = inputs[| 3].getValue(); + var _dim = getInputData(0); + var _lpos = getInputData(1); + var _lrot = getInputData(2); + var _lsca = getInputData(3); - var _pos = inputs[| 4].getValue(); - var _sca = inputs[| 5].getValue(); + var _pos = getInputData(4); + var _sca = getInputData(5); - var _ldir = inputs[| 6].getValue(); - var _lhgt = inputs[| 7].getValue(); - var _lint = inputs[| 8].getValue(); - var _lclr = inputs[| 9].getValue(); - var _aclr = inputs[| 10].getValue(); + var _ldir = getInputData(6); + var _lhgt = getInputData(7); + var _lint = getInputData(8); + var _lclr = getInputData(9); + var _aclr = getInputData(10); - var _proj = inputs[| 20].getValue(); - var _fov = inputs[| 21].getValue(); - var _dimS = inputs[| 22].getValue(); + var _proj = getInputData(20); + var _fov = getInputData(21); + var _dimS = getInputData(22); - var _patt = inputs[| 16].getValue(); + var _patt = getInputData(16); for( var i = 0, n = array_length(output_display_list) - 1; i < n; i++ ) { var ind = output_display_list[i]; diff --git a/scripts/__node_3d_transform/__node_3d_transform.gml b/scripts/__node_3d_transform/__node_3d_transform.gml index bb455545f..35544896e 100644 --- a/scripts/__node_3d_transform/__node_3d_transform.gml +++ b/scripts/__node_3d_transform/__node_3d_transform.gml @@ -15,7 +15,7 @@ function __Node_3D_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _g inputs[| 4] = nodeValue("Render position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector) - .setUnitRef( function() { return inputs[| 2].getValue(); }, VALUE_UNIT.reference); + .setUnitRef( function() { return getInputData(2); }, VALUE_UNIT.reference); inputs[| 5] = nodeValue("Render scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -24,10 +24,10 @@ function __Node_3D_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _g .setDisplay(VALUE_DISPLAY.rotation); inputs[| 7] = nodeValue("Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [-1, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); inputs[| 8] = nodeValue("Light intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 9] = nodeValue("Light color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); @@ -41,7 +41,7 @@ function __Node_3D_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _g .rejectArray(); inputs[| 13] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, [ 1, 90, 1 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 1 ] }); inputs[| 14] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true) @@ -69,11 +69,11 @@ function __Node_3D_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _g } static submit_vertex = function() { - var _lpos = inputs[| 1].getValue(); - var _lrot = inputs[| 2].getValue(); - var _lsca = inputs[| 3].getValue(); + var _lpos = getInputData(1); + var _lrot = getInputData(2); + var _lsca = getInputData(3); - var sv = inputs[| 11].getValue(); + var sv = getInputData(11); if(sv == noone) return; _3d_local_transform(_lpos, _lrot, _lsca); @@ -86,7 +86,7 @@ function __Node_3D_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _g } static step = function() { - var _proj = inputs[| 12].getValue(); + var _proj = getInputData(12); inputs[| 13].setVisible(_proj); } diff --git a/scripts/_node_VFX_spawner/_node_VFX_spawner.gml b/scripts/_node_VFX_spawner/_node_VFX_spawner.gml index abf45e4de..1cdf74194 100644 --- a/scripts/_node_VFX_spawner/_node_VFX_spawner.gml +++ b/scripts/_node_VFX_spawner/_node_VFX_spawner.gml @@ -126,11 +126,11 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[| 39] = nodeValue("Bounce amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 ) .rejectArray() - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 40] = nodeValue("Bounce friction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1, "Apply horizontal friction once particle stop bouncing." ) .rejectArray() - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 41] = nodeValue("Position wiggle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] ) .setDisplay(VALUE_DISPLAY.vector, { label: [ "Amplitude", "Period" ], linkable: false, per_line: true }) @@ -352,12 +352,12 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co } render(); - seed = inputs[| 32].getValue(); + seed = getInputData(32); - var _wigg_pos = inputs[| 41].getValue(); - var _wigg_rot = inputs[| 42].getValue(); - var _wigg_sca = inputs[| 43].getValue(); - var _wigg_dir = inputs[| 20].getValue(); + var _wigg_pos = getInputData(41); + var _wigg_rot = getInputData(42); + var _wigg_sca = getInputData(43); + var _wigg_dir = getInputData(20); wiggle_maps.wig_psx.check(_wigg_pos[0], _wigg_pos[1], seed + 10); wiggle_maps.wig_psy.check(_wigg_pos[0], _wigg_pos[1], seed + 20); @@ -366,8 +366,8 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co wiggle_maps.wig_scy.check(_wigg_sca[0], _wigg_sca[1], seed + 50); wiggle_maps.wig_dir.check(_wigg_dir[0], _wigg_dir[1], seed + 60); - var _curve_sca = inputs[| 11].getValue(); - var _curve_alp = inputs[| 14].getValue(); + var _curve_sca = getInputData(11); + var _curve_alp = getInputData(14); curve_scale = new curveMap(_curve_sca, PROJECT.animator.frames_total); curve_alpha = new curveMap(_curve_alp, PROJECT.animator.frames_total); @@ -377,7 +377,7 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co surface_free_safe(surface_cache[$ keys[i]]); surface_cache = {}; - var _loop = inputs[| 21].getValue(); + var _loop = getInputData(21); if(!_loop) return; for(var i = 0; i < PROJECT.animator.frames_total; i++) { @@ -385,7 +385,7 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co updateParticleForward(); } - seed = inputs[| 32].getValue(); + seed = getInputData(32); } #endregion function checkPartPool() { #region @@ -449,12 +449,12 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co static onStep = function() {} static step = function() { #region - var _inSurf = inputs[| 0].getValue(); - var _dist = inputs[| 4].getValue(); - var _scatt = inputs[| 24].getValue(); - var _dirAng = inputs[| 29].getValue(); - var _turn = inputs[| 34].getValue(); - var _colGnd = inputs[| 37].getValue(); + var _inSurf = getInputData(0); + var _dist = getInputData(4); + var _scatt = getInputData(24); + var _dirAng = getInputData(29); + var _turn = getInputData(34); + var _colGnd = getInputData(37); inputs[| 6].setVisible(!_dirAng); @@ -476,7 +476,7 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co if(is_array(_inSurf)) { inputs[| 22].setVisible(true); - var _type = inputs[| 22].getValue(); + var _type = getInputData(22); if(_type == 2) { inputs[| 23].setVisible(true); inputs[| 26].setVisible(true); @@ -496,7 +496,7 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co static update = function(frame = PROJECT.animator.current_frame) { #region checkPartPool(); - var _spawn_type = inputs[| 16].getValue(); + var _spawn_type = getInputData(16); if(_spawn_type == 0) inputs[| 1].name = "Spawn delay"; else inputs[| 1].name = "Spawn frame"; diff --git a/scripts/_node_strand_affector/_node_strand_affector.gml b/scripts/_node_strand_affector/_node_strand_affector.gml index 5c0af8b47..363d36520 100644 --- a/scripts/_node_strand_affector/_node_strand_affector.gml +++ b/scripts/_node_strand_affector/_node_strand_affector.gml @@ -1,10 +1,10 @@ #macro STRAND_EFFECTOR_PRE \ - var _str = inputs[| 0].getValue(); \ - var _typ = inputs[| 1].getValue(); \ - var _pos = inputs[| 2].getValue(); \ - var _ran = inputs[| 3].getValue(); \ - var _dir = inputs[| 4].getValue(); \ - var _fal = inputs[| 5].getValue(); var fal = _ran * _fal; \ + var _str = getInputData(0); \ + var _typ = getInputData(1); \ + var _pos = getInputData(2); \ + var _ran = getInputData(3); \ + var _dir = getInputData(4); \ + var _fal = getInputData(5); var fal = _ran * _fal; \ \ if(_str == noone) return; \ var __str = _str; \ @@ -55,7 +55,7 @@ function _Node_Strand_Affector(_x, _y, _group = noone) : Node(_x, _y, _group) co .setDisplay(VALUE_DISPLAY.rotation); inputs[| 5] = nodeValue("Falloff", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); outputs[| 0] = nodeValue("Strand", self, JUNCTION_CONNECT.output, VALUE_TYPE.strands, noone); @@ -66,11 +66,11 @@ function _Node_Strand_Affector(_x, _y, _group = noone) : Node(_x, _y, _group) co ]; static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _typ = inputs[| 1].getValue(); - var _pos = inputs[| 2].getValue(); - var _ran = inputs[| 3].getValue(); - var _dir = inputs[| 4].getValue(); - var _fal = inputs[| 5].getValue(); + var _typ = getInputData(1); + var _pos = getInputData(2); + var _ran = getInputData(3); + var _dir = getInputData(4); + var _fal = getInputData(5); var px = _x + _pos[0] * _s; var py = _y + _pos[1] * _s; @@ -148,7 +148,7 @@ function _Node_Strand_Affector(_x, _y, _group = noone) : Node(_x, _y, _group) co } static update = function(frame = PROJECT.animator.current_frame) { - var _typ = inputs[| 1].getValue(); + var _typ = getInputData(1); inputs[| 4].setVisible(_typ == 1); STRAND_EFFECTOR_PRE diff --git a/scripts/areaBox/areaBox.gml b/scripts/areaBox/areaBox.gml index 8eb757e90..2436baba2 100644 --- a/scripts/areaBox/areaBox.gml +++ b/scripts/areaBox/areaBox.gml @@ -116,15 +116,15 @@ function areaBox(_onModify, _unit = noone) : widget() constructor { } #endregion static drawParam = function(params) { #region - return draw(params.x + params.w / 2, params.y + ui(40), params.data, params.extra_data, params.m); + return draw(params.x + params.w / 2, params.y + ui(40), params.data, params.display_data, params.m); } #endregion - static draw = function(_x, _y, _data, _extra_data, _m) { + static draw = function(_x, _y, _data, _display_data, _m) { x = _x; y = _y; w = 0; h = ui(204); - mode = _extra_data.area_type; + mode = _display_data.area_type; var _bx = _x - ui(48); var _by = _y + ui(64 - 48); @@ -218,7 +218,7 @@ function areaBox(_onModify, _unit = noone) : widget() constructor { break; } - _extra_data.area_type = (mode + 1) % 3; + _display_data.area_type = (mode + 1) % 3; } #endregion } diff --git a/scripts/argumentRenderer/argumentRenderer.gml b/scripts/argumentRenderer/argumentRenderer.gml index 89c41c795..704018552 100644 --- a/scripts/argumentRenderer/argumentRenderer.gml +++ b/scripts/argumentRenderer/argumentRenderer.gml @@ -14,7 +14,7 @@ function argumentRenderer(_typeArray = []) { var _h = 0; _jType.editWidget.setFocusHover(_focus, _hover); - _jType.editWidget.draw(tx, ty, ui(128), _th, _jType.display_data[_jType.showValue()], _m, argument_renderer.rx, argument_renderer.ry); + _jType.editWidget.draw(tx, ty, ui(128), _th, _jType.display_data.data[_jType.showValue()], _m, argument_renderer.rx, argument_renderer.ry); var _jName = inputs[| i + 0]; _jName.editWidget.setFocusHover(_focus, _hover); diff --git a/scripts/biterator/biterator.gml b/scripts/biterator/biterator.gml index eb36c72cc..19f92e82a 100644 --- a/scripts/biterator/biterator.gml +++ b/scripts/biterator/biterator.gml @@ -9,14 +9,14 @@ function Biterator(node) : VCT(node) constructor { dimension = VCT_var(VALUE_TYPE.integer, 0); shape = VCT_var(VALUE_TYPE.integer, 0); - shape_par[0] = VCT_var(VALUE_TYPE.integer, 0).setDisplay(VALUE_DISPLAY.slider, [- 8, 8, 1]); - shape_par[1] = VCT_var(VALUE_TYPE.integer, 0).setDisplay(VALUE_DISPLAY.slider, [- 8, 8, 1]); - shape_par[2] = VCT_var(VALUE_TYPE.integer, 2).setDisplay(VALUE_DISPLAY.slider, [ 0, 4, 1]); - shape_par[3] = VCT_var(VALUE_TYPE.integer, 2).setDisplay(VALUE_DISPLAY.slider, [ 0, 4, 1]); - shape_par[4] = VCT_var(VALUE_TYPE.integer, 0).setDisplay(VALUE_DISPLAY.slider, [ -4, 4, 1]); - shape_par[5] = VCT_var(VALUE_TYPE.integer, 0).setDisplay(VALUE_DISPLAY.slider, [ -4, 4, 1]); + shape_par[0] = VCT_var(VALUE_TYPE.integer, 0).setDisplay(VALUE_DISPLAY.slider, { range: [- 8, 8, 1] }); + shape_par[1] = VCT_var(VALUE_TYPE.integer, 0).setDisplay(VALUE_DISPLAY.slider, { range: [- 8, 8, 1] }); + shape_par[2] = VCT_var(VALUE_TYPE.integer, 2).setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 1] }); + shape_par[3] = VCT_var(VALUE_TYPE.integer, 2).setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 1] }); + shape_par[4] = VCT_var(VALUE_TYPE.integer, 0).setDisplay(VALUE_DISPLAY.slider, { range: [ -4, 4, 1] }); + shape_par[5] = VCT_var(VALUE_TYPE.integer, 0).setDisplay(VALUE_DISPLAY.slider, { range: [ -4, 4, 1] }); - shape_par[5] = VCT_var(VALUE_TYPE.integer, 0).setDisplay(VALUE_DISPLAY.slider, [ -4, 4, 1]); + shape_par[5] = VCT_var(VALUE_TYPE.integer, 0).setDisplay(VALUE_DISPLAY.slider, { range: [ -4, 4, 1] }); for( var i = 0; i < 3; i++ ) color[i] = VCT_var(VALUE_TYPE.color, c_white); @@ -31,7 +31,7 @@ function Biterator(node) : VCT(node) constructor { for( var i = 0; i < 4; i++ ) kernel_toggle[i] = VCT_var(VALUE_TYPE.boolean, 0); for( var i = 0; i < 8; i++ ) - kernel_value[i] = VCT_var(VALUE_TYPE.integer, 1).setDisplay(VALUE_DISPLAY.slider, [1, 4, 1]); + kernel_value[i] = VCT_var(VALUE_TYPE.integer, 1).setDisplay(VALUE_DISPLAY.slider, { range: [1, 4, 1] }); function process() { var _dimension = dimension.get(); diff --git a/scripts/hlsl_server/hlsl_server.gml b/scripts/hlsl_server/hlsl_server.gml index 9684428fd..043590616 100644 --- a/scripts/hlsl_server/hlsl_server.gml +++ b/scripts/hlsl_server/hlsl_server.gml @@ -72,8 +72,8 @@ function hlsl_document_parser(prompt, node = noone) { var lines = string_split(prompt, "\n"); for( var i = node.input_fix_len, n = ds_list_size(node.inputs); i < n; i += node.data_length ) { - var _arg_name = node.inputs[| i + 0].getValue(); - var _arg_type = node.inputs[| i + 1].getValue(); + var _arg_name = node.getInputData(i + 0); + var _arg_type = node.getInputData(i + 1); if(_arg_type == 7) { array_push(params, [ _arg_name + "Object", "Texture2D" ]); diff --git a/scripts/nodeValue_drawer/nodeValue_drawer.gml b/scripts/nodeValue_drawer/nodeValue_drawer.gml index b6eb8e768..4647b0ed6 100644 --- a/scripts/nodeValue_drawer/nodeValue_drawer.gml +++ b/scripts/nodeValue_drawer/nodeValue_drawer.gml @@ -231,7 +231,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc } var _show = jun.showValue(); - var param = new widgetParam(editBoxX, editBoxY, editBoxW, editBoxH, _show, jun.extra_data, _m, rx, ry); + var param = new widgetParam(editBoxX, editBoxY, editBoxW, editBoxH, _show, jun.display_data, _m, rx, ry); switch(jun.type) { case VALUE_TYPE.integer : @@ -266,9 +266,9 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc #endregion } else if(jun.display_type == VALUE_DISPLAY.label) { #region label draw_set_text(f_p1, fa_left, fa_top, COLORS._main_text_sub); - draw_text_add(xx + ui(16), _hsy, jun.display_data); + draw_text_add(xx + ui(16), _hsy, jun.display_data.data); - widH = string_height(jun.display_data); + widH = string_height(jun.display_data.data); #endregion } else widH = 0; diff --git a/scripts/node_2d_light/node_2d_light.gml b/scripts/node_2d_light/node_2d_light.gml index ce2de3126..f36f53503 100644 --- a/scripts/node_2d_light/node_2d_light.gml +++ b/scripts/node_2d_light/node_2d_light.gml @@ -26,7 +26,7 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 3] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 16); inputs[| 4] = nodeValue("Intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 5] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); @@ -37,25 +37,25 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.vector); inputs[| 8] = nodeValue("Sweep", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 15) - .setDisplay(VALUE_DISPLAY.slider, [-80, 80, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-80, 80, 1] }); inputs[| 9] = nodeValue("Sweep end", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.slider, [-80, 80, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-80, 80, 1] }); inputs[| 10] = nodeValue("Banding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.slider, [0, 16, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 1] }); inputs[| 11] = nodeValue("Attenuation", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "Control how light fade out over distance.") .setDisplay(VALUE_DISPLAY.enum_scroll, ["Quadratic", "Invert quadratic", "Linear"]); inputs[| 12] = nodeValue("Radial banding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.slider, [0, 16, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 1] }); inputs[| 13] = nodeValue("Radial start", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.rotation); inputs[| 14] = nodeValue("Radial band ratio", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 15] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 15; @@ -72,11 +72,11 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _shape = inputs[| 1].getValue(); + var _shape = getInputData(1); switch(_shape) { case LIGHT_SHAPE_2D.point : - var pos = inputs[| 2].getValue(); + var pos = getInputData(2); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; diff --git a/scripts/node_3d_camera/node_3d_camera.gml b/scripts/node_3d_camera/node_3d_camera.gml index e7eb4c3a3..35712ee07 100644 --- a/scripts/node_3d_camera/node_3d_camera.gml +++ b/scripts/node_3d_camera/node_3d_camera.gml @@ -18,7 +18,7 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) global.SKY_SPHERE = new __3dUVSphere(0.5, 16, 8, true); inputs[| in_d3d + 0] = nodeValue("FOV", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 60 ) - .setDisplay(VALUE_DISPLAY.slider, [ 10, 90, 1 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 10, 90, 1 ] }); inputs[| in_d3d + 1] = nodeValue("Clipping Distance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 10 ] ) .setDisplay(VALUE_DISPLAY.vector); @@ -40,7 +40,7 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) .setDisplay(VALUE_DISPLAY.enum_button, [ "None", "CW", "CCW" ]); inputs[| in_d3d + 8] = nodeValue("Orthographic Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0.01, 4, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0.01, 4, 0.01 ] }); inputs[| in_d3d + 9] = nodeValue("Postioning Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Position + Rotation", "Position + Lookat", "Lookat + Rotation" ] ); @@ -55,7 +55,7 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) .setDisplay(VALUE_DISPLAY.rotation); inputs[| in_d3d + 13] = nodeValue("Vertical Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 45 ) - .setDisplay(VALUE_DISPLAY.slider, [0, 90, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 1] }); inputs[| in_d3d + 14] = nodeValue("Distance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4 ); @@ -70,7 +70,7 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) inputs[| in_d3d + 19] = nodeValue("AO Bias", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.05 ); inputs[| in_d3d + 20] = nodeValue("AO Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1. ) - .setDisplay(VALUE_DISPLAY.slider, [ 0.01, 4, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0.01, 4, 0.01 ] }); inputs[| in_d3d + 21] = nodeValue("Round Normal", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ); @@ -94,7 +94,7 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) tool_lookat = new NodeTool( "Move Target", THEME.tools_3d_transform_object ); static getToolSettings = function() { #region - var _posm = inputs[| in_d3d + 9].getValue(); + var _posm = getInputData(in_d3d + 9); switch(_posm) { case 0 : return tool_settings; @@ -133,9 +133,9 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) } #endregion static step = function() { #region - var _proj = inputs[| in_d3d + 3].getValue(); - var _posm = inputs[| in_d3d + 9].getValue(); - var _ao = inputs[| in_d3d + 17].getValue(); + var _proj = getInputData(in_d3d + 3); + var _posm = getInputData(in_d3d + 9); + var _ao = getInputData(in_d3d + 17); inputs[| in_d3d + 0].setVisible(_proj == 0); inputs[| in_d3d + 8].setVisible(_proj == 1); @@ -340,7 +340,7 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) } #endregion static getPreviewObjects = function() { #region - var _posm = inputs[| in_d3d + 9].getValue(); + var _posm = getInputData(in_d3d + 9); var _scene = array_safe_get(all_inputs, in_d3d + 4, noone); if(is_array(_scene)) diff --git a/scripts/node_3d_material/node_3d_material.gml b/scripts/node_3d_material/node_3d_material.gml index 7345505f1..4059cc099 100644 --- a/scripts/node_3d_material/node_3d_material.gml +++ b/scripts/node_3d_material/node_3d_material.gml @@ -6,10 +6,10 @@ function Node_3D_Material(_x, _y, _group = noone) : Node_3D(_x, _y, _group) cons .setVisible(true, true); inputs[| 1] = nodeValue("Diffuse", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 2] = nodeValue("Specular", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 3] = nodeValue("Shininess", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1 ); @@ -18,10 +18,10 @@ function Node_3D_Material(_x, _y, _group = noone) : Node_3D(_x, _y, _group) cons inputs[| 5] = nodeValue("Normal Map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); inputs[| 6] = nodeValue("Normal Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 2, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); inputs[| 7] = nodeValue("Roughness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); outputs[| 0] = nodeValue("Material", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3Material, noone); 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 ee082a7bf..82fc551a1 100644 --- a/scripts/node_3d_mesh_cube/node_3d_mesh_cube.gml +++ b/scripts/node_3d_mesh_cube/node_3d_mesh_cube.gml @@ -31,7 +31,7 @@ function Node_3D_Mesh_Cube(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group ] static step = function() { #region - var _mat_side = inputs[| in_mesh + 0].getValue(); + var _mat_side = getInputData(in_mesh + 0); inputs[| in_mesh + 1].name = _mat_side? "Material Top" : "Material"; inputs[| in_mesh + 1].setVisible(true, true); diff --git a/scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml b/scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml index 7deeb9696..93068cd41 100644 --- a/scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml +++ b/scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml @@ -26,7 +26,7 @@ function Node_3D_Mesh_Obj(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group) object_class = __3dObject; inputs[| in_mesh + 0] = nodeValue("File Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "" ) - .setDisplay(VALUE_DISPLAY.path_load, [ "*.obj", "" ]) + .setDisplay(VALUE_DISPLAY.path_load, { filter: "*.obj" }) .rejectArray(); inputs[| in_mesh + 1] = nodeValue("Flip UV", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true, "Flip UV axis, can be use to fix some texture mapping error.") @@ -51,7 +51,7 @@ function Node_3D_Mesh_Obj(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group) insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; static onInspector1Update = function() { - var _path = inputs[| in_mesh + 0].getValue(); + var _path = getInputData(in_mesh + 0); updateObj(_path); } diff --git a/scripts/node_3dsurf/node_3dsurf.gml b/scripts/node_3dsurf/node_3dsurf.gml index c4a36b768..a6553552f 100644 --- a/scripts/node_3dsurf/node_3dsurf.gml +++ b/scripts/node_3dsurf/node_3dsurf.gml @@ -10,7 +10,7 @@ function Node_3DSurf(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co .setDisplay(VALUE_DISPLAY.vector); inputs[| 2] = nodeValue("Vertical Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 45 ) - .setDisplay(VALUE_DISPLAY.slider, [0, 90, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 1] }); inputs[| 3] = nodeValue("Distance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4 ); diff --git a/scripts/node_9slice/node_9slice.gml b/scripts/node_9slice/node_9slice.gml index 6d4f17bb5..db7ef05ac 100644 --- a/scripts/node_9slice/node_9slice.gml +++ b/scripts/node_9slice/node_9slice.gml @@ -25,7 +25,7 @@ function Node_9Slice(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co static onValueFromUpdate = function(index) { if(index == 0) { - var s = inputs[| 0].getValue(); + var s = getInputData(0); if(is_array(s)) s = s[0]; inputs[| 1].setValue([surface_get_width_safe(s), surface_get_height_safe(s)]); } 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 89be6f755..018b91a6f 100644 --- a/scripts/node_PCX_array_get/node_PCX_array_get.gml +++ b/scripts/node_PCX_array_get/node_PCX_array_get.gml @@ -8,8 +8,8 @@ function Node_PCX_Array_Get(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) c outputs[| 0] = nodeValue("PCX", self, JUNCTION_CONNECT.output, VALUE_TYPE.PCXnode, noone); static update = function() { - var _arr = inputs[| 0].getValue(); - var _ind = inputs[| 1].getValue(); + var _arr = getInputData(0); + var _ind = getInputData(1); outputs[| 0].setValue(new __funcTree("@", _arr, _ind)); } 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 980a0887e..4ee40836b 100644 --- a/scripts/node_PCX_array_set/node_PCX_array_set.gml +++ b/scripts/node_PCX_array_set/node_PCX_array_set.gml @@ -10,9 +10,9 @@ function Node_PCX_Array_Set(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) c outputs[| 0] = nodeValue("PCX", self, JUNCTION_CONNECT.output, VALUE_TYPE.PCXnode, noone); static update = function() { - var _arr = inputs[| 0].getValue(); - var _ind = inputs[| 1].getValue(); - var _val = inputs[| 2].getValue(); + var _arr = getInputData(0); + var _ind = getInputData(1); + var _val = getInputData(2); outputs[| 0].setValue(new __funcTree("=", [ _arr, _ind ], _val)); } diff --git a/scripts/node_PCX_condition/node_PCX_condition.gml b/scripts/node_PCX_condition/node_PCX_condition.gml index db1212320..0859def96 100644 --- a/scripts/node_PCX_condition/node_PCX_condition.gml +++ b/scripts/node_PCX_condition/node_PCX_condition.gml @@ -10,9 +10,9 @@ function Node_PCX_Condition(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) c outputs[| 0] = nodeValue("PCX", self, JUNCTION_CONNECT.output, VALUE_TYPE.PCXnode, noone); static update = function() { - var _cond = inputs[| 0].getValue(); - var _true = inputs[| 1].getValue(); - var _fals = inputs[| 2].getValue(); + var _cond = getInputData(0); + var _true = getInputData(1); + var _fals = getInputData(2); var _fn = new __funcIf(); _fn.condition = _cond; diff --git a/scripts/node_PCX_equation/node_PCX_equation.gml b/scripts/node_PCX_equation/node_PCX_equation.gml index 5d4bb48ad..fd63d5a30 100644 --- a/scripts/node_PCX_equation/node_PCX_equation.gml +++ b/scripts/node_PCX_equation/node_PCX_equation.gml @@ -75,7 +75,7 @@ function Node_PCX_Equation(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) co array_resize(input_display_list, input_display_len); for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { - var varName = inputs[| i].getValue(); + var varName = getInputData(i); if(varName != "") { ds_list_add(_in, inputs[| i + 0]); @@ -103,20 +103,20 @@ function Node_PCX_Equation(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) co if(LOADING || APPENDING) return; if(safe_mod(index - input_fix_len, data_length) == 0) //Variable name - inputs[| index + 1].name = inputs[| index].getValue(); + inputs[| index + 1].name = getInputData(index); refreshDynamicInput(); } #endregion static update = function() { #region - var eq = inputs[| 0].getValue(); + var eq = getInputData(0); var fn = evaluateFunctionTree(eq); var _fnL = new __funcList(); for( var i = input_fix_len; i < array_length(_data); i += data_length ) { - var _pName = inputs[| i + 0].getValue(); - var _pVal = inputs[| i + 1].getValue(); + var _pName = getInputData(i + 0); + var _pVal = getInputData(i + 1); _fnL.addFunction(new __funcTree("=", _pName, _pVal)); } @@ -127,7 +127,7 @@ function Node_PCX_Equation(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) co static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text); - var str = inputs[| 0].getValue(); + var str = getInputData(0); var bbox = drawGetBbox(xx, yy, _s); var ss = string_scale(str, bbox.w, bbox.h); 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 0a93854aa..341d2b28d 100644 --- a/scripts/node_PCX_fn_math/node_PCX_fn_math.gml +++ b/scripts/node_PCX_fn_math/node_PCX_fn_math.gml @@ -17,10 +17,10 @@ function Node_PCX_fn_Math(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) con static syms = [ "+", "-", "*", "/", "$", "%", "abs", -1, "round", "floor", "ceil", -1, "sin", "cos", "tan", "arcsin", "arccos", "arctan", -1, "min", "max", "clamp", -1, "lerp" ]; - var _opr = inputs[| 0].getValue(); - var _x = inputs[| 1].getValue(); - var _y = inputs[| 2].getValue(); - var _z = inputs[| 3].getValue(); + var _opr = getInputData(0); + var _x = getInputData(1); + var _y = getInputData(2); + var _z = getInputData(3); var _sym = syms[_opr]; switch(_sym) { 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 86379bf26..4090ce825 100644 --- a/scripts/node_PCX_fn_random/node_PCX_fn_random.gml +++ b/scripts/node_PCX_fn_random/node_PCX_fn_random.gml @@ -12,9 +12,9 @@ function Node_PCX_fn_Random(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) c input_display_list = [ 2, 0, 1 ]; static update = function() { - var _min = inputs[| 0].getValue(); - var _max = inputs[| 1].getValue(); - var _int = inputs[| 2].getValue(); + var _min = getInputData(0); + var _max = getInputData(1); + var _int = getInputData(2); outputs[| 0].setValue(new __funcTree(_int? "irandom" : "random", [ _min, _max ])); } 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 1813fadc7..88e3c0d69 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 @@ -6,7 +6,7 @@ function Node_PCX_fn_Surface_Height(_x, _y, _group = noone) : Node_PCX(_x, _y, _ outputs[| 0] = nodeValue("PCX", self, JUNCTION_CONNECT.output, VALUE_TYPE.PCXnode, noone); static update = function() { - var _surf = inputs[| 0].getValue(); + var _surf = getInputData(0); outputs[| 0].setValue(new __funcTree("surface_get_height", [ _surf ])); } } \ No newline at end of file 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 b1b3cc41f..e27eac2fb 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 @@ -6,7 +6,7 @@ function Node_PCX_fn_Surface_Width(_x, _y, _group = noone) : Node_PCX(_x, _y, _g outputs[| 0] = nodeValue("PCX", self, JUNCTION_CONNECT.output, VALUE_TYPE.PCXnode, noone); static update = function() { - var _surf = inputs[| 0].getValue(); + var _surf = getInputData(0); outputs[| 0].setValue(new __funcTree("surface_get_width", [ _surf ])); } } \ No newline at end of file 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 291f09c9d..b69c597ee 100644 --- a/scripts/node_PCX_fn_var/node_PCX_fn_var.gml +++ b/scripts/node_PCX_fn_var/node_PCX_fn_var.gml @@ -7,7 +7,7 @@ function Node_PCX_fn_var(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) cons outputs[| 0] = nodeValue("PCX", self, JUNCTION_CONNECT.output, VALUE_TYPE.PCXnode, noone); static update = function() { - var _def = inputs[| 0].getValue(); + var _def = getInputData(0); outputs[| 0].setValue(new __funcTree("≔", display_name, _def)); } diff --git a/scripts/node_PCX_var/node_PCX_var.gml b/scripts/node_PCX_var/node_PCX_var.gml index 5cea8a4ae..f191ce064 100644 --- a/scripts/node_PCX_var/node_PCX_var.gml +++ b/scripts/node_PCX_var/node_PCX_var.gml @@ -8,8 +8,8 @@ function Node_PCX_var(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constru outputs[| 0] = nodeValue("PCX", self, JUNCTION_CONNECT.output, VALUE_TYPE.PCXnode, noone); static update = function() { - var _name = inputs[| 0].getValue(); - var _val = inputs[| 1].getValue(); + var _name = getInputData(0); + var _val = getInputData(1); outputs[| 0].setValue(new __funcTree("=", _name, _val)); } diff --git a/scripts/node_VCT/node_VCT.gml b/scripts/node_VCT/node_VCT.gml index 2dc3c49cf..602c76a69 100644 --- a/scripts/node_VCT/node_VCT.gml +++ b/scripts/node_VCT/node_VCT.gml @@ -5,9 +5,9 @@ function Node_VCT(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const vct = new VCT(self); inputs[| 0] = nodeValue("Editor", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.button, [ function() { + .setDisplay(VALUE_DISPLAY.button, { name: "Editor", onClick: function() { vct.createDialog(); - }, "Editor" ]); + } }); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); @@ -26,14 +26,14 @@ function Node_VCT(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const inputs[| index] = nodeValue(name, self, JUNCTION_CONNECT.input, _var.type, 0) .setDisplay(_var.disp, _var.disp_data); - inputs[| index].extra_data.key = key; + inputs[| index].display_data.key = key; array_append(input_display_list, [ index ]); } static processData = function(_outSurf, _data, _output_index, _array_index) { for( var i = 1; i < array_length(_data); i++ ) - vct[$ inputs[| i].extra_data.key].setDirect(_data[i]); + vct[$ inputs[| i].display_data.key].setDirect(_data[i]); var params = { frame: PROJECT.animator.current_frame @@ -54,6 +54,6 @@ function Node_VCT(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const vct.deserialize(load_map.vct); //for(var i = input_fix_len; i < array_length(_inputs); i += data_length) - // createNewInput(_inputs[i].extra_data.key); + // createNewInput(_inputs[i].display_data.key); } } \ No newline at end of file diff --git a/scripts/node_VFX_effect_wind/node_VFX_effect_wind.gml b/scripts/node_VFX_effect_wind/node_VFX_effect_wind.gml index 3c7269a3c..756b1e1ec 100644 --- a/scripts/node_VFX_effect_wind/node_VFX_effect_wind.gml +++ b/scripts/node_VFX_effect_wind/node_VFX_effect_wind.gml @@ -3,10 +3,10 @@ function Node_VFX_Wind(_x, _y, _group = noone) : Node_VFX_effector(_x, _y, _grou node_draw_icon = s_node_vfx_wind; function onAffect(part, str) { - var _vect = current_data[4]; - var _sten = current_data[5]; - var _rot_range = current_data[6]; - var _sca_range = current_data[7]; + var _vect = getInputData(4); + var _sten = getInputData(5); + var _rot_range = getInputData(6); + var _sca_range = getInputData(7); var _rot = random_range(_rot_range[0], _rot_range[1]); var _sca = [ random_range(_sca_range[0], _sca_range[1]), random_range(_sca_range[2], _sca_range[3]) ]; diff --git a/scripts/node_VFX_effector/node_VFX_effector.gml b/scripts/node_VFX_effector/node_VFX_effector.gml index f6acd3a23..ab647891f 100644 --- a/scripts/node_VFX_effector/node_VFX_effector.gml +++ b/scripts/node_VFX_effector/node_VFX_effector.gml @@ -44,21 +44,19 @@ function Node_VFX_effector(_x, _y, _group = noone) : Node(_x, _y, _group) constr outputs[| 0] = nodeValue("Particles", self, JUNCTION_CONNECT.output, VALUE_TYPE.particle, -1 ); - current_data = []; - UPDATE_PART_FORWARD static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - var area = inputs[| 1].getValue(); + var area = getInputData(1); var cx = _x + area[0] * _s; var cy = _y + area[1] * _s; var cw = area[2] * _s; var ch = area[3] * _s; var cs = area[4]; - var fall = inputs[| 3].getValue() * _s; + var fall = getInputData(3) * _s; var x0 = cx - cw + fall; var x1 = cx + cw - fall; var y0 = cy - ch + fall; @@ -95,9 +93,9 @@ function Node_VFX_effector(_x, _y, _group = noone) : Node(_x, _y, _group) constr function affect(part) { if(!part.active) return; - var _area = current_data[1]; - var _fall = current_data[2]; - var _fads = current_data[3]; + var _area = getInputData(1); + var _fall = getInputData(2); + var _fads = getInputData(3); var _area_x = _area[0]; var _area_y = _area[1]; @@ -142,13 +140,10 @@ function Node_VFX_effector(_x, _y, _group = noone) : Node(_x, _y, _group) constr } static update = function(frame = PROJECT.animator.current_frame) { - var val = inputs[| 0].getValue(); + var val = getInputData(0); outputs[| 0].setValue(val); if(val == -1) return; - for( var i = 0; i < ds_list_size(inputs); i++ ) - current_data[i] = inputs[| i].getValue(); - if(!is_array(val) || array_length(val) == 0) return; if(!is_array(val[0])) val = [ val ]; for( var i = 0, n = array_length(val); i < n; i++ ) diff --git a/scripts/node_VFX_override/node_VFX_override.gml b/scripts/node_VFX_override/node_VFX_override.gml index 6a6476962..8857f4442 100644 --- a/scripts/node_VFX_override/node_VFX_override.gml +++ b/scripts/node_VFX_override/node_VFX_override.gml @@ -30,15 +30,15 @@ function Node_VFX_Override(_x, _y, _group = noone) : Node(_x, _y, _group) constr outputs[| 0] = nodeValue("Particles", self, JUNCTION_CONNECT.output, VALUE_TYPE.particle, -1 ); static update = function(frame = PROJECT.animator.current_frame) { - var parts = inputs[| 0].getValue(); + var parts = getInputData(0); if(!is_array(parts)) return; - var _pos = inputs[| 1].getValue(); - var _sca = inputs[| 2].getValue(); - var _rot = inputs[| 3].getValue(); - var _col = inputs[| 4].getValue(); - var _alp = inputs[| 5].getValue(); - var _srf = inputs[| 6].getValue(); + var _pos = getInputData(1); + var _sca = getInputData(2); + var _rot = getInputData(3); + var _col = getInputData(4); + var _alp = getInputData(5); + var _srf = getInputData(6); for( var i = 0, n = array_length(parts); i < n; i++ ) { var part = parts[i]; diff --git a/scripts/node_VFX_renderer/node_VFX_renderer.gml b/scripts/node_VFX_renderer/node_VFX_renderer.gml index ea00e7175..042753030 100644 --- a/scripts/node_VFX_renderer/node_VFX_renderer.gml +++ b/scripts/node_VFX_renderer/node_VFX_renderer.gml @@ -60,7 +60,7 @@ function Node_VFX_Renderer(_x, _y, _group = noone) : Node(_x, _y, _group) constr } static step = function() { - var _dim = inputs[| 0].getValue(); + var _dim = getInputData(0); var _outSurf = outputs[| 0].getValue(); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); diff --git a/scripts/node_VFX_spawner/node_VFX_spawner.gml b/scripts/node_VFX_spawner/node_VFX_spawner.gml index 62392df5c..2eb257bb3 100644 --- a/scripts/node_VFX_spawner/node_VFX_spawner.gml +++ b/scripts/node_VFX_spawner/node_VFX_spawner.gml @@ -48,8 +48,6 @@ function Node_VFX_Spawner(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y if(ds_list_empty(vt.value_to)) return; var pv = part.getPivot(); - for( var i = 0; i < ds_list_size(inputs); i++ ) - current_data[i] = inputs[| i].getValue(); for( var i = 0; i < ds_list_size(vt.value_to); i++ ) { var _n = vt.value_to[| i]; @@ -63,9 +61,7 @@ function Node_VFX_Spawner(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y if(ds_list_empty(vt.value_to)) return; var pv = part.getPivot(); - for( var i = 0; i < ds_list_size(inputs); i++ ) - current_data[i] = inputs[| i].getValue(); - + for( var i = 0; i < ds_list_size(vt.value_to); i++ ) { var _n = vt.value_to[| i]; if(_n.value_from != vt) continue; @@ -78,8 +74,6 @@ function Node_VFX_Spawner(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y if(ds_list_empty(vt.value_to)) return; var pv = part.getPivot(); - for( var i = 0; i < ds_list_size(inputs); i++ ) - current_data[i] = inputs[| i].getValue(); for( var i = 0; i < ds_list_size(vt.value_to); i++ ) { var _n = vt.value_to[| i]; @@ -89,7 +83,7 @@ function Node_VFX_Spawner(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y } #endregion static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region - var spr = inputs[| 0].getValue(); + var spr = getInputData(0); if(spr == 0) { if(!is_surface(def_surface)) diff --git a/scripts/node_VFX_variable/node_VFX_variable.gml b/scripts/node_VFX_variable/node_VFX_variable.gml index c18ec3460..9e229422e 100644 --- a/scripts/node_VFX_variable/node_VFX_variable.gml +++ b/scripts/node_VFX_variable/node_VFX_variable.gml @@ -45,7 +45,7 @@ function Node_VFX_Variable(_x, _y, _group = noone) : Node(_x, _y, _group) constr .setVisible(false); static update = function(frame = PROJECT.animator.current_frame) { - var parts = inputs[| 0].getValue(); + var parts = getInputData(0); if(!is_array(parts)) return; var _val = []; diff --git a/scripts/node_alpha_cutoff/node_alpha_cutoff.gml b/scripts/node_alpha_cutoff/node_alpha_cutoff.gml index 0a5fbe6cd..6fc5c9b5c 100644 --- a/scripts/node_alpha_cutoff/node_alpha_cutoff.gml +++ b/scripts/node_alpha_cutoff/node_alpha_cutoff.gml @@ -4,12 +4,12 @@ function Node_Alpha_Cutoff(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 1] = nodeValue("Minimum", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2, "Any pixel with less alpha (more transparent) than this will be removed.") - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 2] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 3] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 4] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 4; diff --git a/scripts/node_animate_curve/node_animate_curve.gml b/scripts/node_animate_curve/node_animate_curve.gml index 90f8e3983..d016382d2 100644 --- a/scripts/node_animate_curve/node_animate_curve.gml +++ b/scripts/node_animate_curve/node_animate_curve.gml @@ -7,7 +7,7 @@ function Node_Anim_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 0] = nodeValue("Curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01); inputs[| 1] = nodeValue("Progress", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 2] = nodeValue("Minimum", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); inputs[| 3] = nodeValue("Maximum", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1); diff --git a/scripts/node_animation_control/node_animation_control.gml b/scripts/node_animation_control/node_animation_control.gml index 24171c346..082e33aef 100644 --- a/scripts/node_animation_control/node_animation_control.gml +++ b/scripts/node_animation_control/node_animation_control.gml @@ -20,25 +20,25 @@ function Node_Animation_Control(_x, _y, _group = noone) : Node(_x, _y, _group) c inputs[| 6] = nodeValue("Skip Frames Count", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1); static step = function() { - if(inputs[| 0].getValue()) + if(getInputData(0)) PROJECT.animator.toggle(); - if(inputs[| 1].getValue()) + if(getInputData(1)) PROJECT.animator.pause(); - if(inputs[| 2].getValue()) + if(getInputData(2)) PROJECT.animator.resume(); - if(inputs[| 3].getValue()) { + if(getInputData(3)) { PROJECT.animator.stop(); PROJECT.animator.play(); } - if(inputs[| 4].getValue()) + if(getInputData(4)) PROJECT.animator.render(); - if(inputs[| 5].getValue()) { - var fr = inputs[| 6].getValue(); + if(getInputData(5)) { + var fr = getInputData(6); PROJECT.animator.setFrame(PROJECT.animator.current_frame + fr); } } diff --git a/scripts/node_armature_bind/node_armature_bind.gml b/scripts/node_armature_bind/node_armature_bind.gml index 4e31f8fde..0be8f0328 100644 --- a/scripts/node_armature_bind/node_armature_bind.gml +++ b/scripts/node_armature_bind/node_armature_bind.gml @@ -16,7 +16,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr .setDisplay(VALUE_DISPLAY.vector); inputs[| 4] = nodeValue("Bone scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [ 0.1, 2, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0.1, 2, 0.01 ] }); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); @@ -64,7 +64,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr for(var i = input_fix_len; i < amo; i += data_length) { index++; var _surf = current_data[i]; - var _id = inputs[| i].extra_data.bone_id; + var _id = inputs[| i].display_data.bone_id; if(_id == "") continue; if(ds_map_exists(surfMap, _id)) @@ -142,7 +142,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr TOOLTIP = [ _surf, VALUE_TYPE.surface ]; if(mouse_press(mb_left, _focus)) { layer_dragging = _sid; - inputs[| input_fix_len + _sid * data_length].extra_data.bone_id = ""; + inputs[| input_fix_len + _sid * data_length].display_data.bone_id = ""; } draw_set_color(COLORS._main_accent); @@ -173,7 +173,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr if(layer_dragging != noone && hovering && mouse_release(mb_left)) { var _lind = input_fix_len + layer_dragging * data_length; - inputs[| _lind].extra_data.bone_id = hovering.ID; + inputs[| _lind].display_data.bone_id = hovering.ID; layer_dragging = noone; triggerRender(); @@ -302,7 +302,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr } } - var binded = inputs[| _inp].extra_data.bone_id != ""; + var binded = inputs[| _inp].display_data.bone_id != ""; if(layer_dragging == noone || layer_dragging == index) { var _bx = _x + 24; @@ -390,7 +390,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| index + 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| index + 0].surface_index = index; inputs[| index + 0].hover_effect = 0; - inputs[| index + 0].extra_data.bone_id = ""; + inputs[| index + 0].display_data.bone_id = ""; inputs[| index + 1] = nodeValue("Transform", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 1, 1 ] ) .setDisplay(VALUE_DISPLAY.transform); @@ -469,7 +469,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr static setBone = function() { #region ds_map_clear(boneMap); - var _b = inputs[| 1].getValue(); + var _b = getInputData(1); bone = _b; if(bone == noone) return; @@ -490,11 +490,11 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr } #endregion static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var dim = inputs[| 0].getValue(); - var _bind = inputs[| 2].getValue(); + var dim = getInputData(0); + var _bind = getInputData(2); - var _dpos = inputs[| 3].getValue(); - var _dsca = inputs[| 4].getValue(); + var _dpos = getInputData(3); + var _dsca = getInputData(4); if(bone == noone) return; @@ -529,7 +529,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr _tran = array_clone(_tran); - var _bone = inputs[| surf_dragging].extra_data.bone_id; + var _bone = inputs[| surf_dragging].display_data.bone_id; _bone = boneMap[? _bone]; if(drag_type == NODE_COMPOSE_DRAG.move) { @@ -599,7 +599,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr var _surf = array_safe_get(current_data, index); if(!_surf || is_array(_surf)) continue; - var _bone = inputs[| index].extra_data.bone_id; + var _bone = inputs[| index].display_data.bone_id; if(!ds_map_exists(boneMap, _bone)) { //print($"Bone not found {_bone}"); continue; @@ -664,7 +664,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr var _surf = array_safe_get(current_data, index); if(!_surf || is_array(_surf)) continue; - var _bone = inputs[| index].extra_data.bone_id; + var _bone = inputs[| index].display_data.bone_id; if(!ds_map_exists(boneMap, _bone)) continue; @@ -812,7 +812,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr var _s = use_data? _bind[i].surface.get() : _data[datInd]; if(!is_surface(_s)) continue; - var _b = use_data? _bind[i].bone : inputs[| datInd].extra_data.bone_id; + var _b = use_data? _bind[i].bone : inputs[| datInd].display_data.bone_id; if(!ds_map_exists(boneMap, _b)) { //print($"Bone not exist {_bone} from map {ds_map_size(boneMap)}") @@ -874,14 +874,14 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr } #endregion static resetTransform = function(surfIndex) { #region - var _bind = inputs[| 2].getValue(); + var _bind = getInputData(2); var use_data = _bind != noone; - var _surf = inputs[| surfIndex + 0].getValue(); - var _tran = inputs[| surfIndex + 1].getValue(); - var _arot = inputs[| surfIndex + 2].getValue(); + var _surf = getInputData(surfIndex + 0); + var _tran = getInputData(surfIndex + 1); + var _arot = getInputData(surfIndex + 2); - var _b = use_data? _bind[i].bone : inputs[| surfIndex].extra_data.bone_id; + var _b = use_data? _bind[i].bone : inputs[| surfIndex].display_data.bone_id; if(!ds_map_exists(boneMap, _b)) return; _b = boneMap[? _b]; diff --git a/scripts/node_armature_pose/node_armature_pose.gml b/scripts/node_armature_pose/node_armature_pose.gml index a917cb125..69cb9917b 100644 --- a/scripts/node_armature_pose/node_armature_pose.gml +++ b/scripts/node_armature_pose/node_armature_pose.gml @@ -36,7 +36,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const inputs[| index] = nodeValue(bone != noone? bone.name : "bone", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 1 ] ) .setDisplay(VALUE_DISPLAY.transform); - inputs[| index].extra_data.bone_id = bone != noone? bone.ID : noone; + inputs[| index].display_data.bone_id = bone != noone? bone.ID : noone; if(bone != noone) boneMap[? bone.ID] = inputs[| index]; @@ -48,7 +48,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const static setBone = function() { #region //print("Setting dem bones..."); - var _b = inputs[| 0].getValue(); + var _b = getInputData(0); if(_b == noone) return; var _bones = []; @@ -224,7 +224,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const bone_prev = noone; static step = function() { #region - var _b = inputs[| 0].getValue(); + var _b = getInputData(0); if(_b == noone) return; if(bone_prev != _b) { setBone(); @@ -237,7 +237,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const } #endregion static update = function(frame = PROJECT.animator.current_frame) { #region - var _b = inputs[| 0].getValue(); + var _b = getInputData(0); if(_b == noone) return; var _bone_pose = _b.clone(); @@ -310,7 +310,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const static doApplyDeserialize = function() { #region for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { var inp = inputs[| i]; - var idx = struct_try_get(inp.extra_data, "bone_id"); + var idx = struct_try_get(inp.display_data, "bone_id"); boneMap[? idx] = inp; } diff --git a/scripts/node_armature_sample/node_armature_sample.gml b/scripts/node_armature_sample/node_armature_sample.gml index f06969ba1..23feaf186 100644 --- a/scripts/node_armature_sample/node_armature_sample.gml +++ b/scripts/node_armature_sample/node_armature_sample.gml @@ -12,7 +12,7 @@ function Node_Armature_Sample(_x, _y, _group = noone) : Node(_x, _y, _group) con inputs[| 1] = nodeValue("Bone name", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); inputs[| 2] = nodeValue("Sample point", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); outputs[| 0] = nodeValue("Position", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -33,16 +33,16 @@ function Node_Armature_Sample(_x, _y, _group = noone) : Node(_x, _y, _group) con #endregion static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var _b = inputs[| 0].getValue(); + var _b = getInputData(0); if(_b == noone) return; _b.draw(attributes, false, _x, _y, _s, _mx, _my); } #endregion static update = function() { #region - var _bone = inputs[| 0].getValue(); - var _name = inputs[| 1].getValue(); - var _prog = inputs[| 2].getValue(); + var _bone = getInputData(0); + var _name = getInputData(1); + var _prog = getInputData(2); if(_bone == noone) return; diff --git a/scripts/node_armature_to_path/node_armature_to_path.gml b/scripts/node_armature_to_path/node_armature_to_path.gml index 94f9c7074..0bb1d4fb1 100644 --- a/scripts/node_armature_to_path/node_armature_to_path.gml +++ b/scripts/node_armature_to_path/node_armature_to_path.gml @@ -32,7 +32,7 @@ function Node_Armature_Path(_x, _y, _group = noone) : Node(_x, _y, _group) const #endregion static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var _b = inputs[| 0].getValue(); + var _b = getInputData(0); if(_b == noone) return; _b.draw(attributes, false, _x, _y, _s, _mx, _my); @@ -77,7 +77,7 @@ function Node_Armature_Path(_x, _y, _group = noone) : Node(_x, _y, _group) const } #endregion static update = function() { #region - var _bone = inputs[| 0].getValue(); + var _bone = getInputData(0); if(_bone == noone) return; lines = []; diff --git a/scripts/node_array/node_array.gml b/scripts/node_array/node_array.gml index 3300e1024..25bf2c430 100644 --- a/scripts/node_array/node_array.gml +++ b/scripts/node_array/node_array.gml @@ -5,7 +5,7 @@ function Node_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { w = 96; inputs[| 0] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Any", "Surface", "Number", "Color", "Text" ], { update_hover: false }) + .setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Any", "Surface", "Number", "Color", "Text" ], update_hover: false }) .rejectArray(); inputs[| 1] = nodeValue("Spread array", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false ) @@ -66,7 +66,7 @@ function Node_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { attributes.spread_value = false; static getType = function() { - var _type = inputs[| 0].getValue(); + var _type = getInputData(0); switch(_type) { case 1 : return VALUE_TYPE.surface; @@ -152,10 +152,10 @@ function Node_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { outputs[| 0].type = _typ; var res = []; var ind = 0; - var spd = inputs[| 1].getValue(); + var spd = getInputData(1); for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i++ ) { - var val = inputs[| i].getValue(); + var val = getInputData(i); if(is_array(val) && spd) array_append(res, val); diff --git a/scripts/node_array_add/node_array_add.gml b/scripts/node_array_add/node_array_add.gml index ec6109734..562e03688 100644 --- a/scripts/node_array_add/node_array_add.gml +++ b/scripts/node_array_add/node_array_add.gml @@ -52,7 +52,7 @@ function Node_Array_Add(_x, _y, _group = noone) : Node(_x, _y, _group) construct } static update = function(frame = PROJECT.animator.current_frame) { - var _arr = inputs[| 0].getValue(); + var _arr = getInputData(0); if(inputs[| 0].value_from == noone) { inputs[| 0].type = VALUE_TYPE.any; @@ -62,14 +62,14 @@ function Node_Array_Add(_x, _y, _group = noone) : Node(_x, _y, _group) construct if(!is_array(_arr)) return; var _type = inputs[| 0].value_from.type; - var spd = inputs[| 1].getValue(); + var spd = getInputData(1); inputs[| 0].type = _type; outputs[| 0].type = _type; var _out = array_clone(_arr); for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i += data_length ) { - var _val = inputs[| i].getValue(); + var _val = getInputData(i); inputs[| i].type = _type; if(is_array(_val) && spd) diff --git a/scripts/node_array_copy/node_array_copy.gml b/scripts/node_array_copy/node_array_copy.gml index f4935f49c..b17efda7b 100644 --- a/scripts/node_array_copy/node_array_copy.gml +++ b/scripts/node_array_copy/node_array_copy.gml @@ -26,9 +26,9 @@ function Node_Array_Copy(_x, _y, _group = noone) : Node(_x, _y, _group) construc } static update = function(frame = PROJECT.animator.current_frame) { - var _arr = inputs[| 0].getValue(); - var _ind = inputs[| 1].getValue(); - var _siz = inputs[| 2].getValue(); + var _arr = getInputData(0); + var _ind = getInputData(1); + var _siz = getInputData(2); if(!is_array(_arr)) return; var res = []; 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 47eb38b6a..9b0ff7466 100644 --- a/scripts/node_array_csv_parse/node_array_csv_parse.gml +++ b/scripts/node_array_csv_parse/node_array_csv_parse.gml @@ -15,8 +15,8 @@ function Node_Array_CSV_Parse(_x, _y, _group = noone) : Node(_x, _y, _group) con .setArrayDepth(1); static update = function(frame = PROJECT.animator.current_frame) { - var _str = inputs[| 0].getValue(); - var _skp = inputs[| 1].getValue(); + var _str = getInputData(0); + var _skp = getInputData(1); var _lines = string_splice(_str, "\n"); var _arr = []; diff --git a/scripts/node_array_find/node_array_find.gml b/scripts/node_array_find/node_array_find.gml index 2bf1b6238..dbfef4c91 100644 --- a/scripts/node_array_find/node_array_find.gml +++ b/scripts/node_array_find/node_array_find.gml @@ -16,14 +16,14 @@ function Node_Array_Find(_x, _y, _group = noone) : Node(_x, _y, _group) construc outputs[| 0] = nodeValue("Index", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, 0); static update = function(frame = PROJECT.animator.current_frame) { - var _arr = inputs[| 0].getValue(); + var _arr = getInputData(0); inputs[| 0].type = VALUE_TYPE.any; inputs[| 1].type = VALUE_TYPE.any; if(!is_array(_arr)) return; - var value = inputs[| 1].getValue(); + var value = getInputData(1); if(inputs[| 0].value_from != noone) { var type = inputs[| 0].value_from.type; diff --git a/scripts/node_array_get/node_array_get.gml b/scripts/node_array_get/node_array_get.gml index 4e5d4ee27..33d0ae860 100644 --- a/scripts/node_array_get/node_array_get.gml +++ b/scripts/node_array_get/node_array_get.gml @@ -55,12 +55,12 @@ function Node_Array_Get(_x, _y, _group = noone) : Node(_x, _y, _group) construct } static update = function(frame = PROJECT.animator.current_frame) { - var _arr = inputs[| 0].getValue(); + var _arr = getInputData(0); if(!is_array(_arr)) return; - var index = inputs[| 1].getValue(); - var _ovf = inputs[| 2].getValue(); + var index = getInputData(1); + var _ovf = getInputData(2); var res = is_array(index)? array_create(array_length(index)) : 0; if(is_array(index)) { @@ -74,7 +74,7 @@ function Node_Array_Get(_x, _y, _group = noone) : Node(_x, _y, _group) construct static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { draw_set_text(f_h3, fa_center, fa_center, COLORS._main_text); - var idx = inputs[| 1].getValue(); + var idx = getInputData(1); var str = string(idx); var bbox = drawGetBbox(xx, yy, _s); diff --git a/scripts/node_array_insert/node_array_insert.gml b/scripts/node_array_insert/node_array_insert.gml index 417ebe549..575383b17 100644 --- a/scripts/node_array_insert/node_array_insert.gml +++ b/scripts/node_array_insert/node_array_insert.gml @@ -20,7 +20,7 @@ function Node_Array_Insert(_x, _y, _group = noone) : Node(_x, _y, _group) constr outputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, 0); static update = function(frame = PROJECT.animator.current_frame) { - var _arr = inputs[| 0].getValue(); + var _arr = getInputData(0); inputs[| 0].type = VALUE_TYPE.any; inputs[| 2].type = VALUE_TYPE.any; @@ -28,9 +28,9 @@ function Node_Array_Insert(_x, _y, _group = noone) : Node(_x, _y, _group) constr if(!is_array(_arr)) return; - var index = inputs[| 1].getValue(); - var value = inputs[| 2].getValue(); - var spred = inputs[| 3].getValue(); + var index = getInputData(1); + var value = getInputData(2); + var spred = getInputData(3); var _len = array_length(_arr); if(inputs[| 0].value_from != noone) { @@ -63,7 +63,7 @@ function Node_Array_Insert(_x, _y, _group = noone) : Node(_x, _y, _group) constr static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { draw_set_text(f_h3, fa_center, fa_center, COLORS._main_text); - var idx = inputs[| 1].getValue(); + var idx = getInputData(1); var str = string(idx); diff --git a/scripts/node_array_length/node_array_length.gml b/scripts/node_array_length/node_array_length.gml index ab36d622f..a0ed66895 100644 --- a/scripts/node_array_length/node_array_length.gml +++ b/scripts/node_array_length/node_array_length.gml @@ -12,7 +12,7 @@ function Node_Array_Length(_x, _y, _group = noone) : Node(_x, _y, _group) constr outputs[| 0] = nodeValue("Size", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, 0); static update = function(frame = PROJECT.animator.current_frame) { - var _arr = inputs[| 0].getValue(); + var _arr = getInputData(0); inputs[| 0].type = inputs[| 0].value_from == noone? VALUE_TYPE.any : inputs[| 0].value_from.type; if(!is_array(_arr) || array_length(_arr) == 0) { diff --git a/scripts/node_array_range/node_array_range.gml b/scripts/node_array_range/node_array_range.gml index 45d940d01..233bb3e52 100644 --- a/scripts/node_array_range/node_array_range.gml +++ b/scripts/node_array_range/node_array_range.gml @@ -16,9 +16,9 @@ function Node_Array_Range(_x, _y, _group = noone) : Node(_x, _y, _group) constru outputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, []); static update = function(frame = PROJECT.animator.current_frame) { - var st = inputs[| 0].getValue(); - var ed = inputs[| 1].getValue(); - var step = inputs[| 2].getValue(); + var st = getInputData(0); + var ed = getInputData(1); + var step = getInputData(2); var arr = []; if((step > 0 && st <= ed) || (step < 0 && st >= ed)) { @@ -31,9 +31,9 @@ function Node_Array_Range(_x, _y, _group = noone) : Node(_x, _y, _group) constru static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { draw_set_text(f_p0, fa_center, fa_center, COLORS._main_text); - var str = inputs[| 0].getValue(); - var edd = inputs[| 1].getValue(); - var stp = inputs[| 2].getValue(); + var str = getInputData(0); + var edd = getInputData(1); + var stp = getInputData(2); var str = "[" + string(str) + ", " + string(str + stp) + ", ... ," + string(edd) + "]"; diff --git a/scripts/node_array_remove/node_array_remove.gml b/scripts/node_array_remove/node_array_remove.gml index 974147563..4289f5976 100644 --- a/scripts/node_array_remove/node_array_remove.gml +++ b/scripts/node_array_remove/node_array_remove.gml @@ -24,7 +24,7 @@ function Node_Array_Remove(_x, _y, _group = noone) : Node(_x, _y, _group) constr outputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, 0); static step = function() { - var type = inputs[| 1].getValue(); + var type = getInputData(1); inputs[| 2].setVisible(type == 0, type == 0); inputs[| 3].setVisible(type == 1, type == 1); @@ -43,13 +43,13 @@ function Node_Array_Remove(_x, _y, _group = noone) : Node(_x, _y, _group) constr } static update = function(frame = PROJECT.animator.current_frame) { - var _arr = inputs[| 0].getValue(); + var _arr = getInputData(0); if(!is_array(_arr)) return; - var type = inputs[| 1].getValue(); - var index = inputs[| 2].getValue(); - var value = inputs[| 3].getValue(); - var spred = inputs[| 4].getValue(); + var type = getInputData(1); + var index = getInputData(2); + var value = getInputData(3); + var spred = getInputData(4); _arr = array_clone(_arr); diff --git a/scripts/node_array_reverse/node_array_reverse.gml b/scripts/node_array_reverse/node_array_reverse.gml index 3352c6f68..bc367ef91 100644 --- a/scripts/node_array_reverse/node_array_reverse.gml +++ b/scripts/node_array_reverse/node_array_reverse.gml @@ -12,7 +12,7 @@ function Node_Array_Reverse(_x, _y, _group = noone) : Node(_x, _y, _group) const outputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, 0); static update = function(frame = PROJECT.animator.current_frame) { - var _arr = inputs[| 0].getValue(); + var _arr = getInputData(0); inputs[| 0].type = VALUE_TYPE.any; outputs[| 0].type = VALUE_TYPE.any; diff --git a/scripts/node_array_set/node_array_set.gml b/scripts/node_array_set/node_array_set.gml index c1369959d..8680cf51e 100644 --- a/scripts/node_array_set/node_array_set.gml +++ b/scripts/node_array_set/node_array_set.gml @@ -17,7 +17,7 @@ function Node_Array_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construct outputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, 0); static update = function(frame = PROJECT.animator.current_frame) { - var _arr = inputs[| 0].getValue(); + var _arr = getInputData(0); inputs[| 0].type = VALUE_TYPE.any; inputs[| 2].type = VALUE_TYPE.any; @@ -25,8 +25,8 @@ function Node_Array_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construct if(!is_array(_arr)) return; - var index = inputs[| 1].getValue(); - var value = inputs[| 2].getValue(); + var index = getInputData(1); + var value = getInputData(2); var _len = array_length(_arr); if(inputs[| 0].value_from != noone) { @@ -53,7 +53,7 @@ function Node_Array_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construct static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { draw_set_text(f_h3, fa_center, fa_center, COLORS._main_text); - var idx = inputs[| 1].getValue(); + var idx = getInputData(1); var str = string(idx); var bbox = drawGetBbox(xx, yy, _s); var ss = string_scale(str, bbox.w, bbox.h); diff --git a/scripts/node_array_shift/node_array_shift.gml b/scripts/node_array_shift/node_array_shift.gml index 5884e6355..00737bfd3 100644 --- a/scripts/node_array_shift/node_array_shift.gml +++ b/scripts/node_array_shift/node_array_shift.gml @@ -14,8 +14,8 @@ function Node_Array_Shift(_x, _y, _group = noone) : Node(_x, _y, _group) constru outputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, 0); static update = function(frame = PROJECT.animator.current_frame) { - var _arr = inputs[| 0].getValue(); - var _shf = inputs[| 1].getValue(); + var _arr = getInputData(0); + var _shf = getInputData(1); inputs[| 0].type = VALUE_TYPE.any; outputs[| 0].type = VALUE_TYPE.any; diff --git a/scripts/node_array_shuffle/node_array_shuffle.gml b/scripts/node_array_shuffle/node_array_shuffle.gml index a77f22ebc..4c0c31c68 100644 --- a/scripts/node_array_shuffle/node_array_shuffle.gml +++ b/scripts/node_array_shuffle/node_array_shuffle.gml @@ -13,8 +13,8 @@ function Node_Array_Shuffle(_x, _y, _group = noone) : Node(_x, _y, _group) const outputs[| 0] = nodeValue("Shuffled array", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, []); static update = function(frame = PROJECT.animator.current_frame) { - var arr = inputs[| 0].getValue(); - var sed = inputs[| 1].getValue(); + var arr = getInputData(0); + var sed = getInputData(1); inputs[| 0].type = VALUE_TYPE.any; outputs[| 0].type = VALUE_TYPE.any; diff --git a/scripts/node_array_sort/node_array_sort.gml b/scripts/node_array_sort/node_array_sort.gml index b57b292fb..06825e37b 100644 --- a/scripts/node_array_sort/node_array_sort.gml +++ b/scripts/node_array_sort/node_array_sort.gml @@ -19,8 +19,8 @@ function Node_Array_Sort(_x, _y, _group = noone) : Node(_x, _y, _group) construc static sortDes = function(v1, v2) { return v1[1] > v2[1]; } static update = function(frame = PROJECT.animator.current_frame) { - var arr = inputs[| 0].getValue(); - var asc = inputs[| 1].getValue(); + var arr = getInputData(0); + var asc = getInputData(1); inputs[| 0].type = VALUE_TYPE.any; outputs[| 0].type = VALUE_TYPE.any; diff --git a/scripts/node_array_zip/node_array_zip.gml b/scripts/node_array_zip/node_array_zip.gml index 7ff6537b7..322a5bf61 100644 --- a/scripts/node_array_zip/node_array_zip.gml +++ b/scripts/node_array_zip/node_array_zip.gml @@ -49,7 +49,7 @@ function Node_Array_Zip(_x, _y, _group = noone) : Node(_x, _y, _group) construct } static update = function(frame = PROJECT.animator.current_frame) { - var _arr = inputs[| 0].getValue(); + var _arr = getInputData(0); if(inputs[| 0].value_from == noone) { inputs[| 0].type = VALUE_TYPE.any; @@ -65,7 +65,7 @@ function Node_Array_Zip(_x, _y, _group = noone) : Node(_x, _y, _group) construct var len = 1; var val = []; for( var i = 0; i < ds_list_size(inputs) - 1; i += data_length ) { - val[i] = inputs[| i].getValue(); + val[i] = getInputData(i); inputs[| i].type = inputs[| i].value_from == noone? inputs[| i].value_from.type : VALUE_TYPE.any; if(!is_array(val[i])) { val[i] = [ val[i] ]; 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 5e53ef280..758be2980 100644 --- a/scripts/node_ase_file_read/node_ase_file_read.gml +++ b/scripts/node_ase_file_read/node_ase_file_read.gml @@ -30,10 +30,10 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const w = 128; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_load, ["*.ase, *.aseprite", ""]); + .setDisplay(VALUE_DISPLAY.path_load, { filter: "*.ase, *.aseprite" }); inputs[| 1] = nodeValue("Generate layers", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, 0) - .setDisplay(VALUE_DISPLAY.button, [ function() { refreshLayers(); }, "Generate"] ); + .setDisplay(VALUE_DISPLAY.button, { name: "Generate", onClick: function() { refreshLayers(); } }); inputs[| 2] = nodeValue("Current tag", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); @@ -88,7 +88,7 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const }); tag_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { - var current_tag = inputs[| 2].getValue(); + var current_tag = getInputData(2); var amo = array_length(tags); var abx = ui(24); var lb_h = line_get_height(f_p0); @@ -138,7 +138,7 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const if(_hover && point_in_rectangle(_m[0], _m[1], _x + 8, _yy, _x + _w - 8, _yy + hh)) { draw_sprite_stretched_ext(THEME.node_bg_name, 1, _x + 8, _yy, _w - 16, hh, c_white, 0.1); if(mouse_click(mb_left, _focus)) { - var _currTag = inputs[| 2].getValue(); + var _currTag = getInputData(2); var _tagName = tag[? "Name"]; inputs[| 2].setValue(_currTag == _tagName? "" : _tagName); } @@ -185,7 +185,7 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const var nh = (array_length(layers) - 1) / 2 * _nh; var ny = y - nh; - var use_cel = inputs[| 3].getValue(); + var use_cel = getInputData(3); var lvs = []; for( var i = 0, n = array_length(layers); i < n; i++ ) { @@ -287,7 +287,7 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; static onInspector1Update = function() { - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; updatePaths(path); update(); @@ -300,8 +300,8 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const } static update = function(frame = PROJECT.animator.current_frame) { - var path = inputs[| 0].getValue(); - var current_tag = inputs[| 2].getValue(); + var path = getInputData(0); + var current_tag = getInputData(2); if(path_current != path) updatePaths(path); if(ds_map_empty(content)) return; diff --git a/scripts/node_ase_layer/node_ase_layer.gml b/scripts/node_ase_layer/node_ase_layer.gml index d9390a526..4bc6f4106 100644 --- a/scripts/node_ase_layer/node_ase_layer.gml +++ b/scripts/node_ase_layer/node_ase_layer.gml @@ -20,7 +20,7 @@ function Node_ASE_layer(_x, _y, _group = noone) : Node(_x, _y, _group) construct } static findLayer = function() { - var data = inputs[| 0].getValue(); + var data = getInputData(0); if(data == noone) return; var layer_index = 0; @@ -35,7 +35,7 @@ function Node_ASE_layer(_x, _y, _group = noone) : Node(_x, _y, _group) construct } static update = function(frame = PROJECT.animator.current_frame) { - var data = inputs[| 0].getValue(); + var data = getInputData(0); if(data == noone) return; if(_name != display_name) { @@ -46,7 +46,7 @@ function Node_ASE_layer(_x, _y, _group = noone) : Node(_x, _y, _group) construct if(layer_object == noone) return; var cel = layer_object.getCel(PROJECT.animator.current_frame - data._tag_delay); - var celDim = inputs[| 1].getValue(); + var celDim = getInputData(1); var ww = data.content[? "Width"]; var hh = data.content[? "Height"]; var cw = cel? cel.data[? "Width"] : 1; diff --git a/scripts/node_atlas_draw/node_atlas_draw.gml b/scripts/node_atlas_draw/node_atlas_draw.gml index 074e319b4..159dd45fe 100644 --- a/scripts/node_atlas_draw/node_atlas_draw.gml +++ b/scripts/node_atlas_draw/node_atlas_draw.gml @@ -13,8 +13,8 @@ function Node_Atlas_Draw(_x, _y, _group = noone) : Node(_x, _y, _group) construc attribute_interpolation(true); static update = function(frame = PROJECT.animator.current_frame) { - var dim = inputs[| 0].getValue(); - var atl = inputs[| 1].getValue(); + var dim = getInputData(0); + var atl = getInputData(1); if(atl == noone) return; if(is_array(atl) && array_length(atl) == 0) return; diff --git a/scripts/node_atlas_get/node_atlas_get.gml b/scripts/node_atlas_get/node_atlas_get.gml index 475a85b81..8fbcbb286 100644 --- a/scripts/node_atlas_get/node_atlas_get.gml +++ b/scripts/node_atlas_get/node_atlas_get.gml @@ -26,7 +26,7 @@ function Node_Atlas_Get(_x, _y, _group = noone) : Node(_x, _y, _group) construct .setArrayDepth(1); static update = function(frame = PROJECT.animator.current_frame) { - var atl = inputs[| 0].getValue(); + var atl = getInputData(0); if(atl == noone) return; if(is_array(atl) && array_length(atl) == 0) return; diff --git a/scripts/node_atlas_set/node_atlas_set.gml b/scripts/node_atlas_set/node_atlas_set.gml index c4d2ef46f..ffe43f273 100644 --- a/scripts/node_atlas_set/node_atlas_set.gml +++ b/scripts/node_atlas_set/node_atlas_set.gml @@ -28,7 +28,7 @@ function Node_Atlas_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construct outputs[| 0] = nodeValue("Atlas", self, JUNCTION_CONNECT.output, VALUE_TYPE.atlas, noone); static update = function(frame = PROJECT.animator.current_frame) { - var atl = inputs[| 0].getValue(); + var atl = getInputData(0); if(atl == noone) return; if(is_array(atl) && array_length(atl) == 0) return; @@ -36,12 +36,12 @@ function Node_Atlas_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construct if(!is_array(atl)) atl = [ atl ]; - var surf = inputs[| 1].getValue(); - var posi = inputs[| 2].getValue(); - var rota = inputs[| 3].getValue(); - var scal = inputs[| 4].getValue(); - var blns = inputs[| 5].getValue(); - var alph = inputs[| 6].getValue(); + var surf = getInputData(1); + var posi = getInputData(2); + var rota = getInputData(3); + var scal = getInputData(4); + var blns = getInputData(5); + var alph = getInputData(6); var use = [ 0 ]; for( var i = 1; i < 7; i++ ) use[i] = inputs[| i].value_from != noone; diff --git a/scripts/node_audio_window/node_audio_window.gml b/scripts/node_audio_window/node_audio_window.gml index a71cafa94..73799ef64 100644 --- a/scripts/node_audio_window/node_audio_window.gml +++ b/scripts/node_audio_window/node_audio_window.gml @@ -18,13 +18,13 @@ function Node_Audio_Window(_x, _y, _group = noone) : Node(_x, _y, _group) constr .setArrayDepth(1); static update = function(frame = PROJECT.animator.current_frame) { - var _arr = inputs[| 0].getValue(); + var _arr = getInputData(0); if(!is_array(_arr) || array_length(_arr) < 1) return; if(!is_array(_arr[0])) return; - var sam = inputs[| 1].getValue(); - var siz = inputs[| 2].getValue(); + var sam = getInputData(1); + var siz = getInputData(2); var res = []; var off = frame / PROJECT.animator.framerate * sam; diff --git a/scripts/node_average/node_average.gml b/scripts/node_average/node_average.gml index 8671ea9d1..33689dea2 100644 --- a/scripts/node_average/node_average.gml +++ b/scripts/node_average/node_average.gml @@ -9,7 +9,7 @@ function Node_Average(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 2] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 3] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 3; diff --git a/scripts/node_bevel/node_bevel.gml b/scripts/node_bevel/node_bevel.gml index 0c9b9dd1a..0111da10a 100644 --- a/scripts/node_bevel/node_bevel.gml +++ b/scripts/node_bevel/node_bevel.gml @@ -24,7 +24,7 @@ function Node_Bevel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 7; diff --git a/scripts/node_blend/node_blend.gml b/scripts/node_blend/node_blend.gml index 016184a73..1b4850ee9 100644 --- a/scripts/node_blend/node_blend.gml +++ b/scripts/node_blend/node_blend.gml @@ -13,7 +13,7 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con .setDisplay(VALUE_DISPLAY.enum_scroll, BLEND_TYPES ); inputs[| 3] = nodeValue("Opacity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); diff --git a/scripts/node_blinker/node_blinker.gml b/scripts/node_blinker/node_blinker.gml index 531639c6d..e520e4c3a 100644 --- a/scripts/node_blinker/node_blinker.gml +++ b/scripts/node_blinker/node_blinker.gml @@ -8,7 +8,7 @@ function Node_Blinker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, irandom_range( 100000, 999999 )) inputs[| 3] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 4] = nodeValue("Target Colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, DEF_PALETTE ) .setDisplay(VALUE_DISPLAY.palette); diff --git a/scripts/node_bloom/node_bloom.gml b/scripts/node_bloom/node_bloom.gml index 6843251e9..ed7225721 100644 --- a/scripts/node_bloom/node_bloom.gml +++ b/scripts/node_bloom/node_bloom.gml @@ -10,20 +10,20 @@ function Node_Bloom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 1] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3, "Bloom blur radius.") - .setDisplay(VALUE_DISPLAY.slider, [1, 32, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 1] }); inputs[| 2] = nodeValue("Tolerance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5, "How bright a pixel should be to start blooming.") - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 3] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, .25, "Blend intensity.") - .setDisplay(VALUE_DISPLAY.slider, [ 0, 2, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] }); inputs[| 4] = nodeValue("Bloom mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 7; diff --git a/scripts/node_blur/node_blur.gml b/scripts/node_blur/node_blur.gml index 80498d441..a64557341 100644 --- a/scripts/node_blur/node_blur.gml +++ b/scripts/node_blur/node_blur.gml @@ -3,7 +3,7 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 1] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3) - .setDisplay(VALUE_DISPLAY.slider, [1, 32, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 1] }); inputs[| 2] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]); @@ -15,7 +15,7 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 7; diff --git a/scripts/node_blur_bokeh/node_blur_bokeh.gml b/scripts/node_blur_bokeh/node_blur_bokeh.gml index 79a9f7ebb..897b17b6d 100644 --- a/scripts/node_blur_bokeh/node_blur_bokeh.gml +++ b/scripts/node_blur_bokeh/node_blur_bokeh.gml @@ -8,12 +8,12 @@ function Node_Blur_Bokeh(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 1] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2) - .setDisplay(VALUE_DISPLAY.slider, [0, 16, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.01] }); inputs[| 2] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 3] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 4] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 4; diff --git a/scripts/node_blur_contrast/node_blur_contrast.gml b/scripts/node_blur_contrast/node_blur_contrast.gml index 9a1cc65ef..85d878a87 100644 --- a/scripts/node_blur_contrast/node_blur_contrast.gml +++ b/scripts/node_blur_contrast/node_blur_contrast.gml @@ -10,15 +10,15 @@ function Node_Blur_Contrast(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 1] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3) - .setDisplay(VALUE_DISPLAY.slider, [1, 32, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 1] }); inputs[| 2] = nodeValue("Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2, "Brightness different to be blur together.") - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 5; diff --git a/scripts/node_blur_directional/node_blur_directional.gml b/scripts/node_blur_directional/node_blur_directional.gml index 7194df869..f0eb54f64 100644 --- a/scripts/node_blur_directional/node_blur_directional.gml +++ b/scripts/node_blur_directional/node_blur_directional.gml @@ -4,7 +4,7 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y, inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 1] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2) - .setDisplay(VALUE_DISPLAY.slider, [0, 0.1, 0.001]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.1, 0.001] }); inputs[| 2] = nodeValue("Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.rotation); @@ -12,7 +12,7 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y, inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 5; diff --git a/scripts/node_blur_radial/node_blur_radial.gml b/scripts/node_blur_radial/node_blur_radial.gml index 3b585d9ef..6492fbcbd 100644 --- a/scripts/node_blur_radial/node_blur_radial.gml +++ b/scripts/node_blur_radial/node_blur_radial.gml @@ -16,7 +16,7 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 5] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 6] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 6; @@ -33,7 +33,7 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_interpolation(); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var pos = inputs[| 2].getValue(); + var pos = getInputData(2); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; diff --git a/scripts/node_blur_simple/node_blur_simple.gml b/scripts/node_blur_simple/node_blur_simple.gml index dec14a0b7..d0d28cc47 100644 --- a/scripts/node_blur_simple/node_blur_simple.gml +++ b/scripts/node_blur_simple/node_blur_simple.gml @@ -13,7 +13,7 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 1] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3) - .setDisplay(VALUE_DISPLAY.slider, [1, 32, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 1] }); inputs[| 2] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]); @@ -27,7 +27,7 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 6] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 7] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 8] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 8; diff --git a/scripts/node_blur_zoom/node_blur_zoom.gml b/scripts/node_blur_zoom/node_blur_zoom.gml index 198c80ec7..078c4ae21 100644 --- a/scripts/node_blur_zoom/node_blur_zoom.gml +++ b/scripts/node_blur_zoom/node_blur_zoom.gml @@ -20,7 +20,7 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 6] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 7] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 8] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 8; @@ -36,7 +36,7 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_oversample(); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var pos = inputs[| 2].getValue(); + var pos = getInputData(2); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; diff --git a/scripts/node_boolean/node_boolean.gml b/scripts/node_boolean/node_boolean.gml index 067b29f6c..b7f8eaeb4 100644 --- a/scripts/node_boolean/node_boolean.gml +++ b/scripts/node_boolean/node_boolean.gml @@ -8,7 +8,7 @@ function Node_Boolean(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c hover_state = 0; hover_state_to = 0; - wd_checkBox = new checkBox( function() { inputs[| 0].setValue(!inputs[| 0].getValue()); } ); + wd_checkBox = new checkBox( function() { inputs[| 0].setValue(!getInputData(0)); } ); wd_checkBox.spr = THEME.node_checkbox; inputs[| 0] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) @@ -30,7 +30,7 @@ function Node_Boolean(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c } static pointIn = function(_x, _y, _mx, _my, _s) { - var align = inputs[| 2].getValue(); + var align = getInputData(2); var xx = x * _s + _x; var yy = (y - (!align * 20)) * _s + _y; @@ -43,7 +43,7 @@ function Node_Boolean(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c static drawNodeBase = function(xx, yy, _s) { if(!active) return; - var hid = inputs[| 1].getValue(); + var hid = getInputData(1); if(hid) { hover_state = lerp_float(hover_state, hover_state_to, 3); @@ -63,8 +63,8 @@ function Node_Boolean(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c var _name = display_name == ""? name : display_name; if(_name == "") return; - var hid = inputs[| 1].getValue(); - var align = inputs[| 2].getValue(); + var hid = getInputData(1); + var align = getInputData(2); if(align == 0) { draw_set_text(f_p2, fa_center, fa_bottom, COLORS._main_text); @@ -79,7 +79,7 @@ function Node_Boolean(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text); - var val = inputs[| 0].getValue(); + var val = getInputData(0); var bbox = drawGetBbox(xx, yy, _s); wd_checkBox.setFocusHover(_focus, _hover); diff --git a/scripts/node_bw/node_bw.gml b/scripts/node_bw/node_bw.gml index e57772ddf..268eb5432 100644 --- a/scripts/node_bw/node_bw.gml +++ b/scripts/node_bw/node_bw.gml @@ -8,15 +8,15 @@ function Node_BW(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 1] = nodeValue("Brightness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [ -1, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01] }); inputs[| 2] = nodeValue("Contrast", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [ -1, 4, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 4, 0.01] }); inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 5; diff --git a/scripts/node_cache/node_cache.gml b/scripts/node_cache/node_cache.gml index 543508d98..95d700ccc 100644 --- a/scripts/node_cache/node_cache.gml +++ b/scripts/node_cache/node_cache.gml @@ -37,7 +37,7 @@ function Node_Cache(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { if(recoverCache()) return; if(!inputs[| 0].value_from) return; - var _surf = inputs[| 0].getValue(); + var _surf = getInputData(0); cacheCurrentFrame(_surf); } diff --git a/scripts/node_cache_array/node_cache_array.gml b/scripts/node_cache_array/node_cache_array.gml index 40d4b3fc3..a26981546 100644 --- a/scripts/node_cache_array/node_cache_array.gml +++ b/scripts/node_cache_array/node_cache_array.gml @@ -44,9 +44,9 @@ function Node_Cache_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constru static update = function() { var ss = []; - var str = inputs[| 1].getValue(); - var lst = inputs[| 2].getValue(); - var stp = inputs[| 3].getValue(); + var str = getInputData(1); + var lst = getInputData(2); + var stp = getInputData(3); if(str < 0) str = 1; if(lst < 0) lst = PROJECT.animator.frames_total; @@ -67,7 +67,7 @@ function Node_Cache_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constru if(!PROJECT.animator.is_playing) return; if(!inputs[| 0].value_from) return; - var _surf = inputs[| 0].getValue(); + var _surf = getInputData(0); cacheCurrentFrame(_surf); } diff --git a/scripts/node_camera/node_camera.gml b/scripts/node_camera/node_camera.gml index 0401d8e0f..734acc6ab 100644 --- a/scripts/node_camera/node_camera.gml +++ b/scripts/node_camera/node_camera.gml @@ -3,11 +3,13 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co preview_alpha = 0.5; inputs[| 0] = nodeValue("Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + + onSurfaceSize = function() { return getInputData(0, DEF_SURF); }; inputs[| 1] = nodeValue("Focus area", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0, 0, 16, 16, AREA_SHAPE.rectangle ]) - .setDisplay(VALUE_DISPLAY.area, function() { return getDimension(0); }); + .setDisplay(VALUE_DISPLAY.area, { onSurfaceSize }); inputs[| 2] = nodeValue("Zoom", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [ 0.01, 4, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0.01, 4, 0.01 ] }); inputs[| 3] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Repeat", "Repeat X", "Repeat Y" ]); @@ -93,7 +95,7 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co refreshDynamicInput(); } - static getPreviewValues = function() { return inputs[| 0].getValue(); } + static getPreviewValues = function() { return getInputData(0); } static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { if(array_length(current_data) == 0) return; diff --git a/scripts/node_canvas/node_canvas.gml b/scripts/node_canvas/node_canvas.gml index 2296d6407..1312cb0f7 100644 --- a/scripts/node_canvas/node_canvas.gml +++ b/scripts/node_canvas/node_canvas.gml @@ -8,10 +8,10 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor inputs[| 1] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white ); inputs[| 2] = nodeValue("Brush size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1 ) - .setDisplay(VALUE_DISPLAY.slider, [1, 32, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 1] }); inputs[| 3] = nodeValue("Fill threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 4] = nodeValue("Fill type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, ["4 connect", "8 connect", "Entire canvas"]); @@ -26,12 +26,12 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor inputs[| 8] = nodeValue("Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, -1); inputs[| 9] = nodeValue("Background alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1.) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 10] = nodeValue("Render background", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 11] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1 ) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); @@ -101,7 +101,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } function apply_surface() { - var _dim = inputs[| 0].getValue(); + var _dim = getInputData(0); var cDep = attrDepth(); if(!is_surface(canvas_surface)) { @@ -129,7 +129,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } function apply_draw_surface() { - var _alp = inputs[| 11].getValue(); + var _alp = getInputData(11); storeAction(); @@ -285,7 +285,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } #endregion function flood_fill_scanline(_x, _y, _surf, _thres, _corner = false) { #region - var _alp = inputs[| 11].getValue(); + var _alp = getInputData(11); var colorFill = draw_get_color() + (255 << 24); var colorBase = get_color_buffer(_x, _y); @@ -375,7 +375,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } #endregion function canvas_fill(_x, _y, _surf, _thres) { #region - var _alp = inputs[| 11].getValue(); + var _alp = getInputData(11); var w = surface_get_width_safe(_surf); var h = surface_get_height_safe(_surf); @@ -412,13 +412,13 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor mouse_cur_x = round((_mx - _x) / _s - 0.5); mouse_cur_y = round((_my - _y) / _s - 0.5); - var _dim = inputs[| 0].getValue(); - var _col = inputs[| 1].getValue(); - var _siz = inputs[| 2].getValue(); - var _thr = inputs[| 3].getValue(); - var _fill_type = inputs[| 4].getValue(); - var _prev = inputs[| 5].getValue(); - var _brush = inputs[| 6].getValue(); + var _dim = getInputData(0); + var _col = getInputData(1); + var _siz = getInputData(2); + var _thr = getInputData(3); + var _fill_type = getInputData(4); + var _prev = getInputData(5); + var _brush = getInputData(6); if(key_mod_press(ALT)) return; @@ -674,10 +674,10 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor gpu_set_colorwriteenable(true, true, true, true); #region preview - var _bg = inputs[| 8].getValue(); - var _bga = inputs[| 9].getValue(); - var _bgr = inputs[| 10].getValue(); - var _alp = inputs[| 11].getValue(); + var _bg = getInputData(8); + var _bga = getInputData(9); + var _bgr = getInputData(10); + var _alp = getInputData(11); var __s = surface_get_target(); @@ -761,10 +761,10 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } static update = function(frame = PROJECT.animator.current_frame) { - var _dim = inputs[| 0].getValue(); - var _bg = inputs[| 8].getValue(); - var _bga = inputs[| 9].getValue(); - var _bgr = inputs[| 10].getValue(); + var _dim = getInputData(0); + var _bg = getInputData(8); + var _bga = getInputData(9); + var _bgr = getInputData(10); var cDep = attrDepth(); apply_surface(); @@ -794,7 +794,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var buff = buffer_base64_decode(load_map.surface); canvas_buffer = buffer_decompress(buff); - var _dim = inputs[| 0].getValue(); + var _dim = getInputData(0); var _outSurf = outputs[| 0].getValue(); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); canvas_surface = surface_create_from_buffer(_dim[0], _dim[1], canvas_buffer); diff --git a/scripts/node_checkerboard/node_checkerboard.gml b/scripts/node_checkerboard/node_checkerboard.gml index 734bdb0ee..28cfa0040 100644 --- a/scripts/node_checkerboard/node_checkerboard.gml +++ b/scripts/node_checkerboard/node_checkerboard.gml @@ -14,7 +14,7 @@ function Node_Checker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c .setDisplay(VALUE_DISPLAY.vector); inputs[| 1] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 2) - .setDisplay(VALUE_DISPLAY.slider, [1, 16, 0.1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); inputs[| 2] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.rotation); @@ -37,7 +37,7 @@ function Node_Checker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c attribute_surface_depth(); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var pos = inputs[| 3].getValue(); + var pos = getInputData(3); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; diff --git a/scripts/node_chromatic_aberration/node_chromatic_aberration.gml b/scripts/node_chromatic_aberration/node_chromatic_aberration.gml index efcf30d7d..cc5cc006f 100644 --- a/scripts/node_chromatic_aberration/node_chromatic_aberration.gml +++ b/scripts/node_chromatic_aberration/node_chromatic_aberration.gml @@ -13,7 +13,7 @@ function Node_Chromatic_Aberration(_x, _y, _group = noone) : Node_Processor(_x, .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); inputs[| 2] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [-16, 16, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-16, 16, 0.01] }); inputs[| 3] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 3; @@ -24,7 +24,7 @@ function Node_Chromatic_Aberration(_x, _y, _group = noone) : Node_Processor(_x, attribute_interpolation(); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var pos = inputs[| 1].getValue(); + var pos = getInputData(1); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; diff --git a/scripts/node_collection/node_collection.gml b/scripts/node_collection/node_collection.gml index afcf76a46..7460b4ef4 100644 --- a/scripts/node_collection/node_collection.gml +++ b/scripts/node_collection/node_collection.gml @@ -133,7 +133,7 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc if(!draw_input_overlay) return; for(var i = custom_input_index; i < ds_list_size(inputs); i++) { var _in = inputs[| i]; - var _show = _in.from.inputs[| 6].getValue(); + var _show = _in.from.getInputData(6); if(!_show) continue; _in.drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); diff --git a/scripts/node_color/node_color.gml b/scripts/node_color/node_color.gml index 1c834288a..1a96e7739 100644 --- a/scripts/node_color/node_color.gml +++ b/scripts/node_color/node_color.gml @@ -15,7 +15,7 @@ function Node_Color(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con var bbox = drawGetBbox(xx, yy, _s); if(bbox.h < 1) return; - var col = inputs[| 0].getValue(); + var col = getInputData(0); if(is_array(col)) { drawPalette(col, bbox.x0, bbox.y0, bbox.w, bbox.h); diff --git a/scripts/node_color_adjustment/node_color_adjustment.gml b/scripts/node_color_adjustment/node_color_adjustment.gml index b549fb424..94f2f5f2a 100644 --- a/scripts/node_color_adjustment/node_color_adjustment.gml +++ b/scripts/node_color_adjustment/node_color_adjustment.gml @@ -19,32 +19,32 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 1] = nodeValue("Brightness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [ -1, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); inputs[| 2] = nodeValue("Contrast", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 3] = nodeValue("Hue", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [ -1, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); inputs[| 4] = nodeValue("Saturation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [ -1, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); inputs[| 5] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [ -1, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); inputs[| 6] = nodeValue("Blend", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); inputs[| 7] = nodeValue("Blend alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 8] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 9] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 10] = nodeValue("Exposure", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 4, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] }); inputs[| 11] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 11; @@ -72,7 +72,7 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro attribute_surface_depth(); static step = function() { - var type = inputs[| 12].getValue(); + var type = getInputData(12); inputs[| 0].setVisible(type == 0, type == 0); inputs[| 8].setVisible(type == 0, type == 0); @@ -170,7 +170,7 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro } #endregion static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region - var type = inputs[| 12].getValue(); + var type = getInputData(12); if(type == 0) return; var bbox = drawGetBbox(xx, yy, _s); diff --git a/scripts/node_color_from_hsv/node_color_from_hsv.gml b/scripts/node_color_from_hsv/node_color_from_hsv.gml index f087bd55c..cb1c937c2 100644 --- a/scripts/node_color_from_hsv/node_color_from_hsv.gml +++ b/scripts/node_color_from_hsv/node_color_from_hsv.gml @@ -5,15 +5,15 @@ function Node_Color_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) w = 96; inputs[| 0] = nodeValue("Hue", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]) + .setDisplay(VALUE_DISPLAY.slider) .setVisible(true, true); inputs[| 1] = nodeValue("Saturation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]) + .setDisplay(VALUE_DISPLAY.slider) .setVisible(true, true); inputs[| 2] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]) + .setDisplay(VALUE_DISPLAY.slider) .setVisible(true, true); inputs[| 3] = nodeValue("Normalized", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, 1); @@ -34,26 +34,26 @@ function Node_Color_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static onValueUpdate = function(index = 0) { if(index == 3) { - var _nor = inputs[| 3].getValue(); + var _nor = getInputData(3); if(_nor) { inputs[| 0].type = VALUE_TYPE.integer; - inputs[| 0].setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + inputs[| 0].setDisplay(VALUE_DISPLAY.slider); inputs[| 1].type = VALUE_TYPE.integer; - inputs[| 1].setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + inputs[| 1].setDisplay(VALUE_DISPLAY.slider); inputs[| 2].type = VALUE_TYPE.integer; - inputs[| 2].setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + inputs[| 2].setDisplay(VALUE_DISPLAY.slider); } else { inputs[| 0].type = VALUE_TYPE.integer; - inputs[| 0].setDisplay(VALUE_DISPLAY.slider, [0, 360, 1]); + inputs[| 0].setDisplay(VALUE_DISPLAY.slider, { range: [0, 360, 1] }); inputs[| 1].type = VALUE_TYPE.integer; - inputs[| 1].setDisplay(VALUE_DISPLAY.slider, [0, 255, 1]); + inputs[| 1].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 1] }); inputs[| 2].type = VALUE_TYPE.integer; - inputs[| 2].setDisplay(VALUE_DISPLAY.slider, [0, 255, 1]); + inputs[| 2].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 1] }); } } } diff --git a/scripts/node_color_from_rgb/node_color_from_rgb.gml b/scripts/node_color_from_rgb/node_color_from_rgb.gml index ca012f5b9..ebfd80751 100644 --- a/scripts/node_color_from_rgb/node_color_from_rgb.gml +++ b/scripts/node_color_from_rgb/node_color_from_rgb.gml @@ -5,15 +5,15 @@ function Node_Color_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) w = 96; inputs[| 0] = nodeValue("Red", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]) + .setDisplay(VALUE_DISPLAY.slider) .setVisible(true, true); inputs[| 1] = nodeValue("Green", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]) + .setDisplay(VALUE_DISPLAY.slider) .setVisible(true, true); inputs[| 2] = nodeValue("Blue", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]) + .setDisplay(VALUE_DISPLAY.slider) .setVisible(true, true); inputs[| 3] = nodeValue("Normalized", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, 1); @@ -24,26 +24,26 @@ function Node_Color_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static onValueUpdate = function(index = 0) { if(index == 3) { - var _nor = inputs[| 3].getValue(); + var _nor = getInputData(3); if(_nor) { inputs[| 0].type = VALUE_TYPE.float; - inputs[| 0].setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + inputs[| 0].setDisplay(VALUE_DISPLAY.slider); inputs[| 1].type = VALUE_TYPE.float; - inputs[| 1].setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + inputs[| 1].setDisplay(VALUE_DISPLAY.slider); inputs[| 2].type = VALUE_TYPE.float; - inputs[| 2].setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + inputs[| 2].setDisplay(VALUE_DISPLAY.slider); } else { inputs[| 0].type = VALUE_TYPE.integer; - inputs[| 0].setDisplay(VALUE_DISPLAY.slider, [0, 255, 1]); + inputs[| 0].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 1] }); inputs[| 1].type = VALUE_TYPE.integer; - inputs[| 1].setDisplay(VALUE_DISPLAY.slider, [0, 255, 1]); + inputs[| 1].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 1] }); inputs[| 2].type = VALUE_TYPE.integer; - inputs[| 2].setDisplay(VALUE_DISPLAY.slider, [0, 255, 1]); + inputs[| 2].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 1] }); } } } diff --git a/scripts/node_color_mix/node_color_mix.gml b/scripts/node_color_mix/node_color_mix.gml index c73e9e338..ec3b00baa 100644 --- a/scripts/node_color_mix/node_color_mix.gml +++ b/scripts/node_color_mix/node_color_mix.gml @@ -9,7 +9,7 @@ function Node_Color_Mix(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 1] = nodeValue("Color to", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); inputs[| 2] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 3] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_button, [ "RGB", "HSV" ]); diff --git a/scripts/node_color_palette_replacement/node_color_palette_replacement.gml b/scripts/node_color_palette_replacement/node_color_palette_replacement.gml index 0482e3223..d7c6f31a4 100644 --- a/scripts/node_color_palette_replacement/node_color_palette_replacement.gml +++ b/scripts/node_color_palette_replacement/node_color_palette_replacement.gml @@ -21,7 +21,7 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr .setDisplay(VALUE_DISPLAY.palette); inputs[| 3] = nodeValue("Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 4] = nodeValue("Set others to black", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Set pixel that doesn't match any color in 'palette from' to black."); @@ -32,7 +32,7 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 7] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 8] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 9] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 9; diff --git a/scripts/node_color_remove/node_color_remove.gml b/scripts/node_color_remove/node_color_remove.gml index 54d6e873c..745e4bbcf 100644 --- a/scripts/node_color_remove/node_color_remove.gml +++ b/scripts/node_color_remove/node_color_remove.gml @@ -14,12 +14,12 @@ function Node_Color_Remove(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro .setDisplay(VALUE_DISPLAY.palette); inputs[| 2] = nodeValue("Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 5; diff --git a/scripts/node_color_replacement/node_color_replacement.gml b/scripts/node_color_replacement/node_color_replacement.gml index 3f504e097..5d1057e60 100644 --- a/scripts/node_color_replacement/node_color_replacement.gml +++ b/scripts/node_color_replacement/node_color_replacement.gml @@ -10,12 +10,12 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g .setVisible(false, false); inputs[| 3] = nodeValue("Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 5] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 6] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 6; @@ -23,7 +23,7 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g selecting_index = 0; function setColor(colr) { #region - var _to = inputs[| 2].getValue(); + var _to = getInputData(2); _to[selecting_index] = colr; inputs[| 2].setValue(_to); // Not necessary due to array reference @@ -48,8 +48,8 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover,, THEME.junc_visible, vis) == 2) jun.visible = !vis; - var _from = inputs[| 1].getValue(); - var _to = inputs[| 2].getValue(); + var _from = getInputData(1); + var _to = getInputData(2); var ss = TEXTBOX_HEIGHT; var amo = array_length(_from); diff --git a/scripts/node_color_sampler/node_color_sampler.gml b/scripts/node_color_sampler/node_color_sampler.gml index b3d14c8e7..3d9ac908f 100644 --- a/scripts/node_color_sampler/node_color_sampler.gml +++ b/scripts/node_color_sampler/node_color_sampler.gml @@ -9,11 +9,11 @@ function Node_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c .setUnitRef(function(index) { return getDimension(index); }); inputs[| 2] = nodeValue("Sampling size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1, "Size of square around the position to sample and average pixel color.") - .setDisplay(VALUE_DISPLAY.slider, [1, 3, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 3, 1] }); outputs[| 0] = nodeValue("Color", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, c_white); - static getPreviewValues = function() { return inputs[| 0].getValue(); } + static getPreviewValues = function() { return getInputData(0); } static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); diff --git a/scripts/node_colorize/node_colorize.gml b/scripts/node_colorize/node_colorize.gml index 332e51346..af575c59a 100644 --- a/scripts/node_colorize/node_colorize.gml +++ b/scripts/node_colorize/node_colorize.gml @@ -14,12 +14,12 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 1] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject([ c_black, c_white ]) ); inputs[| 2] = nodeValue("Gradient shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [ -1, 1, .01 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, .01 ] }); inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 5; diff --git a/scripts/node_compare/node_compare.gml b/scripts/node_compare/node_compare.gml index a990736b1..217352402 100644 --- a/scripts/node_compare/node_compare.gml +++ b/scripts/node_compare/node_compare.gml @@ -55,9 +55,9 @@ function Node_Compare(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } static update = function(frame = PROJECT.animator.current_frame) { - var mode = inputs[| 0].getValue(); - var a = inputs[| 1].getValue(); - var b = inputs[| 2].getValue(); + var mode = getInputData(0); + var a = getInputData(1); + var b = getInputData(2); var as = is_array(a); var bs = is_array(b); @@ -84,7 +84,7 @@ function Node_Compare(_x, _y, _group = noone) : Node(_x, _y, _group) constructor static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { draw_set_text(f_h3, fa_center, fa_center, COLORS._main_text); var str = ""; - switch(inputs[| 0].getValue()) { + switch(getInputData(0)) { case COMPARE_OPERATOR.equal : str = "="; break; case COMPARE_OPERATOR.nonEqual : str = "!="; break; diff --git a/scripts/node_composite/node_composite.gml b/scripts/node_composite/node_composite.gml index b6c830e0e..f7b2f3a42 100644 --- a/scripts/node_composite/node_composite.gml +++ b/scripts/node_composite/node_composite.gml @@ -458,7 +458,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } #endregion static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var pad = inputs[| 0].getValue(); + var pad = getInputData(0); var ww = overlay_w; var hh = overlay_h; @@ -544,8 +544,8 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) if(inputs[| input_dragging].setValue(sa)) UNDO_HOLDING = true; } else if(drag_type == NODE_COMPOSE_DRAG.scale) { - var _surf = inputs[| surf_dragging + 0].getValue(); - var _rot = inputs[| surf_dragging + 2].getValue(); + var _surf = getInputData(surf_dragging + 0); + var _rot = getInputData(surf_dragging + 2); var _sw = surface_get_width_safe(_surf); var _sh = surface_get_height_safe(_surf); diff --git a/scripts/node_condition/node_condition.gml b/scripts/node_condition/node_condition.gml index ad0cf0bae..aed3b8fef 100644 --- a/scripts/node_condition/node_condition.gml +++ b/scripts/node_condition/node_condition.gml @@ -41,7 +41,7 @@ function Node_Condition(_x, _y, _group = noone) : Node(_x, _y, _group) construct outputs[| 1] = nodeValue("Bool", self, JUNCTION_CONNECT.output, VALUE_TYPE.boolean, false); static step = function() { - var _mode = inputs[| 5].getValue(); + var _mode = getInputData(5); inputs[| 0].setVisible(_mode == 1, _mode == 1); inputs[| 1].setVisible(_mode == 1); @@ -52,17 +52,17 @@ function Node_Condition(_x, _y, _group = noone) : Node(_x, _y, _group) construct } static update = function(frame = PROJECT.animator.current_frame) { - var _true = inputs[| 3].getValue(); - var _fals = inputs[| 4].getValue(); + var _true = getInputData(3); + var _fals = getInputData(4); - var _mode = inputs[| 5].getValue(); + var _mode = getInputData(5); - var _chck = inputs[| 0].getValue(); - var _cond = inputs[| 1].getValue(); - var _valu = inputs[| 2].getValue(); - var _bool = inputs[| 6].getValue(); - var _txt1 = inputs[| 7].getValue(); - var _txt2 = inputs[| 8].getValue(); + var _chck = getInputData(0); + var _cond = getInputData(1); + var _valu = getInputData(2); + var _bool = getInputData(6); + var _txt1 = getInputData(7); + var _txt2 = getInputData(8); inputs[| 3].type = inputs[| 3].value_from == noone? VALUE_TYPE.any : inputs[| 3].value_from.type; inputs[| 4].type = inputs[| 4].value_from == noone? VALUE_TYPE.any : inputs[| 4].value_from.type; diff --git a/scripts/node_convolution/node_convolution.gml b/scripts/node_convolution/node_convolution.gml index e1dd8a876..ae4c6656f 100644 --- a/scripts/node_convolution/node_convolution.gml +++ b/scripts/node_convolution/node_convolution.gml @@ -9,7 +9,7 @@ function Node_Convolution(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 1] = nodeValue("Kernel", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, array_create(9)) - .setDisplay(VALUE_DISPLAY.matrix, 3); + .setDisplay(VALUE_DISPLAY.matrix, { size: 3 }); inputs[| 2] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]); @@ -17,7 +17,7 @@ function Node_Convolution(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 5; diff --git a/scripts/node_corner/node_corner.gml b/scripts/node_corner/node_corner.gml index 21e0c3e54..f69616057 100644 --- a/scripts/node_corner/node_corner.gml +++ b/scripts/node_corner/node_corner.gml @@ -10,12 +10,12 @@ function Node_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 1] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 2) - .setDisplay(VALUE_DISPLAY.slider, [2, 16, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 1] }); inputs[| 2] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 3] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 4] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 4; diff --git a/scripts/node_counter/node_counter.gml b/scripts/node_counter/node_counter.gml index 049819189..f741f3887 100644 --- a/scripts/node_counter/node_counter.gml +++ b/scripts/node_counter/node_counter.gml @@ -22,7 +22,7 @@ function Node_Counter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c ]; static step = function() { - var mode = inputs[| 2].getValue(); + var mode = getInputData(2); inputs[| 0].setVisible(mode == 0); } diff --git a/scripts/node_crop/node_crop.gml b/scripts/node_crop/node_crop.gml index dfa5fea93..3e90ff55c 100644 --- a/scripts/node_crop/node_crop.gml +++ b/scripts/node_crop/node_crop.gml @@ -24,7 +24,7 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons drag_my = 0; drag_sv = 0; - static getPreviewValues = function() { return inputs[| 0].getValue(); } + static getPreviewValues = function() { return getInputData(0); } static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { if(array_length(current_data) < 2) return; diff --git a/scripts/node_crop_content/node_crop_content.gml b/scripts/node_crop_content/node_crop_content.gml index a26687c39..834e980a4 100644 --- a/scripts/node_crop_content/node_crop_content.gml +++ b/scripts/node_crop_content/node_crop_content.gml @@ -28,10 +28,10 @@ function Node_Crop_Content(_x, _y, _group = noone) : Node(_x, _y, _group) constr temp_surface = [ surface_create(1, 1, surface_r32float) ]; static update = function() { - var _inSurf = inputs[| 0].getValue(); - var _active = inputs[| 1].getValue(); - var _array = inputs[| 2].getValue(); - var _padd = inputs[| 3].getValue(); + var _inSurf = getInputData(0); + var _active = getInputData(1); + var _array = getInputData(2); + var _padd = getInputData(3); var _outSurf = outputs[| 0].getValue(); surface_array_free(_outSurf); diff --git a/scripts/node_csv_file_read/node_csv_file_read.gml b/scripts/node_csv_file_read/node_csv_file_read.gml index 4816d527b..f3ff5e196 100644 --- a/scripts/node_csv_file_read/node_csv_file_read.gml +++ b/scripts/node_csv_file_read/node_csv_file_read.gml @@ -31,7 +31,7 @@ function Node_CSV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const w = 128; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_load, ["*.csv", ""]) + .setDisplay(VALUE_DISPLAY.path_load, { filter: "*.csv" }) .rejectArray(); inputs[| 1] = nodeValue("Convert to number", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) @@ -69,7 +69,7 @@ function Node_CSV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const content = file_text_read_all_lines(path); - var convert = inputs[| 1].getValue(); + var convert = getInputData(1); outputs[| 0].type = convert? VALUE_TYPE.float : VALUE_TYPE.text; if(convert) { for( var i = 0, n = array_length(content); i < n; i++ ) { @@ -94,14 +94,14 @@ function Node_CSV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; static onInspector1Update = function() { - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; updatePaths(path); update(); } static update = function(frame = PROJECT.animator.current_frame) { - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; if(path_current != path) updatePaths(path); diff --git a/scripts/node_csv_file_write/node_csv_file_write.gml b/scripts/node_csv_file_write/node_csv_file_write.gml index 4e46d1da7..01f6154b1 100644 --- a/scripts/node_csv_file_write/node_csv_file_write.gml +++ b/scripts/node_csv_file_write/node_csv_file_write.gml @@ -16,19 +16,19 @@ function Node_CSV_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) cons w = 128; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_save, ["*.csv", ""]) + .setDisplay(VALUE_DISPLAY.path_save, { filter: "*.csv" }) .rejectArray(); inputs[| 1] = nodeValue("Content", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, "") .setDisplay(true, true); static writeFile = function() { - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; if(filename_ext(path) != ".csv") path += ".csv"; - var _val = inputs[| 1].getValue(); + var _val = getInputData(1); var str = ""; if(is_array(_val)) { @@ -54,7 +54,7 @@ function Node_CSV_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) cons static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); - var str = filename_name(inputs[| 0].getValue()); + var str = filename_name(getInputData(0)); if(filename_ext(str) != ".csv") str += ".csv"; diff --git a/scripts/node_curve/node_curve.gml b/scripts/node_curve/node_curve.gml index 7a22f9958..1a1fdec14 100644 --- a/scripts/node_curve/node_curve.gml +++ b/scripts/node_curve/node_curve.gml @@ -27,7 +27,7 @@ function Node_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 7; diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index 11756f85a..8c9383408 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -107,6 +107,10 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x input_display_len = 0; input_fix_len = 0; data_length = 1; + inputs_data = []; + input_hash = ""; + + anim_last_step = false; #endregion #region --- attributes ---- @@ -306,10 +310,11 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x } #endregion static isAnimated = function() { #region - for(var i = 0; i < ds_list_size(inputs); i++) { - if(inputs[| i].isAnimated()) - return true; - } + if(update_on_frame) return true; + + for(var i = 0; i < ds_list_size(inputs); i++) + if(inputs[| i].isAnimated()) return true; + return false; } #endregion @@ -403,6 +408,15 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x static focusStep = function() {} static inspectorStep = function() {} + static getInputData = function(index, def = 0) { return array_safe_get(inputs_data, index, def); } + + static getInputs = function() { #region + inputs_data = array_create(ds_list_size(inputs)); + + for(var i = 0; i < ds_list_size(inputs); i++) + inputs_data[i] = inputs[| i].getValue(); + } #endregion + static doUpdate = function() { #region if(SAFE_MODE) return; if(NODE_EXTRACT) return; @@ -411,13 +425,21 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x LOG_BLOCK_START(); LOG_IF(global.FLAG.render, $">>>>>>>>>> DoUpdate called from {internalName} <<<<<<<<<<"); + var _hash = input_hash; + getInputs(); + input_hash = md5_string_unicode(json_stringify(inputs_data)); + anim_last_step = isAnimated() || _hash != input_hash; + + if(name == "Shape") print($"{isAnimated()} - {_hash != input_hash}"); + try { var t = get_timer(); if(!is_instanceof(self, Node_Collection)) setRenderStatus(true); - - update(); ///UPDATE + + if(anim_last_step) + update(); ///Update only if input hash differs from previous. if(!is_instanceof(self, Node_Collection)) render_time = get_timer() - t; @@ -1603,7 +1625,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x return array_safe_get(global.SURFACE_FORMAT, form, surface_rgba8unorm); } - var _s = inputs[| 0].getValue(); + var _s = getInputData(0); while(is_array(_s) && array_length(_s)) _s = _s[0]; if(!is_surface(_s)) return surface_rgba8unorm; diff --git a/scripts/node_de_corner/node_de_corner.gml b/scripts/node_de_corner/node_de_corner.gml index a3acd8d7f..9ac399687 100644 --- a/scripts/node_de_corner/node_de_corner.gml +++ b/scripts/node_de_corner/node_de_corner.gml @@ -7,7 +7,7 @@ function Node_De_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) active_index = 1; inputs[| 2] = nodeValue("Tolerance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, 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 574da2833..96edb4da5 100644 --- a/scripts/node_de_stray/node_de_stray.gml +++ b/scripts/node_de_stray/node_de_stray.gml @@ -4,7 +4,7 @@ function Node_De_Stray(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 1] = nodeValue("Tolerance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 2] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 2; diff --git a/scripts/node_dilate/node_dilate.gml b/scripts/node_dilate/node_dilate.gml index 162f823ba..af23b41f4 100644 --- a/scripts/node_dilate/node_dilate.gml +++ b/scripts/node_dilate/node_dilate.gml @@ -15,7 +15,7 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co .setUnitRef(function(index) { return getDimension(index); }); inputs[| 2] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [-3, 3, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-3, 3, 0.01] }); inputs[| 3] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 16); @@ -25,7 +25,7 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 7; @@ -42,7 +42,7 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co attribute_interpolation(); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var pos = inputs[| 1].getValue(); + var pos = getInputData(1); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; diff --git a/scripts/node_displacement/node_displacement.gml b/scripts/node_displacement/node_displacement.gml index 72c14d684..7eed18eb5 100644 --- a/scripts/node_displacement/node_displacement.gml +++ b/scripts/node_displacement/node_displacement.gml @@ -23,7 +23,7 @@ function Node_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 3] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1); inputs[| 4] = nodeValue("Mid value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0., "Brightness value to be use as a basis for 'no displacement'.") - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 5] = nodeValue("Color data", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, @"Use color data set extra information. - Ignore: Don't use color data. @@ -40,7 +40,7 @@ If set, then strength value control how many times the effect applies on itself. inputs[| 8] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 9] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 10] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 10; @@ -68,6 +68,7 @@ If set, then strength value control how many times the effect applies on itself. inputs[| 2].setVisible(false); break; } + var ww = surface_get_width_safe(_data[0]); var hh = surface_get_height_safe(_data[0]); var mw = surface_get_width_safe(_data[1]); diff --git a/scripts/node_display_image/node_display_image.gml b/scripts/node_display_image/node_display_image.gml index 4d76ff837..f0b10e80e 100644 --- a/scripts/node_display_image/node_display_image.gml +++ b/scripts/node_display_image/node_display_image.gml @@ -30,7 +30,7 @@ function Node_Display_Image(_x, _y, _group = noone) : Node(_x, _y, _group) const auto_height = false; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_load, ["*.png", ""]) + .setDisplay(VALUE_DISPLAY.path_load, { filter: "*.png" }) .rejectArray(); spr = noone; @@ -39,7 +39,7 @@ function Node_Display_Image(_x, _y, _group = noone) : Node(_x, _y, _group) const first_update = false; static onInspector1Update = function() { - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; updatePaths(path); update(); @@ -72,7 +72,7 @@ function Node_Display_Image(_x, _y, _group = noone) : Node(_x, _y, _group) const } static update = function(frame = PROJECT.animator.current_frame) { - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; if(path_current != path) updatePaths(path); diff --git a/scripts/node_display_text/node_display_text.gml b/scripts/node_display_text/node_display_text.gml index 61457e13d..30092d408 100644 --- a/scripts/node_display_text/node_display_text.gml +++ b/scripts/node_display_text/node_display_text.gml @@ -28,7 +28,7 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr .rejectArray(); inputs[| 3] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.75) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]) + .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); inputs[| 4] = nodeValue("Line width", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, -1) @@ -211,16 +211,16 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr static onValueUpdate = function(index = 0) { if(index == 1 || index == 4) - line_update(inputs[| 1].getValue(), inputs[| 4].getValue()); + line_update(getInputData(1), getInputData(4)); } static drawNodeBase = function(xx, yy, mx, my, _s) { - var color = inputs[| 0].getValue(); - var txt = inputs[| 1].getValue(); + var color = getInputData(0); + var txt = getInputData(1); if(txt == "") txt = "..." - var sty = inputs[| 2].getValue(); - var alp = inputs[| 3].getValue(); - var wid = inputs[| 4].getValue(); + var sty = getInputData(2); + var alp = getInputData(3); + var wid = getInputData(4); font = f_p1; switch(sty) { diff --git a/scripts/node_dither/node_dither.gml b/scripts/node_dither/node_dither.gml index b6969bca7..3146f35c9 100644 --- a/scripts/node_dither/node_dither.gml +++ b/scripts/node_dither/node_dither.gml @@ -27,7 +27,7 @@ function Node_Dither(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co .setVisible(false); inputs[| 4] = nodeValue("Contrast", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [1, 5, 0.1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 5, 0.1] }); inputs[| 5] = nodeValue("Contrast map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); @@ -37,7 +37,7 @@ function Node_Dither(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 7] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 8] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 9] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 9; diff --git a/scripts/node_dust/node_dust.gml b/scripts/node_dust/node_dust.gml index a0353f20c..f3f3adac8 100644 --- a/scripts/node_dust/node_dust.gml +++ b/scripts/node_dust/node_dust.gml @@ -94,7 +94,7 @@ function Node_Dust(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { dusts = [ ]; static update = function() { - var _dim = inputs[| 0].getValue(); + var _dim = getInputData(0); var _outSurf = outputs[| 0].getValue(); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1]); diff --git a/scripts/node_dynamic_surface_out/node_dynamic_surface_out.gml b/scripts/node_dynamic_surface_out/node_dynamic_surface_out.gml index bdf400255..ed454733f 100644 --- a/scripts/node_dynamic_surface_out/node_dynamic_surface_out.gml +++ b/scripts/node_dynamic_surface_out/node_dynamic_surface_out.gml @@ -37,14 +37,14 @@ function Node_DynaSurf_Out(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) co } static update = function() { - var _surf = inputs[| 0].getValue(); - var _x = inputs[| 1].getValue(); - var _y = inputs[| 2].getValue(); - var _sx = inputs[| 3].getValue(); - var _sy = inputs[| 4].getValue(); - var _ang = inputs[| 5].getValue(); - var _clr = inputs[| 6].getValue(); - var _alp = inputs[| 7].getValue(); + var _surf = getInputData(0); + var _x = getInputData(1); + var _y = getInputData(2); + var _sx = getInputData(3); + var _sy = getInputData(4); + var _ang = getInputData(5); + var _clr = getInputData(6); + var _alp = getInputData(7); outputs[| 0].setValue(new __funcTree("draw", [ _surf, _x, _y, _sx, _sy, _ang, _clr, _alp ])); diff --git a/scripts/node_dynamic_surface_out_height/node_dynamic_surface_out_height.gml b/scripts/node_dynamic_surface_out_height/node_dynamic_surface_out_height.gml index 0acdfbcdb..5860a8406 100644 --- a/scripts/node_dynamic_surface_out_height/node_dynamic_surface_out_height.gml +++ b/scripts/node_dynamic_surface_out_height/node_dynamic_surface_out_height.gml @@ -20,7 +20,7 @@ function Node_DynaSurf_Out_Height(_x, _y, _group = noone) : Node_PCX(_x, _y, _gr } static update = function() { - var _h = inputs[| 0].getValue(); + var _h = getInputData(0); outputs[| 0].setValue(_h); if(group) group.setDynamicSurface(); diff --git a/scripts/node_dynamic_surface_out_width/node_dynamic_surface_out_width.gml b/scripts/node_dynamic_surface_out_width/node_dynamic_surface_out_width.gml index 21bcc91db..96da6bb53 100644 --- a/scripts/node_dynamic_surface_out_width/node_dynamic_surface_out_width.gml +++ b/scripts/node_dynamic_surface_out_width/node_dynamic_surface_out_width.gml @@ -20,7 +20,7 @@ function Node_DynaSurf_Out_Width(_x, _y, _group = noone) : Node_PCX(_x, _y, _gro } static update = function() { - var _w = inputs[| 0].getValue(); + var _w = getInputData(0); outputs[| 0].setValue(_w); if(group) group.setDynamicSurface(); diff --git a/scripts/node_edge_detect/node_edge_detect.gml b/scripts/node_edge_detect/node_edge_detect.gml index 43f02e2cc..d388b9c62 100644 --- a/scripts/node_edge_detect/node_edge_detect.gml +++ b/scripts/node_edge_detect/node_edge_detect.gml @@ -17,7 +17,7 @@ function Node_Edge_Detect(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 5; diff --git a/scripts/node_equation/node_equation.gml b/scripts/node_equation/node_equation.gml index 19cbcd7fa..cf5af65b1 100644 --- a/scripts/node_equation/node_equation.gml +++ b/scripts/node_equation/node_equation.gml @@ -108,7 +108,7 @@ function Node_Equation(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) array_resize(input_display_list, input_display_len); for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { - var varName = inputs[| i].getValue(); + var varName = getInputData(i); if(varName != "") { ds_list_add(_in, inputs[| i + 0]); @@ -136,7 +136,7 @@ function Node_Equation(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) if(LOADING || APPENDING) return; if(safe_mod(index - input_fix_len, data_length) == 0) //Variable name - inputs[| index + 1].name = inputs[| index].getValue(); + inputs[| index + 1].name = getInputData(index); refreshDynamicInput(); } #endregion @@ -165,7 +165,7 @@ function Node_Equation(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text); - var str = inputs[| 0].getValue(); + var str = getInputData(0); var bbox = drawGetBbox(xx, yy, _s); var ss = string_scale(str, bbox.w, bbox.h); diff --git a/scripts/node_erode/node_erode.gml b/scripts/node_erode/node_erode.gml index 6c1242aff..7172268ff 100644 --- a/scripts/node_erode/node_erode.gml +++ b/scripts/node_erode/node_erode.gml @@ -18,7 +18,7 @@ function Node_Erode(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 5] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 6] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 6; diff --git a/scripts/node_export/node_export.gml b/scripts/node_export/node_export.gml index 98ebc2ac3..540555e3c 100644 --- a/scripts/node_export/node_export.gml +++ b/scripts/node_export/node_export.gml @@ -49,8 +49,8 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor playing = false; played = 0; - _format_still = ["Portable Network Graphics (.png)|*.png|Joint Photographic Experts Group (.jpg)|*.jpg", ""]; - _format_anim = ["Graphics Interchange Format (.gif)|*.gif|Animated WebP (.webp)|*.webp", ""]; + _format_still = { filter: "Portable Network Graphics (.png)|*.png|Joint Photographic Experts Group (.jpg)|*.jpg" }; + _format_anim = { filter: "Graphics Interchange Format (.gif)|*.gif|Animated WebP (.webp)|*.webp" }; inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); @@ -67,7 +67,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor format_array = ["Multiple images", "Image sequences", "Animation"]; inputs[| 3] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, format_single, { update_hover: false }) + .setDisplay(VALUE_DISPLAY.enum_scroll, { data: format_single, update_hover: false }) .rejectArray(); inputs[| 4] = nodeValue("Template guides", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) @@ -87,7 +87,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor .rejectArray(); inputs[| 7] = nodeValue("Color merge", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.02) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]) + .setDisplay(VALUE_DISPLAY.slider) .setVisible(false) .rejectArray(); @@ -98,22 +98,22 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor format_animation = [ ".gif", ".webp" ]; inputs[| 9] = nodeValue("Format", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, format_image, { update_hover: false }) + .setDisplay(VALUE_DISPLAY.enum_scroll, { data: format_image, update_hover: false }) .rejectArray(); inputs[| 10] = nodeValue("Quality", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 80) - .setDisplay(VALUE_DISPLAY.slider, [0, 100, 1]) + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 100, 1] }) .rejectArray(); inputs[| 11] = nodeValue("Sequence begin", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0); inputs[| 12] = nodeValue("Frame range", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, -1]) - .setDisplay(VALUE_DISPLAY.slider_range, [0, PROJECT.animator.frames_total, 1]); + .setDisplay(VALUE_DISPLAY.slider_range, { range: [0, PROJECT.animator.frames_total, 1] }); png_format = [ "INDEX4", "INDEX8", "Default (PNG32)" ]; png_format_r = [ "PNG4", "PNG8" ]; inputs[| 13] = nodeValue("Subformat", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4) - .setDisplay(VALUE_DISPLAY.enum_scroll, png_format, { update_hover: false }); + .setDisplay(VALUE_DISPLAY.enum_scroll, { data: png_format, update_hover: false }); outputs[| 0] = nodeValue("Loop exit", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, 0); @@ -132,13 +132,13 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var _ty = _y; var _tw = _w - ui(8); - var rawpath = inputs[| 1].getValue(,,, true); + var rawpath = getInputData(1); if(is_array(rawpath)) rawpath = array_safe_get(rawpath, 0, ""); - var _ext = inputs[| 9].getValue(,,, true); + var _ext = getInputData(9); var path = pathString(rawpath); var pathA = pathString(rawpath,, true); - path = string_replace(path, ".png", array_safe_get(inputs[| 9].display_data, _ext, "")); + path = string_replace(path, ".png", array_safe_get(inputs[| 9].display_data.data, _ext, "")); draw_set_text(f_p1, fa_left, fa_top, COLORS._main_text); var _th = ui(12) + string_height_ext(path, -1, _tw - ui(16), true); @@ -212,7 +212,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor gifski = working_directory + "gifski\\win\\gifski.exe"; static onValueUpdate = function(_index) { #region - var form = inputs[| 3].getValue(); + var form = getInputData(3); if(_index == 3) { inputs[| 9].setValue(0); @@ -232,7 +232,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor inputs[| 2].setValue("%d%n%3f%i"); if(_index == 1) { - var _path = inputs[| 1].getValue(); + var _path = getInputData(1); var _ext = filename_ext(_path); switch(_ext) { @@ -246,7 +246,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } #endregion static extensionCheck = function() { #region - var _path = inputs[| 1].getValue(); + var _path = getInputData(1); var _ext = filename_ext(_path); switch(_ext) { @@ -285,7 +285,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor _path = file_find_next(); } - var rate = inputs[| 8].getValue(); + var rate = getInputData(8); if(rate == 0) rate = 1; var framerate = round(1 / rate * 1000); @@ -308,11 +308,11 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } #endregion static renderGif = function(temp_path, target_path) { #region - var loop = inputs[| 5].getValue(); - var opti = inputs[| 6].getValue(); - var fuzz = inputs[| 7].getValue(); - var rate = inputs[| 8].getValue(); - var qual = inputs[| 10].getValue(); + var loop = getInputData( 5); + var opti = getInputData( 6); + var fuzz = getInputData( 7); + var rate = getInputData( 8); + var qual = getInputData(10); if(rate == 0) rate = 1; target_path = string_replace_all(target_path, "/", "\\"); @@ -343,9 +343,9 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } #endregion static pathString = function(path, index = 0, _array = false) { #region - var suff = inputs[| 2].getValue(); - var form = inputs[| 3].getValue(); - var strt = inputs[| 11].getValue(); + var suff = getInputData( 2); + var form = getInputData( 3); + var strt = getInputData(11); path = string_replace_all(path, "\\", "/"); @@ -435,8 +435,8 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } } - var _e = inputs[| 9].getValue(); - var _ext = array_safe_get(inputs[| 9].display_data, _e, ".png"); + var _e = getInputData(9); + var _ext = array_safe_get(inputs[| 9].display_data.data, _e, ".png"); if(_array) array_push(s, ["ext", _ext]); else s += _ext; @@ -445,16 +445,16 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } #endregion static save_surface = function(_surf, _path) { #region - var form = inputs[| 3].getValue(); + var form = getInputData(3); if(form == NODE_EXPORT_FORMAT.gif) { surface_save_safe(_surf, _path); return _path; } - var extd = inputs[| 9].getValue(); - var qual = inputs[| 10].getValue(); - var indx = inputs[| 13].getValue(); + var extd = getInputData( 9); + var qual = getInputData(10); + var indx = getInputData(13); var ext = array_safe_get(format_image, extd, ".png"); var _pathOut = _path; @@ -500,11 +500,11 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } #endregion static export = function() { #region - var surf = inputs[| 0].getValue(); - var path = inputs[| 1].getValue(); - var suff = inputs[| 2].getValue(); - var form = inputs[| 3].getValue(); - var rang = inputs[| 12].getValue(); + var surf = getInputData( 0); + var path = getInputData( 1); + var suff = getInputData( 2); + var form = getInputData( 3); + var rang = getInputData(12); var _ts = current_time; @@ -579,9 +579,9 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor static doInspectorAction = function() { #region if(LOADING || APPENDING) return; - var path = inputs[| 1].getValue(); + var path = getInputData(1); if(path == "") return; - var form = inputs[| 3].getValue(); + var form = getInputData(3); if(form == NODE_EXPORT_FORMAT.single) { PROJECT.animator.rendering = true; @@ -606,21 +606,21 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } #endregion static step = function() { #region - var surf = inputs[| 0].getValue(); - var pngf = inputs[| 13].getValue(); + var surf = getInputData( 0); + var pngf = getInputData(13); if(is_array(surf)) { - inputs[| 3].display_data = format_array; + inputs[| 3].display_data.data = format_array; inputs[| 3].editWidget.data_list = format_array; } else { - inputs[| 3].display_data = format_single; + inputs[| 3].display_data.data = format_single; inputs[| 3].editWidget.data_list = format_single; } outputs[| 1].setValue(surf); - var anim = inputs[| 3].getValue(); // single, sequence, animation - var extn = inputs[| 9].getValue(); + var anim = getInputData(3); // single, sequence, animation + var extn = getInputData(9); inputs[| 5].setVisible(anim == 2); inputs[| 6].setVisible(anim == 2); @@ -632,11 +632,11 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor inputs[| 13].setVisible(anim < 2); if(anim == NODE_EXPORT_FORMAT.gif) { - inputs[| 9].display_data = format_animation; + inputs[| 9].display_data.data = format_animation; inputs[| 9].editWidget.data_list = format_animation; inputs[| 10].setVisible(true); } else { - inputs[| 9].display_data = format_image; + inputs[| 9].display_data.data = format_image; inputs[| 9].editWidget.data_list = format_image; inputs[| 10].setVisible(extn != 0); } @@ -645,7 +645,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } #endregion static update = function(frame = PROJECT.animator.current_frame) { #region - var anim = inputs[| 3].getValue(); + var anim = getInputData(3); if(anim == NODE_EXPORT_FORMAT.single) { if(isInLoop()) export(); return; @@ -667,11 +667,11 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor if(anim != NODE_EXPORT_FORMAT.gif) return; - var surf = inputs[| 0].getValue(); - var path = inputs[| 1].getValue(); - var suff = inputs[| 2].getValue(); - var extd = inputs[| 9].getValue(); - var rang = inputs[| 12].getValue(); + var surf = getInputData( 0); + var path = getInputData( 1); + var suff = getInputData( 2); + var extd = getInputData( 9); + var rang = getInputData(12); var temp_path, target_path; if(is_array(surf)) { diff --git a/scripts/node_feedback_output/node_feedback_output.gml b/scripts/node_feedback_output/node_feedback_output.gml index 026534e11..a1b0efd4d 100644 --- a/scripts/node_feedback_output/node_feedback_output.gml +++ b/scripts/node_feedback_output/node_feedback_output.gml @@ -18,7 +18,7 @@ function Node_Feedback_Output(_x, _y, _group = noone) : Node_Group_Output(_x, _y return; } - var _val_get = inputs[| 0].getValue(); + var _val_get = getInputData(0); var _arr = inputs[| 0].value_from.isArray(); var is_surf = inputs[| 0].type == VALUE_TYPE.surface; diff --git a/scripts/node_find_pixel/node_find_pixel.gml b/scripts/node_find_pixel/node_find_pixel.gml index 1a69f3a7c..03440867b 100644 --- a/scripts/node_find_pixel/node_find_pixel.gml +++ b/scripts/node_find_pixel/node_find_pixel.gml @@ -13,7 +13,7 @@ function Node_Find_Pixel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group outputs[| 0] = nodeValue("Position", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - static getPreviewValues = function() { return inputs[| 0].getValue(); } + static getPreviewValues = function() { return getInputData(0); } temp_surface = [ surface_create(1, 1) ]; @@ -46,7 +46,7 @@ function Node_Find_Pixel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group if(bbox.h <= 0) return; - var col = inputs[| 1].getValue(); + var col = getInputData(1); if(is_array(col)) { drawPalette(col, bbox.x0, bbox.y0, bbox.w, bbox.h); diff --git a/scripts/node_flood_fill/node_flood_fill.gml b/scripts/node_flood_fill/node_flood_fill.gml index ad38cd792..35c51f19d 100644 --- a/scripts/node_flood_fill/node_flood_fill.gml +++ b/scripts/node_flood_fill/node_flood_fill.gml @@ -7,7 +7,7 @@ function Node_Flood_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 2] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 3] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 3; @@ -18,7 +18,7 @@ function Node_Flood_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 5] = nodeValue("Colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black ) inputs[| 6] = nodeValue("Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 7] = nodeValue("Diagonal", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); diff --git a/scripts/node_fluid_add/node_fluid_add.gml b/scripts/node_fluid_add/node_fluid_add.gml index ae60fd54a..8fbabafbe 100644 --- a/scripts/node_fluid_add/node_fluid_add.gml +++ b/scripts/node_fluid_add/node_fluid_add.gml @@ -16,10 +16,10 @@ function Node_Fluid_Add(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) con inputs[| 3] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 4] = nodeValue("Inherit velocity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [ -1, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] }); inputs[| 5] = nodeValue("Density", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 6] = nodeValue("Expand velocity mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0); @@ -37,8 +37,8 @@ function Node_Fluid_Add(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) con outputs[| 0] = nodeValue("Fluid Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.fdomain, noone); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var _mat = inputs[| 1].getValue(); - var _pos = inputs[| 2].getValue(); + var _mat = getInputData(1); + var _pos = getInputData(2); if(is_surface(_mat)) { var sw = surface_get_width_safe(_mat) * _s; @@ -113,7 +113,7 @@ function Node_Fluid_Add(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) con static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); - var _mat = inputs[| 1].getValue(); + var _mat = getInputData(1); if(!is_surface(_mat)) return; draw_surface_fit(_mat, bbox.xc, bbox.yc, bbox.w, bbox.h); diff --git a/scripts/node_fluid_add_collider/node_fluid_add_collider.gml b/scripts/node_fluid_add_collider/node_fluid_add_collider.gml index b1cb45d9c..beb0ee852 100644 --- a/scripts/node_fluid_add_collider/node_fluid_add_collider.gml +++ b/scripts/node_fluid_add_collider/node_fluid_add_collider.gml @@ -19,8 +19,8 @@ function Node_Fluid_Add_Collider(_x, _y, _group = noone) : Node_Fluid(_x, _y, _g outputs[| 0] = nodeValue("Fluid Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.fdomain, noone); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _mat = inputs[| 1].getValue(); - var _area = inputs[| 2].getValue(); + var _mat = getInputData(1); + var _area = getInputData(2); if(is_surface(_mat)) { var x0 = _x + (_area[0] - _area[2]) * _s; @@ -51,7 +51,7 @@ function Node_Fluid_Add_Collider(_x, _y, _group = noone) : Node_Fluid(_x, _y, _g static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); - var _mat = inputs[| 1].getValue(); + var _mat = getInputData(1); if(!is_surface(_mat)) return; draw_surface_fit(_mat, bbox.xc, bbox.yc, bbox.w, bbox.h); diff --git a/scripts/node_fluid_apply_velo/node_fluid_apply_velo.gml b/scripts/node_fluid_apply_velo/node_fluid_apply_velo.gml index 7be186e1f..2d74c06fe 100644 --- a/scripts/node_fluid_apply_velo/node_fluid_apply_velo.gml +++ b/scripts/node_fluid_apply_velo/node_fluid_apply_velo.gml @@ -24,8 +24,8 @@ function Node_Fluid_Apply_Velocity(_x, _y, _group = noone) : Node_Fluid(_x, _y, outputs[| 0] = nodeValue("Fluid Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.fdomain, noone); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _mat = inputs[| 1].getValue(); - var _pos = inputs[| 2].getValue(); + var _mat = getInputData(1); + var _pos = getInputData(2); if(is_surface(_mat)) { var sw = surface_get_width_safe(_mat) * _s; @@ -60,7 +60,7 @@ function Node_Fluid_Apply_Velocity(_x, _y, _group = noone) : Node_Fluid(_x, _y, static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); - var _mat = inputs[| 1].getValue(); + var _mat = getInputData(1); if(!is_surface(_mat)) return; draw_surface_fit(_mat, bbox.xc, bbox.yc, bbox.w, bbox.h); diff --git a/scripts/node_fluid_domain/node_fluid_domain.gml b/scripts/node_fluid_domain/node_fluid_domain.gml index 52d0ab6ed..38e9cae08 100644 --- a/scripts/node_fluid_domain/node_fluid_domain.gml +++ b/scripts/node_fluid_domain/node_fluid_domain.gml @@ -15,13 +15,13 @@ function Node_Fluid_Domain(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) .setDisplay(VALUE_DISPLAY.enum_button, [ "Multiply", "Subtract" ]); inputs[| 3] = nodeValue("Material dissipation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.02) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 0.1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.01 ] }); inputs[| 4] = nodeValue("Velocity dissipation type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) .setDisplay(VALUE_DISPLAY.enum_button, [ "Multiply", "Subtract" ]); inputs[| 5] = nodeValue("Velocity dissipation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.00) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 0.1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 0.1, 0.01 ] }); inputs[| 6] = nodeValue("Acceleration", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -30,13 +30,13 @@ function Node_Fluid_Domain(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) .setDisplay(VALUE_DISPLAY.vector); inputs[| 8] = nodeValue("Initial pressure", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.75) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 9] = nodeValue("Material maccormack weight", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 10] = nodeValue("Velocity maccormack weight", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 11] = nodeValue("Wrap", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); @@ -124,7 +124,7 @@ function Node_Fluid_Domain(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); - var _mat = inputs[| 1].getValue(); + var _mat = getInputData(1); if(!is_surface(_mat)) return; draw_surface_fit(_mat, bbox.xc, bbox.yc, bbox.w, bbox.h); diff --git a/scripts/node_fluid_domain_queue/node_fluid_domain_queue.gml b/scripts/node_fluid_domain_queue/node_fluid_domain_queue.gml index b13204b06..76ed3a323 100644 --- a/scripts/node_fluid_domain_queue/node_fluid_domain_queue.gml +++ b/scripts/node_fluid_domain_queue/node_fluid_domain_queue.gml @@ -43,7 +43,7 @@ function Node_Fluid_Domain_Queue(_x, _y, _group = noone) : Node_Fluid(_x, _y, _g static update = function() { for( var i = 0; i < ds_list_size(inputs) - 1; i++ ) { - var _dom = inputs[| i].getValue(); + var _dom = getInputData(i); if(_dom != noone && instance_exists(_dom)) outputs[| 0].setValue(_dom); } diff --git a/scripts/node_fluid_render/node_fluid_render.gml b/scripts/node_fluid_render/node_fluid_render.gml index febe48014..11c6f9400 100644 --- a/scripts/node_fluid_render/node_fluid_render.gml +++ b/scripts/node_fluid_render/node_fluid_render.gml @@ -31,7 +31,7 @@ function Node_Fluid_Render(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) static onInspector2Update = function() { clearCache(); } static step = function() { - var _dim = inputs[| 1].getValue(); + var _dim = getInputData(1); var _outSurf = outputs[| 0].getValue(); if(!is_surface(_outSurf)) { _outSurf = surface_create_valid(_dim[0], _dim[1], attrDepth()); diff --git a/scripts/node_fluid_repulse/node_fluid_repulse.gml b/scripts/node_fluid_repulse/node_fluid_repulse.gml index 4fdffbb09..fe7aea5c3 100644 --- a/scripts/node_fluid_repulse/node_fluid_repulse.gml +++ b/scripts/node_fluid_repulse/node_fluid_repulse.gml @@ -12,7 +12,7 @@ function Node_Fluid_Repulse(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) inputs[| 2] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 8); inputs[| 3] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.10) - .setDisplay(VALUE_DISPLAY.slider, [-1, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); inputs[| 4] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_button, [ "Override", "Add" ]); @@ -25,8 +25,8 @@ function Node_Fluid_Repulse(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) outputs[| 0] = nodeValue("Fluid Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.fdomain, noone); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _pos = inputs[| 1].getValue(); - var _rad = inputs[| 2].getValue(); + var _pos = getInputData(1); + var _rad = getInputData(2); var px = _x + _pos[0] * _s; var py = _y + _pos[1] * _s; diff --git a/scripts/node_fluid_turbulence/node_fluid_turbulence.gml b/scripts/node_fluid_turbulence/node_fluid_turbulence.gml index 266f30c82..e8b9914d9 100644 --- a/scripts/node_fluid_turbulence/node_fluid_turbulence.gml +++ b/scripts/node_fluid_turbulence/node_fluid_turbulence.gml @@ -10,10 +10,10 @@ function Node_Fluid_Turbulence(_x, _y, _group = noone) : Node_Fluid(_x, _y, _gro .setDisplay(VALUE_DISPLAY.area); inputs[| 2] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.10) - .setDisplay(VALUE_DISPLAY.slider, [-1, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); inputs[| 3] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4) - .setDisplay(VALUE_DISPLAY.slider, [1, 16, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.01] }); inputs[| 4] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, irandom(99999) ); diff --git a/scripts/node_fluid_update/node_fluid_update.gml b/scripts/node_fluid_update/node_fluid_update.gml index 414c0eb25..8dea147f5 100644 --- a/scripts/node_fluid_update/node_fluid_update.gml +++ b/scripts/node_fluid_update/node_fluid_update.gml @@ -33,7 +33,7 @@ function Node_Fluid_Update(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); - var _act = inputs[| 1].getValue(); + var _act = getInputData(1); draw_sprite_fit(_act? s_node_fluidSim_update : s_node_fluidSim_update_paused, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); } } \ No newline at end of file diff --git a/scripts/node_fluid_vortex/node_fluid_vortex.gml b/scripts/node_fluid_vortex/node_fluid_vortex.gml index 4d738f1b6..8f5c5c1f0 100644 --- a/scripts/node_fluid_vortex/node_fluid_vortex.gml +++ b/scripts/node_fluid_vortex/node_fluid_vortex.gml @@ -12,10 +12,10 @@ function Node_Fluid_Vortex(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) inputs[| 2] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 8); inputs[| 3] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.10) - .setDisplay(VALUE_DISPLAY.slider, [-1, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); inputs[| 4] = nodeValue("Attraction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [-1, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); inputs[| 5] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_button, [ "Override", "Add" ]); @@ -29,8 +29,8 @@ function Node_Fluid_Vortex(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) outputs[| 1] = nodeValue("Fluid Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _pos = inputs[| 1].getValue(); - var _rad = inputs[| 2].getValue(); + var _pos = getInputData(1); + var _rad = getInputData(2); var px = _x + _pos[0] * _s; var py = _y + _pos[1] * _s; diff --git a/scripts/node_frame/node_frame.gml b/scripts/node_frame/node_frame.gml index 5a00f6689..54fba0e06 100644 --- a/scripts/node_frame/node_frame.gml +++ b/scripts/node_frame/node_frame.gml @@ -22,16 +22,16 @@ function Node_Frame(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { .rejectArray(); inputs[| 2] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.75 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]) + .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); static step = function() { - var si = inputs[| 0].getValue(); + var si = getInputData(0); w = si[0]; h = si[1]; - color = inputs[| 1].getValue(); - alpha = inputs[| 2].getValue(); + color = getInputData(1); + alpha = getInputData(2); } static drawNodeBase = function(xx, yy, _s) { diff --git a/scripts/node_functions/node_functions.gml b/scripts/node_functions/node_functions.gml index d47af1f21..cdb421d83 100644 --- a/scripts/node_functions/node_functions.gml +++ b/scripts/node_functions/node_functions.gml @@ -16,9 +16,9 @@ } function node_draw_transform_box(active, _x, _y, _s, _mx, _my, _snx, _sny, _posInd, _rotInd, _scaInd, _scaUnit = false) { - var _pos = inputs[| _posInd].getValue(); - var _rot = inputs[| _rotInd].getValue(); - var _sca = inputs[| _scaInd].getValue(); + var _pos = getInputData(_posInd); + var _rot = getInputData(_rotInd); + var _sca = getInputData(_scaInd); if(drag_type > -1) { if(drag_type == 0) { diff --git a/scripts/node_global/node_global.gml b/scripts/node_global/node_global.gml index 459b1dfe2..d1142b031 100644 --- a/scripts/node_global/node_global.gml +++ b/scripts/node_global/node_global.gml @@ -127,10 +127,10 @@ function variable_editor(nodeVal) constructor { case "Rotation" : value.setDisplay(VALUE_DISPLAY.rotation); break; case "Rotation range" : value.setDisplay(VALUE_DISPLAY.rotation_range); break; case "Slider" : - value.setDisplay(VALUE_DISPLAY.slider, [slider_range[0], slider_range[1], slider_step]); + value.setDisplay(VALUE_DISPLAY.slider, { range: [slider_range[0], slider_range[1], slider_step] }); break; case "Slider range" : - value.setDisplay(VALUE_DISPLAY.slider_range, [slider_range[0], slider_range[1], slider_step]); + value.setDisplay(VALUE_DISPLAY.slider_range, { range: [slider_range[0], slider_range[1], slider_step] }); break; case "Padding" : value.setDisplay(VALUE_DISPLAY.padding); break; case "Vector2" : @@ -141,9 +141,9 @@ function variable_editor(nodeVal) constructor { case "Area" : value.setDisplay(VALUE_DISPLAY.area); break; case "Palette" : value.setDisplay(VALUE_DISPLAY.palette); break; - case "Import" : value.setDisplay(VALUE_DISPLAY.path_load, ["", ""]); break; - case "Export" : value.setDisplay(VALUE_DISPLAY.path_save, ["", ""]); break; - case "Font" : value.setDisplay(VALUE_DISPLAY.path_font); break; + case "Import" : value.setDisplay(VALUE_DISPLAY.path_load, { filter: "" }); break; + case "Export" : value.setDisplay(VALUE_DISPLAY.path_save, { filter: "" }); break; + case "Font" : value.setDisplay(VALUE_DISPLAY.path_font); break; } } diff --git a/scripts/node_glow/node_glow.gml b/scripts/node_glow/node_glow.gml index e10d7dd72..34b10c2db 100644 --- a/scripts/node_glow/node_glow.gml +++ b/scripts/node_glow/node_glow.gml @@ -9,20 +9,20 @@ function Node_Glow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 1] = nodeValue("Border", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [0, 4, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 4, 1] }); inputs[| 2] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3) - .setDisplay(VALUE_DISPLAY.slider, [1, 16, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 1] }); inputs[| 3] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 4] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 7; diff --git a/scripts/node_gradient/node_gradient.gml b/scripts/node_gradient/node_gradient.gml index 2f9118f66..20783e432 100644 --- a/scripts/node_gradient/node_gradient.gml +++ b/scripts/node_gradient/node_gradient.gml @@ -29,7 +29,7 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 4] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, .5); inputs[| 5] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [-2, 2, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-2, 2, 0.01] }); inputs[| 6] = nodeValue("Center", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [DEF_SURF_W / 2, DEF_SURF_H / 2]) .setDisplay(VALUE_DISPLAY.vector) @@ -40,7 +40,7 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 8] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 9] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 2, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 2, 0.01] }); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_gradient_extract/node_gradient_extract.gml b/scripts/node_gradient_extract/node_gradient_extract.gml index 88fd81707..517f746c0 100644 --- a/scripts/node_gradient_extract/node_gradient_extract.gml +++ b/scripts/node_gradient_extract/node_gradient_extract.gml @@ -40,7 +40,7 @@ function Node_Gradient_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, var bbox = drawGetBbox(xx, yy, _s); if(bbox.h < 1) return; - var grad = inputs[| 0].getValue(); + var grad = getInputData(0); if(is_array(grad)) { if(array_length(grad) == 0) return; grad = grad[0]; diff --git a/scripts/node_gradient_output/node_gradient_output.gml b/scripts/node_gradient_output/node_gradient_output.gml index 6a33d7121..6e4fab547 100644 --- a/scripts/node_gradient_output/node_gradient_output.gml +++ b/scripts/node_gradient_output/node_gradient_output.gml @@ -7,7 +7,7 @@ function Node_Gradient_Out(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ); inputs[| 1] = nodeValue("Sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0, "Position to sample a color from the gradient.") - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]) + .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); outputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.output, VALUE_TYPE.gradient, new gradientObject(c_white) ); diff --git a/scripts/node_gradient_points/node_gradient_points.gml b/scripts/node_gradient_points/node_gradient_points.gml index 06b9d3cea..5314f7236 100644 --- a/scripts/node_gradient_points/node_gradient_points.gml +++ b/scripts/node_gradient_points/node_gradient_points.gml @@ -30,16 +30,16 @@ function Node_Gradient_Points(_x, _y, _group = noone) : Node_Processor(_x, _y, _ .setDisplay(VALUE_DISPLAY.palette); inputs[| 11] = nodeValue("Falloff 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 6 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 32, 1 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 1 ] }); inputs[| 12] = nodeValue("Falloff 2", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 6 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 32, 1 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 1 ] }); inputs[| 13] = nodeValue("Falloff 3", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 6 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 32, 1 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 1 ] }); inputs[| 14] = nodeValue("Falloff 4", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 6 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 32, 1 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 1 ] }); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); @@ -60,7 +60,7 @@ function Node_Gradient_Points(_x, _y, _group = noone) : Node_Processor(_x, _y, _ } static step = function() { - var _usePal = inputs[| 9].getValue(); + var _usePal = getInputData(9); inputs[| 10].setVisible(_usePal, _usePal); diff --git a/scripts/node_gradient_replace/node_gradient_replace.gml b/scripts/node_gradient_replace/node_gradient_replace.gml index 8887fa546..37c5e7a9a 100644 --- a/scripts/node_gradient_replace/node_gradient_replace.gml +++ b/scripts/node_gradient_replace/node_gradient_replace.gml @@ -14,7 +14,7 @@ function Node_Gradient_Replace_Color(_x, _y, _group = noone) : Node_Processor(_x .setDisplay(VALUE_DISPLAY.palette); inputs[| 3] = nodeValue("Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); outputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.output, VALUE_TYPE.gradient, new gradientObject(c_white) ); diff --git a/scripts/node_gradient_shift/node_gradient_shift.gml b/scripts/node_gradient_shift/node_gradient_shift.gml index 078608184..b56084194 100644 --- a/scripts/node_gradient_shift/node_gradient_shift.gml +++ b/scripts/node_gradient_shift/node_gradient_shift.gml @@ -8,12 +8,12 @@ function Node_Gradient_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _g .setDisplay(true, true); inputs[| 1] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [-1, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); inputs[| 2] = nodeValue("Wrap", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) inputs[| 3] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 2, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 2, 0.01] }); outputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.output, VALUE_TYPE.gradient, new gradientObject(c_white) ); diff --git a/scripts/node_grey_to_alpha/node_grey_to_alpha.gml b/scripts/node_grey_to_alpha/node_grey_to_alpha.gml index cb2d6903d..77d6b650b 100644 --- a/scripts/node_grey_to_alpha/node_grey_to_alpha.gml +++ b/scripts/node_grey_to_alpha/node_grey_to_alpha.gml @@ -23,13 +23,13 @@ function Node_Grey_Alpha(_x, _y, _group = noone) : Node_Processor(_x, _y, _group attribute_surface_depth(); static step = function() { #region - var _replace = inputs[| 1].getValue(); + var _replace = getInputData(1); inputs[| 2].setVisible(_replace); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region - var _replace = inputs[| 1].getValue(); - var _color = inputs[| 2].getValue(); + var _replace = getInputData(1); + var _color = getInputData(2); surface_set_target(_outSurf); DRAW_CLEAR diff --git a/scripts/node_greyscale/node_greyscale.gml b/scripts/node_greyscale/node_greyscale.gml index af1ac3a17..07cf8db7c 100644 --- a/scripts/node_greyscale/node_greyscale.gml +++ b/scripts/node_greyscale/node_greyscale.gml @@ -8,15 +8,15 @@ function Node_Greyscale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 1] = nodeValue("Brightness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [ -1, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01] }); inputs[| 2] = nodeValue("Contrast", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [ -1, 4, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 4, 0.01] }); inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 5; diff --git a/scripts/node_grid/node_grid.gml b/scripts/node_grid/node_grid.gml index 6e3139ebb..dafee3634 100644 --- a/scripts/node_grid/node_grid.gml +++ b/scripts/node_grid/node_grid.gml @@ -29,7 +29,7 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons .setDisplay(VALUE_DISPLAY.vector); inputs[| 3] = nodeValue("Gap", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) - .setDisplay(VALUE_DISPLAY.slider, [0, 0.5, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.01] }); inputs[| 4] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.rotation); @@ -41,7 +41,7 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 7] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 8] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [-0.5, 0.5, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-0.5, 0.5, 0.01] }); inputs[| 9] = nodeValue("Shift axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_button, ["X", "Y"]); diff --git a/scripts/node_grid_hex/node_grid_hex.gml b/scripts/node_grid_hex/node_grid_hex.gml index af088e3d9..3f2a3c258 100644 --- a/scripts/node_grid_hex/node_grid_hex.gml +++ b/scripts/node_grid_hex/node_grid_hex.gml @@ -30,7 +30,7 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.rotation); inputs[| 4] = nodeValue("Gap", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) - .setDisplay(VALUE_DISPLAY.slider, [0, 0.5, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.01] }); inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ); diff --git a/scripts/node_grid_tri/node_grid_tri.gml b/scripts/node_grid_tri/node_grid_tri.gml index 910250fd9..ed852a2cc 100644 --- a/scripts/node_grid_tri/node_grid_tri.gml +++ b/scripts/node_grid_tri/node_grid_tri.gml @@ -27,7 +27,7 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.vector); inputs[| 3] = nodeValue("Gap", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) - .setDisplay(VALUE_DISPLAY.slider, [0, 0.5, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.01] }); inputs[| 4] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.rotation); diff --git a/scripts/node_group_input/node_group_input.gml b/scripts/node_group_input/node_group_input.gml index bb37f6ed7..e36bd71ca 100644 --- a/scripts/node_group_input/node_group_input.gml +++ b/scripts/node_group_input/node_group_input.gml @@ -70,7 +70,7 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru .rejectArray(); inputs[| 2] = nodeValue("Input type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, data_type_list, { update_hover: false }) + .setDisplay(VALUE_DISPLAY.enum_scroll, { data: data_type_list, update_hover: false }) .uncache() .rejectArray(); inputs[| 2].editWidget.update_hover = false; @@ -81,7 +81,7 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru .rejectArray(); inputs[| 4] = nodeValue("Vector size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_button, [ "2", "3", "4" ], { update_hover: false }) + .setDisplay(VALUE_DISPLAY.enum_button, [ "2", "3", "4" ]) .setVisible(false) .uncache() .rejectArray(); @@ -127,13 +127,13 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru static onValueUpdate = function(index = 0) { #region if(is_undefined(inParent)) return; - var _dtype = inputs[| 0].getValue(); - var _range = inputs[| 1].getValue(); - var _type = inputs[| 2].getValue(); + var _dtype = getInputData(0); + var _range = getInputData(1); + var _type = getInputData(2); var _val_type = data_type_map[_type]; - var _enum_label = inputs[| 3].getValue(); - var _vec_size = inputs[| 4].getValue(); - var _step = inputs[| 7].getValue(); + var _enum_label = getInputData(3); + var _vec_size = getInputData(4); + var _step = getInputData(7); if(index == 2) { var _o = outputs[| 0]; @@ -143,7 +143,7 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru _to.removeFrom(); } - inputs[| 0].display_data = array_safe_get(display_list, _val_type); + inputs[| 0].display_data.data = array_safe_get(display_list, _val_type); inputs[| 0].editWidget.data_list = array_safe_get(display_list, _val_type); inputs[| 0].setValue(0); _dtype = 0; @@ -161,12 +161,12 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru break; case "Slider" : - inParent.setDisplay(VALUE_DISPLAY.slider, [_range[0], _range[1], _step]); + inParent.setDisplay(VALUE_DISPLAY.slider, { range: [_range[0], _range[1], _step] }); break; case "Slider range" : if(!is_array(_val) || array_length(_val) != 2) inParent.animator = new valueAnimator([0, 0], inParent); - inParent.setDisplay(VALUE_DISPLAY.slider_range, [_range[0], _range[1], _step]); + inParent.setDisplay(VALUE_DISPLAY.slider_range, { range: [_range[0], _range[1], _step] }); break; case "Rotation" : @@ -235,8 +235,8 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru switch(_val_type) { case VALUE_TYPE.trigger : - var bname = inputs[| 8].getValue(); - inParent.setDisplay(VALUE_DISPLAY.button, [ function() { doTrigger = 1; }, bname]); + var bname = getInputData(8); + inParent.setDisplay(VALUE_DISPLAY.button, { name: bname, onClick: function() { doTrigger = 1; } }); break; } @@ -308,8 +308,8 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru static update = function(frame = PROJECT.animator.current_frame) { #region if(is_undefined(inParent)) return; - var _dstype = inputs[| 0].getValue(); - var _data = inputs[| 2].getValue(); + var _dstype = getInputData(0); + var _data = getInputData(2); _dstype = array_safe_get(array_safe_get(display_list, _data, []), _dstype); var _datype = data_type_map[_data]; @@ -343,7 +343,7 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru var _inputs = load_map.inputs; inputs[| 5].applyDeserialize(_inputs[5], load_scale); - if(PROJECT.version < 11520) attributes.input_priority = inputs[| 5].getValue(); + if(PROJECT.version < 11520) attributes.input_priority = getInputData(5); group.sortIO(); inputs[| 2].applyDeserialize(_inputs[2], load_scale); diff --git a/scripts/node_group_output/node_group_output.gml b/scripts/node_group_output/node_group_output.gml index 4302475c6..4bb3d92f7 100644 --- a/scripts/node_group_output/node_group_output.gml +++ b/scripts/node_group_output/node_group_output.gml @@ -141,7 +141,7 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr var _inputs = load_map.inputs; inputs[| 1].applyDeserialize(_inputs[1], load_scale); - if(PROJECT.version < 11520) attributes.input_priority = inputs[| 1].getValue(); + if(PROJECT.version < 11520) attributes.input_priority = getInputData(1); group.sortIO(); } diff --git a/scripts/node_hlsl/node_hlsl.gml b/scripts/node_hlsl/node_hlsl.gml index f1a77735f..0027f6091 100644 --- a/scripts/node_hlsl/node_hlsl.gml +++ b/scripts/node_hlsl/node_hlsl.gml @@ -48,7 +48,7 @@ output.color = surfaceColor;") inputs[| index + 0] = nodeValue("Argument name", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "" ); inputs[| index + 1] = nodeValue("Argument type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Float", "Int", "Vec2", "Vec3", "Vec4", "Mat3", "Mat4", "Sampler2D", "Color" ], { update_hover: false }); + .setDisplay(VALUE_DISPLAY.enum_scroll, { 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 ) @@ -75,17 +75,17 @@ output.color = surfaceColor;") array_resize(input_display_list, input_display_len); for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { - if(inputs[| i].getValue() == "") { + if(getInputData(i) == "") { delete inputs[| i + 0]; delete inputs[| i + 1]; delete inputs[| i + 2]; continue; } - var inp_name = inputs[| i + 0].getValue(); + var inp_name = getInputData(i + 0); var inp_type = inputs[| i + 1]; var inp_valu = inputs[| i + 2]; - var cur_valu = inputs[| i + 2].getValue(); + var cur_valu = getInputData(i + 2); ds_list_add(_in, inputs[| i + 0]); ds_list_add(_in, inp_type); @@ -130,13 +130,13 @@ output.color = surfaceColor;") if(!is_array(cur_valu) || array_length(cur_valu) != 9) inp_valu.overrideValue(array_create(9)); inp_valu.type = VALUE_TYPE.float; - inp_valu.setDisplay(VALUE_DISPLAY.matrix, 3); + inp_valu.setDisplay(VALUE_DISPLAY.matrix, { size: 3 }); break; case 6 : if(!is_array(cur_valu) || array_length(cur_valu) != 16) inp_valu.overrideValue(array_create(16)); inp_valu.type = VALUE_TYPE.float; - inp_valu.setDisplay(VALUE_DISPLAY.matrix, 4); + inp_valu.setDisplay(VALUE_DISPLAY.matrix, { size: 4 }); break; case 7 : inp_valu.type = VALUE_TYPE.surface; @@ -172,8 +172,8 @@ output.color = surfaceColor;") static onInspector1Update = function() { refreshShader(); } static refreshShader = function() { #region - var vs = inputs[| 0].getValue(); - var fs = inputs[| 1].getValue(); + var vs = getInputData(0); + var fs = getInputData(1); var _dir = DIRECTORY + "shadertemp/"; var vs = @" @@ -220,10 +220,10 @@ struct PixelShaderOutput { var sampler_slot = 1; for( var i = input_fix_len, n = ds_list_size(inputs); i < n; i += data_length ) { - var _arg_name = inputs[| i + 0].getValue(); + var _arg_name = getInputData(i + 0); if(_arg_name == "") continue; - var _arg_type = inputs[| i + 1].getValue(); + var _arg_type = getInputData(i + 1); switch(_arg_type) { case 0 : fs_param += $"float {_arg_name};\n"; break; //u_float diff --git a/scripts/node_image/node_image.gml b/scripts/node_image/node_image.gml index 1b2bea3f3..0644f00f3 100644 --- a/scripts/node_image/node_image.gml +++ b/scripts/node_image/node_image.gml @@ -26,7 +26,7 @@ function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { color = COLORS.node_blend_input; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_load, ["*.png", ""]) + .setDisplay(VALUE_DISPLAY.path_load, { filter: "*.png" }) .rejectArray(); inputs[| 1] = nodeValue("Padding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0, 0, 0]) @@ -85,15 +85,15 @@ function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; static onInspector1Update = function() { - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; updatePaths(path); update(); } static update = function(frame = PROJECT.animator.current_frame) { - var path = inputs[| 0].getValue(); - var pad = inputs[| 1].getValue(); + var path = getInputData(0); + var pad = getInputData(1); if(path == "") return; if(path_current != path) updatePaths(path); diff --git a/scripts/node_image_animated/node_image_animated.gml b/scripts/node_image_animated/node_image_animated.gml index 63268b6f2..543133d4c 100644 --- a/scripts/node_image_animated/node_image_animated.gml +++ b/scripts/node_image_animated/node_image_animated.gml @@ -40,7 +40,7 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons update_on_frame = true; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, []) - .setDisplay(VALUE_DISPLAY.path_array, ["*.png", ""]); + .setDisplay(VALUE_DISPLAY.path_array, { filter: ["*.png", ""] }); inputs[| 1] = nodeValue("Padding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0, 0, 0]) .setDisplay(VALUE_DISPLAY.padding) @@ -57,10 +57,10 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons .rejectArray(); inputs[| 5] = nodeValue("Set animation length to match", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, 0) - .setDisplay(VALUE_DISPLAY.button, [ function() { + .setDisplay(VALUE_DISPLAY.button, { name: "Match length", onClick: function() { if(array_length(spr) == 0) return; PROJECT.animator.frames_total = array_length(spr); - }, "Match length"] ); + } }); inputs[| 6] = nodeValue("Custom frame order", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); @@ -133,15 +133,15 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; static onInspector1Update = function() { #region - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; updatePaths(path); update(); } #endregion static step = function() { #region - var str = inputs[| 2].getValue(); - var _cus = inputs[| 6].getValue(); + var str = getInputData(2); + var _cus = getInputData(6); inputs[| 7].setVisible( _cus); inputs[| 2].setVisible(!_cus); @@ -150,20 +150,20 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons } #endregion static update = function(frame = PROJECT.animator.current_frame) { #region - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; if(is_array(path) && !array_equals(path, path_loaded)) updatePaths(path); if(array_length(spr) == 0) return; - var _pad = inputs[| 1].getValue(); + var _pad = getInputData(1); - var _cus = inputs[| 6].getValue(); - var _str = inputs[| 2].getValue(); - var _end = inputs[| 4].getValue(); - var _spd = _str? (PROJECT.animator.frames_total + 1) / array_length(spr) : 1 / inputs[| 3].getValue(); + var _cus = getInputData(6); + var _str = getInputData(2); + var _end = getInputData(4); + var _spd = _str? (PROJECT.animator.frames_total + 1) / array_length(spr) : 1 / getInputData(3); if(_spd == 0) _spd = 1; - var _frame = _cus? inputs[| 7].getValue() : floor(PROJECT.animator.current_frame / _spd); + var _frame = _cus? getInputData(7) : floor(PROJECT.animator.current_frame / _spd); var _len = array_length(spr); var _drw = true; diff --git a/scripts/node_image_gif/node_image_gif.gml b/scripts/node_image_gif/node_image_gif.gml index a8bd35825..511e059ce 100644 --- a/scripts/node_image_gif/node_image_gif.gml +++ b/scripts/node_image_gif/node_image_gif.gml @@ -29,15 +29,15 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct update_on_frame = true; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_load, ["*.gif", ""]); + .setDisplay(VALUE_DISPLAY.path_load, { filter: "*.gif" }); inputs[| 1] = nodeValue("Set animation length to gif", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, 0) - .setDisplay(VALUE_DISPLAY.button, [ function() { + .setDisplay(VALUE_DISPLAY.button, { name: "Match length", onClick: function() { if(!spr) return; if(!sprite_exists(spr)) return; PROJECT.animator.frames_total = sprite_get_number(spr); PROJECT.animator.framerate = 12; - }, "Match length"] ); + } }); inputs[| 2] = nodeValue("Output as array", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); @@ -86,7 +86,7 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; static onInspector1Update = function() { #region - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; updatePaths(path); update(); @@ -119,9 +119,9 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct } #endregion static step = function() { #region - var _arr = inputs[| 2].getValue(); - var _lop = inputs[| 3].getValue(); - var _cus = inputs[| 5].getValue(); + var _arr = getInputData(2); + var _lop = getInputData(3); + var _cus = getInputData(5); inputs[| 3].setVisible(!_arr); inputs[| 4].setVisible(!_cus); @@ -139,7 +139,7 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct } #endregion static update = function(frame = PROJECT.animator.current_frame) { #region - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; if(path_current != path) updatePaths(path); if(!spr || !sprite_exists(spr)) return; @@ -148,7 +148,7 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct var hh = sprite_get_height(spr); var _outsurf = outputs[| 0].getValue(); - var array = inputs[| 2].getValue(); + var array = getInputData(2); if(array) { var amo = sprite_get_number(spr); @@ -172,11 +172,11 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct return; } - var _loop = inputs[| 3].getValue(); - var _strt = inputs[| 4].getValue(); - var _cust = inputs[| 5].getValue(); - var _spd = inputs[| 7].getValue(); - var _frm = _cust? inputs[| 6].getValue() : PROJECT.animator.current_frame * _spd - _strt; + var _loop = getInputData(3); + var _strt = getInputData(4); + var _cust = getInputData(5); + var _spd = getInputData(7); + var _frm = _cust? getInputData(6) : PROJECT.animator.current_frame * _spd - _strt; var _len = sprite_get_number(spr); var _drw = true; diff --git a/scripts/node_image_sequence/node_image_sequence.gml b/scripts/node_image_sequence/node_image_sequence.gml index 9d35902b4..8cfc33bdb 100644 --- a/scripts/node_image_sequence/node_image_sequence.gml +++ b/scripts/node_image_sequence/node_image_sequence.gml @@ -37,7 +37,7 @@ function Node_Image_Sequence(_x, _y, _group = noone) : Node(_x, _y, _group) cons color = COLORS.node_blend_input; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, []) - .setDisplay(VALUE_DISPLAY.path_array, ["*.png", ""]); + .setDisplay(VALUE_DISPLAY.path_array, { filter: ["*.png", ""] }); inputs[| 1] = nodeValue("Padding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0, 0, 0]) .setDisplay(VALUE_DISPLAY.padding) @@ -87,7 +87,7 @@ function Node_Image_Sequence(_x, _y, _group = noone) : Node(_x, _y, _group) cons insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; static onInspector1Update = function() { - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; updatePaths(path); update(); @@ -123,17 +123,17 @@ function Node_Image_Sequence(_x, _y, _group = noone) : Node(_x, _y, _group) cons } static update = function(frame = PROJECT.animator.current_frame) { - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; if(!is_array(path)) path = [ path ]; if(!array_equals(path, path_loaded)) updatePaths(path); - var pad = inputs[| 1].getValue(); - var can = inputs[| 2].getValue(); + var pad = getInputData(1); + var can = getInputData(2); inputs[| 3].setVisible(can != CANVAS_SIZE.individual); - var siz = inputs[| 3].getValue(); + var siz = getInputData(3); var ww = -1, hh = -1; var _ww = -1, _hh = -1; diff --git a/scripts/node_image_splice_sheet/node_image_splice_sheet.gml b/scripts/node_image_splice_sheet/node_image_splice_sheet.gml index dc760af9b..88e387ee0 100644 --- a/scripts/node_image_splice_sheet/node_image_splice_sheet.gml +++ b/scripts/node_image_splice_sheet/node_image_splice_sheet.gml @@ -30,16 +30,16 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Horizontal", "Vertical"]); inputs[| 10] = nodeValue("Auto fill", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, 0, "Automatically set amount based on sprite size.") - .setDisplay(VALUE_DISPLAY.button, [ function() { - var _sur = inputs[| 0].getValue(); + .setDisplay(VALUE_DISPLAY.button, { name: "Auto fill", onClick: function() { + var _sur = getInputData(0); if(!is_surface(_sur) || _sur == DEF_SURFACE) return; var ww = surface_get_width_safe(_sur); var hh = surface_get_height_safe(_sur); - var _size = inputs[| 1].getValue(); - var _offs = inputs[| 4].getValue(); - var _spac = inputs[| 5].getValue(); - var _orie = inputs[| 9].getValue(); + var _size = getInputData(1); + var _offs = getInputData(4); + var _spac = getInputData(5); + var _orie = getInputData(9); var sh_w = _size[0] + _spac[0]; var sh_h = _size[1] + _spac[1]; @@ -53,14 +53,14 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 3].setValue([ fill_h, fill_w ]); inspector1Update(); - }, "Auto fill"] ); + } }); inputs[| 11] = nodeValue("Sync animation", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, 0) - .setDisplay(VALUE_DISPLAY.button, [ function() { + .setDisplay(VALUE_DISPLAY.button, { name: "Sync frames", onClick: function() { var _atl = outputs[| 1].getValue(); - var _spd = inputs[| 8].getValue(); + var _spd = getInputData(8); PROJECT.animator.frames_total = max(1, _spd == 0? 1 : ceil(array_length(_atl) / _spd)); - }, "Sync frames"] ); + } }); inputs[| 12] = nodeValue("Filter empty output", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); @@ -93,14 +93,14 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru sprite_valid = []; - static getPreviewValues = function() { return inputs[| 0].getValue(); } + static getPreviewValues = function() { return getInputData(0); } function getSpritePosition(index) { var _dim = curr_dim; var _col = curr_amo[0]; var _off = curr_off; - var _spa = inputs[| 5].getValue(); - var _ori = inputs[| 9].getValue(); + var _spa = getInputData(5); + var _ori = getInputData(9); var _irow = floor(index / _col); var _icol = safe_mod(index, _col); @@ -117,16 +117,16 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru } static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _inSurf = inputs[| 0].getValue(); + var _inSurf = getInputData(0); if(!is_surface(_inSurf)) return; - var _out = inputs[| 7].getValue(); - var _spc = inputs[| 5].getValue(); + var _out = getInputData(7); + var _spc = getInputData(5); if(drag_type == 0) { - curr_dim = inputs[| 1].getValue(); - curr_amo = inputs[| 3].getValue(); - curr_off = inputs[| 4].getValue(); + curr_dim = getInputData(1); + curr_amo = getInputData(3); + curr_off = getInputData(4); } var _amo = array_safe_get(curr_amo, 0) * array_safe_get(curr_amo, 1); @@ -180,9 +180,9 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru } #region area - var __dim = inputs[| 1].getValue(); - var __amo = inputs[| 3].getValue(); - var __off = inputs[| 4].getValue(); + var __dim = getInputData(1); + var __amo = getInputData(3); + var __off = getInputData(4); var _ax = __off[0] * _s + _x; var _ay = __off[1] * _s + _y; @@ -262,9 +262,9 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru } static step = function() { - var _out = inputs[| 7].getValue(); - var _filt = inputs[| 12].getValue(); - var _flty = inputs[| 13].getValue(); + var _out = getInputData(7); + var _filt = getInputData(12); + var _flty = getInputData(13); inputs[| 11].setVisible(!_out); inputs[| 8].setVisible(!_out); @@ -279,24 +279,24 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru static doInspectorAction = function() { var _atl = []; - var _inSurf = inputs[| 0].getValue(); + var _inSurf = getInputData(0); if(!is_surface(_inSurf)) return; var _outSurf = outputs[| 0].getValue(); - var _out = inputs[| 7].getValue(); + var _out = getInputData(7); - var _dim = inputs[| 1].getValue(); - var _amo = inputs[| 3].getValue(); - var _off = inputs[| 4].getValue(); + var _dim = getInputData(1); + var _amo = getInputData(3); + var _off = getInputData(4); var _total = _amo[0] * _amo[1]; - var _pad = inputs[| 6].getValue(); + var _pad = getInputData(6); var ww = _dim[0] + _pad[0] + _pad[2]; var hh = _dim[1] + _pad[1] + _pad[3]; - var _filt = inputs[| 12].getValue(); - var _fltp = inputs[| 13].getValue(); - var _flcl = inputs[| 14].getValue(); + var _filt = getInputData(12); + var _fltp = getInputData(13); + var _flcl = getInputData(14); var cDep = attrDepth(); curr_dim = _dim; @@ -371,14 +371,14 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru static update = function(frame = PROJECT.animator.current_frame) { if(isInLoop()) doInspectorAction(); - var _out = inputs[| 7].getValue(); + var _out = getInputData(7); if(_out == 1) { outputs[| 0].setValue(surf_array); update_on_frame = false; return; } - var _spd = inputs[| 8].getValue(); + var _spd = getInputData(8); update_on_frame = true; if(array_length(surf_array)) { diff --git a/scripts/node_invert/node_invert.gml b/scripts/node_invert/node_invert.gml index 5c0e1f956..73291ef52 100644 --- a/scripts/node_invert/node_invert.gml +++ b/scripts/node_invert/node_invert.gml @@ -6,7 +6,7 @@ function Node_Invert(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 2] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 3] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 3; diff --git a/scripts/node_isosurf/node_isosurf.gml b/scripts/node_isosurf/node_isosurf.gml index 37a88ae64..a60eb2125 100644 --- a/scripts/node_isosurf/node_isosurf.gml +++ b/scripts/node_isosurf/node_isosurf.gml @@ -23,8 +23,8 @@ function Node_IsoSurf(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c angle_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { var hh = ui(240); - var _surfs = inputs[| 1].getValue(); - var _angle = inputs[| 3].getValue(); + var _surfs = getInputData(1); + var _angle = getInputData(3); var _kx = _x + _w / 2; var _ky = _y + hh / 2; @@ -95,7 +95,7 @@ function Node_IsoSurf(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c static onValueUpdate = function(index) { if(index == 0) { - var _amo = inputs[| 0].getValue(); + var _amo = getInputData(0); var _ang = array_create(_amo); for( var i = 0, n = _amo; i < n; i++ ) diff --git a/scripts/node_iterate/node_iterate.gml b/scripts/node_iterate/node_iterate.gml index cb56e489d..4c4c76841 100644 --- a/scripts/node_iterate/node_iterate.gml +++ b/scripts/node_iterate/node_iterate.gml @@ -22,7 +22,7 @@ function Node_Iterate(_x, _y, _group = noone) : Node_Iterator(_x, _y, _group) co output.inputs[| 2].setFrom(input.outputs[| 1]); } - static getIterationCount = function() { return inputs[| 0].getValue(); } + static getIterationCount = function() { return getInputData(0); } PATCH_STATIC } \ No newline at end of file diff --git a/scripts/node_iterate_each/node_iterate_each.gml b/scripts/node_iterate_each/node_iterate_each.gml index 0a8059d38..3f75c5b30 100644 --- a/scripts/node_iterate_each/node_iterate_each.gml +++ b/scripts/node_iterate_each/node_iterate_each.gml @@ -30,7 +30,7 @@ function Node_Iterate_Each(_x, _y, _group = noone) : Node_Iterator(_x, _y, _grou } static doInitLoop = function() { - var arrIn = inputs[| 0].getValue(); + var arrIn = getInputData(0); var arrOut = outputs[| 0].getValue(); if(array_length(arrOut) != array_length(arrIn)) { @@ -40,7 +40,7 @@ function Node_Iterate_Each(_x, _y, _group = noone) : Node_Iterator(_x, _y, _grou } static getIterationCount = function() { - var arrIn = inputs[| 0].getValue(); + var arrIn = getInputData(0); var maxIter = is_array(arrIn)? array_length(arrIn) : 0; if(!is_real(maxIter)) maxIter = 1; diff --git a/scripts/node_iterate_filter/node_iterate_filter.gml b/scripts/node_iterate_filter/node_iterate_filter.gml index db28910f3..76ddaa97b 100644 --- a/scripts/node_iterate_filter/node_iterate_filter.gml +++ b/scripts/node_iterate_filter/node_iterate_filter.gml @@ -32,7 +32,7 @@ function Node_Iterate_Filter(_x, _y, _group = noone) : Node_Iterator(_x, _y, _gr } static doInitLoop = function() { - var arrIn = inputs[| 0].getValue(); + var arrIn = getInputData(0); var arrOut = outputs[| 0].getValue(); surface_array_free(arrOut); @@ -40,7 +40,7 @@ function Node_Iterate_Filter(_x, _y, _group = noone) : Node_Iterator(_x, _y, _gr } static getIterationCount = function() { - var arrIn = inputs[| 0].getValue(); + var arrIn = getInputData(0); var maxIter = is_array(arrIn)? array_length(arrIn) : 0; if(!is_real(maxIter)) maxIter = 1; diff --git a/scripts/node_iterate_sort/node_iterate_sort.gml b/scripts/node_iterate_sort/node_iterate_sort.gml index 9fa47a95e..ee1a22999 100644 --- a/scripts/node_iterate_sort/node_iterate_sort.gml +++ b/scripts/node_iterate_sort/node_iterate_sort.gml @@ -119,7 +119,7 @@ function Node_Iterate_Sort(_x, _y, _group = noone) : Node_Collection(_x, _y, _gr return; } - var arrIn = inputs[| 0].getValue(); + var arrIn = getInputData(0); var arrOut = outputs[| 0].getValue(); if(inputs[| 0].type == VALUE_TYPE.surface) { diff --git a/scripts/node_iterator_each_input/node_iterator_each_input.gml b/scripts/node_iterator_each_input/node_iterator_each_input.gml index 26e53dd0f..656ffe68f 100644 --- a/scripts/node_iterator_each_input/node_iterator_each_input.gml +++ b/scripts/node_iterator_each_input/node_iterator_each_input.gml @@ -11,7 +11,7 @@ function Node_Iterator_Each_Input(_x, _y, _group = noone) : Node(_x, _y, _group) return outputs[| 0].getValueDefault(); var ind = group.iterated; - var val = group.inputs[| 0].getValue(); + var val = group.getInputData(0); return [ array_safe_get(val, ind), group.inputs[| 0] ]; } diff --git a/scripts/node_iterator_each_output/node_iterator_each_output.gml b/scripts/node_iterator_each_output/node_iterator_each_output.gml index 3b0b447b4..a4deb49d7 100644 --- a/scripts/node_iterator_each_output/node_iterator_each_output.gml +++ b/scripts/node_iterator_each_output/node_iterator_each_output.gml @@ -53,7 +53,7 @@ function Node_Iterator_Each_Output(_x, _y, _group = noone) : Node(_x, _y, _group return; } - _val[@ ind] = cloneValue(array_safe_get(_val, ind), inputs[| 0].getValue()); + _val[@ ind] = cloneValue(array_safe_get(_val, ind), getInputData(0)); outputs[| 0].setValue(_val); group.outputs[| 0].setValue(_val); diff --git a/scripts/node_iterator_each_size/node_iterator_each_size.gml b/scripts/node_iterator_each_size/node_iterator_each_size.gml index 30c1b6196..08645e6bb 100644 --- a/scripts/node_iterator_each_size/node_iterator_each_size.gml +++ b/scripts/node_iterator_each_size/node_iterator_each_size.gml @@ -11,7 +11,7 @@ function Node_Iterator_Each_Length(_x, _y, _group = noone) : Node(_x, _y, _group static update = function(frame = PROJECT.animator.current_frame) { if(!variable_struct_exists(group, "iterated")) return; - var val = group.inputs[| 0].getValue(); + var val = group.getInputData(0); outputs[| 0].setValue(array_length(val)); } diff --git a/scripts/node_iterator_filter_input/node_iterator_filter_input.gml b/scripts/node_iterator_filter_input/node_iterator_filter_input.gml index bfa79f4bb..1d938690f 100644 --- a/scripts/node_iterator_filter_input/node_iterator_filter_input.gml +++ b/scripts/node_iterator_filter_input/node_iterator_filter_input.gml @@ -11,7 +11,7 @@ function Node_Iterator_Filter_Input(_x, _y, _group = noone) : Node(_x, _y, _grou return outputs[| 0].getValueDefault(); var ind = group.iterated; - var val = group.inputs[| 0].getValue(); + var val = group.getInputData(0); return [ array_safe_get(val, ind), group.inputs[| 0] ]; } diff --git a/scripts/node_iterator_filter_output/node_iterator_filter_output.gml b/scripts/node_iterator_filter_output/node_iterator_filter_output.gml index fc474aff9..fc9f9526f 100644 --- a/scripts/node_iterator_filter_output/node_iterator_filter_output.gml +++ b/scripts/node_iterator_filter_output/node_iterator_filter_output.gml @@ -32,8 +32,8 @@ function Node_Iterator_Filter_Output(_x, _y, _group = noone) : Node(_x, _y, _gro return; } - var val = inputs[| 0].getValue(); - var res = inputs[| 1].getValue(); + var val = getInputData(0); + var res = getInputData(1); var _val = group.outputs[| 0].getValue(); if(!is_array(_val)) { diff --git a/scripts/node_iterator_length/node_iterator_length.gml b/scripts/node_iterator_length/node_iterator_length.gml index 93574a880..a4d14eeb5 100644 --- a/scripts/node_iterator_length/node_iterator_length.gml +++ b/scripts/node_iterator_length/node_iterator_length.gml @@ -11,7 +11,7 @@ function Node_Iterator_Length(_x, _y, _group = noone) : Node(_x, _y, _group) con static update = function(frame = PROJECT.animator.current_frame) { if(!variable_struct_exists(group, "iterated")) return; - var val = group.inputs[| 0].getValue(); + var val = group.getInputData(0); outputs[| 0].setValue(val); } diff --git a/scripts/node_iterator_output/node_iterator_output.gml b/scripts/node_iterator_output/node_iterator_output.gml index 147daed07..b5b3bfe32 100644 --- a/scripts/node_iterator_output/node_iterator_output.gml +++ b/scripts/node_iterator_output/node_iterator_output.gml @@ -62,7 +62,7 @@ function Node_Iterator_Output(_x, _y, _group = noone) : Node_Group_Output(_x, _y return; } - var _val = inputs[| 0].getValue(); + var _val = getInputData(0); cache_value = cloneValue(cache_value, _val); group.iterationUpdate(); } diff --git a/scripts/node_iterator_sort_input/node_iterator_sort_input.gml b/scripts/node_iterator_sort_input/node_iterator_sort_input.gml index bb45a3a2f..7ac8e6692 100644 --- a/scripts/node_iterator_sort_input/node_iterator_sort_input.gml +++ b/scripts/node_iterator_sort_input/node_iterator_sort_input.gml @@ -12,7 +12,7 @@ function Node_Iterator_Sort_Input(_x, _y, _group = noone) : Node(_x, _y, _group) static update = function() { outputs[| 0].type = inputs[| 0].type; - var val = inputs[| 0].getValue(); + var val = getInputData(0); outputs[| 0].setValue(val); } diff --git a/scripts/node_iterator_sort_output/node_iterator_sort_output.gml b/scripts/node_iterator_sort_output/node_iterator_sort_output.gml index c69362040..4f37813f3 100644 --- a/scripts/node_iterator_sort_output/node_iterator_sort_output.gml +++ b/scripts/node_iterator_sort_output/node_iterator_sort_output.gml @@ -14,6 +14,6 @@ function Node_Iterator_Sort_Output(_x, _y, _group = noone) : Node(_x, _y, _group static step = function() {} static update = function(frame = PROJECT.animator.current_frame) { - //print(display_name + ": " + string(inputs[| 0].getValue())); + //print(display_name + ": " + string(getInputData(0))); } } \ No newline at end of file diff --git a/scripts/node_json_file_read/node_json_file_read.gml b/scripts/node_json_file_read/node_json_file_read.gml index 799e00736..924720ecf 100644 --- a/scripts/node_json_file_read/node_json_file_read.gml +++ b/scripts/node_json_file_read/node_json_file_read.gml @@ -32,7 +32,7 @@ function Node_Json_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_load, ["*.json", ""]) + .setDisplay(VALUE_DISPLAY.path_load, { filter: "*.json" }) .rejectArray(); outputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.path, "") @@ -72,7 +72,7 @@ function Node_Json_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; static onInspector1Update = function() { - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; updatePaths(path); update(); @@ -89,7 +89,7 @@ function Node_Json_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons ds_list_add(_ot, outputs[| i]); for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) { - if(inputs[| i].getValue() != "") { + if(getInputData(i) != "") { ds_list_add(_in, inputs[| i + 0]); ds_list_add(_ot, outputs[| i + 1]); } else { @@ -140,14 +140,14 @@ function Node_Json_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons } static update = function(frame = PROJECT.animator.current_frame) { - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; if(path_current != path) updatePaths(path); outputs[| 1].setValue(content); for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i++ ) { - var key = inputs[| i].getValue(); + var key = getInputData(i); var out = outputs[| i + 1]; out.name = key; diff --git a/scripts/node_json_file_write/node_json_file_write.gml b/scripts/node_json_file_write/node_json_file_write.gml index 4c8430299..71884cf5c 100644 --- a/scripts/node_json_file_write/node_json_file_write.gml +++ b/scripts/node_json_file_write/node_json_file_write.gml @@ -6,7 +6,7 @@ function Node_Json_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) con w = 128; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_save, ["*.json", ""]) + .setDisplay(VALUE_DISPLAY.path_save, { filter: "*.json" }) .rejectArray(); inputs[| 1] = nodeValue("Struct", self, JUNCTION_CONNECT.input, VALUE_TYPE.struct, {}) @@ -46,7 +46,7 @@ function Node_Json_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) con } for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { - if(inputs[| i].getValue() != "") { + if(getInputData(i) != "") { ds_list_add(_in, inputs[| i + 0]); ds_list_add(_in, inputs[| i + 1].setVisible(false, true)); @@ -72,14 +72,14 @@ function Node_Json_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) con if(LOADING || APPENDING) return; if(safe_mod(index - input_fix_len, data_length) == 0) { //Variable name - inputs[| index + 1].name = inputs[| index].getValue() + " value"; + inputs[| index + 1].name = getInputData(index) + " value"; } refreshDynamicInput(); } static writeFile = function() { - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; if(filename_ext(path) != ".json") path += ".json"; @@ -88,15 +88,15 @@ function Node_Json_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) con if(inputs[| 1].value_from == noone) { for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) { - var _key = inputs[| i + 0].getValue(); - var _val = inputs[| i + 1].getValue(); + var _key = getInputData(i + 0); + var _val = getInputData(i + 1); inputs[| i + 1].type = inputs[| i + 1].value_from? inputs[| i + 1].value_from.type : VALUE_TYPE.any; variable_struct_set(cont, _key, _val); } } else - cont = inputs[| 1].getValue(); + cont = getInputData(1); json_save_struct(path, cont); } @@ -115,7 +115,7 @@ function Node_Json_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) con static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); - var str = filename_name(inputs[| 0].getValue()); + var str = filename_name(getInputData(0)); if(filename_ext(str) != ".json") str += ".json"; diff --git a/scripts/node_lerp/node_lerp.gml b/scripts/node_lerp/node_lerp.gml index eb36737b7..89f143185 100644 --- a/scripts/node_lerp/node_lerp.gml +++ b/scripts/node_lerp/node_lerp.gml @@ -8,7 +8,7 @@ function Node_Lerp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 0] = nodeValue("a", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); inputs[| 1] = nodeValue("b", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); inputs[| 2] = nodeValue("Progress", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, .01]); + .setDisplay(VALUE_DISPLAY.slider_range); outputs[| 0] = nodeValue("Result", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0); diff --git a/scripts/node_level/node_level.gml b/scripts/node_level/node_level.gml index 6c550e678..51fe32721 100644 --- a/scripts/node_level/node_level.gml +++ b/scripts/node_level/node_level.gml @@ -16,24 +16,24 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 1] = nodeValue("White", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 1]) - .setDisplay(VALUE_DISPLAY.slider_range, [ 0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider_range); inputs[| 2] = nodeValue("Red", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 1]) - .setDisplay(VALUE_DISPLAY.slider_range, [ 0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider_range); inputs[| 3] = nodeValue("Green", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 1]) - .setDisplay(VALUE_DISPLAY.slider_range, [ 0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider_range); inputs[| 4] = nodeValue("Blue", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 1]) - .setDisplay(VALUE_DISPLAY.slider_range, [ 0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider_range); inputs[| 5] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 1]) - .setDisplay(VALUE_DISPLAY.slider_range, [ 0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider_range); inputs[| 6] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 7] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 8] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 8; @@ -50,7 +50,7 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con var y1 = _y + _h; draw_set_color(COLORS.node_level_shade); - var _wh = inputs[| 1].getValue(); + var _wh = getInputData(1); var _wmin = min(_wh[0], _wh[1]); var _wmax = max(_wh[0], _wh[1]); diff --git a/scripts/node_level_selector/node_level_selector.gml b/scripts/node_level_selector/node_level_selector.gml index 004480961..abdbbf975 100644 --- a/scripts/node_level_selector/node_level_selector.gml +++ b/scripts/node_level_selector/node_level_selector.gml @@ -8,15 +8,15 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 1] = nodeValue("Mid point", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 2] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 5; @@ -33,8 +33,8 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g var y1 = _y + _h; level_renderer.h = 128; - var _middle = inputs[| 1].getValue(); - var _span = inputs[| 2].getValue(); + var _middle = getInputData(1); + var _span = getInputData(2); var _min = _middle - _span; var _max = _middle + _span; diff --git a/scripts/node_line/node_line.gml b/scripts/node_line/node_line.gml index b0ff2f321..4d03279a1 100644 --- a/scripts/node_line/node_line.gml +++ b/scripts/node_line/node_line.gml @@ -7,13 +7,13 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 1] = nodeValue("Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); inputs[| 2] = nodeValue("Segment", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.slider, [1, 32, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 1] }); inputs[| 3] = nodeValue("Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 2, 2 ]) .setDisplay(VALUE_DISPLAY.vector); inputs[| 4] = nodeValue("Wiggle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [0, 16, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.01] }); inputs[| 5] = nodeValue("Random seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); @@ -25,10 +25,10 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons .setArrayDepth(1); inputs[| 8] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 1], "Range of the path to draw.") - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider_range); inputs[| 9] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY._default, 1 / 64); + .setDisplay(VALUE_DISPLAY._default, { slide_speed: 1 / 64 }); inputs[| 10] = nodeValue("Color over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ); @@ -39,7 +39,7 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 13] = nodeValue("Round cap", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); inputs[| 14] = nodeValue("Round segment", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4) - .setDisplay(VALUE_DISPLAY.slider, [2, 16, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 1] }); inputs[| 15] = nodeValue("Span color over path", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Apply the full 'color over length' to the trimmed path."); @@ -101,9 +101,9 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons } static step = function() { - var px = !inputs[| 17].getValue(); + var px = !getInputData(17); var _tex = inputs[| 18].value_from != noone; - var _flen = inputs[| 19].getValue(); + var _flen = getInputData(19); inputs[| 3].setVisible(px); inputs[| 11].setVisible(px); diff --git a/scripts/node_local_analyze/node_local_analyze.gml b/scripts/node_local_analyze/node_local_analyze.gml index 96597cc4c..1ec8b2116 100644 --- a/scripts/node_local_analyze/node_local_analyze.gml +++ b/scripts/node_local_analyze/node_local_analyze.gml @@ -14,7 +14,7 @@ function Node_Local_Analyze(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Average (Blur)", "Maximum", "Minimum" ]); inputs[| 2] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [ 1, 16, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 16, 1] }); inputs[| 3] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]); @@ -25,7 +25,7 @@ function Node_Local_Analyze(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 7; diff --git a/scripts/node_logic_operate/node_logic_operate.gml b/scripts/node_logic_operate/node_logic_operate.gml index 47228dcea..c04a7d301 100644 --- a/scripts/node_logic_operate/node_logic_operate.gml +++ b/scripts/node_logic_operate/node_logic_operate.gml @@ -100,7 +100,7 @@ function Node_Logic(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static onValueUpdate = function(index) { if(index != 0) return; - var mode = inputs[| 0].getValue(); + var mode = getInputData(0); switch(mode) { case LOGIC_OPERATOR.lnot : trimInputs(1); @@ -122,7 +122,7 @@ function Node_Logic(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static onValueFromUpdate = function(index) { if(LOADING || APPENDING) return; - var mode = inputs[| 0].getValue(); + var mode = getInputData(0); switch(mode) { case LOGIC_OPERATOR.lnot : trimInputs(1); @@ -152,12 +152,6 @@ function Node_Logic(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { return false; } - static step = function() { - var mode = inputs[| 0].getValue(); - - //inputs[| 2].setVisible(mode != LOGIC_OPERATOR.lnot, mode != LOGIC_OPERATOR.lnot); - } - function evalLogicArray(mode, a, b = false) { var as = is_array(a); var bs = is_array(b); @@ -182,8 +176,8 @@ function Node_Logic(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { } static update = function(frame = PROJECT.animator.current_frame) { - var mode = inputs[| 0].getValue(); - var a = inputs[| 1].getValue(); + var mode = getInputData(0); + var a = getInputData(1); var val; switch(mode) { @@ -193,7 +187,7 @@ function Node_Logic(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { case LOGIC_OPERATOR.lnand : case LOGIC_OPERATOR.lnor : case LOGIC_OPERATOR.lxor : - var b = inputs[| 2].getValue(); + var b = getInputData(2); val = evalLogicArray(mode, a, b); break; @@ -202,7 +196,7 @@ function Node_Logic(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var val = a; var to = max(2, ds_list_size(inputs) - 1); for( var i = 2; i < to; i++ ) { - var b = inputs[| i].getValue(); + var b = getInputData(i); val = evalLogicArray(mode, val, b); } } @@ -213,7 +207,7 @@ function Node_Logic(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { draw_set_text(f_h3, fa_center, fa_center, COLORS._main_text); var str = ""; - switch(inputs[| 0].getValue()) { + switch(getInputData(0)) { case LOGIC_OPERATOR.land : str = "And"; break; case LOGIC_OPERATOR.lor : str = "Or"; break; case LOGIC_OPERATOR.lnot : str = "Not"; break; diff --git a/scripts/node_lua_compute/node_lua_compute.gml b/scripts/node_lua_compute/node_lua_compute.gml index 53dc489cd..510c40a87 100644 --- a/scripts/node_lua_compute/node_lua_compute.gml +++ b/scripts/node_lua_compute/node_lua_compute.gml @@ -5,7 +5,7 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 0] = nodeValue("Function name", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "render" + string(irandom_range(100000, 999999))); inputs[| 1] = nodeValue("Return type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Number", "String", "Struct" ], { update_hover: false }); + .setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Number", "String", "Struct" ], update_hover: false }); inputs[| 2] = nodeValue("Lua code", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "", o_dialog_lua_reference) .setDisplay(VALUE_DISPLAY.codeLUA); @@ -20,7 +20,7 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| index + 0] = nodeValue("Argument name", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "" ); inputs[| index + 1] = nodeValue("Argument type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Number", "String", "Surface", "Struct" ], { update_hover: false }); + .setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Number", "String", "Surface", "Struct" ], update_hover: false }); inputs[| index + 1].editWidget.interactable = false; inputs[| index + 2] = nodeValue("Argument value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) @@ -71,7 +71,7 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru error_notification = noone; } - var _type = inputs[| 1].getValue(); + var _type = getInputData(1); switch(_type) { case 0 : outputs[| 1].type = VALUE_TYPE.float; break; case 1 : outputs[| 1].type = VALUE_TYPE.text; break; @@ -94,7 +94,7 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru array_resize(input_display_list, input_display_len); for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { - if(inputs[| i].getValue() != "") { + if(getInputData(i) != "") { ds_list_add(_in, inputs[| i + 0]); ds_list_add(_in, inputs[| i + 1]); ds_list_add(_in, inputs[| i + 2]); @@ -103,7 +103,7 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru if(inputs[| i + 2].editWidget != noone) inputs[| i + 2].editWidget.interactable = true; - var type = inputs[| i + 1].getValue(); + var type = getInputData(i + 1); switch(type) { case 0 : inputs[| i + 2].type = VALUE_TYPE.float; break; case 1 : inputs[| i + 2].type = VALUE_TYPE.text; break; @@ -153,7 +153,7 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru static step = function() { for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) { - var name = inputs[| i + 0].getValue(); + var name = getInputData(i + 0); inputs[| i + 2].name = name; } } @@ -162,15 +162,15 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru if(!compiled) return; //if(!PROJECT.animator.is_playing || !PROJECT.animator.frame_progress) return; - var _func = inputs[| 0].getValue(); - var _dimm = inputs[| 1].getValue(); - var _exec = inputs[| 4].getValue(); + var _func = getInputData(0); + var _dimm = getInputData(1); + var _exec = getInputData(4); if(!_exec) return; argument_val = []; for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) - array_push(argument_val, inputs[| i + 2].getValue()); + array_push(argument_val, getInputData(i + 2)); //if(PROJECT.animator.current_frame == 0) { //refresh state on the first frame // lua_state_destroy(lua_state); @@ -191,12 +191,12 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru } static addCode = function() { - var _func = inputs[| 0].getValue(); - var _code = inputs[| 2].getValue(); + var _func = getInputData(0); + var _code = getInputData(2); argument_name = []; for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) { - array_push(argument_name, inputs[| i + 0].getValue()); + array_push(argument_name, getInputData(i + 0)); } var lua_code = "function " + _func + "("; @@ -242,8 +242,8 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru refreshDynamicInput(); for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) { - var name = inputs[| i + 0].getValue(); - var type = inputs[| i + 1].getValue(); + var name = getInputData(i + 0); + var type = getInputData(i + 1); inputs[| i + 2].name = name; diff --git a/scripts/node_lua_global/node_lua_global.gml b/scripts/node_lua_global/node_lua_global.gml index 08cfda602..dc1e7eec0 100644 --- a/scripts/node_lua_global/node_lua_global.gml +++ b/scripts/node_lua_global/node_lua_global.gml @@ -25,7 +25,7 @@ function Node_Lua_Global(_x, _y, _group = noone) : Node(_x, _y, _group) construc compiled = false; static stepBegin = function() { - var _type = inputs[| 1].getValue(); + var _type = getInputData(1); if(PROJECT.animator.is_playing && PROJECT.animator.frame_progress && (PROJECT.animator.current_frame == 0 || _type == 1)) setRenderStatus(false); @@ -62,8 +62,8 @@ function Node_Lua_Global(_x, _y, _group = noone) : Node(_x, _y, _group) construc if(!compiled) return; //if(!PROJECT.animator.is_playing || !PROJECT.animator.frame_progress) return; - var _code = inputs[| 0].getValue(); - var _type = inputs[| 1].getValue(); + var _code = getInputData(0); + var _type = getInputData(1); //if(PROJECT.animator.current_frame == 0) { //rerfesh state on the first frame // lua_state_destroy(lua_state); diff --git a/scripts/node_lua_surface/node_lua_surface.gml b/scripts/node_lua_surface/node_lua_surface.gml index 52b6ad29d..330448eb6 100644 --- a/scripts/node_lua_surface/node_lua_surface.gml +++ b/scripts/node_lua_surface/node_lua_surface.gml @@ -20,7 +20,7 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| index + 0] = nodeValue("Argument name", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "" ); inputs[| index + 1] = nodeValue("Argument type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Number", "String", "Surface", "Struct" ], { update_hover: false }); + .setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Number", "String", "Surface", "Struct" ], update_hover: false }); inputs[| index + 1].editWidget.interactable = false; inputs[| index + 2] = nodeValue("Argument value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) @@ -88,7 +88,7 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru array_resize(input_display_list, input_display_len); for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { - if(inputs[| i].getValue() != "") { + if(getInputData(i) != "") { ds_list_add(_in, inputs[| i + 0]); ds_list_add(_in, inputs[| i + 1]); ds_list_add(_in, inputs[| i + 2]); @@ -97,7 +97,7 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru if(inputs[| i + 2].editWidget != noone) inputs[| i + 2].editWidget.interactable = true; - var type = inputs[| i + 1].getValue(); + var type = getInputData(i + 1); switch(type) { case 0 : inputs[| i + 2].type = VALUE_TYPE.float; break; case 1 : inputs[| i + 2].type = VALUE_TYPE.text; break; @@ -147,7 +147,7 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru static step = function() { for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) { - var name = inputs[| i + 0].getValue(); + var name = getInputData(i + 0); inputs[| i + 2].name = name; } } @@ -156,15 +156,15 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru if(!compiled) return; //if(!PROJECT.animator.is_playing || !PROJECT.animator.frame_progress) return; - var _func = inputs[| 0].getValue(); - var _dimm = inputs[| 1].getValue(); - var _exec = inputs[| 4].getValue(); + var _func = getInputData(0); + var _dimm = getInputData(1); + var _exec = getInputData(4); if(!_exec) return; argument_val = []; for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) { - array_push(argument_val, inputs[| i + 2].getValue()); + array_push(argument_val, getInputData(i + 2)); } //if(PROJECT.animator.current_frame == 0) { //rerfesh state on the first frame @@ -187,12 +187,12 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru } static addCode = function() { - var _func = inputs[| 0].getValue(); - var _code = inputs[| 2].getValue(); + var _func = getInputData(0); + var _code = getInputData(2); argument_name = []; for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) { - array_push(argument_name, inputs[| i + 0].getValue()); + array_push(argument_name, getInputData(i + 0)); } var lua_code = "function " + _func + "("; @@ -237,8 +237,8 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru refreshDynamicInput(); for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) { - var name = inputs[| i + 0].getValue(); - var type = inputs[| i + 1].getValue(); + var name = getInputData(i + 0); + var type = getInputData(i + 1); inputs[| i + 2].name = name; diff --git a/scripts/node_math/node_math.gml b/scripts/node_math/node_math.gml index 4b1daaf4f..0c7fe9902 100644 --- a/scripts/node_math/node_math.gml +++ b/scripts/node_math/node_math.gml @@ -109,7 +109,7 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { } static step = function() { - var mode = inputs[| 0].getValue(); + var mode = getInputData(0); switch(mode) { case MATH_OPERATOR.sin : @@ -128,7 +128,7 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { case MATH_OPERATOR.ceiling : inputs[| 4].setVisible(true); - var int = inputs[| 4].getValue(); + var int = getInputData(4); if(int) outputs[| 0].type = VALUE_TYPE.integer; else outputs[| 0].type = VALUE_TYPE.float; break; @@ -202,11 +202,11 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { } static update = function(frame = PROJECT.animator.current_frame) { - use_mod = inputs[| 0].getValue(); - var a = inputs[| 1].getValue(); - var b = inputs[| 2].getValue(); - use_deg = inputs[| 3].getValue(); - var c = inputs[| 5].getValue(); + use_mod = getInputData(0); + var a = getInputData(1); + var b = getInputData(2); + use_deg = getInputData(3); + var c = getInputData(5); var val = evalArray(a, b, c); outputs[| 0].setValue(val); @@ -215,7 +215,7 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { draw_set_text(f_h3, fa_center, fa_center, COLORS._main_text); var str = ""; - switch(inputs[| 0].getValue()) { + switch(getInputData(0)) { case MATH_OPERATOR.add : str = "+"; break; case MATH_OPERATOR.subtract : str = "-"; break; case MATH_OPERATOR.multiply : str = "*"; break; 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 2adf38390..6f28c728b 100644 --- a/scripts/node_mesh_create_path/node_mesh_create_path.gml +++ b/scripts/node_mesh_create_path/node_mesh_create_path.gml @@ -23,9 +23,9 @@ function Node_Mesh_Create_Path(_x, _y, _group = noone) : Node(_x, _y, _group) co } static update = function() { - var _pth = inputs[| 0].getValue(); - var _sam = inputs[| 1].getValue(); - var _algo = inputs[| 2].getValue(); + var _pth = getInputData(0); + var _sam = getInputData(1); + var _algo = getInputData(2); var mesh = new Mesh(); if(_pth == noone) return; diff --git a/scripts/node_mesh_to_path/node_mesh_to_path.gml b/scripts/node_mesh_to_path/node_mesh_to_path.gml index 90b90ed7c..1a8cb1af0 100644 --- a/scripts/node_mesh_to_path/node_mesh_to_path.gml +++ b/scripts/node_mesh_to_path/node_mesh_to_path.gml @@ -14,7 +14,7 @@ function Node_Mesh_To_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constr lengths = []; static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var mesh = inputs[| 0].getValue(); + var mesh = getInputData(0); if(mesh == noone) return; draw_set_color(c_grey); @@ -49,7 +49,7 @@ function Node_Mesh_To_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constr } static update = function() { - var _mesh = inputs[| 0].getValue(); + var _mesh = getInputData(0); outputs[| 0].setValue(self); if(_mesh == noone) return; diff --git a/scripts/node_mesh_transform/node_mesh_transform.gml b/scripts/node_mesh_transform/node_mesh_transform.gml index b33e46eb6..d982021b5 100644 --- a/scripts/node_mesh_transform/node_mesh_transform.gml +++ b/scripts/node_mesh_transform/node_mesh_transform.gml @@ -22,7 +22,7 @@ function Node_Mesh_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) cons outputs[| 0] = nodeValue("Mesh", self, JUNCTION_CONNECT.output, VALUE_TYPE.mesh, noone); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var pos = inputs[| 1].getValue(); + var pos = getInputData(1); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; @@ -49,11 +49,11 @@ function Node_Mesh_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) cons } static update = function() { - var _msh = inputs[| 0].getValue(); - var _pos = inputs[| 1].getValue(); - var _rot = inputs[| 2].getValue(); - var _sca = inputs[| 3].getValue(); - var _anc = inputs[| 4].getValue(); + var _msh = getInputData(0); + var _pos = getInputData(1); + var _rot = getInputData(2); + var _sca = getInputData(3); + var _anc = getInputData(4); if(_msh == noone) return; var mesh = _msh.clone(); diff --git a/scripts/node_mirror/node_mirror.gml b/scripts/node_mirror/node_mirror.gml index 068df7f07..da5215b1e 100644 --- a/scripts/node_mirror/node_mirror.gml +++ b/scripts/node_mirror/node_mirror.gml @@ -25,8 +25,8 @@ function Node_Mirror(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co attribute_surface_depth(); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _pos = inputs[| 1].getValue(); - var _ang = inputs[| 2].getValue(); + var _pos = getInputData(1); + var _ang = getInputData(2); var _posx = _pos[0] * _s + _x; var _posy = _pos[1] * _s + _y; diff --git a/scripts/node_morph_surface/node_morph_surface.gml b/scripts/node_morph_surface/node_morph_surface.gml index 3f4e82506..d25ed7b67 100644 --- a/scripts/node_morph_surface/node_morph_surface.gml +++ b/scripts/node_morph_surface/node_morph_surface.gml @@ -6,10 +6,10 @@ function Node_Morph_Surface(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 1] = nodeValue("Surface to", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 2] = nodeValue("Morph amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 3] = nodeValue("Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_noise/node_noise.gml b/scripts/node_noise/node_noise.gml index b49d00577..8e2e402fe 100644 --- a/scripts/node_noise/node_noise.gml +++ b/scripts/node_noise/node_noise.gml @@ -10,13 +10,13 @@ function Node_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con .setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "RGB", "HSV" ]); inputs[| 3] = nodeValue("Color R range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, .01]); + .setDisplay(VALUE_DISPLAY.slider_range); inputs[| 4] = nodeValue("Color G range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, .01]); + .setDisplay(VALUE_DISPLAY.slider_range); inputs[| 5] = nodeValue("Color B range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, .01]); + .setDisplay(VALUE_DISPLAY.slider_range); input_display_list = [ ["Output", false], 0, @@ -29,7 +29,7 @@ function Node_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con attribute_surface_depth(); static step = function() { - var _col = inputs[| 2].getValue(); + var _col = getInputData(2); inputs[| 3].setVisible(_col != 0); inputs[| 4].setVisible(_col != 0); diff --git a/scripts/node_noise_cell/node_noise_cell.gml b/scripts/node_noise_cell/node_noise_cell.gml index 79e20fa75..610b302c6 100644 --- a/scripts/node_noise_cell/node_noise_cell.gml +++ b/scripts/node_noise_cell/node_noise_cell.gml @@ -21,13 +21,13 @@ function Node_Cellular(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.enum_button, [ "Uniform", "Radial" ]); inputs[| 7] = nodeValue("Middle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [0., 1., 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0., 1., 0.01] }); inputs[| 8] = nodeValue("Radial scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 2) - .setDisplay(VALUE_DISPLAY.slider, [1., 10., 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [1., 10., 0.01] }); inputs[| 9] = nodeValue("Radial shatter", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [-10., 10., 0.01]) + .setDisplay(VALUE_DISPLAY.slider, { range: [-10., 10., 0.01] }) .setVisible(false); inputs[| 10] = nodeValue("Colored", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) diff --git a/scripts/node_noise_fbm/node_noise_fbm.gml b/scripts/node_noise_fbm/node_noise_fbm.gml index 9ffb0132e..7ab9b96d5 100644 --- a/scripts/node_noise_fbm/node_noise_fbm.gml +++ b/scripts/node_noise_fbm/node_noise_fbm.gml @@ -18,13 +18,13 @@ function Node_Noise_FBM(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "RGB", "HSV" ]); inputs[| 6] = nodeValue("Color R range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, .01]); + .setDisplay(VALUE_DISPLAY.slider_range); inputs[| 7] = nodeValue("Color G range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, .01]); + .setDisplay(VALUE_DISPLAY.slider_range); inputs[| 8] = nodeValue("Color B range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, .01]); + .setDisplay(VALUE_DISPLAY.slider_range); input_display_list = [ ["Output", false], 0, @@ -37,7 +37,7 @@ function Node_Noise_FBM(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); static step = function() { - var _col = inputs[| 5].getValue(); + var _col = getInputData(5); inputs[| 6].setVisible(_col != 0); inputs[| 7].setVisible(_col != 0); diff --git a/scripts/node_noise_grid/node_noise_grid.gml b/scripts/node_noise_grid/node_noise_grid.gml index abb7d57c1..83b2c24fa 100644 --- a/scripts/node_noise_grid/node_noise_grid.gml +++ b/scripts/node_noise_grid/node_noise_grid.gml @@ -14,7 +14,7 @@ function Node_Grid_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); inputs[| 4] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [-0.5, 0.5, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-0.5, 0.5, 0.01] }); inputs[| 5] = nodeValue("Texture sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); @@ -25,13 +25,13 @@ function Node_Grid_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group .setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "RGB", "HSV" ]); inputs[| 8] = nodeValue("Color R range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, .01]); + .setDisplay(VALUE_DISPLAY.slider_range); inputs[| 9] = nodeValue("Color G range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, .01]); + .setDisplay(VALUE_DISPLAY.slider_range); inputs[| 10] = nodeValue("Color B range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, .01]); + .setDisplay(VALUE_DISPLAY.slider_range); 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 e707f5eac..426391391 100644 --- a/scripts/node_noise_simplex/node_noise_simplex.gml +++ b/scripts/node_noise_simplex/node_noise_simplex.gml @@ -11,19 +11,19 @@ function Node_Noise_Simplex(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr .setDisplay(VALUE_DISPLAY.vector); inputs[| 3] = nodeValue("Iteration", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1 ) - .setDisplay(VALUE_DISPLAY.slider, [1, 16, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 1] }); inputs[| 4] = nodeValue("Color mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "RGB", "HSV" ]); inputs[| 5] = nodeValue("Color R range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, .01]); + .setDisplay(VALUE_DISPLAY.slider_range); inputs[| 6] = nodeValue("Color G range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, .01]); + .setDisplay(VALUE_DISPLAY.slider_range); inputs[| 7] = nodeValue("Color B range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, .01]); + .setDisplay(VALUE_DISPLAY.slider_range); input_display_list = [ ["Output", false], 0, @@ -36,7 +36,7 @@ function Node_Noise_Simplex(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr attribute_surface_depth(); static step = function() { - var _col = inputs[| 4].getValue(); + var _col = getInputData(4); inputs[| 5].setVisible(_col != 0); inputs[| 6].setVisible(_col != 0); diff --git a/scripts/node_normal_light/node_normal_light.gml b/scripts/node_normal_light/node_normal_light.gml index 446e51624..d2462f47b 100644 --- a/scripts/node_normal_light/node_normal_light.gml +++ b/scripts/node_normal_light/node_normal_light.gml @@ -46,7 +46,7 @@ function Node_Normal_Light(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro attribute_surface_depth(); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var pos = inputs[| 4].getValue(); + var pos = getInputData(4); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; diff --git a/scripts/node_number/node_number.gml b/scripts/node_number/node_number.gml index 467f80e68..efc8759d1 100644 --- a/scripts/node_number/node_number.gml +++ b/scripts/node_number/node_number.gml @@ -20,7 +20,7 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 1] = nodeValue("Integer", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); inputs[| 2] = nodeValue("Display", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Number", "Slider", "Rotator" ], { update_hover: false }); + .setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Number", "Slider", "Rotator" ], update_hover: false }); inputs[| 3] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) .setDisplay(VALUE_DISPLAY.range); @@ -150,12 +150,12 @@ function Node_Vector2(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Number", "Coordinate" ]); inputs[| 4] = nodeValue("Reset to center", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, 0) - .setDisplay(VALUE_DISPLAY.button, [ function () { + .setDisplay(VALUE_DISPLAY.button, { name: "To center", onClick: function () { wd_minx = -1; wd_miny = -1; wd_maxx = 1; wd_maxy = 1; - }, "To center" ]); + } }); outputs[| 0] = nodeValue("Vector", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_onion_skin/node_onion_skin.gml b/scripts/node_onion_skin/node_onion_skin.gml index 264621239..6fcaf7722 100644 --- a/scripts/node_onion_skin/node_onion_skin.gml +++ b/scripts/node_onion_skin/node_onion_skin.gml @@ -6,10 +6,10 @@ function Node_Onion_Skin(_x, _y, _group = noone) : Node(_x, _y, _group) construc inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 1] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [-1, 1]) - .setDisplay(VALUE_DISPLAY.slider_range, [ -16, 16, 1 ]); + .setDisplay(VALUE_DISPLAY.slider_range, { range: [ -16, 16, 1 ] }); inputs[| 2] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 3] = nodeValue("Color pre", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_red) @@ -34,15 +34,15 @@ function Node_Onion_Skin(_x, _y, _group = noone) : Node(_x, _y, _group) construc static update = function() { if(!inputs[| 0].value_from) return; - var _surf = inputs[| 0].getValue(); - var _rang = inputs[| 1].getValue(); + var _surf = getInputData(0); + var _rang = getInputData(1); - var _alph = inputs[| 2].getValue(); - var _cpre = inputs[| 3].getValue(); - var _cpos = inputs[| 4].getValue(); + var _alph = getInputData(2); + var _cpre = getInputData(3); + var _cpos = getInputData(4); - var _step = inputs[| 5].getValue(); - var _top = inputs[| 6].getValue(); + var _step = getInputData(5); + var _top = getInputData(6); cacheCurrentFrame(_surf); var _outSurf = outputs[| 0].getValue(); diff --git a/scripts/node_outline/node_outline.gml b/scripts/node_outline/node_outline.gml index cdc8a28b9..3c14faca4 100644 --- a/scripts/node_outline/node_outline.gml +++ b/scripts/node_outline/node_outline.gml @@ -23,7 +23,7 @@ function Node_Outline(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 3] = nodeValue("Blend", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, 0, "Blend outline color with the original color."); inputs[| 4] = nodeValue("Blend alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 5] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) .setDisplay(VALUE_DISPLAY.enum_button, ["Inside", "Outside"]); @@ -38,7 +38,7 @@ function Node_Outline(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 9] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 10] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 11] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 11; @@ -98,7 +98,7 @@ function Node_Outline(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c } static step = function() { - var blend = inputs[| 3].getValue(); + var blend = getInputData(3); inputs[| 4].setVisible(blend); } } \ No newline at end of file diff --git a/scripts/node_pack_sprites/node_pack_sprites.gml b/scripts/node_pack_sprites/node_pack_sprites.gml index 25a7143e9..c7c07dc2e 100644 --- a/scripts/node_pack_sprites/node_pack_sprites.gml +++ b/scripts/node_pack_sprites/node_pack_sprites.gml @@ -4,7 +4,7 @@ function Node_Pack_Sprites(_x, _y, _group = noone) : Node(_x, _y, _group) constr inputs[| 0] = nodeValue("Sprites", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Algorithm", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Skyline", "Shelf", "Top left", "Best fit" ], { update_hover: false }) + .setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Skyline", "Shelf", "Top left", "Best fit" ], update_hover: false }) inputs[| 2] = nodeValue("Max width", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 128); @@ -22,7 +22,7 @@ function Node_Pack_Sprites(_x, _y, _group = noone) : Node(_x, _y, _group) constr static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { var rect = outputs[| 1].getValue(); - var spac = inputs[| 4].getValue(); + var spac = getInputData(4); draw_set_color(COLORS._main_accent); @@ -47,16 +47,16 @@ function Node_Pack_Sprites(_x, _y, _group = noone) : Node(_x, _y, _group) constr } static step = function() { - var algo = inputs[| 1].getValue(); + var algo = getInputData(1); inputs[| 2].setVisible(algo == 1 || algo == 0); inputs[| 3].setVisible(algo == 2 || algo == 0); } static update = function() { - var _inpt = inputs[| 0].getValue(); - var _algo = inputs[| 1].getValue(); - var _spac = inputs[| 4].getValue(); + var _inpt = getInputData(0); + var _algo = getInputData(1); + var _spac = getInputData(4); if(!is_array(_inpt) || array_length(_inpt) == 0) return; @@ -74,16 +74,16 @@ function Node_Pack_Sprites(_x, _y, _group = noone) : Node(_x, _y, _group) constr switch(_algo) { case 0 : - var _wid = inputs[| 2].getValue(); - var _hei = inputs[| 3].getValue(); + var _wid = getInputData(2); + var _hei = getInputData(3); pack = sprite_pack_skyline(_rects, _wid, _hei); break; case 1 : - var _wid = inputs[| 2].getValue(); + var _wid = getInputData(2); pack = sprite_pack_shelf(_rects, _wid); break; case 2 : - var _hei = inputs[| 3].getValue(); + var _hei = getInputData(3); pack = sprite_pack_bottom_left(_rects, _hei); break; case 3 : diff --git a/scripts/node_padding/node_padding.gml b/scripts/node_padding/node_padding.gml index 2eb8f94a3..a22aa3977 100644 --- a/scripts/node_padding/node_padding.gml +++ b/scripts/node_padding/node_padding.gml @@ -39,7 +39,7 @@ function Node_Padding(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c attribute_surface_depth(); static step = function() { - var mode = inputs[| 5].getValue(); + var mode = getInputData(5); inputs[| 1].setVisible(mode == 0); diff --git a/scripts/node_palette/node_palette.gml b/scripts/node_palette/node_palette.gml index 79f0dd28c..dc91cc7b7 100644 --- a/scripts/node_palette/node_palette.gml +++ b/scripts/node_palette/node_palette.gml @@ -8,7 +8,7 @@ function Node_Palette(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c .setDisplay(VALUE_DISPLAY.palette); inputs[| 1] = nodeValue("Trim range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider_range); outputs[| 0] = nodeValue("Palette", self, JUNCTION_CONNECT.output, 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 9c728166e..c6334d94a 100644 --- a/scripts/node_palette_extract/node_palette_extract.gml +++ b/scripts/node_palette_extract/node_palette_extract.gml @@ -17,7 +17,7 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node(_x, _y, _group) con outputs[| 0] = nodeValue("Palette", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, [ ]) .setDisplay(VALUE_DISPLAY.palette); - static getPreviewValues = function() { return inputs[| 0].getValue(); } + static getPreviewValues = function() { return getInputData(0); } input_display_list = [ ["Output", true], 0, @@ -265,7 +265,7 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node(_x, _y, _group) con } static step = function() { - var _algo = inputs[| 3].getValue(); + var _algo = getInputData(3); inputs[| 1].setVisible(_algo != 2); inputs[| 2].setVisible(_algo == 0); @@ -284,10 +284,10 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node(_x, _y, _group) con } static extractPalettes = function() { - var _surf = inputs[| 0].getValue(); - var _size = inputs[| 1].getValue(); - var _seed = inputs[| 2].getValue(); - var _algo = inputs[| 3].getValue(); + var _surf = getInputData(0); + var _size = getInputData(1); + var _seed = getInputData(2); + var _algo = getInputData(3); var res = []; if(is_surface(_surf)) { diff --git a/scripts/node_palette_replacement/node_palette_replacement.gml b/scripts/node_palette_replacement/node_palette_replacement.gml index 66441b2aa..e2ba60154 100644 --- a/scripts/node_palette_replacement/node_palette_replacement.gml +++ b/scripts/node_palette_replacement/node_palette_replacement.gml @@ -14,7 +14,7 @@ function Node_Palette_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _ .setDisplay(VALUE_DISPLAY.palette); inputs[| 3] = nodeValue("Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); input_display_list = [ 0, ["Palette", false], 1, 2, 3, diff --git a/scripts/node_palette_shift/node_palette_shift.gml b/scripts/node_palette_shift/node_palette_shift.gml index e60da71e7..684346fb1 100644 --- a/scripts/node_palette_shift/node_palette_shift.gml +++ b/scripts/node_palette_shift/node_palette_shift.gml @@ -7,12 +7,12 @@ function Node_Palette_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr .setDisplay(VALUE_DISPLAY.palette); inputs[| 2] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.slider, [-1, 1, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 1] }); inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 5; diff --git a/scripts/node_palette_sort/node_palette_sort.gml b/scripts/node_palette_sort/node_palette_sort.gml index ceadc8397..29e51160f 100644 --- a/scripts/node_palette_sort/node_palette_sort.gml +++ b/scripts/node_palette_sort/node_palette_sort.gml @@ -28,7 +28,7 @@ function Node_Palette_Sort(_x, _y, _group = noone) : Node(_x, _y, _group) constr ] static step = function() { - var _typ = inputs[| 1].getValue(); + var _typ = getInputData(1); inputs[| 3].setVisible(_typ == 10); } @@ -62,10 +62,10 @@ function Node_Palette_Sort(_x, _y, _group = noone) : Node(_x, _y, _group) constr } static update = function(frame = PROJECT.animator.current_frame) { - var _arr = inputs[| 0].getValue(); - var _ord = inputs[| 1].getValue(); - var _rev = inputs[| 2].getValue(); - sort_string = inputs[| 3].getValue(); + var _arr = getInputData(0); + var _ord = getInputData(1); + var _rev = getInputData(2); + sort_string = getInputData(3); if(!is_array(_arr)) return; var _pal = array_clone(_arr); diff --git a/scripts/node_particle/node_particle.gml b/scripts/node_particle/node_particle.gml index b5ca31664..384b9fb79 100644 --- a/scripts/node_particle/node_particle.gml +++ b/scripts/node_particle/node_particle.gml @@ -1,8 +1,9 @@ function Node_Particle(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y, _group) constructor { name = "Particle"; use_cache = true; - - inputs[| 3].setDisplay(VALUE_DISPLAY.area, function() { return inputs[| input_len + 0].getValue(); }); + + onSurfaceSize = function() { return getInputData(input_len, DEF_SURF); }; + inputs[| 3].setDisplay(VALUE_DISPLAY.area, { onSurfaceSize }); inputs[| input_len + 0] = nodeValue("Output dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) .setDisplay(VALUE_DISPLAY.vector); @@ -31,7 +32,7 @@ function Node_Particle(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y, _ static onValueUpdate = function(index = 0) { #region if(index == input_len + 0) { - var _dim = inputs[| input_len + 0].getValue(); + var _dim = getInputData(input_len + 0); var _outSurf = outputs[| 0].getValue(); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); @@ -43,7 +44,7 @@ function Node_Particle(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y, _ } #endregion static onStep = function() { #region - var _dim = inputs[| input_len + 0].getValue(); + var _dim = getInputData(input_len + 0); var _outSurf = outputs[| 0].getValue(); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); @@ -53,7 +54,7 @@ function Node_Particle(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y, _ static onUpdate = function() { #region if(ANIMATION_STATIC) { if(!recoverCache()) { - var _dim = inputs[| input_len + 0].getValue(); + var _dim = getInputData(input_len + 0); var _outSurf = outputs[| 0].getValue(); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); outputs[| 0].setValue(_outSurf); diff --git a/scripts/node_path/node_path.gml b/scripts/node_path/node_path.gml index b336ebea6..45d3b78de 100644 --- a/scripts/node_path/node_path.gml +++ b/scripts/node_path/node_path.gml @@ -16,7 +16,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { w = 96; inputs[| 0] = nodeValue("Path progress", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0, "Sample position from path.") - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 1] = nodeValue("Loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) .rejectArray(); @@ -109,9 +109,9 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static onValueUpdate = function(index = 0) { #region if(index == 2) { - var type = inputs[| 2].getValue(); + var type = getInputData(2); if(type == 0) - inputs[| 0].setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + inputs[| 0].setDisplay(VALUE_DISPLAY.slider); else if(type == 1) inputs[| 0].setDisplay(VALUE_DISPLAY._default); } @@ -123,7 +123,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var sample = PREF_MAP[? "path_resolution"]; - var loop = inputs[| 1].getValue(); + var loop = getInputData(1); var ansize = ds_list_size(inputs) - input_fix_len; var _edited = false; @@ -161,7 +161,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var dy = my - transform_my; for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) { - var _p = inputs[| i].getValue(); + var _p = getInputData(i); var p = [ _p[0] + dx / _s, _p[1] + dy / _s @@ -259,7 +259,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var _tr_ry = _transform_maxy - _transform_miny; for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) { - var p = array_clone(inputs[| i].getValue()); + var p = array_clone(getInputData(i)); var _p2 = p[_ANCHOR.x] + p[_ANCHOR.c1x]; var _p3 = p[_ANCHOR.y] + p[_ANCHOR.c1y]; @@ -471,7 +471,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var a = []; for( var i = 0; i < 4; i++ ) - a[i] = array_clone(inputs[| input_fix_len + i].getValue()); + a[i] = array_clone(getInputData(input_fix_len + i)); a[0][_ANCHOR.x] = minx; a[0][_ANCHOR.y] = miny; @@ -509,7 +509,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var a = []; for( var i = 0; i < 4; i++ ) - a[i] = array_clone(inputs[| input_fix_len + i].getValue()); + a[i] = array_clone(getInputData(input_fix_len + i)); a[0][_ANCHOR.x ] = (minx + maxx) / 2; a[0][_ANCHOR.y ] = miny; @@ -565,11 +565,11 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { for(var i = loop? 0 : 1; i < ansize; i++) { if(i) { - _a0 = inputs[| input_fix_len + i - 1].getValue(); - _a1 = inputs[| input_fix_len + i].getValue(); + _a0 = getInputData(input_fix_len + i - 1); + _a1 = getInputData(input_fix_len + i); } else { - _a0 = inputs[| input_fix_len + ansize - 1].getValue(); - _a1 = inputs[| input_fix_len + 0].getValue(); + _a0 = getInputData(input_fix_len + ansize - 1); + _a1 = getInputData(input_fix_len + 0); } var _ox = 0, _oy = 0, _nx = 0, _ny = 0, p = 0, pnt = []; @@ -620,7 +620,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { if(!isUsingTool(0)) for(var i = 0; i < ansize; i++) { - var _a = inputs[| input_fix_len + i].getValue(); + var _a = getInputData(input_fix_len + i); var xx = _x + _a[0] * _s; var yy = _y + _a[1] * _s; var cont = false; @@ -728,7 +728,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { } #endregion } else if(anchor_hover != -1) { #region no tool, dragging existing point - var _a = array_clone(inputs[| input_fix_len + anchor_hover].getValue()); + var _a = array_clone(getInputData(input_fix_len + anchor_hover)); if(isUsingTool(2) && hover_type == 0) { draw_sprite_ui_uniform(THEME.cursor_path_anchor, 0, _mx + 16, _my + 16); @@ -821,8 +821,8 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static updateLength = function() { #region boundary = new BoundingBox(); lengthTotal = 0; - var loop = inputs[| 1].getValue(); - var rond = inputs[| 3].getValue(); + var loop = getInputData(1); + var rond = getInputData(3); if(!is_real(rond)) rond = false; var ansize = ds_list_size(inputs) - input_fix_len; if(ansize < 2) { @@ -842,8 +842,8 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var index_1 = input_fix_len + i + 1; if(index_1 >= ds_list_size(inputs)) index_1 = input_fix_len; - var _a0 = array_clone(inputs[| index_0].getValue()); - var _a1 = array_clone(inputs[| index_1].getValue()); + var _a0 = array_clone(getInputData(index_0)); + var _a1 = array_clone(getInputData(index_1)); if(rond) { _a0[0] = round(_a0[0]); @@ -886,8 +886,8 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { return cached_pos[? _dist].clone(); var _oDist = _dist; - var loop = inputs[| 1].getValue(); - var rond = inputs[| 3].getValue(); + var loop = getInputData(1); + var rond = getInputData(3); if(!is_real(rond)) rond = false; var ansize = array_length(lengths); @@ -933,8 +933,8 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { } #endregion static getPointSegment = function(_rat) { #region - var loop = inputs[| 1].getValue(); - var rond = inputs[| 3].getValue(); + var loop = getInputData(1); + var rond = getInputData(3); if(!is_real(rond)) rond = false; var ansize = array_length(lengths); @@ -942,7 +942,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { if(amo < 1) return new __vec2(0, 0); if(_rat < 0) { - var _p0 = inputs[| input_fix_len].getValue(); + var _p0 = getInputData(input_fix_len); if(rond) return new __vec2(round(_p0[0]), round(_p0[1])); return new __vec2(_p0[0], _p0[1]); @@ -955,7 +955,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { if(_i1 >= amo) { if(!loop) { - var _p1 = inputs[| ds_list_size(inputs) - 1].getValue() + var _p1 = getInputData(ds_list_size(inputs) - 1) if(rond) return new __vec2(round(_p1[0]), round(_p1[1])); return new __vec2(_p1[0], _p1[1]); @@ -964,8 +964,8 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { _i1 = 0; } - var _a0 = array_clone(inputs[| input_fix_len + _i0].getValue()); - var _a1 = array_clone(inputs[| input_fix_len + _i1].getValue()); + var _a0 = array_clone(getInputData(input_fix_len + _i0)); + var _a1 = array_clone(getInputData(input_fix_len + _i1)); if(rond) { _a0[0] = round(_a0[0]); _a0[1] = round(_a0[1]); @@ -980,13 +980,13 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { ds_map_clear(cached_pos); updateLength(); - var _rat = inputs[| 0].getValue(); - var _typ = inputs[| 2].getValue(); - var _rnd = inputs[| 3].getValue(); + var _rat = getInputData(0); + var _typ = getInputData(2); + var _rnd = getInputData(3); var anchors = []; for(var i = input_fix_len; i < ds_list_size(inputs); i++) { - var _anc = array_clone(inputs[| i].getValue()); + var _anc = array_clone(getInputData(i)); if(_rnd) { _anc[0] = round(_anc[0]); diff --git a/scripts/node_path_anchor/node_path_anchor.gml b/scripts/node_path_anchor/node_path_anchor.gml index 6d1e71c56..3adaa9157 100644 --- a/scripts/node_path_anchor/node_path_anchor.gml +++ b/scripts/node_path_anchor/node_path_anchor.gml @@ -24,10 +24,10 @@ function Node_Path_Anchor(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou ]; static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _pos = inputs[| 0].getValue(); - var _cn1 = inputs[| 1].getValue(); - var _cn2 = inputs[| 2].getValue(); - var _mir = inputs[| 3].getValue(); + var _pos = getInputData(0); + var _cn1 = getInputData(1); + var _cn2 = getInputData(2); + var _mir = getInputData(3); var px = _x + _pos[0] * _s; var py = _y + _pos[1] * _s; diff --git a/scripts/node_path_array/node_path_array.gml b/scripts/node_path_array/node_path_array.gml index 10787eff9..557d876f5 100644 --- a/scripts/node_path_array/node_path_array.gml +++ b/scripts/node_path_array/node_path_array.gml @@ -49,7 +49,7 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc static getLineCount = function() { var l = 0; for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i += data_length ) { - var _path = inputs[| i].getValue(); + var _path = getInputData(i); l += struct_has(_path, "getLineCount")? _path.getLineCount() : 1; } return l; @@ -57,7 +57,7 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc static getSegmentCount = function(ind = 0) { for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i += data_length ) { - var _path = inputs[| i].getValue(); + var _path = getInputData(i); var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1; if(ind < lc) return _path.getSegmentCount(ind); @@ -69,7 +69,7 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc static getLength = function(ind = 0) { for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i += data_length ) { - var _path = inputs[| i].getValue(); + var _path = getInputData(i); var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1; if(ind < lc) return _path.getLength(ind); @@ -81,7 +81,7 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc static getAccuLength = function(ind = 0) { for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i += data_length ) { - var _path = inputs[| i].getValue(); + var _path = getInputData(i); var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1; if(ind < lc) return _path.getAccuLength(ind); @@ -93,7 +93,7 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc static get__vec2Ratio = function(_rat, ind = 0) { for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i += data_length ) { - var _path = inputs[| i].getValue(); + var _path = getInputData(i); var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1; if(ind < lc) return _path.get__vec2Ratio(_rat, ind).clone(); @@ -105,7 +105,7 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc static get__vec2Distance = function(_dist, ind = 0) { for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i += data_length ) { - var _path = inputs[| i].getValue(); + var _path = getInputData(i); var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1; if(ind < lc) return _path.get__vec2Distance(_dist, ind).clone(); @@ -117,7 +117,7 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc static getBoundary = function(ind = 0) { for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i += data_length ) { - var _path = inputs[| i].getValue(); + var _path = getInputData(i); var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1; if(ind < lc) return _path.getBoundary(ind); diff --git a/scripts/node_path_blend/node_path_blend.gml b/scripts/node_path_blend/node_path_blend.gml index 9b1f894ae..e8016587a 100644 --- a/scripts/node_path_blend/node_path_blend.gml +++ b/scripts/node_path_blend/node_path_blend.gml @@ -14,20 +14,20 @@ function Node_Path_Blend(_x, _y, _group = noone) : Node(_x, _y, _group) construc .rejectArray(); inputs[| 2] = nodeValue("Ratio", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]) + .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); outputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.pathnode, self); static getLineCount = function() { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getLineCount")? _path.getLineCount() : 1; } static getSegmentCount = function(ind = 0) { - var _path1 = inputs[| 0].getValue(); - var _path2 = inputs[| 1].getValue(); - var _lerp = inputs[| 2].getValue(); + var _path1 = getInputData(0); + var _path2 = getInputData(1); + var _lerp = getInputData(2); var p1 = _path1 != noone && struct_has(_path1, "getSegmentCount"); var p2 = _path2 != noone && struct_has(_path2, "getSegmentCount"); @@ -40,9 +40,9 @@ function Node_Path_Blend(_x, _y, _group = noone) : Node(_x, _y, _group) construc } static getLength = function(ind = 0) { - var _path1 = inputs[| 0].getValue(); - var _path2 = inputs[| 1].getValue(); - var _lerp = inputs[| 2].getValue(); + var _path1 = getInputData(0); + var _path2 = getInputData(1); + var _lerp = getInputData(2); var p1 = _path1 != noone && struct_has(_path1, "getLength"); var p2 = _path2 != noone && struct_has(_path2, "getLength"); @@ -58,9 +58,9 @@ function Node_Path_Blend(_x, _y, _group = noone) : Node(_x, _y, _group) construc } static getAccuLength = function(ind = 0) { - var _path1 = inputs[| 0].getValue(); - var _path2 = inputs[| 1].getValue(); - var _lerp = inputs[| 2].getValue(); + var _path1 = getInputData(0); + var _path2 = getInputData(1); + var _lerp = getInputData(2); var p1 = _path1 != noone && struct_has(_path1, "getAccuLength"); var p2 = _path2 != noone && struct_has(_path2, "getAccuLength"); @@ -86,9 +86,9 @@ function Node_Path_Blend(_x, _y, _group = noone) : Node(_x, _y, _group) construc } static getPointRatio = function(_rat, ind = 0) { - var _path1 = inputs[| 0].getValue(); - var _path2 = inputs[| 1].getValue(); - var _lerp = inputs[| 2].getValue(); + var _path1 = getInputData(0); + var _path2 = getInputData(1); + var _lerp = getInputData(2); var p1 = _path1 != noone && struct_has(_path1, "getPointRatio"); var p2 = _path2 != noone && struct_has(_path2, "getPointRatio"); @@ -112,9 +112,9 @@ function Node_Path_Blend(_x, _y, _group = noone) : Node(_x, _y, _group) construc } static getBoundary = function(ind = 0) { - var _path1 = inputs[| 0].getValue(); - var _path2 = inputs[| 1].getValue(); - var _lerp = inputs[| 2].getValue(); + var _path1 = getInputData(0); + var _path2 = getInputData(1); + var _lerp = getInputData(2); var p1 = _path1 != noone && struct_has(_path1, "getPointRatio"); var p2 = _path2 != noone && struct_has(_path2, "getPointRatio"); diff --git a/scripts/node_path_builder/node_path_builder.gml b/scripts/node_path_builder/node_path_builder.gml index 9e8c8ea33..51637e80d 100644 --- a/scripts/node_path_builder/node_path_builder.gml +++ b/scripts/node_path_builder/node_path_builder.gml @@ -15,8 +15,8 @@ function Node_Path_Builder(_x, _y, _group = noone) : Node(_x, _y, _group) constr outputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.pathnode, self); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _lines = inputs[| 0].getValue(); - var _conn = inputs[| 1].getValue(); + var _lines = getInputData(0); + var _conn = getInputData(1); draw_set_color(COLORS._main_accent); @@ -42,15 +42,15 @@ function Node_Path_Builder(_x, _y, _group = noone) : Node(_x, _y, _group) constr } static getLineCount = function() { - var _lines = inputs[| 0].getValue(); - var _conn = inputs[| 1].getValue(); + var _lines = getInputData(0); + var _conn = getInputData(1); return _conn? 1 : floor(array_length(_lines) / 2); } static getSegmentCount = function() { - var _lines = inputs[| 0].getValue(); - var _conn = inputs[| 1].getValue(); + var _lines = getInputData(0); + var _conn = getInputData(1); return _conn? array_length(_lines) - 1 : 1; } @@ -60,8 +60,8 @@ function Node_Path_Builder(_x, _y, _group = noone) : Node(_x, _y, _group) constr static getAccuLength = function(index) { return array_safe_get(lengthAcc, index, []); } static getPointRatio = function(_rat, _ind = 0) { - var _lines = inputs[| 0].getValue(); - var _conn = inputs[| 1].getValue(); + var _lines = getInputData(0); + var _conn = getInputData(1); var _p0, _p1; var _x, _y; @@ -92,7 +92,7 @@ function Node_Path_Builder(_x, _y, _group = noone) : Node(_x, _y, _group) constr } static getPointDistance = function(_dist, ind = 0) { - var _conn = inputs[| 1].getValue(); + var _conn = getInputData(1); if(_conn) return getPointRatio(_dist / length); else return getPointRatio(_dist / length[ind], ind); @@ -100,7 +100,7 @@ function Node_Path_Builder(_x, _y, _group = noone) : Node(_x, _y, _group) constr static getBoundary = function() { var boundary = new BoundingBox(); - var _lines = inputs[| 0].getValue(); + var _lines = getInputData(0); for( var i = 0, n = array_length(_lines); i < n; i++ ) boundary.addPoint(_lines[i][0], _lines[i][1]); @@ -108,8 +108,8 @@ function Node_Path_Builder(_x, _y, _group = noone) : Node(_x, _y, _group) constr } static update = function() { - var _lines = inputs[| 0].getValue(); - var _conn = inputs[| 1].getValue(); + var _lines = getInputData(0); + var _conn = getInputData(1); if(_conn) { length = 0; 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 6087b2255..65b589297 100644 --- a/scripts/node_path_l_system/node_path_l_system.gml +++ b/scripts/node_path_l_system/node_path_l_system.gml @@ -122,7 +122,7 @@ function Node_Path_L_System(_x, _y, _group = noone) : Node(_x, _y, _group) const _l[| i] = inputs[| i]; for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { - if(inputs[| i].getValue() != "") { + if(getInputData(i) != "") { ds_list_add(_l, inputs[| i + 0]); ds_list_add(_l, inputs[| i + 1]); } else { @@ -259,14 +259,14 @@ function Node_Path_L_System(_x, _y, _group = noone) : Node(_x, _y, _group) const } #endregion static update = function() { #region - var _len = inputs[| 0].getValue(); - var _ang = inputs[| 1].getValue(); - var _pos = inputs[| 2].getValue(); - var _itr = inputs[| 3].getValue(); - var _sta = inputs[| 4].getValue(); - var _end = inputs[| 5].getValue(); - var _san = inputs[| 6].getValue(); - var _sad = inputs[| 7].getValue(); + var _len = getInputData(0); + var _ang = getInputData(1); + var _pos = getInputData(2); + var _itr = getInputData(3); + var _sta = getInputData(4); + var _end = getInputData(5); + var _san = getInputData(6); + var _sad = getInputData(7); lineq = ds_queue_create(); random_set_seed(_sad); @@ -276,8 +276,8 @@ function Node_Path_L_System(_x, _y, _group = noone) : Node(_x, _y, _group) const var rules = {}; for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) { - var _name = inputs[| i + 0].getValue(); - var _rule = inputs[| i + 1].getValue(); + var _name = getInputData(i + 0); + var _rule = getInputData(i + 1); if(!struct_has(rules, _name)) rules[$ _name] = [ _rule ]; else 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 8d3a7a5ca..bc8cad032 100644 --- a/scripts/node_path_map_area/node_path_map_area.gml +++ b/scripts/node_path_map_area/node_path_map_area.gml @@ -18,28 +18,28 @@ function Node_Path_Map_Area(_x, _y, _group = noone) : Node(_x, _y, _group) const } static getLineCount = function() { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getLineCount")? _path.getLineCount() : 1; } static getSegmentCount = function(ind = 0) { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getSegmentCount")? _path.getSegmentCount(ind) : 0; } static getLength = function(ind = 0) { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getLength")? _path.getLength(ind) : 0; } static getAccuLength = function(ind = 0) { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getAccuLength")? _path.getAccuLength(ind) : []; } static getPointRatio = function(_rat, ind = 0) { - var _path = inputs[| 0].getValue(); - var _area = inputs[| 1].getValue(); + var _path = getInputData(0); + var _area = getInputData(1); if(is_array(_path)) { _path = array_safe_get(_path, ind); @@ -63,7 +63,7 @@ function Node_Path_Map_Area(_x, _y, _group = noone) : Node(_x, _y, _group) const } static getBoundary = function() { - var _area = inputs[| 1].getValue(); + var _area = getInputData(1); return new BoundingBox( _area[AREA_INDEX.center_x] - _area[AREA_INDEX.half_w], _area[AREA_INDEX.center_y] - _area[AREA_INDEX.half_h], _area[AREA_INDEX.center_x] + _area[AREA_INDEX.half_w], diff --git a/scripts/node_path_plot/node_path_plot.gml b/scripts/node_path_plot/node_path_plot.gml index 9796c70cf..9e443b955 100644 --- a/scripts/node_path_plot/node_path_plot.gml +++ b/scripts/node_path_plot/node_path_plot.gml @@ -23,7 +23,7 @@ function Node_Path_Plot(_x, _y, _group = noone) : Node(_x, _y, _group) construct .setDisplay(VALUE_DISPLAY.vector); inputs[| 6] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) - .setDisplay(VALUE_DISPLAY.slider_range, [ -1, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider_range, { range: [ -1, 1, 0.01 ] }); inputs[| 7] = nodeValue("Input scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -51,15 +51,15 @@ function Node_Path_Plot(_x, _y, _group = noone) : Node(_x, _y, _group) construct static getAccuLength = function(ind = 0) { return [ length ]; } static getPointRatio = function(_rat, ind = 0) { - var _sca = inputs[| 0].getValue(); - var _coor = inputs[| 1].getValue(); - var _eqa = inputs[| 2].getValue(); - var _eq0 = inputs[| 3].getValue(); - var _eq1 = inputs[| 4].getValue(); - var _orig = inputs[| 5].getValue(); - var _ran = inputs[| 6].getValue(); - var _iran = inputs[| 7].getValue(); - var _shf = inputs[| 8].getValue(); + var _sca = getInputData(0); + var _coor = getInputData(1); + var _eqa = getInputData(2); + var _eq0 = getInputData(3); + var _eq1 = getInputData(4); + var _orig = getInputData(5); + var _ran = getInputData(6); + var _iran = getInputData(7); + var _shf = getInputData(8); _rat = _ran[0] + (_rat * (_ran[1] - _ran[0])); @@ -117,11 +117,10 @@ function Node_Path_Plot(_x, _y, _group = noone) : Node(_x, _y, _group) construct static getBoundary = function() { return boundary; } static step = function() { - var _coor = inputs[| 1].getValue(); - var _eqa = inputs[| 2].getValue(); + var _coor = getInputData(1); + var _eqa = getInputData(2); inputs[| 2].editWidget.data_list = _coor? eq_type_pol : eq_type_car; - inputs[| 2].display_data = _coor? eq_type_pol : eq_type_car; switch(_coor) { case 0 : diff --git a/scripts/node_path_reverse/node_path_reverse.gml b/scripts/node_path_reverse/node_path_reverse.gml index 896e2dcba..36d21cba4 100644 --- a/scripts/node_path_reverse/node_path_reverse.gml +++ b/scripts/node_path_reverse/node_path_reverse.gml @@ -10,32 +10,32 @@ function Node_Path_Reverse(_x, _y, _group = noone) : Node(_x, _y, _group) constr outputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.pathnode, self); static getLineCount = function() { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getLineCount")? _path.getLineCount() : 1; } static getSegmentCount = function(ind = 0) { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getSegmentCount")? _path.getSegmentCount(ind) : 0; } static getLength = function(ind = 0) { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getLength")? _path.getLength(ind) : 0; } static getAccuLength = function(ind = 0) { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getAccuLength")? array_reverse(_path.getAccuLength(ind)) : []; } static getBoundary = function(ind = 0) { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getBoundary")? _path.getBoundary(ind) : new BoundingBox(0, 0, 1, 1); } static getPointRatio = function(_rat, ind = 0) { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); if(!is_struct(_path) || !struct_has(_path, "getPointRatio")) return new __vec2(); diff --git a/scripts/node_path_shift/node_path_shift.gml b/scripts/node_path_shift/node_path_shift.gml index 27b9c14d0..b931bb490 100644 --- a/scripts/node_path_shift/node_path_shift.gml +++ b/scripts/node_path_shift/node_path_shift.gml @@ -12,28 +12,28 @@ function Node_Path_Shift(_x, _y, _group = noone) : Node(_x, _y, _group) construc outputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.pathnode, self); static getLineCount = function() { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getLineCount")? _path.getLineCount() : 1; } static getSegmentCount = function(ind = 0) { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getSegmentCount")? _path.getSegmentCount(ind) : 0; } static getLength = function(ind = 0) { - var _path = inputs[| 0].getValue(ind = 0); + var _path = getInputData(0); return struct_has(_path, "getLength")? _path.getLength(ind) : 0; } static getAccuLength = function(ind = 0) { - var _path = inputs[| 0].getValue(ind = 0); + var _path = getInputData(0); return struct_has(_path, "getAccuLength")? _path.getAccuLength(ind) : []; } static getPointRatio = function(_rat, ind = 0) { - var _path = inputs[| 0].getValue(); - var _shf = inputs[| 1].getValue(); + var _path = getInputData(0); + var _shf = getInputData(1); if(is_array(_path)) { _path = array_safe_get(_path, ind); @@ -60,7 +60,7 @@ function Node_Path_Shift(_x, _y, _group = noone) : Node(_x, _y, _group) construc } static getBoundary = function(ind = 0) { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getBoundary")? _path.getBoundary(ind) : new BoundingBox( 0, 0, 1, 1 ); } diff --git a/scripts/node_path_transform/node_path_transform.gml b/scripts/node_path_transform/node_path_transform.gml index 1aabc8d9d..4abb649d1 100644 --- a/scripts/node_path_transform/node_path_transform.gml +++ b/scripts/node_path_transform/node_path_transform.gml @@ -22,7 +22,7 @@ function Node_Path_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) cons outputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.pathnode, self); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var pos = inputs[| 4].getValue(); + var pos = getInputData(4); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; @@ -32,36 +32,36 @@ function Node_Path_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) cons } static getLineCount = function() { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getLineCount")? _path.getLineCount() : 1; } static getSegmentCount = function(ind = 0) { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getSegmentCount")? _path.getSegmentCount(ind) : 0; } static getLength = function(ind = 0) { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getLength")? _path.getLength(ind) : 0; } static getAccuLength = function(ind = 0) { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getAccuLength")? _path.getAccuLength(ind) : []; } static getBoundary = function(ind = 0) { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); if(!struct_has(_path, "getBoundary")) return new BoundingBox( 0, 0, 1, 1 ); var b = _path.getBoundary(ind).clone(); - var _pos = inputs[| 1].getValue(); - var _rot = inputs[| 2].getValue(); - var _sca = inputs[| 3].getValue(); - var _anc = inputs[| 4].getValue(); + var _pos = getInputData(1); + var _rot = getInputData(2); + var _sca = getInputData(3); + var _anc = getInputData(4); b.minx = _anc[0] + (b.minx - _anc[0]) * _sca[0]; b.miny = _anc[1] + (b.miny - _anc[1]) * _sca[1]; @@ -84,11 +84,11 @@ function Node_Path_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) cons } static getPointRatio = function(_rat, ind = 0) { - var _path = inputs[| 0].getValue(); - var _pos = inputs[| 1].getValue(); - var _rot = inputs[| 2].getValue(); - var _sca = inputs[| 3].getValue(); - var _anc = inputs[| 4].getValue(); + var _path = getInputData(0); + var _pos = getInputData(1); + var _rot = getInputData(2); + var _sca = getInputData(3); + var _anc = getInputData(4); if(is_array(_path)) { _path = array_safe_get(_path, ind); @@ -116,10 +116,10 @@ function Node_Path_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) cons } static getBoundary = function(ind = 0) { - var _path = inputs[| 0].getValue(); - var _pos = inputs[| 1].getValue(); - var _rot = inputs[| 2].getValue(); - var _sca = inputs[| 3].getValue(); + var _path = getInputData(0); + var _pos = getInputData(1); + var _rot = getInputData(2); + var _sca = getInputData(3); if(_path == noone) return [ 0, 0, 1, 1 ]; diff --git a/scripts/node_path_trim/node_path_trim.gml b/scripts/node_path_trim/node_path_trim.gml index 0606babf1..9d333668b 100644 --- a/scripts/node_path_trim/node_path_trim.gml +++ b/scripts/node_path_trim/node_path_trim.gml @@ -8,33 +8,33 @@ function Node_Path_Trim(_x, _y, _group = noone) : Node(_x, _y, _group) construct .setVisible(true, true); inputs[| 1] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) - .setDisplay(VALUE_DISPLAY.slider_range, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider_range); outputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.pathnode, self); static getLineCount = function() { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getLineCount")? _path.getLineCount() : 1; } static getSegmentCount = function(ind = 0) { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getSegmentCount")? _path.getSegmentCount(ind) : 0; } static getLength = function(ind = 0) { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getLength")? _path.getLength(ind) : 0; } static getAccuLength = function(ind = 0) { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getAccuLength")? _path.getAccuLength(ind) : []; } static getPointRatio = function(_rat, ind = 0) { - var _path = inputs[| 0].getValue(); - var _rng = inputs[| 1].getValue(); + var _path = getInputData(0); + var _rng = getInputData(1); if(is_array(_path)) { _path = array_safe_get(_path, ind); @@ -53,7 +53,7 @@ function Node_Path_Trim(_x, _y, _group = noone) : Node(_x, _y, _group) construct } static getBoundary = function(ind = 0) { - var _path = inputs[| 0].getValue(); + var _path = getInputData(0); return struct_has(_path, "getBoundary")? _path.getBoundary(ind) : new BoundingBox( 0, 0, 1, 1 ); } diff --git a/scripts/node_path_wave/node_path_wave.gml b/scripts/node_path_wave/node_path_wave.gml index 4c0f66e37..65b1fd28d 100644 --- a/scripts/node_path_wave/node_path_wave.gml +++ b/scripts/node_path_wave/node_path_wave.gml @@ -22,22 +22,20 @@ function Node_Path_Wave(_x, _y, _group = noone) : Node(_x, _y, _group) construct ["Wave", false], 1, 2, 3, 4, ] - current_data = []; - static getLineCount = function() { - var _path = current_data[0]; + var _path = getInputData(0); return struct_has(_path, "getLineCount")? _path.getLineCount() : 1; } static getSegmentCount = function(ind = 0) { - var _path = current_data[0]; + var _path = getInputData(0); return struct_has(_path, "getSegmentCount")? _path.getSegmentCount(ind) : 0; } static getLength = function(ind = 0) { - var _path = current_data[0]; - var _fre = current_data[1]; - var _amo = current_data[2]; + var _path = getInputData(0); + var _fre = getInputData(1); + var _amo = getInputData(2); var _len = struct_has(_path, "getLength")? _path.getLength(ind) : 0; _len *= _fre * sqrt(_amo + 1 / _fre); @@ -46,9 +44,9 @@ function Node_Path_Wave(_x, _y, _group = noone) : Node(_x, _y, _group) construct } static getAccuLength = function(ind = 0) { - var _path = current_data[0]; - var _fre = current_data[1]; - var _amo = current_data[2]; + var _path = getInputData(0); + var _fre = getInputData(1); + var _amo = getInputData(2); var _len = struct_has(_path, "getAccuLength")? _path.getAccuLength(ind) : []; var _mul = _fre * sqrt(_amo + 1 / _fre); @@ -60,11 +58,11 @@ function Node_Path_Wave(_x, _y, _group = noone) : Node(_x, _y, _group) construct } static getPointRatio = function(_rat, ind = 0) { - var _path = current_data[0]; - var _fre = current_data[1]; - var _amo = current_data[2]; - var _shf = current_data[3]; - var _smt = current_data[4]; + var _path = getInputData(0); + var _fre = getInputData(1); + var _amo = getInputData(2); + var _shf = getInputData(3); + var _smt = getInputData(4); if(is_array(_path)) { _path = array_safe_get(_path, ind); @@ -95,14 +93,11 @@ function Node_Path_Wave(_x, _y, _group = noone) : Node(_x, _y, _group) construct } static getBoundary = function(ind = 0) { - var _path = current_data[0]; + var _path = getInputData(0); return struct_has(_path, "getBoundary")? _path.getBoundary(ind) : new BoundingBox( 0, 0, 1, 1 ); } static update = function() { - for( var i = 0, n = ds_list_size(inputs); i < n; i++ ) - current_data[i] = inputs[| i].getValue(); - outputs[| 0].setValue(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 4e0749127..b470abc95 100644 --- a/scripts/node_pb_box_contract/node_pb_box_contract.gml +++ b/scripts/node_pb_box_contract/node_pb_box_contract.gml @@ -8,7 +8,7 @@ function Node_PB_Box_Contract(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _gro .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Ratio", "Fix" ]); inputs[| 3] = nodeValue("Ratio", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 4] = nodeValue("Fix Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 8 ) 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 c430ed4f6..304de3142 100644 --- a/scripts/node_pb_box_inset/node_pb_box_inset.gml +++ b/scripts/node_pb_box_inset/node_pb_box_inset.gml @@ -11,16 +11,16 @@ function Node_PB_Box_Inset(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Padding", "Ratio" ]); inputs[| 4] = nodeValue("Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 5] = nodeValue("Height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 6] = nodeValue("Horizontal alignment", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 7] = nodeValue("Vertical alignment", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); outputs[| 0] = nodeValue("pBox Inset", self, JUNCTION_CONNECT.output, 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 eb4382854..fc0acdc07 100644 --- a/scripts/node_pb_box_split/node_pb_box_split.gml +++ b/scripts/node_pb_box_split/node_pb_box_split.gml @@ -8,7 +8,7 @@ function Node_PB_Box_Split(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Ratio", "Fix Left", "Fix Right" ]); inputs[| 3] = nodeValue("Ratio", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 4] = nodeValue("Fix width", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 8 ) diff --git a/scripts/node_pb_draw_blob/node_pb_draw_blob.gml b/scripts/node_pb_draw_blob/node_pb_draw_blob.gml index d53e86cd6..c4912c7ed 100644 --- a/scripts/node_pb_draw_blob/node_pb_draw_blob.gml +++ b/scripts/node_pb_draw_blob/node_pb_draw_blob.gml @@ -2,10 +2,10 @@ function Node_PB_Draw_Blob(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group name = "Blob"; inputs[| 3] = nodeValue("Top", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ] ); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 4] = nodeValue("Bottom", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ] ); + .setDisplay(VALUE_DISPLAY.slider); input_display_list = [ ["Draw", false], 0, 1, 2, @@ -13,7 +13,7 @@ function Node_PB_Draw_Blob(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group ]; static drawOverlayPB = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _pbox = inputs[| 0].getValue(); + var _pbox = getInputData(0); if(_pbox == noone) return; var x0 = _pbox.x + _pbox.w / 2; diff --git a/scripts/node_pb_draw_roundrectangle/node_pb_draw_roundrectangle.gml b/scripts/node_pb_draw_roundrectangle/node_pb_draw_roundrectangle.gml index 50f82e791..76262bc09 100644 --- a/scripts/node_pb_draw_roundrectangle/node_pb_draw_roundrectangle.gml +++ b/scripts/node_pb_draw_roundrectangle/node_pb_draw_roundrectangle.gml @@ -37,8 +37,8 @@ function Node_PB_Draw_Round_Rectangle(_x, _y, _group = noone) : Node_PB_Draw(_x, ] static step = function() { - var _type = inputs[| 3].getValue(); - var _rela = inputs[| 6].getValue(); + var _type = getInputData(3); + var _rela = getInputData(6); inputs[| 4].setVisible(_type == 0); inputs[| 5].setVisible(_type == 1); 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 40b92df0a..1bd8c0c0a 100644 --- a/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml +++ b/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml @@ -8,13 +8,13 @@ function Node_PB_Draw_Trapezoid(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _ .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Symmetric", "Independent" ]); inputs[| 5] = nodeValue("Bevel", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 6] = nodeValue("Bevel 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 7] = nodeValue("Bevel 2", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 8] = nodeValue("Invert", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false ); 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 591282c3d..d593c6aa5 100644 --- a/scripts/node_pb_fx_brick/node_pb_fx_brick.gml +++ b/scripts/node_pb_fx_brick/node_pb_fx_brick.gml @@ -12,7 +12,7 @@ function Node_PB_Fx_Brick(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) c inputs[| 4] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white ); inputs[| 5] = nodeValue("Dissolve", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0. ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ] ) + .setDisplay(VALUE_DISPLAY.slider) inputs[| 6] = nodeValue("Detail", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1 ) 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 8f8b14dd9..d7b34bc4e 100644 --- a/scripts/node_pb_fx_hash/node_pb_fx_hash.gml +++ b/scripts/node_pb_fx_hash/node_pb_fx_hash.gml @@ -8,7 +8,7 @@ function Node_PB_Fx_Hash(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) co inputs[| 3] = nodeValue("Invert", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false ); inputs[| 4] = nodeValue("Dissolve", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0. ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ] ) + .setDisplay(VALUE_DISPLAY.slider) inputs[| 5] = nodeValue("Detail", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1 ) 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 209c6ef4c..888025188 100644 --- a/scripts/node_pb_fx_highlight/node_pb_fx_highlight.gml +++ b/scripts/node_pb_fx_highlight/node_pb_fx_highlight.gml @@ -2,14 +2,14 @@ function Node_PB_Fx_Highlight(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _grou name = "Highlight"; inputs[| 1] = nodeValue("Highlight Area", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, array_create(9) ) - .setDisplay(VALUE_DISPLAY.matrix, 3); + .setDisplay(VALUE_DISPLAY.matrix, { size: 3 }); inputs[| 2] = nodeValue("Light Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white ); inputs[| 3] = nodeValue("Shadow Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black ); inputs[| 4] = nodeValue("Roughness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 5] = nodeValue("Roughness Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1 ); @@ -26,7 +26,7 @@ function Node_PB_Fx_Highlight(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _grou var _x0 = _x + _w / 2 - ww / 2; var _y0 = _y + ui(8); - var _side = inputs[| 1].getValue(); + var _side = getInputData(1); if(holding_side != noone && mouse_release(mb_left)) holding_side = noone; diff --git a/scripts/node_perlin/node_perlin.gml b/scripts/node_perlin/node_perlin.gml index 175f2ff96..bea112912 100644 --- a/scripts/node_perlin/node_perlin.gml +++ b/scripts/node_perlin/node_perlin.gml @@ -21,13 +21,13 @@ function Node_Perlin(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co .setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "RGB", "HSV" ]); inputs[| 7] = nodeValue("Color R range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, .01]); + .setDisplay(VALUE_DISPLAY.slider_range); inputs[| 8] = nodeValue("Color G range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, .01]); + .setDisplay(VALUE_DISPLAY.slider_range); inputs[| 9] = nodeValue("Color B range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, .01]); + .setDisplay(VALUE_DISPLAY.slider_range); input_display_list = [ ["Output", true], 0, 5, @@ -40,7 +40,7 @@ function Node_Perlin(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co attribute_surface_depth(); static step = function() { - var _col = inputs[| 6].getValue(); + var _col = getInputData(6); inputs[| 7].setVisible(_col != 0); inputs[| 8].setVisible(_col != 0); diff --git a/scripts/node_perlin_smear/node_perlin_smear.gml b/scripts/node_perlin_smear/node_perlin_smear.gml index c3db3f2d8..7194b5b0e 100644 --- a/scripts/node_perlin_smear/node_perlin_smear.gml +++ b/scripts/node_perlin_smear/node_perlin_smear.gml @@ -21,7 +21,7 @@ function Node_Perlin_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 3] = nodeValue("Iteration", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 3); inputs[| 4] = nodeValue("Brightness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_pixel_builder/node_pixel_builder.gml b/scripts/node_pixel_builder/node_pixel_builder.gml index c25f316e4..c00747389 100644 --- a/scripts/node_pixel_builder/node_pixel_builder.gml +++ b/scripts/node_pixel_builder/node_pixel_builder.gml @@ -50,7 +50,7 @@ function Node_Pixel_Builder(_x, _y, _group = noone) : Node_Collection(_x, _y, _g } static update = function() { - var _dim = inputs[| 0].getValue(); + var _dim = getInputData(0); for( var i = 0; i < ds_list_size(nodes); i++ ) { var _n = nodes[| i]; @@ -58,7 +58,7 @@ function Node_Pixel_Builder(_x, _y, _group = noone) : Node_Collection(_x, _y, _g if(!is_instanceof(_n, Node_PB_Layer)) continue; - var _layer = _n.inputs[| 0].getValue(); + var _layer = _n.getInputData(0); var _box = new __pbBox(); _box.layer = _layer; @@ -78,7 +78,7 @@ function Node_Pixel_Builder(_x, _y, _group = noone) : Node_Collection(_x, _y, _g LOG_IF(global.FLAG.render, $"================== BUILD PIXEL =================="); LOG_BLOCK_START(); - var _dim = inputs[| 0].getValue(); + var _dim = getInputData(0); var _surfs = ds_map_create(); for( var i = 0; i < ds_list_size(nodes); i++ ) { diff --git a/scripts/node_pixel_cloud/node_pixel_cloud.gml b/scripts/node_pixel_cloud/node_pixel_cloud.gml index 8bdb81b8b..18506a557 100644 --- a/scripts/node_pixel_cloud/node_pixel_cloud.gml +++ b/scripts/node_pixel_cloud/node_pixel_cloud.gml @@ -23,7 +23,7 @@ function Node_Pixel_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, irandom(100000)); inputs[| 2] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 2, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] }); inputs[| 3] = nodeValue("Strength map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); @@ -34,7 +34,7 @@ function Node_Pixel_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 6] = nodeValue("Alpha over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); inputs[| 7] = nodeValue("Random blending", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 8] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 8; diff --git a/scripts/node_pixel_sort/node_pixel_sort.gml b/scripts/node_pixel_sort/node_pixel_sort.gml index 0dcd40398..48f4454f7 100644 --- a/scripts/node_pixel_sort/node_pixel_sort.gml +++ b/scripts/node_pixel_sort/node_pixel_sort.gml @@ -12,7 +12,7 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 1] = nodeValue("Iteration", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2); inputs[| 2] = nodeValue("Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 3] = nodeValue("Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.rotation, 90); @@ -20,7 +20,7 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 5] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 6] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 6; diff --git a/scripts/node_plot_linear/node_plot_linear.gml b/scripts/node_plot_linear/node_plot_linear.gml index b5c8e5b2e..66abc6bc5 100644 --- a/scripts/node_plot_linear/node_plot_linear.gml +++ b/scripts/node_plot_linear/node_plot_linear.gml @@ -9,7 +9,7 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou .setVisible(true, true); inputs[| 2] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ]) - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider_range); inputs[| 3] = nodeValue("Sample frequency", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1); @@ -57,7 +57,7 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 22] = nodeValue("Loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); inputs[| 23] = nodeValue("Smooth", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_point_move/node_point_move.gml b/scripts/node_point_move/node_point_move.gml index ca2f2488f..5e56779d4 100644 --- a/scripts/node_point_move/node_point_move.gml +++ b/scripts/node_point_move/node_point_move.gml @@ -24,7 +24,7 @@ function Node_Move_Point(_x, _y, _group = noone) : Node_Processor(_x, _y, _group .setDisplay(VALUE_DISPLAY.vector); static step = function() { - var _mode = inputs[| 1].getValue(); + var _mode = getInputData(1); inputs[| 2].setVisible(_mode == 0); inputs[| 3].setVisible(_mode == 1); diff --git a/scripts/node_polar/node_polar.gml b/scripts/node_polar/node_polar.gml index 6b30e553a..45d7f9f2d 100644 --- a/scripts/node_polar/node_polar.gml +++ b/scripts/node_polar/node_polar.gml @@ -6,7 +6,7 @@ function Node_Polar(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 2] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 3] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 3; diff --git a/scripts/node_polygonal_shape/node_polygonal_shape.gml b/scripts/node_polygonal_shape/node_polygonal_shape.gml index 05827fae2..d284002a4 100644 --- a/scripts/node_polygonal_shape/node_polygonal_shape.gml +++ b/scripts/node_polygonal_shape/node_polygonal_shape.gml @@ -27,22 +27,22 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); inputs[| 8] = nodeValue("Sides", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 16) - .setDisplay(VALUE_DISPLAY.slider, [2, 64, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [2, 64, 1] }); inputs[| 9] = nodeValue("Inner radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 10] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 11] = nodeValue("Teeth", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 6) - .setDisplay(VALUE_DISPLAY.slider, [3, 16, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [3, 16, 1] }); inputs[| 12] = nodeValue("Teeth height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 13] = nodeValue("Teeth taper", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [-0.5, 0.5, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-0.5, 0.5, 0.01] }); inputs[| 14] = nodeValue("Angle range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 360 ]) .setDisplay(VALUE_DISPLAY.rotation_range); diff --git a/scripts/node_posterize/node_posterize.gml b/scripts/node_posterize/node_posterize.gml index cef5a58ce..a38923277 100644 --- a/scripts/node_posterize/node_posterize.gml +++ b/scripts/node_posterize/node_posterize.gml @@ -9,10 +9,10 @@ function Node_Posterize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 2] = nodeValue("Use palette", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 3] = nodeValue("Colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4) - .setDisplay(VALUE_DISPLAY.slider, [2, 16, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 1] }); inputs[| 4] = nodeValue("Gamma", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.6) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 5; @@ -29,7 +29,7 @@ function Node_Posterize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); static step = function() { - var _use_pal = inputs[| 2].getValue(); + var _use_pal = getInputData(2); inputs[| 1].setVisible(_use_pal); inputs[| 3].setVisible(!_use_pal); diff --git a/scripts/node_print/node_print.gml b/scripts/node_print/node_print.gml index fbaf5334b..90d6a0006 100644 --- a/scripts/node_print/node_print.gml +++ b/scripts/node_print/node_print.gml @@ -12,15 +12,15 @@ function Node_Print(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { //inputs[| 2] = nodeValue("Icon", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); static update = function() { - var act = inputs[| 0].getValue(); - var txt = inputs[| 1].getValue(); + var act = getInputData(0); + var txt = getInputData(1); if(act) noti_status(txt); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); - var txt = inputs[| 1].getValue(); + var txt = getInputData(1); draw_set_text(f_p0, fa_center, fa_center, COLORS._main_text); draw_text_bbox(bbox, txt); diff --git a/scripts/node_processor/node_processor.gml b/scripts/node_processor/node_processor.gml index 702fafded..95a7c9984 100644 --- a/scripts/node_processor/node_processor.gml +++ b/scripts/node_processor/node_processor.gml @@ -270,8 +270,6 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct } #endregion static update = function(frame = PROJECT.animator.current_frame) { #region - getInputs(); - if(batch_output) processBatchOutput(); else processOutput(); diff --git a/scripts/node_region_fill/node_region_fill.gml b/scripts/node_region_fill/node_region_fill.gml index 2b21125de..53331ac6c 100644 --- a/scripts/node_region_fill/node_region_fill.gml +++ b/scripts/node_region_fill/node_region_fill.gml @@ -22,7 +22,7 @@ function Node_Region_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou temp_surface = [ surface_create(1, 1), surface_create(1, 1) ]; static step = function() { - var _fill = inputs[| 3].getValue(); + var _fill = getInputData(3); inputs[| 2].setVisible(_fill); inputs[| 4].setVisible(_fill); 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 3c2048cab..ddd386563 100644 --- a/scripts/node_render_sprite_sheet/node_render_sprite_sheet.gml +++ b/scripts/node_render_sprite_sheet/node_render_sprite_sheet.gml @@ -57,8 +57,8 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) attribute_surface_depth(); static step = function() { - var grup = inputs[| 1].getValue(); - var pack = inputs[| 3].getValue(); + var grup = getInputData(1); + var pack = getInputData(3); if(pack == 0) inputs[| 5].editWidget.data = [ "Top", "Center", "Bottom" ]; else inputs[| 5].editWidget.data = [ "Left", "Center", "Right" ]; @@ -69,15 +69,15 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) } static update = function(frame = PROJECT.animator.current_frame) { - var inpt = inputs[| 0].getValue(); - var grup = inputs[| 1].getValue(); - var skip = inputs[| 2].getValue(); - var pack = inputs[| 3].getValue(); - var grid = inputs[| 4].getValue(); - var alig = inputs[| 5].getValue(); - var spac = inputs[| 6].getValue(); - var padd = inputs[| 7].getValue(); - var rang = inputs[| 8].getValue(); + var inpt = getInputData(0); + var grup = getInputData(1); + var skip = getInputData(2); + var pack = getInputData(3); + var grid = getInputData(4); + var alig = getInputData(5); + var spac = getInputData(6); + var padd = getInputData(7); + var rang = getInputData(8); var _atl = outputs[| 1].getValue(); var cDep = attrDepth(); @@ -86,7 +86,7 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) initRender(); return; } else if(PROJECT.animator.rendering && PROJECT.animator.frame_progress && PROJECT.animator.current_frame == 0 && !refreshSurface) { - var skip = inputs[| 2].getValue(); + var skip = getInputData(2); var arr = is_array(inpt); if(arr && array_length(inpt) == 0) return; @@ -119,7 +119,7 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) break; case SPRITE_STACK.grid : var amo = floor(PROJECT.animator.frames_total / skip); - var col = inputs[| 4].getValue(); + var col = getInputData(4); var row = ceil(amo / col); ww = sw * col + spac * (col - 1); @@ -223,7 +223,7 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) break; case SPRITE_STACK.grid : - var col = inputs[| 4].getValue(); + var col = getInputData(4); var _row = floor(_frame / col); var _col = safe_mod(_frame, col); @@ -261,13 +261,13 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) static initRender = function() { for(var i = 0; i < array_length(anim_drawn); i++) anim_drawn[i] = false; - var inpt = inputs[| 0].getValue(); - var grup = inputs[| 1].getValue(); - var pack = inputs[| 3].getValue(); - var alig = inputs[| 5].getValue(); - var spac = inputs[| 6].getValue(); - var padd = inputs[| 7].getValue(); - var rang = inputs[| 8].getValue(); + var inpt = getInputData(0); + var grup = getInputData(1); + var pack = getInputData(3); + var alig = getInputData(5); + var spac = getInputData(6); + var padd = getInputData(7); + var rang = getInputData(8); var cDep = attrDepth(); @@ -316,7 +316,7 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) } break; case SPRITE_STACK.grid : - var col = inputs[| 4].getValue(); + var col = getInputData(4); var row = ceil(amo / col); var row_w = 0; @@ -392,7 +392,7 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) break; case SPRITE_STACK.grid : var amo = array_length(inpt); - var col = inputs[| 4].getValue(); + var col = getInputData(4); var row = ceil(amo / col); var row_w = 0; diff --git a/scripts/node_repeat/node_repeat.gml b/scripts/node_repeat/node_repeat.gml index 22ce9d0df..d9dfc2486 100644 --- a/scripts/node_repeat/node_repeat.gml +++ b/scripts/node_repeat/node_repeat.gml @@ -27,7 +27,7 @@ function Node_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constructor inputs[| 9] = nodeValue("Start position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0]) .setDisplay(VALUE_DISPLAY.vector) - .setUnitRef(function(index) { return inputs[| 1].getValue(); }); + .setUnitRef(function(index) { return getInputData(1); }); inputs[| 10] = nodeValue("Scale over copy", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 ); @@ -35,7 +35,7 @@ function Node_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constructor .setVisible(true, true); inputs[| 12] = nodeValue("Path range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 1], "Range of the path to follow.") - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider_range); inputs[| 13] = nodeValue("Path shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); @@ -55,10 +55,10 @@ function Node_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constructor .setUnitRef(function() { return getDimension(); }); inputs[| 20] = nodeValue("Animator midpoint", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [-1, 2, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 2, 0.01] }); inputs[| 21] = nodeValue("Animator range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 22] = nodeValue("Animator position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -77,7 +77,7 @@ function Node_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constructor inputs[| 27] = nodeValue("Animator blend", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); inputs[| 28] = nodeValue("Animator alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); @@ -93,7 +93,7 @@ function Node_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constructor attribute_surface_depth(); static getDimension = function() { - var _surf = inputs[| 0].getValue(); + var _surf = getInputData(0); if(is_array(_surf)) { if(array_length(_surf) == 0) return [1, 1]; if(!is_surface(_surf[0])) return [1, 1]; @@ -108,8 +108,8 @@ function Node_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constructor if(inputs[| 9].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, THEME.anchor)) active = false; - var _pat = inputs[| 3].getValue(); - var _spos = inputs[| 9].getValue(); + var _pat = getInputData(3); + var _spos = getInputData(9); var px = _x + _spos[0] * _s; var py = _y + _spos[1] * _s; @@ -124,43 +124,43 @@ function Node_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } function doRepeat(_outSurf, _inSurf) { - var _dim = inputs[| 1].getValue(); - var _amo = inputs[| 2].getValue(); - var _pat = inputs[| 3].getValue(); + var _dim = getInputData( 1); + var _amo = getInputData( 2); + var _pat = getInputData( 3); - var _spos = inputs[| 9].getValue(); + var _spos = getInputData( 9); - var _rpos = inputs[| 4].getValue(); - var _rsta = inputs[| 26].getValue(); - var _rrot = inputs[| 5].getValue(); - var _rsca = inputs[| 6].getValue(); - var _msca = inputs[| 10].getValue(); + var _rpos = getInputData( 4); + var _rsta = getInputData(26); + var _rrot = getInputData( 5); + var _rsca = getInputData( 6); + var _msca = getInputData(10); - var _aran = inputs[| 7].getValue(); - var _arad = inputs[| 8].getValue(); + var _aran = getInputData( 7); + var _arad = getInputData( 8); - var _path = inputs[| 11].getValue(); - var _prng = inputs[| 12].getValue(); - var _prsh = inputs[| 13].getValue(); + var _path = getInputData(11); + var _prng = getInputData(12); + var _prsh = getInputData(13); - var _grad = inputs[| 14].getValue(); - var _alph = inputs[| 15].getValue(); + var _grad = getInputData(14); + var _alph = getInputData(15); - var _arr = inputs[| 16].getValue(); - var _sed = inputs[| 17].getValue(); + var _arr = getInputData(16); + var _sed = getInputData(17); - var _col = inputs[| 18].getValue(); - var _cls = inputs[| 19].getValue(); + var _col = getInputData(18); + var _cls = getInputData(19); - var _an_mid = inputs[| 20].getValue(); - var _an_ran = inputs[| 21].getValue(); - var _an_fal = inputs[| 25].getValue(); - var _an_pos = inputs[| 22].getValue(); - var _an_rot = inputs[| 23].getValue(); - var _an_sca = inputs[| 24].getValue(); + var _an_mid = getInputData(20); + var _an_ran = getInputData(21); + var _an_fal = getInputData(25); + var _an_pos = getInputData(22); + var _an_rot = getInputData(23); + var _an_sca = getInputData(24); - var _an_bld = inputs[| 27].getValue(); - var _an_alp = inputs[| 28].getValue(); + var _an_bld = getInputData(27); + var _an_alp = getInputData(28); var _surf, runx, runy, posx, posy, scax, scay, rot; @@ -252,15 +252,15 @@ function Node_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } static update = function(frame = PROJECT.animator.current_frame) { - var _inSurf = inputs[| 0].getValue(); + var _inSurf = getInputData(0); if(is_array(_inSurf) && array_length(_inSurf) == 0) return; if(!is_array(_inSurf) && !is_surface(_inSurf)) return; - var _dim = inputs[| 1].getValue(); - var _pat = inputs[| 3].getValue(); + var _dim = getInputData(1); + var _pat = getInputData(3); var cDep = attrDepth(); - var _arr = inputs[| 16].getValue(); + var _arr = getInputData(16); inputs[| 4].setVisible( _pat == 0 || _pat == 1); inputs[| 7].setVisible( _pat == 2); diff --git a/scripts/node_rigid_activation/node_rigid_activation.gml b/scripts/node_rigid_activation/node_rigid_activation.gml index 1b346e2cc..322e0e9c8 100644 --- a/scripts/node_rigid_activation/node_rigid_activation.gml +++ b/scripts/node_rigid_activation/node_rigid_activation.gml @@ -19,12 +19,12 @@ function Node_Rigid_Activate(_x, _y, _group = noone) : Node(_x, _y, _group) cons ] static update = function(frame = PROJECT.animator.current_frame) { - var _obj = inputs[| 0].getValue(); + var _obj = getInputData(0); outputs[| 0].setValue(_obj); RETURN_ON_REST - var _act = inputs[| 1].getValue(); + var _act = getInputData(1); if(!is_array(_obj)) _obj = [ _obj ]; @@ -44,7 +44,7 @@ function Node_Rigid_Activate(_x, _y, _group = noone) : Node(_x, _y, _group) cons static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); - var _act = inputs[| 1].getValue(); + var _act = getInputData(1); draw_sprite_fit(_act? s_node_rigidSim_activate : s_node_rigidSim_deactivate, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); } } \ No newline at end of file diff --git a/scripts/node_rigid_force_apply/node_rigid_force_apply.gml b/scripts/node_rigid_force_apply/node_rigid_force_apply.gml index a394de480..1e3ede902 100644 --- a/scripts/node_rigid_force_apply/node_rigid_force_apply.gml +++ b/scripts/node_rigid_force_apply/node_rigid_force_apply.gml @@ -31,7 +31,7 @@ function Node_Rigid_Force_Apply(_x, _y, _group = noone) : Node(_x, _y, _group) c .rejectArray(); inputs[| 7] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 16, 0.01]) + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.01] }) .rejectArray(); inputs[| 8] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 8) @@ -45,13 +45,13 @@ function Node_Rigid_Force_Apply(_x, _y, _group = noone) : Node(_x, _y, _group) c ] static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _typ = inputs[| 1].getValue(); - var _pos = inputs[| 2].getValue(); + var _typ = getInputData(1); + var _pos = getInputData(2); var px = _x + _pos[0] * _s; var py = _y + _pos[1] * _s; if(_typ == 0 || _typ == 1) { - var _for = inputs[| 5].getValue(); + var _for = getInputData(5); var fx = px + _for[0] * 10 * _s; var fy = py + _for[1] * 10 * _s; @@ -64,7 +64,7 @@ function Node_Rigid_Force_Apply(_x, _y, _group = noone) : Node(_x, _y, _group) c inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); inputs[| 5].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny, THEME.anchor, 10); } else if(_typ == 3) { - var _rad = inputs[| 8].getValue(); + var _rad = getInputData(8); draw_set_color(COLORS._main_accent); draw_set_alpha(0.5); @@ -78,7 +78,7 @@ function Node_Rigid_Force_Apply(_x, _y, _group = noone) : Node(_x, _y, _group) c } static step = function() { - var _typ = inputs[| 1].getValue(); + var _typ = getInputData(1); inputs[| 3].setVisible(_typ == 2); inputs[| 4].setVisible(_typ > 0); @@ -89,20 +89,20 @@ function Node_Rigid_Force_Apply(_x, _y, _group = noone) : Node(_x, _y, _group) c } static update = function(frame = PROJECT.animator.current_frame) { - var _obj = inputs[| 0].getValue(); + var _obj = getInputData(0); outputs[| 0].setValue(_obj); RETURN_ON_REST - var _typ = inputs[| 1].getValue(); + var _typ = getInputData(1); - var _pos = inputs[| 2].getValue(); - var _tor = inputs[| 3].getValue(); - var _frm = inputs[| 4].getValue(); - var _for = inputs[| 5].getValue(); - var _sco = inputs[| 6].getValue(); - var _str = inputs[| 7].getValue(); - var _rad = inputs[| 8].getValue(); + var _pos = getInputData(2); + var _tor = getInputData(3); + var _frm = getInputData(4); + var _for = getInputData(5); + var _sco = getInputData(6); + var _str = getInputData(7); + var _rad = getInputData(8); if((_typ > 0) && PROJECT.animator.current_frame != _frm) return; diff --git a/scripts/node_rigid_global/node_rigid_global.gml b/scripts/node_rigid_global/node_rigid_global.gml index 9b1acb8f7..d33cc4011 100644 --- a/scripts/node_rigid_global/node_rigid_global.gml +++ b/scripts/node_rigid_global/node_rigid_global.gml @@ -13,7 +13,7 @@ function Node_Rigid_Global(_x, _y, _group = noone) : Node(_x, _y, _group) constr current_gra = [0, 0]; static update = function(frame = PROJECT.animator.current_frame) { - var _gra = inputs[| 0].getValue(); + var _gra = getInputData(0); if(current_gra[0] != array_safe_get(_gra, 0) || current_gra[1] != array_safe_get(_gra, 1)) { physics_world_gravity(_gra[0], _gra[1]); diff --git a/scripts/node_rigid_object/node_rigid_object.gml b/scripts/node_rigid_object/node_rigid_object.gml index 80cab9323..0c4f3b2a2 100644 --- a/scripts/node_rigid_object/node_rigid_object.gml +++ b/scripts/node_rigid_object/node_rigid_object.gml @@ -38,15 +38,15 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr .rejectArray(); inputs[| 9] = nodeValue("Generate mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, 0) - .setDisplay(VALUE_DISPLAY.button, [ function() { - var _tex = inputs[| 6].getValue(); + .setDisplay(VALUE_DISPLAY.button, { name: "Generate", onClick: function() { + var _tex = getInputData(6); if(is_array(_tex)) { for( var i = 0, n = array_length(_tex); i < n; i++ ) generateMesh(i); } else generateMesh(); doUpdate(); - }, "Generate"] ); + } }); inputs[| 10] = nodeValue("Mesh expansion", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .rejectArray(); @@ -74,7 +74,7 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr new NodeTool( "Anchor remove", THEME.mesh_tool_delete ), ]; - static getPreviewValues = function() { return inputs[| 6].getValue(); } + static getPreviewValues = function() { return getInputData(6); } is_convex = true; hover = -1; @@ -85,15 +85,15 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr anchor_drag_my = -1; static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _shp = inputs[| 5].getValue(); - var _box = inputs[| 7].getValue(); + var _shp = getInputData(5); + var _box = getInputData(7); var meshes = attributes.mesh; if(preview_index >= array_length(meshes)) return; if(previewing == 0) { if(_shp == 2) { - var _tex = inputs[| 6].getValue(); + var _tex = getInputData(6); if(is_array(_tex)) _tex = _tex[safe_mod(preview_index, array_length(_tex))]; var tw = surface_get_width_safe(_tex); var th = surface_get_height_safe(_tex); @@ -248,8 +248,8 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr } static generateMesh = function(index = 0) { - var _tex = inputs[| 6].getValue(); - var _exp = inputs[| 10].getValue(); + var _tex = getInputData(6); + var _exp = getInputData(10); if(is_array(_tex)) { index = safe_mod(index, array_length(_tex)); @@ -467,21 +467,21 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr static onValueUpdate = function(index = 0) { if(index == 5) { - var _spos = inputs[| 7].getValue(); - var _shape = inputs[| 5].getValue(); + var _spos = getInputData(7); + var _shape = getInputData(5); _spos[4] = _shape; inputs[| 7].setValue(_spos); } } static fixtureCreate = function(fixture, object) { - var _mov = inputs[| 0].getValue(); - var _den = inputs[| 1].getValue(); - var _cnt_frc = inputs[| 2].getValue(); - var _air_frc = inputs[| 3].getValue(); - var _rot_frc = inputs[| 4].getValue(); + var _mov = getInputData(0); + var _den = getInputData(1); + var _cnt_frc = getInputData(2); + var _air_frc = getInputData(3); + var _rot_frc = getInputData(4); - var _spos = inputs[| 7].getValue(); + var _spos = getInputData(7); if(!_mov) { physics_fixture_set_kinematic(fixture); @@ -501,8 +501,8 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr } static spawn = function(rpos = noone, index = 0, object = noone) { - var _shp = inputs[| 5].getValue(); - var _tex = inputs[| 6].getValue(); + var _shp = getInputData(5); + var _tex = getInputData(6); if(is_array(_tex)) { index = safe_mod(index, array_length(_tex)); @@ -510,7 +510,7 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr } else index = 0; - var _spos = inputs[| 7].getValue(); + var _spos = getInputData(7); var ww = max(1, surface_get_width_safe(_tex)); var hh = max(1, surface_get_height_safe(_tex)); @@ -644,10 +644,10 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr } static step = function() { - var _shp = inputs[| 5].getValue(); + var _shp = getInputData(5); inputs[| 9].setVisible(_shp == 2); - var _tex = inputs[| 6].getValue(); + var _tex = getInputData(6); if(is_array(_tex)) { var meshes = attributes.mesh; @@ -658,14 +658,14 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr } static reset = function() { - var _tex = inputs[| 6].getValue(); + var _tex = getInputData(6); for( var i = 0, n = array_length(object); i < n; i++ ) { if(instance_exists(object[i])) instance_destroy(object[i]); } object = []; - var _spwn = inputs[| 8].getValue(); + var _spwn = getInputData(8); if(!_spwn) return; if(is_array(_tex)) { @@ -677,9 +677,9 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); - var _tex = inputs[| 6].getValue(); + var _tex = getInputData(6); if(is_array(_tex) && array_length(_tex)) _tex = _tex[0]; - var _spos = inputs[| 7].getValue(); + var _spos = getInputData(7); draw_surface_stretch_fit(_tex, bbox.xc, bbox.yc, bbox.w, bbox.h, _spos[2], _spos[3]); } diff --git a/scripts/node_rigid_object_spawner/node_rigid_object_spawner.gml b/scripts/node_rigid_object_spawner/node_rigid_object_spawner.gml index 86d3a39c6..e7b65eef0 100644 --- a/scripts/node_rigid_object_spawner/node_rigid_object_spawner.gml +++ b/scripts/node_rigid_object_spawner/node_rigid_object_spawner.gml @@ -50,16 +50,16 @@ function Node_Rigid_Object_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group } static step = function() { - var _typ = inputs[| 2].getValue(); + var _typ = getInputData(2); inputs[| 3].setVisible(_typ == 0); inputs[| 5].setVisible(_typ == 1); } static spawn = function(seed = 0) { - var _obj = inputs[| 0].getValue(); - var _are = inputs[| 1].getValue(); - var _amo = inputs[| 4].getValue(); + var _obj = getInputData(0); + var _are = getInputData(1); + var _amo = getInputData(4); repeat(_amo) { var pos = area_get_random_point(_are,,,,, seed); seed += 10; @@ -74,17 +74,17 @@ function Node_Rigid_Object_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group static update = function(frame = PROJECT.animator.current_frame) { RETURN_ON_REST - var _obj = inputs[| 0].getValue(); + var _obj = getInputData(0); if(_obj == noone) return; - var _spw = inputs[| 6].getValue(); + var _spw = getInputData(6); if(!_spw) return; - var _typ = inputs[| 2].getValue(); - var _del = inputs[| 3].getValue(); - var _frm = inputs[| 5].getValue(); - var _amo = inputs[| 4].getValue(); - var _sed = inputs[| 7].getValue() + frame * _amo * 20; + var _typ = getInputData(2); + var _del = getInputData(3); + var _frm = getInputData(5); + var _amo = getInputData(4); + var _sed = getInputData(7) + frame * _amo * 20; if(_typ == 0 && (safe_mod(PROJECT.animator.current_frame, _del) == 0)) spawn(_sed); @@ -95,12 +95,12 @@ function Node_Rigid_Object_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); - var _obj = inputs[| 0].getValue(); + var _obj = getInputData(0); if(_obj == noone) return; if(is_array(_obj)) return; - var _tex = _obj.inputs[| 6].getValue(); - var _spos = _obj.inputs[| 7].getValue(); + var _tex = _obj.getInputData(6); + var _spos = _obj.getInputData(7); draw_surface_stretch_fit(_tex, bbox.xc, bbox.yc, bbox.w, bbox.h, _spos[2], _spos[3]); } diff --git a/scripts/node_rigid_override/node_rigid_override.gml b/scripts/node_rigid_override/node_rigid_override.gml index b47bd34ac..c9c696df1 100644 --- a/scripts/node_rigid_override/node_rigid_override.gml +++ b/scripts/node_rigid_override/node_rigid_override.gml @@ -30,17 +30,17 @@ function Node_Rigid_Override(_x, _y, _group = noone) : Node(_x, _y, _group) cons outputs[| 0] = nodeValue("Object", self, JUNCTION_CONNECT.output, VALUE_TYPE.rigid, noone ); static update = function(frame = PROJECT.animator.current_frame) { - var objNode = inputs[| 0].getValue(); + var objNode = getInputData(0); outputs[| 0].setValue(objNode); if(!variable_struct_exists(objNode, "object")) return; var objs = objNode.object; - var _pos = inputs[| 1].getValue(); - var _sca = inputs[| 2].getValue(); - var _rot = inputs[| 3].getValue(); - var _col = inputs[| 4].getValue(); - var _alp = inputs[| 5].getValue(); - var _vel = inputs[| 6].getValue(); + var _pos = getInputData(1); + var _sca = getInputData(2); + var _rot = getInputData(3); + var _col = getInputData(4); + var _alp = getInputData(5); + var _vel = getInputData(6); for( var i = 0, n = array_length(objs); i < n; i++ ) { var obj = objs[i]; diff --git a/scripts/node_rigid_render/node_rigid_render.gml b/scripts/node_rigid_render/node_rigid_render.gml index bfa7ba8b9..2907866b6 100644 --- a/scripts/node_rigid_render/node_rigid_render.gml +++ b/scripts/node_rigid_render/node_rigid_render.gml @@ -52,7 +52,7 @@ function Node_Rigid_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constr } static step = function() { - var _dim = inputs[| 0].getValue(); + var _dim = getInputData(0); var _outSurf = outputs[| 0].getValue(); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); @@ -63,7 +63,7 @@ function Node_Rigid_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constr if(recoverCache() || !PROJECT.animator.is_playing) return; - var _dim = inputs[| 0].getValue(); + var _dim = getInputData(0); var _outSurf = outputs[| 0].getValue(); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); @@ -78,7 +78,7 @@ function Node_Rigid_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constr physics_world_draw_debug(flag); } else { for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i++ ) { - var objNode = inputs[| i].getValue(); + var objNode = getInputData(i); if(!is_array(objNode)) objNode = [ objNode ]; for( var j = 0; j < array_length(objNode); j++ ) { diff --git a/scripts/node_rigid_variable/node_rigid_variable.gml b/scripts/node_rigid_variable/node_rigid_variable.gml index 5880c265a..a97a2d8e2 100644 --- a/scripts/node_rigid_variable/node_rigid_variable.gml +++ b/scripts/node_rigid_variable/node_rigid_variable.gml @@ -37,7 +37,7 @@ function Node_Rigid_Variable(_x, _y, _group = noone) : Node(_x, _y, _group) cons .setVisible(false); static update = function(frame = PROJECT.animator.current_frame) { - var objNode = inputs[| 0].getValue(); + var objNode = getInputData(0); outputs[| 0].setValue(objNode); if(!variable_struct_exists(objNode, "object")) return; var objs = objNode.object; diff --git a/scripts/node_scale/node_scale.gml b/scripts/node_scale/node_scale.gml index 04c4e63b6..51296174f 100644 --- a/scripts/node_scale/node_scale.gml +++ b/scripts/node_scale/node_scale.gml @@ -5,7 +5,7 @@ function Node_Scale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 1] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY._default, 0.01); + .setDisplay(VALUE_DISPLAY._default, { slide_speed: 0.01 }); inputs[| 2] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_button, [ "Upscale", "Scale to fit" ]); diff --git a/scripts/node_scale_algo/node_scale_algo.gml b/scripts/node_scale_algo/node_scale_algo.gml index ff71e746b..ef1edeb0e 100644 --- a/scripts/node_scale_algo/node_scale_algo.gml +++ b/scripts/node_scale_algo/node_scale_algo.gml @@ -19,7 +19,7 @@ function Node_Scale_Algo(_x, _y, _group = noone) : Node_Processor(_x, _y, _group .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Scale2x", "Scale3x" ]); inputs[| 2] = nodeValue("Tolerance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 3] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 3; diff --git a/scripts/node_scatter/node_scatter.gml b/scripts/node_scatter/node_scatter.gml index 7880920d9..59ec8e024 100644 --- a/scripts/node_scatter/node_scatter.gml +++ b/scripts/node_scatter/node_scatter.gml @@ -15,8 +15,9 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 4] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0, 0, 0, 0, 0 ] ) .setDisplay(VALUE_DISPLAY.rotation_random); + onSurfaceSize = function() { return getInputData(1, DEF_SURF); }; inputs[| 5] = nodeValue("Area", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ DEF_SURF_W / 2, DEF_SURF_H / 2, DEF_SURF_W / 2, DEF_SURF_H / 2, AREA_SHAPE.rectangle ]) - .setDisplay(VALUE_DISPLAY.area, function() { return inputs[| 1].getValue(); }); + .setDisplay(VALUE_DISPLAY.area, { onSurfaceSize }); inputs[| 6] = nodeValue("Distribution", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Area", "Border", "Map", "Direct Data", "Path", "Full image + Tile" ]); @@ -33,7 +34,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 11] = nodeValue("Random blend", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ); inputs[| 12] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) - .setDisplay(VALUE_DISPLAY.slider_range, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider_range); inputs[| 13] = nodeValue("Distribution map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); @@ -49,7 +50,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 16] = nodeValue("Multiply alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 17] = nodeValue("Use value", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, [ "Scale" ], "Apply the third value in each data point (if exist) on given properties.") - .setDisplay(VALUE_DISPLAY.text_array, [ "Scale", "Rotation", "Color" ]); + .setDisplay(VALUE_DISPLAY.text_array, { data: [ "Scale", "Rotation", "Color" ] }); inputs[| 18] = nodeValue("Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Normal", "Add" ]); @@ -59,7 +60,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 20] = nodeValue("Rotate along path", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 21] = nodeValue("Path Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 22] = nodeValue("Scatter Distance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); @@ -90,7 +91,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c static onValueUpdate = function(index) { if(index == 15) { - var _arr = inputs[| 15].getValue(); + var _arr = getInputData(15); inputs[| 0].array_depth = _arr; update(); @@ -98,8 +99,8 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c } static step = function() { - var _dis = inputs[| 6].getValue(); - var _arr = inputs[| 15].getValue(); + var _dis = getInputData(6); + var _arr = getInputData(15); inputs[| 0].array_depth = _arr; inputs[| 13].setVisible(_dis == 2, _dis == 2); @@ -289,7 +290,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c } static doApplyDeserialize = function() { - var _arr = inputs[| 15].getValue(); + var _arr = getInputData(15); inputs[| 0].array_depth = _arr; doUpdate(); diff --git a/scripts/node_scatter_points/node_scatter_points.gml b/scripts/node_scatter_points/node_scatter_points.gml index 3d6c72e5d..c0d8b004e 100644 --- a/scripts/node_scatter_points/node_scatter_points.gml +++ b/scripts/node_scatter_points/node_scatter_points.gml @@ -5,8 +5,9 @@ function Node_Scatter_Points(_x, _y, _group = noone) : Node(_x, _y, _group) cons w = 96; + onSurfaceSize = function() { return getInputData(7, DEF_SURF); }; inputs[| 0] = nodeValue("Point area", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ DEF_SURF_W / 2, DEF_SURF_H / 2, DEF_SURF_W / 2, DEF_SURF_H / 2, AREA_SHAPE.rectangle ]) - .setDisplay(VALUE_DISPLAY.area, function() { return inputs[| 7].getValue(); }); + .setDisplay(VALUE_DISPLAY.area, { onSurfaceSize }); inputs[| 1] = nodeValue("Point distribution", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_button, [ "Area", "Border", "Map" ]) @@ -41,7 +42,7 @@ function Node_Scatter_Points(_x, _y, _group = noone) : Node(_x, _y, _group) cons refVal = nodeValue("Reference value", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); static step = function() { - var _dist = inputs[| 1].getValue(); + var _dist = getInputData(1); inputs[| 2].setVisible(_dist != 2); inputs[| 4].setVisible(_dist == 2, _dist == 2); @@ -54,14 +55,14 @@ function Node_Scatter_Points(_x, _y, _group = noone) : Node(_x, _y, _group) cons static getPreviewValues = function() { return refVal.getValue(); } static update = function(frame = PROJECT.animator.current_frame) { - var _area = inputs[| 0].getValue(); - var _dist = inputs[| 1].getValue(); - var _scat = inputs[| 2].getValue(); - var _amo = inputs[| 3].getValue(); - var _distMap = inputs[| 4].getValue(); - var _seed = inputs[| 5].getValue(); - var _fix = inputs[| 6].getValue(); - var _fixRef = inputs[| 7].getValue(); + var _area = getInputData(0); + var _dist = getInputData(1); + var _scat = getInputData(2); + var _amo = getInputData(3); + var _distMap = getInputData(4); + var _seed = getInputData(5); + var _fix = getInputData(6); + var _fixRef = getInputData(7); inputs[| 7].setVisible(_fix); var pos = []; diff --git a/scripts/node_sdf/node_sdf.gml b/scripts/node_sdf/node_sdf.gml index bb95dd989..dd42c2a04 100644 --- a/scripts/node_sdf/node_sdf.gml +++ b/scripts/node_sdf/node_sdf.gml @@ -17,7 +17,7 @@ function Node_SDF(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const .setDisplay(VALUE_DISPLAY.enum_button, [ "Inside", "Outside", "Both" ]); inputs[| 3] = nodeValue("Max distance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 2, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] }); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); diff --git a/scripts/node_seperate_shapes/node_seperate_shapes.gml b/scripts/node_seperate_shapes/node_seperate_shapes.gml index 0554f3780..077120aed 100644 --- a/scripts/node_seperate_shapes/node_seperate_shapes.gml +++ b/scripts/node_seperate_shapes/node_seperate_shapes.gml @@ -6,7 +6,7 @@ function Node_Seperate_Shape(_x, _y, _group = noone) : Node(_x, _y, _group) cons .rejectArray(); inputs[| 1] = nodeValue("Tolerance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]) + .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); inputs[| 2] = nodeValue("Override color", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) @@ -58,11 +58,11 @@ function Node_Seperate_Shape(_x, _y, _group = noone) : Node(_x, _y, _group) cons } static separateShape = function() { - var _inSurf = inputs[| 0].getValue(); - var _thres = inputs[| 1].getValue(); - var _ovr = inputs[| 2].getValue(); - var _ovrclr = inputs[| 3].getValue(); - var _ignore = inputs[| 4].getValue(); + var _inSurf = getInputData(0); + var _thres = getInputData(1); + var _ovr = getInputData(2); + var _ovrclr = getInputData(3); + var _ignore = getInputData(4); var t = current_time; if(!is_surface(_inSurf)) return; diff --git a/scripts/node_sequence_to_anim/node_sequence_to_anim.gml b/scripts/node_sequence_to_anim/node_sequence_to_anim.gml index 6880a752a..7a23bf4b4 100644 --- a/scripts/node_sequence_to_anim/node_sequence_to_anim.gml +++ b/scripts/node_sequence_to_anim/node_sequence_to_anim.gml @@ -19,8 +19,8 @@ function Node_Sequence_Anim(_x, _y, _group = noone) : Node(_x, _y, _group) const sequence_surface = noone; sequence_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { - var _seq = inputs[| 0].getValue(); - var _ord = inputs[| 2].getValue(); + var _seq = getInputData(0); + var _ord = getInputData(2); var _h = ui(64); if(array_length(_ord) == 0) { @@ -84,15 +84,15 @@ function Node_Sequence_Anim(_x, _y, _group = noone) : Node(_x, _y, _group) const ]; static update = function(frame = PROJECT.animator.current_frame) { - var _sur = inputs[| 0].getValue(); + var _sur = getInputData(0); if(!is_array(_sur)) { outputs[| 0].setValue(_sur); return; } - var _spd = inputs[| 1].getValue(); - var _seq = inputs[| 2].getValue(); - var _ovf = inputs[| 3].getValue(); + var _spd = getInputData(1); + var _seq = getInputData(2); + var _ovf = getInputData(3); var frm = floor(PROJECT.animator.current_frame / _spd); var ind = frm; diff --git a/scripts/node_shadow/node_shadow.gml b/scripts/node_shadow/node_shadow.gml index 2f099a545..7d9d34330 100644 --- a/scripts/node_shadow/node_shadow.gml +++ b/scripts/node_shadow/node_shadow.gml @@ -10,22 +10,22 @@ function Node_Shadow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 1] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); inputs[| 2] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, .5) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 2, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] }); inputs[| 3] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 4, 4 ]) .setDisplay(VALUE_DISPLAY.vector) .setUnitRef(function(index) { return getDimension(index); }); inputs[| 4] = nodeValue("Grow", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3) - .setDisplay(VALUE_DISPLAY.slider, [0, 16, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 1] }); inputs[| 5] = nodeValue("Blur", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3) - .setDisplay(VALUE_DISPLAY.slider, [1, 16, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 1] }); inputs[| 6] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 7] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 8] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 8; diff --git a/scripts/node_shadow_cast/node_shadow_cast.gml b/scripts/node_shadow_cast/node_shadow_cast.gml index 75d6a92d0..ffcaf1540 100644 --- a/scripts/node_shadow_cast/node_shadow_cast.gml +++ b/scripts/node_shadow_cast/node_shadow_cast.gml @@ -33,7 +33,7 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 2] = nodeValue("Light Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector) .setUnitRef(function(index) { - var _surf = inputs[| 0].getValue(); + var _surf = getInputData(0); if(is_array(_surf) && array_length(_surf) == 0) return [1, 1]; @@ -47,10 +47,10 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou }, VALUE_UNIT.reference); inputs[| 3] = nodeValue("Soft light radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 2, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 2, 0.01] }); inputs[| 4] = nodeValue("Light density", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.slider, [1, 16, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 1] }); inputs[| 5] = nodeValue("Light type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, ["Point", "Sun"]); @@ -66,22 +66,22 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 10] = nodeValue("Use BG color", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "If checked, background color will be used as shadow caster."); inputs[| 11] = nodeValue("BG threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 12] = nodeValue("Light intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 2, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 2, 0.01] }); inputs[| 13] = nodeValue("Banding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.slider, [0, 16, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 1] }); inputs[| 14] = nodeValue("Attenuation", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "Control how light fade out over distance.") .setDisplay(VALUE_DISPLAY.enum_scroll, ["Quadratic", "Invert quadratic", "Linear"]); inputs[| 15] = nodeValue("Ambient occlusion", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.slider, [0, 16, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 1] }); inputs[| 16] = nodeValue("Ambient occlusion strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) - .setDisplay(VALUE_DISPLAY.slider, [0, 0.5, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.01] }); inputs[| 17] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 17; diff --git a/scripts/node_shell/node_shell.gml b/scripts/node_shell/node_shell.gml index 023a428ca..4b352736e 100644 --- a/scripts/node_shell/node_shell.gml +++ b/scripts/node_shell/node_shell.gml @@ -15,8 +15,8 @@ function Node_Shell(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static onInspector1Update = function() { update(); } static update = function() { - var _pro = inputs[| 0].getValue(); - var _scr = inputs[| 1].getValue(); + var _pro = getInputData(0); + var _scr = getInputData(1); if(_pro == "") return; shell_execute(_pro, _scr); @@ -24,7 +24,7 @@ function Node_Shell(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); - var txt = inputs[| 0].getValue(); + var txt = getInputData(0); draw_set_text(f_p0, fa_center, fa_center, COLORS._main_text); draw_text_bbox(bbox, txt); diff --git a/scripts/node_simple_shape/node_simple_shape.gml b/scripts/node_simple_shape/node_simple_shape.gml index 91b5e73e3..658f5dabe 100644 --- a/scripts/node_simple_shape/node_simple_shape.gml +++ b/scripts/node_simple_shape/node_simple_shape.gml @@ -38,14 +38,15 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 2] = nodeValue("Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Rectangle", "Ellipse", "Regular polygon", "Star", "Arc", "Teardrop", "Cross", "Leaf" ]); + onSurfaceSize = function() { return getInputData(0, DEF_SURF); }; inputs[| 3] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ DEF_SURF_W / 2, DEF_SURF_H / 2, DEF_SURF_W / 2, DEF_SURF_H / 2, AREA_SHAPE.rectangle ]) - .setDisplay(VALUE_DISPLAY.area, function() { return inputs[| 0].getValue(); }); + .setDisplay(VALUE_DISPLAY.area, { onSurfaceSize }); inputs[| 4] = nodeValue("Sides", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 3) .setVisible(false); inputs[| 5] = nodeValue("Inner radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]) + .setDisplay(VALUE_DISPLAY.slider) .setVisible(false); inputs[| 6] = nodeValue("Anti alising", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); @@ -57,7 +58,7 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con .setDisplay(VALUE_DISPLAY.rotation_range); inputs[| 9] = nodeValue("Corner radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [0, 0.5, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.01] }); inputs[| 10] = nodeValue("Shape color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); @@ -66,7 +67,7 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 12] = nodeValue("Height", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); inputs[| 13] = nodeValue("Start radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]) + .setDisplay(VALUE_DISPLAY.slider) .setVisible(false); inputs[| 14] = nodeValue("Shape path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone) @@ -83,7 +84,7 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con attribute_surface_depth(); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _path = inputs[| 14].getValue(); + var _path = getInputData(14); if(_path != noone && struct_has(_path, "getPointRatio")) return; inputs[| 3].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } diff --git a/scripts/node_skew/node_skew.gml b/scripts/node_skew/node_skew.gml index e00faf79d..c07b26f46 100644 --- a/scripts/node_skew/node_skew.gml +++ b/scripts/node_skew/node_skew.gml @@ -6,7 +6,7 @@ function Node_Skew(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons .setDisplay(VALUE_DISPLAY.enum_button, ["x", "y"]); inputs[| 2] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [-1, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.01] }); inputs[| 3] = nodeValue("Wrap", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); @@ -21,7 +21,7 @@ function Node_Skew(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 6] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 7] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 8] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 8; diff --git a/scripts/node_sprite_stack/node_sprite_stack.gml b/scripts/node_sprite_stack/node_sprite_stack.gml index d2160d58f..ce0473ba1 100644 --- a/scripts/node_sprite_stack/node_sprite_stack.gml +++ b/scripts/node_sprite_stack/node_sprite_stack.gml @@ -22,7 +22,7 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 6] = nodeValue("Stack blend", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white ); inputs[| 7] = nodeValue("Alpha end", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1, "Alpha value for the last copy." ) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, .01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 8] = nodeValue("Move base", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Make each copy move the original image." ); @@ -32,7 +32,7 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 10] = nodeValue("Highlight color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); inputs[| 11] = nodeValue("Highlight alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, .01]); + .setDisplay(VALUE_DISPLAY.slider); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); @@ -45,7 +45,7 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro attribute_surface_depth(); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var pos = inputs[| 4].getValue(); + var pos = getInputData(4); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; @@ -54,7 +54,7 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro } static step = function() { - var _high = inputs[| 9].getValue(); + var _high = getInputData(9); inputs[| 10].setVisible(_high); inputs[| 11].setVisible(_high); diff --git a/scripts/node_stack/node_stack.gml b/scripts/node_stack/node_stack.gml index b4814bbd1..e95e77017 100644 --- a/scripts/node_stack/node_stack.gml +++ b/scripts/node_stack/node_stack.gml @@ -53,22 +53,22 @@ function Node_Stack(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { } #endregion static step = function() { #region - var _axis = inputs[| 0].getValue(); + var _axis = getInputData(0); inputs[| 1].setVisible(_axis != 2); inputs[| 2].setVisible(_axis != 2); } #endregion static update = function(frame = PROJECT.animator.current_frame) { #region - var _axis = inputs[| 0].getValue(); - var _alig = inputs[| 1].getValue(); - var _spac = inputs[| 2].getValue(); + var _axis = getInputData(0); + var _alig = getInputData(1); + var _spac = getInputData(2); var ww = 0; var hh = 0; for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i++ ) { - var _surf = inputs[| i].getValue(); + var _surf = getInputData(i); if(!is_array(_surf)) _surf = [ _surf ]; for( var j = 0; j < array_length(_surf); j++ ) { @@ -101,7 +101,7 @@ function Node_Stack(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var sx = 0, sy = 0; for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i++ ) { - var _surf = inputs[| i].getValue(); + var _surf = getInputData(i); if(!is_array(_surf)) _surf = [ _surf ]; for( var j = 0; j < array_length(_surf); j++ ) { diff --git a/scripts/node_statistic/node_statistic.gml b/scripts/node_statistic/node_statistic.gml index 0a7e1a060..fa16574c5 100644 --- a/scripts/node_statistic/node_statistic.gml +++ b/scripts/node_statistic/node_statistic.gml @@ -76,13 +76,13 @@ function Node_Statistic(_x, _y, _group = noone) : Node(_x, _y, _group) construct } static update = function(frame = PROJECT.animator.current_frame) { - var type = inputs[| 0].getValue(); + var type = getInputData(0); var res = 0; switch(type) { case STAT_OPERATOR._sum : for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i++ ) { - var val = inputs[| i].getValue(); + var val = getInputData(i); if(is_array(val)) { for( var j = 0; j < array_length(val); j++ ) res += val[j]; @@ -98,7 +98,7 @@ function Node_Statistic(_x, _y, _group = noone) : Node(_x, _y, _group) construct var amo = 0; for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i++ ) { - var val = inputs[| i].getValue(); + var val = getInputData(i); if(is_array(val)) { for( var j = 0; j < array_length(val); j++ ) { res += val[j]; @@ -120,7 +120,7 @@ function Node_Statistic(_x, _y, _group = noone) : Node(_x, _y, _group) construct var vals = []; var amo = 0; for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i++ ) { - var val = inputs[| i].getValue(); + var val = getInputData(i); if(is_array(val)) { for( var j = 0; j < array_length(val); j++ ) { array_push(vals, val[j]); @@ -146,7 +146,7 @@ function Node_Statistic(_x, _y, _group = noone) : Node(_x, _y, _group) construct case STAT_OPERATOR._min : var _min = 9999999999; for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i++ ) { - var val = inputs[| i].getValue(); + var val = getInputData(i); if(is_array(val)) { for( var j = 0; j < array_length(val); j++ ) _min = min(_min, val[j]); @@ -159,7 +159,7 @@ function Node_Statistic(_x, _y, _group = noone) : Node(_x, _y, _group) construct var _max = -9999999999; for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i++ ) { - var val = inputs[| i].getValue(); + var val = getInputData(i); if(is_array(val)) { for( var j = 0; j < array_length(val); j++ ) _max = max(_max, val[j]); @@ -176,7 +176,7 @@ function Node_Statistic(_x, _y, _group = noone) : Node(_x, _y, _group) construct static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { draw_set_text(f_h3, fa_center, fa_center, COLORS._main_text); var str = ""; - switch(inputs[| 0].getValue()) { + switch(getInputData(0)) { case STAT_OPERATOR._average : str = "Avg"; break; case STAT_OPERATOR._sum : str = "Sum"; break; case STAT_OPERATOR._median : str = "Med"; break; diff --git a/scripts/node_strand_break/node_strand_break.gml b/scripts/node_strand_break/node_strand_break.gml index 132b213fe..eedfc53d6 100644 --- a/scripts/node_strand_break/node_strand_break.gml +++ b/scripts/node_strand_break/node_strand_break.gml @@ -5,7 +5,7 @@ function Node_Strand_Break(_x, _y, _group = noone) : _Node_Strand_Affector(_x, _ w = 96; inputs[| input_fix_len + 0] = nodeValue("Chance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| input_fix_len + 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, irandom_range(100000, 999999)); @@ -14,8 +14,8 @@ function Node_Strand_Break(_x, _y, _group = noone) : _Node_Strand_Affector(_x, _ ); static update = function(frame = PROJECT.animator.current_frame) { - var _cha = inputs[| input_fix_len + 0].getValue(); - var _sed = inputs[| input_fix_len + 1].getValue(); + var _cha = getInputData(input_fix_len + 0); + var _sed = getInputData(input_fix_len + 1); STRAND_EFFECTOR_PRE if(_sed && random1D(h.id) < _cha * mulp) diff --git a/scripts/node_strand_collision/node_strand_collision.gml b/scripts/node_strand_collision/node_strand_collision.gml index 04c64e9e9..4485456ab 100644 --- a/scripts/node_strand_collision/node_strand_collision.gml +++ b/scripts/node_strand_collision/node_strand_collision.gml @@ -13,7 +13,7 @@ function Node_Strand_Collision(_x, _y, _group = noone) : Node(_x, _y, _group) co outputs[| 0] = nodeValue("Strand", self, JUNCTION_CONNECT.output, VALUE_TYPE.strands, noone); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _msh = inputs[| 1].getValue(); + var _msh = getInputData(1); if(_msh == noone) return; draw_set_color(COLORS._main_accent); @@ -21,8 +21,8 @@ function Node_Strand_Collision(_x, _y, _group = noone) : Node(_x, _y, _group) co } static update = function(frame = PROJECT.animator.current_frame) { - var _str = inputs[| 0].getValue(); - var _msh = inputs[| 1].getValue(); + var _str = getInputData(0); + var _msh = getInputData(1); if(_str == noone) return; var __str = _str; diff --git a/scripts/node_strand_create/node_strand_create.gml b/scripts/node_strand_create/node_strand_create.gml index 05bf4aa1f..779721fd3 100644 --- a/scripts/node_strand_create/node_strand_create.gml +++ b/scripts/node_strand_create/node_strand_create.gml @@ -16,7 +16,7 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const inputs[| 3] = nodeValue("Segment", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4); inputs[| 4] = nodeValue("Elasticity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.05, "Length preservation, the higher the value the easier it is to stretch each segment.") - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 5] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone); @@ -27,17 +27,17 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const .setDisplay(VALUE_DISPLAY.enum_button, [ "Inner", "Outer", "Both" ]); inputs[| 8] = nodeValue("Spring", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.8, "Angular stiffness, the higher the value the easier it is to bend each segment.") - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 9] = nodeValue("Structure", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2, "The ability to keep its original shape.") - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 10] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, irandom_range(10000, 99999)); inputs[| 11] = nodeValue("Curl frequency", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); inputs[| 12] = nodeValue("Curliness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 13] = nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone); @@ -45,12 +45,12 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Uniform", "Random" ]); inputs[| 15] = nodeValue("Bake hair", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, 0, "Prevent strand reseting to apply manual modification. Unbaking will remove all changes.") - .setDisplay(VALUE_DISPLAY.button, [ function() { + .setDisplay(VALUE_DISPLAY.button, { name: "Bake", onClick: function() { attributes.use_groom = !attributes.use_groom; if(attributes.use_groom) groomed = strands.clone(); strandUpdate(true); - }, "Bake" ]); + } }); inputs[| 16] = nodeValue("View fix hair", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); @@ -116,8 +116,8 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const tool_grabbing = []; static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _typ = inputs[| 0].getValue(); - var _pre = inputs[| 16].getValue(); + var _typ = getInputData(0); + var _pre = getInputData(16); if(!attributes.use_groom) strands.draw(_x, _y, _s, _pre); @@ -127,8 +127,8 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const if(tool_dragging == noone) inputs[| 6].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } else if(_typ == 1) { - var _pth = inputs[| 5].getValue(); - var _sid = inputs[| 7].getValue(); + var _pth = getInputData(5); + var _sid = getInputData(7); if(!struct_has(_pth, "getPointRatio")) return; var lines = struct_has(_pth, "getLineCount")? _pth.getLineCount() : 1; @@ -147,7 +147,7 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const oy = ny; } } else if(_typ == 2) { - var _msh = inputs[| 13].getValue(); + var _msh = getInputData(13); if(_msh == noone) return; draw_set_color(COLORS._main_accent); @@ -421,7 +421,7 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const } static step = function() { - var _typ = inputs[| 0].getValue(); + var _typ = getInputData(0); inputs[| 5].setVisible(_typ == 1, _typ == 1); inputs[| 7].setVisible(_typ == 1); @@ -433,22 +433,22 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const } static strandUpdate = function(willReset = false) { - var _typ = inputs[| 0].getValue(); - var _den = inputs[| 1].getValue(); - var _len = inputs[| 2].getValue(); - var _seg = inputs[| 3].getValue(); _seg = _seg + 1; - var _ten = inputs[| 4].getValue(); _ten = 1 - _ten; - var _pth = inputs[| 5].getValue(); - var _pos = inputs[| 6].getValue(); - var _sid = inputs[| 7].getValue(); - var _spr = inputs[| 8].getValue(); - var _ang = inputs[| 9].getValue(); - var _sed = inputs[| 10].getValue(); - var _crF = inputs[| 11].getValue(); - var _crS = inputs[| 12].getValue(); - var _msh = inputs[| 13].getValue(); - var _rnd = inputs[| 14].getValue(); - var _rot = inputs[| 17].getValue(); + var _typ = getInputData(0); + var _den = getInputData(1); + var _len = getInputData(2); + var _seg = getInputData(3); _seg = _seg + 1; + var _ten = getInputData(4); _ten = 1 - _ten; + var _pth = getInputData(5); + var _pos = getInputData(6); + var _sid = getInputData(7); + var _spr = getInputData(8); + var _ang = getInputData(9); + var _sed = getInputData(10); + var _crF = getInputData(11); + var _crS = getInputData(12); + var _msh = getInputData(13); + var _rnd = getInputData(14); + var _rot = getInputData(17); var sx, sy, prog, dir; if(willReset) { 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 6185488a1..a8879a92a 100644 --- a/scripts/node_strand_force_apply/node_strand_force_apply.gml +++ b/scripts/node_strand_force_apply/node_strand_force_apply.gml @@ -5,7 +5,7 @@ function Node_Strand_Force_Apply(_x, _y, _group = noone) : _Node_Strand_Affector w = 96; inputs[| input_fix_len + 0] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 5, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 5, 0.01 ] }); inputs[| input_fix_len + 1] = nodeValue("Turbulence", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); @@ -20,14 +20,14 @@ function Node_Strand_Force_Apply(_x, _y, _group = noone) : _Node_Strand_Affector ); static update = function(frame = PROJECT.animator.current_frame) { - var _pos = inputs[| 2].getValue(); - var _dir = inputs[| 4].getValue(); + var _pos = getInputData(2); + var _dir = getInputData(4); - var _stn = inputs[| input_fix_len + 0].getValue(); - var _tur = inputs[| input_fix_len + 1].getValue(); - var _sed = inputs[| input_fix_len + 2].getValue(); - var _tfr = inputs[| input_fix_len + 3].getValue(); - var _toc = inputs[| input_fix_len + 4].getValue(); + var _stn = getInputData(input_fix_len + 0); + var _tur = getInputData(input_fix_len + 1); + var _sed = getInputData(input_fix_len + 2); + var _tfr = getInputData(input_fix_len + 3); + var _toc = getInputData(input_fix_len + 4); inputs[| 4].setVisible(true); diff --git a/scripts/node_strand_gravity/node_strand_gravity.gml b/scripts/node_strand_gravity/node_strand_gravity.gml index 0d0fed1fc..dd840e82e 100644 --- a/scripts/node_strand_gravity/node_strand_gravity.gml +++ b/scripts/node_strand_gravity/node_strand_gravity.gml @@ -15,9 +15,9 @@ function Node_Strand_Gravity(_x, _y, _group = noone) : Node(_x, _y, _group) cons outputs[| 0] = nodeValue("Strand", self, JUNCTION_CONNECT.output, VALUE_TYPE.strands, noone); static update = function(frame = PROJECT.animator.current_frame) { - var _str = inputs[| 0].getValue(); - var _gra = inputs[| 1].getValue(); - var _dir = inputs[| 2].getValue(); + var _str = getInputData(0); + var _gra = getInputData(1); + var _dir = getInputData(2); if(_str == noone) return; var __str = _str; 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 972c06998..11de1ae49 100644 --- a/scripts/node_strand_length_adjust/node_strand_length_adjust.gml +++ b/scripts/node_strand_length_adjust/node_strand_length_adjust.gml @@ -8,15 +8,15 @@ function Node_Strand_Length_Adjust(_x, _y, _group = noone) : _Node_Strand_Affect .setDisplay(VALUE_DISPLAY.enum_button, [ "Increase", "Decrease" ]); inputs[| input_fix_len + 1] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); array_push(input_display_list, ["Length adjust", false], input_fix_len + 0, input_fix_len + 1, ); static update = function(frame = PROJECT.animator.current_frame) { - var _sTyp = inputs[| input_fix_len + 0].getValue(); - var _sStr = inputs[| input_fix_len + 1].getValue(); + var _sTyp = getInputData(input_fix_len + 0); + var _sStr = getInputData(input_fix_len + 1); STRAND_EFFECTOR_PRE h.length[j] *= 1 + (_sTyp? -1 : 1) * mulp * _sStr; diff --git a/scripts/node_strand_render/node_strand_render.gml b/scripts/node_strand_render/node_strand_render.gml index 02fe8cf3c..e8e6ce2dd 100644 --- a/scripts/node_strand_render/node_strand_render.gml +++ b/scripts/node_strand_render/node_strand_render.gml @@ -37,7 +37,7 @@ function Node_Strand_Render(_x, _y, _group = noone) : Node(_x, _y, _group) const static onInspector2Update = function() { clearCache(); } static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _str = inputs[| 1].getValue(); + var _str = getInputData(1); if(_str == noone) return; if(!is_array(_str)) _str = [ _str ]; @@ -48,15 +48,14 @@ function Node_Strand_Render(_x, _y, _group = noone) : Node(_x, _y, _group) const static update = function(frame = PROJECT.animator.current_frame) { if(!PROJECT.animator.is_playing && recoverCache()) return; - var _dim = inputs[| 0].getValue(); - var _str = inputs[| 1].getValue(); - - var _thk = inputs[| 2].getValue(); - var _tln = inputs[| 3].getValue(); - var _bld = inputs[| 4].getValue(); - var _col = inputs[| 5].getValue(); - var _sed = inputs[| 6].getValue(); - var _chd = inputs[| 7].getValue(); + var _dim = getInputData(0); + var _str = getInputData(1); + var _thk = getInputData(2); + var _tln = getInputData(3); + var _bld = getInputData(4); + var _col = getInputData(5); + var _sed = getInputData(6); + var _chd = getInputData(7); var _surf = outputs[| 0].getValue(); _surf = surface_verify(_surf, _dim[0], _dim[1]); 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 48e7eb462..502acd286 100644 --- a/scripts/node_strand_render_texture/node_strand_render_texture.gml +++ b/scripts/node_strand_render_texture/node_strand_render_texture.gml @@ -33,7 +33,7 @@ function Node_Strand_Render_Texture(_x, _y, _group = noone) : Node(_x, _y, _grou static onInspector2Update = function() { clearCache(); } static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _str = inputs[| 1].getValue(); + var _str = getInputData(1); if(instanceof(_str) != "StrandMesh") return; _str.draw(_x, _y, _s); @@ -42,13 +42,13 @@ function Node_Strand_Render_Texture(_x, _y, _group = noone) : Node(_x, _y, _grou static update = function(frame = PROJECT.animator.current_frame) { if(!PROJECT.animator.is_playing && recoverCache()) return; - var _dim = inputs[| 0].getValue(); - var _str = inputs[| 1].getValue(); + var _dim = getInputData(0); + var _str = getInputData(1); - var _thk = inputs[| 2].getValue(); - var _bld = inputs[| 3].getValue(); - var _tex = inputs[| 4].getValue(); - var _sed = inputs[| 5].getValue(); + var _thk = getInputData(2); + var _bld = getInputData(3); + var _tex = getInputData(4); + var _sed = getInputData(5); var _surf = outputs[| 0].getValue(); _surf = surface_verify(_surf, _dim[0], _dim[1]); diff --git a/scripts/node_strand_update/node_strand_update.gml b/scripts/node_strand_update/node_strand_update.gml index 6b3626f20..9b8d14fb9 100644 --- a/scripts/node_strand_update/node_strand_update.gml +++ b/scripts/node_strand_update/node_strand_update.gml @@ -12,8 +12,8 @@ function Node_Strand_Update(_x, _y, _group = noone) : Node(_x, _y, _group) const outputs[| 0] = nodeValue("Strand", self, JUNCTION_CONNECT.output, VALUE_TYPE.strands, noone); static update = function(frame = PROJECT.animator.current_frame) { - var _str = inputs[| 0].getValue(); - var _itr = inputs[| 1].getValue(); + var _str = getInputData(0); + var _itr = getInputData(1); if(_str == noone) return; var __str = _str; diff --git a/scripts/node_string/node_string.gml b/scripts/node_string/node_string.gml index e69f38c36..1836289cf 100644 --- a/scripts/node_string/node_string.gml +++ b/scripts/node_string/node_string.gml @@ -12,7 +12,7 @@ function Node_String(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { - var str = inputs[| 0].getValue(); + var str = getInputData(0); var bbox = drawGetBbox(xx, yy, _s); draw_set_text(f_h5, fa_center, fa_center, COLORS._main_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 34f838b84..6a7951a69 100644 --- a/scripts/node_string_get_char/node_string_get_char.gml +++ b/scripts/node_string_get_char/node_string_get_char.gml @@ -17,7 +17,7 @@ function Node_String_Get_Char(_x, _y, _group = noone) : Node_Processor(_x, _y, _ } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { - var str = inputs[| 0].getValue(); + var str = getInputData(0); var bbox = drawGetBbox(xx, yy, _s); draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text); diff --git a/scripts/node_string_join/node_string_join.gml b/scripts/node_string_join/node_string_join.gml index 1f00263ef..476e7cc8d 100644 --- a/scripts/node_string_join/node_string_join.gml +++ b/scripts/node_string_join/node_string_join.gml @@ -14,8 +14,8 @@ function Node_String_Join(_x, _y, _group = noone) : Node(_x, _y, _group) constru outputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, ""); static update = function() { - var _arr = inputs[| 0].getValue(); - var _div = inputs[| 1].getValue(); + var _arr = getInputData(0); + var _div = getInputData(1); var str = ""; for( var i = 0, n = array_length(_arr); i < n; i++ ) diff --git a/scripts/node_string_merge/node_string_merge.gml b/scripts/node_string_merge/node_string_merge.gml index e8a8cad39..d240e3616 100644 --- a/scripts/node_string_merge/node_string_merge.gml +++ b/scripts/node_string_merge/node_string_merge.gml @@ -15,7 +15,7 @@ function Node_String_Merge(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { - var str = inputs[| 0].getValue(); + var str = getInputData(0); var bbox = drawGetBbox(xx, yy, _s); draw_set_text(f_h5, fa_center, fa_center, COLORS._main_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 9c7822359..8f47da774 100644 --- a/scripts/node_string_regex_match/node_string_regex_match.gml +++ b/scripts/node_string_regex_match/node_string_regex_match.gml @@ -23,7 +23,7 @@ function Node_String_Regex_Match(_x, _y, _group = noone) : Node_Processor(_x, _y } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { - var str = inputs[| 0].getValue(); + var str = getInputData(0); var bbox = drawGetBbox(xx, yy, _s); draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text); diff --git a/scripts/node_string_split/node_string_split.gml b/scripts/node_string_split/node_string_split.gml index 3546f4ae1..bb259a622 100644 --- a/scripts/node_string_split/node_string_split.gml +++ b/scripts/node_string_split/node_string_split.gml @@ -23,7 +23,7 @@ function Node_String_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { - var str = inputs[| 1].getValue(); + var str = getInputData(1); var bbox = drawGetBbox(xx, yy, _s); var cx = bbox.xc; var cy = bbox.yc; diff --git a/scripts/node_string_trim/node_string_trim.gml b/scripts/node_string_trim/node_string_trim.gml index e37e59a00..1a9a0e2cc 100644 --- a/scripts/node_string_trim/node_string_trim.gml +++ b/scripts/node_string_trim/node_string_trim.gml @@ -26,7 +26,7 @@ function Node_String_Trim(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou ]; static step = function() { - var mode = inputs[| 4].getValue(); + var mode = getInputData(4); inputs[| 1].type = mode? VALUE_TYPE.float : VALUE_TYPE.integer; inputs[| 2].type = mode? VALUE_TYPE.float : VALUE_TYPE.integer; diff --git a/scripts/node_stripe/node_stripe.gml b/scripts/node_stripe/node_stripe.gml index d3880b63c..9c5735d36 100644 --- a/scripts/node_stripe/node_stripe.gml +++ b/scripts/node_stripe/node_stripe.gml @@ -22,7 +22,7 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co .setDisplay(VALUE_DISPLAY.vector); inputs[| 1] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [1, 16, 0.1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); inputs[| 2] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.rotation); @@ -34,7 +34,7 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co .setUnitRef(function(index) { return getDimension(index); }); inputs[| 5] = nodeValue("Random", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 6] = nodeValue("Random color", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); @@ -55,7 +55,7 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co attribute_surface_depth(); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var pos = inputs[| 4].getValue(); + var pos = getInputData(4); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; diff --git a/scripts/node_struct/node_struct.gml b/scripts/node_struct/node_struct.gml index 71f9e188b..9f5e437f8 100644 --- a/scripts/node_struct/node_struct.gml +++ b/scripts/node_struct/node_struct.gml @@ -25,7 +25,7 @@ function Node_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constructor ds_list_add(_in, inputs[| i]); for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { - if(inputs[| i].getValue() != "") { + if(getInputData(i) != "") { ds_list_add(_in, inputs[| i + 0]); ds_list_add(_in, inputs[| i + 1].setVisible(false, true)); } else { @@ -50,7 +50,7 @@ function Node_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constructor if(index < 0) return; if(safe_mod(index - input_fix_len, data_length) == 0) - inputs[| index + 1].name = inputs[| index].getValue() + " value"; + inputs[| index + 1].name = getInputData(index) + " value"; } static step = function() { @@ -65,8 +65,8 @@ function Node_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var str = {}; for(var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length) { - var key = inputs[| i + 0].getValue(); - var val = inputs[| i + 1].getValue(); + var key = getInputData(i + 0); + var val = getInputData(i + 1); var frm = inputs[| i + 1].value_from; if(frm != noone && frm.type == VALUE_TYPE.surface) @@ -85,7 +85,7 @@ function Node_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constructor draw_set_text(f_p0b, fa_left, fa_center, COLORS._main_text); for(var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length) { - var key = inputs[| i + 0].getValue(); + var key = getInputData(i + 0); var val = inputs[| i + 1]; draw_set_color(value_color(val.type)); diff --git a/scripts/node_struct_get/node_struct_get.gml b/scripts/node_struct_get/node_struct_get.gml index d36f09145..a93f86cda 100644 --- a/scripts/node_struct_get/node_struct_get.gml +++ b/scripts/node_struct_get/node_struct_get.gml @@ -12,8 +12,8 @@ function Node_Struct_Get(_x, _y, _group = noone) : Node(_x, _y, _group) construc outputs[| 0] = nodeValue("Struct", self, JUNCTION_CONNECT.output, VALUE_TYPE.struct, {}); static update = function() { - var str = inputs[| 0].getValue(); - var key = inputs[| 1].getValue(); + var str = getInputData(0); + var key = getInputData(1); var keys = string_splice(key, "."); var _str = str; @@ -55,7 +55,7 @@ function Node_Struct_Get(_x, _y, _group = noone) : Node(_x, _y, _group) construc static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); - var str = inputs[| 1].getValue(); + var str = getInputData(1); draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text); var ss = string_scale(str, bbox.w, bbox.h); diff --git a/scripts/node_struct_json_parse/node_struct_json_parse.gml b/scripts/node_struct_json_parse/node_struct_json_parse.gml index a57fdfe03..ee6f01294 100644 --- a/scripts/node_struct_json_parse/node_struct_json_parse.gml +++ b/scripts/node_struct_json_parse/node_struct_json_parse.gml @@ -12,7 +12,7 @@ function Node_Struct_JSON_Parse(_x, _y, _group = noone) : Node(_x, _y, _group) c outputs[| 0] = nodeValue("Struct", self, JUNCTION_CONNECT.output, VALUE_TYPE.struct, {} ); static update = function(frame = PROJECT.animator.current_frame) { - var _str = inputs[| 0].getValue(); + var _str = getInputData(0); var str = json_parse(_str); outputs[| 0].setValue(str); } diff --git a/scripts/node_surface_data/node_surface_data.gml b/scripts/node_surface_data/node_surface_data.gml index f91af133f..39819ddae 100644 --- a/scripts/node_surface_data/node_surface_data.gml +++ b/scripts/node_surface_data/node_surface_data.gml @@ -13,7 +13,7 @@ function Node_Surface_data(_x, _y, _group = noone) : Node(_x, _y, _group) constr w = 96; static update = function(frame = PROJECT.animator.current_frame) { - var _insurf = inputs[| 0].getValue(); + var _insurf = getInputData(0); if(is_array(_insurf)) { var len = array_length(_insurf); var _dim = array_create(len); diff --git a/scripts/node_surface_replace/node_surface_replace.gml b/scripts/node_surface_replace/node_surface_replace.gml index 4b33f4489..c2cbbf2a0 100644 --- a/scripts/node_surface_replace/node_surface_replace.gml +++ b/scripts/node_surface_replace/node_surface_replace.gml @@ -11,17 +11,17 @@ function Node_Surface_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _ .setArrayDepth(1); inputs[| 3] = nodeValue("Color Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1, "How similiar the color need to be in order to be count as matched." ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 4] = nodeValue("Draw Base Image", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true ) inputs[| 5] = nodeValue("Fast Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true ) inputs[| 6] = nodeValue("Pixel Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1, "How many pixel need to me matched to replace with replacement image." ) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 7] = nodeValue("Array mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Match index", "Randomized" ], { update_hover: false }); + .setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Match index", "Randomized" ], update_hover: false }); inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, irandom_range(10000, 99999)); @@ -47,10 +47,10 @@ function Node_Surface_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _ shader_set_f("colorThreshold", _cthr); shader_set_f("pixelThreshold", _pthr); shader_set_f("index", _index); - shader_set_i("mode", inputs[| 7].getValue()); - shader_set_f("seed", inputs[| 8].getValue()); + shader_set_i("mode", getInputData(7)); + shader_set_f("seed", getInputData(8)); - var dest = inputs[| 2].getValue(); + var dest = getInputData(2); var size = is_array(dest)? array_length(dest) : 1; shader_set_f("size", size); @@ -73,7 +73,7 @@ function Node_Surface_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _ } static step = function() { - var _mode = inputs[| 7].getValue(); + var _mode = getInputData(7); inputs[| 8].setVisible(_mode == 1); } diff --git a/scripts/node_switch/node_switch.gml b/scripts/node_switch/node_switch.gml index fa331c7c9..7bccedf30 100644 --- a/scripts/node_switch/node_switch.gml +++ b/scripts/node_switch/node_switch.gml @@ -42,7 +42,7 @@ function Node_Switch(_x, _y, _group = noone) : Node(_x, _y, _group) constructor array_resize(input_display_list, input_display_len); for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { - if(inputs[| i].getValue() != "") { + if(getInputData(i) != "") { ds_list_add(_in, inputs[| i + 0]); ds_list_add(_in, inputs[| i + 1]); @@ -79,22 +79,21 @@ function Node_Switch(_x, _y, _group = noone) : Node(_x, _y, _group) constructor if(index < input_fix_len) return; if(LOADING || APPENDING) return; - if(safe_mod(index - input_fix_len, data_length) == 0) { //Variable name - inputs[| index + 1].name = inputs[| index].getValue() + " value"; - } + if(safe_mod(index - input_fix_len, data_length) == 0) //Variable name + inputs[| index + 1].name = getInputData(index) + " value"; refreshDynamicInput(); } static update = function(frame = PROJECT.animator.current_frame) { - var sele = inputs[| 0].getValue(); - var _res = inputs[| 1].getValue(); + var sele = getInputData(0); + var _res = getInputData(1); outputs[| 0].type = inputs[| 1].value_from? inputs[| 1].value_from.type : VALUE_TYPE.any; for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) { - var _cas = inputs[| i + 0].getValue(); - var _val = inputs[| i + 1].getValue(); + var _cas = getInputData(i + 0); + var _val = getInputData(i + 1); if(sele == _cas) { _res = _val; @@ -107,11 +106,11 @@ function Node_Switch(_x, _y, _group = noone) : Node(_x, _y, _group) constructor static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var frm = inputs[| 1]; - var sele = inputs[| 0].getValue(); - var _res = inputs[| 1].getValue(); + var sele = getInputData(0); + var _res = getInputData(1); for( var i = input_fix_len; i < ds_list_size(inputs) - data_length; i += data_length ) { - var _cas = inputs[| i + 0].getValue(); + var _cas = getInputData(i + 0); if(sele == _cas) frm = inputs[| i + 1]; } diff --git a/scripts/node_text_file_read/node_text_file_read.gml b/scripts/node_text_file_read/node_text_file_read.gml index f693a1e38..ec48311a2 100644 --- a/scripts/node_text_file_read/node_text_file_read.gml +++ b/scripts/node_text_file_read/node_text_file_read.gml @@ -31,7 +31,7 @@ function Node_Text_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons w = 128; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_load, ["*.txt", ""]) + .setDisplay(VALUE_DISPLAY.path_load, { filter: "*.txt" }) .rejectArray(); outputs[| 0] = nodeValue("Content", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, ""); @@ -56,7 +56,7 @@ function Node_Text_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; static onInspector1Update = function() { - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; updatePaths(path); update(); @@ -85,7 +85,7 @@ function Node_Text_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons } static update = function(frame = PROJECT.animator.current_frame) { - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; if(path_current != path) updatePaths(path); diff --git a/scripts/node_text_file_write/node_text_file_write.gml b/scripts/node_text_file_write/node_text_file_write.gml index c8c1b0b91..b36cd7643 100644 --- a/scripts/node_text_file_write/node_text_file_write.gml +++ b/scripts/node_text_file_write/node_text_file_write.gml @@ -6,19 +6,19 @@ function Node_Text_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) con w = 128; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_save, ["*.txt", ""]) + .setDisplay(VALUE_DISPLAY.path_save, { filter: "*.txt" }) .rejectArray(); inputs[| 1] = nodeValue("Content", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "") .setVisible(true, true); static writeFile = function() { - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; if(filename_ext(path) != ".txt") path += ".txt"; - var cont = inputs[| 1].getValue(); + var cont = getInputData(1); var f = file_text_open_write(path); file_text_write_string(f, string(cont)); @@ -26,12 +26,12 @@ function Node_Text_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) con } static update = function(frame = PROJECT.animator.current_frame) { writeFile(); } - static onInspector1Update = function() { writeFile(); } + static onInspector1Update = function() { getInputs(); writeFile(); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); - var str = filename_name(inputs[| 0].getValue()); + var str = filename_name(getInputData(0)); if(filename_ext(str) != ".txt") str += ".txt"; diff --git a/scripts/node_threshold/node_threshold.gml b/scripts/node_threshold/node_threshold.gml index de85ff4ea..ae78b98dc 100644 --- a/scripts/node_threshold/node_threshold.gml +++ b/scripts/node_threshold/node_threshold.gml @@ -6,15 +6,15 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 1] = nodeValue("Brightness", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); inputs[| 2] = nodeValue("Brightness Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 3] = nodeValue("Brightness Smoothness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 5] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 6] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 6; @@ -22,10 +22,10 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 7] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); inputs[| 8] = nodeValue("Alpha Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 9] = nodeValue("Alpha Smoothness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]); + .setDisplay(VALUE_DISPLAY.slider); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); @@ -37,11 +37,11 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); static step = function() { #region - var _bright = inputs[| 1].getValue(); + var _bright = getInputData(1); inputs[| 2].setVisible(_bright); inputs[| 3].setVisible(_bright); - var _alpha = inputs[| 7].getValue(); + var _alpha = getInputData(7); inputs[| 8].setVisible(_alpha); inputs[| 9].setVisible(_alpha); } #endregion diff --git a/scripts/node_time_remap/node_time_remap.gml b/scripts/node_time_remap/node_time_remap.gml index 7047484ca..0337aa042 100644 --- a/scripts/node_time_remap/node_time_remap.gml +++ b/scripts/node_time_remap/node_time_remap.gml @@ -28,10 +28,10 @@ function Node_Time_Remap(_x, _y, _group = noone) : Node(_x, _y, _group) construc attribute_surface_depth(); static update = function(frame = PROJECT.animator.current_frame) { #region - var _inSurf = inputs[| 0].getValue(); - var _map = inputs[| 1].getValue(); - var _life = inputs[| 2].getValue(); - var _loop = inputs[| 3].getValue(); + var _inSurf = getInputData(0); + var _map = getInputData(1); + var _life = getInputData(2); + var _loop = getInputData(3); var _surf = outputs[| 0].getValue(); _surf = surface_verify(_surf, surface_get_width_safe(_inSurf), surface_get_height_safe(_inSurf), attrDepth()); diff --git a/scripts/node_timeline_preview/node_timeline_preview.gml b/scripts/node_timeline_preview/node_timeline_preview.gml index bd4650b86..23e12959d 100644 --- a/scripts/node_timeline_preview/node_timeline_preview.gml +++ b/scripts/node_timeline_preview/node_timeline_preview.gml @@ -11,7 +11,7 @@ function Node_Timeline_Preview(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); static update = function(frame = PROJECT.animator.current_frame) { - var _inSurf = inputs[| 0].getValue(); + var _inSurf = getInputData(0); if(_inSurf == 0) return; if(is_array(_inSurf)) { diff --git a/scripts/node_trail/node_trail.gml b/scripts/node_trail/node_trail.gml index 0b19615ea..36c6c4af7 100644 --- a/scripts/node_trail/node_trail.gml +++ b/scripts/node_trail/node_trail.gml @@ -33,7 +33,7 @@ function Node_Trail(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { attribute_surface_depth(); static step = function() { - var _colr = inputs[| 4].getValue(); + var _colr = getInputData(4); inputs[| 5].setVisible(!_colr); } @@ -41,15 +41,15 @@ function Node_Trail(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static update = function() { if(!inputs[| 0].value_from) return; - var _surf = inputs[| 0].getValue(); - var _life = inputs[| 1].getValue(); - var _loop = inputs[| 2].getValue(); + var _surf = getInputData(0); + var _life = getInputData(1); + var _loop = getInputData(2); if(!is_real(_loop)) _loop = false; - var _rang = inputs[| 3].getValue(); - var _colr = inputs[| 4].getValue(); - var _blend = inputs[| 5].getValue(); - var _alpha = inputs[| 6].getValue(); + var _rang = getInputData(3); + var _colr = getInputData(4); + var _blend = getInputData(5); + var _alpha = getInputData(6); var cDep = attrDepth(); if(!is_surface(_surf)) return; cacheCurrentFrame(_surf); diff --git a/scripts/node_transform/node_transform.gml b/scripts/node_transform/node_transform.gml index 589a76104..b8d6e8cd3 100644 --- a/scripts/node_transform/node_transform.gml +++ b/scripts/node_transform/node_transform.gml @@ -35,7 +35,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.enum_button, [ "Normal", "Tile", "Wrap" ]); inputs[| 8] = nodeValue("Rotate by velocity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0, "Make the surface rotates to follow its movement.") - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 9] = nodeValue("Output dimension type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, OUTPUT_SCALING.same_as_input) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Same as input", "Constant", "Relative to input", "Scale" ]); @@ -90,11 +90,11 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } #endregion static centerAnchor = function() { #region - var _surf = inputs[| 0].getValue(); + var _surf = getInputData(0); - var _out_type = inputs[| 9].getValue(); - var _out = inputs[| 1].getValue(); - var _sca = inputs[| 6].getValue(); + var _out_type = getInputData(9); + var _out = getInputData(1); + var _sca = getInputData(6); if(is_array(_surf)) { if(array_length(_surf) == 0) return; @@ -106,7 +106,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } #endregion static step = function() { #region - var pos = inputs[| 2].getValue(); + var pos = getInputData(2); if(!PROJECT.animator.frame_progress) return; @@ -256,7 +256,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region PROCESSOR_OVERLAY_CHECK - var _surf = inputs[| 0].getValue(); + var _surf = getInputData(0); if(is_array(_surf)) { if(array_length(_surf) == 0) return; _surf = _surf[preview_index]; diff --git a/scripts/node_transform_array/node_transform_array.gml b/scripts/node_transform_array/node_transform_array.gml index 429e77f42..4ae8634b9 100644 --- a/scripts/node_transform_array/node_transform_array.gml +++ b/scripts/node_transform_array/node_transform_array.gml @@ -21,7 +21,7 @@ function Node_Transform_Array(_x, _y, _group = noone) : Node_Processor(_x, _y, _ .setDisplay(VALUE_DISPLAY.vector); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var pos = inputs[| 0].getValue(); + var pos = getInputData(0); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; diff --git a/scripts/node_trigger/node_trigger.gml b/scripts/node_trigger/node_trigger.gml index c3718e70f..af144baea 100644 --- a/scripts/node_trigger/node_trigger.gml +++ b/scripts/node_trigger/node_trigger.gml @@ -11,7 +11,7 @@ function Node_Trigger(_x, _y, _group = noone) : Node(_x, _y, _group) constructor inputs[| 1] = nodeValue("Trigger", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, false) .setVisible(true, true) - .setDisplay(VALUE_DISPLAY.button, [ function() { onInspector2Update(); }, "Trigger"]); + .setDisplay(VALUE_DISPLAY.button, { name: "Trigger", onClick: function() { onInspector2Update(); } }); outputs[| 0] = nodeValue("Trigger", self, JUNCTION_CONNECT.output, VALUE_TYPE.trigger, false); @@ -36,7 +36,7 @@ function Node_Trigger(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } static update = function() { - var trg = inputs[| 0].getValue(); + var trg = getInputData(0); if(trg) doTrigger = 1; } diff --git a/scripts/node_trigger_bool/node_trigger_bool.gml b/scripts/node_trigger_bool/node_trigger_bool.gml index f4683b89f..5a5b00a56 100644 --- a/scripts/node_trigger_bool/node_trigger_bool.gml +++ b/scripts/node_trigger_bool/node_trigger_bool.gml @@ -29,8 +29,8 @@ function Node_Trigger_Bool(_x, _y, _group = noone) : Node(_x, _y, _group) constr } static update = function() { - var val = inputs[| 0].getValue(); - var con = inputs[| 1].getValue(); + var val = getInputData(0); + var con = getInputData(1); switch(con) { case 0 : doTrigger = val; break; diff --git a/scripts/node_tunnel_in/node_tunnel_in.gml b/scripts/node_tunnel_in/node_tunnel_in.gml index 614a139e8..de31ca784 100644 --- a/scripts/node_tunnel_in/node_tunnel_in.gml +++ b/scripts/node_tunnel_in/node_tunnel_in.gml @@ -18,7 +18,7 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct static onInspector2Update = function() { var _node = nodeBuild("Node_Tunnel_Out", x + 128, y); - _node.inputs[| 0].setValue(inputs[| 0].getValue()); + _node.inputs[| 0].setValue(getInputData(0)); } static onDrawNodeBehind = function(_x, _y, _mx, _my, _s) { @@ -30,7 +30,7 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct hover |= tun && tun.tunnel_hover == self; if(!hover) return; - var _key = inputs[| 0].getValue(); + var _key = getInputData(0); var amo = ds_map_size(TUNNELS_OUT); var k = ds_map_find_first(TUNNELS_OUT); repeat(amo) { @@ -56,13 +56,13 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct static update = function(frame = PROJECT.animator.current_frame) { onValueUpdate(); } static resetMap = function() { - var _key = inputs[| 0].getValue(); + var _key = getInputData(0); TUNNELS_IN_MAP[? node_id] = _key; TUNNELS_IN[? _key] = inputs[| 1]; } static checkDuplicate = function() { - var _key = inputs[| 0].getValue(); + var _key = getInputData(0); var amo = ds_map_size(TUNNELS_IN_MAP); var k = ds_map_find_first(TUNNELS_IN_MAP); var dup = false; @@ -84,7 +84,7 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct } static onValueUpdate = function(index = 0) { - var _key = inputs[| 0].getValue(); + var _key = getInputData(0); resetMap(); var amo = ds_map_size(TUNNELS_IN_MAP); @@ -106,7 +106,7 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct } static step = function() { - var _key = inputs[| 0].getValue(); + var _key = getInputData(0); value_validation[VALIDATION.error] = error_notification != noone; @@ -122,7 +122,7 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct static getNextNodes = function() { var nodes = []; var nodeNames = []; - var _key = inputs[| 0].getValue(); + var _key = getInputData(0); var amo = ds_map_size(TUNNELS_OUT); var k = ds_map_find_first(TUNNELS_OUT); @@ -148,7 +148,7 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text); - var str = string(inputs[| 0].getValue()); + var str = string(getInputData(0)); var bbox = drawGetBbox(xx, yy, _s); var ss = string_scale(str, bbox.w, bbox.h); diff --git a/scripts/node_tunnel_out/node_tunnel_out.gml b/scripts/node_tunnel_out/node_tunnel_out.gml index 802b7133e..3206a55f3 100644 --- a/scripts/node_tunnel_out/node_tunnel_out.gml +++ b/scripts/node_tunnel_out/node_tunnel_out.gml @@ -14,7 +14,7 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc insp2UpdateIcon = [ THEME.tunnel, 1, c_white ]; static onInspector2Update = function() { - var _key = inputs[| 0].getValue(); + var _key = getInputData(0); if(!ds_map_exists(TUNNELS_IN, _key)) return; var _node = TUNNELS_IN[? _key].node; @@ -22,7 +22,7 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc } static isRenderable = function() { - var _key = inputs[| 0].getValue(); + var _key = getInputData(0); if(!ds_map_exists(TUNNELS_IN, _key)) return false; return TUNNELS_IN[? _key].node.rendered; @@ -37,7 +37,7 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc hover |= tun && tun.tunnel_hover == self; if(!hover) return; - var _key = inputs[| 0].getValue(); + var _key = getInputData(0); if(!ds_map_exists(TUNNELS_IN, _key)) return; var node = TUNNELS_IN[? _key].node; @@ -56,7 +56,7 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc static onClone = function() { onValueUpdate(); } static onValueUpdate = function() { - var _key = inputs[| 0].getValue(); + var _key = getInputData(0); TUNNELS_OUT[? node_id] = _key; @@ -64,7 +64,7 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc } static step = function() { - var _key = inputs[| 0].getValue(); + var _key = getInputData(0); if(ds_map_exists(TUNNELS_IN, _key)) { outputs[| 0].type = TUNNELS_IN[? _key].type; outputs[| 0].display_type = TUNNELS_IN[? _key].display_type; @@ -75,7 +75,7 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc } static update = function(frame = PROJECT.animator.current_frame) { - var _key = inputs[| 0].getValue(); + var _key = getInputData(0); if(ds_map_exists(TUNNELS_IN, _key)) outputs[| 0].setValue(TUNNELS_IN[? _key].getValue()); @@ -83,7 +83,7 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text); - var str = string(inputs[| 0].getValue()); + var str = string(getInputData(0)); var bbox = drawGetBbox(xx, yy, _s); var ss = string_scale(str, bbox.w, bbox.h); diff --git a/scripts/node_twirl/node_twirl.gml b/scripts/node_twirl/node_twirl.gml index ad23b3022..b0773e506 100644 --- a/scripts/node_twirl/node_twirl.gml +++ b/scripts/node_twirl/node_twirl.gml @@ -15,7 +15,7 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con .setUnitRef(function(index) { return getDimension(index); }); inputs[| 2] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3) - .setDisplay(VALUE_DISPLAY.slider, [-10, 10, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, { range: [-10, 10, 0.01] }); inputs[| 3] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 16); @@ -25,7 +25,7 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 6] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 7; @@ -42,7 +42,7 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con attribute_interpolation(); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var pos = inputs[| 1].getValue(); + var pos = getInputData(1); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index d251ca1b9..816294d22 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -447,6 +447,8 @@ function nodeValueUnit(_nodeValue) constructor { #region function nodeValue(_name, _node, _connect, _type, _value, _tooltip = "") { return new NodeValue(_name, _node, _connect, _type, _value, _tooltip); } function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constructor { + static DISPLAY_DATA_KEYS = [ "linked", "angle_display", "bone_id", "area_type" ]; + #region ---- main ---- node = _node; x = node.x; @@ -514,7 +516,6 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru def_val = _value; def_length = is_array(def_val)? array_length(def_val) : 0; unit = new nodeValueUnit(self); - extra_data = {}; dyna_depo = ds_list_create(); is_changed = true; @@ -527,6 +528,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru validateValue = true; fullUpdate = false; + + attributes = {}; #endregion #region ---- draw ---- @@ -560,7 +563,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru if(_type == VALUE_TYPE.curve) display_type = VALUE_DISPLAY.curve; else if(_type == VALUE_TYPE.d3vertex) display_type = VALUE_DISPLAY.d3vertex; - display_data = -1; + display_data = {}; display_attribute = noone; popup_dialog = noone; @@ -631,10 +634,9 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru return self; } #endregion - static setDisplay = function(_type = VALUE_DISPLAY._default, _data = -1, _attr = noone) { #region + static setDisplay = function(_type = VALUE_DISPLAY._default, _data = {}) { #region display_type = _type; display_data = _data; - display_attribute = _attr; resetDisplay(); return self; @@ -713,8 +715,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru editWidget = noone; switch(display_type) { case VALUE_DISPLAY.button : #region - editWidget = button(display_data[0]); - editWidget.text = display_data[1]; + editWidget = button(display_data.onClick); + editWidget.text = display_data.name; visible = false; return; #endregion } @@ -731,7 +733,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru } ); editWidget.slidable = true; if(type == VALUE_TYPE.integer) editWidget.slide_speed = 1; - if(display_data != -1) editWidget.slide_speed = display_data; + if(struct_has(display_data, "slide_speed")) editWidget.slide_speed = display_data.slide_speed; extract_node = "Node_Number"; break; #endregion @@ -742,8 +744,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1); - extra_data = { linked : false }; - if(display_data != -1) struct_override(extra_data, display_data); + if(!struct_has(display_data, "linked")) display_data.linked = false; for( var i = 0, n = array_length(animators); i < n; i++ ) animators[i].suffix = " " + array_safe_get(global.displaySuffix_Range, i); @@ -759,15 +760,14 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru return setValueDirect(val, index); }, unit ); - if(struct_has(display_data, "label")) editWidget.axis = display_data.label; - if(struct_has(display_data, "linkable")) editWidget.linkable = display_data.linkable; - if(struct_has(display_data, "per_line")) editWidget.per_line = display_data.per_line; + if(struct_has(display_data, "label")) editWidget.axis = display_data.label; + if(struct_has(display_data, "linkable")) editWidget.linkable = display_data.linkable; + if(struct_has(display_data, "per_line")) editWidget.per_line = display_data.per_line; + if(struct_has(display_data, "linked")) editWidget.linked = display_data.linked; + if(struct_has(display_data, "side_button")) editWidget.side_button = display_data.side_button; if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1); - extra_data = { linked : false, side_button : noone }; - if(display_data != -1) struct_override(extra_data, display_data); - if(len == 2) { extract_node = [ "Node_Vector2", "Node_Path" ]; } else if(len == 3) @@ -789,8 +789,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1); - extra_data = { linked : false }; - if(display_data != -1) struct_override(extra_data, display_data); + if(!struct_has(display_data, "linked")) display_data.linked = false; if(array_length(val) == 2) extract_node = "Node_Vector2"; @@ -828,7 +827,9 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru extract_node = "Node_Vector2"; break; #endregion case VALUE_DISPLAY.slider : #region - editWidget = new slider(display_data[0], display_data[1], display_data[2], function(val) { + var _range = struct_try_get(display_data, "range", [ 0, 1, 0.01 ]); + + editWidget = new slider(_range[0], _range[1], _range[2], function(val) { return setValueDirect(toNumber(val)); } ); if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1); @@ -836,7 +837,9 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru extract_node = "Node_Number"; break; #endregion case VALUE_DISPLAY.slider_range : #region - editWidget = new sliderRange(display_data[0], display_data[1], display_data[2], function(index, val) { + var _range = struct_try_get(display_data, "range", [ 0, 1, 0.01 ]); + + editWidget = new sliderRange(_range[0], _range[1], _range[2], function(index, val) { return setValueDirect(val, index); } ); if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1); @@ -851,12 +854,12 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru return setValueDirect(val, index); }, unit); if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1); - if(display_data != -1) editWidget.onSurfaceSize = display_data; + if(struct_has(display_data, "onSurfaceSize")) editWidget.onSurfaceSize = display_data.onSurfaceSize; for( var i = 0, n = array_length(animators); i < n; i++ ) animators[i].suffix = " " + array_safe_get(global.displaySuffix_Area, i, ""); - extra_data.area_type = AREA_MODE.area; + display_data.area_type = AREA_MODE.area; extract_node = "Node_Area"; break; #endregion case VALUE_DISPLAY.padding : #region @@ -893,24 +896,25 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru extract_node = ""; break; #endregion case VALUE_DISPLAY.enum_scroll : #region - display_data = __txt_junction_data(instanceof(node), connect_type, index, display_data); + if(!is_struct(display_data)) display_data = { data: display_data }; + var choices = __txt_junction_data(instanceof(node), connect_type, index, display_data.data); - editWidget = new scrollBox(display_data, function(val) { + editWidget = new scrollBox(choices, function(val) { if(val == -1) return; return setValueDirect(toNumber(val)); } ); - if(is_struct(display_attribute)) { - editWidget.update_hover = display_attribute[$ "update_hover"]; - } + if(struct_has(display_data, "update_hover")) + editWidget.update_hover = display_data.update_hover; rejectConnect(); key_inter = CURVE_TYPE.cut; extract_node = ""; break; #endregion case VALUE_DISPLAY.enum_button : #region - display_data = __txt_junction_data(instanceof(node), connect_type, index, display_data); + if(!is_struct(display_data)) display_data = { data: display_data }; + var choices = __txt_junction_data(instanceof(node), connect_type, index, display_data.data); - editWidget = new buttonGroup(display_data, function(val) { + editWidget = new buttonGroup(choices, function(val) { return setValueDirect(val); } ); @@ -919,7 +923,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru extract_node = ""; break; #endregion case VALUE_DISPLAY.matrix : #region - editWidget = new matrixGrid(_txt, display_data, function(index, val) { + editWidget = new matrixGrid(_txt, display_data.size, function(index, val) { return setValueDirect(val, index); }, unit ); if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1); @@ -939,7 +943,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru extract_node = "Node_Transform_Array"; break; #endregion case VALUE_DISPLAY.toggle : #region - editWidget = new toggleGroup(display_data, function(val) { + editWidget = new toggleGroup(display_data.data, function(val) { return setValueDirect(val); } ); @@ -952,7 +956,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru return setValueDirect(val, index); }); - extra_data.angle_display = QUARTERNION_DISPLAY.quarterion; + display_data.angle_display = QUARTERNION_DISPLAY.quarterion; break; #endregion } @@ -994,12 +998,12 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru case VALUE_TYPE.path : #region switch(display_type) { case VALUE_DISPLAY.path_array : - editWidget = new pathArrayBox(node, display_data, function(path) { setValueDirect(path); } ); + editWidget = new pathArrayBox(node, display_data.filter, function(path) { setValueDirect(path); } ); break; case VALUE_DISPLAY.path_load : editWidget = new textBox(TEXTBOX_INPUT.text, function(str) { setValueDirect(str); }, button(function() { - var path = get_open_filename(display_data[0], display_data[1]); + var path = get_open_filename(display_data.filter, ""); key_release(); if(path == "") return noone; return setValueDirect(path); @@ -1012,7 +1016,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru case VALUE_DISPLAY.path_save : editWidget = new textBox(TEXTBOX_INPUT.text, function(str) { setValueDirect(str); }, button(function() { - var path = get_save_filename(display_data[0], display_data[1]); + var path = get_save_filename(display_data.filter, ""); key_release(); if(path == "") return noone; return setValueDirect(path); @@ -1081,7 +1085,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru break; case VALUE_DISPLAY.text_array : - editWidget = new textArrayBox(function() { return animator.values[| 0].value; }, display_data, function() { node.doUpdate(); }); + editWidget = new textArrayBox(function() { return animator.values[| 0].value; }, display_data.data, function() { node.doUpdate(); }); break; } break; #endregion @@ -1089,7 +1093,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru case VALUE_TYPE.surface : #region editWidget = new surfaceBox(function(ind) { return setValueDirect(ind); - }, display_data ); + } ); show_in_inspector = true; extract_node = "Node_Canvas"; break; #endregion @@ -1192,12 +1196,14 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru #endregion if(display_type == VALUE_DISPLAY.area) { #region - var dispType = struct_try_get(nodeFrom.extra_data, "area_type"); - var surfGet = nodeFrom.display_data; - if(!applyUnit || surfGet == -1) - return value; + var dispType = struct_try_get(nodeFrom.display_data, "area_type"); + var surfGet = struct_try_get(nodeFrom.display_data, "onSurfaceSize"); + + if(!applyUnit) return value; + if(!is_callable(surfGet)) return value; var surf = surfGet(); + if(!is_array(surf)) return value; var ww = surf[0]; var hh = surf[1]; @@ -1222,7 +1228,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru } #endregion if(display_type == VALUE_DISPLAY.d3quarternion) { #region - var dispType = struct_try_get(nodeFrom.extra_data, "angle_display"); + var dispType = struct_try_get(nodeFrom.display_data, "angle_display"); switch(dispType) { case QUARTERNION_DISPLAY.quarterion : return value; case QUARTERNION_DISPLAY.euler : @@ -1439,6 +1445,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru static __anim = function() { #region if(node.update_on_frame) return true; + if(expUse) { if(!is_struct(expTree)) return false; var res = expTree.isAnimated(); @@ -1454,7 +1461,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru static isAnimated = function() { #region if(value_from == noone) return __anim(); - else return value_from.isAnimated() || value_from.__anim(); + else return value_from.isAnimated() || value_from.__anim() || value_from.node.anim_last_step; } #endregion static showValue = function() { #region @@ -1487,7 +1494,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru return false; } #endregion - + static isArray = function(val = undefined) { #region if(val == undefined) { if(cache_array[0]) @@ -1579,6 +1586,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru if(updated) { if(connect_type == JUNCTION_CONNECT.input) { + node.inputs_data[self.index] = animator.getValue(time); + node.triggerRender(); if(_update) node.valueUpdate(self.index); node.clearCacheForward(); @@ -1798,7 +1807,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru return preview_overlay_vector(value_from == noone, active, _x, _y, _s, _mx, _my, _snx, _sny, _spr); case VALUE_DISPLAY.area : - return preview_overlay_area(value_from == noone, active, _x, _y, _s, _mx, _my, _snx, _sny, display_data); + return preview_overlay_area(value_from == noone, active, _x, _y, _s, _mx, _my, _snx, _sny, struct_try_get(nodeFrom.display_data, "onSurfaceSize")); case VALUE_DISPLAY.puppet_control : return preview_overlay_puppet(value_from == noone, active, _x, _y, _s, _mx, _my, _snx, _sny); @@ -2236,7 +2245,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru for( var i = 0, n = array_length(animators); i < n; i++ ) array_push(_anims, animators[i].serialize(scale)); _map.animators = _anims; - _map.data = extra_data; + _map.display_data = display_data; + _map.attributes = attributes; _map.name_custom = name_custom; @@ -2283,8 +2293,10 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru con_index = struct_try_get(_map, "from_index", -1); } - if(struct_has(_map, "data") && is_struct(_map.data)) - extra_data = _map.data; + if(struct_has(_map, "display_data")) { + for( var i = 0, n = array_length(DISPLAY_DATA_KEYS); i < n; i++ ) + struct_try_override(display_data, _map.display_data, DISPLAY_DATA_KEYS[i]); + } if(APPENDING) def_val = getValue(0); 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 554045709..cbab8a123 100644 --- a/scripts/node_wav_file_read/node_wav_file_read.gml +++ b/scripts/node_wav_file_read/node_wav_file_read.gml @@ -33,15 +33,15 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const min_h = h; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_load, ["*.wav", ""]) + .setDisplay(VALUE_DISPLAY.path_load, { filter: "*.wav" }) .rejectArray(); inputs[| 1] = nodeValue("Sync lenght", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.button, [ function() { + .setDisplay(VALUE_DISPLAY.button, { name: "Sync", onClick: function() { if(content == noone) return; var frm = max(1, ceil(content.duration * PROJECT.animator.framerate)); PROJECT.animator.frames_total = frm; - }, "Sync"]) + } }) .rejectArray(); outputs[| 0] = nodeValue("Data", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, []) @@ -191,7 +191,7 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const attributes.play = true; static onInspector1Update = function() { - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; updatePaths(path); update(); @@ -229,7 +229,7 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const } #endregion static update = function(frame = PROJECT.animator.current_frame) { #region - var path = inputs[| 0].getValue(); + var path = getInputData(0); if(path == "") return; if(path_current != path) updatePaths(path); 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 873885b5f..f30861c7a 100644 --- a/scripts/node_wav_file_write/node_wav_file_write.gml +++ b/scripts/node_wav_file_write/node_wav_file_write.gml @@ -7,7 +7,7 @@ function Node_WAV_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) cons min_h = h; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_save, ["*.wav", ""]) + .setDisplay(VALUE_DISPLAY.path_save, { filter: "*.wav" }) .rejectArray() .setVisible(true); @@ -38,19 +38,19 @@ function Node_WAV_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) cons } static step = function() { - var remap = inputs[| 4].getValue(); + var remap = getInputData(4); inputs[| 5].setVisible(remap); } static export = function() { - var path = inputs[| 0].getValue(); - var data = inputs[| 1].getValue(); - var samp = inputs[| 2].getValue(); - var bitd = inputs[| 3].getValue() + 1; + var path = getInputData(0); + var data = getInputData(1); + var samp = getInputData(2); + var bitd = getInputData(3) + 1; - var remp = inputs[| 4].getValue(); - var rern = inputs[| 5].getValue(); + var remp = getInputData(4); + var rern = getInputData(5); if(!is_array(data)) return; diff --git a/scripts/node_websocket_receiver/node_websocket_receiver.gml b/scripts/node_websocket_receiver/node_websocket_receiver.gml index f78205393..cf7031a08 100644 --- a/scripts/node_websocket_receiver/node_websocket_receiver.gml +++ b/scripts/node_websocket_receiver/node_websocket_receiver.gml @@ -42,7 +42,7 @@ function Node_Websocket_Receiver(_x, _y, _group = noone) : Node(_x, _y, _group) insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; static onInspector1Update = function() { - var _port = inputs[| 0].getValue(); + var _port = getInputData(0); setPort(_port); } @@ -51,7 +51,7 @@ function Node_Websocket_Receiver(_x, _y, _group = noone) : Node(_x, _y, _group) static asyncPackets = function(_async_load) { if(!active) return; - var _active = inputs[| 1].getValue(); + var _active = getInputData(1); if(!_active) return; var type = async_load[? "type"]; @@ -92,14 +92,14 @@ function Node_Websocket_Receiver(_x, _y, _group = noone) : Node(_x, _y, _group) static update = function(frame = PROJECT.animator.current_frame) { if(CLONING) return; - var _port = inputs[| 0].getValue(); + var _port = getInputData(0); if(port != _port) setPort(_port); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { - var _active = inputs[| 1].getValue(); + var _active = getInputData(1); var bbox = drawGetBbox(xx, yy, _s); var network = ds_map_try_get(NETWORK_SERVERS, port, noone); diff --git a/scripts/node_websocket_sender/node_websocket_sender.gml b/scripts/node_websocket_sender/node_websocket_sender.gml index 8c0094bf0..2cfe3c58d 100644 --- a/scripts/node_websocket_sender/node_websocket_sender.gml +++ b/scripts/node_websocket_sender/node_websocket_sender.gml @@ -56,8 +56,8 @@ function Node_Websocket_Sender(_x, _y, _group = noone) : Node(_x, _y, _group) co insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; static onInspector1Update = function() { - var _port = inputs[| 0].getValue(); - var _url = inputs[| 5].getValue(); + var _port = getInputData(0); + var _url = getInputData(5); connectTo(_port, _url); } @@ -75,7 +75,7 @@ function Node_Websocket_Sender(_x, _y, _group = noone) : Node(_x, _y, _group) co } static step = function() { - var _type = inputs[| 1].getValue(); + var _type = getInputData(1); inputs[| 2].setVisible(_type == 0, _type == 0); inputs[| 3].setVisible(_type == 1, _type == 1); @@ -84,8 +84,8 @@ function Node_Websocket_Sender(_x, _y, _group = noone) : Node(_x, _y, _group) co } static update = function(frame = PROJECT.animator.current_frame) { - var _port = inputs[| 0].getValue(); - var _target = inputs[| 5].getValue(); + var _port = getInputData(0); + var _target = getInputData(5); if(port != _port || url != _target) connectTo(_port, _target); @@ -93,30 +93,30 @@ function Node_Websocket_Sender(_x, _y, _group = noone) : Node(_x, _y, _group) co var network = ds_map_try_get(NETWORK_CLIENTS, _port, noone); if(network < 0) return; - var _type = inputs[| 1].getValue(); + var _type = getInputData(1); var _buff, res; switch(_type) { case 0 : - var _stru = inputs[| 2].getValue(); + var _stru = getInputData(2); var _str = json_stringify(_stru); _buff = buffer_from_string(_str); res = network_send_raw(network, _buff, buffer_get_size(_buff), network_send_text); break; case 1 : - var _surf = inputs[| 3].getValue(); + var _surf = getInputData(3); if(!is_surface(_surf)) return; _buff = buffer_from_surface(_surf); res = network_send_raw(network, _buff, buffer_get_size(_buff), network_send_text); break; case 2 : - var _path = inputs[| 4].getValue(); + var _path = getInputData(4); if(!file_exists(_path)) return; _buff = buffer_from_file(_path); res = network_send_raw(network, _buff, buffer_get_size(_buff), network_send_text); break; case 3 : - _buff = inputs[| 6].getValue(); + _buff = getInputData(6); if(!buffer_exists(_buff)) return; res = network_send_raw(network, _buff, buffer_get_size(_buff), network_send_text); break; diff --git a/scripts/node_widget_test/node_widget_test.gml b/scripts/node_widget_test/node_widget_test.gml index 3c007e0e7..77c544e2d 100644 --- a/scripts/node_widget_test/node_widget_test.gml +++ b/scripts/node_widget_test/node_widget_test.gml @@ -12,17 +12,17 @@ function Node_Widget_Test(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 4] = nodeValue("rotator", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.rotation) inputs[| 5] = nodeValue("rotatorRange", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0]) .setDisplay(VALUE_DISPLAY.rotation_range) inputs[| 6] = nodeValue("rotatorRandom", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0, 0, 0, 0]) .setDisplay(VALUE_DISPLAY.rotation_random) - inputs[| 7] = nodeValue("slider", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]) - inputs[| 8] = nodeValue("sliderRange", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0]) .setDisplay(VALUE_DISPLAY.slider_range, [ 0, 1, 0.01 ]) + inputs[| 7] = nodeValue("slider", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider) + inputs[| 8] = nodeValue("sliderRange", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0]) .setDisplay(VALUE_DISPLAY.slider_range) inputs[| 9] = nodeValue("areaBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.area) inputs[| 10] = nodeValue("paddingBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.padding) inputs[| 11] = nodeValue("cornerBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.corner) inputs[| 12] = nodeValue("controlPointBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.puppet_control) inputs[| 13] = nodeValue("scrollBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Choice 1", "Choice 2" ]) inputs[| 14] = nodeValue("buttonGroup", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.enum_button, [ "Choice 1", "Choice 2" ]) - inputs[| 15] = nodeValue("matrixGrid", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, array_create(9)) .setDisplay(VALUE_DISPLAY.matrix, 3) + inputs[| 15] = nodeValue("matrixGrid", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, array_create(9)) .setDisplay(VALUE_DISPLAY.matrix, { size: 3 }) inputs[| 16] = nodeValue("transformBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.transform) - inputs[| 17] = nodeValue("toggleGroup", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.toggle) + inputs[| 17] = nodeValue("transformBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.transform) inputs[| 18] = nodeValue("quarternionBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.d3quarternion) inputs[| 19] = nodeValue("checkBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) .setDisplay(VALUE_DISPLAY._default) @@ -31,7 +31,7 @@ function Node_Widget_Test(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 21] = nodeValue("buttonPalette", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, DEF_PALETTE) .setDisplay(VALUE_DISPLAY.palette) inputs[| 22] = nodeValue("buttonGradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white)) .setDisplay(VALUE_DISPLAY._default) - inputs[| 23] = nodeValue("pathArrayBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, []) .setDisplay(VALUE_DISPLAY.path_array, [ "*.png" ]) + inputs[| 23] = nodeValue("pathArrayBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, []) .setDisplay(VALUE_DISPLAY.path_array, { filter: [ "*.png", "" ] }) inputs[| 24] = nodeValue("textBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") .setDisplay(VALUE_DISPLAY.path_load) inputs[| 25] = nodeValue("textBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") .setDisplay(VALUE_DISPLAY.path_save) inputs[| 26] = nodeValue("fontScrollBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") .setDisplay(VALUE_DISPLAY.path_font) @@ -42,7 +42,7 @@ function Node_Widget_Test(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 29] = nodeValue("textBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "") .setDisplay(VALUE_DISPLAY.text_box) inputs[| 30] = nodeValue("textArea", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "") .setDisplay(VALUE_DISPLAY.codeLUA) inputs[| 31] = nodeValue("textArea", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "") .setDisplay(VALUE_DISPLAY.codeHLSL) - inputs[| 32] = nodeValue("textArrayBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, []) .setDisplay(VALUE_DISPLAY.text_array, [ "Choice 1", "Choice 2" ]) + inputs[| 32] = nodeValue("textArrayBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, []) .setDisplay(VALUE_DISPLAY.text_array, { data: [ "Choice 1", "Choice 2" ] }) inputs[| 33] = nodeValue("surfaceBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) .setDisplay(VALUE_DISPLAY._default) diff --git a/scripts/node_wiggler/node_wiggler.gml b/scripts/node_wiggler/node_wiggler.gml index a7b8208cd..3b3e399ee 100644 --- a/scripts/node_wiggler/node_wiggler.gml +++ b/scripts/node_wiggler/node_wiggler.gml @@ -9,7 +9,7 @@ function Node_Wiggler(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c .setDisplay(VALUE_DISPLAY.vector); inputs[| 1] = nodeValue("Frequency", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4 ) - .setDisplay(VALUE_DISPLAY.slider, [1, 32, 1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 1] }); inputs[| 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, irandom(9999999) ); diff --git a/scripts/node_wrap/node_wrap.gml b/scripts/node_wrap/node_wrap.gml index c862a49c9..ede937af0 100644 --- a/scripts/node_wrap/node_wrap.gml +++ b/scripts/node_wrap/node_wrap.gml @@ -41,7 +41,7 @@ function Node_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons static onValueFromUpdate = function(index) { #region if(index == 0 && attributes[? "initalset"] == false) { - var _surf = inputs[| 0].getValue(); + var _surf = getInputData(0); if(!is_surface(_surf)) return; var _sw = surface_get_width_safe(_surf); diff --git a/scripts/node_wrap_area/node_wrap_area.gml b/scripts/node_wrap_area/node_wrap_area.gml index 88b02b9be..37db7748e 100644 --- a/scripts/node_wrap_area/node_wrap_area.gml +++ b/scripts/node_wrap_area/node_wrap_area.gml @@ -2,9 +2,10 @@ function Node_Wrap_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) name = "Area Warp"; inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); - + + onSurfaceSize = function() { return getInputData(0, DEF_SURF); }; inputs[| 1] = nodeValue("Area", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 16, 16, 4, 4, AREA_SHAPE.rectangle ]) - .setDisplay(VALUE_DISPLAY.area, function() { return getDimension(0); }); + .setDisplay(VALUE_DISPLAY.area, { onSurfaceSize }); inputs[| 2] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 2; @@ -23,7 +24,7 @@ function Node_Wrap_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static onValueFromUpdate = function(index) { #region if(index == 0 && attributes[? "initalset"] == false) { - var _surf = inputs[| 0].getValue(); + var _surf = getInputData(0); if(!is_surface(_surf)) return; var _sw = surface_get_width_safe(_surf); diff --git a/scripts/node_wrap_mesh/node_wrap_mesh.gml b/scripts/node_wrap_mesh/node_wrap_mesh.gml index 313514ed9..359c5a87e 100644 --- a/scripts/node_wrap_mesh/node_wrap_mesh.gml +++ b/scripts/node_wrap_mesh/node_wrap_mesh.gml @@ -21,13 +21,13 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 1] = nodeValue("Sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 8, "Amount of grid subdivision. Higher number means more grid, detail.") - .setDisplay(VALUE_DISPLAY.slider, [ 2, 32, 1 ] ); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 2, 32, 1 ] }); inputs[| 2] = nodeValue("Spring Force", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ] ); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 3] = nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, 0) - .setDisplay(VALUE_DISPLAY.button, [ function() { setTriangle(); doUpdate(); }, "Generate"] ); + .setDisplay(VALUE_DISPLAY.button, { name: "Generate", onClick: function() { setTriangle(); doUpdate(); } }); inputs[| 4] = nodeValue("Diagonal Link", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Include diagonal link to prevent drastic grid deformation."); @@ -35,7 +35,7 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) active_index = 5; inputs[| 6] = nodeValue("Link Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0, "Link length preservation, setting it to 1 will prevent any stretching, contraction.") - .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ] ); + .setDisplay(VALUE_DISPLAY.slider); inputs[| 7] = nodeValue("Full Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); @@ -109,7 +109,7 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var mx = (_mx - _x) / _s; var my = (_my - _y) / _s; - var _type = inputs[| 8].getValue(); + var _type = getInputData(8); if(_type == 1 && (isUsingTool("Mesh edit") || isUsingTool("Anchor remove"))) { var mesh = attributes.mesh_bound; var len = array_length(mesh); @@ -405,16 +405,16 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } static regularTri = function(surf) { - var sample = inputs[| 1].getValue(); - var spring = inputs[| 2].getValue(); - var diagon = inputs[| 4].getValue(); + var sample = getInputData(1); + var spring = getInputData(2); + var diagon = getInputData(4); if(!inputs[| 0].value_from) return; var useArray = is_array(surf); var ww = useArray? surface_get_width_safe(surf[0]) : surface_get_width_safe(surf); var hh = useArray? surface_get_height_safe(surf[0]) : surface_get_height_safe(surf); - var fullmh = inputs[| 7].getValue(); + var fullmh = getInputData(7); if(is_array(fullmh)) fullmh = false; fullmh |= useArray; @@ -507,8 +507,8 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } static triangulate = function(surf) { - var sample = inputs[| 1].getValue(); - var seed = inputs[| 9].getValue(); + var sample = getInputData(1); + var seed = getInputData(9); if(!inputs[| 0].value_from) return; var useArray = is_array(surf); @@ -585,8 +585,8 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } static setTriangle = function() { - var _inSurf = inputs[| 0].getValue(); - var _type = inputs[| 8].getValue(); + var _inSurf = getInputData(0); + var _type = getInputData(8); switch(_type) { case 0 : regularTri(_inSurf); break; @@ -630,10 +630,10 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } static control = function() { - var lStr = inputs[| 6].getValue(); + var lStr = getInputData(6); for(var i = control_index; i < ds_list_size(inputs); i++) { - var c = inputs[| i].getValue(); + var c = getInputData(i); for( var j = 0; j < array_length(data.points); j++ ) { if(data.points[j] == 0) continue; @@ -664,7 +664,7 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } static step = function() { - var _type = inputs[| 8].getValue(); + var _type = getInputData(8); inputs[| 2].setVisible(_type == 0); inputs[| 4].setVisible(_type == 0); diff --git a/scripts/node_zigzag/node_zigzag.gml b/scripts/node_zigzag/node_zigzag.gml index 15aefe443..bda98770a 100644 --- a/scripts/node_zigzag/node_zigzag.gml +++ b/scripts/node_zigzag/node_zigzag.gml @@ -13,7 +13,7 @@ function Node_Zigzag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co .setDisplay(VALUE_DISPLAY.vector); inputs[| 1] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.slider, [1, 16, 0.1]); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); inputs[| 2] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0] ) .setDisplay(VALUE_DISPLAY.vector) diff --git a/scripts/notification_system/notification_system.gml b/scripts/notification_system/notification_system.gml index 736b6a737..cc9944446 100644 --- a/scripts/notification_system/notification_system.gml +++ b/scripts/notification_system/notification_system.gml @@ -41,6 +41,7 @@ function noti_status(str, icon = noone, flash = false, ref = noone) { if(TEST_ERROR) return; + str = string(str); show_debug_message("STATUS: " + str); diff --git a/scripts/panel_array_sequence/panel_array_sequence.gml b/scripts/panel_array_sequence/panel_array_sequence.gml index 20daf7888..72eae2ead 100644 --- a/scripts/panel_array_sequence/panel_array_sequence.gml +++ b/scripts/panel_array_sequence/panel_array_sequence.gml @@ -24,8 +24,8 @@ function Panel_Array_Sequence(node) : PanelContent() constructor { function drawContent(panel) { draw_clear_alpha(COLORS.panel_bg_clear, 0); - var _seq = node.inputs[| 0].getValue(); - var _ord = node.inputs[| 2].getValue(); + var _seq = node.getInputData(0); + var _ord = node.getInputData(2); var draw_drag = true; var content_w = w - (padding + padding); diff --git a/scripts/panel_node_data_gen/panel_node_data_gen.gml b/scripts/panel_node_data_gen/panel_node_data_gen.gml index f03f35ef8..2e94f3d4e 100644 --- a/scripts/panel_node_data_gen/panel_node_data_gen.gml +++ b/scripts/panel_node_data_gen/panel_node_data_gen.gml @@ -1,5 +1,5 @@ var _filter = ["x", "y", "updated", "rendered", "show_output_name", "insp2UpdateIcon", "preview_trans", "value_validation", "group", "draw_padding", "draw_droppable", - "preview_drop_y", "badgeInspect", "preview_mx", "temp_surface", "load_scale", "node_id", "show_input_name", "graph_h", "display_data", "drawLineIndex", "draw_line_shift_x", + "preview_drop_y", "badgeInspect", "preview_mx", "temp_surface", "load_scale", "node_id", "show_input_name", "graph_h", "drawLineIndex", "draw_line_shift_x", "draw_line_shift_y", "cache_array", "drag_mx", "drag_my", "expTree", "value_to", "draw_line_thick", "expUse", "expression", "drag_sx", "drag_sy", "drag_type", "con_node", "cache_value", "show_graph", "preview_x", "preview_y", "badgePreview", "data_list", "open_rx", "open_ry", "parent", "active", "cached_output", "current_data", "cache_result", "draw_graph_culled", "dopesheet_y", "render_time", "renderActive", "preview_speed", "preview_drop_x", "preview_drop_y", "inspecting", "value_to_arr", "draw_name", "anim_priority", @@ -105,7 +105,7 @@ function Panel_Node_Data_Gen() : PanelContent() constructor { switch(_in.display_type) { case VALUE_DISPLAY.enum_button : case VALUE_DISPLAY.enum_scroll : - _lin[i].display_data = _in.display_data; + _lin[i].display_data = _in.display_data.data; break; } } diff --git a/scripts/preview_overlay_area/preview_overlay_area.gml b/scripts/preview_overlay_area/preview_overlay_area.gml index 866699367..d879d9c0e 100644 --- a/scripts/preview_overlay_area/preview_overlay_area.gml +++ b/scripts/preview_overlay_area/preview_overlay_area.gml @@ -2,7 +2,7 @@ function preview_overlay_area_padding(interact, active, _x, _y, _s, _mx, _my, _s var _val = array_clone(getValue()); var hover = -1; - if(display_data == -1) return hover; + if(!is_callable(display_data)) return hover; var ss = display_data(); var __at = array_safe_get(_val, 4); diff --git a/scripts/quarternionBox/quarternionBox.gml b/scripts/quarternionBox/quarternionBox.gml index 4f2e6cb9f..4a2915dea 100644 --- a/scripts/quarternionBox/quarternionBox.gml +++ b/scripts/quarternionBox/quarternionBox.gml @@ -50,10 +50,10 @@ function quarternionBox(_onModify) : widget() constructor { } static drawParam = function(params) { - return draw(params.x, params.y, params.w, params.h, params.data, params.extra_data, params.m); + return draw(params.x, params.y, params.w, params.h, params.data, params.display_data, params.m); } - static draw = function(_x, _y, _w, _h, _data, _extra_data, _m) { + static draw = function(_x, _y, _w, _h, _data, _display_data, _m) { x = _x; y = _y; w = _w; @@ -68,12 +68,12 @@ function quarternionBox(_onModify) : widget() constructor { var bs = ui(32); var bx = _x + _w - bs; var by = _y + _h / 2 - bs / 2; - var _disp = struct_try_get(_extra_data, "angle_display"); + var _disp = struct_try_get(_display_data, "angle_display"); tooltip.index = _disp; if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, active, hover, tooltip, THEME.unit_angle, _disp, c_white) == 2) { clickable = false; - _extra_data.angle_display = (_disp + 1) % 2; + _display_data.angle_display = (_disp + 1) % 2; } _w -= ui(40); diff --git a/scripts/rangeBox/rangeBox.gml b/scripts/rangeBox/rangeBox.gml index c2e7caf1c..3adf95dbc 100644 --- a/scripts/rangeBox/rangeBox.gml +++ b/scripts/rangeBox/rangeBox.gml @@ -1,6 +1,6 @@ function rangeBox(_type, _onModify) : widget() constructor { - onModify = _onModify; - extra_data = { linked : false }; + onModify = _onModify; + linked = false; tooltip = new tooltipSelector("Value Type", [ __txtx("widget_range_random", "Random Range"), @@ -10,7 +10,7 @@ function rangeBox(_type, _onModify) : widget() constructor { onModifyIndex = function(index, val) { var modi = false; - if(extra_data.linked) { + if(linked) { for( var i = 0; i < 2; i++ ) modi |= onModify(i, toNumber(val)); return modi; @@ -39,36 +39,36 @@ function rangeBox(_type, _onModify) : widget() constructor { self.interactable = interactable; tb[0].interactable = interactable; - if(!extra_data.linked) + if(!linked) tb[1].interactable = interactable; } static register = function(parent = noone) { tb[0].register(parent); - if(!extra_data.linked) + if(!linked) tb[1].register(parent); } static drawParam = function(params) { - return draw(params.x, params.y, params.w, params.h, params.data, params.extra_data, params.m); + return draw(params.x, params.y, params.w, params.h, params.data, params.display_data, params.m); } - static draw = function(_x, _y, _w, _h, _data, _extra_data, _m) { + static draw = function(_x, _y, _w, _h, _data, _display_data, _m) { x = _x; y = _y; w = _w; h = _h; - if(struct_has(_extra_data, "linked")) extra_data.linked = _extra_data.linked; - tooltip.index = extra_data.linked; + if(struct_has(_display_data, "linked")) linked = _display_data.linked; + tooltip.index = linked; - var _icon_blend = extra_data.linked? COLORS._main_accent : COLORS._main_icon; + var _icon_blend = linked? COLORS._main_accent : COLORS._main_icon; var bx = _x; var by = _y + _h / 2 - ui(32 / 2); - if(buttonInstant(THEME.button_hide, bx + ui(4), by + ui(4), ui(24), ui(24), _m, active, hover, tooltip, THEME.value_link, extra_data.linked, _icon_blend) == 2) { - extra_data.linked = !extra_data.linked; - _extra_data.linked = extra_data.linked; + if(buttonInstant(THEME.button_hide, bx + ui(4), by + ui(4), ui(24), ui(24), _m, active, hover, tooltip, THEME.value_link, linked, _icon_blend) == 2) { + linked = !linked; + _display_data.linked = linked; - if(extra_data.linked) { + if(linked) { onModify(0, _data[0]); onModify(1, _data[0]); } @@ -77,7 +77,7 @@ function rangeBox(_type, _onModify) : widget() constructor { _x += ui(28); _w -= ui(28); - if(extra_data.linked) { + if(linked) { tb[0].setFocusHover(active, hover); tb[0].draw(_x + ui(8), _y, _w - ui(8), _h, _data[0], _m); } else { diff --git a/scripts/struct_functions/struct_functions.gml b/scripts/struct_functions/struct_functions.gml index 0fdb699b2..0809484b2 100644 --- a/scripts/struct_functions/struct_functions.gml +++ b/scripts/struct_functions/struct_functions.gml @@ -1,11 +1,16 @@ #macro struct_has variable_struct_exists -function struct_override(original, override) { +function struct_override(original, override, excludes = []) { var args = variable_struct_get_names(override); for( var i = 0, n = array_length(args); i < n; i++ ) { - if(!struct_has(original, args[i])) continue; - original[$ args[i]] = override[$ args[i]]; + var _key = args[i]; + + if(!struct_has(original, _key)) continue; + if(is_callable(original[$ _key])) continue; + if(array_exists(excludes, _key)) continue; + + original[$ _key] = override[$ _key]; } return original; @@ -23,8 +28,16 @@ function struct_append(original, append) { function struct_try_get(struct, key, def = 0) { gml_pragma("forceinline"); + if(struct[$ key] != undefined) return struct[$ key]; key = string_replace_all(key, "_", " "); return struct[$ key] ?? def; +} + +function struct_try_override(original, override, key) { + gml_pragma("forceinline"); + + if(!struct_has(override, key)) return; + original[$ key] = override[$ key]; } \ No newline at end of file diff --git a/scripts/vectorBox/vectorBox.gml b/scripts/vectorBox/vectorBox.gml index 82530fb09..9d91be2d5 100644 --- a/scripts/vectorBox/vectorBox.gml +++ b/scripts/vectorBox/vectorBox.gml @@ -11,7 +11,8 @@ function vectorBox(_size, _onModify, _unit = noone) : widget() constructor { linkable = true; per_line = false; current_value = []; - extra_data = { linked : false, side_button : noone }; + linked = false; + side_button = noone; link_inactive_color = noone; @@ -23,7 +24,7 @@ function vectorBox(_size, _onModify, _unit = noone) : widget() constructor { onModifyIndex = function(index, val) { var v = toNumber(val); - if(extra_data.linked) { + if(linked) { var modi = false; for( var i = 0; i < size; i++ ) { tb[i]._input_text = v; @@ -64,8 +65,8 @@ function vectorBox(_size, _onModify, _unit = noone) : widget() constructor { static setInteract = function(interactable) { self.interactable = interactable; - if(extra_data.side_button != noone) - extra_data.side_button.interactable = interactable; + if(side_button != noone) + side_button.interactable = interactable; for( var i = 0; i < size; i++ ) tb[i].interactable = interactable; @@ -75,26 +76,26 @@ function vectorBox(_size, _onModify, _unit = noone) : widget() constructor { for( var i = 0; i < size; i++ ) tb[i].register(parent); - if(extra_data.side_button != noone) - extra_data.side_button.register(parent); + if(side_button != noone) + side_button.register(parent); if(unit != noone && unit.reference != noone) unit.triggerButton.register(parent); } static drawParam = function(params) { - return draw(params.x, params.y, params.w, params.h, params.data, params.extra_data, params.m); + return draw(params.x, params.y, params.w, params.h, params.data, params.display_data, params.m); } - static draw = function(_x, _y, _w, _h, _data, _extra_data, _m) { + static draw = function(_x, _y, _w, _h, _data, _display_data, _m) { x = _x; y = _y; w = _w; h = per_line? (_h + ui(8)) * size - ui(8) : _h; - if(struct_has(_extra_data, "linked")) extra_data.linked = _extra_data.linked; - if(struct_has(_extra_data, "side_button")) extra_data.side_button = _extra_data.side_button; - tooltip.index = extra_data.linked; + if(struct_has(_display_data, "linked")) linked = _display_data.linked; + if(struct_has(_display_data, "side_button")) side_button = _display_data.side_button; + tooltip.index = linked; if(!is_array(_data)) return 0; if(array_empty(_data)) return 0; @@ -102,9 +103,9 @@ function vectorBox(_size, _onModify, _unit = noone) : widget() constructor { current_value = _data; - if(extra_data.side_button) { - extra_data.side_button.setFocusHover(active, hover); - extra_data.side_button.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide); + if(side_button) { + side_button.setFocusHover(active, hover); + side_button.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide); _w -= ui(40); } @@ -117,14 +118,14 @@ function vectorBox(_size, _onModify, _unit = noone) : widget() constructor { } if(linkable) { - var _icon_blend = extra_data.linked? COLORS._main_accent : (link_inactive_color == noone? COLORS._main_icon : link_inactive_color); + var _icon_blend = linked? COLORS._main_accent : (link_inactive_color == noone? COLORS._main_icon : link_inactive_color); var bx = _x; var by = _y + _h / 2 - ui(32 / 2); - if(buttonInstant(THEME.button_hide, bx + ui(4), by + ui(4), ui(24), ui(24), _m, active, hover, tooltip, THEME.value_link, extra_data.linked, _icon_blend) == 2) { - extra_data.linked = !extra_data.linked; - _extra_data.linked = extra_data.linked; - - if(extra_data.linked) { + if(buttonInstant(THEME.button_hide, bx + ui(4), by + ui(4), ui(24), ui(24), _m, active, hover, tooltip, THEME.value_link, linked, _icon_blend) == 2) { + linked = !linked; + _display_data.linked = linked; + + if(linked) { onModify(0, _data[0]); onModify(1, _data[0]); } diff --git a/scripts/vectorRangeBox/vectorRangeBox.gml b/scripts/vectorRangeBox/vectorRangeBox.gml index 92ae8058d..a2af1d03b 100644 --- a/scripts/vectorRangeBox/vectorRangeBox.gml +++ b/scripts/vectorRangeBox/vectorRangeBox.gml @@ -2,7 +2,7 @@ function vectorRangeBox(_size, _type, _onModify, _unit = noone) : widget() const size = _size; onModify = _onModify; unit = _unit; - extra_data = { linked : false }; + linked = false; tooltip = new tooltipSelector("Value Type", [ __txtx("widget_range_random", "Random Range"), @@ -10,7 +10,7 @@ function vectorRangeBox(_size, _type, _onModify, _unit = noone) : widget() const ]); onModifyIndex = function(index, val) { - if(extra_data.linked) { + if(linked) { var modi = false; modi |= onModify(floor(index / 2) * 2 + 0, toNumber(val)); modi |= onModify(floor(index / 2) * 2 + 1, toNumber(val)); @@ -41,39 +41,39 @@ function vectorRangeBox(_size, _type, _onModify, _unit = noone) : widget() const static setInteract = function(interactable = noone) { self.interactable = interactable; - var _step = extra_data.linked? 2 : 1; + var _step = linked? 2 : 1; for( var i = 0; i < size; i += _step ) tb[i].interactable = interactable; } static register = function(parent = noone) { - var _step = extra_data.linked? 2 : 1; + var _step = linked? 2 : 1; for( var i = 0; i < size; i += _step ) tb[i].register(parent); } static drawParam = function(params) { - return draw(params.x, params.y, params.w, params.h, params.data, params.extra_data, params.m); + return draw(params.x, params.y, params.w, params.h, params.data, params.display_data, params.m); } - static draw = function(_x, _y, _w, _h, _data, _extra_data, _m) { + static draw = function(_x, _y, _w, _h, _data, _display_data, _m) { x = _x; y = _y; w = _w; - if(struct_has(_extra_data, "linked")) extra_data.linked = _extra_data.linked; - h = extra_data.linked? _h : _h * 2 + ui(4); - tooltip.index = extra_data.linked; + if(struct_has(_display_data, "linked")) linked = _display_data.linked; + h = linked? _h : _h * 2 + ui(4); + tooltip.index = linked; - var _icon_blend = extra_data.linked? COLORS._main_accent : COLORS._main_icon; + var _icon_blend = linked? COLORS._main_accent : COLORS._main_icon; var bx = _x; var by = _y + _h / 2 - ui(32 / 2); - if(buttonInstant(THEME.button_hide, bx + ui(4), by + ui(4), ui(24), ui(24), _m, active, hover, tooltip, THEME.value_link, extra_data.linked, _icon_blend) == 2) { - extra_data.linked = !extra_data.linked; - _extra_data.linked = extra_data.linked; + if(buttonInstant(THEME.button_hide, bx + ui(4), by + ui(4), ui(24), ui(24), _m, active, hover, tooltip, THEME.value_link, linked, _icon_blend) == 2) { + linked = !linked; + _display_data.linked = linked; - if(extra_data.linked) { + if(linked) { for(var i = 0; i < size; i += 2) { onModify(i + 0, _data[i]); onModify(i + 1, _data[i]); @@ -84,7 +84,7 @@ function vectorRangeBox(_size, _type, _onModify, _unit = noone) : widget() const _x += ui(28); _w -= ui(28); - var _step = extra_data.linked? 2 : 1; + var _step = linked? 2 : 1; var ww = _w / size * 2; for(var i = 0; i < size; i += _step) { @@ -92,12 +92,12 @@ function vectorRangeBox(_size, _type, _onModify, _unit = noone) : widget() const var bx = _x + ww * floor(i / 2); var by = _y + i % 2 * (_h + ui(4)); - var _ww = ui(32 + 32 * !extra_data.linked); + var _ww = ui(32 + 32 * !linked); tb[i].draw(bx + _ww, by, ww - _ww, _h, _data[i], _m); draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text_inner); - var _label = extra_data.linked? axis[floor(i / 2)] + var _label = linked? axis[floor(i / 2)] : (i % 2? __txt("Max") : __txt("Min")) + " " + axis[floor(i / 2)]; draw_text(bx + ui(8), by + _h / 2, _label); } diff --git a/scripts/widget/widget.gml b/scripts/widget/widget.gml index f126dd112..a35a11b0b 100644 --- a/scripts/widget/widget.gml +++ b/scripts/widget/widget.gml @@ -75,7 +75,7 @@ function widget() constructor { static draw = function() {} } -function widgetParam(x, y, w, h, data, extra_data = 0, m = mouse_ui, rx = 0, ry = 0) constructor { +function widgetParam(x, y, w, h, data, display_data = {}, m = mouse_ui, rx = 0, ry = 0) constructor { self.x = x; self.y = y; @@ -83,11 +83,12 @@ function widgetParam(x, y, w, h, data, extra_data = 0, m = mouse_ui, rx = 0, ry self.h = h; self.s = ui(24); self.data = data; - self.extra_data = extra_data; self.m = m; self.rx = rx; self.ry = ry; self.halign = fa_left; self.valign = fa_top; + + self.display_data = display_data; } \ No newline at end of file