Use fix from #3830 in particle and anim graphs too
This commit is contained in:
@@ -2553,9 +2553,15 @@ void AnimGraphExecutor::ProcessGroupFunction(Box* boxBase, Node* node, Value& va
|
||||
// Function Input
|
||||
case 1:
|
||||
{
|
||||
// Skip when graph is too small (eg. preview) and fallback with default value from the function graph
|
||||
if (context.GraphStack.Count() < 2)
|
||||
{
|
||||
value = tryGetValue(node->TryGetBox(1), Value::Zero);
|
||||
break;
|
||||
}
|
||||
|
||||
// Find the function call
|
||||
AnimGraphNode* functionCallNode = nullptr;
|
||||
ASSERT(context.GraphStack.Count() >= 2);
|
||||
Graph* graph;
|
||||
for (int32 i = context.CallStack.Count() - 1; i >= 0; i--)
|
||||
{
|
||||
|
||||
@@ -482,9 +482,15 @@ void ParticleEmitterGraphCPUExecutor::ProcessGroupFunction(Box* box, Node* node,
|
||||
// Function Input
|
||||
case 1:
|
||||
{
|
||||
// Skip when graph is too small (eg. preview) and fallback with default value from the function graph
|
||||
if (context.GraphStack.Count() < 2)
|
||||
{
|
||||
value = tryGetValue(node->TryGetBox(1), Value::Zero);
|
||||
break;
|
||||
}
|
||||
|
||||
// Find the function call
|
||||
Node* functionCallNode = nullptr;
|
||||
ASSERT(context.GraphStack.Count() >= 2);
|
||||
ParticleEmitterGraphCPU* graph;
|
||||
for (int32 i = context.CallStackSize - 1; i >= 0; i--)
|
||||
{
|
||||
|
||||
@@ -790,7 +790,7 @@ void MaterialGenerator::ProcessGroupFunction(Box* box, Node* node, Value& value)
|
||||
// Function Input
|
||||
case 1:
|
||||
{
|
||||
// Check the stack count.If only 1 graph is present,
|
||||
// Check the stack count. If only 1 graph is present,
|
||||
// we are processing the graph in isolation (e.g., in the Editor Preview).
|
||||
// In this case, we skip the caller-finding logic and use the node's default value.
|
||||
if (_graphStack.Count() < 2)
|
||||
@@ -802,9 +802,6 @@ void MaterialGenerator::ProcessGroupFunction(Box* box, Node* node, Value& value)
|
||||
|
||||
// Find the function call
|
||||
Node* functionCallNode = nullptr;
|
||||
|
||||
// The original ASSERT has been effectively replaced by the 'if' above.
|
||||
//ASSERT(_graphStack.Count() >= 2);
|
||||
Graph* graph;
|
||||
for (int32 i = _callStack.Count() - 1; i >= 0; i--)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user