Skip to content

Commit

Permalink
Fix Engine Level Errors
Browse files Browse the repository at this point in the history
Reformat code.
  • Loading branch information
Ryan-DowlingSoka committed Jun 3, 2022
1 parent 87a9587 commit 5456376
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ TSharedRef<IPropertyTypeCustomization> FRedEditorIconPathCustomization::MakeInst
}

void FRedEditorIconPathCustomization::CustomizeHeader(TSharedRef<IPropertyHandle> StructPropertyHandle,
class FDetailWidgetRow& HeaderRow,
IPropertyTypeCustomizationUtils& StructCustomizationUtils)
class FDetailWidgetRow& HeaderRow,
IPropertyTypeCustomizationUtils& StructCustomizationUtils)
{
void* StructData = nullptr;
const FPropertyAccess::Result Result = StructPropertyHandle.Get().GetValueData(StructData);
Expand Down Expand Up @@ -150,8 +150,8 @@ TSharedRef<SWidget> FRedEditorIconPathCustomization::HandleGenerateWidget(TShare
}

void FRedEditorIconPathCustomization::CustomizeChildren(TSharedRef<IPropertyHandle> StructPropertyHandle,
class IDetailChildrenBuilder& StructBuilder,
IPropertyTypeCustomizationUtils& StructCustomizationUtils)
class IDetailChildrenBuilder& StructBuilder,
IPropertyTypeCustomizationUtils& StructCustomizationUtils)
{
}

Expand Down
15 changes: 7 additions & 8 deletions Source/RedTechArtToolsEditor/Private/RedEditorIconWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,20 @@
void URedEditorIconWidget::SynchronizeProperties()
{
Super::SynchronizeProperties();
if(!IconPath.Path.IsEmpty() && IFileManager::Get().FileExists(*FPaths::ConvertRelativePathToFull(*IconPath.Path)))
if (!IconPath.Path.IsEmpty() && IFileManager::Get().FileExists(*FPaths::ConvertRelativePathToFull(*IconPath.Path)))
{
if(const FString Ext = FPaths::GetExtension(IconPath.Path); Ext == "svg")
if (const FString Ext = FPaths::GetExtension(IconPath.Path); Ext == "svg")
{
IconBrush.Reset(new FSlateVectorImageBrush( IconPath.Path, IconSize, Brush.TintColor, Brush.Tiling ));
IconBrush.Reset(new FSlateVectorImageBrush(IconPath.Path, IconSize, Brush.TintColor, Brush.Tiling));
}
else if(Ext == "png")
else if (Ext == "png")
{
IconBrush.Reset(new FSlateDynamicImageBrush(FName(*IconPath.Path), IconSize, Brush.TintColor.GetSpecifiedColor(), Brush.Tiling ));
IconBrush.Reset(new FSlateDynamicImageBrush(FName(*IconPath.Path), IconSize,
Brush.TintColor.GetSpecifiedColor(), Brush.Tiling));
}
if(IconBrush != nullptr)
if (IconBrush != nullptr)
{
SetBrush(*IconBrush.Get());
}
}
}


Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@

#include "RedMaterialParameterBlueprintLibrary.h"

#include "ContentBrowserModule.h"
#include "EditorTutorial.h"
#include "Materials/MaterialExpressionCurveAtlasRowParameter.h"
#include "Materials/MaterialExpressionScalarParameter.h"
#include "Materials/MaterialExpressionVectorParameter.h"
Expand All @@ -43,7 +41,7 @@ bool URedMaterialParameterBlueprintLibrary::OpenAndFocusMaterialExpression(UMate
if (AssetEditorSubsystem->OpenEditorForAsset(OwningObject))
{
if (const auto MaterialEditorInstance = StaticCastSharedPtr<IMaterialEditor>(
FToolkitManager::Get().FindEditorForAsset(OwningObject)))
FToolkitManager::Get().FindEditorForAsset(OwningObject)))
{
MaterialEditorInstance->FocusWindow(OwningObject);
MaterialEditorInstance->JumpToExpression(MaterialExpression);
Expand Down Expand Up @@ -343,4 +341,4 @@ void URedMaterialParameterBlueprintLibrary::SetMaterialParameter_ScalarAtlas(FRe
Expression->Modify();
Expression->Atlas = ScalarAtlas;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ class FRedTechArtToolsEditor final : public IRedTechArtToolsEditor
virtual void ShutdownModule() override;
};

IMPLEMENT_MODULE(FRedTechArtToolsEditor, RedTechArtToolsEditor )
IMPLEMENT_MODULE(FRedTechArtToolsEditor, RedTechArtToolsEditor)

void FRedTechArtToolsEditor::StartupModule()
{
FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");
PropertyModule.RegisterCustomPropertyTypeLayout(
FRedEditorIconPath::StaticStruct()->GetFName(),
FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FRedEditorIconPathCustomization::MakeInstance));

PropertyModule.NotifyCustomizationModuleChanged();
}

