You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Change Hair card generator icond.
#rb none [CL 28277065 by charles derousiers in ue5-main branch]
This commit is contained in:
@@ -78974,6 +78974,7 @@
|
||||
<File Name="Engine/Plugins/Runtime/HairStrands/Content/Icons/S_GroomBinding_16.png" Hash="e9c6bcfa2fc84e99e6ccdf43951db9e064722320" />
|
||||
<File Name="Engine/Plugins/Runtime/HairStrands/Content/Icons/S_GroomBinding_64.png" Hash="697f8028eabc5a43fa864d6fa4f285b485df2f55" />
|
||||
<File Name="Engine/Plugins/Runtime/HairStrands/Content/Icons/S_GroomCache_64.png" Hash="4998aa4466698622537541c4bdffb97c3a5b3a44" />
|
||||
<File Name="Engine/Plugins/Runtime/HairStrands/Content/Icons/S_GroomCardGenerator_128.png" Hash="3b0c1926b139787e162dad32518d1339ebf82ccc" />
|
||||
<File Name="Engine/Plugins/Runtime/HairStrands/Content/Icons/S_Groom_128.png" Hash="8854c85b4913629321a7807b36dcc82017a50f03" />
|
||||
<File Name="Engine/Plugins/Runtime/HairStrands/Content/Icons/S_Groom_16.png" Hash="d8c1e7a02af47d388917e6a11ca7340f6d047431" />
|
||||
<File Name="Engine/Plugins/Runtime/HairStrands/Content/Icons/S_Groom_256.png" Hash="b5cc573ea1effb7388801cd17b536d79004836d1" />
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
#include "IPropertyUtilities.h"
|
||||
|
||||
#include "Styling/AppStyle.h"
|
||||
#include "GroomEditorStyle.h"
|
||||
|
||||
#define LOCTEXT_NAMESPACE "GroomRenderingDetails"
|
||||
|
||||
@@ -1526,6 +1527,16 @@ void FGroomRenderingDetails::OnGenerateElementForHairGroup(TSharedRef<IPropertyH
|
||||
}
|
||||
);
|
||||
|
||||
const FSlateBrush* Brush = nullptr;
|
||||
if (const ISlateStyle* AppStyle = Toolkit->GetSlateStyle())
|
||||
{
|
||||
Brush = AppStyle->GetBrush("GroomEditor.GroomCardGenerator");
|
||||
}
|
||||
else
|
||||
{
|
||||
Brush = FAppStyle::GetBrush("ContentBrowser.AssetActions.ReimportAsset");
|
||||
}
|
||||
|
||||
TSharedRef<SHorizontalBox> ProceduralGenButtons = SNew(SHorizontalBox).Visibility(ProceduralPropertyVisibility);
|
||||
if (bHasProceduralGenerationPlugin)
|
||||
{
|
||||
@@ -1541,10 +1552,7 @@ void FGroomRenderingDetails::OnGenerateElementForHairGroup(TSharedRef<IPropertyH
|
||||
.OnClicked(this, &FGroomRenderingDetails::OnGenerateCardDataUsingPlugin, GroupIndex)
|
||||
[
|
||||
SNew(SImage)
|
||||
// @TODO: Need a specialized icon for this?
|
||||
.Image(FAppStyle::GetBrush("ContentBrowser.AssetActions.ReimportAsset"))
|
||||
.RenderTransform(FSlateRenderTransform(FQuat2D(FMath::DegreesToRadians(90.0f))))
|
||||
.RenderTransformPivot(FVector2D(0.5f, 0.5f))
|
||||
.Image(Brush)
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
@@ -430,6 +430,7 @@ void FGroomCustomAssetEditorToolkit::InitCustomAssetEditor(const EToolkitMode::T
|
||||
|
||||
ViewportTab = SNew(SGroomEditorViewport);
|
||||
ThumbnailPool = MakeShared<FAssetThumbnailPool>(64);
|
||||
GroomEditorStyle = MakeShareable(new FGroomEditorStyle());
|
||||
|
||||
// Automatically affect the first skelal mesh compatible with the groom asset
|
||||
#if 0
|
||||
@@ -984,4 +985,9 @@ int32 FGroomCustomAssetEditorToolkit::GetActiveBindingIndex() const
|
||||
return ActiveGroomBindingIndex;
|
||||
}
|
||||
|
||||
FGroomEditorStyle* FGroomCustomAssetEditorToolkit::GetSlateStyle() const
|
||||
{
|
||||
return GroomEditorStyle.Get();
|
||||
}
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "Toolkits/AssetEditorToolkit.h"
|
||||
#include "Widgets/SGroomEditorViewport.h"
|
||||
#include "HairStrandsInterface.h"
|
||||
#include "GroomEditorStyle.h"
|
||||
|
||||
class FAssetThumbnailPool;
|
||||
class UGroomAsset;
|
||||
@@ -37,6 +38,8 @@ public:
|
||||
virtual void PreviewBinding(int32 BindingIndex) = 0;
|
||||
|
||||
virtual int32 GetActiveBindingIndex() const =0;
|
||||
|
||||
virtual FGroomEditorStyle* GetSlateStyle() const { return nullptr; };
|
||||
};
|
||||
|
||||
class HAIRSTRANDSEDITOR_API FGroomCustomAssetEditorToolkit : public IGroomCustomAssetEditorToolkit
|
||||
@@ -83,6 +86,9 @@ public:
|
||||
/** Return the index of the active binding. */
|
||||
virtual int32 GetActiveBindingIndex() const override;
|
||||
|
||||
/** Return groom editor style. */
|
||||
FGroomEditorStyle* GetSlateStyle() const override;
|
||||
|
||||
private:
|
||||
|
||||
// called when The Play simulation button is pressed
|
||||
@@ -183,5 +189,7 @@ private:
|
||||
TWeakObjectPtr<UAnimationAsset> PreviewSkeletalAnimationAsset;
|
||||
|
||||
TSharedPtr<FAssetThumbnailPool> ThumbnailPool;
|
||||
|
||||
TSharedPtr<FGroomEditorStyle> GroomEditorStyle;
|
||||
};
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
// Set("HairToolsManagerCommands.BeginAddPrimitiveTool", new IMAGE_BRUSH("HairSpray128", Icon40x40));
|
||||
Set("GroomEditor.SimulationOptions", new IMAGE_BRUSH("S_SimulationOptions_40x", Icon40x40));
|
||||
Set("GroomEditor.SimulationOptions.Small", new IMAGE_BRUSH("S_SimulationOptions_40x", Icon20x20));
|
||||
|
||||
Set("GroomEditor.GroomCardGenerator", new IMAGE_BRUSH("S_GroomCardGenerator_128", Icon16x16));
|
||||
FSlateStyleRegistry::RegisterSlateStyle(*this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user