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

53 lines
1.0 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "MuR/Image.h"
#include "MuR/Ptr.h"
#include "MuR/RefCounted.h"
#include "MuT/Node.h"
#include "MuT/NodeImage.h"
namespace mu
{
/** Node that outputs a constant image.
* This node also supports "image references".
*/
class MUTABLETOOLS_API NodeImageConstant : public NodeImage
{
public:
/** */
Ptr<TResourceProxy<FImage>> Proxy;
/** */
FSourceDataDescriptor SourceDataDescriptor;
public:
// Node Interface
virtual const FNodeType* GetType() const override { return GetStaticType(); }
static const FNodeType* GetStaticType() { return &StaticType; }
// Own Interface
//! Set the image to be output by this node
void SetValue(TSharedPtr<const FImage>);
//! Set the image proxy that will provide the image for this node when necessary
void SetValue( Ptr<TResourceProxy<FImage>> );
protected:
/** Forbidden. Manage with the Ptr<> template. */
~NodeImageConstant() {}
private:
static FNodeType StaticType;
};
}