mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-24 14:06:23 +01:00
- [Export] Add surface output passthrought.
This commit is contained in:
parent
a4176b2139
commit
b19dad22db
6 changed files with 22 additions and 26 deletions
|
@ -196,7 +196,7 @@
|
|||
|
||||
#region debug
|
||||
global.FLAG = {
|
||||
render : 0,
|
||||
render : 1,
|
||||
renderTime : false,
|
||||
keyframe_override : true,
|
||||
wav_import : true,
|
||||
|
|
|
@ -802,8 +802,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
|
|||
}
|
||||
}
|
||||
|
||||
if(NODE_HAS_INSP1 && inspectInput1.getValue()) onInspector1Update();
|
||||
if(NODE_HAS_INSP2 && inspectInput2.getValue()) onInspector2Update();
|
||||
if(NODE_HAS_INSP1 && inspectInput1.getValue()) onInspector1Update(true);
|
||||
if(NODE_HAS_INSP2 && inspectInput2.getValue()) onInspector2Update(true);
|
||||
|
||||
updatedOutTrigger.setValue(true);
|
||||
|
||||
|
|
|
@ -115,10 +115,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
|
||||
inputs[| 16] = nodeValue("Export on Save", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false)
|
||||
|
||||
outputs[| 0] = nodeValue("Loop exit", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, 0);
|
||||
|
||||
outputs[| 1] = nodeValue("Preview", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone)
|
||||
.setVisible(false);
|
||||
outputs[| 0] = nodeValue("Preview", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
||||
template_guide = [
|
||||
["%d", "Directory"],
|
||||
|
@ -492,7 +489,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
|
||||
static save_surface = function(_surf, _path) { #region
|
||||
var form = getInputData(3);
|
||||
//print($">>>>>>>>>>>>>>>>>>>> save surface {_surf} - {_path} <<<<<<<<<<<<<<<<<<<<");
|
||||
// print($">>>>>>>>>>>>>>>>>>>> save surface {_surf} - {_path} <<<<<<<<<<<<<<<<<<<<");
|
||||
|
||||
if(form == NODE_EXPORT_FORMAT.animation) {
|
||||
surface_save_safe(_surf, _path);
|
||||
|
@ -551,7 +548,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
} #endregion
|
||||
|
||||
static export = function(log = true) { #region
|
||||
//print($">>>>>>>>>>>>>>>>>>>> export {CURRENT_FRAME} <<<<<<<<<<<<<<<<<<<<");
|
||||
// print($">>>>>>>>>>>>>>>>>>>> export {CURRENT_FRAME} <<<<<<<<<<<<<<<<<<<<");
|
||||
|
||||
exportLog = log;
|
||||
|
||||
|
@ -599,6 +596,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
|
||||
PANEL_MENU.setNotiIcon(THEME.noti_icon_tick);
|
||||
}
|
||||
|
||||
} else if(is_surface(surf)) {
|
||||
var p = path;
|
||||
if(is_array(path)) p = path[0];
|
||||
|
@ -620,6 +618,8 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
PANEL_MENU.setNotiIcon(THEME.noti_icon_tick);
|
||||
}
|
||||
}
|
||||
|
||||
// print($">>>>>>>>>>>>>>>>>>>> export {CURRENT_FRAME} complete <<<<<<<<<<<<<<<<<<<<");
|
||||
} #endregion
|
||||
|
||||
static renderCompleted = function() { #region
|
||||
|
@ -689,14 +689,19 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
insp2UpdateTooltip = "Export All";
|
||||
insp2UpdateIcon = [ THEME.play_all, 0, COLORS._main_value_positive ];
|
||||
|
||||
static onInspector1Update = function() { #region
|
||||
static onInspector1Update = function(_fromValue = false) { #region
|
||||
if(IS_RENDERING) return;
|
||||
|
||||
if(_fromValue) {
|
||||
export();
|
||||
return;
|
||||
}
|
||||
|
||||
if(isInLoop()) RENDER_ALL
|
||||
else doInspectorAction();
|
||||
} #endregion
|
||||
|
||||
static onInspector2Update = function() { #region
|
||||
static onInspector2Update = function(_fromValue = false) { #region
|
||||
if(IS_RENDERING) return;
|
||||
exportAll();
|
||||
} #endregion
|
||||
|
@ -744,7 +749,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
inputs[| 3].editWidget.data_list = format_single;
|
||||
}
|
||||
|
||||
outputs[| 1].setValue(surf);
|
||||
outputs[| 0].setValue(surf);
|
||||
|
||||
var anim = getInputData(3); // single, sequence, animation
|
||||
var extn = getInputData(9);
|
||||
|
@ -808,8 +813,6 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
inputs[| 10].setVisible(false);
|
||||
}
|
||||
|
||||
outputs[| 0].visible = isInLoop();
|
||||
|
||||
if(render_process_id != 0) {
|
||||
var res = ProcIdExists(render_process_id);
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ function Node_Trigger(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
static onInspector2Update = function() { inputs[| 0].setAnim(true); inputs[| 0].setValue(true); }
|
||||
|
||||
static update = function() {
|
||||
var _val = inputs[| 0].getValue();
|
||||
|
||||
var _val = inputs[| 0].getValue();
|
||||
outputs[| 0].setValue(_val);
|
||||
}
|
||||
|
||||
|
|
|
@ -18,17 +18,8 @@ function Node_Trigger_Bool(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
|||
|
||||
doTrigger = 0;
|
||||
|
||||
static step = function() {
|
||||
if(doTrigger == 1) {
|
||||
outputs[| 0].setValue(true);
|
||||
doTrigger = -1;
|
||||
} else if(doTrigger == -1) {
|
||||
outputs[| 0].setValue(false);
|
||||
doTrigger = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static update = function() {
|
||||
|
||||
var val = getInputData(0);
|
||||
var con = getInputData(1);
|
||||
|
||||
|
@ -39,6 +30,8 @@ function Node_Trigger_Bool(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
|||
case 3 : doTrigger = prevVal != val; break;
|
||||
}
|
||||
|
||||
outputs[| 0].setValue(doTrigger);
|
||||
|
||||
preview = doTrigger;
|
||||
prevVal = val;
|
||||
}
|
||||
|
|
|
@ -1588,7 +1588,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
|||
value_dragging = noone;
|
||||
connection_draw_mouse = noone;
|
||||
|
||||
if(_connect[0] == -9) {
|
||||
if(_connect[0] == -7) {
|
||||
if(_connect[1].value_from_loop != noone)
|
||||
_connect[1].value_from_loop.destroy();
|
||||
|
||||
|
|
Loading…
Reference in a new issue