[Vec2/3/4] Fix node not processing array input properly.

This commit is contained in:
Tanasart 2025-01-26 14:04:14 +07:00
parent 137397c501
commit 37662838db
4 changed files with 18 additions and 21 deletions

Binary file not shown.

View file

@ -179,12 +179,11 @@ function Node_Vector2(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
inputs[ 9].setVisible(gz_style == 2, gz_style == 2);
inputs[10].setVisible(gz_style != 0);
var vec = _outData[0];
vec[0] = _int? round(_x) : _x;
vec[1] = _int? round(_y) : _y;
_outData[0][0] = _int? round(_x) : _x;
_outData[0][1] = _int? round(_y) : _y;
_outData[1] = vec[0];
_outData[2] = vec[1];
_outData[1] = _outData[0][0];
_outData[2] = _outData[0][1];
return _outData;
}

View file

@ -42,14 +42,13 @@ function Node_Vector3(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
var _z = _data[2];
var _int = _data[3];
var vec = _outData[0];
vec[0] = _int? round(_x) : _x;
vec[1] = _int? round(_y) : _y;
vec[2] = _int? round(_z) : _z;
_outData[0][0] = _int? round(_x) : _x;
_outData[0][1] = _int? round(_y) : _y;
_outData[0][2] = _int? round(_z) : _z;
_outData[1] = vec[0];
_outData[2] = vec[1];
_outData[3] = vec[2];
_outData[1] = _outData[0][0];
_outData[2] = _outData[0][1];
_outData[3] = _outData[0][2];
return _outData;
}

View file

@ -48,16 +48,15 @@ function Node_Vector4(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
var _w = _data[3];
var _int = _data[4];
var vec = _outData[0];
vec[0] = _int? round(_x) : _x;
vec[1] = _int? round(_y) : _y;
vec[2] = _int? round(_z) : _z;
vec[3] = _int? round(_w) : _w;
_outData[0][0] = _int? round(_x) : _x;
_outData[0][1] = _int? round(_y) : _y;
_outData[0][2] = _int? round(_z) : _z;
_outData[0][3] = _int? round(_w) : _w;
_outData[1] = vec[0];
_outData[2] = vec[1];
_outData[3] = vec[2];
_outData[4] = vec[3];
_outData[1] = _outData[0][0];
_outData[2] = _outData[0][1];
_outData[3] = _outData[0][2];
_outData[4] = _outData[0][3];
return _outData;
}