Files
UnrealEngine/Engine/Plugins/Mutable/Source/MutableTools/Public/MuT/NodeExtensionDataConstant.h
2025-05-18 13:04:45 +08:00

50 lines
1.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "MuR/ExtensionData.h"
#include "MuR/Ptr.h"
#include "MuR/RefCounted.h"
#include "MuT/NodeExtensionData.h"
namespace mu
{
//! Node that outputs a constant ExtensionData
//! \ingroup model
class MUTABLETOOLS_API NodeExtensionDataConstant : public NodeExtensionData
{
public:
TSharedPtr<const FExtensionData> Value;
public:
//-----------------------------------------------------------------------------------------
// Node Interface
//-----------------------------------------------------------------------------------------
virtual const FNodeType* GetType() const override { return GetStaticType(); }
static const FNodeType* GetStaticType() { return &StaticType; }
//-----------------------------------------------------------------------------------------
// Own Interface
//-----------------------------------------------------------------------------------------
/** Deprecated. Access Value attribute directly. */
void SetValue(const TSharedPtr<const FExtensionData>& In) { Value = In; }
protected:
/** Forbidden. Manage with the Ptr<> template. */
~NodeExtensionDataConstant() {}
private:
static FNodeType StaticType;
};
}