Files
o3de/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Subtract.h
T
2021-07-06 13:13:16 -07:00

58 lines
2.4 KiB
C++

/*
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <Libraries/Core/BinaryOperator.h>
namespace ScriptCanvas
{
namespace Nodes
{
namespace Math
{
class Subtract
: public ArithmeticExpression
{
public:
AZ_COMPONENT(Subtract, "{A10AD4C7-B633-4A75-8210-1353A87441E4}", ArithmeticExpression);
static void Reflect(AZ::ReflectContext* reflection)
{
if (AZ::SerializeContext* serializeContext = azrtti_cast<AZ::SerializeContext*>(reflection))
{
serializeContext->Class<Subtract, ArithmeticExpression>()
->Version(0)
->Attribute(AZ::Script::Attributes::Deprecated, true)
;
if (AZ::EditContext* editContext = serializeContext->GetEditContext())
{
editContext->Class<Subtract>("Subtract", "Subtract")
->ClassElement(AZ::Edit::ClassElements::EditorData, "This node is deprecated use the Subtract (-) node instead, it provides contextual type and slot configurations.")
->Attribute(ScriptCanvas::Attributes::Node::TitlePaletteOverride, "DeprecatedNodeTitlePalette")
->Attribute(AZ::Script::Attributes::Deprecated, true)
->Attribute(AZ::Edit::Attributes::Category, "Math/Number/Deprecated")
->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Placeholder.png")
->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly)
;
}
}
}
ScriptCanvas::NodeConfiguration GetReplacementNodeConfiguration() const override
{
ScriptCanvas::NodeConfiguration nodeConfig{};
nodeConfig.m_type = AZ::Uuid("D0615D0A-027F-47F6-A02B-E35DAF22F431");
return nodeConfig;
}
};
}
}
}