Expand All @@ -53,7 +53,8 @@ void FRedTechArtToolsEditor::ShutdownModule()
{
if (FModuleManager::Get().IsModuleLoaded("PropertyEditor"))
{
FPropertyEditorModule& PropertyModule = FModuleManager::GetModuleChecked<FPropertyEditorModule>("PropertyEditor");
FPropertyEditorModule& PropertyModule = FModuleManager::GetModuleChecked<FPropertyEditorModule>(
"PropertyEditor");
PropertyModule.UnregisterCustomPropertyTypeLayout(FRedEditorIconPath::StaticStruct()->GetFName());

PropertyModule.NotifyCustomizationModuleChanged();
Expand All @@ -65,4 +66,4 @@ void FRedTechArtToolsEditor::ShutdownModule()
}
}

#undef LOCTEXT_NAMESPACE
#undef LOCTEXT_NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ class FRedEditorIconPathCustomization : public IPropertyTypeCustomization

// BEGIN IPropertyTypeCustomization interface
virtual void CustomizeHeader(TSharedRef<IPropertyHandle> StructPropertyHandle,
class FDetailWidgetRow& HeaderRow,
IPropertyTypeCustomizationUtils& StructCustomizationUtils) override;
class FDetailWidgetRow& HeaderRow,
IPropertyTypeCustomizationUtils& StructCustomizationUtils) override;
virtual void CustomizeChildren(TSharedRef<IPropertyHandle> StructPropertyHandle,
class IDetailChildrenBuilder& StructBuilder,
IPropertyTypeCustomizationUtils& StructCustomizationUtils) override;
class IDetailChildrenBuilder& StructBuilder,
IPropertyTypeCustomizationUtils& StructCustomizationUtils) override;
// END IPropertyTypeCustomization interface

private:
TSharedRef<SWidget> HandleGenerateWidget(TSharedPtr<FString> InItem);

TArray<TSharedPtr<FString>>* GetIconOptionsPointer();
TArray<TSharedPtr<FString>> CachedIconOptions;

static TArray<FString> GetIconOptionsFromPath();
static void GetIconsFromPath(const FString& InPath, TArray<FString>& OutFoundIcons);

Expand Down
7 changes: 2 additions & 5 deletions Source/RedTechArtToolsEditor/Public/IRedTechArtToolsEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
*/
class IRedTechArtToolsEditor : public IModuleInterface
{

public:

/**
* Singleton-like access to this module's interface. This is just for convenience!
* Beware of calling this during the shutdown phase, though. Your module might have been unloaded already.
Expand All @@ -43,7 +41,7 @@ class IRedTechArtToolsEditor : public IModuleInterface
*/
static inline IRedTechArtToolsEditor& Get()
{
return FModuleManager::LoadModuleChecked< IRedTechArtToolsEditor >( "RedTechArtToolsEditor" );
return FModuleManager::LoadModuleChecked<IRedTechArtToolsEditor>("RedTechArtToolsEditor");
}

/**
Expand All @@ -53,7 +51,6 @@ class IRedTechArtToolsEditor : public IModuleInterface
*/
static inline bool IsAvailable()
{
return FModuleManager::Get().IsModuleLoaded( "RedTechArtToolsEditor" );
return FModuleManager::Get().IsModuleLoaded("RedTechArtToolsEditor");
}
};

4 changes: 2 additions & 2 deletions Source/RedTechArtToolsEditor/Public/RedDeveloperSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class REDTECHARTTOOLSEDITOR_API URedDeveloperSettings : public UDeveloperSetting
UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category = "Editor Icon Widget")
TArray<FString> EditorIconWidgetSearchPaths;

virtual FName GetCategoryName() const override {return FName("Plugins");}
virtual FName GetCategoryName() const override { return FName("Plugins"); }

URedDeveloperSettings();
};
10 changes: 4 additions & 6 deletions Source/RedTechArtToolsEditor/Public/RedEditorIconWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct FRedEditorIconPath
{
GENERATED_BODY()

UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category="Editor Icon Path")
FString Path;
};

