mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-25 06:26:42 +01:00
1.15.4 update
This commit is contained in:
parent
523153a7d5
commit
ea76ccf120
10 changed files with 14287 additions and 14015 deletions
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
@ -436,7 +436,6 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co
|
||||||
|
|
||||||
if(!_render) return;
|
if(!_render) return;
|
||||||
|
|
||||||
triggerRender();
|
|
||||||
render(_time);
|
render(_time);
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
function __txt_node_name(node, def = "") {
|
function __txt_node_name(node, def = "") {
|
||||||
gml_pragma("forceinline");
|
gml_pragma("forceinline");
|
||||||
|
|
||||||
if(TESTING) return def;
|
//if(TESTING) return def;
|
||||||
|
|
||||||
if(!struct_has(LOCALE.node, node))
|
if(!struct_has(LOCALE.node, node))
|
||||||
return def;
|
return def;
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
function __txt_node_tooltip(node, def = "") {
|
function __txt_node_tooltip(node, def = "") {
|
||||||
gml_pragma("forceinline");
|
gml_pragma("forceinline");
|
||||||
|
|
||||||
if(TESTING) return def;
|
//if(TESTING) return def;
|
||||||
|
|
||||||
if(!struct_has(LOCALE.node, node))
|
if(!struct_has(LOCALE.node, node))
|
||||||
return def;
|
return def;
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
function __txt_junction_name(node, type, index, def = "") {
|
function __txt_junction_name(node, type, index, def = "") {
|
||||||
gml_pragma("forceinline");
|
gml_pragma("forceinline");
|
||||||
|
|
||||||
if(TESTING) return def;
|
//if(TESTING) return def;
|
||||||
|
|
||||||
if(!struct_has(LOCALE.node, node))
|
if(!struct_has(LOCALE.node, node))
|
||||||
return def;
|
return def;
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
function __txt_junction_tooltip(node, type, index, def = "") {
|
function __txt_junction_tooltip(node, type, index, def = "") {
|
||||||
gml_pragma("forceinline");
|
gml_pragma("forceinline");
|
||||||
|
|
||||||
if(TESTING) return def;
|
//if(TESTING) return def;
|
||||||
|
|
||||||
if(!struct_has(LOCALE.node, node))
|
if(!struct_has(LOCALE.node, node))
|
||||||
return def;
|
return def;
|
||||||
|
|
|
@ -334,7 +334,6 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static isActiveDynamic = function() { #region
|
static isActiveDynamic = function() { #region
|
||||||
//if(passiveDynamic) return false;
|
|
||||||
if(update_on_frame) return true;
|
if(update_on_frame) return true;
|
||||||
|
|
||||||
for(var i = 0; i < ds_list_size(inputs); i++)
|
for(var i = 0; i < ds_list_size(inputs); i++)
|
||||||
|
|
|
@ -6,6 +6,7 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
||||||
w = 96;
|
w = 96;
|
||||||
min_h = 32 + 24 * 1;
|
min_h = 32 + 24 * 1;
|
||||||
draw_padding = 4;
|
draw_padding = 4;
|
||||||
|
display_output = 0;
|
||||||
|
|
||||||
wd_slider = new slider(0, 1, 0.01, function(val) { inputs[| 0].setValue(val); } );
|
wd_slider = new slider(0, 1, 0.01, function(val) { inputs[| 0].setValue(val); } );
|
||||||
wd_slider.spr = THEME.node_slider;
|
wd_slider.spr = THEME.node_slider;
|
||||||
|
@ -30,15 +31,15 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
||||||
outputs[| 0] = nodeValue("Number", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0);
|
outputs[| 0] = nodeValue("Number", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0);
|
||||||
|
|
||||||
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||||
var __ax = inputs[| 0].getValueCached();
|
var __ax = getInputData(0);
|
||||||
if(is_array(__ax)) return;
|
if(is_array(__ax)) return;
|
||||||
|
|
||||||
inputs[| 0].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny);
|
inputs[| 0].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny);
|
||||||
}
|
}
|
||||||
|
|
||||||
static step = function() {
|
static step = function() {
|
||||||
var int = inputs[| 1].getValueCached();
|
var int = getInputData(1);
|
||||||
var disp = inputs[| 2].getValueCached();
|
var disp = getInputData(2);
|
||||||
|
|
||||||
w = 96;
|
w = 96;
|
||||||
min_h = 56;
|
min_h = 56;
|
||||||
|
@ -83,9 +84,9 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
||||||
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
||||||
var bbox = drawGetBbox(xx, yy, _s);
|
var bbox = drawGetBbox(xx, yy, _s);
|
||||||
var val = display_output;
|
var val = display_output;
|
||||||
var disp = inputs[| 2].getValueCached();
|
var disp = getInputData(2);
|
||||||
var rang = inputs[| 3].getValueCached();
|
var rang = getInputData(3);
|
||||||
var stp = inputs[| 4].getValueCached();
|
var stp = getInputData(4);
|
||||||
|
|
||||||
if(inputs[| 0].value_from != noone || disp == 0) {
|
if(inputs[| 0].value_from != noone || disp == 0) {
|
||||||
draw_set_text(f_h1, fa_center, fa_center, COLORS._main_text);
|
draw_set_text(f_h1, fa_center, fa_center, COLORS._main_text);
|
||||||
|
@ -179,8 +180,8 @@ function Node_Vector2(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
wd_pan_my = 0;
|
wd_pan_my = 0;
|
||||||
|
|
||||||
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||||
var __ax = inputs[| 0].getValueCached();
|
var __ax = getInputData(0);
|
||||||
var __ay = inputs[| 1].getValueCached();
|
var __ay = getInputData(1);
|
||||||
|
|
||||||
if(is_array(__ax) || is_array(__ay)) return;
|
if(is_array(__ax) || is_array(__ay)) return;
|
||||||
|
|
||||||
|
@ -228,8 +229,8 @@ function Node_Vector2(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
}
|
}
|
||||||
|
|
||||||
static step = function() {
|
static step = function() {
|
||||||
var int = inputs[| 2].getValueCached();
|
var int = getInputData(2);
|
||||||
var disp = inputs[| 3].getValueCached();
|
var disp = getInputData(3);
|
||||||
|
|
||||||
for( var i = 0; i < 2; i++ ) {
|
for( var i = 0; i < 2; i++ ) {
|
||||||
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
|
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
|
||||||
|
@ -257,7 +258,7 @@ function Node_Vector2(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
}
|
}
|
||||||
|
|
||||||
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
||||||
var disp = inputs[| 3].getValueCached();
|
var disp = getInputData(3);
|
||||||
var vec = getSingleValue(0,, true);
|
var vec = getSingleValue(0,, true);
|
||||||
var bbox = drawGetBbox(xx, yy, _s);
|
var bbox = drawGetBbox(xx, yy, _s);
|
||||||
|
|
||||||
|
@ -412,7 +413,7 @@ function Node_Vector3(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
static step = function() {
|
static step = function() {
|
||||||
var int = inputs[| 3].getValueCached();
|
var int = getInputData(3);
|
||||||
for( var i = 0; i < 3; i++ ) {
|
for( var i = 0; i < 3; i++ ) {
|
||||||
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
|
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
|
||||||
inputs[| i].editWidget.slide_speed = int? 1 : 0.1;
|
inputs[| i].editWidget.slide_speed = int? 1 : 0.1;
|
||||||
|
@ -467,7 +468,7 @@ function Node_Vector4(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
static step = function() {
|
static step = function() {
|
||||||
var int = inputs[| 4].getValueCached();
|
var int = getInputData(4);
|
||||||
for( var i = 0; i < 4; i++ ) {
|
for( var i = 0; i < 4; i++ ) {
|
||||||
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
|
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
|
||||||
inputs[| i].editWidget.slide_speed = int? 1 : 0.1;
|
inputs[| i].editWidget.slide_speed = int? 1 : 0.1;
|
||||||
|
@ -532,7 +533,7 @@ function Node_Vector_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
||||||
draw_set_text(f_h1, fa_center, fa_center, COLORS._main_text);
|
draw_set_text(f_h1, fa_center, fa_center, COLORS._main_text);
|
||||||
var str = "";
|
var str = "";
|
||||||
for( var i = 0; i < 4; i++ )
|
for( var i = 0; i < 4; i++ )
|
||||||
if(outputs[| i].visible) str += $"{outputs[| i].getValueCached()}\n";
|
if(outputs[| i].visible) str += $"{outputs[| i].getValue()}\n";
|
||||||
|
|
||||||
str = string_trim(str);
|
str = string_trim(str);
|
||||||
var bbox = drawGetBbox(xx, yy, _s);
|
var bbox = drawGetBbox(xx, yy, _s);
|
||||||
|
|
|
@ -35,7 +35,7 @@ function Node_Particle(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y, _
|
||||||
var _dim = getInputData(input_len + 0);
|
var _dim = getInputData(input_len + 0);
|
||||||
var _outSurf = outputs[| 0].getValue();
|
var _outSurf = outputs[| 0].getValue();
|
||||||
|
|
||||||
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth());
|
_outSurf = surface_verify(_outSurf, array_safe_get(_dim, 0, 1), array_safe_get(_dim, 1, 1), attrDepth());
|
||||||
outputs[| 0].setValue(_outSurf);
|
outputs[| 0].setValue(_outSurf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,18 +52,10 @@ function Node_Particle(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y, _
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static onUpdate = function() { #region
|
static onUpdate = function() { #region
|
||||||
if(ANIMATION_STATIC) {
|
|
||||||
if(!recoverCache()) {
|
|
||||||
var _dim = getInputData(input_len + 0);
|
var _dim = getInputData(input_len + 0);
|
||||||
var _outSurf = outputs[| 0].getValue();
|
var _outSurf = outputs[| 0].getValue();
|
||||||
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth());
|
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth());
|
||||||
outputs[| 0].setValue(_outSurf);
|
outputs[| 0].setValue(_outSurf);
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(recoverCache())
|
|
||||||
return;
|
|
||||||
|
|
||||||
if(PROJECT.animator.current_frame == 0)
|
if(PROJECT.animator.current_frame == 0)
|
||||||
reset();
|
reset();
|
||||||
|
|
|
@ -45,7 +45,6 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio
|
||||||
|
|
||||||
if(!_node) return noone;
|
if(!_node) return noone;
|
||||||
|
|
||||||
_node.clearInputCache();
|
|
||||||
if(!LOADING && !APPENDING) _node.doUpdate();
|
if(!LOADING && !APPENDING) _node.doUpdate();
|
||||||
return _node;
|
return _node;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1304,10 +1304,6 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
|
|
||||||
static resetCache = function() { cache_value[0] = false; }
|
static resetCache = function() { cache_value[0] = false; }
|
||||||
|
|
||||||
static getValueCached = function(_time = PROJECT.animator.current_frame, applyUnit = true, arrIndex = 0) { #region
|
|
||||||
return getValue(_time, applyUnit, arrIndex, true);
|
|
||||||
} #endregion
|
|
||||||
|
|
||||||
static getValue = function(_time = PROJECT.animator.current_frame, applyUnit = true, arrIndex = 0, useCache = false, log = false) { #region
|
static getValue = function(_time = PROJECT.animator.current_frame, applyUnit = true, arrIndex = 0, useCache = false, log = false) { #region
|
||||||
if(type == VALUE_TYPE.trigger)
|
if(type == VALUE_TYPE.trigger)
|
||||||
useCache = false;
|
useCache = false;
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
var _filter = ["x", "y", "updated", "rendered", "show_output_name", "insp2UpdateIcon", "preview_trans", "value_validation", "group", "draw_padding", "draw_droppable",
|
var _filter = [ "name", "tooltip", "type", "input_display_list", "output_display_list", "inspector_display_list", ];
|
||||||
"preview_drop_y", "badgeInspect", "preview_mx", "temp_surface", "load_scale", "node_id", "show_input_name", "graph_h", "drawLineIndex", "draw_line_shift_x",
|
|
||||||
"draw_line_shift_y", "cache_array", "drag_mx", "drag_my", "expTree", "value_to", "draw_line_thick", "expUse", "expression", "drag_sx", "drag_sy", "drag_type", "con_node",
|
|
||||||
"cache_value", "show_graph", "preview_x", "preview_y", "badgePreview", "data_list", "open_rx", "open_ry", "parent", "active", "cached_output", "current_data", "cache_result",
|
|
||||||
"draw_graph_culled", "dopesheet_y", "render_time", "renderActive", "preview_speed", "preview_drop_x", "preview_drop_y", "inspecting", "value_to_arr", "draw_name", "anim_priority",
|
|
||||||
"draw_line_vb", "error_notification", "animators", "junction_drawing", "draw_line_shift_hover", "value_from", "is_anim", "popup_dialog", "draw_line_blend", "is_changed",
|
|
||||||
"on_end", "editWidget", "key_inter", "dyna_depo", "def_length", "con_index", "bg_sel_spr", "load_map", "preview_alpha", "icon", "junction_draw_pad_y", "previewable", "active_range",
|
|
||||||
"inputMap", "tools", "preview_amount", "anim_show", "active_draw_index", "onSetDisplayName", "previewing", "on_drop_file", "autoUpdatedTrigger", "attributeEditors", "error_noti_update",
|
|
||||||
"bg_spr", "insp1UpdateIcon", "outputMap", "preview_surface", "manual_updated", "preview_my", "tool_settings", "isTool" ];
|
|
||||||
global.node_data_filter = ds_map_create();
|
global.node_data_filter = ds_map_create();
|
||||||
for( var i = 0, n = array_length(_filter); i < n; i++ )
|
for( var i = 0, n = array_length(_filter); i < n; i++ )
|
||||||
global.node_data_filter[? _filter[i]] = 1;
|
global.node_data_filter[? _filter[i]] = 1;
|
||||||
|
@ -16,14 +9,13 @@ function __node_data_clone(struct) {
|
||||||
var _str = {};
|
var _str = {};
|
||||||
|
|
||||||
for( var i = 0, n = array_length(_var); i < n; i++ ) {
|
for( var i = 0, n = array_length(_var); i < n; i++ ) {
|
||||||
if(ds_map_exists(global.node_data_filter, _var[i])) continue;
|
if(!ds_map_exists(global.node_data_filter, _var[i])) continue;
|
||||||
|
|
||||||
var val = struct[$ _var[i]];
|
var val = struct[$ _var[i]];
|
||||||
if(is_struct(val)) continue;
|
if(is_struct(val)) continue;
|
||||||
if(is_array(val)) {
|
if(is_array(val)) {
|
||||||
for( var j = 0; j < array_length(val); j++ ) {
|
for( var j = 0; j < array_length(val); j++ ) {
|
||||||
if(is_struct(val[j]))
|
if(is_struct(val[j])) val[j] = __node_data_clone(val[j]);
|
||||||
val[j] = __node_data_clone(val[j]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,9 +46,13 @@ function Panel_Node_Data_Gen() : PanelContent() constructor {
|
||||||
game_set_speed(99999, gamespeed_fps);
|
game_set_speed(99999, gamespeed_fps);
|
||||||
|
|
||||||
function drawContent(panel) {
|
function drawContent(panel) {
|
||||||
|
var _n = ALL_NODES[? key];
|
||||||
|
var _b = _n.build(0, 0);
|
||||||
|
key = ds_map_find_next(ALL_NODES, key);
|
||||||
|
|
||||||
draw_clear_alpha(COLORS.panel_bg_clear, 0);
|
draw_clear_alpha(COLORS.panel_bg_clear, 0);
|
||||||
draw_set_text(f_p0, fa_center, fa_top, COLORS._main_text);
|
draw_set_text(f_p0, fa_center, fa_top, COLORS._main_text);
|
||||||
draw_text(w / 2, ui(8), cur + 2 < amo? "Dumping node data... (Program terminate on complete)" : "Writing JSON");
|
draw_text_add(w / 2, ui(8), cur + 2 < amo? $"Dumping node data [{key}]" : "Writing JSON");
|
||||||
|
|
||||||
var bx0 = ui(8);
|
var bx0 = ui(8);
|
||||||
var by0 = ui(40);
|
var by0 = ui(40);
|
||||||
|
@ -69,10 +65,6 @@ function Panel_Node_Data_Gen() : PanelContent() constructor {
|
||||||
draw_sprite_stretched(THEME.progress_bar, 0, bx0, by0, bw, bh);
|
draw_sprite_stretched(THEME.progress_bar, 0, bx0, by0, bw, bh);
|
||||||
draw_sprite_stretched(THEME.progress_bar, 1, bx0, by0, bw * cur / amo, bh);
|
draw_sprite_stretched(THEME.progress_bar, 1, bx0, by0, bw * cur / amo, bh);
|
||||||
|
|
||||||
var _n = ALL_NODES[? key];
|
|
||||||
var _b = _n.build(0, 0);
|
|
||||||
key = ds_map_find_next(ALL_NODES, key);
|
|
||||||
|
|
||||||
if(_b.name == "") return;
|
if(_b.name == "") return;
|
||||||
|
|
||||||
var _data = __node_data_clone(_b);
|
var _data = __node_data_clone(_b);
|
||||||
|
@ -91,6 +83,7 @@ function Panel_Node_Data_Gen() : PanelContent() constructor {
|
||||||
for( var i = 0; i < ds_list_size(_b.inputs); i++ ) {
|
for( var i = 0; i < ds_list_size(_b.inputs); i++ ) {
|
||||||
_din[i] = __node_data_clone(_b.inputs[| i]);
|
_din[i] = __node_data_clone(_b.inputs[| i]);
|
||||||
var _in = _b.inputs[| i];
|
var _in = _b.inputs[| i];
|
||||||
|
if(!is_instanceof(_in, NodeValue)) continue;
|
||||||
|
|
||||||
_jin[i] = {
|
_jin[i] = {
|
||||||
type: _in.type,
|
type: _in.type,
|
||||||
|
@ -112,19 +105,21 @@ function Panel_Node_Data_Gen() : PanelContent() constructor {
|
||||||
|
|
||||||
for( var i = 0; i < ds_list_size(_b.outputs); i++ ) {
|
for( var i = 0; i < ds_list_size(_b.outputs); i++ ) {
|
||||||
_dot[i] = __node_data_clone(_b.outputs[| i]);
|
_dot[i] = __node_data_clone(_b.outputs[| i]);
|
||||||
|
var _ot = _b.outputs[| i];
|
||||||
|
if(!is_instanceof(_ot, NodeValue)) continue;
|
||||||
|
|
||||||
_jot[i] = {
|
_jot[i] = {
|
||||||
type: _b.outputs[| i].type,
|
type: _ot.type,
|
||||||
visible: _b.outputs[| i].visible? 1 : 0,
|
visible: _ot.visible? 1 : 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
_lot[i] = {
|
_lot[i] = {
|
||||||
name: _b.outputs[| i]._initName,
|
name: _ot._initName,
|
||||||
tooltip: _b.outputs[| i].tooltip,
|
tooltip: _ot.tooltip,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
nodeDelete(_b);
|
try { nodeDelete(_b); } catch(e) {}
|
||||||
|
|
||||||
_junc.inputs = _jin;
|
_junc.inputs = _jin;
|
||||||
_junc.outputs = _jot;
|
_junc.outputs = _jot;
|
||||||
|
|
Loading…
Reference in a new issue