Fixes for internal if-branch node parser bug (LYN-4347) and exposing properties for AZStd::tuple (LYN-3910)
This commit is contained in:
@@ -3356,23 +3356,27 @@ namespace ScriptCanvas
|
||||
|
||||
if (executionIf->GetId().m_node->IsIfBranchPrefacedWithBooleanExpression())
|
||||
{
|
||||
auto removeChildOutcome = RemoveChild(executionIf->ModParent(), executionIf);
|
||||
if (!removeChildOutcome.IsSuccess())
|
||||
ExecutionTreePtr booleanExpression;
|
||||
|
||||
{
|
||||
AddError(executionIf->GetNodeId(), executionIf, ScriptCanvas::ParseErrors::FailedToRemoveChild);
|
||||
auto removeChildOutcome = RemoveChild(executionIf->ModParent(), executionIf);
|
||||
if (!removeChildOutcome.IsSuccess())
|
||||
{
|
||||
AddError(executionIf->GetNodeId(), executionIf, ScriptCanvas::ParseErrors::FailedToRemoveChild);
|
||||
}
|
||||
|
||||
if (!IsErrorFree())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const auto indexAndChild = removeChildOutcome.TakeValue();
|
||||
|
||||
booleanExpression = CreateChild(executionIf->ModParent(), executionIf->GetId().m_node, executionIf->GetId().m_slot);
|
||||
executionIf->ModParent()->InsertChild(indexAndChild.first, { indexAndChild.second.m_slot, indexAndChild.second.m_output, booleanExpression });
|
||||
executionIf->SetParent(booleanExpression);
|
||||
}
|
||||
|
||||
if (!IsErrorFree())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const auto indexAndChild = removeChildOutcome.TakeValue();
|
||||
|
||||
ExecutionTreePtr booleanExpression = CreateChild(executionIf->ModParent(), executionIf->GetId().m_node, executionIf->GetId().m_slot);
|
||||
executionIf->ModParent()->InsertChild(indexAndChild.first, { indexAndChild.second.m_slot, indexAndChild.second.m_output, booleanExpression });
|
||||
executionIf->SetParent(booleanExpression);
|
||||
|
||||
// make a condition here
|
||||
auto symbol = CheckLogicalExpressionSymbol(booleanExpression);
|
||||
if (symbol != Symbol::FunctionCall && symbol != Symbol::Count)
|
||||
@@ -3402,7 +3406,7 @@ namespace ScriptCanvas
|
||||
return;
|
||||
}
|
||||
|
||||
const auto indexAndChild2 = removeChildOutcome.TakeValue();
|
||||
const auto indexAndChild2 = removeChildOutcome2.TakeValue();
|
||||
|
||||
// parse if statement internal function
|
||||
ExecutionTreePtr internalFunction = CreateChild(booleanExpression->ModParent(), booleanExpression->GetId().m_node, booleanExpression->GetId().m_slot);
|
||||
@@ -4782,7 +4786,7 @@ namespace ScriptCanvas
|
||||
{
|
||||
PropertyExtractionPtr extraction = AZStd::make_shared<PropertyExtraction>();
|
||||
extraction->m_slot = slot;
|
||||
extraction->m_name = propertyField.first;
|
||||
extraction->m_name = AZ::ReplaceCppArtifacts(propertyField.first);
|
||||
execution->AddPropertyExtractionSource(slot, extraction);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user