From 92b03d376d73dacb1dab0bc39fe482e0bd2aa331 Mon Sep 17 00:00:00 2001 From: jyelon Date: Mon, 23 Mar 2026 14:10:26 -0400 Subject: [PATCH] Widget slot properties are now shown --- Content/Testing/WB_Test.uasset | 4 ++-- .../Source/UEWingman/Private/WingProperty.cpp | 13 +++++++++++++ .../Source/UEWingman/Private/WingTypes.cpp | 6 +++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Content/Testing/WB_Test.uasset b/Content/Testing/WB_Test.uasset index ad5d476d..7695b51d 100644 --- a/Content/Testing/WB_Test.uasset +++ b/Content/Testing/WB_Test.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1dca259b72ad5ac75be4009daab1861cd55439cf1825d8f4e7b7c25c7aea468d -size 24321 +oid sha256:f46523098874b027d89403b58a1423db483d42fbb8bc6a92b286083bb4839f4d +size 30689 diff --git a/Plugins/UEWingman/Source/UEWingman/Private/WingProperty.cpp b/Plugins/UEWingman/Source/UEWingman/Private/WingProperty.cpp index 8684e863..d86faba1 100644 --- a/Plugins/UEWingman/Source/UEWingman/Private/WingProperty.cpp +++ b/Plugins/UEWingman/Source/UEWingman/Private/WingProperty.cpp @@ -5,6 +5,8 @@ #include "Engine/Blueprint.h" #include "Engine/SCS_Node.h" #include "MaterialGraph/MaterialGraphNode.h" +#include "Components/Widget.h" +#include "Components/PanelSlot.h" #include "EdGraph/EdGraphPin.h" #include "UObject/EnumProperty.h" @@ -194,6 +196,17 @@ TArray FWingProperty::GetAll(UObject* Obj, EPropertyFlags Flags) } } + // If it's a Widget, hide the slot property, and add the + // slot properties. + if (UWidget* Widget = Cast(Obj)) + { + FWingProperty::Remove(Result, TEXT("Slot")); + if (UPanelSlot* Slot = Widget->Slot) + { + Collect(Slot->GetClass(), Slot, Result, Flags); + } + } + return Result; } diff --git a/Plugins/UEWingman/Source/UEWingman/Private/WingTypes.cpp b/Plugins/UEWingman/Source/UEWingman/Private/WingTypes.cpp index 00b6a69f..35c1fba4 100644 --- a/Plugins/UEWingman/Source/UEWingman/Private/WingTypes.cpp +++ b/Plugins/UEWingman/Source/UEWingman/Private/WingTypes.cpp @@ -119,7 +119,9 @@ void UWingTypes::ChooseShortName(const FAssetData &Data) FString UWingTypes::TypeToTextInner(FName Category, FName SubCategory, UObject* SubCategoryObject) { - if ((Category == UEdGraphSchema_K2::PC_Boolean) || + if ((Category == UEdGraphSchema_K2::PC_Delegate) || + (Category == UEdGraphSchema_K2::PC_MCDelegate) || + (Category == UEdGraphSchema_K2::PC_Boolean) || (Category == UEdGraphSchema_K2::PC_Int) || (Category == UEdGraphSchema_K2::PC_Int64) || (Category == UEdGraphSchema_K2::PC_Name) || @@ -241,6 +243,8 @@ void UWingTypes::Initialize(FSubsystemCollectionBase& Collection) Packages.Sort([](const UPackage& A, const UPackage& B) { return A.GetName() < B.GetName(); }); // Reserve the short names of the primitives. + ReserveShortName(UEdGraphSchema_K2::PC_Delegate); + ReserveShortName(UEdGraphSchema_K2::PC_MCDelegate); ReserveShortName(UEdGraphSchema_K2::PC_Boolean); ReserveShortName(UEdGraphSchema_K2::PC_Int); ReserveShortName(UEdGraphSchema_K2::PC_Int64);