This commit is contained in:
Tanasart 2024-05-02 17:13:35 +07:00
parent 3b91c72df9
commit 28ca18d6d2
36 changed files with 41 additions and 38 deletions

View file

@ -1,6 +1,6 @@
function Node_PCX(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_PCX(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Compute Node"; name = "Compute Node";
w = 96; setDimension(96, 48);;
destroy_when_upgroup = true; destroy_when_upgroup = true;
} }

View file

@ -1,7 +1,7 @@
function Node_PCX_Equation(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor { function Node_PCX_Equation(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor {
name = "Equation"; name = "Equation";
w = 96; setDimension(96, 48);;
ast = noone; ast = noone;
inputs[| 0] = nodeValue("Equation", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); inputs[| 0] = nodeValue("Equation", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "");

View file

@ -1,6 +1,6 @@
function Node_VFX_Trail(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_VFX_Trail(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "VFX Trail"; name = "VFX Trail";
w = 96; setDimension(96, 48);;
manual_ungroupable = false; manual_ungroupable = false;

View file

@ -1,6 +1,6 @@
function Node_Array_Range(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_Array_Range(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Array Range"; name = "Array Range";
w = 96; setDimension(96, 48);
inputs[| 0] = nodeValue("Start", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) inputs[| 0] = nodeValue("Start", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
.rejectArray(); .rejectArray();

View file

@ -1,6 +1,6 @@
function Node_Color_Mix(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { function Node_Color_Mix(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "Mix Color"; name = "Mix Color";
w = 96; setDimension(96, 48);;
inputs[| 0] = nodeValue("Color from", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); inputs[| 0] = nodeValue("Color from", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white);

View file

@ -91,8 +91,10 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
selectable = true; selectable = true;
clonable = true; clonable = true;
draw_padding = 4;
auto_height = true; auto_height = true;
draw_padding = 4;
draw_pad_w = 0;
draw_pad_h = 0;
display_parameter = new connectionParameter(); display_parameter = new connectionParameter();
@ -1058,8 +1060,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
_w *= _s; _w *= _s;
_h *= _s; _h *= _s;
_w -= draw_padding * 2; _w -= max(draw_padding, draw_pad_w) * 2;
_h -= draw_padding * 2 + 20 * pad_label; _h -= max(draw_padding, draw_pad_h) * 2 + 20 * pad_label;
var _xc = xx + w * _s / 2; var _xc = xx + w * _s / 2;
var _yc = yy + _h / 2 + pad_label * 20 + draw_padding; var _yc = yy + _h / 2 + pad_label * 20 + draw_padding;

View file

@ -1,7 +1,7 @@
function Node_DynaSurf_In(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_DynaSurf_In(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Input"; name = "Input";
color = COLORS.node_blend_dynaSurf; color = COLORS.node_blend_dynaSurf;
w = 96; setDimension(96, 48);;
manual_deletable = false; manual_deletable = false;
destroy_when_upgroup = true; destroy_when_upgroup = true;

View file

@ -33,6 +33,7 @@ function Node_Equation(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
name = "Equation"; name = "Equation";
color = COLORS.node_blend_number; color = COLORS.node_blend_number;
draw_pad_w = 10;
setDimension(96, 48); setDimension(96, 48);
ast = []; ast = [];
@ -167,7 +168,7 @@ function Node_Equation(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
var str = getInputData(0); var str = getInputData(0);
var bbox = drawGetBbox(xx, yy, _s); var bbox = drawGetBbox(xx, yy, _s);
var ss = string_scale(str, bbox.w - 10 * _s, bbox.h); var ss = string_scale(str, bbox.w, bbox.h);
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0); draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
} #endregion } #endregion

View file

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

View file

@ -1,6 +1,6 @@
function Node_Mesh_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_Mesh_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Mesh Transform"; name = "Mesh Transform";
w = 96; setDimension(96, 48);;
inputs[| 0] = nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone) inputs[| 0] = nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.mesh, noone)
.setVisible(true, true); .setVisible(true, true);

View file

@ -1,6 +1,6 @@
function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "Palette Extract"; name = "Palette Extract";
w = 96; setDimension(96, 48);;
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);

View file

@ -1,6 +1,6 @@
function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Path Array"; name = "Path Array";
w = 96; setDimension(96, 48);;
setIsDynamicInput(1); setIsDynamicInput(1);
cached_pos = ds_map_create(); cached_pos = ds_map_create();

View file

@ -1,6 +1,6 @@
function Node_Path_Bake(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_Path_Bake(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Bake Path"; name = "Bake Path";
w = 96; setDimension(96, 48);;
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone) inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone)
.setVisible(true, true); .setVisible(true, true);

View file

@ -1,6 +1,6 @@
function Node_Path_Blend(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_Path_Blend(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Blend Path"; name = "Blend Path";
w = 96; setDimension(96, 48);;
length = 0; length = 0;
inputs[| 0] = nodeValue("Path 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone) inputs[| 0] = nodeValue("Path 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone)

View file

@ -1,6 +1,6 @@
function Node_Path_Bridge(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_Path_Bridge(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Bridge Path"; name = "Bridge Path";
w = 96; setDimension(96, 48);;
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone) inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone)
.setVisible(true, true) .setVisible(true, true)

View file

@ -1,6 +1,6 @@
function Node_Path_Builder(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_Path_Builder(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Path Builder"; name = "Path Builder";
w = 96; setDimension(96, 48);;
length = []; length = [];
lengthAcc = []; lengthAcc = [];

View file

@ -1,6 +1,6 @@
function Node_Path_Map_Area(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_Path_Map_Area(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Remap Path"; name = "Remap Path";
w = 96; setDimension(96, 48);;
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone) inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone)
.setVisible(true, true); .setVisible(true, true);

View file

@ -1,7 +1,7 @@
function Node_Path_Plot(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_Path_Plot(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Plot Path"; name = "Plot Path";
length = 0; length = 0;
w = 96; setDimension(96, 48);;
inputs[| 0] = nodeValue("Output scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 8, 8 ]) inputs[| 0] = nodeValue("Output scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 8, 8 ])
.setDisplay(VALUE_DISPLAY.vector); .setDisplay(VALUE_DISPLAY.vector);

View file

@ -1,6 +1,6 @@
function Node_Path_Reverse(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_Path_Reverse(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Reverse Path"; name = "Reverse Path";
w = 96; setDimension(96, 48);;
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone) inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone)
.setVisible(true, true); .setVisible(true, true);

View file

@ -1,6 +1,6 @@
function Node_Path_Sample(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { function Node_Path_Sample(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "Sample Path"; name = "Sample Path";
w = 96; setDimension(96, 48);;
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone) inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone)
.setVisible(true, true); .setVisible(true, true);

View file

@ -1,6 +1,6 @@
function Node_Path_Shift(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_Path_Shift(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Shift Path"; name = "Shift Path";
w = 96; setDimension(96, 48);;
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone) inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone)
.setVisible(true, true); .setVisible(true, true);

View file

@ -1,6 +1,6 @@
function Node_Path_Smooth(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_Path_Smooth(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Smooth Path"; name = "Smooth Path";
w = 96; setDimension(96, 48);;
inputs[| 0] = nodeValue("Loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) inputs[| 0] = nodeValue("Loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false)
.rejectArray(); .rejectArray();

View file

@ -1,6 +1,6 @@
function Node_Path_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_Path_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Transform Path"; name = "Transform Path";
w = 96; setDimension(96, 48);;
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone) inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone)
.setVisible(true, true); .setVisible(true, true);

View file

@ -1,6 +1,6 @@
function Node_Path_Trim(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_Path_Trim(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Trim Path"; name = "Trim Path";
w = 96; setDimension(96, 48);;
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone) inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone)
.setVisible(true, true); .setVisible(true, true);

View file

@ -1,6 +1,6 @@
function Node_Path_Wave(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_Path_Wave(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Wave Path"; name = "Wave Path";
w = 96; setDimension(96, 48);;
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone) inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone)
.setVisible(true, true); .setVisible(true, true);

View file

@ -1,6 +1,6 @@
function Node_Project_Data(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_Project_Data(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Project Data"; name = "Project Data";
w = 96; setDimension(96, 48);;
outputs[| 0] = nodeValue("Name", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, "") outputs[| 0] = nodeValue("Name", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, "")
.setVisible(false); .setVisible(false);

View file

@ -1,6 +1,6 @@
function Node_Smoke_Domain_Queue(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) constructor { function Node_Smoke_Domain_Queue(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group) constructor {
name = "Queue Domain"; name = "Queue Domain";
w = 96; setDimension(96, 48);;
manual_ungroupable = false; manual_ungroupable = false;

View file

@ -2,7 +2,7 @@ function Node_Strand_Break(_x, _y, _group = noone) : _Node_Strand_Affector(_x, _
name = "Strand Break"; name = "Strand Break";
color = COLORS.node_blend_strand; color = COLORS.node_blend_strand;
icon = THEME.strandSim; icon = THEME.strandSim;
w = 96; setDimension(96, 48);;
manual_ungroupable = false; manual_ungroupable = false;

View file

@ -2,7 +2,7 @@ function Node_Strand_Collision(_x, _y, _group = noone) : Node(_x, _y, _group) co
name = "Strand Collision"; name = "Strand Collision";
color = COLORS.node_blend_strand; color = COLORS.node_blend_strand;
icon = THEME.strandSim; icon = THEME.strandSim;
w = 96; setDimension(96, 48);;
manual_ungroupable = false; manual_ungroupable = false;

View file

@ -2,7 +2,7 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const
name = "Strand Create"; name = "Strand Create";
color = COLORS.node_blend_strand; color = COLORS.node_blend_strand;
icon = THEME.strandSim; icon = THEME.strandSim;
w = 96; setDimension(96, 48);;
update_on_frame = true; update_on_frame = true;
manual_ungroupable = false; manual_ungroupable = false;

View file

@ -2,7 +2,7 @@ function Node_Strand_Force_Apply(_x, _y, _group = noone) : _Node_Strand_Affector
name = "Strand Force"; name = "Strand Force";
color = COLORS.node_blend_strand; color = COLORS.node_blend_strand;
icon = THEME.strandSim; icon = THEME.strandSim;
w = 96; setDimension(96, 48);;
manual_ungroupable = false; manual_ungroupable = false;

View file

@ -2,7 +2,7 @@ function Node_Strand_Gravity(_x, _y, _group = noone) : Node(_x, _y, _group) cons
name = "Strand Gravity"; name = "Strand Gravity";
color = COLORS.node_blend_strand; color = COLORS.node_blend_strand;
icon = THEME.strandSim; icon = THEME.strandSim;
w = 96; setDimension(96, 48);;
manual_ungroupable = false; manual_ungroupable = false;

View file

@ -2,7 +2,7 @@ function Node_Strand_Length_Adjust(_x, _y, _group = noone) : _Node_Strand_Affect
name = "Strand Length"; name = "Strand Length";
color = COLORS.node_blend_strand; color = COLORS.node_blend_strand;
icon = THEME.strandSim; icon = THEME.strandSim;
w = 96; setDimension(96, 48);;
manual_ungroupable = false; manual_ungroupable = false;

View file

@ -2,7 +2,7 @@ function Node_Strand_Update(_x, _y, _group = noone) : Node(_x, _y, _group) const
name = "Strand Update"; name = "Strand Update";
color = COLORS.node_blend_strand; color = COLORS.node_blend_strand;
icon = THEME.strandSim; icon = THEME.strandSim;
w = 96; setDimension(96, 48);;
manual_ungroupable = false; manual_ungroupable = false;

View file

@ -1,6 +1,6 @@
function Node_String(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { function Node_String(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "Text"; name = "Text";
w = 96; setDimension(96, 48);;
inputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); inputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "");

View file

@ -12,7 +12,7 @@
globalvar window_drag_sw; window_drag_sw = 0; globalvar window_drag_sw; window_drag_sw = 0;
globalvar window_drag_sh; window_drag_sh = 0; globalvar window_drag_sh; window_drag_sh = 0;
globalvar window_min_w; window_min_w = 960; globalvar window_min_w; window_min_setDimension(96, 48);0;
globalvar window_min_h; window_min_h = 600; globalvar window_min_h; window_min_h = 600;
globalvar window_preminimize_rect; window_preminimize_rect = [ 0, 0, 1, 1 ]; globalvar window_preminimize_rect; window_preminimize_rect = [ 0, 0, 1, 1 ];