Expand All @@ -48,19 +48,17 @@ UCLASS(DisplayName="RED Editor Icon Widget")
class REDTECHARTTOOLSEDITOR_API URedEditorIconWidget : public UImage
{
GENERATED_BODY()

public:
UPROPERTY(EditAnywhere, Category = "Editor Icon Widget")
FVector2D IconSize = FVector2D(20.f, 20.f);

UPROPERTY(EditAnywhere, Category = "Editor Icon Widget")
FRedEditorIconPath IconPath;

protected:
virtual void SynchronizeProperties() override;

private:
TUniquePtr<FSlateBrush> IconBrush;


};
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,23 @@ class REDTECHARTTOOLSEDITOR_API URedTechArtToolsBlueprintLibrary : public UBluep
public:
/** Output entire contents of a DataTable as a string */
UFUNCTION(BlueprintCallable, Category=DataTable)
static FString GetTableAsString(const UDataTable* DataTable, bool bUseJsonObjectsForStructs = false, bool bUseSimpleText = false);

static FString GetTableAsString(const UDataTable* DataTable, bool bUseJsonObjectsForStructs = false,
bool bUseSimpleText = false);

/** Output entire contents of DataTable as CSV */
UFUNCTION(BlueprintCallable, Category=DataTable)
static FString GetTableAsCSV(const UDataTable* DataTable, bool bUseJsonObjectsForStructs = false, bool bUseSimpleText = false);

static FString GetTableAsCSV(const UDataTable* DataTable, bool bUseJsonObjectsForStructs = false,
bool bUseSimpleText = false);

/** Output entire contents of DataTable as JSON */
UFUNCTION(BlueprintCallable, Category=DataTable)
static FString GetTableAsJSON(const UDataTable* DataTable, bool bUseJsonObjectsForStructs = false, bool bUseSimpleText = false);
static FString GetTableAsJSON(const UDataTable* DataTable, bool bUseJsonObjectsForStructs = false,
bool bUseSimpleText = false);

/** Is A less than or equal to B alphanumerically. */
UFUNCTION(BlueprintCallable, Category=String)
static bool AlphaNumericLessThan(UPARAM(ref) FString& A, UPARAM(ref) FString& B);

/** Is A less than or equal to B alphanumerically. */
UFUNCTION(BlueprintCallable, Category=String)
static bool AlphaNumericLessThanOrEqual(UPARAM(ref) FString& A, UPARAM(ref) FString& B);
Expand All @@ -65,17 +68,20 @@ class REDTECHARTTOOLSEDITOR_API URedTechArtToolsBlueprintLibrary : public UBluep

/** Opens a modal content picker for a content directory. */
UFUNCTION(BlueprintCallable, Category=EditorScripting)
static FString PickContentPath(bool& bWasPathPicked, const FString DialogTitle = "Pick Path", const FString DefaultPath = "/Game");
static FString PickContentPath(bool& bWasPathPicked, const FString DialogTitle = "Pick Path",
const FString DefaultPath = "/Game");

/** Converts a game relative (or long) package path to a local filesystem path. */
UFUNCTION(BlueprintCallable, Category=EditorScripting)
static void ConvertPackagePathToLocalPath(const FString PackagePath, bool& bOutSuccess, FString& OutLocalPath);

/** Get array values from loaded config Array Values */
UFUNCTION(BlueprintCallable, Category=EditorScripting)
static void GetConfigArrayValue(const FString ConfigName, const FString SectionName, const FString KeyName, TArray<FString>& OutArrayValues);

static void GetConfigArrayValue(const FString ConfigName, const FString SectionName, const FString KeyName,
TArray<FString>& OutArrayValues);

/** Set array values from loaded config Array Values. Flushes config file after setting values. */
UFUNCTION(BlueprintCallable, Category=EditorScripting)
static void SetConfigArrayValue(const FString ConfigName, const FString SectionName, const FString KeyName, UPARAM(ref) const TArray<FString>& InArrayValues);
};
static void SetConfigArrayValue(const FString ConfigName, const FString SectionName, const FString KeyName,
UPARAM(ref) const TArray<FString>& InArrayValues);
};
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

#include "CoreMinimal.h"
#include "Components/MultiLineEditableTextBox.h"
#include "UObject/Object.h"
#include "RedMultiLineEditableTextBox.generated.h"

/**
Expand All @@ -35,7 +34,6 @@ UCLASS()
class REDTECHARTTOOLSRUNTIME_API URedMultiLineEditableTextBox : public UMultiLineEditableTextBox
{
GENERATED_UCLASS_BODY()

public:
//~ Begin UWidget Interface
virtual TSharedRef<SWidget> RebuildWidget() override;
Expand Down

0 comments on commit 5456376

Please sign in to comment.