From e85e502f0148e64dc92e9ea09272eee0abbeeb90 Mon Sep 17 00:00:00 2001 From: Tanasart Date: Fri, 10 May 2024 09:01:14 +0700 Subject: [PATCH] - Fix error when viewing processor nodes with array inputs. --- .../__node_3d_displace/__node_3d_displace.gml | 2 ++ .../__node_3d_extrude/__node_3d_extrude.gml | 2 ++ scripts/__node_3d_light/__node_3d_light.gml | 2 ++ scripts/__node_3d_plane/__node_3d_plane.gml | 2 ++ .../__node_3d_prim_cone.gml | 2 ++ .../__node_3d_prim_cube.gml | 2 ++ .../__node_3d_prim_cylinder.gml | 2 ++ .../__node_3d_prim_sphere.gml | 2 ++ .../__node_3d_transform.gml | 2 ++ scripts/node_2d_light/node_2d_light.gml | 6 +++-- scripts/node_9slice/node_9slice.gml | 2 +- scripts/node_area/node_area.gml | 8 +++--- .../node_armature_bind/node_armature_bind.gml | 2 ++ scripts/node_bend/node_bend.gml | 12 --------- scripts/node_camera/node_camera.gml | 2 +- scripts/node_composite/node_composite.gml | 4 ++- scripts/node_crop/node_crop.gml | 6 +++-- scripts/node_dilate/node_dilate.gml | 4 ++- scripts/node_gradient/node_gradient.gml | 4 ++- scripts/node_mirror/node_mirror.gml | 6 +++-- .../node_normal_light/node_normal_light.gml | 4 ++- scripts/node_path_anchor/node_path_anchor.gml | 10 ++++--- scripts/node_plot_linear/node_plot_linear.gml | 8 +++--- scripts/node_repeat/node_repeat.gml | 20 ++++---------- scripts/node_sampler/node_sampler.gml | 2 ++ scripts/node_scatter/node_scatter.gml | 4 ++- scripts/node_shadow_cast/node_shadow_cast.gml | 2 ++ scripts/node_shape/node_shape.gml | 27 +++---------------- scripts/node_skew/node_skew.gml | 2 ++ scripts/node_spherize/node_spherize.gml | 4 ++- .../node_sprite_stack/node_sprite_stack.gml | 4 ++- scripts/node_stripe/node_stripe.gml | 6 +++-- scripts/node_transform/node_transform.gml | 13 +++++---- .../node_transform_array.gml | 4 ++- .../node_transform_single.gml | 2 ++ scripts/node_twirl/node_twirl.gml | 4 ++- scripts/node_vector2/node_vector2.gml | 6 +++-- scripts/node_warp/node_warp.gml | 10 ++++--- .../node_wrap_perspective.gml | 2 ++ scripts/node_zigzag/node_zigzag.gml | 4 ++- 40 files changed, 120 insertions(+), 92 deletions(-) diff --git a/scripts/__node_3d_displace/__node_3d_displace.gml b/scripts/__node_3d_displace/__node_3d_displace.gml index 3b6071523..b58c8e77a 100644 --- a/scripts/__node_3d_displace/__node_3d_displace.gml +++ b/scripts/__node_3d_displace/__node_3d_displace.gml @@ -81,6 +81,8 @@ function __Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr _3d_node_init(1, /*Transform*/ 4, 5, 1, 2, 3); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + PROCESSOR_OVERLAY_CHECK + _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny); } diff --git a/scripts/__node_3d_extrude/__node_3d_extrude.gml b/scripts/__node_3d_extrude/__node_3d_extrude.gml index 8d53ba803..8d838fb90 100644 --- a/scripts/__node_3d_extrude/__node_3d_extrude.gml +++ b/scripts/__node_3d_extrude/__node_3d_extrude.gml @@ -409,6 +409,8 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro } static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + PROCESSOR_OVERLAY_CHECK + _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny); } diff --git a/scripts/__node_3d_light/__node_3d_light.gml b/scripts/__node_3d_light/__node_3d_light.gml index 7060c38e1..02c1626e8 100644 --- a/scripts/__node_3d_light/__node_3d_light.gml +++ b/scripts/__node_3d_light/__node_3d_light.gml @@ -30,6 +30,8 @@ function Node_3D_Light(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) static processData = function(_output, _data, _output_index, _array_index = 0) { } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region + PROCESSOR_OVERLAY_CHECK + var _colr = current_data[in_d3d + 1]; var bbox = drawGetBbox(xx, yy, _s); draw_set_color(_colr); diff --git a/scripts/__node_3d_plane/__node_3d_plane.gml b/scripts/__node_3d_plane/__node_3d_plane.gml index 4c0f116c9..a8fb40722 100644 --- a/scripts/__node_3d_plane/__node_3d_plane.gml +++ b/scripts/__node_3d_plane/__node_3d_plane.gml @@ -118,6 +118,8 @@ function __Node_3D_Plane(_x, _y, _group = noone) : Node_Processor(_x, _y, _group } static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + PROCESSOR_OVERLAY_CHECK + if(inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false; var _out = outputs[| 0].getValue(); diff --git a/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml b/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml index d254803db..2a7550ccc 100644 --- a/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml +++ b/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml @@ -125,6 +125,8 @@ function __Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) generate_vb(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + PROCESSOR_OVERLAY_CHECK + _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny); } diff --git a/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml b/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml index cb44584a9..0e0f9aa58 100644 --- a/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml +++ b/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml @@ -83,6 +83,8 @@ function __Node_3D_Cube(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) _3d_node_init(1, /*Transform*/ 2, 4, 19, 18, 12); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, _panel) { + PROCESSOR_OVERLAY_CHECK + _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny); } diff --git a/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml b/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml index 860894317..e1093cca0 100644 --- a/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml +++ b/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml @@ -138,6 +138,8 @@ function __Node_3D_Cylinder(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr generate_vb(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + PROCESSOR_OVERLAY_CHECK + _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny); } diff --git a/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml b/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml index c2cdc93af..baa12aabe 100644 --- a/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml +++ b/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml @@ -140,6 +140,8 @@ function __Node_3D_Sphere(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou generate_vb(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + PROCESSOR_OVERLAY_CHECK + _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny); } diff --git a/scripts/__node_3d_transform/__node_3d_transform.gml b/scripts/__node_3d_transform/__node_3d_transform.gml index 8b5493e73..56fd2a5cf 100644 --- a/scripts/__node_3d_transform/__node_3d_transform.gml +++ b/scripts/__node_3d_transform/__node_3d_transform.gml @@ -65,6 +65,8 @@ function __Node_3D_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _g _3d_node_init(1, /*Transform*/ 4, 5, 1, 2, 3); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + PROCESSOR_OVERLAY_CHECK + _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny); } diff --git a/scripts/node_2d_light/node_2d_light.gml b/scripts/node_2d_light/node_2d_light.gml index 3f1fc506a..91ff957f7 100644 --- a/scripts/node_2d_light/node_2d_light.gml +++ b/scripts/node_2d_light/node_2d_light.gml @@ -77,11 +77,13 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _shape = getInputData(1); + PROCESSOR_OVERLAY_CHECK + + var _shape = current_data[1]; switch(_shape) { case LIGHT_SHAPE_2D.point : - var pos = getInputData(2); + var pos = current_data[2]; var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; diff --git a/scripts/node_9slice/node_9slice.gml b/scripts/node_9slice/node_9slice.gml index 8729910de..a0c1d216a 100644 --- a/scripts/node_9slice/node_9slice.gml +++ b/scripts/node_9slice/node_9slice.gml @@ -34,7 +34,7 @@ function Node_9Slice(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co } static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - if(array_length(current_data) < 1) return; + PROCESSOR_OVERLAY_CHECK var _dim = current_data[1]; diff --git a/scripts/node_area/node_area.gml b/scripts/node_area/node_area.gml index 4ab04c00b..821800e52 100644 --- a/scripts/node_area/node_area.gml +++ b/scripts/node_area/node_area.gml @@ -17,11 +17,11 @@ function Node_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons .setDisplay(VALUE_DISPLAY.vector); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - if(process_amount > 1) return; + PROCESSOR_OVERLAY_CHECK - var _pos = getInputData(0); - var _span = getInputData(1); - var _shape = getInputData(2); + var _pos = current_data[0]; + var _span = current_data[1]; + var _shape = current_data[2]; var px = _x + _pos[0] * _s; var py = _y + _pos[1] * _s; var ex = _span[0] * _s; diff --git a/scripts/node_armature_bind/node_armature_bind.gml b/scripts/node_armature_bind/node_armature_bind.gml index 0aec72496..95dadb635 100644 --- a/scripts/node_armature_bind/node_armature_bind.gml +++ b/scripts/node_armature_bind/node_armature_bind.gml @@ -66,6 +66,8 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr layer_remove = -1; layer_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { #region + PROCESSOR_OVERLAY_CHECK + ds_map_clear(surfMap); var index = -1; diff --git a/scripts/node_bend/node_bend.gml b/scripts/node_bend/node_bend.gml index 0eec89418..f7b683bfe 100644 --- a/scripts/node_bend/node_bend.gml +++ b/scripts/node_bend/node_bend.gml @@ -32,18 +32,6 @@ function Node_Bend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons attribute_surface_depth(); attribute_interpolation(); - static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - draw_set_color(COLORS._main_accent); - - //for( var i = 0, n = array_length(mesh); i < n; i++ ) { - // var _t = mesh[i]; - - // draw_line(_x + _t[0][0] * _s, _y + _t[0][1] * _s, _x + _t[1][0] * _s, _y + _t[1][1] * _s); - // draw_line(_x + _t[1][0] * _s, _y + _t[1][1] * _s, _x + _t[2][0] * _s, _y + _t[2][1] * _s); - // draw_line(_x + _t[2][0] * _s, _y + _t[2][1] * _s, _x + _t[0][0] * _s, _y + _t[0][1] * _s); - //} - } #endregion - static step = function() { #region var _typ = getInputData(2); diff --git a/scripts/node_camera/node_camera.gml b/scripts/node_camera/node_camera.gml index 408e04f84..29f4b4c7b 100644 --- a/scripts/node_camera/node_camera.gml +++ b/scripts/node_camera/node_camera.gml @@ -106,7 +106,7 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co static getPreviewValues = function() { return getInputData(input_fix_len); } static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, _params) { #region - if(array_length(current_data) == 0) return; + PROCESSOR_OVERLAY_CHECK var _out = outputs[| 0].getValue(); if(is_array(_out)) _out = _out[preview_index]; diff --git a/scripts/node_composite/node_composite.gml b/scripts/node_composite/node_composite.gml index 60e1aaf4f..a28878553 100644 --- a/scripts/node_composite/node_composite.gml +++ b/scripts/node_composite/node_composite.gml @@ -35,6 +35,8 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) layer_dragging = noone; layer_remove = -1; layer_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { #region + PROCESSOR_OVERLAY_CHECK + var amo = (ds_list_size(inputs) - input_fix_len) / data_length - 1; if(array_length(current_data) != ds_list_size(inputs)) return 0; @@ -316,7 +318,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } #endregion static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var pad = getInputData(0); + var pad = current_data[0]; var ww = overlay_w; var hh = overlay_h; diff --git a/scripts/node_crop/node_crop.gml b/scripts/node_crop/node_crop.gml index bbcbe435d..4e1c959cb 100644 --- a/scripts/node_crop/node_crop.gml +++ b/scripts/node_crop/node_crop.gml @@ -29,8 +29,10 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons static getPreviewValues = function() { return getInputData(0); } static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, params) { #region - var _inSurf = getSingleValue(0); - var _spRaw = getSingleValue(1); + PROCESSOR_OVERLAY_CHECK + + var _inSurf = current_data[0]; + var _spRaw = current_data[1]; var _splice; for( var i = 0, n = array_length(_spRaw); i < n; i++ ) diff --git a/scripts/node_dilate/node_dilate.gml b/scripts/node_dilate/node_dilate.gml index b4d1e8c2f..6d864d028 100644 --- a/scripts/node_dilate/node_dilate.gml +++ b/scripts/node_dilate/node_dilate.gml @@ -52,7 +52,9 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co attribute_interpolation(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var pos = getInputData(1); + PROCESSOR_OVERLAY_CHECK + + var pos = current_data[1]; var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; diff --git a/scripts/node_gradient/node_gradient.gml b/scripts/node_gradient/node_gradient.gml index 16b443611..bcbb1ad27 100644 --- a/scripts/node_gradient/node_gradient.gml +++ b/scripts/node_gradient/node_gradient.gml @@ -69,8 +69,10 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + PROCESSOR_OVERLAY_CHECK + var a = inputs[| 6].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; - var a = inputs[| 16].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; + var a = inputs[| 16].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[0]); active &= !a; } #endregion static step = function() { #region diff --git a/scripts/node_mirror/node_mirror.gml b/scripts/node_mirror/node_mirror.gml index 1e6d9a189..b6db9dc57 100644 --- a/scripts/node_mirror/node_mirror.gml +++ b/scripts/node_mirror/node_mirror.gml @@ -25,8 +25,10 @@ function Node_Mirror(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co attribute_surface_depth(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var _pos = getInputData(1); - var _ang = getInputData(2); + PROCESSOR_OVERLAY_CHECK + + var _pos = current_data[1]; + var _ang = current_data[2]; var _posx = _pos[0] * _s + _x; var _posy = _pos[1] * _s + _y; diff --git a/scripts/node_normal_light/node_normal_light.gml b/scripts/node_normal_light/node_normal_light.gml index 4dab477ce..fd6431629 100644 --- a/scripts/node_normal_light/node_normal_light.gml +++ b/scripts/node_normal_light/node_normal_light.gml @@ -35,7 +35,9 @@ function Node_Normal_Light(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro attribute_surface_depth(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - var pos = getInputData(4); + PROCESSOR_OVERLAY_CHECK + + var pos = current_data[4]; var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; diff --git a/scripts/node_path_anchor/node_path_anchor.gml b/scripts/node_path_anchor/node_path_anchor.gml index 3f15a2f20..9b1dc5d16 100644 --- a/scripts/node_path_anchor/node_path_anchor.gml +++ b/scripts/node_path_anchor/node_path_anchor.gml @@ -23,10 +23,12 @@ function Node_Path_Anchor(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou ]; static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _pos = getInputData(0); - var _cn1 = getInputData(1); - var _cn2 = getInputData(2); - var _mir = getInputData(3); + PROCESSOR_OVERLAY_CHECK + + var _pos = current_data[0]; + var _cn1 = current_data[1]; + var _cn2 = current_data[2]; + var _mir = current_data[3]; var px = _x + _pos[0] * _s; var py = _y + _pos[1] * _s; diff --git a/scripts/node_plot_linear/node_plot_linear.gml b/scripts/node_plot_linear/node_plot_linear.gml index a0f14f2de..465b0e4f7 100644 --- a/scripts/node_plot_linear/node_plot_linear.gml +++ b/scripts/node_plot_linear/node_plot_linear.gml @@ -136,15 +136,17 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou } static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _use_path = getSingleValue(20) != noone; + PROCESSOR_OVERLAY_CHECK + + var _use_path = current_data[20] != noone; if(!_use_path) { var a = inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; } - var a = inputs[| 28].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; - var a = inputs[| 30].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; + var a = inputs[| 28].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[0]); active &= !a; + var a = inputs[| 30].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[0]); active &= !a; } static processData = function(_outSurf, _data, _output_index, _array_index) { diff --git a/scripts/node_repeat/node_repeat.gml b/scripts/node_repeat/node_repeat.gml index 62857ea06..0e300bba9 100644 --- a/scripts/node_repeat/node_repeat.gml +++ b/scripts/node_repeat/node_repeat.gml @@ -109,23 +109,13 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co attribute_surface_depth(); - //static getDimension = function() { #region - // var _surf = getInputData(0); - // if(is_array(_surf)) { - // if(array_length(_surf) == 0) return [1, 1]; - // if(!is_surface(_surf[0])) return [1, 1]; - // return [ surface_get_width_safe(_surf[0]), surface_get_height_safe(_surf[0]) ]; - // } - - // if(!is_surface(_surf)) return [1, 1]; - // return [ surface_get_width_safe(_surf), surface_get_height_safe(_surf) ]; - //} #endregion - static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + PROCESSOR_OVERLAY_CHECK + var a = inputs[| 9].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, THEME.anchor); active &= !a; - var _pat = getInputData(3); - var _spos = getInputData(9); + var _pat = current_data[3]; + var _spos = current_data[9]; var px = _x + _spos[0] * _s; var py = _y + _spos[1] * _s; @@ -140,7 +130,7 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co } - var a = inputs[| 31].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getInputData(1)); active &= !a; + var a = inputs[| 31].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[1]); active &= !a; } #endregion static preGetInputs = function() { #region diff --git a/scripts/node_sampler/node_sampler.gml b/scripts/node_sampler/node_sampler.gml index 37c973081..8a35113ec 100644 --- a/scripts/node_sampler/node_sampler.gml +++ b/scripts/node_sampler/node_sampler.gml @@ -18,6 +18,8 @@ function Node_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c static getPreviewValues = function() { return getInputData(0); } static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + PROCESSOR_OVERLAY_CHECK + inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); var _suf = current_data[0]; diff --git a/scripts/node_scatter/node_scatter.gml b/scripts/node_scatter/node_scatter.gml index bae1bcc36..27806163d 100644 --- a/scripts/node_scatter/node_scatter.gml +++ b/scripts/node_scatter/node_scatter.gml @@ -147,6 +147,8 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c scatter_mapp = []; static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + PROCESSOR_OVERLAY_CHECK + var _distType = current_data[6]; if(_distType < 3) { @@ -154,7 +156,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c active &= !a; } - var a = inputs[| 29].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(1)); active &= !a; + var a = inputs[| 29].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[1]); active &= !a; } #endregion static onValueUpdate = function(index) { #region diff --git a/scripts/node_shadow_cast/node_shadow_cast.gml b/scripts/node_shadow_cast/node_shadow_cast.gml index 844875fa4..83ac0d46c 100644 --- a/scripts/node_shadow_cast/node_shadow_cast.gml +++ b/scripts/node_shadow_cast/node_shadow_cast.gml @@ -80,6 +80,8 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_surface_depth(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + PROCESSOR_OVERLAY_CHECK + inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); if(array_length(current_data) != ds_list_size(inputs)) return; diff --git a/scripts/node_shape/node_shape.gml b/scripts/node_shape/node_shape.gml index 1ae385700..95f8bc94d 100644 --- a/scripts/node_shape/node_shape.gml +++ b/scripts/node_shape/node_shape.gml @@ -117,6 +117,8 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con attribute_surface_depth(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + PROCESSOR_OVERLAY_CHECK + if(use_path) { draw_set_text(f_p3, fa_center, fa_top); draw_set_color(COLORS._main_accent); @@ -128,40 +130,19 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con ny = _y + p.y * _s; if(i) draw_line(ox, oy, nx, ny); - // draw_circle(nx, ny, 3, false); - // draw_text(nx, ny + 8, i); ox = nx; oy = ny; } - - // draw_set_color(c_red); - // for( var i = 0, n = array_length(triangles); i < n; i++ ) { - // var tri = triangles[i]; - // var p0 = tri[0]; - // var p1 = tri[1]; - // var p2 = tri[2]; - - // var p0x = _x + p0.x * _s; - // var p0y = _y + p0.y * _s; - // var p1x = _x + p1.x * _s; - // var p1y = _y + p1.y * _s; - // var p2x = _x + p2.x * _s; - // var p2y = _y + p2.y * _s; - - // draw_line(p0x, p0y, p1x, p1y); - // draw_line(p0x, p0y, p2x, p2y); - // draw_line(p1x, p1y, p2x, p2y); - // } return; } - var _type = getInputData(15); + var _type = current_data[15]; if(_type == 0) { inputs[| 3].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } else if(_type == 1) { - var _pos = getInputData(16); + var _pos = current_data[16]; var _px = _x + _pos[0] * _s; var _py = _y + _pos[1] * _s; diff --git a/scripts/node_skew/node_skew.gml b/scripts/node_skew/node_skew.gml index b19bd5638..36e18cbbc 100644 --- a/scripts/node_skew/node_skew.gml +++ b/scripts/node_skew/node_skew.gml @@ -58,6 +58,8 @@ function Node_Skew(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons } #endregion static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + PROCESSOR_OVERLAY_CHECK + inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); } #endregion diff --git a/scripts/node_spherize/node_spherize.gml b/scripts/node_spherize/node_spherize.gml index e3684854a..63d4f0c7a 100644 --- a/scripts/node_spherize/node_spherize.gml +++ b/scripts/node_spherize/node_spherize.gml @@ -58,7 +58,9 @@ function Node_Spherize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attributes.oversample = 2; static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var pos = getInputData(1); + PROCESSOR_OVERLAY_CHECK + + var pos = current_data[1]; var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; diff --git a/scripts/node_sprite_stack/node_sprite_stack.gml b/scripts/node_sprite_stack/node_sprite_stack.gml index e139b1979..a45bf968e 100644 --- a/scripts/node_sprite_stack/node_sprite_stack.gml +++ b/scripts/node_sprite_stack/node_sprite_stack.gml @@ -56,7 +56,9 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro preview_custom_x_max = 0; static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var pos = getInputData(4); + PROCESSOR_OVERLAY_CHECK + + var pos = current_data[4]; var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; diff --git a/scripts/node_stripe/node_stripe.gml b/scripts/node_stripe/node_stripe.gml index ae15423f2..e8084fe69 100644 --- a/scripts/node_stripe/node_stripe.gml +++ b/scripts/node_stripe/node_stripe.gml @@ -70,13 +70,15 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co attribute_surface_depth(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var pos = getInputData(4); + PROCESSOR_OVERLAY_CHECK + + var pos = current_data[4]; var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; var a = inputs[| 4].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; var a = inputs[| 2].drawOverlay(hover, active, px, py, _s, _mx, _my, _snx, _sny); active &= !a; - var a = inputs[| 16].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; + var a = inputs[| 16].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, current_data[0]); active &= !a; } #endregion static step = function() { #region diff --git a/scripts/node_transform/node_transform.gml b/scripts/node_transform/node_transform.gml index 48cc30864..e4be5d15e 100644 --- a/scripts/node_transform/node_transform.gml +++ b/scripts/node_transform/node_transform.gml @@ -334,7 +334,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region PROCESSOR_OVERLAY_CHECK - var _surf = getInputData(0); + var _surf = current_data[0]; if(is_array(_surf)) { if(array_length(_surf) == 0) return; _surf = _surf[preview_index]; @@ -346,16 +346,16 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) _surf_out = _surf_out[preview_index]; } - var __pos = getSingleValue(2); + var __pos = current_data[2]; var pos = [ __pos[0], __pos[1] ]; var _pos = [ __pos[0], __pos[1] ]; - var __anc = getSingleValue(3); + var __anc = current_data[3]; var anc = [ __anc[0], __anc[1] ]; var _anc = [ __anc[0], __anc[1] ]; - var rot = getSingleValue(5); - var sca = getSingleValue(6); + var rot = current_data[5]; + var sca = current_data[6]; var srw = surface_get_width_safe(_surf); var srh = surface_get_height_safe(_surf); @@ -542,6 +542,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) overlay_drag_sy = anc[1]; overlay_drag_px = pos[0]; overlay_drag_py = pos[1]; + } else if(point_in_circle(_mx, _my, tl[0], tl[1], 8) || point_in_circle(_mx, _my, tr[0], tr[1], 8) || point_in_circle(_mx, _my, bl[0], bl[1], 8) || @@ -559,10 +560,12 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) overlay_drag_my = _my; overlay_drag_sx = sca[0]; overlay_drag_sy = sca[1]; + } else if(point_in_circle(_mx, _my, rth[0], rth[1], 8)) { overlay_dragging = 3; overlay_drag_ma = point_direction(bax, bay, _mx, _my); overlay_drag_sa = rot; + } else if(point_in_triangle(_mx, _my, tl[0], tl[1], tr[0], tr[1], bl[0], bl[1]) || point_in_triangle(_mx, _my, tr[0], tr[1], bl[0], bl[1], br[0], br[1])) { overlay_dragging = 1; diff --git a/scripts/node_transform_array/node_transform_array.gml b/scripts/node_transform_array/node_transform_array.gml index c21036814..31256d5de 100644 --- a/scripts/node_transform_array/node_transform_array.gml +++ b/scripts/node_transform_array/node_transform_array.gml @@ -20,7 +20,9 @@ function Node_Transform_Array(_x, _y, _group = noone) : Node_Processor(_x, _y, _ .setDisplay(VALUE_DISPLAY.vector); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - var pos = getInputData(0); + PROCESSOR_OVERLAY_CHECK + + var pos = current_data[0]; var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; diff --git a/scripts/node_transform_single/node_transform_single.gml b/scripts/node_transform_single/node_transform_single.gml index 286e0db10..446e44880 100644 --- a/scripts/node_transform_single/node_transform_single.gml +++ b/scripts/node_transform_single/node_transform_single.gml @@ -48,6 +48,8 @@ function Node_Transform_Single(_x, _y, _group = noone) : Node_Processor(_x, _y, overlay_drag_sa = 0; static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + PROCESSOR_OVERLAY_CHECK + if(array_length(current_data) < ds_list_size(inputs)) return; var _surf = outputs[| 0].getValue(); diff --git a/scripts/node_twirl/node_twirl.gml b/scripts/node_twirl/node_twirl.gml index dab697abd..2cdd4520c 100644 --- a/scripts/node_twirl/node_twirl.gml +++ b/scripts/node_twirl/node_twirl.gml @@ -52,7 +52,9 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con attribute_interpolation(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var pos = getInputData(1); + PROCESSOR_OVERLAY_CHECK + + var pos = current_data[1]; var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; diff --git a/scripts/node_vector2/node_vector2.gml b/scripts/node_vector2/node_vector2.gml index 9b83a68b4..956826e3d 100644 --- a/scripts/node_vector2/node_vector2.gml +++ b/scripts/node_vector2/node_vector2.gml @@ -55,8 +55,10 @@ function Node_Vector2(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c ]; static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - var __ax = getInputData(0); - var __ay = getInputData(1); + PROCESSOR_OVERLAY_CHECK + + var __ax = current_data[0]; + var __ay = current_data[1]; if(is_array(__ax) || is_array(__ay)) return; diff --git a/scripts/node_warp/node_warp.gml b/scripts/node_warp/node_warp.gml index 9dc3e7383..d79505da2 100644 --- a/scripts/node_warp/node_warp.gml +++ b/scripts/node_warp/node_warp.gml @@ -73,16 +73,18 @@ function Node_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, params) { #region PROCESSOR_OVERLAY_CHECK + PROCESSOR_OVERLAY_CHECK + var _surf = outputs[| 0].getValue(); if(is_array(_surf)) { if(array_length(_surf) == 0) return; _surf = _surf[preview_index]; } - var tl = array_clone(getInputData(1)); - var tr = array_clone(getInputData(2)); - var bl = array_clone(getInputData(3)); - var br = array_clone(getInputData(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 9370a9eac..6f34606ea 100644 --- a/scripts/node_wrap_perspective/node_wrap_perspective.gml +++ b/scripts/node_wrap_perspective/node_wrap_perspective.gml @@ -55,6 +55,8 @@ function Node_Warp_Perspective(_x, _y, _group = noone) : Node_Processor(_x, _y, drag_s = [[0, 0], [0, 0]]; static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { + PROCESSOR_OVERLAY_CHECK + if(array_length(current_data) < ds_list_size(inputs)) return; var _surf = outputs[| 0].getValue(); diff --git a/scripts/node_zigzag/node_zigzag.gml b/scripts/node_zigzag/node_zigzag.gml index d27594b7e..606a8eb74 100644 --- a/scripts/node_zigzag/node_zigzag.gml +++ b/scripts/node_zigzag/node_zigzag.gml @@ -42,7 +42,9 @@ function Node_Zigzag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co attribute_surface_depth(); static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { - var pos = getInputData(2); + PROCESSOR_OVERLAY_CHECK + + var pos = current_data[2]; var px = _x + pos[0] * _s; var py = _y + pos[1] * _s;