mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-24 14:06:23 +01:00
[Vector Split] Fix surface value not being converted into dimension.
This commit is contained in:
parent
33a7cd02ed
commit
bb1dcd7b2d
3 changed files with 8 additions and 12 deletions
|
@ -39,7 +39,7 @@
|
|||
LATEST_VERSION = 1_16_00;
|
||||
VERSION = 1_17_11_0;
|
||||
SAVE_VERSION = 1_17_10_0;
|
||||
VERSION_STRING = "1.17.11.007";
|
||||
VERSION_STRING = "1.17.11";
|
||||
BUILD_NUMBER = 1_17_11_0;
|
||||
|
||||
HOTKEYS = ds_map_create();
|
||||
|
|
|
@ -57,7 +57,7 @@ function NodeValue_Vec2(_name, _node, _value, _data = {}) : NodeValue(_name, _no
|
|||
return sArr;
|
||||
|
||||
} else if (is_surface(val))
|
||||
return [ surface_get_width_safe(val), surface_get_height_safe(val) ];
|
||||
return surface_get_dimension(val);
|
||||
|
||||
return [ 1, 1 ];
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
function Node_Vector_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { #region
|
||||
function Node_Vector_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||
name = "Vector Split";
|
||||
color = COLORS.node_blend_number;
|
||||
batch_output = false;
|
||||
draw_padding = 4;
|
||||
|
||||
setDimension(96, 0);
|
||||
|
||||
draw_padding = 4;
|
||||
|
||||
newInput(0, nodeValue_Vec4("Vector", self, [ 0, 0, 0, 0 ]))
|
||||
newInput(0, nodeValue("Vector", self, CONNECT_TYPE.input, VALUE_TYPE.float, [ 0, 0, 0, 0 ]))
|
||||
.setDisplay(VALUE_DISPLAY.vector)
|
||||
.setArrayDynamic()
|
||||
.setVisible(true, true);
|
||||
|
||||
|
@ -31,11 +31,7 @@ function Node_Vector_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
|||
static processData = function(_output, _data, _output_index, _array_index = 0) {
|
||||
var _arr = _data[0];
|
||||
if(!is_array(_arr)) return _arr;
|
||||
|
||||
if(_output_index < array_length(_arr))
|
||||
return _arr[_output_index];
|
||||
|
||||
return 0;
|
||||
return array_safe_get(_arr, _output_index, 0);
|
||||
}
|
||||
|
||||
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
||||
|
@ -49,4 +45,4 @@ function Node_Vector_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
|||
var ss = string_scale(str, bbox.w, bbox.h);
|
||||
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
|
||||
}
|
||||
} #endregion
|
||||
}
|
Loading…
Reference in a new issue