mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-10 20:45:35 +01:00
- Fix deleted node got included in the save file.
This commit is contained in:
parent
fde7c7c3b1
commit
08bc0fc19f
@ -1433,6 +1433,8 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||
} #endregion
|
||||
|
||||
static serialize = function(scale = false, preset = false) { #region
|
||||
if(!active) return;
|
||||
|
||||
var _map = {};
|
||||
//print(" > Serializing: " + name);
|
||||
|
||||
|
@ -11,10 +11,13 @@ function Node_Texture_Remap(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
||||
inputs[| 2] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 2;
|
||||
|
||||
inputs[| 3] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||
.setDisplay(VALUE_DISPLAY.enum_button, [ "Surface", "RG Map" ]);
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
||||
input_display_list = [ 2,
|
||||
["Output", false], 0, 1,
|
||||
["Output", false], 0, 1, 3,
|
||||
]
|
||||
|
||||
attribute_surface_depth();
|
||||
@ -26,10 +29,16 @@ function Node_Texture_Remap(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
||||
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
|
||||
if(!is_surface(_data[1])) return _outSurf;
|
||||
|
||||
var _dim = _data[3];
|
||||
var _sw = surface_get_width(_data[_dim]);
|
||||
var _sh = surface_get_height(_data[_dim]);
|
||||
|
||||
_outSurf = surface_verify(_outSurf, _sw, _sh);
|
||||
|
||||
surface_set_shader(_outSurf, shader);
|
||||
shader_set_interpolation_surface(_data[0]);
|
||||
texture_set_stage(uniform_map, surface_get_texture(_data[1]));
|
||||
draw_surface_safe(_data[0], 0, 0);
|
||||
draw_surface_stretched_safe(_data[0], 0, 0, _sw, _sh);
|
||||
surface_reset_shader();
|
||||
|
||||
return _outSurf;
|
||||
|
@ -7,8 +7,14 @@ enum RENDER_TYPE {
|
||||
#region globalvar
|
||||
globalvar UPDATE, RENDER_QUEUE, RENDER_ORDER, UPDATE_RENDER_ORDER;
|
||||
UPDATE_RENDER_ORDER = false;
|
||||
global.FLAG.render = 0;
|
||||
global.group_inputs = [ "Node_Group_Input", "Node_Feedback_Input", "Node_Iterator_Input", "Node_Iterator_Each_Input" ];
|
||||
global.FLAG.render = 1;
|
||||
global.group_io = [
|
||||
"Node_Group_Input", "Node_Group_Output",
|
||||
"Node_Feedback_Input", "Node_Feedback_Output",
|
||||
"Node_Iterator_Input", "Node_Iterator_Output",
|
||||
"Node_Iterator_Each_Input", "Node_Iterator_Each_Output",
|
||||
"Node_Iterator_Filter_Input", "Node_Iterator_Filter_Output",
|
||||
];
|
||||
|
||||
#macro RENDER_ALL_REORDER UPDATE_RENDER_ORDER = true; UPDATE |= RENDER_TYPE.full;
|
||||
#macro RENDER_ALL UPDATE |= RENDER_TYPE.full;
|
||||
@ -107,7 +113,7 @@ function Render(partial = false, runAction = false) { #region
|
||||
|
||||
if(is_undefined(_node)) { LOG_IF(global.FLAG.render == 1, $"Skip undefiend {_node}"); continue; }
|
||||
if(!is_struct(_node)) { LOG_IF(global.FLAG.render == 1, $"Skip non-struct {_node}"); continue; }
|
||||
if(array_exists(global.group_inputs, instanceof(_node))) {
|
||||
if(array_exists(global.group_io, instanceof(_node))) {
|
||||
LOG_IF(global.FLAG.render == 1, $"Skip group IO {_node.internalName}");
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user