Simplify renderActive

This commit is contained in:
Tanasart 2023-11-19 20:34:56 +07:00
parent 8e0d66afd3
commit 164c6f6e83
2 changed files with 3 additions and 3 deletions

View file

@ -405,6 +405,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
static isActiveDynamic = function(frame = CURRENT_FRAME) { #region
if(update_on_frame) return true;
if(!rendered) return true;
for(var i = 0; i < ds_list_size(inputs); i++)
if(inputs[| i].isActiveDynamic(frame)) return true;

View file

@ -136,13 +136,12 @@ function __nodeIsRenderLeaf(_node) { #region
if(array_exists(global.group_io, instanceof(_node))) { LOG_IF(global.FLAG.render == 1, $"Skip group IO [{_node.internalName}]"); return false; }
if(!_node.active) { LOG_IF(global.FLAG.render == 1, $"Skip inactive [{_node.internalName}]"); return false; }
if(!_node.isRenderActive()) { LOG_IF(global.FLAG.render == 1, $"Skip non-renderActive [{_node.internalName}]"); return false; }
if(!_node.isRenderActive()) { LOG_IF(global.FLAG.render == 1, $"Skip render inactive [{_node.internalName}]"); return false; }
if(!_node.attributes.update_graph) { LOG_IF(global.FLAG.render == 1, $"Skip non-auto update [{_node.internalName}]"); return false; }
if(_node.passiveDynamic) { _node.forwardPassiveDynamic(); LOG_IF(global.FLAG.render == 1, $"Skip passive dynamic [{_node.internalName}]"); return false; }
if((_node.rendered || (is_instanceof(_node, Node_Collection) && !_node.managedRenderOrder)) && !_node.isActiveDynamic())
{ LOG_IF(global.FLAG.render == 1, $"Skip rendered static [{_node.internalName}]"); return false; }
if(!_node.isActiveDynamic()) { LOG_IF(global.FLAG.render == 1, $"Skip rendered static [{_node.internalName}]"); return false; }
return true;
} #endregion