diff --git a/Source/RedTechArtToolsEditor/Private/Customization/RedEditorIconPathCustomization.cpp b/Source/RedTechArtToolsEditor/Private/Customization/RedEditorIconPathCustomization.cpp index e27a0a4..c8463b7 100644 --- a/Source/RedTechArtToolsEditor/Private/Customization/RedEditorIconPathCustomization.cpp +++ b/Source/RedTechArtToolsEditor/Private/Customization/RedEditorIconPathCustomization.cpp @@ -34,8 +34,8 @@ TSharedRef FRedEditorIconPathCustomization::MakeInst } void FRedEditorIconPathCustomization::CustomizeHeader(TSharedRef StructPropertyHandle, - class FDetailWidgetRow& HeaderRow, - IPropertyTypeCustomizationUtils& StructCustomizationUtils) + class FDetailWidgetRow& HeaderRow, + IPropertyTypeCustomizationUtils& StructCustomizationUtils) { void* StructData = nullptr; const FPropertyAccess::Result Result = StructPropertyHandle.Get().GetValueData(StructData); @@ -150,8 +150,8 @@ TSharedRef FRedEditorIconPathCustomization::HandleGenerateWidget(TShare } void FRedEditorIconPathCustomization::CustomizeChildren(TSharedRef StructPropertyHandle, - class IDetailChildrenBuilder& StructBuilder, - IPropertyTypeCustomizationUtils& StructCustomizationUtils) + class IDetailChildrenBuilder& StructBuilder, + IPropertyTypeCustomizationUtils& StructCustomizationUtils) { } diff --git a/Source/RedTechArtToolsEditor/Private/RedEditorIconWidget.cpp b/Source/RedTechArtToolsEditor/Private/RedEditorIconWidget.cpp index 6902253..85f5727 100644 --- a/Source/RedTechArtToolsEditor/Private/RedEditorIconWidget.cpp +++ b/Source/RedTechArtToolsEditor/Private/RedEditorIconWidget.cpp @@ -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()); } } } - - diff --git a/Source/RedTechArtToolsEditor/Private/RedMaterialParameterBlueprintLibrary.cpp b/Source/RedTechArtToolsEditor/Private/RedMaterialParameterBlueprintLibrary.cpp index 9e41f17..384c7f3 100644 --- a/Source/RedTechArtToolsEditor/Private/RedMaterialParameterBlueprintLibrary.cpp +++ b/Source/RedTechArtToolsEditor/Private/RedMaterialParameterBlueprintLibrary.cpp @@ -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" @@ -43,7 +41,7 @@ bool URedMaterialParameterBlueprintLibrary::OpenAndFocusMaterialExpression(UMate if (AssetEditorSubsystem->OpenEditorForAsset(OwningObject)) { if (const auto MaterialEditorInstance = StaticCastSharedPtr( - FToolkitManager::Get().FindEditorForAsset(OwningObject))) + FToolkitManager::Get().FindEditorForAsset(OwningObject))) { MaterialEditorInstance->FocusWindow(OwningObject); MaterialEditorInstance->JumpToExpression(MaterialExpression); @@ -343,4 +341,4 @@ void URedMaterialParameterBlueprintLibrary::SetMaterialParameter_ScalarAtlas(FRe Expression->Modify(); Expression->Atlas = ScalarAtlas; } -} \ No newline at end of file +} diff --git a/Source/RedTechArtToolsEditor/Private/RedTechArtToolsEditor.cpp b/Source/RedTechArtToolsEditor/Private/RedTechArtToolsEditor.cpp index 6edce8c..13cf018 100644 --- a/Source/RedTechArtToolsEditor/Private/RedTechArtToolsEditor.cpp +++ b/Source/RedTechArtToolsEditor/Private/RedTechArtToolsEditor.cpp @@ -36,7 +36,7 @@ class FRedTechArtToolsEditor final : public IRedTechArtToolsEditor virtual void ShutdownModule() override; }; -IMPLEMENT_MODULE(FRedTechArtToolsEditor, RedTechArtToolsEditor ) +IMPLEMENT_MODULE(FRedTechArtToolsEditor, RedTechArtToolsEditor) void FRedTechArtToolsEditor::StartupModule() { @@ -44,7 +44,7 @@ void FRedTechArtToolsEditor::StartupModule() PropertyModule.RegisterCustomPropertyTypeLayout( FRedEditorIconPath::StaticStruct()->GetFName(), FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FRedEditorIconPathCustomization::MakeInstance)); - + PropertyModule.NotifyCustomizationModuleChanged(); } @@ -53,7 +53,8 @@ void FRedTechArtToolsEditor::ShutdownModule() { if (FModuleManager::Get().IsModuleLoaded("PropertyEditor")) { - FPropertyEditorModule& PropertyModule = FModuleManager::GetModuleChecked("PropertyEditor"); + FPropertyEditorModule& PropertyModule = FModuleManager::GetModuleChecked( + "PropertyEditor"); PropertyModule.UnregisterCustomPropertyTypeLayout(FRedEditorIconPath::StaticStruct()->GetFName()); PropertyModule.NotifyCustomizationModuleChanged(); @@ -65,4 +66,4 @@ void FRedTechArtToolsEditor::ShutdownModule() } } -#undef LOCTEXT_NAMESPACE \ No newline at end of file +#undef LOCTEXT_NAMESPACE diff --git a/Source/RedTechArtToolsEditor/Public/Customization/RedEditorIconPathCustomization.h b/Source/RedTechArtToolsEditor/Public/Customization/RedEditorIconPathCustomization.h index 7f7d4c1..fa6c379 100644 --- a/Source/RedTechArtToolsEditor/Public/Customization/RedEditorIconPathCustomization.h +++ b/Source/RedTechArtToolsEditor/Public/Customization/RedEditorIconPathCustomization.h @@ -29,11 +29,11 @@ class FRedEditorIconPathCustomization : public IPropertyTypeCustomization // BEGIN IPropertyTypeCustomization interface virtual void CustomizeHeader(TSharedRef StructPropertyHandle, - class FDetailWidgetRow& HeaderRow, - IPropertyTypeCustomizationUtils& StructCustomizationUtils) override; + class FDetailWidgetRow& HeaderRow, + IPropertyTypeCustomizationUtils& StructCustomizationUtils) override; virtual void CustomizeChildren(TSharedRef StructPropertyHandle, - class IDetailChildrenBuilder& StructBuilder, - IPropertyTypeCustomizationUtils& StructCustomizationUtils) override; + class IDetailChildrenBuilder& StructBuilder, + IPropertyTypeCustomizationUtils& StructCustomizationUtils) override; // END IPropertyTypeCustomization interface private: @@ -41,7 +41,7 @@ class FRedEditorIconPathCustomization : public IPropertyTypeCustomization TArray>* GetIconOptionsPointer(); TArray> CachedIconOptions; - + static TArray GetIconOptionsFromPath(); static void GetIconsFromPath(const FString& InPath, TArray& OutFoundIcons); diff --git a/Source/RedTechArtToolsEditor/Public/IRedTechArtToolsEditor.h b/Source/RedTechArtToolsEditor/Public/IRedTechArtToolsEditor.h index 1a5d38d..46f2f5c 100644 --- a/Source/RedTechArtToolsEditor/Public/IRedTechArtToolsEditor.h +++ b/Source/RedTechArtToolsEditor/Public/IRedTechArtToolsEditor.h @@ -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. @@ -43,7 +41,7 @@ class IRedTechArtToolsEditor : public IModuleInterface */ static inline IRedTechArtToolsEditor& Get() { - return FModuleManager::LoadModuleChecked< IRedTechArtToolsEditor >( "RedTechArtToolsEditor" ); + return FModuleManager::LoadModuleChecked("RedTechArtToolsEditor"); } /** @@ -53,7 +51,6 @@ class IRedTechArtToolsEditor : public IModuleInterface */ static inline bool IsAvailable() { - return FModuleManager::Get().IsModuleLoaded( "RedTechArtToolsEditor" ); + return FModuleManager::Get().IsModuleLoaded("RedTechArtToolsEditor"); } }; - diff --git a/Source/RedTechArtToolsEditor/Public/RedDeveloperSettings.h b/Source/RedTechArtToolsEditor/Public/RedDeveloperSettings.h index e13c906..0b7a24a 100644 --- a/Source/RedTechArtToolsEditor/Public/RedDeveloperSettings.h +++ b/Source/RedTechArtToolsEditor/Public/RedDeveloperSettings.h @@ -37,7 +37,7 @@ class REDTECHARTTOOLSEDITOR_API URedDeveloperSettings : public UDeveloperSetting UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category = "Editor Icon Widget") TArray EditorIconWidgetSearchPaths; - virtual FName GetCategoryName() const override {return FName("Plugins");} - + virtual FName GetCategoryName() const override { return FName("Plugins"); } + URedDeveloperSettings(); }; diff --git a/Source/RedTechArtToolsEditor/Public/RedEditorIconWidget.h b/Source/RedTechArtToolsEditor/Public/RedEditorIconWidget.h index 0a9fc04..9f91290 100644 --- a/Source/RedTechArtToolsEditor/Public/RedEditorIconWidget.h +++ b/Source/RedTechArtToolsEditor/Public/RedEditorIconWidget.h @@ -35,7 +35,7 @@ struct FRedEditorIconPath { GENERATED_BODY() - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, Category="Editor Icon Path") FString Path; }; @@ -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 IconBrush; - - }; diff --git a/Source/RedTechArtToolsEditor/Public/RedTechArtToolsBlueprintLibrary.h b/Source/RedTechArtToolsEditor/Public/RedTechArtToolsBlueprintLibrary.h index 38b4cb5..237db8e 100644 --- a/Source/RedTechArtToolsEditor/Public/RedTechArtToolsBlueprintLibrary.h +++ b/Source/RedTechArtToolsEditor/Public/RedTechArtToolsBlueprintLibrary.h @@ -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); @@ -65,7 +68,8 @@ 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) @@ -73,9 +77,11 @@ class REDTECHARTTOOLSEDITOR_API URedTechArtToolsBlueprintLibrary : public UBluep /** 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& OutArrayValues); - + static void GetConfigArrayValue(const FString ConfigName, const FString SectionName, const FString KeyName, + TArray& 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& InArrayValues); -}; \ No newline at end of file + static void SetConfigArrayValue(const FString ConfigName, const FString SectionName, const FString KeyName, + UPARAM(ref) const TArray& InArrayValues); +}; diff --git a/Source/RedTechArtToolsRuntime/Public/RedMultiLineEditableTextBox.h b/Source/RedTechArtToolsRuntime/Public/RedMultiLineEditableTextBox.h index ddeb3eb..df7896b 100644 --- a/Source/RedTechArtToolsRuntime/Public/RedMultiLineEditableTextBox.h +++ b/Source/RedTechArtToolsRuntime/Public/RedMultiLineEditableTextBox.h @@ -24,7 +24,6 @@ #include "CoreMinimal.h" #include "Components/MultiLineEditableTextBox.h" -#include "UObject/Object.h" #include "RedMultiLineEditableTextBox.generated.h" /** @@ -35,7 +34,6 @@ UCLASS() class REDTECHARTTOOLSRUNTIME_API URedMultiLineEditableTextBox : public UMultiLineEditableTextBox { GENERATED_UCLASS_BODY() - public: //~ Begin UWidget Interface virtual TSharedRef RebuildWidget() override;