From 818473dc453a8100b5b0a44f8257e51129aa1bfd Mon Sep 17 00:00:00 2001 From: Tanasart <22589759+Ttanasart-pt@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:29:39 +0200 Subject: [PATCH] Fixing array pass by refererence --- PixelComposer.resource_order | 12 +-- PixelComposer.yyp | 18 ++-- objects/oRigidbody/oRigidbody.yy | 2 +- objects/o_dialog_add_node/Create_0.gml | 2 + scripts/__VFX/__VFX.yy | 2 +- scripts/__bone/__bone.gml | 92 +++++++++---------- scripts/__node_3d_object/__node_3d_object.gml | 22 ++--- scripts/__strandSim/__strandSim.yy | 2 +- .../_node_VFX_effector/_node_VFX_effector.yy | 2 +- .../_node_VFX_spawner/_node_VFX_spawner.yy | 2 +- .../_node_fluid_nodes/_node_fluid_nodes.gml | 2 +- .../_node_fluid_nodes/_node_fluid_nodes.yy | 2 +- .../_node_strand_affector.yy | 2 +- scripts/dynaSurf/dynaSurf.gml | 15 ++- scripts/dynaSurf_iso/dynaSurf_iso.gml | 8 +- .../node_3d_mesh_cylinder.gml | 2 +- .../node_3d_mesh_extrude.gml | 2 +- .../node_3d_mesh_icosphere.gml | 2 +- scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml | 12 +-- .../node_3d_mesh_plane/node_3d_mesh_plane.gml | 2 +- .../node_3d_mesh_uvsphere.gml | 2 +- scripts/node_FXAA/node_FXAA.gml | 4 +- .../node_PCX_condition/node_PCX_condition.gml | 24 +++++ .../node_PCX_condition/node_PCX_condition.yy | 11 +++ scripts/node_PCX_condition/node_outline.yy | 12 +++ .../node_VFX_effect_accelerate.yy | 2 +- .../node_VFX_effect_attract.yy | 2 +- .../node_VFX_effect_destroy.yy | 2 +- .../node_VFX_effect_repel.yy | 2 +- .../node_VFX_effect_turbulence.yy | 2 +- .../node_VFX_effect_vortex.yy | 2 +- .../node_VFX_effect_wind.yy | 2 +- .../node_VFX_effector/node_VFX_effector.yy | 2 +- scripts/node_VFX_group/node_VFX_group.yy | 2 +- .../node_VFX_override/node_VFX_override.yy | 2 +- .../node_VFX_renderer/node_VFX_renderer.yy | 2 +- scripts/node_VFX_spawner/node_VFX_spawner.yy | 2 +- .../node_VFX_variable/node_VFX_variable.yy | 2 +- .../node_alpha_cutoff/node_alpha_cutoff.gml | 4 +- scripts/node_alpha_hash/node_alpha_hash.gml | 4 +- .../node_alpha_to_grey/node_alpha_to_grey.gml | 13 +-- scripts/node_armature/node_armature.gml | 61 +++++++----- .../node_armature_bind/node_armature_bind.gml | 77 ++++++++-------- .../node_armature_pose/node_armature_pose.gml | 39 ++++---- .../node_armature_sample.gml | 17 ++-- .../node_armature_to_path.gml | 30 +++--- .../node_array_remove/node_array_remove.gml | 11 +-- .../node_array_reverse/node_array_reverse.gml | 4 +- scripts/node_array_set/node_array_set.gml | 9 +- .../node_array_shuffle/node_array_shuffle.gml | 1 + scripts/node_atlas/node_atlas.gml | 4 +- scripts/node_average/node_average.gml | 4 +- scripts/node_blend/node_blend.gml | 4 +- scripts/node_blur/node_blur.gml | 4 +- scripts/node_blur_bokeh/node_blur_bokeh.gml | 4 +- .../node_blur_contrast/node_blur_contrast.gml | 4 +- .../node_blur_directional.gml | 8 +- scripts/node_blur_radial/node_blur_radial.gml | 6 +- scripts/node_blur_simple/node_blur_simple.gml | 4 +- scripts/node_blur_zoom/node_blur_zoom.gml | 10 +- scripts/node_bw/node_bw.gml | 4 +- scripts/node_camera/node_camera.gml | 2 +- scripts/node_channels/node_channels.gml | 4 +- .../node_channels_hsv/node_channels_hsv.gml | 4 +- .../node_chromatic_aberration.gml | 2 +- .../node_color_adjustment.gml | 10 +- .../node_color_palette_replacement.gml | 4 +- .../node_color_remove/node_color_remove.gml | 4 +- .../node_color_replacement.gml | 18 ++-- scripts/node_colorize/node_colorize.gml | 4 +- scripts/node_combine_hsv/node_combine_hsv.gml | 4 +- scripts/node_combine_rgb/node_combine_rgb.gml | 4 +- scripts/node_composite/node_composite.gml | 13 ++- scripts/node_crop/node_crop.gml | 1 + scripts/node_curve/node_curve.gml | 4 +- scripts/node_de_corner/node_de_corner.gml | 4 +- scripts/node_de_stray/node_de_stray.gml | 4 +- scripts/node_dilate/node_dilate.gml | 8 +- .../node_displacement/node_displacement.gml | 4 +- .../node_dynamic_surface.gml | 16 ++-- scripts/node_fluid_add/node_fluid_add.yy | 2 +- .../node_fluid_add_collider.yy | 2 +- .../node_fluid_apply_velo.yy | 2 +- .../node_fluid_domain/node_fluid_domain.yy | 2 +- .../node_fluid_domain_queue.yy | 2 +- .../node_fluid_render/node_fluid_render.yy | 2 +- .../node_fluid_repulse/node_fluid_repulse.yy | 2 +- scripts/node_fluid_sim/node_fluid_sim.yy | 2 +- .../node_fluid_turbulence.yy | 2 +- .../node_fluid_update/node_fluid_update.yy | 2 +- .../node_fluid_vortex/node_fluid_vortex.yy | 2 +- .../node_grey_to_alpha/node_grey_to_alpha.gml | 8 +- scripts/node_greyscale/node_greyscale.gml | 4 +- scripts/node_grid/node_grid.gml | 2 +- scripts/node_invert/node_invert.gml | 4 +- .../node_iterator_output.gml | 5 +- scripts/node_keyframe/node_keyframe.gml | 2 +- scripts/node_level/node_level.gml | 12 +-- .../node_level_selector.gml | 16 ++-- .../node_morph_surface/node_morph_surface.gml | 4 +- scripts/node_noise_cell/node_noise_cell.gml | 14 ++- .../node_palette_extract.gml | 2 +- .../node_palette_shift/node_palette_shift.gml | 4 +- scripts/node_particle/node_particle.yy | 2 +- scripts/node_path/node_path.gml | 31 ++++--- scripts/node_pixel_sort/node_pixel_sort.gml | 6 +- scripts/node_registry/node_registry.gml | 7 +- scripts/node_repeat/node_repeat.gml | 5 +- .../node_rigid_activation.yy | 2 +- .../node_rigid_force_apply.yy | 2 +- .../node_rigid_global/node_rigid_global.yy | 2 +- scripts/node_rigid_group/node_rigid_group.yy | 2 +- .../node_rigid_object/node_rigid_object.yy | 2 +- .../node_rigid_object_spawner.yy | 2 +- .../node_rigid_override.yy | 2 +- .../node_rigid_render/node_rigid_render.yy | 2 +- .../node_rigid_variable.yy | 2 +- scripts/node_sdf/node_sdf.gml | 13 ++- .../node_seperate_shapes.gml | 2 +- .../node_sprite_stack/node_sprite_stack.gml | 1 + scripts/node_stack/node_stack.gml | 20 ++-- .../node_strand_break/node_strand_break.yy | 2 +- .../node_strand_collision.yy | 2 +- .../node_strand_create/node_strand_create.yy | 2 +- .../node_strand_force_apply.yy | 2 +- .../node_strand_gravity.yy | 2 +- .../node_strand_length_adjust.yy | 2 +- .../node_strand_render/node_strand_render.yy | 2 +- .../node_strand_render_texture.yy | 2 +- scripts/node_strand_sim/node_strand_sim.yy | 2 +- .../node_strand_update/node_strand_update.yy | 2 +- .../node_string_get_char.gml | 2 +- .../node_texture_remap/node_texture_remap.gml | 4 +- scripts/node_threshold/node_threshold.gml | 16 ++-- scripts/node_time_remap/node_time_remap.gml | 4 +- scripts/node_transform/node_transform.gml | 10 +- .../node_transform_array.gml | 4 +- scripts/node_twirl/node_twirl.gml | 8 +- scripts/node_value/node_value.gml | 27 +++--- .../node_wav_file_read/node_wav_file_read.gml | 81 ++++++++-------- scripts/node_wrap/node_wrap.gml | 8 +- .../node_wrap_perspective.gml | 8 +- .../panel_console.gml | 0 .../panel_node_credit.gml} | 6 +- .../panel_node_credit.yy} | 2 +- scripts/point_rotate/point_rotate.gml | 4 +- scripts/scrollPane/scrollPane.gml | 3 +- 147 files changed, 605 insertions(+), 530 deletions(-) create mode 100644 scripts/node_PCX_condition/node_PCX_condition.gml create mode 100644 scripts/node_PCX_condition/node_PCX_condition.yy create mode 100644 scripts/node_PCX_condition/node_outline.yy rename scripts/{panel_node_cost => panel_node_credit}/panel_console.gml (100%) rename scripts/{panel_node_cost/panel_node_cost.gml => panel_node_credit/panel_node_credit.gml} (92%) rename scripts/{panel_node_cost/panel_node_cost.yy => panel_node_credit/panel_node_credit.yy} (85%) diff --git a/PixelComposer.resource_order b/PixelComposer.resource_order index cf7f39928..66fc78458 100644 --- a/PixelComposer.resource_order +++ b/PixelComposer.resource_order @@ -98,7 +98,7 @@ {"name":"effects","order":3,"path":"folders/nodes/data/filter/effects.yy",}, {"name":"fixes","order":6,"path":"folders/nodes/data/filter/fixes.yy",}, {"name":"warps","order":2,"path":"folders/nodes/data/filter/warps.yy",}, - {"name":"fluidSim","order":17,"path":"folders/nodes/data/fluidSim.yy",}, + {"name":"fluidSim","order":2,"path":"folders/nodes/data/simulation/fluidSim.yy",}, {"name":"generator","order":5,"path":"folders/nodes/data/generator.yy",}, {"name":"noise","order":14,"path":"folders/nodes/data/generator/noise.yy",}, {"name":"pattern","order":15,"path":"folders/nodes/data/generator/pattern.yy",}, @@ -122,8 +122,7 @@ {"name":"draw","order":3,"path":"folders/nodes/data/pixel builder/draw.yy",}, {"name":"effect","order":4,"path":"folders/nodes/data/pixel builder/effect.yy",}, {"name":"render","order":3,"path":"folders/nodes/data/render.yy",}, - {"name":"rigidSim","order":15,"path":"folders/nodes/data/rigidSim.yy",}, - {"name":"strandSim","order":18,"path":"folders/nodes/data/strandSim.yy",}, + {"name":"strandSim","order":1,"path":"folders/nodes/data/simulation/strandSim.yy",}, {"name":"transform","order":9,"path":"folders/nodes/data/transform.yy",}, {"name":"value","order":4,"path":"folders/nodes/data/value.yy",}, {"name":"atlas","order":9,"path":"folders/nodes/data/value/atlas.yy",}, @@ -132,7 +131,7 @@ {"name":"struct","order":6,"path":"folders/nodes/data/value/struct.yy",}, {"name":"surface","order":10,"path":"folders/nodes/data/value/surface.yy",}, {"name":"trigger","order":8,"path":"folders/nodes/data/value/trigger.yy",}, - {"name":"VFX","order":12,"path":"folders/nodes/data/VFX.yy",}, + {"name":"VFX","order":3,"path":"folders/nodes/data/simulation/VFX.yy",}, {"name":"3D","order":133,"path":"folders/nodes/icons/3D.yy",}, {"name":"animation","order":135,"path":"folders/nodes/icons/animation.yy",}, {"name":"filter","order":141,"path":"folders/nodes/icons/filter.yy",}, @@ -167,6 +166,7 @@ {"name":"preview","order":3,"path":"folders/panels/preview.yy",}, {"name":"overlay","order":2,"path":"folders/panels/preview/overlay.yy",}, {"name":"sprites","order":3,"path":"folders/panels/preview/sprites.yy",}, + {"name":"what?","order":10,"path":"folders/panels/what?.yy",}, {"name":"shader","order":8,"path":"folders/shader.yy",}, {"name":"_helper","order":49,"path":"folders/shader/_helper.yy",}, {"name":"3d","order":29,"path":"folders/shader/3d.yy",}, @@ -200,14 +200,14 @@ {"name":"transition","order":52,"path":"folders/shader/transition.yy",}, {"name":"warp","order":41,"path":"folders/shader/warp.yy",}, {"name":"sprites","order":11,"path":"folders/sprites.yy",}, + {"name":"bs","order":4,"path":"folders/sprites/bs.yy",}, {"name":"gameframe","order":2,"path":"folders/sprites/gameframe.yy",}, {"name":"misc","order":3,"path":"folders/sprites/misc.yy",}, {"name":"VCT","order":12,"path":"folders/VCT.yy",}, {"name":"biterator","order":2,"path":"folders/VCT/biterator.yy",}, {"name":"widget","order":3,"path":"folders/VCT/widget.yy",}, {"name":"widgets","order":5,"path":"folders/widgets.yy",}, - {"name":"what?","order":10,"path":"folders/panels/what?.yy",}, - {"name":"bs","order":4,"path":"folders/sprites/bs.yy",}, + {"name":"simulation","order":23,"path":"folders/nodes/data/simulation.yy",}, ], "ResourceOrderSettings": [ {"name":"s_node_corner","order":16,"path":"sprites/s_node_corner/s_node_corner.yy",}, diff --git a/PixelComposer.yyp b/PixelComposer.yyp index a7236b724..32c6591e9 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -122,7 +122,7 @@ {"resourceType":"GMFolder","resourceVersion":"1.0","name":"effects","folderPath":"folders/nodes/data/filter/effects.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"fixes","folderPath":"folders/nodes/data/filter/fixes.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"warps","folderPath":"folders/nodes/data/filter/warps.yy",}, - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"fluidSim","folderPath":"folders/nodes/data/fluidSim.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"fluidSim","folderPath":"folders/nodes/data/simulation/fluidSim.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"generator","folderPath":"folders/nodes/data/generator.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"noise","folderPath":"folders/nodes/data/generator/noise.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"pattern","folderPath":"folders/nodes/data/generator/pattern.yy",}, @@ -148,8 +148,8 @@ {"resourceType":"GMFolder","resourceVersion":"1.0","name":"draw","folderPath":"folders/nodes/data/pixel builder/draw.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"effect","folderPath":"folders/nodes/data/pixel builder/effect.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"render","folderPath":"folders/nodes/data/render.yy",}, - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"rigidSim","folderPath":"folders/nodes/data/rigidSim.yy",}, - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"strandSim","folderPath":"folders/nodes/data/strandSim.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"rigidSim","folderPath":"folders/nodes/data/simulation/rigidSim.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"strandSim","folderPath":"folders/nodes/data/simulation/strandSim.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"transform","folderPath":"folders/nodes/data/transform.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"value","folderPath":"folders/nodes/data/value.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"array","folderPath":"folders/nodes/data/value/array.yy",}, @@ -164,7 +164,7 @@ {"resourceType":"GMFolder","resourceVersion":"1.0","name":"surface","folderPath":"folders/nodes/data/value/surface.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"texts","folderPath":"folders/nodes/data/value/texts.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"trigger","folderPath":"folders/nodes/data/value/trigger.yy",}, - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"VFX","folderPath":"folders/nodes/data/VFX.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"VFX","folderPath":"folders/nodes/data/simulation/VFX.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"icons","folderPath":"folders/nodes/icons.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"3D","folderPath":"folders/nodes/icons/3D.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"animation","folderPath":"folders/nodes/icons/animation.yy",}, @@ -201,6 +201,7 @@ {"resourceType":"GMFolder","resourceVersion":"1.0","name":"preview","folderPath":"folders/panels/preview.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"overlay","folderPath":"folders/panels/preview/overlay.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"sprites","folderPath":"folders/panels/preview/sprites.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"what?","folderPath":"folders/panels/what?.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"shader","folderPath":"folders/shader.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"_helper","folderPath":"folders/shader/_helper.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"3d","folderPath":"folders/shader/3d.yy",}, @@ -234,6 +235,7 @@ {"resourceType":"GMFolder","resourceVersion":"1.0","name":"transition","folderPath":"folders/shader/transition.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"warp","folderPath":"folders/shader/warp.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"sprites","folderPath":"folders/sprites.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"bs","folderPath":"folders/sprites/bs.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"gameframe","folderPath":"folders/sprites/gameframe.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"misc","folderPath":"folders/sprites/misc.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"texture","folderPath":"folders/sprites/texture.yy",}, @@ -243,8 +245,7 @@ {"resourceType":"GMFolder","resourceVersion":"1.0","name":"biterator","folderPath":"folders/VCT/biterator.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"widget","folderPath":"folders/VCT/widget.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"widgets","folderPath":"folders/widgets.yy",}, - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"what?","folderPath":"folders/panels/what?.yy",}, - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"bs","folderPath":"folders/sprites/bs.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"simulation","folderPath":"folders/nodes/data/simulation.yy",}, ], "IncludedFiles": [ {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"ApolloHelp.html","ConfigValues":{"Itch":{"CopyToMask":"0",},},"CopyToMask":-1,"filePath":"datafiles",}, @@ -523,10 +524,10 @@ {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_rotator_bg.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node/widget",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_rotator_knob.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node/widget",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_slider.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node/widget",}, - {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphic.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"credit_badge_popular.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"credit_badge_value.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"fade_up.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphic.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"node_credit_strip3.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_key_display_mouse_strip6.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"anchor_arrow.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/preview",}, @@ -896,7 +897,7 @@ {"id":{"name":"fd_rectangle_get_collision_mask_sprite","path":"scripts/fd_rectangle_get_collision_mask_sprite/fd_rectangle_get_collision_mask_sprite.yy",},}, {"id":{"name":"node_flip","path":"scripts/node_flip/node_flip.yy",},}, {"id":{"name":"s_node_pb_fx_subtract","path":"sprites/s_node_pb_fx_subtract/s_node_pb_fx_subtract.yy",},}, - {"id":{"name":"panel_node_cost","path":"scripts/panel_node_cost/panel_node_cost.yy",},}, + {"id":{"name":"panel_node_credit","path":"scripts/panel_node_credit/panel_node_credit.yy",},}, {"id":{"name":"sh_FXAA","path":"shaders/sh_FXAA/sh_FXAA.yy",},}, {"id":{"name":"s_biterator_slider","path":"sprites/s_biterator_slider/s_biterator_slider.yy",},}, {"id":{"name":"shader_functions","path":"scripts/shader_functions/shader_functions.yy",},}, @@ -1912,6 +1913,7 @@ {"id":{"name":"node_scale_algo","path":"scripts/node_scale_algo/node_scale_algo.yy",},}, {"id":{"name":"s_node_image_replace","path":"sprites/s_node_image_replace/s_node_image_replace.yy",},}, {"id":{"name":"node_alpha_hash","path":"scripts/node_alpha_hash/node_alpha_hash.yy",},}, + {"id":{"name":"node_PCX_condition","path":"scripts/node_PCX_condition/node_PCX_condition.yy",},}, {"id":{"name":"toggleGroup","path":"scripts/toggleGroup/toggleGroup.yy",},}, {"id":{"name":"mouse_input","path":"scripts/mouse_input/mouse_input.yy",},}, {"id":{"name":"string_cut","path":"scripts/string_cut/string_cut.yy",},}, diff --git a/objects/oRigidbody/oRigidbody.yy b/objects/oRigidbody/oRigidbody.yy index 45c3e6172..9e5713649 100644 --- a/objects/oRigidbody/oRigidbody.yy +++ b/objects/oRigidbody/oRigidbody.yy @@ -10,7 +10,7 @@ "overriddenProperties": [], "parent": { "name": "rigidSim", - "path": "folders/nodes/data/rigidSim.yy", + "path": "folders/nodes/data/simulation/rigidSim.yy", }, "parentObjectId": null, "persistent": true, diff --git a/objects/o_dialog_add_node/Create_0.gml b/objects/o_dialog_add_node/Create_0.gml index 46c273b51..7e0c2ec52 100644 --- a/objects/o_dialog_add_node/Create_0.gml +++ b/objects/o_dialog_add_node/Create_0.gml @@ -596,6 +596,8 @@ event_inherited(); return hh; }); #endregion + + content_pane.always_scroll = true; #endregion #region resize diff --git a/scripts/__VFX/__VFX.yy b/scripts/__VFX/__VFX.yy index 6090a6d4c..df96a550e 100644 --- a/scripts/__VFX/__VFX.yy +++ b/scripts/__VFX/__VFX.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "VFX", - "path": "folders/nodes/data/VFX.yy", + "path": "folders/nodes/data/simulation/VFX.yy", }, } \ No newline at end of file diff --git a/scripts/__bone/__bone.gml b/scripts/__bone/__bone.gml index 50cf21782..8b7e87969 100644 --- a/scripts/__bone/__bone.gml +++ b/scripts/__bone/__bone.gml @@ -46,20 +46,20 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = direction = parent.angle; } - static addChild = function(bone) { + static addChild = function(bone) { #region array_push(childs, bone); bone.parent = self; return self; - } + } #endregion - static childCount = function() { + static childCount = function() { #region var amo = array_length(childs); for( var i = 0, n = array_length(childs); i < n; i++ ) amo += childs[i].childCount(); return amo; - } + } #endregion - static freeze = function() { + static freeze = function() { #region freeze_data = { angle: angle, length: length, @@ -69,9 +69,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = for( var i = 0, n = array_length(childs); i < n; i++ ) childs[i].freeze(); - } + } #endregion - static findBone = function(_id) { + static findBone = function(_id) { #region if(ID == _id) return self; @@ -82,9 +82,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = } return noone; - } + } #endregion - static findBoneByName = function(_name) { + static findBoneByName = function(_name) { #region //print($"Print {string_length(string_trim(name))} : {string_length(string_trim(_name))}"); if(string_trim(name) == string_trim(_name)) return self; @@ -96,9 +96,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = } return noone; - } + } #endregion - static getPoint = function(progress, pose = true) { + static getPoint = function(progress, pose = true) { #region var _len = pose? length : init_length; var _ang = pose? angle : init_angle; @@ -118,18 +118,18 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = .add(lengthdir_x(distance, direction), lengthdir_y(distance, direction)) .add(lengthdir_x(len, _ang), lengthdir_y(len, _ang)) return p; - } + } #endregion - static draw = function(attributes, edit = false, _x = 0, _y = 0, _s = 1, _mx = 0, _my = 0, hovering = noone, selecting = noone) { + static draw = function(attributes, edit = false, _x = 0, _y = 0, _s = 1, _mx = 0, _my = 0, hovering = noone, selecting = noone) { #region var hover = _drawBone(attributes, edit, _x, _y, _s, _mx, _my, hovering, selecting); drawControl(attributes); return hover; - } + } #endregion control_x0 = 0; control_y0 = 0; control_i0 = 0; control_x1 = 0; control_y1 = 0; control_i1 = 0; - static _drawBone = function(attributes, edit = false, _x = 0, _y = 0, _s = 1, _mx = 0, _my = 0, hovering = noone, selecting = noone) { + static _drawBone = function(attributes, edit = false, _x = 0, _y = 0, _s = 1, _mx = 0, _my = 0, hovering = noone, selecting = noone) { #region var hover = noone; var p0 = getPoint(0); @@ -226,9 +226,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = } return hover; - } + } #endregion - static drawControl = function(attributes) { + static drawControl = function(attributes) { #region if(parent != noone && IKlength == 0) { var spr, ind0, ind1; if(attributes.display_bone == 0) { @@ -244,23 +244,23 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = for( var i = 0, n = array_length(childs); i < n; i++ ) childs[i].drawControl(attributes); - } + } #endregion - static resetPose = function() { + static resetPose = function() { #region pose_angle = 0; pose_scale = 1; pose_posit = [ 0, 0 ]; for( var i = 0, n = array_length(childs); i < n; i++ ) childs[i].resetPose(); - } + } #endregion - static setPose = function(_position = [ 0, 0 ], _angle = 0, _scale = 1) { + static setPose = function(_position = [ 0, 0 ], _angle = 0, _scale = 1) { #region setPoseTransform(_position, _angle, _scale); setIKconstrain(); - } + } #endregion - static setPoseTransform = function(_position = [ 0, 0 ], _angle = 0, _scale = 1) { + static setPoseTransform = function(_position = [ 0, 0 ], _angle = 0, _scale = 1) { #region if(is_main) { for( var i = 0, n = array_length(childs); i < n; i++ ) childs[i].setPoseTransform(_position, _angle, _scale); @@ -289,9 +289,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = for( var i = 0, n = array_length(childs); i < n; i++ ) childs[i].setPoseTransform(_position, pose_angle, pose_scale); - } + } #endregion - static setIKconstrain = function() { + static setIKconstrain = function() { #region if(IKlength > 0 && IKTarget != noone) { var points = array_create(IKlength + 1); var lengths = array_create(IKlength); @@ -330,10 +330,10 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = for( var i = 0, n = array_length(childs); i < n; i++ ) childs[i].setIKconstrain(); - } + } #endregion FABRIK_result = []; - static FABRIK = function(bones, points, lengths, dx, dy) { + static FABRIK = function(bones, points, lengths, dx, dy) { #region var threshold = 0.01; var _bo = array_create(array_length(points)); for( var i = 0, n = array_length(points); i < n; i++ ) @@ -369,9 +369,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = } FABRIK_result[i] = p1; - } + } #endregion - static FABRIK_backward = function(points, lengths, dx, dy) { + static FABRIK_backward = function(points, lengths, dx, dy) { #region var tx = dx; var ty = dy; @@ -390,9 +390,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = tx = p0.x; ty = p0.y; } - } + } #endregion - static FABRIK_forward = function(points, lengths, sx, sy) { + static FABRIK_forward = function(points, lengths, sx, sy) { #region var tx = sx; var ty = sy; @@ -411,9 +411,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = tx = p1.x; ty = p1.y; } - } + } #endregion - static __getBBOX = function() { + static __getBBOX = function() { #region var p0 = getPoint(0); var p1 = getPoint(1); @@ -423,9 +423,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = var y1 = max(p0.y, p1.y); return [ x0, y0, x1, y1 ]; - } + } #endregion - static bbox = function() { + static bbox = function() { #region var _bbox = __getBBOX(); //print($"BBOX: {_bbox}") @@ -440,9 +440,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = } return _bbox; - } + } #endregion - static serialize = function() { + static serialize = function() { #region var bone = {}; bone.ID = ID; @@ -466,9 +466,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = bone.childs[i] = childs[i].serialize(); return bone; - } + } #endregion - static deserialize = function(bone, node) { + static deserialize = function(bone, node) { #region ID = bone.ID; name = bone.name; distance = bone.distance; @@ -494,18 +494,18 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = } return self; - } + } #endregion - static connect = function() { + static connect = function() { #region IKTarget = noone; if(parent != noone && IKTargetID != "") IKTarget = parent.findBone(IKTargetID); for( var i = 0, n = array_length(childs); i < n; i++ ) childs[i].connect(); - } + } #endregion - static clone = function() { + static clone = function() { #region var _b = new __Bone(parent, distance, direction, angle, length); _b.ID = ID; _b.name = name; @@ -522,9 +522,7 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = _b.addChild(childs[i].clone()); return _b; - } + } #endregion - static toString = function() { - return $"Bone {name} [{ID}]"; - } + static toString = function() { return $"Bone {name} [{ID}]"; } } \ No newline at end of file diff --git a/scripts/__node_3d_object/__node_3d_object.gml b/scripts/__node_3d_object/__node_3d_object.gml index 1c3989b55..fee5fab9a 100644 --- a/scripts/__node_3d_object/__node_3d_object.gml +++ b/scripts/__node_3d_object/__node_3d_object.gml @@ -91,15 +91,15 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr ga[1] = new BBMOD_Vec3(0, 0, size); ga[2] = new BBMOD_Vec3(0, -size, 0); - ga[3] = [ new BBMOD_Vec3(-hs + sq, 0, hs - sq), + ga[3] = [ new BBMOD_Vec3(-hs + sq, 0, hs - sq), new BBMOD_Vec3(-hs - sq, 0, hs - sq), new BBMOD_Vec3(-hs - sq, 0, hs + sq), new BBMOD_Vec3(-hs + sq, 0, hs + sq), ]; - ga[4] = [ new BBMOD_Vec3( 0, -hs + sq, hs - sq), + ga[4] = [ new BBMOD_Vec3( 0, -hs + sq, hs - sq), new BBMOD_Vec3( 0, -hs - sq, hs - sq), new BBMOD_Vec3( 0, -hs - sq, hs + sq), new BBMOD_Vec3( 0, -hs + sq, hs + sq), ]; - ga[5] = [ new BBMOD_Vec3(-hs + sq, -hs - sq, 0), + ga[5] = [ new BBMOD_Vec3(-hs + sq, -hs - sq, 0), new BBMOD_Vec3(-hs - sq, -hs - sq, 0), new BBMOD_Vec3(-hs - sq, -hs + sq, 0), new BBMOD_Vec3(-hs + sq, -hs + sq, 0), ]; @@ -108,15 +108,15 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr ga[1] = new BBMOD_Vec3(0, -size, 0); ga[2] = new BBMOD_Vec3(0, 0, -size); - ga[3] = [ new BBMOD_Vec3(-hs + sq, -hs - sq, 0), + ga[3] = [ new BBMOD_Vec3(-hs + sq, -hs - sq, 0), new BBMOD_Vec3(-hs - sq, -hs - sq, 0), new BBMOD_Vec3(-hs - sq, -hs + sq, 0), new BBMOD_Vec3(-hs + sq, -hs + sq, 0), ]; - ga[4] = [ new BBMOD_Vec3( 0, -hs + sq, -hs - sq), + ga[4] = [ new BBMOD_Vec3( 0, -hs + sq, -hs - sq), new BBMOD_Vec3( 0, -hs - sq, -hs - sq), new BBMOD_Vec3( 0, -hs - sq, -hs + sq), new BBMOD_Vec3( 0, -hs + sq, -hs + sq), ]; - ga[5] = [ new BBMOD_Vec3(-hs + sq, 0, -hs - sq), + ga[5] = [ new BBMOD_Vec3(-hs + sq, 0, -hs - sq), new BBMOD_Vec3(-hs - sq, 0, -hs - sq), new BBMOD_Vec3(-hs - sq, 0, -hs + sq), new BBMOD_Vec3(-hs + sq, 0, -hs + sq), ]; @@ -293,8 +293,8 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr var ga = []; var size = 64; - var hs = size / 2; - var sq = 8; + var hs = size / 2; + var sq = 8; #endregion #region display @@ -417,15 +417,15 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr ga[1] = new BBMOD_Vec3(0, -size, 0); ga[2] = new BBMOD_Vec3(0, 0, -size); - ga[3] = [ new BBMOD_Vec3(-hs + sq, -hs - sq, 0), + ga[3] = [ new BBMOD_Vec3(-hs + sq, -hs - sq, 0), new BBMOD_Vec3(-hs - sq, -hs - sq, 0), new BBMOD_Vec3(-hs - sq, -hs + sq, 0), new BBMOD_Vec3(-hs + sq, -hs + sq, 0), ]; - ga[4] = [ new BBMOD_Vec3( 0, -hs + sq, -hs - sq), + ga[4] = [ new BBMOD_Vec3( 0, -hs + sq, -hs - sq), new BBMOD_Vec3( 0, -hs - sq, -hs - sq), new BBMOD_Vec3( 0, -hs - sq, -hs + sq), new BBMOD_Vec3( 0, -hs + sq, -hs + sq), ]; - ga[5] = [ new BBMOD_Vec3(-hs + sq, 0, -hs - sq), + ga[5] = [ new BBMOD_Vec3(-hs + sq, 0, -hs - sq), new BBMOD_Vec3(-hs - sq, 0, -hs - sq), new BBMOD_Vec3(-hs - sq, 0, -hs + sq), new BBMOD_Vec3(-hs + sq, 0, -hs + sq), ]; diff --git a/scripts/__strandSim/__strandSim.yy b/scripts/__strandSim/__strandSim.yy index 69f11ee59..9be78d4e2 100644 --- a/scripts/__strandSim/__strandSim.yy +++ b/scripts/__strandSim/__strandSim.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "strandSim", - "path": "folders/nodes/data/strandSim.yy", + "path": "folders/nodes/data/simulation/strandSim.yy", }, } \ No newline at end of file diff --git a/scripts/_node_VFX_effector/_node_VFX_effector.yy b/scripts/_node_VFX_effector/_node_VFX_effector.yy index 7b2570752..09313c95c 100644 --- a/scripts/_node_VFX_effector/_node_VFX_effector.yy +++ b/scripts/_node_VFX_effector/_node_VFX_effector.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "VFX", - "path": "folders/nodes/data/VFX.yy", + "path": "folders/nodes/data/simulation/VFX.yy", }, } \ No newline at end of file diff --git a/scripts/_node_VFX_spawner/_node_VFX_spawner.yy b/scripts/_node_VFX_spawner/_node_VFX_spawner.yy index cc08e5a8c..42d977929 100644 --- a/scripts/_node_VFX_spawner/_node_VFX_spawner.yy +++ b/scripts/_node_VFX_spawner/_node_VFX_spawner.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "VFX", - "path": "folders/nodes/data/VFX.yy", + "path": "folders/nodes/data/simulation/VFX.yy", }, } \ No newline at end of file diff --git a/scripts/_node_fluid_nodes/_node_fluid_nodes.gml b/scripts/_node_fluid_nodes/_node_fluid_nodes.gml index 4f31df637..be4083c95 100644 --- a/scripts/_node_fluid_nodes/_node_fluid_nodes.gml +++ b/scripts/_node_fluid_nodes/_node_fluid_nodes.gml @@ -4,7 +4,7 @@ function Node_Fluid(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { static updateForward = function(frame = PROJECT.animator.current_frame, _update = true) { if(_update) update(frame); - print("Update " + string(frame) + ": " + name); + //print($"Update {frame}: {name}"); var outJunc = outputs[| 0]; for( var i = 0; i < ds_list_size(outJunc.value_to); i++ ) { diff --git a/scripts/_node_fluid_nodes/_node_fluid_nodes.yy b/scripts/_node_fluid_nodes/_node_fluid_nodes.yy index d64dd08c6..5ab5a8cde 100644 --- a/scripts/_node_fluid_nodes/_node_fluid_nodes.yy +++ b/scripts/_node_fluid_nodes/_node_fluid_nodes.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "fluidSim", - "path": "folders/nodes/data/fluidSim.yy", + "path": "folders/nodes/data/simulation/fluidSim.yy", }, } \ No newline at end of file diff --git a/scripts/_node_strand_affector/_node_strand_affector.yy b/scripts/_node_strand_affector/_node_strand_affector.yy index 378d0d825..6578bc661 100644 --- a/scripts/_node_strand_affector/_node_strand_affector.yy +++ b/scripts/_node_strand_affector/_node_strand_affector.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "strandSim", - "path": "folders/nodes/data/strandSim.yy", + "path": "folders/nodes/data/simulation/strandSim.yy", }, } \ No newline at end of file diff --git a/scripts/dynaSurf/dynaSurf.gml b/scripts/dynaSurf/dynaSurf.gml index ea66c4546..f347ef827 100644 --- a/scripts/dynaSurf/dynaSurf.gml +++ b/scripts/dynaSurf/dynaSurf.gml @@ -1,6 +1,14 @@ function DynaSurf() constructor { surfaces = []; + static getAbsolutePos = function(_x, _y, _xs = 1, _ys = 1, _rot = 0) { + var _w = getWidth() * _xs; + var _h = getHeight() * _ys; + var _px = point_rotate(0, 0, _w / 2, _h / 2, _rot); + + return [ _x - _px[0], _y - _px[1] ]; + } + static getWidth = function() { return is_surface(surfaces[0])? surface_get_width(surfaces[0]) : 1; } static getHeight = function() { return is_surface(surfaces[0])? surface_get_height(surfaces[0]) : 1; } @@ -31,15 +39,18 @@ function Compute_DynaSurf() : DynaSurf() constructor { widthFn = noone; heightFn = noone; + useAbsolutePose = false; + static getWidth = function() { return widthFn? widthFn.eval() : 1; } static getHeight = function() { return heightFn? heightFn.eval() : 1; } static draw = function(_x = 0, _y = 0, _sx = 1, _sy = 1, _ang = 0, _col = c_white, _alp = 1) { if(drawFn == noone) return; + var pos = useAbsolutePose? getAbsolutePos(_x, _y, _xs, _ys, _rot) : [ _x, _y ]; var params = { - x: _x, - y: _y, + x: pos[0], + y: pos[1], sx: _sx, sy: _sy, angle: _ang, diff --git a/scripts/dynaSurf_iso/dynaSurf_iso.gml b/scripts/dynaSurf_iso/dynaSurf_iso.gml index 2e3c90c97..bea5ec590 100644 --- a/scripts/dynaSurf_iso/dynaSurf_iso.gml +++ b/scripts/dynaSurf_iso/dynaSurf_iso.gml @@ -4,12 +4,8 @@ function DynaSurf_iso() : DynaSurf() constructor { static getSurface = function(_rot) {} static draw = function(_x = 0, _y = 0, _xs = 1, _ys = 1, _rot = 0, _col = c_white, _alp = 1) { - var _surf = getSurface(_rot); - var _w = getWidth() * _xs; - var _h = getHeight() * _ys; - var _px = point_rotate(0, 0, _w / 2, _h / 2, _rot); - - draw_surface_ext_safe(_surf, _x - _px[0], _y - _px[1], _xs, _ys, 0, _col, _alp); + var _pos = getAbsolutePos(_x, _y, _xs, _ys, _rot); + draw_surface_ext_safe(_surf, _pos[0], _pos[1], _xs, _ys, 0, _col, _alp); } static drawTile = function(_x = 0, _y = 0, _xs = 1, _ys = 1, _col = c_white, _alp = 1) { diff --git a/scripts/node_3d_mesh_cylinder/node_3d_mesh_cylinder.gml b/scripts/node_3d_mesh_cylinder/node_3d_mesh_cylinder.gml index 3a42aa20e..a39ee5c97 100644 --- a/scripts/node_3d_mesh_cylinder/node_3d_mesh_cylinder.gml +++ b/scripts/node_3d_mesh_cylinder/node_3d_mesh_cylinder.gml @@ -30,7 +30,7 @@ function Node_3D_Mesh_Cylinder(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _g var _smt = _data[in_mesh + 4]; var object = getObject(_array_index); - object.checkParameter({sides: _side, smooth: _smt}); + object.checkParameter({ sides: _side, smooth: _smt }); object.materials = [ _mat_top, _mat_bot, _mat_sid ]; setTransform(object, _data); diff --git a/scripts/node_3d_mesh_extrude/node_3d_mesh_extrude.gml b/scripts/node_3d_mesh_extrude/node_3d_mesh_extrude.gml index 013174981..4ce5f490a 100644 --- a/scripts/node_3d_mesh_extrude/node_3d_mesh_extrude.gml +++ b/scripts/node_3d_mesh_extrude/node_3d_mesh_extrude.gml @@ -26,7 +26,7 @@ function Node_3D_Mesh_Extrude(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _gr var _surf = _mat == noone? noone : _mat.surface; var object = getObject(_array_index); - object.checkParameter({surface: _surf, height: _hght, smooth: _smt}, _updt); + object.checkParameter({ surface: _surf, height: _hght, smooth: _smt }, _updt); object.materials = [ _mat ]; setTransform(object, _data); diff --git a/scripts/node_3d_mesh_icosphere/node_3d_mesh_icosphere.gml b/scripts/node_3d_mesh_icosphere/node_3d_mesh_icosphere.gml index 429a4e059..79d25010f 100644 --- a/scripts/node_3d_mesh_icosphere/node_3d_mesh_icosphere.gml +++ b/scripts/node_3d_mesh_icosphere/node_3d_mesh_icosphere.gml @@ -22,7 +22,7 @@ function Node_3D_Mesh_Sphere_Ico(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, var _smt = _data[in_mesh + 2]; var object = getObject(_array_index); - object.checkParameter({level: _sub, smooth: _smt}); + object.checkParameter({ level: _sub, smooth: _smt }); object.materials = [ _mat ]; setTransform(object, _data); 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 03e8d6179..7deeb9696 100644 --- a/scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml +++ b/scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml @@ -1,4 +1,4 @@ -function Node_create_3D_Obj(_x, _y, _group = noone) { +function Node_create_3D_Obj(_x, _y, _group = noone) { #region var path = ""; if(!LOADING && !APPENDING && !CLONING) { path = get_open_filename(".obj", ""); @@ -9,15 +9,15 @@ function Node_create_3D_Obj(_x, _y, _group = noone) { var node = new Node_3D_Mesh_Obj(_x, _y, _group); node.setPath(path); return node; -} +} #endregion -function Node_create_3D_Obj_path(_x, _y, path) { +function Node_create_3D_Obj_path(_x, _y, path) { #region if(!file_exists(path)) return noone; var node = new Node_3D_Mesh_Obj(_x, _y, PANEL_GRAPH.getCurrentContext()); node.setPath(path); return node; -} +} #endregion function Node_3D_Mesh_Obj(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group) constructor { name = "3D Obj"; @@ -121,8 +121,8 @@ function Node_3D_Mesh_Obj(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group) if(array_length(materialNames)) materials = readMtl(_pathMtl); else { - materialNames = ["Material"]; - materialIndex = [0]; + materialNames = [ "Material" ]; + materialIndex = [ 0 ]; materials = [ new MTLmaterial("Material") ]; } diff --git a/scripts/node_3d_mesh_plane/node_3d_mesh_plane.gml b/scripts/node_3d_mesh_plane/node_3d_mesh_plane.gml index 738fff475..9fedd17a9 100644 --- a/scripts/node_3d_mesh_plane/node_3d_mesh_plane.gml +++ b/scripts/node_3d_mesh_plane/node_3d_mesh_plane.gml @@ -20,7 +20,7 @@ function Node_3D_Mesh_Plane(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _grou var _axs = _data[in_mesh + 1]; var object = getObject(_array_index); - object.checkParameter({normal: _axs}); + object.checkParameter({ normal: _axs }); object.materials = [ _mat ]; setTransform(object, _data); diff --git a/scripts/node_3d_mesh_uvsphere/node_3d_mesh_uvsphere.gml b/scripts/node_3d_mesh_uvsphere/node_3d_mesh_uvsphere.gml index e86020fb7..10c467f9a 100644 --- a/scripts/node_3d_mesh_uvsphere/node_3d_mesh_uvsphere.gml +++ b/scripts/node_3d_mesh_uvsphere/node_3d_mesh_uvsphere.gml @@ -25,7 +25,7 @@ function Node_3D_Mesh_Sphere_UV(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _ var _smt = _data[in_mesh + 3]; var object = getObject(_array_index); - object.checkParameter({hori: _sideH, vert: _sideV, smooth: _smt}); + object.checkParameter({ hori: _sideH, vert: _sideV, smooth: _smt }); object.materials = [ _mat ]; setTransform(object, _data); diff --git a/scripts/node_FXAA/node_FXAA.gml b/scripts/node_FXAA/node_FXAA.gml index 40090d820..875fde906 100644 --- a/scripts/node_FXAA/node_FXAA.gml +++ b/scripts/node_FXAA/node_FXAA.gml @@ -15,7 +15,7 @@ function Node_FXAA(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons attribute_surface_depth(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region surface_set_shader(_outSurf, sh_FXAA); gpu_set_tex_filter(true); shader_set_f("dimension", surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0])); @@ -24,5 +24,5 @@ function Node_FXAA(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons surface_reset_shader(); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_PCX_condition/node_PCX_condition.gml b/scripts/node_PCX_condition/node_PCX_condition.gml new file mode 100644 index 000000000..db1212320 --- /dev/null +++ b/scripts/node_PCX_condition/node_PCX_condition.gml @@ -0,0 +1,24 @@ +function Node_PCX_Condition(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor { + name = "Condition"; + + inputs[| 0] = nodeValue("Condition", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + + inputs[| 1] = nodeValue("True", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + + inputs[| 2] = nodeValue("False", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone); + + 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 _fn = new __funcIf(); + _fn.condition = _cond; + _fn.if_true = _true; + _fn.if_false = _fals; + + outputs[| 0].setValue(_fn); + } +} \ No newline at end of file diff --git a/scripts/node_PCX_condition/node_PCX_condition.yy b/scripts/node_PCX_condition/node_PCX_condition.yy new file mode 100644 index 000000000..8ce709317 --- /dev/null +++ b/scripts/node_PCX_condition/node_PCX_condition.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_PCX_condition", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "flow control", + "path": "folders/nodes/data/PCX/flow control.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_PCX_condition/node_outline.yy b/scripts/node_PCX_condition/node_outline.yy new file mode 100644 index 000000000..86468bc09 --- /dev/null +++ b/scripts/node_PCX_condition/node_outline.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "process", + "path": "folders/nodes/data/process.yy", + }, + "resourceVersion": "1.0", + "name": "node_outline", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/scripts/node_VFX_effect_accelerate/node_VFX_effect_accelerate.yy b/scripts/node_VFX_effect_accelerate/node_VFX_effect_accelerate.yy index 8685ccf8a..729b99af8 100644 --- a/scripts/node_VFX_effect_accelerate/node_VFX_effect_accelerate.yy +++ b/scripts/node_VFX_effect_accelerate/node_VFX_effect_accelerate.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "VFX", - "path": "folders/nodes/data/VFX.yy", + "path": "folders/nodes/data/simulation/VFX.yy", }, } \ No newline at end of file diff --git a/scripts/node_VFX_effect_attract/node_VFX_effect_attract.yy b/scripts/node_VFX_effect_attract/node_VFX_effect_attract.yy index 024640a57..67ce113b7 100644 --- a/scripts/node_VFX_effect_attract/node_VFX_effect_attract.yy +++ b/scripts/node_VFX_effect_attract/node_VFX_effect_attract.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "VFX", - "path": "folders/nodes/data/VFX.yy", + "path": "folders/nodes/data/simulation/VFX.yy", }, } \ No newline at end of file diff --git a/scripts/node_VFX_effect_destroy/node_VFX_effect_destroy.yy b/scripts/node_VFX_effect_destroy/node_VFX_effect_destroy.yy index 6f16f7679..4ea9d245d 100644 --- a/scripts/node_VFX_effect_destroy/node_VFX_effect_destroy.yy +++ b/scripts/node_VFX_effect_destroy/node_VFX_effect_destroy.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "VFX", - "path": "folders/nodes/data/VFX.yy", + "path": "folders/nodes/data/simulation/VFX.yy", }, } \ No newline at end of file diff --git a/scripts/node_VFX_effect_repel/node_VFX_effect_repel.yy b/scripts/node_VFX_effect_repel/node_VFX_effect_repel.yy index 48fda0528..2a5c1c30e 100644 --- a/scripts/node_VFX_effect_repel/node_VFX_effect_repel.yy +++ b/scripts/node_VFX_effect_repel/node_VFX_effect_repel.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "VFX", - "path": "folders/nodes/data/VFX.yy", + "path": "folders/nodes/data/simulation/VFX.yy", }, } \ No newline at end of file diff --git a/scripts/node_VFX_effect_turbulence/node_VFX_effect_turbulence.yy b/scripts/node_VFX_effect_turbulence/node_VFX_effect_turbulence.yy index 24038d207..141e1fb38 100644 --- a/scripts/node_VFX_effect_turbulence/node_VFX_effect_turbulence.yy +++ b/scripts/node_VFX_effect_turbulence/node_VFX_effect_turbulence.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "VFX", - "path": "folders/nodes/data/VFX.yy", + "path": "folders/nodes/data/simulation/VFX.yy", }, } \ No newline at end of file diff --git a/scripts/node_VFX_effect_vortex/node_VFX_effect_vortex.yy b/scripts/node_VFX_effect_vortex/node_VFX_effect_vortex.yy index 583a5f3b8..468860ea2 100644 --- a/scripts/node_VFX_effect_vortex/node_VFX_effect_vortex.yy +++ b/scripts/node_VFX_effect_vortex/node_VFX_effect_vortex.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "VFX", - "path": "folders/nodes/data/VFX.yy", + "path": "folders/nodes/data/simulation/VFX.yy", }, } \ No newline at end of file diff --git a/scripts/node_VFX_effect_wind/node_VFX_effect_wind.yy b/scripts/node_VFX_effect_wind/node_VFX_effect_wind.yy index b9f644d94..f0e6826ba 100644 --- a/scripts/node_VFX_effect_wind/node_VFX_effect_wind.yy +++ b/scripts/node_VFX_effect_wind/node_VFX_effect_wind.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "VFX", - "path": "folders/nodes/data/VFX.yy", + "path": "folders/nodes/data/simulation/VFX.yy", }, } \ No newline at end of file diff --git a/scripts/node_VFX_effector/node_VFX_effector.yy b/scripts/node_VFX_effector/node_VFX_effector.yy index c5dc47615..9404e5812 100644 --- a/scripts/node_VFX_effector/node_VFX_effector.yy +++ b/scripts/node_VFX_effector/node_VFX_effector.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "VFX", - "path": "folders/nodes/data/VFX.yy", + "path": "folders/nodes/data/simulation/VFX.yy", }, } \ No newline at end of file diff --git a/scripts/node_VFX_group/node_VFX_group.yy b/scripts/node_VFX_group/node_VFX_group.yy index d04c0ae8d..fdb1ea033 100644 --- a/scripts/node_VFX_group/node_VFX_group.yy +++ b/scripts/node_VFX_group/node_VFX_group.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "VFX", - "path": "folders/nodes/data/VFX.yy", + "path": "folders/nodes/data/simulation/VFX.yy", }, } \ No newline at end of file diff --git a/scripts/node_VFX_override/node_VFX_override.yy b/scripts/node_VFX_override/node_VFX_override.yy index 00924dc23..53f92ee12 100644 --- a/scripts/node_VFX_override/node_VFX_override.yy +++ b/scripts/node_VFX_override/node_VFX_override.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "VFX", - "path": "folders/nodes/data/VFX.yy", + "path": "folders/nodes/data/simulation/VFX.yy", }, } \ No newline at end of file diff --git a/scripts/node_VFX_renderer/node_VFX_renderer.yy b/scripts/node_VFX_renderer/node_VFX_renderer.yy index 8295d743c..8c971a29f 100644 --- a/scripts/node_VFX_renderer/node_VFX_renderer.yy +++ b/scripts/node_VFX_renderer/node_VFX_renderer.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "VFX", - "path": "folders/nodes/data/VFX.yy", + "path": "folders/nodes/data/simulation/VFX.yy", }, } \ No newline at end of file diff --git a/scripts/node_VFX_spawner/node_VFX_spawner.yy b/scripts/node_VFX_spawner/node_VFX_spawner.yy index 818ae4363..75444f350 100644 --- a/scripts/node_VFX_spawner/node_VFX_spawner.yy +++ b/scripts/node_VFX_spawner/node_VFX_spawner.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "VFX", - "path": "folders/nodes/data/VFX.yy", + "path": "folders/nodes/data/simulation/VFX.yy", }, } \ No newline at end of file diff --git a/scripts/node_VFX_variable/node_VFX_variable.yy b/scripts/node_VFX_variable/node_VFX_variable.yy index d878f2104..1f115d64d 100644 --- a/scripts/node_VFX_variable/node_VFX_variable.yy +++ b/scripts/node_VFX_variable/node_VFX_variable.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "VFX", - "path": "folders/nodes/data/VFX.yy", + "path": "folders/nodes/data/simulation/VFX.yy", }, } \ No newline at end of file diff --git a/scripts/node_alpha_cutoff/node_alpha_cutoff.gml b/scripts/node_alpha_cutoff/node_alpha_cutoff.gml index 3ef521214..0a5fbe6cd 100644 --- a/scripts/node_alpha_cutoff/node_alpha_cutoff.gml +++ b/scripts/node_alpha_cutoff/node_alpha_cutoff.gml @@ -23,7 +23,7 @@ function Node_Alpha_Cutoff(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro attribute_surface_depth(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region surface_set_target(_outSurf); DRAW_CLEAR BLEND_OVERRIDE; @@ -39,5 +39,5 @@ function Node_Alpha_Cutoff(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro _outSurf = mask_apply(_data[0], _outSurf, _data[2], _data[3]); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_alpha_hash/node_alpha_hash.gml b/scripts/node_alpha_hash/node_alpha_hash.gml index bf8a86f8a..824d72a33 100644 --- a/scripts/node_alpha_hash/node_alpha_hash.gml +++ b/scripts/node_alpha_hash/node_alpha_hash.gml @@ -20,7 +20,7 @@ function Node_Alpha_Hash(_x, _y, _group = noone) : Node_Processor(_x, _y, _group attribute_surface_depth(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region surface_set_target(_outSurf); DRAW_CLEAR BLEND_OVERRIDE; @@ -35,5 +35,5 @@ function Node_Alpha_Hash(_x, _y, _group = noone) : Node_Processor(_x, _y, _group surface_reset_target(); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_alpha_to_grey/node_alpha_to_grey.gml b/scripts/node_alpha_to_grey/node_alpha_to_grey.gml index 9ac49a1af..e138e2f5b 100644 --- a/scripts/node_alpha_to_grey/node_alpha_to_grey.gml +++ b/scripts/node_alpha_to_grey/node_alpha_to_grey.gml @@ -14,16 +14,11 @@ function Node_Alpha_Grey(_x, _y, _group = noone) : Node_Processor(_x, _y, _group attribute_surface_depth(); - static processData = function(_outSurf, _data, _output_index, _array_index) { - surface_set_target(_outSurf); - DRAW_CLEAR - BLEND_OVERRIDE; - shader_set(sh_alpha_grey); + static processData = function(_outSurf, _data, _output_index, _array_index) { #region + surface_set_shader(_outSurf, sh_alpha_grey); draw_surface_safe(_data[0], 0, 0); - shader_reset(); - BLEND_NORMAL; - surface_reset_target(); + surface_reset_shader(); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_armature/node_armature.gml b/scripts/node_armature/node_armature.gml index 0fd70d13c..ad18534ae 100644 --- a/scripts/node_armature/node_armature.gml +++ b/scripts/node_armature/node_armature.gml @@ -7,7 +7,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo //inputs[| 0] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0); - bone_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { + bone_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { #region var _b = attributes.bones; if(_b == noone) return 0; var amo = _b.childCount(); @@ -124,13 +124,13 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo } return bh; - }) + }); #endregion input_display_list = [ bone_renderer, ]; - static createBone = function(parent, distance, direction) { + static createBone = function(parent, distance, direction) { #region recordAction(ACTION_TYPE.struct_modify, attributes.bones, attributes.bones.serialize()); var bone = new __Bone(parent, distance, direction,,, self); @@ -139,10 +139,11 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo if(parent == attributes.bones) bone.parent_anchor = false; return bone; - } + } #endregion outputs[| 0] = nodeValue("Armature", self, JUNCTION_CONNECT.output, VALUE_TYPE.armature, noone); + #region ++++ attributes ++++ attributes.bones = new __Bone(,,,,, self); attributes.bones.name = "Main"; attributes.bones.is_main = true; @@ -160,6 +161,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo new scrollBox(["Octahedral", "Stick"], function(ind) { attributes.display_bone = ind; })]); + #endregion tools = [ new NodeTool( [ "Move", "Scale" ], [ THEME.bone_tool_move, THEME.bone_tool_scale ] ), @@ -186,7 +188,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo moving = false; scaling = false; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var mx = (_mx - _x) / _s; var my = (_my - _y) / _s; @@ -195,7 +197,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo var _b = attributes.bones; - if(builder_bone != noone) { + if(builder_bone != noone) { #region anchor_selecting = _b.draw(attributes, false, _x, _y, _s, _mx, _my, anchor_selecting); var dir = point_direction(builder_sx, builder_sy, smx, smy); @@ -264,7 +266,8 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo } triggerRender(); - } else if(ik_dragging != noone) { + #endregion + } else if(ik_dragging != noone) { #region anchor_selecting = _b.draw(attributes, active * 0b100, _x, _y, _s, _mx, _my, anchor_selecting, ik_dragging); if(anchor_selecting != noone && anchor_selecting[1] == 2) { @@ -309,9 +312,10 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo } triggerRender(); + #endregion } - if(isUsingTool("Move")) { + if(isUsingTool("Move")) { #region _b.draw(attributes, false, _x, _y, _s, _mx, _my); var bbox = _b.bbox(); @@ -357,7 +361,8 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo draw_rectangle(x0, y0, x1, y1, true); draw_set_alpha(1); } - } else if(isUsingTool("Scale")) { + #endregion + } else if(isUsingTool("Scale")) { #region _b.draw(attributes, false, _x, _y, _s, _mx, _my); var bbox = _b.bbox(); @@ -423,7 +428,8 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo recordAction(ACTION_TYPE.struct_modify, attributes.bones, attributes.bones.serialize()); } } - } else if(isUsingTool("Add bones")) { // builder + #endregion + } else if(isUsingTool("Add bones")) { #region // builder if(builder_bone == noone) anchor_selecting = _b.draw(attributes, active * 0b111, _x, _y, _s, _mx, _my, anchor_selecting); @@ -464,7 +470,8 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo draw_sprite_ext(THEME.bone_tool_add, 1, _mx + 24, _my + 24, 1, 1, 0, c_white, 1); } else if(anchor_selecting[1] == 2) draw_sprite_ext(THEME.bone_tool_add, 0, _mx + 24, _my + 24, 1, 1, 0, c_white, 1); - } else if(isUsingTool("Remove bones")) { //remover + #endregion + } else if(isUsingTool("Remove bones")) { #region //remover anchor_selecting = _b.draw(attributes, active * 0b100, _x, _y, _s, _mx, _my, anchor_selecting); if(anchor_selecting != noone && anchor_selecting[1] == 2 && anchor_selecting[0].parent != noone && mouse_press(mb_left, active)) { @@ -485,7 +492,8 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo if(anchor_selecting != noone) draw_sprite_ext(THEME.bone_tool_remove, 1, _mx + 24, _my + 24, 1, 1, 0, c_white, 1); - } else if(isUsingTool("Detach bones")) { //detach + #endregion + } else if(isUsingTool("Detach bones")) { #region //detach if(builder_bone == noone) anchor_selecting = _b.draw(attributes, active * 0b100, _x, _y, _s, _mx, _my, anchor_selecting); @@ -506,14 +514,16 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo builder_my = my; UNDO_HOLDING = true; } - } else if(isUsingTool("IK")) { //IK + #endregion + } else if(isUsingTool("IK")) { #region //IK if(ik_dragging == noone) anchor_selecting = _b.draw(attributes, active * 0b100, _x, _y, _s, _mx, _my, anchor_selecting); if(anchor_selecting != noone && anchor_selecting[1] == 2 && mouse_press(mb_left, active)) { ik_dragging = anchor_selecting[0]; } - } else { //mover + #endregion + } else { #region //mover if(builder_bone == noone) anchor_selecting = _b.draw(attributes, active * 0b111, _x, _y, _s, _mx, _my, anchor_selecting); @@ -545,18 +555,19 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo UNDO_HOLDING = true; } + #endregion } - } + } #endregion static step = function() { } - static update = function(frame = PROJECT.animator.current_frame) { + static update = function(frame = PROJECT.animator.current_frame) { #region outputs[| 0].setValue(attributes.bones); - } + } #endregion - static getPreviewBoundingBox = function() { + static getPreviewBoundingBox = function() { #region var minx = 9999999; var miny = 9999999; var maxx = -9999999; @@ -587,25 +598,25 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo if(minx == 9999999) return noone; return BBOX().fromPoints(minx, miny, maxx, maxy); - } + } #endregion static attributeSerialize = function() { return {}; } static attributeDeserialize = function(attr) {} - static doSerialize = function(_map) { + static doSerialize = function(_map) { #region _map.bones = attributes.bones.serialize(); - } + } #endregion - static postDeserialize = function() { + static postDeserialize = function() { #region if(!struct_has(load_map, "bones")) return; attributes.bones = new __Bone(,,,,, self); attributes.bones.deserialize(load_map.bones, self); attributes.bones.connect(); - } + } #endregion - static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region var bbox = drawGetBbox(xx, yy, _s); draw_sprite_fit(s_node_armature_create, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); - } + } #endregion } diff --git a/scripts/node_armature_bind/node_armature_bind.gml b/scripts/node_armature_bind/node_armature_bind.gml index f3a3e9bb5..645bb48d2 100644 --- a/scripts/node_armature_bind/node_armature_bind.gml +++ b/scripts/node_armature_bind/node_armature_bind.gml @@ -219,7 +219,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr index--; var _bx = _x + _w - 24; var _cy = ly + index * (lh + 4); - + if(point_in_circle(_m[0], _m[1], _bx, _cy + lh / 2, 16)) { draw_sprite_ui_uniform(THEME.icon_delete, 3, _bx, _cy + lh / 2, 1, COLORS._main_value_negative); @@ -256,12 +256,12 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr hold_visibility = !_vis[index]; if(mouse_click(mb_left, _focus) && _vis[index] != hold_visibility) { - _vis[@ index] = hold_visibility; + _vis[index] = hold_visibility; doUpdate(); } } else draw_sprite_ui_uniform(THEME.junc_visible, vis, _bx, _cy + lh / 2, 1, COLORS._main_icon, 0.5 + 0.5 * vis); - + _bx += 24 + 8; if(point_in_circle(_m[0], _m[1], _bx, _cy + lh / 2, 12)) { draw_sprite_ui_uniform(THEME.cursor_select, sel, _bx, _cy + lh / 2, 1, c_white); @@ -270,7 +270,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr hold_select = !_sel[index]; if(mouse_click(mb_left, _focus) && _sel[index] != hold_select) - _sel[@ index] = hold_select; + _sel[index] = hold_select; } else draw_sprite_ui_uniform(THEME.cursor_select, sel, _bx, _cy + lh / 2, 1, COLORS._main_icon, 0.5 + 0.5 * sel); @@ -322,7 +322,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr } #endregion - if(layer_dragging != noone && mouse_release(mb_left)) { + if(layer_dragging != noone && mouse_release(mb_left)) { #region if(layer_dragging != hoverIndex && hoverIndex != noone) { var index = input_fix_len + layer_dragging * data_length; var targt = input_fix_len + hoverIndex * data_length; @@ -351,7 +351,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr } layer_dragging = noone; - } + } #endregion layer_renderer.h = bh + ui(40) + sh; return layer_renderer.h; @@ -417,7 +417,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr temp_surface = [ surface_create(1, 1), surface_create(1, 1) ]; surf_dragging = -1; - drag_type = 0; + drag_type = 0; dragging_sx = 0; dragging_sy = 0; dragging_mx = 0; @@ -435,16 +435,16 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr bone = noone; surface_selecting = noone; - static getInputAmount = function() { + static getInputAmount = function() { #region return input_fix_len + (ds_list_size(inputs) - input_fix_len) / data_length; - } + } #endregion - static getInputIndex = function(index) { + static getInputIndex = function(index) { #region if(index < input_fix_len) return index; return input_fix_len + (index - input_fix_len) * data_length; - } + } #endregion - static setHeight = function() { + static setHeight = function() { #region var _hi = ui(32); var _ho = ui(32); @@ -457,15 +457,14 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr _ho += 24; h = max(min_h, (preview_surface && previewable)? 128 : 0, _hi, _ho); - } + } #endregion static onValueFromUpdate = function(index) { #region if(LOADING || APPENDING) return; if(index + data_length >= ds_list_size(inputs)) createNewInput(); - #endregion - } + } #endregion static setBone = function() { #region ds_map_clear(boneMap); @@ -488,8 +487,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr } ds_stack_destroy(_bst); - #endregion - } + } #endregion static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var dim = inputs[| 0].getValue(); @@ -521,7 +519,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr var y0 = _y; var y1 = _y + hh * _s; - if(surf_dragging > -1) { + if(surf_dragging > -1) { #region var _surf = current_data[surf_dragging + 0]; var _tran = current_data[surf_dragging + 1]; var _aang = current_data[surf_dragging + 2]; @@ -529,6 +527,8 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr var _asca = current_data[surf_dragging + 4]; var _psca = current_data[surf_dragging + 5]; + _tran = array_clone(_tran); + var _bone = inputs[| surf_dragging].extra_data.bone_id; _bone = boneMap[? _bone]; @@ -584,7 +584,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr surf_dragging = -1; UNDO_HOLDING = false; } - } + } #endregion var hovering = noone; var hovering_type = noone; @@ -594,7 +594,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr var amo = (ds_list_size(inputs) - input_fix_len) / data_length; var anchors = array_create(ds_list_size(inputs)); - for(var i = 0; i < amo; i++) { + for(var i = 0; i < amo; i++) { #region var index = input_fix_len + i * data_length; var _surf = array_safe_get(current_data, index); if(!_surf || is_array(_surf)) continue; @@ -652,9 +652,9 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr rot: _rot, } - } + } #endregion - for(var i = 0; i < amo; i++) { + for(var i = 0; i < amo; i++) { #region var vis = array_safe_get(_vis, i); var sel = array_safe_get(_sel, i); if(!vis) continue; @@ -695,7 +695,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr hovering = index; hovering_type = NODE_COMPOSE_DRAG.move; } - } + } #endregion if(mouse_press(mb_left, active)) surface_selecting = hovering; @@ -724,7 +724,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr draw_line(a.d3[0], a.d3[1], a.d2[0], a.d2[1]); } - if(hovering != noone && hovering_type != noone && mouse_press(mb_left, active)) { + if(hovering != noone && hovering_type != noone && mouse_press(mb_left, active)) { #region var _tran = current_data[hovering + 1]; var _aang = current_data[hovering + 2]; var _asca = current_data[hovering + 3]; @@ -751,16 +751,15 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr dragging_mx = (a.d0[0] + a.d3[0]) / 2; dragging_my = (a.d0[1] + a.d3[1]) / 2; } - } + } #endregion if(layer_remove > -1) { deleteLayer(layer_remove); layer_remove = -1; } - #endregion - } + } #endregion - static step = function() { + static step = function() { #region var _dim_type = getSingleValue(1); inputs[| 2].setVisible(_dim_type == COMPOSE_OUTPUT_SCALING.constant); @@ -768,9 +767,9 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| i + 3].setVisible(current_data[i + 2]); inputs[| i + 5].setVisible(current_data[i + 4]); } - } + } #endregion - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region if(_output_index == 1) return atlas_data; if(_output_index == 2) return bind_data; if(_output_index == 0 && _array_index == 0) { @@ -872,9 +871,9 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr surface_reset_shader(); return _outSurf; - } + } #endregion - static resetTransform = function(surfIndex) { + static resetTransform = function(surfIndex) { #region var _bind = inputs[| 2].getValue(); var use_data = _bind != noone; @@ -895,26 +894,26 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr var _tr = [ _cx - _anc.x, _cy - _anc.y, _rot, 1, 1 ]; inputs[| surfIndex + 1].setValue(_tr); - } + } #endregion - static attributeSerialize = function() { + static attributeSerialize = function() { #region var att = {}; att.layer_visible = attributes.layer_visible; att.layer_selectable = attributes.layer_selectable; return att; - } + } #endregion - static attributeDeserialize = function(attr) { + static attributeDeserialize = function(attr) { #region if(struct_has(attr, "layer_visible")) attributes.layer_visible = attr.layer_visible; if(struct_has(attr, "layer_selectable")) attributes.layer_selectable = attr.layer_selectable; - } + } #endregion - static doApplyDeserialize = function() { + static doApplyDeserialize = function() { #region setBone(); - } + } #endregion } diff --git a/scripts/node_armature_pose/node_armature_pose.gml b/scripts/node_armature_pose/node_armature_pose.gml index 5bc6d3a1b..45f165e81 100644 --- a/scripts/node_armature_pose/node_armature_pose.gml +++ b/scripts/node_armature_pose/node_armature_pose.gml @@ -31,7 +31,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const attributes.display_bone = ind; })]); - static createNewInput = function(bone = noone) { + static createNewInput = function(bone = noone) { #region var index = ds_list_size(inputs); inputs[| index] = nodeValue(bone != noone? bone.name : "bone", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 1 ] ) @@ -44,7 +44,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const array_push(input_display_list, index); return inputs[| index]; - } + } #endregion static setBone = function() { #region //print("Setting dem bones..."); @@ -97,8 +97,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const input_display_list = _input_display_list; //print(_input_display_list); - #endregion - } + } #endregion tools = [ @@ -114,7 +113,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const posing_mx = 0; posing_my = 0; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _b = outputs[| 0].getValue(); if(_b == noone) return; @@ -126,7 +125,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const var smx = value_snap(mx, _snx); var smy = value_snap(my, _sny); - if(posing_bone) { + if(posing_bone) { #region if(posing_type == 0 && posing_bone.parent) { //move var ang = posing_bone.parent.pose_angle; var pp = point_rotate(smx - posing_mx, smy - posing_my, 0, 0, -ang); @@ -170,9 +169,9 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const posing_type = noone; UNDO_HOLDING = false; } - } + } #endregion - if(anchor_selecting != noone && mouse_press(mb_left, active)) { + if(anchor_selecting != noone && mouse_press(mb_left, active)) { #region if(anchor_selecting[1] == 0 || anchor_selecting[0].IKlength) { // move posing_bone = anchor_selecting[0]; if(!ds_map_exists(boneMap, posing_bone.ID)) @@ -220,11 +219,11 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const posing_mx = mx; posing_my = my; } - } - } + } #endregion + } #endregion bone_prev = noone; - static step = function() { + static step = function() { #region var _b = inputs[| 0].getValue(); if(_b == noone) return; if(bone_prev != _b) { @@ -235,9 +234,9 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const var _boneCount = ds_list_size(inputs) - input_fix_len; if(_boneCount != _b.childCount()) setBone(); - } + } #endregion - static update = function(frame = PROJECT.animator.current_frame) { + static update = function(frame = PROJECT.animator.current_frame) { #region var _b = inputs[| 0].getValue(); if(_b == noone) return; @@ -272,9 +271,9 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const _bone_pose.setPose(); outputs[| 0].setValue(_bone_pose); - } + } #endregion - static getPreviewBoundingBox = function() { + static getPreviewBoundingBox = function() { #region var minx = 9999999; var miny = 9999999; var maxx = -9999999; @@ -307,9 +306,9 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const if(minx == 9999999) return noone; return BBOX().fromPoints(minx, miny, maxx, maxy); - } + } #endregion - static doApplyDeserialize = function() { + 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"); @@ -318,11 +317,11 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const } setBone(); - } + } #endregion - static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region var bbox = drawGetBbox(xx, yy, _s); draw_sprite_fit(s_node_armature_pose, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); - } + } #endregion } diff --git a/scripts/node_armature_sample/node_armature_sample.gml b/scripts/node_armature_sample/node_armature_sample.gml index c7df8d721..ca4c0b7f8 100644 --- a/scripts/node_armature_sample/node_armature_sample.gml +++ b/scripts/node_armature_sample/node_armature_sample.gml @@ -17,6 +17,7 @@ function Node_Armature_Sample(_x, _y, _group = noone) : Node(_x, _y, _group) con outputs[| 0] = nodeValue("Position", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); + #region ++++ attributes ++++ attributes.display_name = true; attributes.display_bone = 0; @@ -29,15 +30,16 @@ function Node_Armature_Sample(_x, _y, _group = noone) : Node(_x, _y, _group) con new scrollBox(["Octahedral", "Stick"], function(ind) { attributes.display_bone = ind; })]); + #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _b = inputs[| 0].getValue(); if(_b == noone) return; _b.draw(attributes, false, _x, _y, _s, _mx, _my); - } + } #endregion - function update() { + function update() { #region var _bone = inputs[| 0].getValue(); var _name = inputs[| 1].getValue(); var _prog = inputs[| 2].getValue(); @@ -45,9 +47,6 @@ function Node_Armature_Sample(_x, _y, _group = noone) : Node(_x, _y, _group) con if(_bone == noone) return; _name = string_trim(_name); - //print($"|{_name}|{string_length(_name)}"); - //for( var i = 1; i <= string_length(_name); i++ ) - // print($" {i}: |{string_char_at(_name, i)}|"); var _b = _bone.findBoneByName(_name); if(_b == noone) { @@ -57,10 +56,10 @@ function Node_Armature_Sample(_x, _y, _group = noone) : Node(_x, _y, _group) con var _p = _b.getPoint(_prog); outputs[| 0].setValue([_p.x, _p.y]); - } + } #endregion - static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region var bbox = drawGetBbox(xx, yy, _s); draw_sprite_fit(s_node_armature_sample, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); - } + } #endregion } \ No newline at end of file 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 b3d01ef49..bff846237 100644 --- a/scripts/node_armature_to_path/node_armature_to_path.gml +++ b/scripts/node_armature_to_path/node_armature_to_path.gml @@ -16,6 +16,7 @@ function Node_Armature_Path(_x, _y, _group = noone) : Node(_x, _y, _group) const current_length = 0; boundary = new BoundingBox(); + #region ++++ attributes ++++ attributes.display_name = true; attributes.display_bone = 0; @@ -28,13 +29,14 @@ function Node_Armature_Path(_x, _y, _group = noone) : Node(_x, _y, _group) const new scrollBox(["Octahedral", "Stick"], function(ind) { attributes.display_bone = ind; })]); + #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _b = inputs[| 0].getValue(); if(_b == noone) return; _b.draw(attributes, false, _x, _y, _s, _mx, _my); - } + } #endregion static getBoundary = function() { return boundary; } @@ -43,11 +45,11 @@ function Node_Armature_Path(_x, _y, _group = noone) : Node(_x, _y, _group) const static getLength = function() { return current_length; } static getAccuLength = function() { return [ 0, current_length ]; } - static getWeightDistance = function (_dist, _ind = 0) { + static getWeightDistance = function (_dist, _ind = 0) { #region return getWeightRatio(_dist / current_length, _ind); - } + } #endregion - static getWeightRatio = function (_rat, _ind = 0) { + static getWeightRatio = function (_rat, _ind = 0) { #region var _p0 = lines[_ind][0]; var _p1 = lines[_ind][1]; @@ -55,13 +57,13 @@ function Node_Armature_Path(_x, _y, _group = noone) : Node(_x, _y, _group) const if(!is_array(_p1) || array_length(_p1) < 3) return 1; return lerp(_p0[2], _p1[2], _rat); - } + } #endregion - static getPointDistance = function(_dist, _ind = 0) { + static getPointDistance = function(_dist, _ind = 0) { #region return getPointRatio(_dist / current_length, _ind); - } + } #endregion - static getPointRatio = function(_rat, _ind = 0) { + static getPointRatio = function(_rat, _ind = 0) { #region var _p0 = lines[_ind][0]; var _p1 = lines[_ind][1]; @@ -72,9 +74,9 @@ function Node_Armature_Path(_x, _y, _group = noone) : Node(_x, _y, _group) const var _y = lerp(_p0[1], _p1[1], _rat); return new __vec2( _x, _y ); - } + } #endregion - function update() { + function update() { #region var _bone = inputs[| 0].getValue(); if(_bone == noone) return; @@ -109,10 +111,10 @@ function Node_Armature_Path(_x, _y, _group = noone) : Node(_x, _y, _group) const ds_stack_destroy(_bst); outputs[| 0].setValue(self); - } + } #endregion - static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region var bbox = drawGetBbox(xx, yy, _s); draw_sprite_fit(s_node_armature_path, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_array_remove/node_array_remove.gml b/scripts/node_array_remove/node_array_remove.gml index 3c47f40ad..974147563 100644 --- a/scripts/node_array_remove/node_array_remove.gml +++ b/scripts/node_array_remove/node_array_remove.gml @@ -44,7 +44,6 @@ 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(); - if(!is_array(_arr)) return; var type = inputs[| 1].getValue(); @@ -52,24 +51,24 @@ function Node_Array_Remove(_x, _y, _group = noone) : Node(_x, _y, _group) constr var value = inputs[| 3].getValue(); var spred = inputs[| 4].getValue(); - var arr = array_clone(_arr); + _arr = array_clone(_arr); if(type == 0) { if(!is_array(index)) index = [ index ]; array_sort(index, false); for( var i = 0, n = array_length(index); i < n; i++ ) { - if(index[i] < 0) index[i] = array_length(arr) + index[i]; - array_delete(arr, index[i], 1); + if(index[i] < 0) index[i] = array_length(_arr) + index[i]; + array_delete(_arr, index[i], 1); } } else { if(!spred || !is_array(value)) value = [ value ]; for( var i = 0, n = array_length(value); i < n; i++ ) - array_remove(arr, value[i]); + array_remove(_arr, value[i]); } - outputs[| 0].setValue(arr); + outputs[| 0].setValue(_arr); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_array_reverse/node_array_reverse.gml b/scripts/node_array_reverse/node_array_reverse.gml index cad1a9b28..3352c6f68 100644 --- a/scripts/node_array_reverse/node_array_reverse.gml +++ b/scripts/node_array_reverse/node_array_reverse.gml @@ -25,9 +25,9 @@ function Node_Array_Reverse(_x, _y, _group = noone) : Node(_x, _y, _group) const outputs[| 0].type = type; } - var arr = array_reverse(_arr); + _arr = array_reverse(_arr); - outputs[| 0].setValue(arr); + outputs[| 0].setValue(_arr); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_array_set/node_array_set.gml b/scripts/node_array_set/node_array_set.gml index d09427f81..c1369959d 100644 --- a/scripts/node_array_set/node_array_set.gml +++ b/scripts/node_array_set/node_array_set.gml @@ -53,12 +53,11 @@ 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 str = string(idx); - + var idx = inputs[| 1].getValue(); + var str = string(idx); var bbox = drawGetBbox(xx, yy, _s); - var ss = string_scale(str, bbox.w, bbox.h); + var ss = string_scale(str, bbox.w, bbox.h); + draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0); } } \ No newline at end of file diff --git a/scripts/node_array_shuffle/node_array_shuffle.gml b/scripts/node_array_shuffle/node_array_shuffle.gml index 0e3dd4e6e..a77f22ebc 100644 --- a/scripts/node_array_shuffle/node_array_shuffle.gml +++ b/scripts/node_array_shuffle/node_array_shuffle.gml @@ -20,6 +20,7 @@ function Node_Array_Shuffle(_x, _y, _group = noone) : Node(_x, _y, _group) const outputs[| 0].type = VALUE_TYPE.any; if(!is_array(arr)) return; + arr = array_clone(arr); if(inputs[| 0].value_from != noone) { inputs[| 0].type = inputs[| 0].value_from.type; diff --git a/scripts/node_atlas/node_atlas.gml b/scripts/node_atlas/node_atlas.gml index a89301792..cacd51ada 100644 --- a/scripts/node_atlas/node_atlas.gml +++ b/scripts/node_atlas/node_atlas.gml @@ -14,7 +14,7 @@ function Node_Atlas(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con attribute_surface_depth(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region surface_set_target(_outSurf); DRAW_CLEAR BLEND_OVERRIDE; @@ -28,5 +28,5 @@ function Node_Atlas(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con surface_reset_target(); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_average/node_average.gml b/scripts/node_average/node_average.gml index faee831d0..8671ea9d1 100644 --- a/scripts/node_average/node_average.gml +++ b/scripts/node_average/node_average.gml @@ -26,7 +26,7 @@ function Node_Average(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c colors = []; - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var inSurf = _data[0]; if(!is_surface(inSurf)) return _outSurf; @@ -78,5 +78,5 @@ function Node_Average(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c colors[_array_index] = cc; return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_blend/node_blend.gml b/scripts/node_blend/node_blend.gml index c5a93a90e..3374e3d21 100644 --- a/scripts/node_blend/node_blend.gml +++ b/scripts/node_blend/node_blend.gml @@ -50,7 +50,7 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con temp_surface = [ surface_create(1, 1) ]; - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var _back = _data[0]; var _fore = _data[1]; var _type = _data[2]; @@ -139,5 +139,5 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con surface_reset_target(); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_blur/node_blur.gml b/scripts/node_blur/node_blur.gml index 57969f1d0..80498d441 100644 --- a/scripts/node_blur/node_blur.gml +++ b/scripts/node_blur/node_blur.gml @@ -31,7 +31,7 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons attribute_oversample(); surface_blur_init(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var _size = _data[1]; var _clamp = struct_try_get(attributes, "oversample"); var _isovr = _data[3]; @@ -51,5 +51,5 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_blur_bokeh/node_blur_bokeh.gml b/scripts/node_blur_bokeh/node_blur_bokeh.gml index fd3541ce8..79a9f7ebb 100644 --- a/scripts/node_blur_bokeh/node_blur_bokeh.gml +++ b/scripts/node_blur_bokeh/node_blur_bokeh.gml @@ -27,7 +27,7 @@ function Node_Blur_Bokeh(_x, _y, _group = noone) : Node_Processor(_x, _y, _group attribute_surface_depth(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var _str = _data[1]; var _mask = _data[2]; var _mix = _data[3]; @@ -48,5 +48,5 @@ function Node_Blur_Bokeh(_x, _y, _group = noone) : Node_Processor(_x, _y, _group _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_blur_contrast/node_blur_contrast.gml b/scripts/node_blur_contrast/node_blur_contrast.gml index 133ef1e64..9a1cc65ef 100644 --- a/scripts/node_blur_contrast/node_blur_contrast.gml +++ b/scripts/node_blur_contrast/node_blur_contrast.gml @@ -34,7 +34,7 @@ function Node_Blur_Contrast(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr attribute_surface_depth(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var _surf = _data[0]; var _size = _data[1]; var _tres = _data[2]; @@ -72,5 +72,5 @@ function Node_Blur_Contrast(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_blur_directional/node_blur_directional.gml b/scripts/node_blur_directional/node_blur_directional.gml index b1f554195..7194df869 100644 --- a/scripts/node_blur_directional/node_blur_directional.gml +++ b/scripts/node_blur_directional/node_blur_directional.gml @@ -27,7 +27,7 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y, attribute_surface_depth(); attribute_oversample(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _surf = outputs[| 0].getValue(); if(is_array(_surf)) { if(array_length(_surf) == 0) return; @@ -38,9 +38,9 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y, var hh = surface_get_height_safe(_surf); inputs[| 2].drawOverlay(active, _x + ww / 2 * _s, _y + hh / 2 * _s, _s, _mx, _my, _snx, _sny); - } + } #endregion - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var _str = _data[1]; var _dir = _data[2]; var _mask = _data[3]; @@ -57,5 +57,5 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y, _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_blur_radial/node_blur_radial.gml b/scripts/node_blur_radial/node_blur_radial.gml index f45ecaace..3b585d9ef 100644 --- a/scripts/node_blur_radial/node_blur_radial.gml +++ b/scripts/node_blur_radial/node_blur_radial.gml @@ -32,20 +32,22 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_oversample(); attribute_interpolation(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var pos = inputs[| 2].getValue(); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; inputs[| 1].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - } + } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { var _str = _data[1]; var _cen = _data[2]; var _mask = _data[4]; var _mix = _data[5]; + + _cen = array_clone(_cen); _cen[0] /= surface_get_width_safe(_outSurf); _cen[1] /= surface_get_height_safe(_outSurf); diff --git a/scripts/node_blur_simple/node_blur_simple.gml b/scripts/node_blur_simple/node_blur_simple.gml index 7fbab0577..dec14a0b7 100644 --- a/scripts/node_blur_simple/node_blur_simple.gml +++ b/scripts/node_blur_simple/node_blur_simple.gml @@ -42,7 +42,7 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_surface_depth(); attribute_oversample(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region if(!is_surface(_data[0])) return _outSurf; var _size = _data[1]; var _samp = struct_try_get(attributes, "oversample"); @@ -79,5 +79,5 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou _outSurf = mask_apply(_data[0], _outSurf, _msk, _mix); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_blur_zoom/node_blur_zoom.gml b/scripts/node_blur_zoom/node_blur_zoom.gml index aee3f119b..198c80ec7 100644 --- a/scripts/node_blur_zoom/node_blur_zoom.gml +++ b/scripts/node_blur_zoom/node_blur_zoom.gml @@ -35,16 +35,16 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); attribute_oversample(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var pos = inputs[| 2].getValue(); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; inputs[| 1].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny, 0, 64, THEME.anchor_scale_hori); inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - } + } #endregion - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var _str = _data[1]; var _cen = _data[2]; var _sam = struct_try_get(attributes, "oversample"); @@ -52,6 +52,8 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var _msk = _data[5]; var _mask = _data[6]; var _mix = _data[7]; + + _cen = array_clone(_cen); _cen[0] /= surface_get_width_safe(_outSurf); _cen[1] /= surface_get_height_safe(_outSurf); @@ -70,5 +72,5 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_bw/node_bw.gml b/scripts/node_bw/node_bw.gml index a2195b43d..e57772ddf 100644 --- a/scripts/node_bw/node_bw.gml +++ b/scripts/node_bw/node_bw.gml @@ -30,7 +30,7 @@ function Node_BW(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr attribute_surface_depth(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var _exp = _data[1]; var _con = _data[2]; surface_set_target(_outSurf); @@ -49,5 +49,5 @@ function Node_BW(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_camera/node_camera.gml b/scripts/node_camera/node_camera.gml index cb69bd9c3..0401d8e0f 100644 --- a/scripts/node_camera/node_camera.gml +++ b/scripts/node_camera/node_camera.gml @@ -36,7 +36,7 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co temp_surface = [ noone, noone ]; - static createNewInput = function() { + static createNewInput = function() { var index = ds_list_size(inputs); var _s = floor((index - input_fix_len) / data_length); diff --git a/scripts/node_channels/node_channels.gml b/scripts/node_channels/node_channels.gml index d2b9876b3..865705dba 100644 --- a/scripts/node_channels/node_channels.gml +++ b/scripts/node_channels/node_channels.gml @@ -15,7 +15,7 @@ function Node_RGB_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_surface_depth(); - static processData = function(_outSurf, _data, output_index) { + static processData = function(_outSurf, _data, output_index) { #region var _out = _data[1]; var _alp = _data[2]; @@ -36,5 +36,5 @@ function Node_RGB_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou surface_reset_target(); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_channels_hsv/node_channels_hsv.gml b/scripts/node_channels_hsv/node_channels_hsv.gml index 53a53d5bc..d4271f5de 100644 --- a/scripts/node_channels_hsv/node_channels_hsv.gml +++ b/scripts/node_channels_hsv/node_channels_hsv.gml @@ -13,7 +13,7 @@ function Node_HSV_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_surface_depth(); - static processData = function(_outSurf, _data, output_index) { + static processData = function(_outSurf, _data, output_index) { #region surface_set_target(_outSurf); DRAW_CLEAR BLEND_OVERRIDE; @@ -29,5 +29,5 @@ function Node_HSV_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou surface_reset_target(); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_chromatic_aberration/node_chromatic_aberration.gml b/scripts/node_chromatic_aberration/node_chromatic_aberration.gml index 37d8479f5..efcf30d7d 100644 --- a/scripts/node_chromatic_aberration/node_chromatic_aberration.gml +++ b/scripts/node_chromatic_aberration/node_chromatic_aberration.gml @@ -33,7 +33,7 @@ function Node_Chromatic_Aberration(_x, _y, _group = noone) : Node_Processor(_x, static processData = function(_outSurf, _data, _output_index, _array_index) { var center = _data[1]; - var stren = _data[2]; + var stren = _data[2]; surface_set_shader(_outSurf, shader); shader_set_interpolation(_data[0]); diff --git a/scripts/node_color_adjustment/node_color_adjustment.gml b/scripts/node_color_adjustment/node_color_adjustment.gml index 60f3b9537..b549fb424 100644 --- a/scripts/node_color_adjustment/node_color_adjustment.gml +++ b/scripts/node_color_adjustment/node_color_adjustment.gml @@ -82,7 +82,7 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro outputs[| 1].setVisible(type == 1, type == 1); } - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var _bri = _data[1]; var _con = _data[2]; var _hue = _data[3]; @@ -104,6 +104,8 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro var _surf = _data[0]; var _baseSurf = _outSurf; + _col = array_clone(_col); + if(_type == 1) { if(!is_array(_col)) _col = [ _col ]; @@ -165,9 +167,9 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro surface_reset_target(); return _outSurf; - } + } #endregion - static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region var type = inputs[| 12].getValue(); if(type == 0) return; @@ -178,5 +180,5 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro if(array_length(pal) && is_array(pal[0])) return; drawPalette(pal, bbox.x0, bbox.y0, bbox.w, bbox.h); - } + } #endregion } \ No newline at end of file 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 b9a37b40d..0482e3223 100644 --- a/scripts/node_color_palette_replacement/node_color_palette_replacement.gml +++ b/scripts/node_color_palette_replacement/node_color_palette_replacement.gml @@ -48,7 +48,7 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr attribute_surface_depth(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var fr = _data[1]; var to = _data[2]; var tr = _data[3]; @@ -100,5 +100,5 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr if(!in) _outSurf = mask_apply(_data[0], _outSurf, _data[7], _data[8]); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_color_remove/node_color_remove.gml b/scripts/node_color_remove/node_color_remove.gml index c2ee34e52..54d6e873c 100644 --- a/scripts/node_color_remove/node_color_remove.gml +++ b/scripts/node_color_remove/node_color_remove.gml @@ -35,7 +35,7 @@ function Node_Color_Remove(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro attribute_surface_depth(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var frm = _data[1]; var thr = _data[2]; var inv = _data[6]; @@ -63,5 +63,5 @@ function Node_Color_Remove(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_color_replacement/node_color_replacement.gml b/scripts/node_color_replacement/node_color_replacement.gml index a5a54b3ee..3f504e097 100644 --- a/scripts/node_color_replacement/node_color_replacement.gml +++ b/scripts/node_color_replacement/node_color_replacement.gml @@ -22,14 +22,14 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g selecting_index = 0; - function setColor(colr) { + function setColor(colr) { #region var _to = inputs[| 2].getValue(); _to[selecting_index] = colr; - inputs[| 2].setValue(_to); - } + inputs[| 2].setValue(_to); // Not necessary due to array reference + } #endregion - render_palette = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { + render_palette = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { #region var bx = _x; var by = _y; @@ -115,7 +115,7 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g } return hh; - }); + }); #endregion input_display_list = [ 6, ["Output", true], 0, 4, 5, @@ -127,7 +127,7 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g attribute_surface_depth(); - static refreshPalette = function() { + static refreshPalette = function() { #region var _surf = array_safe_get(current_data, 0); inputs[| 1].setValue([]); @@ -164,9 +164,9 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g inputs[| 1].setValue(palette); inputs[| 2].setValue(palette); - } + } #endregion - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var fr = _data[1]; var to = _data[2]; var tr = _data[3]; @@ -186,5 +186,5 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g _outSurf = mask_apply(_data[0], _outSurf, _data[4], _data[5]); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_colorize/node_colorize.gml b/scripts/node_colorize/node_colorize.gml index d45ce6c29..332e51346 100644 --- a/scripts/node_colorize/node_colorize.gml +++ b/scripts/node_colorize/node_colorize.gml @@ -35,7 +35,7 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var _gra = _data[1]; var _gra_shift = _data[2]; var _alpha = _data[6]; @@ -65,5 +65,5 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_combine_hsv/node_combine_hsv.gml b/scripts/node_combine_hsv/node_combine_hsv.gml index 85104097a..54e9d1356 100644 --- a/scripts/node_combine_hsv/node_combine_hsv.gml +++ b/scripts/node_combine_hsv/node_combine_hsv.gml @@ -14,7 +14,7 @@ function Node_Combine_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_surface_depth(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var _h = _data[0]; var _s = _data[1]; var _v = _data[2]; @@ -35,5 +35,5 @@ function Node_Combine_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou surface_reset_target(); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_combine_rgb/node_combine_rgb.gml b/scripts/node_combine_rgb/node_combine_rgb.gml index 91cfdf164..e609be46b 100644 --- a/scripts/node_combine_rgb/node_combine_rgb.gml +++ b/scripts/node_combine_rgb/node_combine_rgb.gml @@ -27,7 +27,7 @@ function Node_Combine_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_surface_depth(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var _r = _data[0]; var _g = _data[1]; var _b = _data[2]; @@ -54,5 +54,5 @@ function Node_Combine_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou surface_reset_target(); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_composite/node_composite.gml b/scripts/node_composite/node_composite.gml index 2b0764521..b6c830e0e 100644 --- a/scripts/node_composite/node_composite.gml +++ b/scripts/node_composite/node_composite.gml @@ -28,7 +28,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) setIsDynamicInput(4); - attributes.layer_visible = []; + attributes.layer_visible = []; attributes.layer_selectable = []; hold_visibility = true; @@ -54,7 +54,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) layer_remove = -1; for(var i = 0; i < amo; i++) { - var ind = amo - i - 1; + var ind = amo - i - 1; var index = input_fix_len + ind * data_length; var _surf = current_data[index + 0]; var _pos = current_data[index + 1]; @@ -88,7 +88,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) hold_visibility = !_vis[ind]; if(mouse_click(mb_left, _focus) && _vis[ind] != hold_visibility) { - _vis[@ ind] = hold_visibility; + _vis[ind] = hold_visibility; doUpdate(); } } else @@ -102,7 +102,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) hold_select = !_sel[ind]; if(mouse_click(mb_left, _focus) && _sel[ind] != hold_select) - _sel[@ ind] = hold_select; + _sel[ind] = hold_select; } else draw_sprite_ui_uniform(THEME.cursor_select, sel, _bx, _cy + lh / 2, 1, COLORS._main_icon, 0.5 + 0.5 * sel); @@ -167,9 +167,8 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) ds_list_delete(inputs, index); } - for( var i = 0; i < data_length; i++ ) { + for( var i = 0; i < data_length; i++ ) ds_list_insert(inputs, targt + i, ext[i]); - } doUpdate(); } @@ -569,7 +568,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } } - var hovering = noone; + var hovering = noone; var hovering_type = noone; var _vis = attributes.layer_visible; var _sel = attributes.layer_selectable; diff --git a/scripts/node_crop/node_crop.gml b/scripts/node_crop/node_crop.gml index 878a94bbe..dfa5fea93 100644 --- a/scripts/node_crop/node_crop.gml +++ b/scripts/node_crop/node_crop.gml @@ -31,6 +31,7 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons var _inSurf = current_data[0]; var _splice = current_data[1]; + _splice = array_clone(_splice); for( var i = 0, n = array_length(_splice); i < n; i++ ) _splice[i] = round(_splice[i]); diff --git a/scripts/node_curve/node_curve.gml b/scripts/node_curve/node_curve.gml index d7315a814..7a22f9958 100644 --- a/scripts/node_curve/node_curve.gml +++ b/scripts/node_curve/node_curve.gml @@ -41,7 +41,7 @@ function Node_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con attribute_surface_depth(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var _wcur = _data[1]; var _rcur = _data[2]; var _gcur = _data[3]; @@ -70,5 +70,5 @@ function Node_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con _outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]); return _outSurf; - } + } #endregion } diff --git a/scripts/node_de_corner/node_de_corner.gml b/scripts/node_de_corner/node_de_corner.gml index 3ed459a2d..a3acd8d7f 100644 --- a/scripts/node_de_corner/node_de_corner.gml +++ b/scripts/node_de_corner/node_de_corner.gml @@ -17,7 +17,7 @@ function Node_De_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region surface_set_shader(_outSurf, sh_de_corner); shader_set_f("dimension", [ surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0]) ]); shader_set_f("tolerance", _data[2]); @@ -26,5 +26,5 @@ function Node_De_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) surface_reset_shader(); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_de_stray/node_de_stray.gml b/scripts/node_de_stray/node_de_stray.gml index 954b344da..574da2833 100644 --- a/scripts/node_de_stray/node_de_stray.gml +++ b/scripts/node_de_stray/node_de_stray.gml @@ -17,7 +17,7 @@ function Node_De_Stray(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region surface_set_shader(_outSurf, sh_de_stray); shader_set_dim("dimension", _data[0]); shader_set_f("tolerance", _data[1]); @@ -26,5 +26,5 @@ function Node_De_Stray(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) surface_reset_shader(); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_dilate/node_dilate.gml b/scripts/node_dilate/node_dilate.gml index 856af29a6..162f823ba 100644 --- a/scripts/node_dilate/node_dilate.gml +++ b/scripts/node_dilate/node_dilate.gml @@ -41,7 +41,7 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co attribute_oversample(); attribute_interpolation(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var pos = inputs[| 1].getValue(); var px = _x + pos[0] * _s; @@ -49,9 +49,9 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); inputs[| 3].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny, 0, 1, THEME.anchor_scale_hori); - } + } #endregion - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var center = _data[1]; var stren = _data[2]; var rad = _data[3]; @@ -70,5 +70,5 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co _outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_displacement/node_displacement.gml b/scripts/node_displacement/node_displacement.gml index 5d05cf334..72c14d684 100644 --- a/scripts/node_displacement/node_displacement.gml +++ b/scripts/node_displacement/node_displacement.gml @@ -58,7 +58,7 @@ If set, then strength value control how many times the effect applies on itself. attribute_oversample(); attribute_interpolation(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region switch(_data[5]) { case 0 : inputs[| 2].setVisible(true); @@ -90,5 +90,5 @@ If set, then strength value control how many times the effect applies on itself. _outSurf = mask_apply(_data[0], _outSurf, _data[8], _data[9]); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_dynamic_surface/node_dynamic_surface.gml b/scripts/node_dynamic_surface/node_dynamic_surface.gml index 5d3022663..0cf590404 100644 --- a/scripts/node_dynamic_surface/node_dynamic_surface.gml +++ b/scripts/node_dynamic_surface/node_dynamic_surface.gml @@ -10,7 +10,7 @@ function Node_DynaSurf(_x, _y, _group = noone) : Node_Collection(_x, _y, _group) custom_input_index = ds_list_size(inputs); custom_output_index = ds_list_size(outputs); - if(!LOADING && !APPENDING && !CLONING) { + if(!LOADING && !APPENDING && !CLONING) { #region var _input = nodeBuild("Node_DynaSurf_In", -256, -32, self); var _output = nodeBuild("Node_DynaSurf_Out", 256, -32, self); @@ -45,9 +45,9 @@ function Node_DynaSurf(_x, _y, _group = noone) : Node_Collection(_x, _y, _group) _outH.inputs[| 0].setFrom(_surH.outputs[| 0]); UPDATE |= RENDER_TYPE.full; - } + } #endregion - static setRenderStatus = function(result) { + static setRenderStatus = function(result) { #region rendered = result; if(result) @@ -68,9 +68,9 @@ function Node_DynaSurf(_x, _y, _group = noone) : Node_Collection(_x, _y, _group) if(!result && group != noone) group.setRenderStatus(result); - } + } #endregion - static setDynamicSurface = function() { + static setDynamicSurface = function() { #region var _dyna = new Compute_DynaSurf(); for( var i = 0, n = ds_list_size(nodes); i < n; i++ ) { @@ -85,12 +85,12 @@ function Node_DynaSurf(_x, _y, _group = noone) : Node_Collection(_x, _y, _group) } outputs[| 0].setValue(_dyna); - } + } #endregion static update = function() {} } -function dynaSurf_output_getNextNode() { +function dynaSurf_output_getNextNode() { #region if(!is_instanceof(group, Node_DynaSurf)) return []; var junc = group.outputs[| 0]; @@ -108,5 +108,5 @@ function dynaSurf_output_getNextNode() { } return nodes; -} +} #endregion \ No newline at end of file diff --git a/scripts/node_fluid_add/node_fluid_add.yy b/scripts/node_fluid_add/node_fluid_add.yy index e163958ee..b96b8e486 100644 --- a/scripts/node_fluid_add/node_fluid_add.yy +++ b/scripts/node_fluid_add/node_fluid_add.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "fluidSim", - "path": "folders/nodes/data/fluidSim.yy", + "path": "folders/nodes/data/simulation/fluidSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_fluid_add_collider/node_fluid_add_collider.yy b/scripts/node_fluid_add_collider/node_fluid_add_collider.yy index ac24fbb61..5677304e5 100644 --- a/scripts/node_fluid_add_collider/node_fluid_add_collider.yy +++ b/scripts/node_fluid_add_collider/node_fluid_add_collider.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "fluidSim", - "path": "folders/nodes/data/fluidSim.yy", + "path": "folders/nodes/data/simulation/fluidSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_fluid_apply_velo/node_fluid_apply_velo.yy b/scripts/node_fluid_apply_velo/node_fluid_apply_velo.yy index 3a7482171..7bcdd0362 100644 --- a/scripts/node_fluid_apply_velo/node_fluid_apply_velo.yy +++ b/scripts/node_fluid_apply_velo/node_fluid_apply_velo.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "fluidSim", - "path": "folders/nodes/data/fluidSim.yy", + "path": "folders/nodes/data/simulation/fluidSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_fluid_domain/node_fluid_domain.yy b/scripts/node_fluid_domain/node_fluid_domain.yy index c7a95c22a..b3ae48ed3 100644 --- a/scripts/node_fluid_domain/node_fluid_domain.yy +++ b/scripts/node_fluid_domain/node_fluid_domain.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "fluidSim", - "path": "folders/nodes/data/fluidSim.yy", + "path": "folders/nodes/data/simulation/fluidSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_fluid_domain_queue/node_fluid_domain_queue.yy b/scripts/node_fluid_domain_queue/node_fluid_domain_queue.yy index e105bddde..28f457218 100644 --- a/scripts/node_fluid_domain_queue/node_fluid_domain_queue.yy +++ b/scripts/node_fluid_domain_queue/node_fluid_domain_queue.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "fluidSim", - "path": "folders/nodes/data/fluidSim.yy", + "path": "folders/nodes/data/simulation/fluidSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_fluid_render/node_fluid_render.yy b/scripts/node_fluid_render/node_fluid_render.yy index 8dbedb575..c4fac58ce 100644 --- a/scripts/node_fluid_render/node_fluid_render.yy +++ b/scripts/node_fluid_render/node_fluid_render.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "fluidSim", - "path": "folders/nodes/data/fluidSim.yy", + "path": "folders/nodes/data/simulation/fluidSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_fluid_repulse/node_fluid_repulse.yy b/scripts/node_fluid_repulse/node_fluid_repulse.yy index 5fd4d5c16..47f2f4046 100644 --- a/scripts/node_fluid_repulse/node_fluid_repulse.yy +++ b/scripts/node_fluid_repulse/node_fluid_repulse.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "fluidSim", - "path": "folders/nodes/data/fluidSim.yy", + "path": "folders/nodes/data/simulation/fluidSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_fluid_sim/node_fluid_sim.yy b/scripts/node_fluid_sim/node_fluid_sim.yy index 1063e4808..8aa298273 100644 --- a/scripts/node_fluid_sim/node_fluid_sim.yy +++ b/scripts/node_fluid_sim/node_fluid_sim.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "fluidSim", - "path": "folders/nodes/data/fluidSim.yy", + "path": "folders/nodes/data/simulation/fluidSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_fluid_turbulence/node_fluid_turbulence.yy b/scripts/node_fluid_turbulence/node_fluid_turbulence.yy index 2a84619b7..eeb5ad0b5 100644 --- a/scripts/node_fluid_turbulence/node_fluid_turbulence.yy +++ b/scripts/node_fluid_turbulence/node_fluid_turbulence.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "fluidSim", - "path": "folders/nodes/data/fluidSim.yy", + "path": "folders/nodes/data/simulation/fluidSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_fluid_update/node_fluid_update.yy b/scripts/node_fluid_update/node_fluid_update.yy index f385bd28a..d6da015d5 100644 --- a/scripts/node_fluid_update/node_fluid_update.yy +++ b/scripts/node_fluid_update/node_fluid_update.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "fluidSim", - "path": "folders/nodes/data/fluidSim.yy", + "path": "folders/nodes/data/simulation/fluidSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_fluid_vortex/node_fluid_vortex.yy b/scripts/node_fluid_vortex/node_fluid_vortex.yy index 25978823a..03a05a105 100644 --- a/scripts/node_fluid_vortex/node_fluid_vortex.yy +++ b/scripts/node_fluid_vortex/node_fluid_vortex.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "fluidSim", - "path": "folders/nodes/data/fluidSim.yy", + "path": "folders/nodes/data/simulation/fluidSim.yy", }, } \ No newline at end of file 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 b24034638..cb2d6903d 100644 --- a/scripts/node_grey_to_alpha/node_grey_to_alpha.gml +++ b/scripts/node_grey_to_alpha/node_grey_to_alpha.gml @@ -22,12 +22,12 @@ function Node_Grey_Alpha(_x, _y, _group = noone) : Node_Processor(_x, _y, _group attribute_surface_depth(); - static step = function() { + static step = function() { #region var _replace = inputs[| 1].getValue(); inputs[| 2].setVisible(_replace); - } + } #endregion - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var _replace = inputs[| 1].getValue(); var _color = inputs[| 2].getValue(); @@ -45,5 +45,5 @@ function Node_Grey_Alpha(_x, _y, _group = noone) : Node_Processor(_x, _y, _group surface_reset_target(); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_greyscale/node_greyscale.gml b/scripts/node_greyscale/node_greyscale.gml index 5981f2da9..af1ac3a17 100644 --- a/scripts/node_greyscale/node_greyscale.gml +++ b/scripts/node_greyscale/node_greyscale.gml @@ -30,7 +30,7 @@ function Node_Greyscale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var _exp = _data[1]; var _con = _data[2]; surface_set_target(_outSurf); @@ -49,5 +49,5 @@ function Node_Greyscale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_grid/node_grid.gml b/scripts/node_grid/node_grid.gml index 401a76b0c..6e3139ebb 100644 --- a/scripts/node_grid/node_grid.gml +++ b/scripts/node_grid/node_grid.gml @@ -80,7 +80,7 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons var _col_gap = _data[6]; var _gra = _data[5]; - var _grad = _gra.toArray();; + var _grad = _gra.toArray(); var _grad_color = _grad[0]; var _grad_time = _grad[1]; diff --git a/scripts/node_invert/node_invert.gml b/scripts/node_invert/node_invert.gml index 1de52e30f..5c0e1f956 100644 --- a/scripts/node_invert/node_invert.gml +++ b/scripts/node_invert/node_invert.gml @@ -19,7 +19,7 @@ function Node_Invert(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co attribute_surface_depth(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region surface_set_target(_outSurf); DRAW_CLEAR BLEND_OVERRIDE; @@ -34,5 +34,5 @@ function Node_Invert(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co _outSurf = mask_apply(_data[0], _outSurf, _data[1], _data[2]); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_iterator_output/node_iterator_output.gml b/scripts/node_iterator_output/node_iterator_output.gml index 5d81f9b4e..147daed07 100644 --- a/scripts/node_iterator_output/node_iterator_output.gml +++ b/scripts/node_iterator_output/node_iterator_output.gml @@ -48,10 +48,7 @@ function Node_Iterator_Output(_x, _y, _group = noone) : Node_Group_Output(_x, _y var _new_val; surface_array_free(_prev_val); - if(is_surf) - _new_val = surface_array_clone(_val); - else - _new_val = array_clone(_val); + _new_val = is_surf? surface_array_clone(_val) : array_clone(_val); return _new_val; } diff --git a/scripts/node_keyframe/node_keyframe.gml b/scripts/node_keyframe/node_keyframe.gml index 09268ddbf..af26a498f 100644 --- a/scripts/node_keyframe/node_keyframe.gml +++ b/scripts/node_keyframe/node_keyframe.gml @@ -265,7 +265,7 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor { } #endregion static processValue = function(_val) { #region - if(is_array(_val)) return array_clone(_val); + if(is_array(_val)) return _val; if(is_struct(_val)) return _val; if(is_undefined(_val)) return 0; diff --git a/scripts/node_level/node_level.gml b/scripts/node_level/node_level.gml index df33229ef..6c550e678 100644 --- a/scripts/node_level/node_level.gml +++ b/scripts/node_level/node_level.gml @@ -42,7 +42,7 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con attribute_surface_depth(); - level_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { + level_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { #region var _h = 128; var x0 = _x; var x1 = _x + _w; @@ -73,7 +73,7 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con draw_rectangle(x0, y0, x1, y1, true); return _h; - }); + }); #endregion input_display_list = [ 8, level_renderer, @@ -88,15 +88,15 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con histogramUpdate(current_data[0]); } - static onValueFromUpdate = function(index) { + static onValueFromUpdate = function(index) { #region if(index == 0) { doUpdate(); if(array_length(current_data) > 0) histogramUpdate(current_data[0]); } - } + } #endregion - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var _wmin = min(_data[1][0], _data[1][1]); var _wmax = max(_data[1][0], _data[1][1]); var _rmin = min(_data[2][0], _data[2][1]); @@ -133,5 +133,5 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con _outSurf = mask_apply(_data[0], _outSurf, _data[6], _data[7]); return _outSurf; - } + } #endregion } diff --git a/scripts/node_level_selector/node_level_selector.gml b/scripts/node_level_selector/node_level_selector.gml index e4db54c5a..004480961 100644 --- a/scripts/node_level_selector/node_level_selector.gml +++ b/scripts/node_level_selector/node_level_selector.gml @@ -25,7 +25,7 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g attribute_surface_depth(); - level_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { + level_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { #region var _h = 128; var x0 = _x; var x1 = _x + _w; @@ -58,7 +58,7 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g draw_rectangle(x0, y0, x1, y1, true); return _h; - }); + }); #endregion input_display_list = [ 5, level_renderer, @@ -67,20 +67,20 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g ]; histogramInit(); - static onInspect = function() { + static onInspect = function() { #region if(array_length(current_data) > 0) histogramUpdate(current_data[0]); - } + } #endregion - static onValueFromUpdate = function(index) { + static onValueFromUpdate = function(index) { #region if(index == 0) { update(); if(array_length(current_data) > 0) histogramUpdate(current_data[0]); } - } + } #endregion - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var _middle = _data[1]; var _range = _data[2]; @@ -101,5 +101,5 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_morph_surface/node_morph_surface.gml b/scripts/node_morph_surface/node_morph_surface.gml index 38380b434..3f4e82506 100644 --- a/scripts/node_morph_surface/node_morph_surface.gml +++ b/scripts/node_morph_surface/node_morph_surface.gml @@ -21,7 +21,7 @@ function Node_Morph_Surface(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr attribute_surface_depth(); attribute_interpolation(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var sFrom = _data[0]; var sTo = _data[1]; var amo = _data[2]; @@ -42,5 +42,5 @@ function Node_Morph_Surface(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr surface_reset_shader(); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_noise_cell/node_noise_cell.gml b/scripts/node_noise_cell/node_noise_cell.gml index 300ea0ecb..79e20fa75 100644 --- a/scripts/node_noise_cell/node_noise_cell.gml +++ b/scripts/node_noise_cell/node_noise_cell.gml @@ -67,14 +67,12 @@ function Node_Cellular(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); - if(_type == 0) - shader = sh_cell_noise; - else if(_type == 1) - shader = sh_cell_noise_edge; - else if(_type == 2) - shader = sh_cell_noise_random; - else if(_type == 3) - shader = sh_cell_noise_crystal; + switch(_type) { + case 0 : shader = sh_cell_noise; break; + case 1 : shader = sh_cell_noise_edge; break; + case 2 : shader = sh_cell_noise_random; break; + case 3 : shader = sh_cell_noise_crystal; break; + } surface_set_target(_outSurf); shader_set(shader); diff --git a/scripts/node_palette_extract/node_palette_extract.gml b/scripts/node_palette_extract/node_palette_extract.gml index 26fffea0f..0c2003e66 100644 --- a/scripts/node_palette_extract/node_palette_extract.gml +++ b/scripts/node_palette_extract/node_palette_extract.gml @@ -223,7 +223,7 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node(_x, _y, _group) con surface_reset_target(); var c_buffer = buffer_create(ww * hh * 4, buffer_fixed, 2); - var colors = array_create(ww * hh); + var colors = array_create(ww * hh); buffer_get_surface(c_buffer, _surf, 0); buffer_seek(c_buffer, buffer_seek_start, 0); diff --git a/scripts/node_palette_shift/node_palette_shift.gml b/scripts/node_palette_shift/node_palette_shift.gml index eea12c3af..e60da71e7 100644 --- a/scripts/node_palette_shift/node_palette_shift.gml +++ b/scripts/node_palette_shift/node_palette_shift.gml @@ -26,7 +26,7 @@ function Node_Palette_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr attribute_surface_depth(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var _pal = _data[1]; var _shf = _data[2]; @@ -48,5 +48,5 @@ function Node_Palette_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_particle/node_particle.yy b/scripts/node_particle/node_particle.yy index 6ffa51f65..98380e561 100644 --- a/scripts/node_particle/node_particle.yy +++ b/scripts/node_particle/node_particle.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "VFX", - "path": "folders/nodes/data/VFX.yy", + "path": "folders/nodes/data/simulation/VFX.yy", }, } \ No newline at end of file diff --git a/scripts/node_path/node_path.gml b/scripts/node_path/node_path.gml index 600c37dbb..173ac86c1 100644 --- a/scripts/node_path/node_path.gml +++ b/scripts/node_path/node_path.gml @@ -162,9 +162,10 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { for( var i = input_fix_len; i < ds_list_size(inputs); i++ ) { var p = inputs[| i].getValue(); - - p[0] += dx / _s; - p[1] += dy / _s; + p = [ + p[0] + dx / _s, + p[1] + dy / _s + ]; if(inputs[| i].setValue(p)) _edited = true; @@ -258,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 = inputs[| i].getValue(); + var p = array_clone(inputs[| i].getValue()); var _p2 = p[_ANCHOR.x] + p[_ANCHOR.c1x]; var _p3 = p[_ANCHOR.y] + p[_ANCHOR.c1y]; @@ -298,7 +299,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { if(drag_type < 2) { #region move points var inp = inputs[| input_fix_len + drag_point]; - var anc = inp.getValue(); + var anc = array_clone(inp.getValue()); if(drag_type != 0 && SHIFT == KEYBOARD_STATUS.down) anc[_ANCHOR.ind] = !anc[_ANCHOR.ind]; @@ -438,7 +439,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { dyy = lengthdir_y(ds1 / 3, dd); } - anc = [_p[_ANCHOR.x], _p[_ANCHOR.y], dxx, dxy, dyx, dyy]; + anc = [ _p[_ANCHOR.x], _p[_ANCHOR.y], dxx, dxy, dyx, dyy ]; if(input_fix_len + i >= ds_list_size(inputs)) createNewInput(_p[_ANCHOR.x], _p[_ANCHOR.y], dxx, dxy, dyx, dyy); else @@ -470,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] = inputs[| input_fix_len + i].getValue(); + a[i] = array_clone(inputs[| input_fix_len + i].getValue()); a[0][_ANCHOR.x] = minx; a[0][_ANCHOR.y] = miny; @@ -508,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] = inputs[| input_fix_len + i].getValue(); + a[i] = array_clone(inputs[| input_fix_len + i].getValue()); a[0][_ANCHOR.x ] = (minx + maxx) / 2; a[0][_ANCHOR.y ] = miny; @@ -727,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 = inputs[| input_fix_len + anchor_hover].getValue(); + var _a = array_clone(inputs[| input_fix_len + anchor_hover].getValue()); if(isUsingTool(2) && hover_type == 0) { draw_sprite_ui_uniform(THEME.cursor_path_anchor, 0, _mx + 16, _my + 16); @@ -841,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 = inputs[| index_0].getValue(); - var _a1 = inputs[| index_1].getValue(); + var _a0 = array_clone(inputs[| index_0].getValue()); + var _a1 = array_clone(inputs[| index_1].getValue()); anchors[i + 0] = _a0; anchors[i + 1] = _a1; @@ -957,8 +958,8 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { _i1 = 0; } - var _a0 = inputs[| input_fix_len + _i0].getValue(); - var _a1 = inputs[| input_fix_len + _i1].getValue(); + var _a0 = array_clone(inputs[| input_fix_len + _i0].getValue()); + var _a1 = array_clone(inputs[| input_fix_len + _i1].getValue()); if(rond) { _a0[0] = round(_a0[0]); _a0[1] = round(_a0[1]); @@ -979,11 +980,13 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var anchors = []; for(var i = input_fix_len; i < ds_list_size(inputs); i++) { - var _anc = inputs[| i].getValue(); + var _anc = array_clone(inputs[| i].getValue()); + if(_rnd) { _anc[0] = round(_anc[0]); _anc[1] = round(_anc[2]); } + array_push(anchors, _anc); } outputs[| 2].setValue(anchors); diff --git a/scripts/node_pixel_sort/node_pixel_sort.gml b/scripts/node_pixel_sort/node_pixel_sort.gml index ba5cce5a8..0dcd40398 100644 --- a/scripts/node_pixel_sort/node_pixel_sort.gml +++ b/scripts/node_pixel_sort/node_pixel_sort.gml @@ -34,13 +34,13 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group attribute_surface_depth(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var _in = _data[0]; var _it = _data[1]; var _tr = _data[2]; var _dr = floor(_data[3] / 90) % 4; - if(_dr < 0) _dr = 4 + _dr; + if(_dr < 0) _dr = 4 + _dr; if(_it <= 0) return _outSurf; var sw = surface_get_width_safe(_outSurf); @@ -89,5 +89,5 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group _outSurf = mask_apply(_data[0], _outSurf, _data[4], _data[5]); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_registry/node_registry.gml b/scripts/node_registry/node_registry.gml index 4b9e4e280..cad3c9428 100644 --- a/scripts/node_registry/node_registry.gml +++ b/scripts/node_registry/node_registry.gml @@ -679,7 +679,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { var actions = ds_list_create(); addNodeCatagory("Actions", actions); __initNodeActions(actions); - + //var vct = ds_list_create(); //addNodeCatagory("VCT", vct); // addNodeObject(vct, "Biterator", s_node_print, "Node_Biterator", [1, Node_Biterator]); @@ -774,6 +774,11 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { addNodeObject(pcx_fn, "Array Set", s_node_array, "Node_PCX_Array_Set", [1, Node_PCX_Array_Set]); #endregion + var pcx_flow = ds_list_create(); #region + addNodePCXCatagory("Flow Control", pcx_flow); + addNodeObject(pcx_flow, "Condition", s_node_array, "Node_PCX_Condition", [1, Node_PCX_Condition]); + #endregion + //////////////////////////////////////////////////////////////// HIDDENS //////////////////////////////////////////////////////////////// var hid = ds_list_create(); #region diff --git a/scripts/node_repeat/node_repeat.gml b/scripts/node_repeat/node_repeat.gml index f4548b590..609a04105 100644 --- a/scripts/node_repeat/node_repeat.gml +++ b/scripts/node_repeat/node_repeat.gml @@ -284,12 +284,11 @@ function Node_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constructor _outSurf[i] = _out; doRepeat(_out, _inSurf[i]); } - - outputs[| 0].setValue(_outSurf); } else { _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], cDep); - outputs[| 0].setValue(_outSurf); doRepeat(_outSurf, _inSurf); } + + outputs[| 0].setValue(_outSurf); } } \ No newline at end of file diff --git a/scripts/node_rigid_activation/node_rigid_activation.yy b/scripts/node_rigid_activation/node_rigid_activation.yy index 60a03b850..e6f8db66a 100644 --- a/scripts/node_rigid_activation/node_rigid_activation.yy +++ b/scripts/node_rigid_activation/node_rigid_activation.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "rigidSim", - "path": "folders/nodes/data/rigidSim.yy", + "path": "folders/nodes/data/simulation/rigidSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_rigid_force_apply/node_rigid_force_apply.yy b/scripts/node_rigid_force_apply/node_rigid_force_apply.yy index 76648e72b..be484f8e8 100644 --- a/scripts/node_rigid_force_apply/node_rigid_force_apply.yy +++ b/scripts/node_rigid_force_apply/node_rigid_force_apply.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "rigidSim", - "path": "folders/nodes/data/rigidSim.yy", + "path": "folders/nodes/data/simulation/rigidSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_rigid_global/node_rigid_global.yy b/scripts/node_rigid_global/node_rigid_global.yy index 16707a8aa..b32d85467 100644 --- a/scripts/node_rigid_global/node_rigid_global.yy +++ b/scripts/node_rigid_global/node_rigid_global.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "rigidSim", - "path": "folders/nodes/data/rigidSim.yy", + "path": "folders/nodes/data/simulation/rigidSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_rigid_group/node_rigid_group.yy b/scripts/node_rigid_group/node_rigid_group.yy index 132948e73..0ff1a690d 100644 --- a/scripts/node_rigid_group/node_rigid_group.yy +++ b/scripts/node_rigid_group/node_rigid_group.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "rigidSim", - "path": "folders/nodes/data/rigidSim.yy", + "path": "folders/nodes/data/simulation/rigidSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_rigid_object/node_rigid_object.yy b/scripts/node_rigid_object/node_rigid_object.yy index a1dafbdb4..41e6d386e 100644 --- a/scripts/node_rigid_object/node_rigid_object.yy +++ b/scripts/node_rigid_object/node_rigid_object.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "rigidSim", - "path": "folders/nodes/data/rigidSim.yy", + "path": "folders/nodes/data/simulation/rigidSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_rigid_object_spawner/node_rigid_object_spawner.yy b/scripts/node_rigid_object_spawner/node_rigid_object_spawner.yy index b5a4e572a..bdf9abd72 100644 --- a/scripts/node_rigid_object_spawner/node_rigid_object_spawner.yy +++ b/scripts/node_rigid_object_spawner/node_rigid_object_spawner.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "rigidSim", - "path": "folders/nodes/data/rigidSim.yy", + "path": "folders/nodes/data/simulation/rigidSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_rigid_override/node_rigid_override.yy b/scripts/node_rigid_override/node_rigid_override.yy index 982658e27..58674f077 100644 --- a/scripts/node_rigid_override/node_rigid_override.yy +++ b/scripts/node_rigid_override/node_rigid_override.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "rigidSim", - "path": "folders/nodes/data/rigidSim.yy", + "path": "folders/nodes/data/simulation/rigidSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_rigid_render/node_rigid_render.yy b/scripts/node_rigid_render/node_rigid_render.yy index 6cb793892..e9da5bbb9 100644 --- a/scripts/node_rigid_render/node_rigid_render.yy +++ b/scripts/node_rigid_render/node_rigid_render.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "rigidSim", - "path": "folders/nodes/data/rigidSim.yy", + "path": "folders/nodes/data/simulation/rigidSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_rigid_variable/node_rigid_variable.yy b/scripts/node_rigid_variable/node_rigid_variable.yy index d6d04f71b..0696c7d5a 100644 --- a/scripts/node_rigid_variable/node_rigid_variable.yy +++ b/scripts/node_rigid_variable/node_rigid_variable.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "rigidSim", - "path": "folders/nodes/data/rigidSim.yy", + "path": "folders/nodes/data/simulation/rigidSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_sdf/node_sdf.gml b/scripts/node_sdf/node_sdf.gml index d07d4dc87..bb95dd989 100644 --- a/scripts/node_sdf/node_sdf.gml +++ b/scripts/node_sdf/node_sdf.gml @@ -30,7 +30,7 @@ function Node_SDF(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const temp_surface = [ surface_create(1, 1), surface_create(1, 1) ]; - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var inSurf = _data[0]; var _side = _data[2]; var _dist = _data[3]; @@ -54,12 +54,11 @@ function Node_SDF(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const BLEND_NORMAL; surface_reset_target(); - var step = ceil(log2(_n)); - var stepSize = power(2, step); - var bg = 0; - //step = 2; + var _step = ceil(log2(_n)); + var stepSize = power(2, _step); + var bg = 0; - repeat(step) { + repeat(_step) { stepSize /= 2; bg = !bg; @@ -92,5 +91,5 @@ function Node_SDF(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const surface_reset_target(); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_seperate_shapes/node_seperate_shapes.gml b/scripts/node_seperate_shapes/node_seperate_shapes.gml index d2748291f..0554f3780 100644 --- a/scripts/node_seperate_shapes/node_seperate_shapes.gml +++ b/scripts/node_seperate_shapes/node_seperate_shapes.gml @@ -141,7 +141,7 @@ function Node_Seperate_Shape(_x, _y, _group = noone) : Node(_x, _y, _group) cons for(var i = 0; i < px; i++) { _outSurf = surface_create_valid(ww, hh); - _val[@ i] = _outSurf; + _val[i] = _outSurf; surface_set_target(_outSurf); DRAW_CLEAR diff --git a/scripts/node_sprite_stack/node_sprite_stack.gml b/scripts/node_sprite_stack/node_sprite_stack.gml index 184baa358..d2160d58f 100644 --- a/scripts/node_sprite_stack/node_sprite_stack.gml +++ b/scripts/node_sprite_stack/node_sprite_stack.gml @@ -76,6 +76,7 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro var _hiC = _data[10]; var _hiA = _data[11]; + _pos = array_clone(_pos); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); if(_mov) { diff --git a/scripts/node_stack/node_stack.gml b/scripts/node_stack/node_stack.gml index a41b20945..b4814bbd1 100644 --- a/scripts/node_stack/node_stack.gml +++ b/scripts/node_stack/node_stack.gml @@ -14,11 +14,11 @@ function Node_Stack(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { setIsDynamicInput(1); - static createNewInput = function() { + static createNewInput = function() { #region var index = ds_list_size(inputs); inputs[| index] = nodeValue("Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, -1 ) .setVisible(true, true); - } + } #endregion if(!LOADING && !APPENDING) createNewInput(); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); @@ -27,7 +27,7 @@ function Node_Stack(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { attribute_surface_depth(); - static refreshDynamicInput = function() { + static refreshDynamicInput = function() { #region var _l = ds_list_create(); for( var i = 0; i < ds_list_size(inputs); i++ ) { if(i < input_fix_len || inputs[| i].value_from) @@ -43,23 +43,23 @@ function Node_Stack(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { inputs = _l; createNewInput(); - } + } #endregion - static onValueFromUpdate = function(index) { + static onValueFromUpdate = function(index) { #region if(index < input_fix_len) return; if(LOADING || APPENDING) return; refreshDynamicInput(); - } + } #endregion - static step = function() { + static step = function() { #region var _axis = inputs[| 0].getValue(); inputs[| 1].setVisible(_axis != 2); inputs[| 2].setVisible(_axis != 2); - } + } #endregion - static update = function(frame = PROJECT.animator.current_frame) { + static update = function(frame = PROJECT.animator.current_frame) { #region var _axis = inputs[| 0].getValue(); var _alig = inputs[| 1].getValue(); var _spac = inputs[| 2].getValue(); @@ -140,6 +140,6 @@ function Node_Stack(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { surface_reset_target(); outputs[| 1].setValue(atlas); - } + } #endregion } diff --git a/scripts/node_strand_break/node_strand_break.yy b/scripts/node_strand_break/node_strand_break.yy index cf595f527..23e007927 100644 --- a/scripts/node_strand_break/node_strand_break.yy +++ b/scripts/node_strand_break/node_strand_break.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "strandSim", - "path": "folders/nodes/data/strandSim.yy", + "path": "folders/nodes/data/simulation/strandSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_strand_collision/node_strand_collision.yy b/scripts/node_strand_collision/node_strand_collision.yy index eea8f9978..385739b58 100644 --- a/scripts/node_strand_collision/node_strand_collision.yy +++ b/scripts/node_strand_collision/node_strand_collision.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "strandSim", - "path": "folders/nodes/data/strandSim.yy", + "path": "folders/nodes/data/simulation/strandSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_strand_create/node_strand_create.yy b/scripts/node_strand_create/node_strand_create.yy index 6b2d89027..d7c39ba21 100644 --- a/scripts/node_strand_create/node_strand_create.yy +++ b/scripts/node_strand_create/node_strand_create.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "strandSim", - "path": "folders/nodes/data/strandSim.yy", + "path": "folders/nodes/data/simulation/strandSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_strand_force_apply/node_strand_force_apply.yy b/scripts/node_strand_force_apply/node_strand_force_apply.yy index 985a8b11c..7b2215d77 100644 --- a/scripts/node_strand_force_apply/node_strand_force_apply.yy +++ b/scripts/node_strand_force_apply/node_strand_force_apply.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "strandSim", - "path": "folders/nodes/data/strandSim.yy", + "path": "folders/nodes/data/simulation/strandSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_strand_gravity/node_strand_gravity.yy b/scripts/node_strand_gravity/node_strand_gravity.yy index f8692a0ab..2a9cd0baa 100644 --- a/scripts/node_strand_gravity/node_strand_gravity.yy +++ b/scripts/node_strand_gravity/node_strand_gravity.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "strandSim", - "path": "folders/nodes/data/strandSim.yy", + "path": "folders/nodes/data/simulation/strandSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_strand_length_adjust/node_strand_length_adjust.yy b/scripts/node_strand_length_adjust/node_strand_length_adjust.yy index 571d03833..0e7fb2740 100644 --- a/scripts/node_strand_length_adjust/node_strand_length_adjust.yy +++ b/scripts/node_strand_length_adjust/node_strand_length_adjust.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "strandSim", - "path": "folders/nodes/data/strandSim.yy", + "path": "folders/nodes/data/simulation/strandSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_strand_render/node_strand_render.yy b/scripts/node_strand_render/node_strand_render.yy index ff6c2d094..a66c90dde 100644 --- a/scripts/node_strand_render/node_strand_render.yy +++ b/scripts/node_strand_render/node_strand_render.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "strandSim", - "path": "folders/nodes/data/strandSim.yy", + "path": "folders/nodes/data/simulation/strandSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_strand_render_texture/node_strand_render_texture.yy b/scripts/node_strand_render_texture/node_strand_render_texture.yy index 545df8bbb..7d6adaf3d 100644 --- a/scripts/node_strand_render_texture/node_strand_render_texture.yy +++ b/scripts/node_strand_render_texture/node_strand_render_texture.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "strandSim", - "path": "folders/nodes/data/strandSim.yy", + "path": "folders/nodes/data/simulation/strandSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_strand_sim/node_strand_sim.yy b/scripts/node_strand_sim/node_strand_sim.yy index 549535890..8fb3c6ce3 100644 --- a/scripts/node_strand_sim/node_strand_sim.yy +++ b/scripts/node_strand_sim/node_strand_sim.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "strandSim", - "path": "folders/nodes/data/strandSim.yy", + "path": "folders/nodes/data/simulation/strandSim.yy", }, } \ No newline at end of file diff --git a/scripts/node_strand_update/node_strand_update.yy b/scripts/node_strand_update/node_strand_update.yy index 35a9ea6b8..16c79349a 100644 --- a/scripts/node_strand_update/node_strand_update.yy +++ b/scripts/node_strand_update/node_strand_update.yy @@ -6,6 +6,6 @@ "isDnD": false, "parent": { "name": "strandSim", - "path": "folders/nodes/data/strandSim.yy", + "path": "folders/nodes/data/simulation/strandSim.yy", }, } \ No newline at end of file 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 fd2dd3884..34f838b84 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 = inputs[| 0].getValue(); var bbox = drawGetBbox(xx, yy, _s); draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text); diff --git a/scripts/node_texture_remap/node_texture_remap.gml b/scripts/node_texture_remap/node_texture_remap.gml index 2df469833..9d756a169 100644 --- a/scripts/node_texture_remap/node_texture_remap.gml +++ b/scripts/node_texture_remap/node_texture_remap.gml @@ -20,7 +20,7 @@ function Node_Texture_Remap(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr attribute_surface_depth(); attribute_interpolation(); - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region if(!is_surface(_data[1])) return _outSurf; surface_set_shader(_outSurf, shader); @@ -30,5 +30,5 @@ function Node_Texture_Remap(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr surface_reset_shader(); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_threshold/node_threshold.gml b/scripts/node_threshold/node_threshold.gml index 90444ace9..de85ff4ea 100644 --- a/scripts/node_threshold/node_threshold.gml +++ b/scripts/node_threshold/node_threshold.gml @@ -36,17 +36,17 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); - static step = function() { + static step = function() { #region var _bright = inputs[| 1].getValue(); - inputs[| 2].setVisible(_bright); - inputs[| 3].setVisible(_bright); + inputs[| 2].setVisible(_bright); + inputs[| 3].setVisible(_bright); var _alpha = inputs[| 7].getValue(); - inputs[| 8].setVisible(_alpha); - inputs[| 9].setVisible(_alpha); - } + inputs[| 8].setVisible(_alpha); + inputs[| 9].setVisible(_alpha); + } #endregion - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var _bright = _data[1]; var _brightThreshold = _data[2]; var _brightSmooth = _data[3]; @@ -70,5 +70,5 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) _outSurf = mask_apply(_data[0], _outSurf, _data[4], _data[5]); return _outSurf; - } + } #endregion } diff --git a/scripts/node_time_remap/node_time_remap.gml b/scripts/node_time_remap/node_time_remap.gml index 25269b0c5..b1910329c 100644 --- a/scripts/node_time_remap/node_time_remap.gml +++ b/scripts/node_time_remap/node_time_remap.gml @@ -27,7 +27,7 @@ function Node_Time_Remap(_x, _y, _group = noone) : Node(_x, _y, _group) construc attribute_surface_depth(); - static update = function(frame = PROJECT.animator.current_frame) { + static update = function(frame = PROJECT.animator.current_frame) { #region var _inSurf = inputs[| 0].getValue(); var _map = inputs[| 1].getValue(); var _life = inputs[| 2].getValue(); @@ -63,5 +63,5 @@ function Node_Time_Remap(_x, _y, _group = noone) : Node(_x, _y, _group) construc surface_reset_target(); cacheCurrentFrame(_inSurf); - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_transform/node_transform.gml b/scripts/node_transform/node_transform.gml index 060c9acf2..3a0ed277b 100644 --- a/scripts/node_transform/node_transform.gml +++ b/scripts/node_transform/node_transform.gml @@ -86,7 +86,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) break; } - return [ww, hh]; + return [ ww, hh ]; } #endregion static centerAnchor = function() { #region @@ -128,10 +128,10 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var out_type = _data[9]; var out = _data[1]; - var pos = _data[2]; + var pos = array_clone(_data[2]); var pos_exact = _data[10]; - var anc = _data[3]; + var anc = array_clone(_data[3]); var rot_vel = vel * _data[8]; var rot = _data[5] + rot_vel; @@ -268,10 +268,10 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) _surf_out = _surf_out[preview_index]; } - var pos = getInputData(2); + var pos = array_clone(getInputData(2)); var _pos = [ pos[0], pos[1] ]; - var anc = getInputData(3); + var anc = array_clone(getInputData(3)); var _anc = [ anc[0], anc[1] ]; var rot = getInputData(5); diff --git a/scripts/node_transform_array/node_transform_array.gml b/scripts/node_transform_array/node_transform_array.gml index cbdd7f73f..429e77f42 100644 --- a/scripts/node_transform_array/node_transform_array.gml +++ b/scripts/node_transform_array/node_transform_array.gml @@ -22,8 +22,8 @@ function Node_Transform_Array(_x, _y, _group = noone) : Node_Processor(_x, _y, _ static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { var pos = inputs[| 0].getValue(); - var px = _x + pos[0] * _s; - var py = _y + pos[1] * _s; + var px = _x + pos[0] * _s; + var py = _y + pos[1] * _s; inputs[| 0].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); inputs[| 1].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); diff --git a/scripts/node_twirl/node_twirl.gml b/scripts/node_twirl/node_twirl.gml index 29c9e839e..ad23b3022 100644 --- a/scripts/node_twirl/node_twirl.gml +++ b/scripts/node_twirl/node_twirl.gml @@ -41,16 +41,16 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con attribute_oversample(); attribute_interpolation(); - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var pos = inputs[| 1].getValue(); var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); inputs[| 3].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny, 0, 1, THEME.anchor_scale_hori); - } + } #endregion - static processData = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { #region var center = _data[1]; var stren = _data[2]; var rad = _data[3]; @@ -69,5 +69,5 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con _outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]); return _outSurf; - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index bb44bde1f..75a34d510 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -346,8 +346,6 @@ function nodeValueUnit(_nodeValue) constructor { #region } #endregion static invApply = function(value, index = 0) { #region - value = array_clone(value); - if(mode == VALUE_UNIT.constant) return value; if(reference == noone) @@ -357,8 +355,6 @@ function nodeValueUnit(_nodeValue) constructor { #region } #endregion static apply = function(value, index = 0) { #region - value = array_clone(value); - if(mode == VALUE_UNIT.constant) return value; if(reference == noone) return value; @@ -374,25 +370,28 @@ function nodeValueUnit(_nodeValue) constructor { #region return inv? value / base : value * base; if(!is_array(base) && is_array(value)) { + var _val = array_create(array_length(value)); for( var i = 0, n = array_length(value); i < n; i++ ) - value[i] = inv? value[i] / base : value[i] * base; - return value; + _val[i] = inv? value[i] / base : value[i] * base; + return _val; } if(is_array(base) && !is_array(value)) return value; + var _val = array_create(array_length(value)); + switch(disp) { case VALUE_DISPLAY.padding : case VALUE_DISPLAY.vector : case VALUE_DISPLAY.vector_range : for( var i = 0, n = array_length(value); i < n; i++ ) - value[i] = inv? value[i] / base[i % 2] : value[i] * base[i % 2]; - return value; + _val[i] = inv? value[i] / base[i % 2] : value[i] * base[i % 2]; + return _val; case VALUE_DISPLAY.area : for( var i = 0; i < 4; i++ ) - value[i] = inv? value[i] / base[i % 2] : value[i] * base[i % 2]; - return value; + _val[i] = inv? value[i] / base[i % 2] : value[i] * base[i % 2]; + return _val; } return value; @@ -1223,7 +1222,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru if(cache_hit) { global.cache_hit++; - return array_clone(cache_value[2]); + return cache_value[2]; } } @@ -1238,7 +1237,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru cache_value[2] = val; cache_value[3] = applyUnit; - return array_clone(val); + return val; } #endregion static __getAnimValue = function(_time = PROJECT.animator.current_frame) { #region @@ -1402,6 +1401,10 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru var v = val[safe_mod(node.preview_index, array_length(val))]; if(array_length(v) >= 100) return $"[{array_length(v)}]"; } + + if(editWidget != noone && instanceof(editWidget) != "textArea" && string_length(string(val)) > 1024) + val = $"[Long string ({string_length(string(val))} char)]"; + return val; } #endregion diff --git a/scripts/node_wav_file_read/node_wav_file_read.gml b/scripts/node_wav_file_read/node_wav_file_read.gml index 17ace530e..363e765f7 100644 --- a/scripts/node_wav_file_read/node_wav_file_read.gml +++ b/scripts/node_wav_file_read/node_wav_file_read.gml @@ -1,4 +1,4 @@ -function Node_create_WAV_File_Read(_x, _y, _group = noone) { +function Node_create_WAV_File_Read(_x, _y, _group = noone) { #region var path = ""; if(!LOADING && !APPENDING && !CLONING) { path = get_open_filename(".wav", ""); @@ -11,9 +11,9 @@ function Node_create_WAV_File_Read(_x, _y, _group = noone) { node.doUpdate(); return node; -} +} #endregion -function Node_create_WAV_File_Read_path(_x, _y, path) { +function Node_create_WAV_File_Read_path(_x, _y, path) { #region if(!file_exists(path)) return noone; var node = new Node_WAV_File_Read(_x, _y, PANEL_GRAPH.getCurrentContext()); @@ -21,7 +21,7 @@ function Node_create_WAV_File_Read_path(_x, _y, path) { node.doUpdate(); return node; -} +} #endregion function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { name = "WAV File In"; @@ -75,31 +75,33 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const wav_file_prg = 0; wav_file_lim = 1; - attributes.preview_shift = 0; - attributes.preview_gain = 0.5; + #region attribute + attributes.preview_shift = 0; + attributes.preview_gain = 0.5; - array_push(attributeEditors, "Audio Preview"); + array_push(attributeEditors, "Audio Preview"); - array_push(attributeEditors, ["Gain", function() { return attributes.preview_gain; }, - new textBox(TEXTBOX_INPUT.number, function(val) { - attributes.preview_gain = val; - })]); + array_push(attributeEditors, ["Gain", function() { return attributes.preview_gain; }, + new textBox(TEXTBOX_INPUT.number, function(val) { + attributes.preview_gain = val; + })]); - array_push(attributeEditors, ["Shift", function() { return attributes.preview_shift; }, - new textBox(TEXTBOX_INPUT.number, function(val) { - attributes.preview_shift = val; - })]); + array_push(attributeEditors, ["Shift", function() { return attributes.preview_shift; }, + new textBox(TEXTBOX_INPUT.number, function(val) { + attributes.preview_shift = val; + })]); + #endregion - on_dragdrop_file = function(path) { + on_dragdrop_file = function(path) { #region if(updatePaths(path)) { doUpdate(); return true; } return false; - } + } #endregion - function checkPreview(force = false) { + function checkPreview(force = false) { #region if(content == noone) return; if(!force && is_surface(audio_surface)) return; @@ -135,9 +137,9 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const oy = ny; } surface_reset_target(); - } + } #endregion - function updatePaths(path) { + function updatePaths(path) { #region path = try_get_path(path); if(path == -1) return false; @@ -156,9 +158,9 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const content = file_read_wav(path); return true; - } + } #endregion - function readSoundComplete() { + function readSoundComplete() { #region outputs[| 0].setValue(content.sound); outputs[| 2].setValue(content.sample); outputs[| 3].setValue(content.channels); @@ -178,8 +180,9 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const buffer_write(bufferId, buffer_s16, round(content.sound[0][i] / 4 * 65535)); preview_audio = audio_create_buffer_sound(bufferId, buffer_s16, content.sample, 0, content.packet * 2, audio_mono); - } + } #endregion + #region ++++ inspector ++++ insp1UpdateTooltip = __txt("Refresh"); insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ]; @@ -197,8 +200,9 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const static onInspector2Update = function() { attributes.play = !attributes.play; } + #endregion - static step = function() { + static step = function() { #region if(file_read_wav_step()) { print("Load audio complete"); readSoundComplete(); @@ -217,19 +221,14 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const if(!attributes.play) return; if(PROJECT.animator.is_playing) { - if(PROJECT.animator.current_frame == 0) - audio_stop_sound(preview_audio); - var dur = PROJECT.animator.current_frame / PROJECT.animator.framerate - attributes.preview_shift; - //if(preview_id && PROJECT.animator.frame_progress) - // audio_sound_set_track_position(preview_id, dur); if(!audio_is_playing(preview_audio)) preview_id = audio_play_sound(preview_audio, 1, false, attributes.preview_gain, dur); } - } + } #endregion - static update = function(frame = PROJECT.animator.current_frame) { + static update = function(frame = PROJECT.animator.current_frame) { #region var path = inputs[| 0].getValue(); if(path == "") return; @@ -247,16 +246,18 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const var amp_ed = clamp(amp_ind + amp_win, 0, len); var val = 0; - for( var i = amp_st; i < amp_ed; i++ ) - val += content.sound[0][i] * content.sound[0][i]; - val /= amp_ed - amp_st; - val = sqrt(val); + if(amp_ed > amp_st) { + for( var i = amp_st; i < amp_ed; i++ ) + val += content.sound[0][i] * content.sound[0][i]; + val /= amp_ed - amp_st; + val = sqrt(val); + } var dec = 10 * log10(val); outputs[| 5].setValue(dec); - } + } #endregion - static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region if(content == noone) return; var bbox = drawGetBbox(xx, yy, _s); @@ -289,9 +290,9 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const draw_set_text(f_p0, fa_center, fa_bottom, COLORS._main_text); var ss = min(1, string_scale(str, bbox.w, bbox.h)); draw_text_transformed(bbox.xc, bbox.y1, str, ss, ss, 0); - } + } #endregion - static drawAnimationTimeline = function(_shf, _w, _h, _s) { //return 0; + static drawAnimationTimeline = function(_shf, _w, _h, _s) { #region if(content == noone) return; draw_set_color(COLORS._main_icon_dark); draw_set_alpha(1); @@ -315,5 +316,5 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const } draw_set_alpha(1); - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_wrap/node_wrap.gml b/scripts/node_wrap/node_wrap.gml index 50884de0b..19875d1e6 100644 --- a/scripts/node_wrap/node_wrap.gml +++ b/scripts/node_wrap/node_wrap.gml @@ -65,10 +65,10 @@ function Node_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons _surf = _surf[preview_index]; } - var tl = current_data[1]; - var tr = current_data[2]; - var bl = current_data[3]; - var br = current_data[4]; + var tl = array_clone(current_data[1]); + var tr = array_clone(current_data[2]); + var bl = array_clone(current_data[3]); + var br = array_clone(current_data[4]); tl[0] = _x + tl[0] * _s; tr[0] = _x + tr[0] * _s; diff --git a/scripts/node_wrap_perspective/node_wrap_perspective.gml b/scripts/node_wrap_perspective/node_wrap_perspective.gml index 325172df6..5722a1383 100644 --- a/scripts/node_wrap_perspective/node_wrap_perspective.gml +++ b/scripts/node_wrap_perspective/node_wrap_perspective.gml @@ -75,10 +75,10 @@ function Node_Warp_Perspective(_x, _y, _group = noone) : Node_Processor(_x, _y, var tool = 1; - var tl = current_data[tool * 4 + 2]; - var tr = current_data[tool * 4 + 3]; - var bl = current_data[tool * 4 + 4]; - var br = current_data[tool * 4 + 5]; + var tl = array_clone(current_data[tool * 4 + 2]); + var tr = array_clone(current_data[tool * 4 + 3]); + var bl = array_clone(current_data[tool * 4 + 4]); + var br = array_clone(current_data[tool * 4 + 5]); tl[0] = _x + tl[0] * _s; tr[0] = _x + tr[0] * _s; diff --git a/scripts/panel_node_cost/panel_console.gml b/scripts/panel_node_credit/panel_console.gml similarity index 100% rename from scripts/panel_node_cost/panel_console.gml rename to scripts/panel_node_credit/panel_console.gml diff --git a/scripts/panel_node_cost/panel_node_cost.gml b/scripts/panel_node_credit/panel_node_credit.gml similarity index 92% rename from scripts/panel_node_cost/panel_node_cost.gml rename to scripts/panel_node_credit/panel_node_credit.gml index 195a5abb2..1e6ea01be 100644 --- a/scripts/panel_node_cost/panel_node_cost.gml +++ b/scripts/panel_node_credit/panel_node_credit.gml @@ -33,9 +33,11 @@ For your convenience we have develop a node credit system which allows you to to var cc = i == 1? COLORS._main_text_accent : COLORS._main_text; - if(point_in_rectangle(mx, my, _bx, _by, _bx + _w, _by + _h)) + if(pHOVER && point_in_rectangle(mx, my, _bx, _by, _bx + _w, _by + _h)) { draw_sprite_stretched_ext(THEME.group_label, 1, _bx, _by, _w, _h, cc, 1); - else + if(mouse_press(mb_left, pFOCUS)) + url_open("https://ko-fi.com/makhamdev"); + } else draw_sprite_stretched_ext(THEME.group_label, 0, _bx, _by, _w, _h, cc, 1); draw_set_text(f_h5, fa_center, fa_top, cc); diff --git a/scripts/panel_node_cost/panel_node_cost.yy b/scripts/panel_node_credit/panel_node_credit.yy similarity index 85% rename from scripts/panel_node_cost/panel_node_cost.yy rename to scripts/panel_node_credit/panel_node_credit.yy index 218b01195..dbc609425 100644 --- a/scripts/panel_node_cost/panel_node_cost.yy +++ b/scripts/panel_node_credit/panel_node_credit.yy @@ -1,7 +1,7 @@ { "resourceType": "GMScript", "resourceVersion": "1.0", - "name": "panel_node_cost", + "name": "panel_node_credit", "isCompatibility": false, "isDnD": false, "parent": { diff --git a/scripts/point_rotate/point_rotate.gml b/scripts/point_rotate/point_rotate.gml index 06ed48e3b..6051a54b9 100644 --- a/scripts/point_rotate/point_rotate.gml +++ b/scripts/point_rotate/point_rotate.gml @@ -9,6 +9,6 @@ function point_rotate(px, py, ox, oy, a) { var cy = py - oy; var d = -degtorad(a); - return [ox + cx * cos(d) - cy * sin(d), - oy + cx * sin(d) + cy * cos(d)]; + return [ ox + cx * cos(d) - cy * sin(d), + oy + cx * sin(d) + cy * cos(d) ]; } \ No newline at end of file diff --git a/scripts/scrollPane/scrollPane.gml b/scripts/scrollPane/scrollPane.gml index 4d63cef99..c771fd52d 100644 --- a/scripts/scrollPane/scrollPane.gml +++ b/scripts/scrollPane/scrollPane.gml @@ -15,6 +15,7 @@ function scrollPane(_w, _h, ondraw) : widget() constructor { content_h = 0; is_scroll = true; + always_scroll = false; scroll_step = 64; @@ -24,7 +25,7 @@ function scrollPane(_w, _h, ondraw) : widget() constructor { static resize = function(_w, _h) { w = _w; h = _h; - surface_w = _w - is_scroll * ui(12); + surface_w = _w - (always_scroll || is_scroll) * ui(12); surface_h = _h; }