show param

This commit is contained in:
Tanasart 2024-03-28 20:18:02 +07:00
parent aa898c7fc4
commit 713ec674ab
144 changed files with 524 additions and 458 deletions

View file

@ -959,6 +959,7 @@
{"name":"node_palette","order":4,"path":"scripts/node_palette/node_palette.yy",},
{"name":"node_noise_bubble","order":17,"path":"scripts/node_noise_bubble/node_noise_bubble.yy",},
{"name":"buttonColor","order":1,"path":"scripts/buttonColor/buttonColor.yy",},
{"name":"sh_rim","order":54,"path":"shaders/sh_rim/sh_rim.yy",},
{"name":"notification_system","order":7,"path":"scripts/notification_system/notification_system.yy",},
{"name":"buffer_object","order":1,"path":"scripts/buffer_object/buffer_object.yy",},
{"name":"node_3d_mesh_sphere_uv","order":4,"path":"scripts/node_3d_mesh_sphere_uv/node_3d_mesh_sphere_uv.yy",},
@ -1760,6 +1761,7 @@
{"name":"addon","order":1,"path":"objects/addon/addon.yy",},
{"name":"_f_h3","order":3,"path":"fonts/_f_h3/_f_h3.yy",},
{"name":"s_node_math","order":1,"path":"sprites/s_node_math/s_node_math.yy",},
{"name":"node_rim","order":22,"path":"scripts/node_rim/node_rim.yy",},
{"name":"s_node_kuwahara","order":59,"path":"sprites/s_node_kuwahara/s_node_kuwahara.yy",},
{"name":"panel_text_editor","order":11,"path":"scripts/panel_text_editor/panel_text_editor.yy",},
{"name":"node_path_bake","order":15,"path":"scripts/node_path_bake/node_path_bake.yy",},

View file

@ -1243,6 +1243,7 @@
{"id":{"name":"vct_button","path":"scripts/vct_button/vct_button.yy",},},
{"id":{"name":"node_noise_bubble","path":"scripts/node_noise_bubble/node_noise_bubble.yy",},},
{"id":{"name":"buttonColor","path":"scripts/buttonColor/buttonColor.yy",},},
{"id":{"name":"sh_rim","path":"shaders/sh_rim/sh_rim.yy",},},
{"id":{"name":"notification_system","path":"scripts/notification_system/notification_system.yy",},},
{"id":{"name":"buffer_object","path":"scripts/buffer_object/buffer_object.yy",},},
{"id":{"name":"node_3d_mesh_sphere_uv","path":"scripts/node_3d_mesh_sphere_uv/node_3d_mesh_sphere_uv.yy",},},
@ -2157,6 +2158,7 @@
{"id":{"name":"string_decimal","path":"scripts/string_decimal/string_decimal.yy",},},
{"id":{"name":"_f_h3","path":"fonts/_f_h3/_f_h3.yy",},},
{"id":{"name":"s_node_math","path":"sprites/s_node_math/s_node_math.yy",},},
{"id":{"name":"node_rim","path":"scripts/node_rim/node_rim.yy",},},
{"id":{"name":"s_node_kuwahara","path":"sprites/s_node_kuwahara/s_node_kuwahara.yy",},},
{"id":{"name":"panel_text_editor","path":"scripts/panel_text_editor/panel_text_editor.yy",},},
{"id":{"name":"node_path_bake","path":"scripts/node_path_bake/node_path_bake.yy",},},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View file

@ -11,7 +11,7 @@ event_inherited();
dialog_h = ui(360);
title_height = 48;
anchor = ANCHOR.top | ANCHOR.right;
anchor = ANCHOR.top | ANCHOR.left;
dialog_resizable = true;
dialog_w_min = ui(200);

View file

@ -1,6 +1,5 @@
function Node_3D_Mesh(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) constructor {
name = "3D Mesh";
min_h = 128;
in_mesh = ds_list_size(inputs);

View file

@ -17,9 +17,7 @@ function Node_VFX_effector(_x, _y, _group = noone) : Node(_x, _y, _group) constr
manual_ungroupable = false;
node_draw_icon = s_node_vfx_accel;
w = 96;
h = 80;
min_h = h;
setDimension(96, 80);
seed = 1;
inputs[| 0] = nodeValue("Particles", self, JUNCTION_CONNECT.input, VALUE_TYPE.particle, -1 )

View file

@ -2,6 +2,7 @@ enum SHADER_UNIFORM {
integer,
float,
color,
texture,
}
function addShaderProp(_type = undefined, _key = undefined) {
@ -33,13 +34,14 @@ function Node_Shader(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
else
shader_set_f(_dat.key, _data[i]);
break;
case SHADER_UNIFORM.color : shader_set_color(_dat.key, _data[i]); break;
case SHADER_UNIFORM.texture : shader_set_surface(_dat.key, _data[i]); break;
}
}
} #endregion
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
return _outSurf;
} #endregion
static processData = function(_outSurf, _data, _output_index, _array_index) { return _outSurf; }
}

View file

@ -1,13 +1,12 @@
function Node_Shader_Processor(_x, _y, _group = noone) : Node_Shader(_x, _y, _group) constructor {
name = "";
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF )
.setDisplay(VALUE_DISPLAY.vector);
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone );
addShaderProp();
attribute_surface_depth();
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
static processShader = function(_outSurf, _data) { #region
var _surf = _data[0];
if(!is_surface(_surf)) return _outSurf;
@ -17,10 +16,16 @@ function Node_Shader_Processor(_x, _y, _group = noone) : Node_Shader(_x, _y, _gr
_outSurf = surface_verify(_outSurf, _sw, _sh, attrDepth());
surface_set_shader(_outSurf, shader);
shader_set_f("u_resolution", _sw, _sh);
setShader(_data);
draw_surface_safe(_surf);
surface_reset_shader();
return _outSurf;
} #endregion
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
return processShader(_outSurf, _data);
} #endregion
}

View file

