Navigation
API > API/Plugins > API/Plugins/PCG
Base class for all Metadata operations. Metadata operation can work with attributes or properties. For example you could compute the addition between all points density and a constant from a param data. The output will be the duplication of the first spatial input (by default - can be overridden by OutputDataFromPin), with the same metadata + the result of the operation (either in an attribute or a property).
The new attribute can collide with one of the attributes in the incoming metadata. In this case, the attribute value will be overridden by the result of the operation. It will also override the type of the attribute if it doesn't match the original.
We only support operations between points and between spatial data. They all need to match (or be a param data) For example, if input 0 is a point data and input 1 is a spatial data, we fail.
You can specify the name of the attribute for each input and for the output. If the input name is None, it will take the lastest attribute in the input metadata. If the output name is None, it will take the input name.
Each operation has some requirements for the input types, and can broadcast some values into others (example Vector + Float -> Vector). For example, if the op only accept booleans, all other value types will throw an error.
If there are multiple values for an attribute, the operation will be done on all values. If one input has N elements and the second has 1 element, the second will be repeated for each element of the first for the operation. We only support N-N operations and N-1 operation (ie. The number of values needs to be all the same or 1)
If the node doesn't provide an output, check the logs to know why it failed.
| Name | UPCGMetadataSettingsBase |
| Type | class |
| Header File | /Engine/Plugins/PCG/Source/PCG/Public/Elements/Metadata/PCGMetadataOpElementBase.h |
| Include Path | #include "Elements/Metadata/PCGMetadataOpElementBase.h" |
Syntax
UCLASS (MinimalAPI, BlueprintType, Abstract, ClassGroup=(Procedural))
class UPCGMetadataSettingsBase :
public UPCGSettings ,
public IPCGSettingsDefaultValueProvider
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UPCGData → UPCGSettingsInterface → UPCGSettings → UPCGMetadataSettingsBase
Implements Interfaces
Derived Classes
UPCGMetadataSettingsBase derived class hierarchy
- UPCGAttributeRemapSettings
- UPCGHashAttributeSettings
- UPCGMetadataBitwiseSettings
- UPCGMetadataBooleanSettings
- UPCGMetadataBreakTransformSettings
- UPCGMetadataBreakVectorSettings
- UPCGMetadataCompareSettings
- UPCGMetadataMakeRotatorSettings
- UPCGMetadataMakeTransformSettings
- UPCGMetadataMakeVectorSettings
- UPCGMetadataMathsSettings
- UPCGMetadataRotatorSettings
- UPCGMetadataStringOpSettings
- UPCGMetadataTransformSettings
- UPCGMetadataTrigSettings
- UPCGMetadataVectorSettings
- UPCGParseStringSettings
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| MaxNumberOfInputs | uint32 | Elements/Metadata/PCGMetadataOpElementBase.h | |
| MaxNumberOfOutputs | uint32 | Elements/Metadata/PCGMetadataOpElementBase.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ForceOutputConnections | TStaticArray< bool, MaxNumberOfOutputs > | Useful for unit tests. Allow to force a connection to allow the node to do its operation, even if nothing is connected to it. | Elements/Metadata/PCGMetadataOpElementBase.h | |
| OutputDataFromPin | FName | By default, output is taken from first non-param pin (aka if the second pin is a point data, the output will be this point data). | Elements/Metadata/PCGMetadataOpElementBase.h |
|
| OutputTarget | FPCGAttributePropertyOutputSelector | Elements/Metadata/PCGMetadataOpElementBase.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| DefaultValues | FPCGDefaultValueContainer | Stores the default values for the pins to be used as inline constants. | Elements/Metadata/PCGMetadataOpElementBase.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddDefaultValuesToCrc
(
FArchiveCrc32& Crc32 |
Adds the default values to the Crc for caching. | Elements/Metadata/PCGMetadataOpElementBase.h | |
virtual UPCGParamData * CreateDefaultValueParam
(
uint32 Index |
Elements/Metadata/PCGMetadataOpElementBase.h | ||
virtual UPCGParamData * CreateDefaultValueParam
(
FPCGContext* Context, |
Elements/Metadata/PCGMetadataOpElementBase.h | ||
const UPCGParamData * CreateDefaultValueParamData
(
FPCGContext* Context, |
Creates a Param Data with the inline constant default value properties inserted as metadata. | Elements/Metadata/PCGMetadataOpElementBase.h | |
virtual bool DoesInputSupportDefaultValue
(
uint32 Index |
Can be overriden by child class to support default values on unplugged pins. | Elements/Metadata/PCGMetadataOpElementBase.h | |
virtual TArray< uint16 > GetAllOutputTypes() |
Elements/Metadata/PCGMetadataOpElementBase.h | ||
virtual FName GetInputPinLabel
(
uint32 Index |
Elements/Metadata/PCGMetadataOpElementBase.h | ||
uint32 GetInputPinToForward() |
Return the current input pin to forward to the output. | Elements/Metadata/PCGMetadataOpElementBase.h | |
virtual FPCGAttributePropertyInputSelector GetInputSource
(
uint32 Index |
Elements/Metadata/PCGMetadataOpElementBase.h | ||
virtual uint32 GetOperandNum() |
Elements/Metadata/PCGMetadataOpElementBase.h | ||
| Elements/Metadata/PCGMetadataOpElementBase.h | |||
virtual FName GetOutputPinLabel
(
uint32 Index |
Elements/Metadata/PCGMetadataOpElementBase.h | ||
virtual uint16 GetOutputType
(
uint16 InputTypeId |
Elements/Metadata/PCGMetadataOpElementBase.h | ||
virtual uint32 GetResultNum() |
Elements/Metadata/PCGMetadataOpElementBase.h | ||
virtual bool HasDifferentOutputTypes() |
Elements/Metadata/PCGMetadataOpElementBase.h | ||
virtual bool IsSupportedInputType
(
uint16 TypeId, |
Elements/Metadata/PCGMetadataOpElementBase.h |
Overridden from UPCGSettings
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ApplyDeprecation
(
UPCGNode* InOutNode |
Any final migration/recovery that can be done after pins are finalized. | Elements/Metadata/PCGMetadataOpElementBase.h | |
virtual bool CanCullTaskIfUnwired () |
True if we can safely cull this node & task if it has unwired non-advanced inputs. | Elements/Metadata/PCGMetadataOpElementBase.h | |
virtual bool DoesPinSupportPassThrough
(
UPCGPin* InPin |
By default, the first non-Advanced pin that supports pass-through will be selected. | Elements/Metadata/PCGMetadataOpElementBase.h | |
virtual FPCGDataTypeIdentifier GetCurrentPinTypesID
(
const UPCGPin* InPin |
Returns the current pin types, which can either be the static types from the pin properties, or a dynamic type based on connected edges. | Elements/Metadata/PCGMetadataOpElementBase.h | |
virtual FText GetNodeTooltipText() |
Elements/Metadata/PCGMetadataOpElementBase.h | ||
virtual bool GetPinExtraIcon
(
const UPCGPin* InPin, |
Can override to add a custom icon next to the pin label (and an optional tooltip). | Elements/Metadata/PCGMetadataOpElementBase.h | |
virtual EPCGSettingsType GetType() |
Elements/Metadata/PCGMetadataOpElementBase.h | ||
virtual bool HasDynamicPins() |
If the node has any dynamic pins that can change based on input or settings | Elements/Metadata/PCGMetadataOpElementBase.h | |
virtual bool HasFlippedTitleLines() |
Display generated title line as primary title (example: BP nodes display the blueprint name as the primary title). | Elements/Metadata/PCGMetadataOpElementBase.h | |
virtual bool IsInputPinRequiredByExecution
(
const UPCGPin* InPin |
By default a node does not specify any pin requirements, and will execute if it has no non-advanced pins or if it has any active connection to any pin. | Elements/Metadata/PCGMetadataOpElementBase.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanEditChange
(
const FProperty* InProperty |
Passthrough for the simpler method, to avoid modifying the child settings already overriding this method. | Elements/Metadata/PCGMetadataOpElementBase.h | |
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Elements/Metadata/PCGMetadataOpElementBase.h | ||
virtual void PostLoad() |
Elements/Metadata/PCGMetadataOpElementBase.h |
Overridden from IPCGSettingsDefaultValueProvider
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ConvertPinDefaultValueMetadataType
(
FName PinLabel, |
Attempts a metadata type conversion of the pin's default value inline constant. | Elements/Metadata/PCGMetadataOpElementBase.h | |
virtual bool DefaultValuesAreEnabled() |
One or more pins on this node has a 'default value' and can be adjusted via an inline constant. | Elements/Metadata/PCGMetadataOpElementBase.h | |
| Gets the 'default value', if supported, for the pin. | Elements/Metadata/PCGMetadataOpElementBase.h | ||
virtual EPCGMetadataTypes GetPinDefaultValueType
(
FName PinLabel |
Gets the current 'default value' type, if supported, for the pin. | Elements/Metadata/PCGMetadataOpElementBase.h | |
| For the initial 'default value' of the pin. | Elements/Metadata/PCGMetadataOpElementBase.h | ||
virtual bool IsPinDefaultValueActivated
(
FName PinLabel |
The specified pin has a 'default value' currently activated. | Elements/Metadata/PCGMetadataOpElementBase.h | |
virtual bool IsPinDefaultValueEnabled
(
FName PinLabel |
The specified pin can accomodate 'default value' inline constants. | Elements/Metadata/PCGMetadataOpElementBase.h | |
virtual bool IsPinDefaultValueMetadataTypeValid
(
FName PinLabel, |
Whether the pin supports the provided metadata type. | Elements/Metadata/PCGMetadataOpElementBase.h | |
virtual void ResetDefaultValue
(
FName PinLabel |
Resets the pin's default value to the initial value. | Elements/Metadata/PCGMetadataOpElementBase.h | |
virtual void ResetDefaultValues() |
Resets all default values to their 'reset' value and deactivates them. | Elements/Metadata/PCGMetadataOpElementBase.h | |
| Sets the pin's default value string directly. | Elements/Metadata/PCGMetadataOpElementBase.h | ||
virtual void SetPinDefaultValueIsActivated
(
FName PinLabel, |
Sets the default value to active. Must be overridden by the subclass. | Elements/Metadata/PCGMetadataOpElementBase.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool CanEditInputSource
(
const FProperty* InProperty, |
Helper to check if the InputSource property should be hidden to the user. | Elements/Metadata/PCGMetadataOpElementBase.h | |
uint32 GetInputPinIndex
(
FName InPinLabel |
Return the index of the given input pin label. INDEX_NONE if not found | Elements/Metadata/PCGMetadataOpElementBase.h | |
EPCGDataType GetInputPinType
(
uint32 Index |
Elements/Metadata/PCGMetadataOpElementBase.h | ||
FPCGDataTypeIdentifier GetInputPinTypeID
(
uint32 Index |
Return the type union from incident edges with the support for default values. | Elements/Metadata/PCGMetadataOpElementBase.h | |
| Return the list of all the Input pins | Elements/Metadata/PCGMetadataOpElementBase.h |
Overridden from UPCGSettings
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TArray< FPCGPinProperties > InputPinProperties() |
Returns an array of all the input pin properties. You should not add manually a "params" pin, it is handled automatically by FillOverridableParamsPins. | Elements/Metadata/PCGMetadataOpElementBase.h | |
virtual TArray< FPCGPinProperties > OutputPinProperties() |
Elements/Metadata/PCGMetadataOpElementBase.h |
Overridden from IPCGSettingsDefaultValueProvider
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual EPCGMetadataTypes GetPinInitialDefaultValueType
(
FName PinLabel |
For the initial 'default value' type of the pin. | Elements/Metadata/PCGMetadataOpElementBase.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Mode_DEPRECATED | EPCGMetadataSettingsBaseMode | Elements/Metadata/PCGMetadataOpElementBase.h | ||
| OutputAttributeName_DEPRECATED | FName | Elements/Metadata/PCGMetadataOpElementBase.h |