mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-23 21:46:17 +01:00
- Fix error when viewing processor nodes with array inputs.
This commit is contained in:
parent
d461ac15cd
commit
e85e502f01
40 changed files with 120 additions and 92 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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++ )
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue