Navigation
API > API/Plugins > API/Plugins/PCG > API/Plugins/PCG/Elements > API/Plugins/PCG/Elements/Metadata
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UPCGData
- UPCGSettingsInterface
- UPCGSettings
- UPCGMetadataSettingsBase
- UPCGMetadataBitwiseSettings
- UPCGMetadataBooleanSettings
- UPCGMetadataBreakTransformSettings
- UPCGMetadataBreakVectorSettings
- UPCGMetadataCompareSettings
- UPCGMetadataMakeRotatorSettings
- UPCGMetadataMakeTransformSettings
- UPCGMetadataMakeVectorSettings
- UPCGMetadataMathsSettings
- UPCGMetadataRotatorSettings
- UPCGMetadataStringOpSettings
- UPCGMetadataTransformSettings
- UPCGMetadataTrigSettings
- UPCGMetadataVectorSettings
References
| Module | PCG |
| Header | /Engine/Plugins/Experimental/PCG/Source/PCG/Public/Elements/Metadata/PCGMetadataOpElementBase.h |
| Include | #include "Elements/Metadata/PCGMetadataOpElementBase.h" |
Syntax
UCLASS&40;BlueprintType, Abstract, ClassGroup&61;&40;Procedural&41;&41;
class UPCGMetadataSettingsBase : public UPCGSettings
Remarks
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.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TStaticArray< bool, MaxNumberOfOutputs > | ForceOutputConnections | Useful for unit tests. Allow to force a connection to allow the node to do its operation, even if nothing is connected to it. | |
| FName | OutputDataFromPin | 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). | |
| FPCGAttributePropertyOutputSelector | OutputTarget |
Functions
| Type | Name | Description | |
|---|---|---|---|
| UPCGParamData * | CreateDefaultValueParam
(
uint32 Index |
||
| bool | DoesInputSupportDefaultValue
(
uint32 Index |
Can be overriden by child class to support default values on unplugged pins. | |
| TArray< uint16 > | |||
| FString | GetDefaultValueString
(
uint32 Index |
||
| uint32 | GetInputPinIndex
(
FName InPinLabel |
Return the index of the given input pin label. INDEX_NONE if not found | |
| FName | GetInputPinLabel
(
uint32 Index |
||
| uint32 | |||
| uint32 | Return the current input pin to forward to the output. | ||
| EPCGDataType | GetInputPinType
(
uint32 Index |
Return the type union from incident edges with the support for default values. | |
| FPCGAttributePropertyInputSelector | GetInputSource
(
uint32 Index |
||
| FName | GetOutputAttributeName
(
FName BaseName, |
||
| TArray< FName > | Return the list of all the Input pins | ||
| FName | GetOutputPinLabel
(
uint32 Index |
||
| uint32 | |||
| uint16 | GetOutputType
(
uint16 InputTypeId |
||
| bool | |||
| bool | IsSupportedInputType
(
uint16 TypeId, |
Overridden from UPCGSettings
| Type | Name | Description | |
|---|---|---|---|
| void | ApplyDeprecation
(
UPCGNode* InOutNode |
Any final migration/recovery that can be done after pins are finalized. | |
| EPCGDataType | GetCurrentPinTypes
(
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. | |
| FText | |||
| bool | GetPinExtraIcon
(
const UPCGPin* InPin, |
Can override to add a custom icon next to the pin label (and an optional tooltip). | |
| EPCGSettingsType | GetType () |
||
| bool | If the node has any dynamic pins that can change based on input or settings | ||
| TArray< FPCGPinProperties > | Returns an array of all the input pin properties. You should not add manually a "params" pin, it is handled automatically by FillOverridableParamsPins. | ||
| TArray< FPCGPinProperties > |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| bool | CanEditChange
(
const FProperty* InProperty |
Passthrough for the simpler method, to avoid modifying the child settings already overriding this method. | |
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally | |
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. |
Constants
| Name | Description |
|---|---|
| MaxNumberOfInputs | |
| MaxNumberOfOutputs |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| EPCGMetadataSettingsBaseMode | Mode_DEPRECATED | ||
| FName | OutputAttributeName_DEPRECATED |