LD::Editor::PropertyUtils¶
Module: SMSystemEditor
Namespaces¶
Classes¶
Functions¶
| Name | |
|---|---|
| SMSYSTEMEDITOR_API TSharedPtr< ISinglePropertyView > | CreatePropertyViewForProperty(UObject * InObjectOwner, const FName & InPropertyName) |
| SMSYSTEMEDITOR_API void | SetPropertyValue(FProperty * InProperty, const FString & InValue, UObject * InObject, int32 InArrayIndex =0) |
| SMSYSTEMEDITOR_API FString | GetPropertyValue(FProperty * InProperty, UObject * InObject, int32 InArrayIndex =0) |
| SMSYSTEMEDITOR_API FProperty * | GetExtendedGraphPropertyResult(FProperty * InProperty, uint8 * InContainer) |
| SMSYSTEMEDITOR_API bool | IsObjectPropertyInstanced(const FObjectProperty * ObjectProperty) |
| SMSYSTEMEDITOR_API void | GetAllObjectProperties(const void * InObject, const UStruct * InPropertySource, TArray< FPropertyRetrieval > & OutProperties, const FPropertyRetrievalArgs & InArgs =FPropertyRetrievalArgs()) |
| SMSYSTEMEDITOR_API void | ForEachInstancedSubObject(const UObject * InObject, const TFunction< void(UObject *)> & Function) |
| SMSYSTEMEDITOR_API const FGuid & | SetGraphPropertyFromProperty(FSMGraphProperty_Base & GraphProperty, FProperty * Property, const USMNodeInstance * NodeInstance, int32 Index =0, bool bSetGuid =true, bool bUseTemplateInGuid =true, bool bUseTempNativeGuid =false) |
| SMSYSTEMEDITOR_API void | SetGraphPropertyFlagsFromNativeProperty(FSMGraphProperty_Base & InOutGraphProperty, const FProperty * InProperty) |
| SMSYSTEMEDITOR_API bool | IsPropertyExposedToGraphNode(const FProperty * Property) |
| SMSYSTEMEDITOR_API bool | IsPropertyHandleExposedContainer(const TSharedPtr< IPropertyHandle > & InHandle) |
| SMSYSTEMEDITOR_API FStructProperty * | GetGraphPropertyFromProperty(FProperty * Property) |
| SMSYSTEMEDITOR_API bool | IsPropertyGraphProperty(const FProperty * Property) |
| SMSYSTEMEDITOR_API void | SetPropertyOverride(USMNodeInstance * InNodeCDO, const FPropertyOverrideArgs & InArgs) |
| bool | ShouldGraphPropertyDisplayThumbnail(const USMGraphK2Node_PropertyNode_Base * InGraphPropertyNode) |
| FText | GetPropertyDisplayName(const FText & InPropertyText, const int32 InArrayIndex =INDEX_NONE) |
| void | MapNodeTemplatesToProperties(USMGraphNode_StateNodeBase * InStateNode, TMap< USMNodeInstance *, TArray< USMGraphK2Node_PropertyNode_Base * > > & OutTemplatePropertyMap) |
Functions Documentation¶
function CreatePropertyViewForProperty¶
SMSYSTEMEDITOR_API TSharedPtr< ISinglePropertyView > CreatePropertyViewForProperty(
UObject * InObjectOwner,
const FName & InPropertyName
)
Create a temporary property handle for a given property. Call GetPropertyHandle() from here. The property handle will be valid as long as the property view is valid.
Parameters:
InObjectOwner- UObject owning the property.
InPropertyName- The field name of the property.
Return: A property handle created for this property.
function SetPropertyValue¶
SMSYSTEMEDITOR_API void SetPropertyValue(
FProperty * InProperty,
const FString & InValue,
UObject * InObject,
int32 InArrayIndex =0
)
Correctly set a property value by importing a text value. Handles individual properties, arrays, and extended graph properties. This does not use property handles and instance propagation will not occur.
Parameters:
InProperty- The property to import data.
InValue- The text value to import.
InObject- The object instance containing this property.
InArrayIndex- An index for the property.
function GetPropertyValue¶
SMSYSTEMEDITOR_API FString GetPropertyValue(
FProperty * InProperty,
UObject * InObject,
int32 InArrayIndex =0
)
Return the string value of a property. Handles individual properties, arrays, and extended graph properties.
Parameters:
InProperty- The property to import data.
InObject- The object instance containing this property.
InArrayIndex- An index for the property.
function GetExtendedGraphPropertyResult¶
SMSYSTEMEDITOR_API FProperty * GetExtendedGraphPropertyResult(
FProperty * InProperty,
uint8 * InContainer
)
Retrieve the 'Result' FProperty from a single property with no array handling. Null if not a custom graph property.
Parameters:
InProperty- The extended graph property.
InContainer- The instance container of the property.
Return: The FProperty result, or nullptr if not a custom graph property.
function IsObjectPropertyInstanced¶
Checks if an object property is instanced or exported.
function GetAllObjectProperties¶
SMSYSTEMEDITOR_API void GetAllObjectProperties(
const void * InObject,
const UStruct * InPropertySource,
TArray< FPropertyRetrieval > & OutProperties,
const FPropertyRetrievalArgs & InArgs =FPropertyRetrievalArgs()
)
Recursively retrieve all nested object properties. Checks all root properties and properties of nested structs or exported objects. Does not handle maps or sets.
Parameters:
InObject- The object address to check. Generally can just provide a UObject instance.
InPropertySource- The source containing the properties. Usually your InObject->GetClass()
OutProperties- All found object properties.
InArgs- Additional configuration arguments.
function ForEachInstancedSubObject¶
SMSYSTEMEDITOR_API void ForEachInstancedSubObject(
const UObject * InObject,
const TFunction< void(UObject *)> & Function
)
Iterate over each valid instanced sub-object in an object. Sub-objects are matched to the owning object's ObjectProperty values where the owning property is marked Instanced but not transient.
This is useful for cooking builds as sub-objects may have the transient flag added during cook when they normally wouldn't be a transient object.
This won't account for properties belonging to a map or set.
Parameters:
InObject- The object owning the sub-objects. The sub-objects may be nested.
Function- A function to execute for each sub-object.
function SetGraphPropertyFromProperty¶
SMSYSTEMEDITOR_API const FGuid & SetGraphPropertyFromProperty(
FSMGraphProperty_Base & GraphProperty,
FProperty * Property,
const USMNodeInstance * NodeInstance,
int32 Index =0,
bool bSetGuid =true,
bool bUseTemplateInGuid =true,
bool bUseTempNativeGuid =false
)
Sets all related internal properties. Returns the guid used.
function SetGraphPropertyFlagsFromNativeProperty¶
SMSYSTEMEDITOR_API void SetGraphPropertyFlagsFromNativeProperty(
FSMGraphProperty_Base & InOutGraphProperty,
const FProperty * InProperty
)
Sets the graph property flags from a native property.
function IsPropertyExposedToGraphNode¶
Checks appropriate flags on a property to see if it should be exposed to a graph node.
function IsPropertyHandleExposedContainer¶
SMSYSTEMEDITOR_API bool IsPropertyHandleExposedContainer(
const TSharedPtr< IPropertyHandle > & InHandle
)
Checks if the property handle is a supported container and exposed.
function GetGraphPropertyFromProperty¶
Returns the struct property if this property is a graph property.
function IsPropertyGraphProperty¶
Checks if the property is considered a graph property.
function SetPropertyOverride¶
SMSYSTEMEDITOR_API void SetPropertyOverride(
USMNodeInstance * InNodeCDO,
const FPropertyOverrideArgs & InArgs
)
Apply graph property overrides to the CDO. This will propagate to instances.
function ShouldGraphPropertyDisplayThumbnail¶
bool ShouldGraphPropertyDisplayThumbnail(
const USMGraphK2Node_PropertyNode_Base * InGraphPropertyNode
)
If a graph property should show its thumbnail.
function GetPropertyDisplayName¶
Return the display text of a property with an optional array index appended.
function MapNodeTemplatesToProperties¶
void MapNodeTemplatesToProperties(
USMGraphNode_StateNodeBase * InStateNode,
TMap< USMNodeInstance *, TArray< USMGraphK2Node_PropertyNode_Base * > > & OutTemplatePropertyMap
)
Discover and sort properties per node instance.