Navigation
API > API/Plugins > API/Plugins/RigVM
The template is used to group multiple rigvm functions that share the same notation. Templates can then be used to build polymorphic nodes (RigVMTemplateNode) that can take on any of the permutations supported by the template.
| Name | FRigVMTemplate |
| Type | struct |
| Header File | /Engine/Plugins/Runtime/RigVM/Source/RigVM/Public/RigVMCore/RigVMTemplate.h |
| Include Path | #include "RigVMCore/RigVMTemplate.h" |
Syntax
struct FRigVMTemplate
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FRigVMTemplate
(
UScriptStruct* InStruct, |
Constructor from a struct, a template name and a function index. | RigVMCore/RigVMTemplate.h | |
| Default constructor. | RigVMCore/RigVMTemplate.h | ||
FRigVMTemplate
(
const FName& InTemplateName, |
Constructor from a template name and argument infos. | RigVMCore/RigVMTemplate.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FTypeMap | FRigVMTemplateTypeMap | RigVMCore/RigVMTemplate.h | |
| FTypePair | TPair< FName, TRigVMTypeIndex > | RigVMCore/RigVMTemplate.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Arguments | TArray< FRigVMTemplateArgument > | RigVMCore/RigVMTemplate.h | ||
| Delegates | FRigVMTemplateDelegates | RigVMCore/RigVMTemplate.h | ||
| ExecuteArguments | TArray< FRigVMExecuteArgument > | RigVMCore/RigVMTemplate.h | ||
| Hash | uint32 | RigVMCore/RigVMTemplate.h | ||
| Index | int32 | RigVMCore/RigVMTemplate.h | ||
| Notation | FName | RigVMCore/RigVMTemplate.h | ||
| Permutations | TArray< int32 > | RigVMCore/RigVMTemplate.h | ||
| TypesHashToPermutation | TMap< uint32, int32 > | RigVMCore/RigVMTemplate.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool ArgumentSupportsTypeIndex
(
const FName& InArgumentName, |
Returns true if a given arg supports a type | RigVMCore/RigVMTemplate.h | |
void ComputeNotationFromArguments
(
const FString& InTemplateName |
Recomputes the notation from its arguments | RigVMCore/RigVMTemplate.h | |
bool ContainsPermutation
(
const FTypeMap& InTypes, |
Returns true if the template was able to resolve to at least one permutation | RigVMCore/RigVMTemplate.h | |
bool ContainsPermutation
(
const FRigVMFunction* InPermutation, |
Returns true if a given function is a permutation of this template | RigVMCore/RigVMTemplate.h | |
bool ContainsPermutation_NoLock
(
const FTypeMap& InTypes |
RigVMCore/RigVMTemplate.h | ||
bool ContainsPermutation_NoLock
(
const FRigVMFunction* InPermutation |
RigVMCore/RigVMTemplate.h | ||
const FRigVMTemplateArgument * FindArgument
(
const FName& InArgumentName |
Returns an argument given a name (or nullptr) | RigVMCore/RigVMTemplate.h | |
const FRigVMExecuteArgument * FindExecuteArgument
(
const FName& InArgumentName, |
Returns an argument given a name (or nullptr) | RigVMCore/RigVMTemplate.h | |
int32 FindPermutation
(
const FTypeMap& InTypes, |
Returns the index of the permutation within the template of a given set of types | RigVMCore/RigVMTemplate.h | |
int32 FindPermutation
(
const FRigVMFunction* InPermutation |
Returns the index of the permutation within the template of a given function (or INDEX_NONE) | RigVMCore/RigVMTemplate.h | |
bool FullyResolve
(
FTypeMap& InOutTypes, |
Returns true if the template was able to resolve to single permutation | RigVMCore/RigVMTemplate.h | |
const FRigVMTemplateArgument * GetArgument
(
int32 InIndex |
Returns an argument for a given index | RigVMCore/RigVMTemplate.h | |
| Returns meta data on the property of the permutations. | RigVMCore/RigVMTemplate.h | ||
FTypeMap GetArgumentTypesFromString
(
const FString& InTypeString, |
Converts the types provided by a string (like "A:float,B:int32") into a type map | RigVMCore/RigVMTemplate.h | |
FString GetCategory() |
RigVMCore/RigVMTemplate.h | ||
FLinearColor GetColor
(
const TArray< int32 >& InPermutationIndices |
Returns the color based on the permutation's metadata. | RigVMCore/RigVMTemplate.h | |
const FRigVMDispatchFactory * GetDispatchFactory
(
const bool bLockRegistry |
Returns the factory this template was created by. | RigVMCore/RigVMTemplate.h | |
const FRigVMDispatchFactory * GetDispatchFactory_NoLock() |
Returns the factory this template was created by. | RigVMCore/RigVMTemplate.h | |
| Returns the display name text for an argument. | RigVMCore/RigVMTemplate.h | ||
const FRigVMExecuteArgument * GetExecuteArgument
(
int32 InIndex, |
Returns an argument for a given index | RigVMCore/RigVMTemplate.h | |
const UScriptStruct * GetExecuteContextStruct
(
bool bLockRegistry |
Returns the top level execute context struct this template uses | RigVMCore/RigVMTemplate.h | |
FString GetKeywords() |
RigVMCore/RigVMTemplate.h | ||
FName GetName() |
Returns the name of the template. | RigVMCore/RigVMTemplate.h | |
FName GetNodeName() |
Returns the name to use for a node. | RigVMCore/RigVMTemplate.h | |
const FName & GetNotation() |
Returns the notation of this template. | RigVMCore/RigVMTemplate.h | |
const FRigVMFunction * GetOrCreatePermutation
(
int32 InIndex, |
Returns a permutation given an index and creates it using the backing factory if needed | RigVMCore/RigVMTemplate.h | |
const FRigVMFunction * GetPermutation
(
int32 InIndex, |
Returns a permutation given an index | RigVMCore/RigVMTemplate.h | |
const FRigVMFunction * GetPrimaryPermutation
(
bool bLockRegistry |
Returns the first / primary permutation of the template | RigVMCore/RigVMTemplate.h | |
| Returns the tooltip based on the permutation's metadata. | RigVMCore/RigVMTemplate.h | ||
FRigVMTemplateTypeMap GetTypesForPermutation
(
const int32 InPermutationIndex, |
Returns the types for a specific permutation | RigVMCore/RigVMTemplate.h | |
FRigVMTemplateTypeMap GetTypesForPermutation_NoLock
(
const int32 InPermutationIndex |
RigVMCore/RigVMTemplate.h | ||
uint32 GetTypesHashFromTypes
(
const FTypeMap& InTypes |
Will return the hash of the input type map, if it is a valid type map. | RigVMCore/RigVMTemplate.h | |
bool HandlePropagatedArgumentType
(
const TRigVMTypeIndex InTypeIndex |
Updates the template's argument types by adding a single new type. | RigVMCore/RigVMTemplate.h | |
void HandleTypeRemoval
(
TRigVMTypeIndex InTypeIndex |
Invalidates template permutations whenever a type such as a user defined struct is removed. | RigVMCore/RigVMTemplate.h | |
bool IsValid() |
Returns true if this is a valid template | RigVMCore/RigVMTemplate.h | |
bool Merge
(
const FRigVMTemplate& InOther |
Returns true if this template can merge another one | RigVMCore/RigVMTemplate.h | |
int32 NumArguments() |
Returns the number of args of this template | RigVMCore/RigVMTemplate.h | |
int32 NumExecuteArguments
(
const FRigVMDispatchContext& InContext |
Returns the number of args of this template | RigVMCore/RigVMTemplate.h | |
int32 NumPermutations() |
Returns the number of permutations supported by this template | RigVMCore/RigVMTemplate.h | |
FRigVMTemplate_NewArgumentTypeDelegate & OnNewArgumentType() |
Returns the delegate to be able to react to type changes dynamically This delegate is deprecated | RigVMCore/RigVMTemplate.h | |
void RecomputeTypesHashToPermutations () |
RigVMCore/RigVMTemplate.h | ||
void RecomputeTypesHashToPermutations
(
const TArray< FRigVMTypeCacheScope_NoLock >& InTypeCaches |
RigVMCore/RigVMTemplate.h | ||
bool Resolve
(
FTypeMap& InOutTypes, |
Returns true if the template was able to resolve to at least one permutation | RigVMCore/RigVMTemplate.h | |
bool ResolveArgument
(
const FName& InArgumentName, |
Returns true if the template can resolve an argument to a new type | RigVMCore/RigVMTemplate.h | |
bool SupportsExecuteContextStruct
(
const UScriptStruct* InExecuteContextStruct |
Returns true if this template supports a given execute context struct | RigVMCore/RigVMTemplate.h | |
bool UpdateAllArgumentTypesSlow () |
Updates the template's argument types. | RigVMCore/RigVMTemplate.h | |
void UpdateTypesHashToPermutation
(
const int32 InPermutation |
RigVMCore/RigVMTemplate.h | ||
bool UsesDispatch() |
Returns true if this template is backed by a dispatch factory. | RigVMCore/RigVMTemplate.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FString GetArgumentNotation
(
const FName InName, |
Returns the notation of an argument | RigVMCore/RigVMTemplate.h | |
static FLinearColor GetColorFromMetadata
(
FString InMetadata |
RigVMCore/RigVMTemplate.h | ||
static const FString & GetDirectionPrefix
(
const ERigVMPinDirection InDirection |
Returns the prefix for an argument in the notation | RigVMCore/RigVMTemplate.h | |
static FString GetStringFromArgumentTypes
(
const FTypeMap& InTypes, |
Converts the types provided to a string (like "A:float,B:int32") | RigVMCore/RigVMTemplate.h | |
| Returns an array of structs in the inheritance order of a given struct | RigVMCore/RigVMTemplate.h | ||
static bool IsValidArgumentForTemplate
(
const ERigVMPinDirection InDirection |
Returns true if a given argument is valid for a template | RigVMCore/RigVMTemplate.h |