Add error messages to ErrorText.h, label functionality to fix default groups on FDNs.
This commit is contained in:
@@ -1036,12 +1036,12 @@ namespace ScriptCanvas
|
||||
if (azrtti_istypeof<ScriptCanvas::Nodes::NodeableNodeOverloaded*>(&node))
|
||||
{
|
||||
// todo Add node to these errors
|
||||
AddError(nullptr, ValidationConstPtr(aznew Internal::ParseError(node.GetEntityId(), AZStd::string::format("NodeableNodeOverloaded doesn't have enough data connected to select a valid overload: %s", node.GetDebugName().data()))));
|
||||
AddError(nullptr, ValidationConstPtr(aznew Internal::ParseError(node.GetEntityId(), AZStd::string::format("%s: %s", ParseErrors::NodeableNodeOverloadAmbiguous, node.GetDebugName().data()))));
|
||||
}
|
||||
else
|
||||
{
|
||||
// todo Add node to these errors
|
||||
AddError(nullptr, ValidationConstPtr(aznew Internal::ParseError(node.GetEntityId(), AZStd::string::format("NodeableNode did not construct its internal node: %s", node.GetDebugName().data()))));
|
||||
AddError(nullptr, ValidationConstPtr(aznew Internal::ParseError(node.GetEntityId(), AZStd::string::format("%s: %s", ParseErrors::NodeableNodeDidNotConstructInternalNodeable, node.GetDebugName().data()))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+27
-17
@@ -19,6 +19,32 @@
|
||||
|
||||
#include <ScriptCanvas/Debugger/ValidationEvents/DataValidation/InvalidPropertyEvent.h>
|
||||
|
||||
namespace FunctionDefinitionNodeCpp
|
||||
{
|
||||
void VersionUpdateRemoveDefaultDisplayGroup(ScriptCanvas::Nodes::Core::FunctionDefinitionNode& node)
|
||||
{
|
||||
using namespace ScriptCanvas;
|
||||
using namespace ScriptCanvas::Nodes::Core;
|
||||
|
||||
AZ::SerializeContext* serializeContext{};
|
||||
AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext);
|
||||
if (serializeContext)
|
||||
{
|
||||
const auto& classData = serializeContext->FindClassData(azrtti_typeid<FunctionDefinitionNode>());
|
||||
if (classData && classData->m_version < FunctionDefinitionNode::NodeVersion::RemoveDefaultDisplayGroup)
|
||||
{
|
||||
for (auto& slot : node.ModAllSlots())
|
||||
{
|
||||
if (slot->GetType() == CombinedSlotType::DataIn || slot->GetType() == CombinedSlotType::DataOut)
|
||||
{
|
||||
slot->ClearDynamicGroup();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace ScriptCanvas
|
||||
{
|
||||
namespace Nodes
|
||||
@@ -116,23 +142,7 @@ namespace ScriptCanvas
|
||||
void FunctionDefinitionNode::OnInit()
|
||||
{
|
||||
Nodeling::OnInit();
|
||||
|
||||
AZ::SerializeContext* serializeContext{};
|
||||
AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext);
|
||||
if (serializeContext)
|
||||
{
|
||||
const auto& classData = serializeContext->FindClassData(azrtti_typeid<FunctionDefinitionNode>());
|
||||
if (classData && classData->m_version < NodeVersion::RemoveDefaultDisplayGroup)
|
||||
{
|
||||
for (auto& slot : ModAllSlots())
|
||||
{
|
||||
if (slot->GetType() == CombinedSlotType::DataIn || slot->GetType() == CombinedSlotType::DataOut)
|
||||
{
|
||||
slot->ClearDynamicGroup();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
FunctionDefinitionNodeCpp::VersionUpdateRemoveDefaultDisplayGroup(*this);
|
||||
}
|
||||
|
||||
void FunctionDefinitionNode::SetupSlots()
|
||||
|
||||
@@ -29,15 +29,13 @@ namespace ScriptCanvas
|
||||
class FunctionDefinitionNode
|
||||
: public Internal::Nodeling
|
||||
{
|
||||
private:
|
||||
public:
|
||||
enum NodeVersion
|
||||
{
|
||||
Initial = 1,
|
||||
Initial = 1,
|
||||
RemoveDefaultDisplayGroup,
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
SCRIPTCANVAS_NODE(FunctionDefinitionNode);
|
||||
|
||||
FunctionDefinitionNode() = default;
|
||||
|
||||
@@ -62,6 +62,8 @@ namespace ScriptCanvas
|
||||
constexpr const char* NoChildrenAfterRoot = "No children after parsing function root";
|
||||
constexpr const char* NoChildrenInExtraction = "No children found in property extraction node";
|
||||
constexpr const char* NoDataPresent = "Could not construct from graph, no graph data was present";
|
||||
constexpr const char* NodeableNodeOverloadAmbiguous = "NodeableNodeOverloaded doesn't have enough data connected to select a valid overload";
|
||||
constexpr const char* NodeableNodeDidNotConstructInternalNodeable = "NodeableNode did not construct its internal Nodeable";
|
||||
constexpr const char* NoInputToForEach = "No Input To For Each Loop";
|
||||
constexpr const char* NoOutForExecution = "No out slot for execution root";
|
||||
constexpr const char* NoOutSlotInFunctionDefinitionStart = "No 'Out' slot in start of function definition";
|
||||
|
||||
Reference in New Issue
Block a user