mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-03-03 22:24:48 +01:00
[ASE layer] Fix loading node from pre 1.18 project cause layer name to disappear.
This commit is contained in:
parent
cf4fdc83b0
commit
c86d841c2e
30 changed files with 236 additions and 41 deletions
|
@ -2748,6 +2748,7 @@
|
||||||
{"name":"s_strand_tool_stretch","order":65,"path":"sprites/s_strand_tool_stretch/s_strand_tool_stretch.yy",},
|
{"name":"s_strand_tool_stretch","order":65,"path":"sprites/s_strand_tool_stretch/s_strand_tool_stretch.yy",},
|
||||||
{"name":"s_strandSim","order":194,"path":"sprites/s_strandSim/s_strandSim.yy",},
|
{"name":"s_strandSim","order":194,"path":"sprites/s_strandSim/s_strandSim.yy",},
|
||||||
{"name":"s_tab_exit","order":195,"path":"sprites/s_tab_exit/s_tab_exit.yy",},
|
{"name":"s_tab_exit","order":195,"path":"sprites/s_tab_exit/s_tab_exit.yy",},
|
||||||
|
{"name":"s_tag","order":234,"path":"sprites/s_tag/s_tag.yy",},
|
||||||
{"name":"s_text_box_header","order":22,"path":"sprites/s_text_box_header/s_text_box_header.yy",},
|
{"name":"s_text_box_header","order":22,"path":"sprites/s_text_box_header/s_text_box_header.yy",},
|
||||||
{"name":"s_text_bullet","order":196,"path":"sprites/s_text_bullet/s_text_bullet.yy",},
|
{"name":"s_text_bullet","order":196,"path":"sprites/s_text_bullet/s_text_bullet.yy",},
|
||||||
{"name":"s_text_popup","order":197,"path":"sprites/s_text_popup/s_text_popup.yy",},
|
{"name":"s_text_popup","order":197,"path":"sprites/s_text_popup/s_text_popup.yy",},
|
||||||
|
|
|
@ -3510,6 +3510,7 @@
|
||||||
{"id":{"name":"s_strand_tool_stretch","path":"sprites/s_strand_tool_stretch/s_strand_tool_stretch.yy",},},
|
{"id":{"name":"s_strand_tool_stretch","path":"sprites/s_strand_tool_stretch/s_strand_tool_stretch.yy",},},
|
||||||
{"id":{"name":"s_strandSim","path":"sprites/s_strandSim/s_strandSim.yy",},},
|
{"id":{"name":"s_strandSim","path":"sprites/s_strandSim/s_strandSim.yy",},},
|
||||||
{"id":{"name":"s_tab_exit","path":"sprites/s_tab_exit/s_tab_exit.yy",},},
|
{"id":{"name":"s_tab_exit","path":"sprites/s_tab_exit/s_tab_exit.yy",},},
|
||||||
|
{"id":{"name":"s_tag","path":"sprites/s_tag/s_tag.yy",},},
|
||||||
{"id":{"name":"s_text_box_header","path":"sprites/s_text_box_header/s_text_box_header.yy",},},
|
{"id":{"name":"s_text_box_header","path":"sprites/s_text_box_header/s_text_box_header.yy",},},
|
||||||
{"id":{"name":"s_text_bullet","path":"sprites/s_text_bullet/s_text_bullet.yy",},},
|
{"id":{"name":"s_text_bullet","path":"sprites/s_text_bullet/s_text_bullet.yy",},},
|
||||||
{"id":{"name":"s_text_popup","path":"sprites/s_text_popup/s_text_popup.yy",},},
|
{"id":{"name":"s_text_popup","path":"sprites/s_text_popup/s_text_popup.yy",},},
|
||||||
|
|
Binary file not shown.
|
@ -136,6 +136,8 @@ function buttonGroup(_data, _onClick) : widget() constructor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
sb_small.data = data;
|
||||||
|
sb_small.data_list = data;
|
||||||
sb_small.setFocusHover(active, hover);
|
sb_small.setFocusHover(active, hover);
|
||||||
sb_small.draw(_x, _y, _w, _h, _selecting, _m, _rx, _ry);
|
sb_small.draw(_x, _y, _w, _h, _selecting, _m, _rx, _ry);
|
||||||
}
|
}
|
||||||
|
@ -148,8 +150,8 @@ function buttonGroup(_data, _onClick) : widget() constructor {
|
||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
|
|
||||||
static clone = function() { #region
|
static clone = function() {
|
||||||
var cln = new buttonGroup(data, onClick);
|
var cln = new buttonGroup(data, onClick);
|
||||||
return cln;
|
return cln;
|
||||||
} #endregion
|
}
|
||||||
}
|
}
|
|
@ -133,5 +133,5 @@ function Node_PCX_Equation(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) co
|
||||||
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
|
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static doApplyDeserialize = function() { refreshDynamicInput(); }
|
static postApplyDeserialize = function() { refreshDynamicInput(); }
|
||||||
}
|
}
|
|
@ -969,7 +969,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
||||||
boneIDMap = struct_try_get(attr, "boneIDMap", boneIDMap);
|
boneIDMap = struct_try_get(attr, "boneIDMap", boneIDMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
static doApplyDeserialize = function() {
|
static postApplyDeserialize = function() {
|
||||||
setBone();
|
setBone();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -293,7 +293,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
||||||
return BBOX().fromPoints(minx, miny, maxx, maxy);
|
return BBOX().fromPoints(minx, miny, maxx, maxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
static doApplyDeserialize = function() {
|
static postApplyDeserialize = function() {
|
||||||
for( var i = input_fix_len; i < array_length(inputs); i += data_length ) {
|
for( var i = input_fix_len; i < array_length(inputs); i += data_length ) {
|
||||||
var inp = inputs[i];
|
var inp = inputs[i];
|
||||||
var idx = struct_try_get(inp.display_data, "bone_id");
|
var idx = struct_try_get(inp.display_data, "bone_id");
|
||||||
|
|
|
@ -16,12 +16,56 @@ function Node_ASE_layer(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||||
|
|
||||||
newOutput(1, nodeValue_Output("Layer name", self, VALUE_TYPE.text, ""));
|
newOutput(1, nodeValue_Output("Layer name", self, VALUE_TYPE.text, ""));
|
||||||
|
|
||||||
|
layer_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) {
|
||||||
|
if(ase_data == noone) {
|
||||||
|
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _y, _w, 28, COLORS.node_composite_bg_blend, 1);
|
||||||
|
|
||||||
|
draw_set_text(f_p3, fa_center, fa_center, COLORS._main_text_sub);
|
||||||
|
draw_text_add(_x + _w / 2, _y + 14, "No data");
|
||||||
|
return 32;
|
||||||
|
}
|
||||||
|
|
||||||
|
var _amo = array_length(ase_data.layers);
|
||||||
|
var hh = 24;
|
||||||
|
var _h = hh * _amo + 16;
|
||||||
|
|
||||||
|
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _y, _w, _h, COLORS.node_composite_bg_blend, 1);
|
||||||
|
for( var i = 0, n = array_length(ase_data.layers); i < n; i++ ) {
|
||||||
|
var _bx = _x + 24;
|
||||||
|
var _yy = _y + 8 + i * hh;
|
||||||
|
var _layer = ase_data.layers[i];
|
||||||
|
|
||||||
|
if(_layer.type == 0) {
|
||||||
|
draw_sprite_ui_uniform(THEME.icon_canvas, 0, _bx, _yy + hh / 2, 1, COLORS._main_icon);
|
||||||
|
|
||||||
|
} else if(_layer.type == 1)
|
||||||
|
draw_sprite_ui_uniform(THEME.folder_16, 0, _bx, _yy + hh / 2, 1, COLORS._main_icon);
|
||||||
|
|
||||||
|
var cc = COLORS._main_text_sub;
|
||||||
|
|
||||||
|
if(_hover && point_in_rectangle(_m[0], _m[1], _x, _yy, _x + _w, _yy + hh - 1)) {
|
||||||
|
cc = COLORS._main_text;
|
||||||
|
|
||||||
|
if(mouse_press(mb_left, _focus))
|
||||||
|
inputs[2].setValue(_layer.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(_layer == layer_object)
|
||||||
|
cc = COLORS._main_text_accent;
|
||||||
|
|
||||||
|
draw_set_text(f_p2, fa_left, fa_center, cc);
|
||||||
|
draw_text_add(_bx + 16, _yy + hh / 2, _layer.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
return _h;
|
||||||
|
});
|
||||||
|
|
||||||
input_display_list = [
|
input_display_list = [
|
||||||
0, 2, 1,
|
0, layer_renderer, 2, 1,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
ase_data = noone;
|
||||||
layer_object = noone;
|
layer_object = noone;
|
||||||
_name = "";
|
|
||||||
|
|
||||||
static onValueFromUpdate = function(index) { findLayer(); }
|
static onValueFromUpdate = function(index) { findLayer(); }
|
||||||
|
|
||||||
|
@ -29,6 +73,7 @@ function Node_ASE_layer(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||||
layer_object = noone;
|
layer_object = noone;
|
||||||
|
|
||||||
var data = getInputDataForce(0);
|
var data = getInputDataForce(0);
|
||||||
|
ase_data = data;
|
||||||
if(data == noone) return;
|
if(data == noone) return;
|
||||||
|
|
||||||
var _lname = getInputData(2);
|
var _lname = getInputData(2);
|
||||||
|
@ -46,6 +91,8 @@ function Node_ASE_layer(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||||
var data = getInputData(0);
|
var data = getInputData(0);
|
||||||
var celDim = getInputData(1);
|
var celDim = getInputData(1);
|
||||||
var _lname = getInputData(2);
|
var _lname = getInputData(2);
|
||||||
|
|
||||||
|
ase_data = data;
|
||||||
outputs[1].setValue(_lname);
|
outputs[1].setValue(_lname);
|
||||||
|
|
||||||
if(layer_object == noone) {
|
if(layer_object == noone) {
|
||||||
|
@ -64,8 +111,6 @@ function Node_ASE_layer(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||||
else surf = surface_verify(surf, ww, hh);
|
else surf = surface_verify(surf, ww, hh);
|
||||||
outputs[0].setValue(surf);
|
outputs[0].setValue(surf);
|
||||||
|
|
||||||
print($"Setting layer name {_lname}");
|
|
||||||
|
|
||||||
if(cel == 0) { surface_clear(surf); return; }
|
if(cel == 0) { surface_clear(surf); return; }
|
||||||
|
|
||||||
var _inSurf = cel.getSurface();
|
var _inSurf = cel.getSurface();
|
||||||
|
@ -76,4 +121,9 @@ function Node_ASE_layer(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||||
draw_surface_safe(_inSurf, xx, yy);
|
draw_surface_safe(_inSurf, xx, yy);
|
||||||
surface_reset_shader();
|
surface_reset_shader();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static postApplyDeserialize = function() {
|
||||||
|
if(LOADING_VERSION < 1_18_00_0 && display_name != "")
|
||||||
|
inputs[2].setValue(display_name);
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
function Node_ASE_Tag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
function Node_ASE_Tag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||||
name = "ASE Tag";
|
name = "ASE Tag";
|
||||||
|
ase_data = noone;
|
||||||
|
|
||||||
newInput(0, nodeValue("ASE data", self, CONNECT_TYPE.input, VALUE_TYPE.object, noone))
|
newInput(0, nodeValue("ASE data", self, CONNECT_TYPE.input, VALUE_TYPE.object, noone))
|
||||||
.setIcon(s_junc_aseprite, c_white)
|
.setIcon(s_junc_aseprite, c_white)
|
||||||
|
@ -10,12 +11,61 @@ function Node_ASE_Tag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
|
|
||||||
newOutput(0, nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone));
|
newOutput(0, nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone));
|
||||||
|
|
||||||
|
tag_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) {
|
||||||
|
if(ase_data == noone) {
|
||||||
|
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _y, _w, 28, COLORS.node_composite_bg_blend, 1);
|
||||||
|
|
||||||
|
draw_set_text(f_p3, fa_center, fa_center, COLORS._main_text_sub);
|
||||||
|
draw_text_add(_x + _w / 2, _y + 14, "No data");
|
||||||
|
return 32;
|
||||||
|
}
|
||||||
|
|
||||||
|
var _tag = getSingleValue(1);
|
||||||
|
var _amo = array_length(ase_data.tags);
|
||||||
|
var hh = 24;
|
||||||
|
var _h = hh * _amo + 16;
|
||||||
|
|
||||||
|
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _y, _w, _h, COLORS.node_composite_bg_blend, 1);
|
||||||
|
for( var i = 0, n = array_length(ase_data.tags); i < n; i++ ) {
|
||||||
|
var _bx = _x + 24;
|
||||||
|
var _yy = _y + 8 + i * hh;
|
||||||
|
|
||||||
|
var tag = ase_data.tags[i];
|
||||||
|
var tName = tag[$ "Name"];
|
||||||
|
var tColr = tag[$ "Color"];
|
||||||
|
|
||||||
|
draw_sprite_ui_uniform(THEME.tag, 0, _bx, _yy + hh / 2 + 2, 1, tColr);
|
||||||
|
|
||||||
|
var cc = COLORS._main_text_sub;
|
||||||
|
|
||||||
|
if(_hover && point_in_rectangle(_m[0], _m[1], _x, _yy, _x + _w, _yy + hh - 1)) {
|
||||||
|
cc = COLORS._main_text;
|
||||||
|
|
||||||
|
if(mouse_press(mb_left, _focus))
|
||||||
|
inputs[1].setValue(tName);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tName == _tag)
|
||||||
|
cc = COLORS._main_text_accent;
|
||||||
|
|
||||||
|
draw_set_text(f_p2, fa_left, fa_center, cc);
|
||||||
|
draw_text_add(_bx + 16, _yy + hh / 2, tName);
|
||||||
|
}
|
||||||
|
|
||||||
|
return _h;
|
||||||
|
});
|
||||||
|
|
||||||
|
input_display_list = [
|
||||||
|
0, tag_renderer, 1,
|
||||||
|
];
|
||||||
|
|
||||||
temp_surface = [ 0, 0, 0 ];
|
temp_surface = [ 0, 0, 0 ];
|
||||||
|
|
||||||
static processData = function(_outSurf, _data, _output_index, _array_index) {
|
static processData = function(_outSurf, _data, _output_index, _array_index) {
|
||||||
var _ase = _data[0];
|
var _ase = _data[0];
|
||||||
var _tag = _data[1];
|
var _tag = _data[1];
|
||||||
|
|
||||||
|
ase_data = _ase;
|
||||||
if(_ase == noone || _ase.content == noone) return;
|
if(_ase == noone || _ase.content == noone) return;
|
||||||
|
|
||||||
var _cnt = _ase.content;
|
var _cnt = _ase.content;
|
||||||
|
|
|
@ -1152,7 +1152,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
||||||
_map.surfaces = _buff;
|
_map.surfaces = _buff;
|
||||||
}
|
}
|
||||||
|
|
||||||
static doApplyDeserialize = function() {
|
static postApplyDeserialize = function() {
|
||||||
var _dim = struct_has(attributes, "dimension")? attributes.dimension : getInputData(0);
|
var _dim = struct_has(attributes, "dimension")? attributes.dimension : getInputData(0);
|
||||||
|
|
||||||
if(!struct_has(load_map, "surfaces")) {
|
if(!struct_has(load_map, "surfaces")) {
|
||||||
|
|
|
@ -80,7 +80,7 @@ function Node_Color_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
drawColor(col, bbox.x0, bbox.y0, bbox.w, bbox.h);
|
drawColor(col, bbox.x0, bbox.y0, bbox.w, bbox.h);
|
||||||
}
|
}
|
||||||
|
|
||||||
static doApplyDeserialize = function() {
|
static postApplyDeserialize = function() {
|
||||||
onValueUpdate(3);
|
onValueUpdate(3);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -84,7 +84,7 @@ function Node_Color_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
drawColor(col, bbox.x0, bbox.y0, bbox.w, bbox.h);
|
drawColor(col, bbox.x0, bbox.y0, bbox.w, bbox.h);
|
||||||
}
|
}
|
||||||
|
|
||||||
static doApplyDeserialize = function() {
|
static postApplyDeserialize = function() {
|
||||||
onValueUpdate(3);
|
onValueUpdate(3);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -2531,11 +2531,11 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
|
||||||
|
|
||||||
//print($"Applying deserialzie for {name} complete");
|
//print($"Applying deserialzie for {name} complete");
|
||||||
|
|
||||||
doApplyDeserialize();
|
postApplyDeserialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
static preApplyDeserialize = function() {}
|
static preApplyDeserialize = function() {}
|
||||||
static doApplyDeserialize = function() {}
|
static postApplyDeserialize = function() {}
|
||||||
|
|
||||||
static loadGroup = function(context = noone) {
|
static loadGroup = function(context = noone) {
|
||||||
if(load_group == noone) {
|
if(load_group == noone) {
|
||||||
|
|
|
@ -50,7 +50,7 @@ function Node_DynaSurf_In(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
createInput(false);
|
createInput(false);
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static doApplyDeserialize = function() { #region
|
static postApplyDeserialize = function() { #region
|
||||||
if(group == noone) return;
|
if(group == noone) return;
|
||||||
group.sortIO();
|
group.sortIO();
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
|
@ -186,5 +186,5 @@ function Node_Equation(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
|
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static doApplyDeserialize = function() { refreshDynamicInput(); }
|
static postApplyDeserialize = function() { refreshDynamicInput(); }
|
||||||
}
|
}
|
|
@ -883,5 +883,5 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static doApplyDeserialize = function() { onValueUpdate(3); }
|
static postApplyDeserialize = function() { onValueUpdate(3); }
|
||||||
}
|
}
|
|
@ -471,7 +471,7 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
|
|
||||||
static postDeserialize = function() { createInput(false); }
|
static postDeserialize = function() { createInput(false); }
|
||||||
|
|
||||||
static doApplyDeserialize = function() {
|
static postApplyDeserialize = function() {
|
||||||
if(inParent == undefined) return;
|
if(inParent == undefined) return;
|
||||||
if(group == noone) return;
|
if(group == noone) return;
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
||||||
|
|
||||||
static getGraphPreviewSurface = function() { return inputs[0].getValue(); }
|
static getGraphPreviewSurface = function() { return inputs[0].getValue(); }
|
||||||
static postDeserialize = function() { if(group == noone) return; createOutput(false); }
|
static postDeserialize = function() { if(group == noone) return; createOutput(false); }
|
||||||
static doApplyDeserialize = function() {}
|
static postApplyDeserialize = function() {}
|
||||||
|
|
||||||
static onDestroy = function() {
|
static onDestroy = function() {
|
||||||
if(is_undefined(outParent)) return;
|
if(is_undefined(outParent)) return;
|
||||||
|
|
|
@ -171,7 +171,7 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
lua_add_code(getState(), lua_code);
|
lua_add_code(getState(), lua_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
static doApplyDeserialize = function() {
|
static postApplyDeserialize = function() {
|
||||||
refreshDynamicInput();
|
refreshDynamicInput();
|
||||||
|
|
||||||
for( var i = input_fix_len; i < array_length(inputs) - data_length; i += data_length ) {
|
for( var i = input_fix_len; i < array_length(inputs) - data_length; i += data_length ) {
|
||||||
|
|
|
@ -172,7 +172,7 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
lua_add_code(getState(), lua_code);
|
lua_add_code(getState(), lua_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
static doApplyDeserialize = function() {
|
static postApplyDeserialize = function() {
|
||||||
refreshDynamicInput();
|
refreshDynamicInput();
|
||||||
|
|
||||||
for( var i = input_fix_len; i < array_length(inputs) - data_length; i += data_length ) {
|
for( var i = input_fix_len; i < array_length(inputs) - data_length; i += data_length ) {
|
||||||
|
|
|
@ -65,7 +65,7 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group)
|
||||||
|
|
||||||
static onInspector1Update = function(updateAll = true) { initSurface(true); PROJECT.animator.render(); }
|
static onInspector1Update = function(updateAll = true) { initSurface(true); PROJECT.animator.render(); }
|
||||||
|
|
||||||
static step = function() { #region
|
static step = function() {
|
||||||
var inpt = getInputData(0);
|
var inpt = getInputData(0);
|
||||||
var grup = getInputData(1);
|
var grup = getInputData(1);
|
||||||
var pack = getInputData(3);
|
var pack = getInputData(3);
|
||||||
|
@ -91,27 +91,27 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group)
|
||||||
}
|
}
|
||||||
|
|
||||||
update_on_frame = grup == 0;
|
update_on_frame = grup == 0;
|
||||||
} #endregion
|
}
|
||||||
|
|
||||||
static update = function(frame = CURRENT_FRAME) { #region
|
static update = function(frame = CURRENT_FRAME) {
|
||||||
if(IS_FIRST_FRAME) initSurface();
|
if(IS_FIRST_FRAME) initSurface();
|
||||||
|
|
||||||
var grup = getInputData(1);
|
var grup = getInputData(1);
|
||||||
|
|
||||||
if(grup == SPRITE_ANIM_GROUP.animation) animationRender();
|
if(grup == SPRITE_ANIM_GROUP.animation) animationRender();
|
||||||
else arrayRender();
|
else arrayRender();
|
||||||
} #endregion
|
}
|
||||||
|
|
||||||
static initSurface = function(clear = false) { #region
|
static initSurface = function(clear = false) {
|
||||||
for(var i = 0; i < TOTAL_FRAMES; i++) anim_drawn[i] = false;
|
for(var i = 0; i < TOTAL_FRAMES; i++) anim_drawn[i] = false;
|
||||||
|
|
||||||
var grup = getInputData(1);
|
var grup = getInputData(1);
|
||||||
|
|
||||||
if(grup == SPRITE_ANIM_GROUP.animation) animationInit(clear);
|
if(grup == SPRITE_ANIM_GROUP.animation) animationInit(clear);
|
||||||
else arrayRender();
|
else arrayRender();
|
||||||
} #endregion
|
}
|
||||||
|
|
||||||
static arrayRender = function() { #region
|
static arrayRender = function() {
|
||||||
var inpt = getInputData(0);
|
var inpt = getInputData(0);
|
||||||
var grup = getInputData(1);
|
var grup = getInputData(1);
|
||||||
var pack = getInputData(3);
|
var pack = getInputData(3);
|
||||||
|
@ -310,12 +310,12 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group)
|
||||||
|
|
||||||
outputs[0].setValue(_surf);
|
outputs[0].setValue(_surf);
|
||||||
outputs[1].setValue(array_spread(atlases));
|
outputs[1].setValue(array_spread(atlases));
|
||||||
} #endregion
|
}
|
||||||
|
|
||||||
anim_curr_w = -1;
|
anim_curr_w = -1;
|
||||||
anim_curr_h = -1;
|
anim_curr_h = -1;
|
||||||
|
|
||||||
static animationInit = function(clear = false) { #region
|
static animationInit = function(clear = false) {
|
||||||
var inpt = getInputData(0);
|
var inpt = getInputData(0);
|
||||||
var skip = getInputData(2);
|
var skip = getInputData(2);
|
||||||
var pack = getInputData(3);
|
var pack = getInputData(3);
|
||||||
|
@ -401,9 +401,9 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group)
|
||||||
outputs[1].setValue(array_spread(atlases));
|
outputs[1].setValue(array_spread(atlases));
|
||||||
|
|
||||||
printIf(log, $"Surface generated [{ww}, {hh}]");
|
printIf(log, $"Surface generated [{ww}, {hh}]");
|
||||||
} #endregion
|
}
|
||||||
|
|
||||||
static animationRender = function() { #region
|
static animationRender = function() {
|
||||||
var inpt = getInputData(0);
|
var inpt = getInputData(0);
|
||||||
var skip = getInputData(2);
|
var skip = getInputData(2);
|
||||||
var pack = getInputData(3);
|
var pack = getInputData(3);
|
||||||
|
@ -461,7 +461,7 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group)
|
||||||
var px = padd[2];
|
var px = padd[2];
|
||||||
var py = padd[1];
|
var py = padd[1];
|
||||||
|
|
||||||
for(var i = 0; i < array_length(inpt); i++) { #region
|
for(var i = 0; i < array_length(inpt); i++) {
|
||||||
var _surfi = inpt[i];
|
var _surfi = inpt[i];
|
||||||
|
|
||||||
if(!is_surface(_surfi)) {
|
if(!is_surface(_surfi)) {
|
||||||
|
@ -541,9 +541,9 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group)
|
||||||
surface_reset_shader();
|
surface_reset_shader();
|
||||||
|
|
||||||
drawn = true;
|
drawn = true;
|
||||||
} #endregion
|
}
|
||||||
|
|
||||||
if(drawn) array_safe_set(anim_drawn, CURRENT_FRAME, true);
|
if(drawn) array_safe_set(anim_drawn, CURRENT_FRAME, true);
|
||||||
outputs[1].setValue(array_spread(atlases));
|
outputs[1].setValue(array_spread(atlases));
|
||||||
} #endregion
|
}
|
||||||
}
|
}
|
|
@ -155,7 +155,7 @@ function Node_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static doApplyDeserialize = function() {
|
static postApplyDeserialize = function() {
|
||||||
refreshDynamicInput();
|
refreshDynamicInput();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -206,5 +206,5 @@ function Node_Switch(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
||||||
}
|
}
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static doApplyDeserialize = function() { refreshDynamicInput(); }
|
static postApplyDeserialize = function() { refreshDynamicInput(); }
|
||||||
}
|
}
|
|
@ -2233,12 +2233,12 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
node.input_value_map[$ internalName] = _value;
|
node.input_value_map[$ internalName] = _value;
|
||||||
}
|
}
|
||||||
|
|
||||||
doApplyDeserialize();
|
postApplyDeserialize();
|
||||||
attributeApply();
|
attributeApply();
|
||||||
onValidate();
|
onValidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
static doApplyDeserialize = function() {}
|
static postApplyDeserialize = function() {}
|
||||||
|
|
||||||
static attributeApply = function() {
|
static attributeApply = function() {
|
||||||
if(struct_has(attributes, "mapped") && attributes.mapped)
|
if(struct_has(attributes, "mapped") && attributes.mapped)
|
||||||
|
|
|
@ -23,7 +23,7 @@ function __NodeValue_Enum_Scroll(_name, _node, _value, _data) : NodeValue(_name,
|
||||||
|
|
||||||
options_histories = [];
|
options_histories = [];
|
||||||
|
|
||||||
static doApplyDeserialize = function() {
|
static postApplyDeserialize = function() {
|
||||||
if(is_anim) return;
|
if(is_anim) return;
|
||||||
if(CLONING) return;
|
if(CLONING) return;
|
||||||
if(array_empty(options_histories)) return;
|
if(array_empty(options_histories)) return;
|
||||||
|
|
|
@ -155,7 +155,7 @@ function Node_Websocket_Sender(_x, _y, _group = noone) : Node(_x, _y, _group) co
|
||||||
draw_sprite_fit(THEME.node_websocket_send, 0, bbox.xc, (_y0 + _y1) / 2, bbox.w, _y1 - _y0, cc, aa);
|
draw_sprite_fit(THEME.node_websocket_send, 0, bbox.xc, (_y0 + _y1) / 2, bbox.w, _y1 - _y0, cc, aa);
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static doApplyDeserialize = function() { #region
|
static postApplyDeserialize = function() { #region
|
||||||
if(struct_has(attributes, "network_timeout")) network_set_config(network_config_connect_timeout, attributes.network_timeout);
|
if(struct_has(attributes, "network_timeout")) network_set_config(network_config_connect_timeout, attributes.network_timeout);
|
||||||
} #endregion
|
} #endregion
|
||||||
}
|
}
|
|
@ -169,6 +169,7 @@ function Theme() constructor {
|
||||||
steam = s_steam;
|
steam = s_steam;
|
||||||
strandSim = s_strandSim;
|
strandSim = s_strandSim;
|
||||||
tab_exit = s_tab_exit;
|
tab_exit = s_tab_exit;
|
||||||
|
tag = s_tag;
|
||||||
text_bullet = s_text_bullet;
|
text_bullet = s_text_bullet;
|
||||||
text_popup = s_text_popup;
|
text_popup = s_text_popup;
|
||||||
text = s_name;
|
text = s_name;
|
||||||
|
|
BIN
sprites/s_tag/2fc5f6b8-8488-4040-9c59-0fe0bde34344.png
Normal file
BIN
sprites/s_tag/2fc5f6b8-8488-4040-9c59-0fe0bde34344.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 352 B |
Binary file not shown.
After Width: | Height: | Size: 352 B |
90
sprites/s_tag/s_tag.yy
Normal file
90
sprites/s_tag/s_tag.yy
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
{
|
||||||
|
"$GMSprite":"",
|
||||||
|
"%Name":"s_tag",
|
||||||
|
"bboxMode":0,
|
||||||
|
"bbox_bottom":12,
|
||||||
|
"bbox_left":1,
|
||||||
|
"bbox_right":14,
|
||||||
|
"bbox_top":3,
|
||||||
|
"collisionKind":1,
|
||||||
|
"collisionTolerance":0,
|
||||||
|
"DynamicTexturePage":false,
|
||||||
|
"edgeFiltering":false,
|
||||||
|
"For3D":false,
|
||||||
|
"frames":[
|
||||||
|
{"$GMSpriteFrame":"","%Name":"2fc5f6b8-8488-4040-9c59-0fe0bde34344","name":"2fc5f6b8-8488-4040-9c59-0fe0bde34344","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||||
|
],
|
||||||
|
"gridX":0,
|
||||||
|
"gridY":0,
|
||||||
|
"height":16,
|
||||||
|
"HTile":false,
|
||||||
|
"layers":[
|
||||||
|
{"$GMImageLayer":"","%Name":"ada88684-76ca-4036-9eba-ee32acfcb2c0","blendMode":0,"displayName":"default","isLocked":false,"name":"ada88684-76ca-4036-9eba-ee32acfcb2c0","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,},
|
||||||
|
],
|
||||||
|
"name":"s_tag",
|
||||||
|
"nineSlice":null,
|
||||||
|
"origin":4,
|
||||||
|
"parent":{
|
||||||
|
"name":"icon",
|
||||||
|
"path":"folders/theme/icon.yy",
|
||||||
|
},
|
||||||
|
"preMultiplyAlpha":false,
|
||||||
|
"resourceType":"GMSprite",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
"sequence":{
|
||||||
|
"$GMSequence":"",
|
||||||
|
"%Name":"s_tag",
|
||||||
|
"autoRecord":true,
|
||||||
|
"backdropHeight":768,
|
||||||
|
"backdropImageOpacity":0.5,
|
||||||
|
"backdropImagePath":"",
|
||||||
|
"backdropWidth":1366,
|
||||||
|
"backdropXOffset":0.0,
|
||||||
|
"backdropYOffset":0.0,
|
||||||
|
"events":{
|
||||||
|
"$KeyframeStore<MessageEventKeyframe>":"",
|
||||||
|
"Keyframes":[],
|
||||||
|
"resourceType":"KeyframeStore<MessageEventKeyframe>",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
},
|
||||||
|
"eventStubScript":null,
|
||||||
|
"eventToFunction":{},
|
||||||
|
"length":1.0,
|
||||||
|
"lockOrigin":false,
|
||||||
|
"moments":{
|
||||||
|
"$KeyframeStore<MomentsEventKeyframe>":"",
|
||||||
|
"Keyframes":[],
|
||||||
|
"resourceType":"KeyframeStore<MomentsEventKeyframe>",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
},
|
||||||
|
"name":"s_tag",
|
||||||
|
"playback":1,
|
||||||
|
"playbackSpeed":30.0,
|
||||||
|
"playbackSpeedType":0,
|
||||||
|
"resourceType":"GMSequence",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
"showBackdrop":true,
|
||||||
|
"showBackdropImage":false,
|
||||||
|
"timeUnits":1,
|
||||||
|
"tracks":[
|
||||||
|
{"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore<SpriteFrameKeyframe>":"","Keyframes":[
|
||||||
|
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||||
|
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"2fc5f6b8-8488-4040-9c59-0fe0bde34344","path":"sprites/s_tag/s_tag.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||||
|
},"Disabled":false,"id":"94c990b2-95a8-4f14-903d-57b947fb874e","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||||
|
],"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
||||||
|
],
|
||||||
|
"visibleRange":null,
|
||||||
|
"volume":1.0,
|
||||||
|
"xorigin":8,
|
||||||
|
"yorigin":8,
|
||||||
|
},
|
||||||
|
"swatchColours":null,
|
||||||
|
"swfPrecision":0.5,
|
||||||
|
"textureGroupId":{
|
||||||
|
"name":"Default",
|
||||||
|
"path":"texturegroups/Default",
|
||||||
|
},
|
||||||
|
"type":0,
|
||||||
|
"VTile":false,
|
||||||
|
"width":16,
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue