Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class HOUDINIENGINERUNTIME_API UHoudiniAssetComponent : public UPrimitiveCompone
UHoudiniAsset * GetHoudiniAsset() const;
int32 GetAssetId() const { return AssetId; };
EHoudiniAssetState GetAssetState() const { return AssetState; };
FString GetAssetStateAsString() const { return FHoudiniEngineRuntimeUtils::EnumToString(TEXT("EHoudiniAssetState"), GetAssetState()); };
FString GetAssetStateAsString() const { return UEnum::GetValueAsString(GetAssetState()); };
EHoudiniAssetStateResult GetAssetStateResult() const { return AssetStateResult; };
FGuid GetHapiGUID() const { return HapiGUID; };
FString GetHapiAssetName() const { return HapiAssetName; };
Expand Down
19 changes: 0 additions & 19 deletions Source/HoudiniEngineRuntime/Private/HoudiniEngineRuntimeUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,25 +161,6 @@ struct HOUDINIENGINERUNTIME_API FHoudiniEngineRuntimeUtils
// The function returns the number of objects that were deleted.
static int32 SafeDeleteObjects(TArray<UObject*>& InObjectsToDelete, TArray<UObject*>* OutObjectsNotDeleted=nullptr);

// -------------------------------------------------
// Type utilities
// -------------------------------------------------

// Taken from here: https://answers.unrealengine.com/questions/330496/conversion-of-enum-to-string.html
// Return the string representation of an enum value.
template<typename T>
static FString EnumToString(const FString& EnumName, const T Value)
{
UEnum* Enum = FindObject<UEnum>(ANY_PACKAGE, *EnumName);
return *(Enum ? Enum->GetNameStringByValue(static_cast<uint8>(Value)) : "null");
}

template<typename T>
static FString EnumToString(const T Value)
{
return UEnum::GetValueAsString(Value);
}

// -------------------------------------------------
// Blueprint utilities
// -------------------------------------------------
Expand Down