mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-24 14:06:23 +01:00
- Add short delay in file watcher to prevent overlapped read.
This commit is contained in:
parent
05eb31ad8e
commit
ddddb5d18d
6 changed files with 31 additions and 19 deletions
|
@ -55,9 +55,12 @@ function Node_Byte_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons
|
|||
|
||||
static step = function() { #region
|
||||
if(attributes.file_checker && file_exists_empty(path_current)) {
|
||||
if(file_get_modify_s(path_current) > edit_time) {
|
||||
updatePaths();
|
||||
triggerRender();
|
||||
var _modi = file_get_modify_s(path_current);
|
||||
|
||||
if(_modi > edit_time) {
|
||||
edit_time = _modi;
|
||||
|
||||
run_in(2, function() { updatePaths(); triggerRender(); });
|
||||
}
|
||||
}
|
||||
} #endregion
|
||||
|
|
|
@ -106,9 +106,12 @@ function Node_CSV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
|||
|
||||
static step = function() { #region
|
||||
if(attributes.file_checker && file_exists_empty(path_current)) {
|
||||
if(file_get_modify_s(path_current) > edit_time) {
|
||||
updatePaths();
|
||||
triggerRender();
|
||||
var _modi = file_get_modify_s(path_current);
|
||||
|
||||
if(_modi > edit_time) {
|
||||
edit_time = _modi;
|
||||
|
||||
run_in(2, function() { updatePaths(); triggerRender(); });
|
||||
}
|
||||
}
|
||||
} #endregion
|
||||
|
|
|
@ -144,9 +144,12 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
|||
}
|
||||
|
||||
if(attributes.file_checker && file_exists_empty(path_current)) {
|
||||
if(file_get_modify_s(path_current) > edit_time) {
|
||||
updatePaths();
|
||||
triggerRender();
|
||||
var _modi = file_get_modify_s(path_current);
|
||||
|
||||
if(_modi > edit_time) {
|
||||
edit_time = _modi;
|
||||
|
||||
run_in(2, function() { updatePaths(); triggerRender(); });
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -87,9 +87,12 @@ function Node_Json_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons
|
|||
|
||||
static step = function() { #region
|
||||
if(attributes.file_checker && file_exists_empty(path_current)) {
|
||||
if(file_get_modify_s(path_current) > edit_time) {
|
||||
updatePaths();
|
||||
triggerRender();
|
||||
var _modi = file_get_modify_s(path_current);
|
||||
|
||||
if(_modi > edit_time) {
|
||||
edit_time = _modi;
|
||||
|
||||
run_in(2, function() { updatePaths(); triggerRender(); });
|
||||
}
|
||||
}
|
||||
} #endregion
|
||||
|
|
|
@ -89,10 +89,7 @@ function Node_Text_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons
|
|||
if(_modi > edit_time) {
|
||||
edit_time = _modi;
|
||||
|
||||
run_in(2, function() {
|
||||
updatePaths();
|
||||
triggerRender();
|
||||
});
|
||||
run_in(2, function() { updatePaths(); triggerRender(); });
|
||||
}
|
||||
}
|
||||
} #endregion
|
||||
|
|
|
@ -194,9 +194,12 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
|||
}
|
||||
|
||||
if(attributes.file_checker && file_exists_empty(path_current)) {
|
||||
if(file_get_modify_s(path_current) > edit_time) {
|
||||
updatePaths();
|
||||
triggerRender();
|
||||
var _modi = file_get_modify_s(path_current);
|
||||
|
||||
if(_modi > edit_time) {
|
||||
edit_time = _modi;
|
||||
|
||||
run_in(2, function() { updatePaths(); triggerRender(); });
|
||||
}
|
||||
}
|
||||
} #endregion
|
||||
|
|
Loading…
Reference in a new issue