@ -126,6 +126,11 @@ function areaBox(_onModify, _unit = noone) : widget() constructor {
unit.triggerButton.register(parent);
} #endregion
static isHovering = function() {
for( var i = 0, n = array_length(tb); i < n; i++ ) if(tb[i].isHovering()) return true;
return false;
}
static drawParam = function(params) { #region
setParam(params);
for(var i = 0; i < 4; i++) tb[i].setParam(params);
@ -147,14 +152,7 @@ function areaBox(_onModify, _unit = noone) : widget() constructor {
var _bhov = adjust_shape && hover;
var _bind = array_safe_get(_data, 4);
if(!is_array(_bind) && buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, _m, _bact, _bhov,, THEME.inspector_area, _bind) == 2) {
var val = (array_safe_get(_data, 4) + 1) % 2;
onModify(4, val);
}
var _tx =_x + _bs + ui(4);
if(onSurfaceSize != -1) {
if(_w - _bs > ui(100) && onSurfaceSize != -1) {
tooltip.index = mode;
var _bx = _x + _w - _bs;
@ -237,9 +235,14 @@ function areaBox(_onModify, _unit = noone) : widget() constructor {
_w -= _bs + ui(4);
}
_w -= _bs + ui(4);
if(_w - _bs > ui(100)) { #region
if(mode == AREA_MODE.padding) { #region
if(!is_array(_bind) && buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, _m, _bact, _bhov,, THEME.inspector_area, _bind) == 2) {
var val = (array_safe_get(_data, 4) + 1) % 2;
onModify(4, val);
}
if(mode == AREA_MODE.padding) {
var cc = link_value? COLORS._main_accent : COLORS._main_icon;
var _bx = _x;
var _by = _y + _h + ui(4) + _h / 2 - _bs / 2;
@ -247,13 +250,18 @@ function areaBox(_onModify, _unit = noone) : widget() constructor {
if(buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, _m, active, hover, _btxt, THEME.value_link, link_value, cc) == 2)
link_value = !link_value;
}
_w -= _bs + ui(4);
_x +=_bs + ui(4);
} #endregion
draw_sprite_stretched_ext(THEME.textbox, 3, _tx, _y, _w, _h, c_white, 1);
draw_sprite_stretched_ext(THEME.textbox, 0, _tx, _y, _w, _h, c_white, 0.5 + 0.5 * interactable);
draw_sprite_stretched_ext(THEME.textbox, 3, _x, _y, _w, _h, c_white, 1);
draw_sprite_stretched_ext(THEME.textbox, 0, _x, _y, _w, _h, c_white, 0.5 + 0.5 * interactable);
draw_sprite_stretched_ext(THEME.textbox, 3, _tx, _y + _h + ui(4), _w, _h, c_white, 1);
draw_sprite_stretched_ext(THEME.textbox, 0, _tx, _y + _h + ui(4), _w, _h, c_white, 0.5 + 0.5 * interactable);
draw_sprite_stretched_ext(THEME.textbox, 3, _x, _y + _h + ui(4), _w, _h, c_white, 1);
draw_sprite_stretched_ext(THEME.textbox, 0, _x, _y + _h + ui(4), _w, _h, c_white, 0.5 + 0.5 * interactable);
for(var i = 0; i < 4; i++)
tb[i].setFocusHover(active, hover);
@ -264,10 +272,10 @@ function areaBox(_onModify, _unit = noone) : widget() constructor {
var tb_h = _h;
if(mode == AREA_MODE.area) { #region
var tb_x0 = _tx;
var tb_x0 = _x;
var tb_y0 = _y;
var tb_x1 = _tx + tb_w;
var tb_x1 = _x + tb_w;
var tb_y1 = _y + _h + ui(4);
tb[0].label = "x";
@ -284,16 +292,16 @@ function areaBox(_onModify, _unit = noone) : widget() constructor {
#endregion
} else if(mode == AREA_MODE.padding) { #region
var tb_lx = _tx;
var tb_lx = _x;
var tb_ly = _y;
var tb_rx = _tx + tb_w;
var tb_rx = _x + tb_w;
var tb_ry = _y;
var tb_tx = _tx;
var tb_tx = _x;
var tb_ty = _y + _h + ui(4);
var tb_bx = _tx + tb_w;
var tb_bx = _x + tb_w;
var tb_by = _y + _h + ui(4);
tb[2].label = "l";
@ -310,10 +318,10 @@ function areaBox(_onModify, _unit = noone) : widget() constructor {
#endregion
} else if(mode == AREA_MODE.two_point) { #region
var tb_x0 = _tx;
var tb_x0 = _x;
var tb_y0 = _y;
var tb_x1 = _tx + tb_w;
var tb_x1 = _x + tb_w;
var tb_y1 = _y + _h + ui(4);
tb[0].label = "x0";

View file

@ -69,11 +69,13 @@ function buttonClass(_onClick, _icon = noone) : widget() constructor {
h = _h;
clicked = false;
hovering = hover && point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h);
var b = colorMultiply(self.blend, blend);
if(hover && point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h)) {
draw_sprite_stretched_ext(spr, toggled? 2 : 1, _x, _y, _w, _h, b, 1);
if(!activate_on_press && pressed && mouse_release(mb_left, active))
trigger();

View file

@ -14,6 +14,7 @@ function buttonAnchor(_onClick) : widget() constructor {
var cx = x + w / 2;
var cy = y + h / 2;
hovering = false;
for( var i = -1; i <= 1; i++ )
for( var j = -1; j <= 1; j++ ) {
@ -27,7 +28,11 @@ function buttonAnchor(_onClick) : widget() constructor {
draw_sprite_ext(THEME.prop_anchor, _in == index, _bx, _by, 1, 1, 0, cc, aa);
if(hov && mouse_click(mb_left, active)) onClick(_in);
if(hov) {
hovering = true;
if(mouse_click(mb_left, active))
onClick(_in);
}
}
resetFocus();

View file

@ -67,11 +67,12 @@ function buttonColor(_onApply, dialog = noone) : widget() constructor {
w = _w;
h = _h;
current_color = _color;
hovering = hover && point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h);
var _cw = _w;
var _bs = min(_h, ui(32));
if(interactable) {
if(_w - _bs > ui(64) && interactable) {
var bx = _x + _cw - ui(32);
_cw -= ui(32);
@ -103,6 +104,7 @@ function buttonColor(_onApply, dialog = noone) : widget() constructor {
var click = false;
if(ihover && hoverRect) {
draw_sprite_stretched(THEME.button, 1, _x, _y, _cw, _h);
if(mouse_press(mb_left, iactive)) {
trigger();
click = true;

View file

@ -27,10 +27,13 @@ function buttonGradient(_onApply, dialog = noone) : widget() constructor {
y = _y;
w = _w;
if(side_button && instanceof(side_button) == "buttonClass") {
var _bs = min(_h, ui(32));
hovering = hover && point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h);
if(_w - _bs > ui(100) && side_button && instanceof(side_button) == "buttonClass") {
side_button.setFocusHover(active, hover);
side_button.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide);
_w -= ui(40);
side_button.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide);
_w -= _bs + ui(8);
}
var _gw = _w - ui(8);

View file

@ -54,6 +54,7 @@ function buttonGroup(_data, _onClick) : widget() constructor {
current_selecting = _selecting;
while(is_array(current_selecting))
current_selecting = array_safe_get(current_selecting, 0);
hovering = hover && point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h);
var amo = array_length(data);
var ww = _w / amo;

View file

@ -28,10 +28,13 @@ function buttonPalette(_onApply, dialog = noone) : widget() constructor {
w = _w;
h = _h;
if(side_button && instanceof(side_button) == "buttonClass") {
var _bs = min(_h, ui(32));
hovering = hover && point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h);
if(_w - _bs > ui(100) && side_button && instanceof(side_button) == "buttonClass") {
side_button.setFocusHover(active, hover);
side_button.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide);
_w -= ui(40);
side_button.draw(_x + _w -_bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide);
_w -= _bs + ui(8);
}
var _pw = _w - ui(8);

View file

@ -56,6 +56,11 @@ function controlPointBox(_onModify) : widget() constructor {
widgets[i].register(parent);
}
static isHovering = function() {
for( var i = 0, n = array_length(widgets); i < n; i++ ) if(widgets[i].isHovering()) return true;
return false;
}
static drawParam = function(params) { #region
setParam(params);
tbCx.setParam(params);

View file

@ -51,6 +51,11 @@ function cornerBox(_onModify, _unit = noone) : widget() constructor {
tb[3].register(parent);
}
static isHovering = function() {
for( var i = 0, n = array_length(tb); i < n; i++ ) if(tb[i].isHovering()) return true;
return false;
}
static drawParam = function(params) {
setParam(params);
for(var i = 0; i < 4; i++) tb[i].setParam(params);

View file

@ -44,6 +44,7 @@ function curveBox(_onModify) : widget() constructor {
h = _h;
var cw = _w - ui(32);
hovering = false;
if(!is_array(_data) || array_length(_data) == 0) return 0;
if(is_array(_data[0])) return 0;
@ -304,6 +305,7 @@ function curveBox(_onModify) : widget() constructor {
if(hover && point_in_rectangle(_m[0], _m[1], _x, _y, _x + cw, _y + _h)) { #region
show_coord = true;
hovering = true;
if(mouse_press(mb_left, active)) {
if(node_hovering == -1) {

View file

@ -76,6 +76,11 @@ function matrixGrid(_type, _size, _onModify, _unit = noone) : widget() construct
tb[i].setSlidable(speed);
}
static isHovering = function() {
for( var i = 0, n = array_length(tb); i < n; i++ ) if(tb[i].isHovering()) return true;
return false;
}
static drawParam = function(params) {
setParam(params);
for(var i = 0; i < inputs; i++)

View file

@ -1,6 +1,5 @@
function Node_3D_Repeat(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constructor {
name = "3D Repeat";
min_h = 128;
inputs[| 0] = nodeValue("Objects", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3Mesh, noone )
.setArrayDepth(1)

View file

@ -1,9 +1,6 @@
function Node_FFT(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "FFT";
w = 96;
h = 72;
min_h = h;
setDimension(96, 72);
inputs[| 0] = nodeValue("Data", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [])
.setArrayDepth(1)

View file

@ -2,8 +2,7 @@ function Node_FLIP_Add_Rigidbody(_x, _y, _group = noone) : Node(_x, _y, _group)
name = "Add Rigidbody";
color = COLORS.node_blend_fluid;
icon = THEME.fluid_sim;
w = 96;
min_h = 96;
setDimension(96, 96);
manual_ungroupable = false;

View file

@ -18,8 +18,7 @@ function Node_FLIP_Apply_Force(_x, _y, _group = noone) : Node(_x, _y, _group) co
name = "Add Collider";
color = COLORS.node_blend_fluid;
icon = THEME.fluid_sim;
w = 96;
min_h = 96;
setDimension(96, 96);
manual_ungroupable = false;

View file

@ -2,8 +2,7 @@ function Node_FLIP_Apply_Velocity(_x, _y, _group = noone) : Node(_x, _y, _group)
name = "Apply Velocity";
color = COLORS.node_blend_fluid;
icon = THEME.fluid_sim;
w = 96;
min_h = 96;
setDimension(96, 96);
manual_ungroupable = false;

View file

@ -2,8 +2,7 @@ function Node_FLIP_Destroy(_x, _y, _group = noone) : Node(_x, _y, _group) constr
name = "Destroy Fluid";
color = COLORS.node_blend_fluid;
icon = THEME.fluid_sim;
w = 96;
min_h = 96;
setDimension(96, 96);
manual_ungroupable = false;

View file

@ -2,8 +2,7 @@ function Node_FLIP_Domain(_x, _y, _group = noone) : Node(_x, _y, _group) constru
name = "Domain";
color = COLORS.node_blend_fluid;
icon = THEME.fluid_sim;
w = 96;
min_h = 96;
setDimension(96, 96);
manual_ungroupable = false;
update_on_frame = true;

View file

@ -2,8 +2,7 @@ function Node_FLIP_Repel(_x, _y, _group = noone) : Node(_x, _y, _group) construc
name = "Repel";
color = COLORS.node_blend_fluid;
icon = THEME.fluid_sim;
w = 96;
min_h = 96;
setDimension(96, 96);
manual_ungroupable = false;

View file

@ -2,8 +2,7 @@ function Node_FLIP_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group) constr
name = "Spawner";
color = COLORS.node_blend_fluid;
icon = THEME.fluid_sim;
w = 96;
min_h = 96;
setDimension(96, 96);
manual_ungroupable = false;

View file

@ -2,8 +2,7 @@ function Node_FLIP_to_VFX(_x, _y, _group = noone) : Node(_x, _y, _group) constru
name = "FLIP to VFX";
color = COLORS.node_blend_fluid;
icon = THEME.fluid_sim;
w = 96;
min_h = 96;
setDimension(96, 96);
manual_ungroupable = false;

View file

@ -2,8 +2,7 @@ function Node_FLIP_Update(_x, _y, _group = noone) : Node(_x, _y, _group) constru
name = "Update";
color = COLORS.node_blend_fluid;
icon = THEME.fluid_sim;
w = 96;
min_h = 96;
setDimension(96, 96);
manual_ungroupable = false;

View file

@ -2,8 +2,7 @@ function Node_FLIP_Vortex(_x, _y, _group = noone) : Node(_x, _y, _group) constru
name = "Vortex";
color = COLORS.node_blend_fluid;
icon = THEME.fluid_sim;
w = 96;
min_h = 96;
setDimension(96, 96);
manual_ungroupable = false;

View file

@ -2,8 +2,7 @@ function Node_FLIP_Wall(_x, _y, _group = noone) : Node(_x, _y, _group) construct
name = "Wall";
color = COLORS.node_blend_fluid;
icon = THEME.fluid_sim;
w = 96;
min_h = 96;
setDimension(96, 96);
manual_ungroupable = false;

View file

@ -5,10 +5,7 @@ function Node_VFX_Override(_x, _y, _group = noone) : Node(_x, _y, _group) constr
node_draw_icon = s_node_vfx_override;
manual_ungroupable = false;
w = 96;
h = 80;
min_h = h;
setDimension(96, 80);
inputs[| 0] = nodeValue("Particles", self, JUNCTION_CONNECT.input, VALUE_TYPE.particle, -1 )
.setVisible(true, true);

View file

@ -5,10 +5,6 @@ function Node_VFX_Renderer_Output(_x, _y, _group = noone) : Node_Group_Output(_x
use_cache = CACHE_USE.auto;
manual_ungroupable = false;
w = 128;
h = 128;
min_h = h;
previewable = true;
inputs[| 0] = nodeValue("Output dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF)

View file

@ -3,12 +3,10 @@ function Node_VFX_Variable(_x, _y, _group = noone) : Node(_x, _y, _group) constr
color = COLORS.node_blend_vfx;
icon = THEME.vfx;
node_draw_icon = s_node_vfx_variable;
setDimension(96, 80);
manual_ungroupable = false;
w = 96;
h = 80;
min_h = h;
inputs[| 0] = nodeValue("Particles", self, JUNCTION_CONNECT.input, VALUE_TYPE.particle, -1 )
.setVisible(true, true);

View file

@ -1,9 +1,6 @@
function Node_Animation_Control(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Animation Control";
w = 96;
h = 96;
min_h = h;
setDimension(96, 96);
inputs[| 0] = nodeValue("Toggle Play / Pause", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, 0);

View file

@ -1,7 +1,6 @@
function Node_Argument(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Argument";
w = 96;
min_h = 32 + 24 * 1;
setDimension(96, 32 + 24 * 1);
draw_padding = 8;

View file

@ -1,9 +1,6 @@
function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Armature Create";
w = 96;
h = 72;
min_h = h;
setDimension(96, 72);
//inputs[| 0] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0);

View file

@ -1,8 +1,6 @@
function Node_Armature_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Armature Path";
w = 96;
h = 72;
min_h = h;
setDimension(96, 72);
inputs[| 0] = nodeValue("Armature", self, JUNCTION_CONNECT.input, VALUE_TYPE.armature, noone)
.setVisible(true, true)

View file

@ -1,9 +1,6 @@
function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Armature Pose";
w = 96;
h = 72;
min_h = h;
setDimension(96, 72);
inputs[| 0] = nodeValue("Armature", self, JUNCTION_CONNECT.input, VALUE_TYPE.armature, noone)
.setVisible(true, true);

View file

@ -1,8 +1,6 @@
function Node_Armature_Sample(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Armature Sample";
w = 96;
h = 72;
min_h = h;
setDimension(96, 72);
inputs[| 0] = nodeValue("Armature", self, JUNCTION_CONNECT.input, VALUE_TYPE.armature, noone)
.setVisible(true, true)

View file

@ -1,8 +1,6 @@
function Node_Array_Add(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Array Add";
w = 96;
h = 32 + 24;
setDimension(96, 32 + 24);
min_h = h;
inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)

View file

@ -1,9 +1,6 @@
function Node_Array_Composite(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Array Composite";
w = 96;
h = 32 + 24;
min_h = h;
setDimension(96, 32 + 24);
inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [])
.setArrayDepth(1)

View file

@ -1,9 +1,6 @@
function Node_Array_Convolute(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Array Convolute";
w = 96;
h = 32 + 24;
min_h = h;
setDimension(96, 32 + 24);
inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
.setArrayDepth(1)

View file

@ -1,9 +1,6 @@
function Node_Array_Copy(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Array Copy";
w = 96;
h = 32 + 24;
min_h = h;
setDimension(96, 32 + 24);
inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)
.setArrayDepth(1)

View file

@ -1,9 +1,6 @@
function Node_Array_CSV_Parse(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "CSV Parse";
w = 96;
h = 32 + 24;
min_h = h;
setDimension(96, 32 + 24);
inputs[| 0] = nodeValue("CSV string", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, 0)
.setVisible(true, true);

View file

@ -1,9 +1,6 @@
function Node_Array_Find(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Array Find";
w = 96;
h = 32 + 24;
min_h = h;
setDimension(96, 32 + 24);
inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)
.setVisible(true, true);

View file

@ -1,9 +1,6 @@
function Node_Array_Get(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Array Get";
w = 96;
h = 32 + 24;
min_h = h;
setDimension(96, 32 + 24);
inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)
.setVisible(true, true);

View file

@ -1,9 +1,6 @@
function Node_Array_Insert(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Array Insert";
w = 96;
h = 32 + 24;
min_h = h;
setDimension(96, 32 + 24);
inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)
.setVisible(true, true);

View file

@ -1,9 +1,6 @@
function Node_Array_Length(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Array Length";
w = 96;
h = 32 + 24;
min_h = h;
setDimension(96, 32 + 24);
inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)
.setVisible(true, true);

View file

@ -116,15 +116,11 @@ function Node_Array_Rearrange(_x, _y, _group = noone) : Node(_x, _y, _group) con
outputs[| 0].setType(_typ);
if(type != _typ) {
if(_typ == VALUE_TYPE.surface) {
w = 128;
h = 128;
min_h = h;
} else {
w = 96;
h = 32 + 24;
min_h = h;
}
if(_typ == VALUE_TYPE.surface)
setDimension(128, 128);
else
setDimension(96, 32 + 24);
type = _typ;
will_setHeight = true;
}

View file

@ -1,9 +1,6 @@
function Node_Array_Remove(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Array Remove";
w = 96;
h = 32 + 24;
min_h = h;
setDimension(96, 32 + 24);
inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)
.setVisible(true, true);

View file

@ -1,9 +1,6 @@
function Node_Array_Reverse(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Array Reverse";
w = 96;
h = 32 + 24;
min_h = h;
setDimension(96, 32 + 24);
inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)
.setVisible(true, true);

View file

@ -1,9 +1,6 @@
function Node_Array_Sample(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Array Sample";
w = 96;
h = 32 + 24;
min_h = h;
setDimension(96, 32 + 24);
inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [])
.setArrayDepth(1)

View file

@ -1,9 +1,6 @@
function Node_Array_Set(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Array Set";
w = 96;
h = 32 + 24;
min_h = h;
setDimension(96, 32 + 24);
inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)
.setVisible(true, true);

View file

@ -1,9 +1,6 @@
function Node_Array_Shift(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Array Shift";
w = 96;
h = 32 + 24;
min_h = h;
setDimension(96, 32 + 24);
inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)
.setVisible(true, true);

View file

@ -1,9 +1,6 @@
function Node_Array_Zip(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Array Zip";
w = 96;
h = 32 + 24;
min_h = h;
setDimension(96, 32 + 24);
inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)
.setVisible(true, true);

View file

@ -1,9 +1,6 @@
function Node_Audio_Loudness(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "Audio Loudness";
w = 96;
h = 72;
min_h = h;
setDimension(96, 72);
inputs[| 0] = nodeValue("Audio Data", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [])
.setArrayDepth(1)

View file

@ -1,10 +1,6 @@
function Node_Audio_Window(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Audio Window";
w = 128;
h = 128;
min_h = h;
inputs[| 0] = nodeValue("Audio data", self, JUNCTION_CONNECT.input, VALUE_TYPE.audioBit, noone)
.setVisible(true, true);

View file

@ -1,9 +1,8 @@
function Node_Boolean(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "Boolean";
color = COLORS.node_blend_number;
setDimension(64, 64);
w = 64;
min_h = 64;
hover_state = 0;
hover_state_to = 0;

View file

@ -144,10 +144,6 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc
combine_render_time = true;
previewable = true;
w = 128;
h = 128;
min_h = 128;
reset_all_child = false;
isInstancer = false;
instanceBase = noone;

View file

@ -80,8 +80,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
w = 128;
h = 128;
min_w = 0;
min_h = 0;
min_w = w;
min_h = h;
will_setHeight = false;
selectable = true;
@ -103,6 +103,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
draw_droppable = false;
junction_draw_pad_y = 32;
junction_draw_hei_y = 24;
branch_drawing = false;
#endregion
@ -175,6 +176,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
#endregion
#region ---- preview ----
show_parameter = false;
show_input_name = false;
show_output_name = false;
@ -337,11 +340,28 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
outputs_index = array_create_ext(outputs_amount, function(index) { return getOutputJunctionIndex(index); });
} #endregion
static setHeight = function() { #region
if(!auto_height) return;
static setDimension = function(_w = 128, _h = 128, _apply = true) { #region
INLINE
min_w = _w;
min_h = _h;
if(_apply) {
w = _w;
h = _h;
}
} #endregion
static setHeight = function() { #region
w = show_parameter? 192 : min_w;
if(!auto_height) return;
junction_draw_hei_y = show_parameter? 32 : 24;
junction_draw_pad_y = show_parameter? min_h : 32;
var _hi = junction_draw_pad_y + show_parameter * 4;
var _ho = junction_draw_pad_y + show_parameter * 4;
var _hi = ui(junction_draw_pad_y);
var _ho = ui(junction_draw_pad_y);
var _prev_surf = previewable && preview_draw &&
( is_surface(getGraphPreviewSurface()) ||
(preview_channel >= 0 && preview_channel < ds_list_size(outputs) && outputs[| preview_channel].type == VALUE_TYPE.surface)
@ -349,15 +369,12 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
for( var i = 0; i < ds_list_size(inputs); i++ ) {
var _inp = inputs[| i];
if(is_instanceof(_inp, NodeValue) && _inp.isVisible()) _hi += 24;
if(is_instanceof(_inp, NodeModule)) {
for( var j = 0, m = ds_list_size(_inp.inputs); j < m; j++ )
if(_inp.inputs[| j].isVisible()) _hi += 24;
}
if(is_instanceof(_inp, NodeValue) && _inp.isVisible())
_hi += show_parameter && _inp.graphWidgetH? _inp.graphWidgetH + 4 : junction_draw_hei_y;
}
for( var i = 0; i < ds_list_size(outputs); i++ )
if(outputs[| i].isVisible()) _ho += 24;
if(outputs[| i].isVisible()) _ho += junction_draw_hei_y;
h = max(min_h, _prev_surf * 128, _hi, _ho, attributes.node_height);
} run_in(1, function() { setHeight(); }); #endregion
@ -903,7 +920,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
out_cache_len = ds_list_size(outputs);
}
var _iny = yy + ui(junction_draw_pad_y) * _s;
var _iny = yy + (junction_draw_pad_y + junction_draw_hei_y * 0.5 * show_parameter) * _s;
for(var i = 0; i < inputs_amount; i++) {
var idx = inputs_index[i];
@ -911,18 +928,19 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
jun.x = xx;
jun.y = _iny;
_iny += 24 * _s * jun.isVisible();
_iny += junction_draw_hei_y * _s * jun.isVisible();
}
xx = xx + w * _s;
var _outy = yy + ui(junction_draw_pad_y) * _s;
var _outy = yy + (junction_draw_pad_y + junction_draw_hei_y * 0.5 * show_parameter) * _s;
for(var i = 0; i < outputs_amount; i++) {
var idx = outputs_index[i];
jun = outputs[| idx];
jun.x = xx;
jun.y = _outy;
_outy += 24 * _s * jun.isVisible();
_outy += junction_draw_hei_y * _s * jun.isVisible();
}
onPreDraw(_x, _y, _s, _iny, _outy);
@ -956,16 +974,19 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
var pad_label = draw_name && display_parameter.avoid_label;
var _w = w;
var _h = h;
var _h = show_parameter? min_h : h;
_w *= display_parameter.preview_scale / 100 * _s;
_h *= display_parameter.preview_scale / 100 * _s;
_w *= _s;
_h *= _s;
_w -= draw_padding * 2;
_h -= draw_padding * 2 + 20 * pad_label;
var _xc = xx + w * _s / 2;
var _yc = yy + (h * _s + 20 * pad_label) / 2;
var _yc = yy + _h / 2 + pad_label * 20 + draw_padding;
_w *= display_parameter.preview_scale / 100;
_h *= display_parameter.preview_scale / 100;
var x0 = _xc - _w / 2;
var x1 = _xc + _w / 2;
@ -1014,6 +1035,66 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
draw_set_alpha(1);
} #endregion
static drawJunctionWidget = function(_x, _y, _mx, _my, _s, _hover, _focus) { #region
if(!active) return;
var hover = noone;
var amo = input_display_list == -1? ds_list_size(inputs) : array_length(input_display_list);
var wh = 28 * _s;
var ww = w * _s * 0.5;
var wx = _x + w * _s - ww - 8;
var lx = _x + 12 * _s;
var _m = [ _mx, _my ];
var rx = PANEL_GRAPH.x;
var ry = PANEL_GRAPH.y;
var jy = 0;
var y1 = _y + h * _s;
var ay = 0;
if(wh > line_get_height(f_p2))
for(var i = 0; i < amo; i++) {
var ind = getInputJunctionIndex(i);
if(ind == noone) continue;
var jun = ds_list_get(inputs, ind, noone);
if(jun == noone || is_undefined(jun)) continue;
if(!jun.isVisible()) continue;
if(jy == 0) jy = jun.y - wh / 2;
var _param = new widgetParam(wx, jy, ww, wh, jun.showValue(),, _m, rx, ry);
_param.s = wh;
_param.font = f_p2;
jun.y = jy + wh / 2;
if(is_instanceof(jun, checkBox))
_param.halign = fa_center;
draw_set_text(f_sdf, fa_left, fa_center, jun.color_display);
draw_text_add(lx, jun.y, jun.getName(), _s * 0.25);
var wd = jun.graphWidget;
if(wd == noone) {
jy += wh + 4 * _s;
continue;
}
wd.setFocusHover(_focus, _hover);
var _h = wd.drawParam(_param);
jun.graphWidgetH = _h / _s;
jy += _h + 4 * _s;
if(wd.isHovering()) draggable = false;
}
ay = jy + 2 * _s;
h += max(0, (ay - y1) / _s);
} #endregion
static drawJunctions = function(_x, _y, _mx, _my, _s) { #region
if(!active) return;
var hover = noone;
@ -1167,11 +1248,6 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
jun.draw_blend = -1;
}
if(is_instanceof(jun, NodeModule)) {
jun.drawConnections(params, _inputs);
continue;
}
if(jun.isLeaf()) continue;
if(!jun.value_from.node.active) continue;
if(!jun.isVisible()) continue;
@ -1333,16 +1409,22 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
drawNodeBase(xx, yy, _s);
drawDimension(xx, yy, _s);
draggable = true;
if(previewable) {
if(preview_draw) drawPreview(xx, yy, _s);
try { onDrawNode(xx, yy, _mx, _my, _s, PANEL_GRAPH.node_hovering == self, PANEL_GRAPH.getFocusingNode() == self); }
catch(e) { log_warning("NODE onDrawNode", exception_print(e)); }
try {
var _hover = PANEL_GRAPH.node_hovering == self;
var _focus = PANEL_GRAPH.getFocusingNode() == self;
} else {
var bbox = drawGetBbox(xx, yy, _s);
draw_sprite_ext(THEME.preview_hide, 0, bbox.xc, bbox.yc, _s, _s, 0, c_white, 0.25);
onDrawNode(xx, yy, _mx, _my, _s, _hover, _focus);
}
catch(e) { log_warning("NODE onDrawNode", exception_print(e)); }
}
if(show_parameter)
drawJunctionWidget(xx, yy, _mx, _my, _s, _hover, _focus);
drawNodeName(xx, yy, _s);
@ -1762,7 +1844,9 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
_map.type = instanceof(self);
_map.group = group == noone? group : group.node_id;
_map.tool = isTool;
_map.previewable = previewable;
_map.show_parameter = show_parameter;
}
_map.attri = attributeSerialize();
@ -1836,6 +1920,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
renderActive = struct_try_get(load_map, "render", true);
previewable = struct_try_get(load_map, "previewable", previewable);
isTool = struct_try_get(load_map, "tool");
show_parameter = struct_try_get(load_map, "show_parameter");
}
if(struct_has(load_map, "attri"))

View file

@ -2,10 +2,7 @@ function Node_Feedback_Input(_x, _y, _group = noone) : Node_Group_Input(_x, _y,
name = "Feedback Input";
color = COLORS.node_blend_feedback;
is_group_io = true;
w = 96;
h = 32 + 24 * 2;
min_h = h;
setDimension(96, 32 + 24 * 2);
outputs[| 0].getValueDefault = method(outputs[| 0], outputs[| 0].getValueRecursive); //Get value from outside loop
outputs[| 0].getValueRecursive = function(_time) {

View file

@ -2,10 +2,7 @@ function Node_Feedback_Output(_x, _y, _group = noone) : Node_Group_Output(_x, _y
name = "Feedback Output";
color = COLORS.node_blend_feedback;
is_group_io = true;
w = 96;
h = 32 + 24 * 2;
min_h = h;
setDimension(96, 32 + 24 * 2);
inputs[| 1] = nodeValue("Feedback loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, -1)
.setVisible(true, true);

View file

@ -1,6 +1,6 @@
function Node_Gradient_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "Gradient Data";
w = 96;
setDimension(96);
inputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) )
.setVisible(true, true);

View file

@ -1,6 +1,6 @@
function Node_Gradient_Out(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "Gradient";
w = 96;
setDimension(96);
inputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject([ cola(c_black), cola(c_white) ]) );

View file

@ -1,6 +1,6 @@
function Node_Gradient_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "Gradient Shift";
w = 96;
setDimension(96);
inputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) )
.setVisible(true, true);

View file

@ -2,8 +2,6 @@ function Node_Graph_Preview(_x, _y, _group = noone) : Node(_x, _y, _group) const
name = "Graph Preview";
preview_draw = true;
min_h = 128;
inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone)
.rejectArray();

View file

@ -6,10 +6,7 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru
destroy_when_upgroup = true;
inParent = undefined;
w = 96;
h = 32 + 24;
min_h = h;
setDimension(96, 32 + 24);
#region data
data_type_list = [ "Integer", "Float", "Boolean", "Color", "Surface",

View file

@ -5,10 +5,7 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr
is_group_io = true;
destroy_when_upgroup = true;
w = 96;
h = 32 + 24;
min_h = h;
setDimension(96, 32 + 24);
inputs[| 0] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1)
.uncache()

View file

@ -3,8 +3,7 @@ function Node_Iterator_Each_Length(_x, _y, _group = noone) : Node(_x, _y, _group
color = COLORS.node_blend_loop;
destroy_when_upgroup = true;
w = 96;
min_h = 80;
setDimension(96, 80);
outputs[| 0] = nodeValue("Length", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, 0);

View file

@ -4,8 +4,7 @@ function Node_Iterator_Index(_x, _y, _group = noone) : Node(_x, _y, _group) cons
destroy_when_upgroup = true;
manual_ungroupable = false;
w = 96;
min_h = 80;
setDimension(96, 80);
outputs[| 0] = nodeValue("Loop index", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, 0);

View file

@ -5,10 +5,7 @@ function Node_Iterator_Input(_x, _y, _group = noone) : Node_Group_Input(_x, _y,
local_output = noone;
manual_ungroupable = false;
w = 96;
h = 32 + 24 * 2;
min_h = h;
setDimension(96, 32 + 24 * 2);
outputs[| 0].getValueDefault = method(outputs[| 0], outputs[| 0].getValueRecursive); //Get value from outside loop

View file

@ -3,9 +3,7 @@ function Node_Iterator_Length(_x, _y, _group = noone) : Node(_x, _y, _group) con
color = COLORS.node_blend_loop;
destroy_when_upgroup = true;
manual_ungroupable = false;
w = 96;
min_h = 80;
setDimension(96, 80);
outputs[| 0] = nodeValue("Length", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, 0);

View file

@ -4,10 +4,7 @@ function Node_Iterator_Output(_x, _y, _group = noone) : Node_Group_Output(_x, _y
is_group_io = true;
manual_ungroupable = false;
w = 96;
h = 32 + 24 * 2;
min_h = h;
setDimension(96, 32 + 24 * 2);
inputs[| 0].setFrom_condition = function(_valueFrom) { #region
if(instanceof(_valueFrom.node) != "Node_Iterator_Input") return true;

View file

@ -5,9 +5,6 @@ function Node_MIDI_In(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
name = "MIDI In";
update_on_frame = true;
w = 128;
min_h = 128;
rtmidi_init();
rtmidi_ignore_messages(true, true, true);

View file

@ -1,10 +1,8 @@
function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { #region
function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "Number";
color = COLORS.node_blend_number;
w = 96;
min_h = 32 + 24 * 1;
draw_padding = 4;
setDimension(96, 32 + 24 * 1);
display_output = 0;
wd_slider = slider(0, 1, 0.01, function(val) { inputs[| 0].setValue(val); } );
@ -51,10 +49,7 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
var int = getInputData(1);
var disp = getInputData(2);
var _h = min_h;
w = 96;
min_h = 56;
if(!show_parameter) setDimension(96, 56, false);
switch(disp) {
case 0 :
@ -63,27 +58,21 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
inputs[| 5].setVisible(false);
break;
case 1 :
if(inputs[| 0].isLeaf()) {
w = 160;
min_h = 96;
}
if(inputs[| 0].isLeaf() && !show_parameter) setDimension(160, 96, false);
inputs[| 3].setVisible(true);
inputs[| 4].setVisible(true);
inputs[| 5].setVisible(true);
break;
case 2 :
if(inputs[| 0].isLeaf()) {
w = 128;
min_h = 128;
}
if(inputs[| 0].isLeaf() && !show_parameter) setDimension(128, 128, false);
inputs[| 3].setVisible(false);
inputs[| 4].setVisible(false);
inputs[| 5].setVisible(false);
break;
}
if(_h != min_h) setHeight();
for( var i = 0; i < 1; i++ ) {
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
inputs[| i].editWidget.setSlidable(int? 0.1 : 0.01);
@ -121,6 +110,7 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
}
switch(disp) {
case 1 : #region
draw_set_text(f_sdf, fa_center, fa_center, _col);
draw_text_transformed(bbox.xc, bbox.y0 + 16 * _s, _int? round(val) : val, _s * 0.5, _s * 0.5, 0);
@ -172,7 +162,6 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
} else
slider_m = lerp_float(slider_m, 0, 5);
draggable = true;
if(_hover && point_in_rectangle(_mx, _my, sl_x0, sl_y0, sl_x1, sl_y1)) {
if(mouse_press(mb_left, _focus) && is_real(val)) {
slider_dragging = true;
@ -222,7 +211,6 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
} else
rotator_m = lerp_float(rotator_m, 0, 5);
draggable = true;
if(_hover && point_in_circle(_mx, _my, bbox.xc, bbox.yc, _ss / 2)) {
if(mouse_press(mb_left, _focus) && is_real(val)) {
rotator_dragging = true;
@ -238,4 +226,5 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
break; #endregion
}
} #endregion
} #endregion
}

View file

@ -1,6 +1,6 @@
function Node_Palette(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "Palette";
w = 96;
setDimension(96);
inputs[| 0] = nodeValue("Palette", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, DEF_PALETTE)
.setDisplay(VALUE_DISPLAY.palette);

View file

@ -1,7 +1,6 @@
function Node_Palette_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "Palette Replace";
w = 96;
setDimension(96);
inputs[| 0] = nodeValue("Palette in", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, DEF_PALETTE )
.setDisplay(VALUE_DISPLAY.palette)

View file

@ -1,6 +1,6 @@
function Node_Palette_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "Sort Palette";
w = 96;
setDimension(96);
inputs[| 0] = nodeValue("Palette in", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, DEF_PALETTE )
.setDisplay(VALUE_DISPLAY.palette)

View file

@ -3,10 +3,6 @@ function Node_PB(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr
icon = THEME.pixel_builder;
fullUpdate = true;
w = 128;
h = 128;
min_h = h;
static getNextNodesRaw = getNextNodes;
static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) {

View file

@ -2,10 +2,6 @@ function Node_PB_Layer(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
name = "PB Layer";
icon = THEME.pixel_builder;
w = 128;
h = 128;
min_h = h;
inputs[| 0] = nodeValue("Layer", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 );
outputs[| 0] = nodeValue("pBox", self, JUNCTION_CONNECT.output, VALUE_TYPE.pbBox, noone );

View file

@ -1,7 +1,6 @@
function Node_Print(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Print";
w = 96;
min_h = 32 + 24 * 1;
setDimension(96, 32 + 24 * 1);
draw_padding = 8;

View file

@ -597,6 +597,7 @@ function __initNodes() {
addNodeObject(filter, "Vignette", s_node_vignette, "Node_Vignette", [1, Node_Vignette],, "Apply vignette effect to the border.").setVersion(11630);
addNodeObject(filter, "FXAA", s_node_FXAA, "Node_FXAA", [1, Node_FXAA],, "Apply fast approximate anti-aliasing to the image.");
addNodeObject(filter, "Kuwahara", s_node_kuwahara, "Node_Kuwahara", [1, Node_Kuwahara]).setVersion(11660);
//addNodeObject(filter, "Rim", s_node_kuwahara, "Node_Rim", [1, Node_Rim]).setVersion(11690);
//addNodeObject(filter, "Blend Edge", s_node_FXAA, "Node_Blend_Edge", [1, Node_Blend_Edge]).setVersion(11640);
ds_list_add(filter, "Colors");

View file

@ -2,8 +2,7 @@ function Node_Rigid_Activate(_x, _y, _group = noone) : Node(_x, _y, _group) cons
name = "Activate Physics";
color = COLORS.node_blend_simulation;
icon = THEME.rigidSim;
w = 96;
min_h = 96;
setDimension(96, 96);
manual_ungroupable = false;

View file

@ -2,8 +2,7 @@ function Node_Rigid_Force_Apply(_x, _y, _group = noone) : Node(_x, _y, _group) c
name = "Apply Force";
color = COLORS.node_blend_simulation;
icon = THEME.rigidSim;
w = 96;
min_h = 96;
setDimension(96, 96);
manual_ungroupable = false;

View file

@ -2,8 +2,7 @@ function Node_Rigid_Global(_x, _y, _group = noone) : Node(_x, _y, _group) constr
name = "RigidSim Global";
color = COLORS.node_blend_simulation;
icon = THEME.rigidSim;
w = 96;
min_h = 96;
setDimension(96, 96);
manual_ungroupable = false;

View file

@ -8,8 +8,7 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr
name = "Object";
color = COLORS.node_blend_simulation;
icon = THEME.rigidSim;
w = 96;
min_h = 96;
setDimension(96, 96);
manual_ungroupable = false;

View file

@ -2,8 +2,7 @@ function Node_Rigid_Object_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group
name = "Object Spawner";
color = COLORS.node_blend_simulation;
icon = THEME.rigidSim;
w = 96;
min_h = 96;
setDimension(96, 96);
manual_ungroupable = false;

View file

@ -5,10 +5,7 @@ function Node_Rigid_Override(_x, _y, _group = noone) : Node(_x, _y, _group) cons
node_draw_icon = s_node_rigid_override;
manual_ungroupable = false;
w = 96;
h = 80;
min_h = h;
setDimension(96, 80);
inputs[| 0] = nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone )
.setVisible(true, true);

View file

@ -6,9 +6,6 @@ function Node_Rigid_Render_Output(_x, _y, _group = noone) : Node_Group_Output(_x
manual_ungroupable = false;
w = 128;
h = 128;
min_h = h;
previewable = true;
inputs[| 0] = nodeValue("Render dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, DEF_SURF)

View file

@ -6,9 +6,7 @@ function Node_Rigid_Variable(_x, _y, _group = noone) : Node(_x, _y, _group) cons
manual_ungroupable = false;
w = 96;
h = 80;
min_h = h;
setDimension(96, 80);
inputs[| 0] = nodeValue("Object", self, JUNCTION_CONNECT.input, VALUE_TYPE.rigid, noone )
.setVisible(true, true);

View file

@ -2,8 +2,7 @@ function Node_Rigid_Wall(_x, _y, _group = noone) : Node(_x, _y, _group) construc
name = "Wall";
color = COLORS.node_blend_simulation;
icon = THEME.rigidSim;
w = 96;
min_h = 96;
setDimension(96, 96);
manual_ungroupable = false;

View file

@ -0,0 +1,9 @@
function Node_Rim(_x, _y, _group = noone) : Node_Shader_Processor(_x, _y, _group) constructor {
name = "Rim";
shader = sh_rim;
inputs[| 1] = nodeValue("Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 )
.setDisplay(VALUE_DISPLAY.rotation);
addShaderProp(SHADER_UNIFORM.float, "rotation");
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "node_rim",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "effects",
"path": "folders/nodes/data/filter/effects.yy",
},
}

View file

@ -1,9 +1,6 @@
function Node_Shell(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Execute Shell";
w = 96;
min_h = 32 + 24 * 1;
draw_padding = 8;
setDimension(96, 32 + 24 * 1);
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "");

View file

@ -2,8 +2,7 @@ function Node_Smoke_Add(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) con
name = "Add Emitter";
color = COLORS.node_blend_smoke;
icon = THEME.smoke_sim;
w = 96;
min_h = 96;
setDimension(96, 96);
manual_ungroupable = false;

Some files were not shown because too many files have changed in this diff Show more