Compare commits
3 Commits
9c3fab26c4
...
868152f302
| Author | SHA1 | Date | |
|---|---|---|---|
| 868152f302 | |||
| a43affe804 | |||
| 083452f83f |
@@ -6,10 +6,8 @@
|
|||||||
#include "WingUtils.h"
|
#include "WingUtils.h"
|
||||||
#include "WingTypes.h"
|
#include "WingTypes.h"
|
||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingActorComponent.h"
|
#include "WingComponent.h"
|
||||||
#include "Engine/Blueprint.h"
|
#include "Engine/Blueprint.h"
|
||||||
#include "Engine/SimpleConstructionScript.h"
|
|
||||||
#include "Engine/SCS_Node.h"
|
|
||||||
#include "Components/ActorComponent.h"
|
#include "Components/ActorComponent.h"
|
||||||
#include "Kismet2/BlueprintEditorUtils.h"
|
#include "Kismet2/BlueprintEditorUtils.h"
|
||||||
#include "ActorComponent_Add.generated.h"
|
#include "ActorComponent_Add.generated.h"
|
||||||
@@ -64,15 +62,15 @@ public:
|
|||||||
if (!UWingTypes::TextToType(Class, PinType, Req, WingOut::Stdout)) return;
|
if (!UWingTypes::TextToType(Class, PinType, Req, WingOut::Stdout)) return;
|
||||||
UClass* ComponentClass = Cast<UClass>(PinType.PinSubCategoryObject.Get());
|
UClass* ComponentClass = Cast<UClass>(PinType.PinSubCategoryObject.Get());
|
||||||
check(ComponentClass);
|
check(ComponentClass);
|
||||||
if (!UWingComponentReference::CheckValidComponentClass(ComponentClass, WingOut::Stdout)) return;
|
if (!UWingComponent::CheckValidComponentClass(ComponentClass, WingOut::Stdout)) return;
|
||||||
|
|
||||||
// Find the specified parent component
|
// Find the specified parent component
|
||||||
TArray<UWingComponentReference*> AllComponents = UWingComponentReference::GetAll(BP);
|
TArray<UWingComponentReference*> AllComponents = UWingComponent::GetAll(BP);
|
||||||
UWingComponentReference* ParentComp = WingUtils::FindOneWithExternalID(Parent, AllComponents, TEXT("Component"), WingOut::Stdout);
|
UWingComponentReference* ParentComp = WingUtils::FindOneWithExternalID(Parent, AllComponents, TEXT("Component"), WingOut::Stdout);
|
||||||
if (!ParentComp) return;
|
if (!ParentComp) return;
|
||||||
|
|
||||||
// Create the SCS node
|
// Create the SCS node
|
||||||
if (!UWingComponentReference::AddComponent(BP, ComponentClass, ParentComp, InternalID, WingOut::Stdout)) return;
|
if (!UWingComponent::AddComponent(BP, ComponentClass, ParentComp, InternalID, WingOut::Stdout)) return;
|
||||||
|
|
||||||
WingOut::Stdout.Printf(TEXT("Component Added.\n"));
|
WingOut::Stdout.Printf(TEXT("Component Added.\n"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingFetcher.h"
|
#include "WingFetcher.h"
|
||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingActorComponent.h"
|
#include "WingComponent.h"
|
||||||
#include "ActorComponent_Remove.generated.h"
|
#include "ActorComponent_Remove.generated.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ public:
|
|||||||
UWingComponentReference* CompRef = F.Walk(Component).Cast<UWingComponentReference>();
|
UWingComponentReference* CompRef = F.Walk(Component).Cast<UWingComponentReference>();
|
||||||
if (!CompRef) return;
|
if (!CompRef) return;
|
||||||
|
|
||||||
if (!CompRef->DeleteComponent(WingOut::Stdout)) return;
|
if (!UWingComponent::DeleteComponent(CompRef, WingOut::Stdout)) return;
|
||||||
|
|
||||||
WingOut::Stdout.Printf(TEXT("Removed component.\n"));
|
WingOut::Stdout.Printf(TEXT("Removed component.\n"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,8 @@
|
|||||||
#include "WingFetcher.h"
|
#include "WingFetcher.h"
|
||||||
#include "WingUtils.h"
|
#include "WingUtils.h"
|
||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingActorComponent.h"
|
#include "WingComponent.h"
|
||||||
#include "Engine/Blueprint.h"
|
#include "Engine/Blueprint.h"
|
||||||
#include "Engine/SimpleConstructionScript.h"
|
|
||||||
#include "Engine/SCS_Node.h"
|
|
||||||
#include "ActorComponent_Reparent.generated.h"
|
#include "ActorComponent_Reparent.generated.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -41,11 +39,11 @@ public:
|
|||||||
|
|
||||||
// Find the new parent among all components (if specified)
|
// Find the new parent among all components (if specified)
|
||||||
UBlueprint *BP = CompRef->BP;
|
UBlueprint *BP = CompRef->BP;
|
||||||
TArray<UWingComponentReference*> AllComponents = UWingComponentReference::GetAll(BP);
|
TArray<UWingComponentReference*> AllComponents = UWingComponent::GetAll(BP);
|
||||||
UWingComponentReference* NewParent = WingUtils::FindOneWithExternalID(Parent, AllComponents, TEXT("Component"), WingOut::Stdout);
|
UWingComponentReference* NewParent = WingUtils::FindOneWithExternalID(Parent, AllComponents, TEXT("Component"), WingOut::Stdout);
|
||||||
if (!NewParent) return;
|
if (!NewParent) return;
|
||||||
|
|
||||||
if (!CompRef->ReparentComponent(NewParent, WingOut::Stdout)) return;
|
if (!UWingComponent::ReparentComponent(CompRef, NewParent, WingOut::Stdout)) return;
|
||||||
|
|
||||||
WingOut::Stdout.Printf(TEXT("Reparented component."));
|
WingOut::Stdout.Printf(TEXT("Reparented component."));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingUtils.h"
|
|
||||||
#include "Misc/Paths.h"
|
#include "Misc/Paths.h"
|
||||||
#include "Misc/PackageName.h"
|
#include "Misc/PackageName.h"
|
||||||
#include "HAL/FileManager.h"
|
#include "HAL/FileManager.h"
|
||||||
|
|||||||
@@ -3,9 +3,8 @@
|
|||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingUtils.h"
|
#include "Misc/Paths.h"
|
||||||
#include "Misc/PackageName.h"
|
#include "Misc/PackageName.h"
|
||||||
#include "AssetRegistry/AssetRegistryModule.h"
|
|
||||||
#include "AssetRegistry/IAssetRegistry.h"
|
#include "AssetRegistry/IAssetRegistry.h"
|
||||||
#include "HAL/FileManager.h"
|
#include "HAL/FileManager.h"
|
||||||
#include "UObject/LinkerLoad.h"
|
#include "UObject/LinkerLoad.h"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingFetcher.h"
|
#include "WingFetcher.h"
|
||||||
#include "WingUtils.h"
|
#include "Misc/PackageName.h"
|
||||||
#include "AssetToolsModule.h"
|
#include "AssetToolsModule.h"
|
||||||
#include "IAssetTools.h"
|
#include "IAssetTools.h"
|
||||||
#include "Asset_Rename.generated.h"
|
#include "Asset_Rename.generated.h"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingUtils.h"
|
#include "Misc/Paths.h"
|
||||||
#include "Misc/PackageName.h"
|
#include "Misc/PackageName.h"
|
||||||
#include "FileHelpers.h"
|
#include "FileHelpers.h"
|
||||||
#include "HAL/FileManager.h"
|
#include "HAL/FileManager.h"
|
||||||
|
|||||||
@@ -2,15 +2,13 @@
|
|||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingTypes.h"
|
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingFetcher.h"
|
#include "WingFetcher.h"
|
||||||
#include "WingUtils.h"
|
#include "WingUtils.h"
|
||||||
#include "Engine/Blueprint.h"
|
#include "Engine/Blueprint.h"
|
||||||
#include "Animation/AnimBlueprint.h"
|
#include "Animation/AnimBlueprint.h"
|
||||||
#include "Animation/Skeleton.h"
|
#include "Animation/Skeleton.h"
|
||||||
#include "WingActorComponent.h"
|
#include "WingComponent.h"
|
||||||
#include "Kismet2/BlueprintEditorUtils.h"
|
|
||||||
#include "AnimationGraph.h"
|
#include "AnimationGraph.h"
|
||||||
#include "AnimationGraphSchema.h"
|
#include "AnimationGraphSchema.h"
|
||||||
#include "AnimationStateMachineSchema.h"
|
#include "AnimationStateMachineSchema.h"
|
||||||
@@ -71,9 +69,9 @@ public:
|
|||||||
BlueprintVars.Print(WingOut::StdoutBuffer);
|
BlueprintVars.Print(WingOut::StdoutBuffer);
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
TArray<UWingComponentReference*> Components = UWingComponentReference::GetAll(BP);
|
TArray<UWingComponentReference*> Components = UWingComponent::GetAll(BP);
|
||||||
if (!Components.IsEmpty()) WingOut::Stdout.Print(TEXT("\nComponents:\n"));
|
if (!Components.IsEmpty()) WingOut::Stdout.Print(TEXT("\nComponents:\n"));
|
||||||
UWingComponentReference::PrintAll(BP, WingOut::Stdout);
|
UWingComponent::PrintAll(BP, WingOut::Stdout);
|
||||||
|
|
||||||
// Widget Tree
|
// Widget Tree
|
||||||
if (UWidgetBlueprint* WidgetBP = Cast<UWidgetBlueprint>(BP))
|
if (UWidgetBlueprint* WidgetBP = Cast<UWidgetBlueprint>(BP))
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingFetcher.h"
|
#include "WingFetcher.h"
|
||||||
#include "WingProperty.h"
|
#include "WingProperty.h"
|
||||||
#include "WingUtils.h"
|
|
||||||
#include "Details_Dump.generated.h"
|
#include "Details_Dump.generated.h"
|
||||||
|
|
||||||
UCLASS()
|
UCLASS()
|
||||||
|
|||||||
@@ -2,10 +2,7 @@
|
|||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingFetcher.h"
|
|
||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingTypes.h"
|
|
||||||
#include "WingProperty.h"
|
|
||||||
#include "WingManual.h"
|
#include "WingManual.h"
|
||||||
#include "Documentation_Commands.generated.h"
|
#include "Documentation_Commands.generated.h"
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,7 @@
|
|||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingFetcher.h"
|
|
||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingTypes.h"
|
|
||||||
#include "WingProperty.h"
|
|
||||||
#include "WingManual.h"
|
#include "WingManual.h"
|
||||||
#include "Documentation_CreateAssets.generated.h"
|
#include "Documentation_CreateAssets.generated.h"
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingManual.h"
|
#include "WingManual.h"
|
||||||
|
#include "WingServer.h"
|
||||||
#include "Documentation_Manual.generated.h"
|
#include "Documentation_Manual.generated.h"
|
||||||
|
|
||||||
UCLASS()
|
UCLASS()
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingFetcher.h"
|
#include "WingFetcher.h"
|
||||||
#include "WingUtils.h"
|
#include "WingUtils.h"
|
||||||
|
#include "WingVariables.h"
|
||||||
#include "Engine/Blueprint.h"
|
#include "Engine/Blueprint.h"
|
||||||
#include "EdGraphSchema_K2.h"
|
#include "EdGraphSchema_K2.h"
|
||||||
#include "Kismet2/BlueprintEditorUtils.h"
|
#include "Kismet2/BlueprintEditorUtils.h"
|
||||||
|
|||||||
@@ -9,8 +9,6 @@
|
|||||||
#include "WingGraphActions.h"
|
#include "WingGraphActions.h"
|
||||||
#include "WingGraphExport.h"
|
#include "WingGraphExport.h"
|
||||||
#include "EdGraph/EdGraph.h"
|
#include "EdGraph/EdGraph.h"
|
||||||
#include "EdGraph/EdGraphNode.h"
|
|
||||||
#include "EdGraph/EdGraphSchema.h"
|
|
||||||
#include "GraphNode_Add.generated.h"
|
#include "GraphNode_Add.generated.h"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,8 @@
|
|||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingFetcher.h"
|
#include "WingFetcher.h"
|
||||||
#include "WingUtils.h"
|
|
||||||
#include "WingGraphActions.h"
|
#include "WingGraphActions.h"
|
||||||
#include "EdGraph/EdGraph.h"
|
#include "EdGraph/EdGraph.h"
|
||||||
#include "EdGraph/EdGraphSchema.h"
|
|
||||||
#include "GraphNode_SearchTypes.generated.h"
|
#include "GraphNode_SearchTypes.generated.h"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingFetcher.h"
|
#include "WingFetcher.h"
|
||||||
#include "WingReferences.h"
|
|
||||||
#include "WingProperty.h"
|
#include "WingProperty.h"
|
||||||
#include "WingUtils.h"
|
#include "WingUtils.h"
|
||||||
#include "EdGraph/EdGraphPin.h"
|
#include "EdGraph/EdGraphPin.h"
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingFetcher.h"
|
#include "WingFetcher.h"
|
||||||
#include "WingProperty.h"
|
#include "WingProperty.h"
|
||||||
#include "WingUtils.h"
|
#include "EdGraph/EdGraph.h"
|
||||||
#include "Engine/Blueprint.h"
|
|
||||||
#include "EdGraph/EdGraphNode.h"
|
#include "EdGraph/EdGraphNode.h"
|
||||||
#include "GraphNode_SetPositions.generated.h"
|
#include "GraphNode_SetPositions.generated.h"
|
||||||
|
|
||||||
|
|||||||
@@ -4,13 +4,11 @@
|
|||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingFetcher.h"
|
#include "WingFetcher.h"
|
||||||
#include "WingReferences.h"
|
|
||||||
#include "WingProperty.h"
|
#include "WingProperty.h"
|
||||||
#include "WingUtils.h"
|
#include "WingUtils.h"
|
||||||
#include "Engine/Blueprint.h"
|
|
||||||
#include "EdGraph/EdGraph.h"
|
#include "EdGraph/EdGraph.h"
|
||||||
|
#include "EdGraph/EdGraphSchema.h"
|
||||||
#include "EdGraph/EdGraphPin.h"
|
#include "EdGraph/EdGraphPin.h"
|
||||||
#include "EdGraphSchema_K2.h"
|
|
||||||
#include "GraphPin_Connect.generated.h"
|
#include "GraphPin_Connect.generated.h"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,8 @@
|
|||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingFetcher.h"
|
#include "WingFetcher.h"
|
||||||
#include "WingReferences.h"
|
|
||||||
#include "WingProperty.h"
|
#include "WingProperty.h"
|
||||||
#include "WingUtils.h"
|
#include "WingUtils.h"
|
||||||
#include "Engine/Blueprint.h"
|
|
||||||
#include "EdGraph/EdGraph.h"
|
#include "EdGraph/EdGraph.h"
|
||||||
#include "EdGraph/EdGraphPin.h"
|
#include "EdGraph/EdGraphPin.h"
|
||||||
#include "GraphPin_Disconnect.generated.h"
|
#include "GraphPin_Disconnect.generated.h"
|
||||||
|
|||||||
@@ -4,12 +4,8 @@
|
|||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingFetcher.h"
|
#include "WingFetcher.h"
|
||||||
#include "WingUtils.h"
|
|
||||||
#include "WingGraphExport.h"
|
#include "WingGraphExport.h"
|
||||||
#include "Engine/Blueprint.h"
|
|
||||||
#include "EdGraph/EdGraph.h"
|
#include "EdGraph/EdGraph.h"
|
||||||
#include "Materials/Material.h"
|
|
||||||
#include "MaterialGraph/MaterialGraph.h"
|
|
||||||
#include "Graph_Dump.generated.h"
|
#include "Graph_Dump.generated.h"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,8 @@
|
|||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingFetcher.h"
|
#include "WingFetcher.h"
|
||||||
#include "WingUtils.h"
|
|
||||||
#include "WingParameterEditor.h"
|
#include "WingParameterEditor.h"
|
||||||
#include "Materials/MaterialInstanceConstant.h"
|
#include "Materials/MaterialInstanceConstant.h"
|
||||||
#include "MaterialTypes.h"
|
|
||||||
#include "MaterialInstance_ClearParameter.generated.h"
|
#include "MaterialInstance_ClearParameter.generated.h"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,8 @@
|
|||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingFetcher.h"
|
#include "WingFetcher.h"
|
||||||
#include "WingUtils.h"
|
|
||||||
#include "WingParameterEditor.h"
|
#include "WingParameterEditor.h"
|
||||||
#include "Materials/MaterialInstanceConstant.h"
|
#include "Materials/MaterialInstanceConstant.h"
|
||||||
#include "MaterialTypes.h"
|
|
||||||
#include "MaterialInstance_DumpParameters.generated.h"
|
#include "MaterialInstance_DumpParameters.generated.h"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,8 @@
|
|||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingFetcher.h"
|
#include "WingFetcher.h"
|
||||||
#include "WingUtils.h"
|
|
||||||
#include "WingParameterEditor.h"
|
#include "WingParameterEditor.h"
|
||||||
#include "Materials/MaterialInstanceConstant.h"
|
#include "Materials/MaterialInstanceConstant.h"
|
||||||
#include "MaterialTypes.h"
|
|
||||||
#include "MaterialInstance_SetParameter.generated.h"
|
#include "MaterialInstance_SetParameter.generated.h"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,8 @@
|
|||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingFetcher.h"
|
#include "WingFetcher.h"
|
||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingUtils.h"
|
|
||||||
#include "WingParameterEditor.h"
|
#include "WingParameterEditor.h"
|
||||||
#include "MaterialTypes.h"
|
#include "Materials/Material.h"
|
||||||
#include "Material_DumpParameters.generated.h"
|
#include "Material_DumpParameters.generated.h"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,12 +4,6 @@
|
|||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingTypes.h"
|
#include "WingTypes.h"
|
||||||
#include "EdGraphSchema_K2.h"
|
|
||||||
#include "GameFramework/Actor.h"
|
|
||||||
#include "Components/ActorComponent.h"
|
|
||||||
#include "Blueprint/UserWidget.h"
|
|
||||||
#include "GameFramework/Pawn.h"
|
|
||||||
#include "Engine/DataAsset.h"
|
|
||||||
#include "TypeName_Search.generated.h"
|
#include "TypeName_Search.generated.h"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#include "WingActorComponent.h"
|
#include "WingComponent.h"
|
||||||
#include "WingServer.h"
|
|
||||||
#include "WingTypes.h"
|
#include "WingTypes.h"
|
||||||
#include "WingUtils.h"
|
#include "WingUtils.h"
|
||||||
#include "Engine/Blueprint.h"
|
#include "Engine/Blueprint.h"
|
||||||
@@ -11,7 +10,7 @@
|
|||||||
#include "Kismet2/BlueprintEditorUtils.h"
|
#include "Kismet2/BlueprintEditorUtils.h"
|
||||||
#include "Engine/InheritableComponentHandler.h"
|
#include "Engine/InheritableComponentHandler.h"
|
||||||
|
|
||||||
UActorComponent *UWingComponentReference::FindComponentInCDO(UClass *Class, FName Name)
|
UActorComponent *UWingComponent::FindComponentInCDO(UClass *Class, FName Name)
|
||||||
{
|
{
|
||||||
if (!Class) return nullptr;
|
if (!Class) return nullptr;
|
||||||
AActor* CDO = Cast<AActor>(Class->GetDefaultObject());
|
AActor* CDO = Cast<AActor>(Class->GetDefaultObject());
|
||||||
@@ -19,7 +18,7 @@ UActorComponent *UWingComponentReference::FindComponentInCDO(UClass *Class, FNam
|
|||||||
return FindObjectFast<UActorComponent>(CDO, Name);
|
return FindObjectFast<UActorComponent>(CDO, Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
USCS_Node* UWingComponentReference::FindSCSNodeByName(UBlueprint *BP, FName Name)
|
USCS_Node* UWingComponent::FindSCSNodeByName(UBlueprint *BP, FName Name)
|
||||||
{
|
{
|
||||||
for (UBlueprint *WalkBP : WingUtils::GetAncestorBlueprints(BP))
|
for (UBlueprint *WalkBP : WingUtils::GetAncestorBlueprints(BP))
|
||||||
{
|
{
|
||||||
@@ -30,7 +29,7 @@ USCS_Node* UWingComponentReference::FindSCSNodeByName(UBlueprint *BP, FName Name
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
UWingComponentReference::FoundComponent UWingComponentReference::FindComponent(UBlueprint *BP, FName Name)
|
UWingComponent::FoundComponent UWingComponent::FindComponent(UBlueprint *BP, FName Name)
|
||||||
{
|
{
|
||||||
UClass* NativeClass = FBlueprintEditorUtils::FindFirstNativeClass(BP->ParentClass);
|
UClass* NativeClass = FBlueprintEditorUtils::FindFirstNativeClass(BP->ParentClass);
|
||||||
FoundComponent Result;
|
FoundComponent Result;
|
||||||
@@ -40,7 +39,7 @@ UWingComponentReference::FoundComponent UWingComponentReference::FindComponent(U
|
|||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UWingComponentReference::CheckExists(UWingComponentReference::FoundComponent FC, WingOut Errors)
|
bool UWingComponent::CheckExists(UWingComponent::FoundComponent FC, WingOut Errors)
|
||||||
{
|
{
|
||||||
if ((FC.SCS == nullptr) && (FC.Native == nullptr))
|
if ((FC.SCS == nullptr) && (FC.Native == nullptr))
|
||||||
{
|
{
|
||||||
@@ -50,7 +49,7 @@ bool UWingComponentReference::CheckExists(UWingComponentReference::FoundComponen
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UWingComponentReference::CheckValidParent(UWingComponentReference::FoundComponent FC, WingOut Errors)
|
bool UWingComponent::CheckValidParent(UWingComponent::FoundComponent FC, WingOut Errors)
|
||||||
{
|
{
|
||||||
if (FC.SCS && FC.Native)
|
if (FC.SCS && FC.Native)
|
||||||
{
|
{
|
||||||
@@ -73,7 +72,7 @@ bool UWingComponentReference::CheckValidParent(UWingComponentReference::FoundCom
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UWingComponentReference::CheckNoSuchComponent(FoundComponent FC, WingOut Errors)
|
bool UWingComponent::CheckNoSuchComponent(FoundComponent FC, WingOut Errors)
|
||||||
{
|
{
|
||||||
if (FC.SCS || FC.Native)
|
if (FC.SCS || FC.Native)
|
||||||
{
|
{
|
||||||
@@ -84,7 +83,7 @@ bool UWingComponentReference::CheckNoSuchComponent(FoundComponent FC, WingOut Er
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UWingComponentReference::CheckNotNative(FoundComponent FC, const TCHAR *Action, WingOut Errors)
|
bool UWingComponent::CheckNotNative(FoundComponent FC, const TCHAR *Action, WingOut Errors)
|
||||||
{
|
{
|
||||||
if (FC.Native != nullptr)
|
if (FC.Native != nullptr)
|
||||||
{
|
{
|
||||||
@@ -95,7 +94,7 @@ bool UWingComponentReference::CheckNotNative(FoundComponent FC, const TCHAR *Act
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UWingComponentReference::CheckOwnedByBlueprint(FoundComponent FC, UBlueprint *BP, WingOut Errors)
|
bool UWingComponent::CheckOwnedByBlueprint(FoundComponent FC, UBlueprint *BP, WingOut Errors)
|
||||||
{
|
{
|
||||||
if ((FC.SCS == nullptr) || (FC.SCS->GetSCS() != BP->SimpleConstructionScript))
|
if ((FC.SCS == nullptr) || (FC.SCS->GetSCS() != BP->SimpleConstructionScript))
|
||||||
{
|
{
|
||||||
@@ -106,7 +105,7 @@ bool UWingComponentReference::CheckOwnedByBlueprint(FoundComponent FC, UBlueprin
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UWingComponentReference::CheckValidComponentClass(UClass *Class, WingOut Errors)
|
bool UWingComponent::CheckValidComponentClass(UClass *Class, WingOut Errors)
|
||||||
{
|
{
|
||||||
if (!Class->IsChildOf(UActorComponent::StaticClass()))
|
if (!Class->IsChildOf(UActorComponent::StaticClass()))
|
||||||
{
|
{
|
||||||
@@ -118,7 +117,7 @@ bool UWingComponentReference::CheckValidComponentClass(UClass *Class, WingOut Er
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void UWingComponentReference::AddChildNode(UBlueprint *BP, USCS_Node *NewNode, FoundComponent Parent)
|
void UWingComponent::AddChildNode(UBlueprint *BP, USCS_Node *NewNode, FoundComponent Parent)
|
||||||
{
|
{
|
||||||
if (Parent.SCS)
|
if (Parent.SCS)
|
||||||
{
|
{
|
||||||
@@ -139,7 +138,7 @@ void UWingComponentReference::AddChildNode(UBlueprint *BP, USCS_Node *NewNode, F
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UWingComponentReference::AddComponent(UBlueprint *BP, UClass *Class, UWingComponentReference *Parent, FName Name, WingOut Errors)
|
bool UWingComponent::AddComponent(UBlueprint *BP, UClass *Class, UWingComponentReference *Parent, FName Name, WingOut Errors)
|
||||||
{
|
{
|
||||||
TSet<FName> Names;
|
TSet<FName> Names;
|
||||||
FBlueprintEditorUtils::GetClassVariableList(BP, Names);
|
FBlueprintEditorUtils::GetClassVariableList(BP, Names);
|
||||||
@@ -167,14 +166,14 @@ bool UWingComponentReference::AddComponent(UBlueprint *BP, UClass *Class, UWingC
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UWingComponentReference::ReparentComponent(UWingComponentReference *Parent, WingOut Errors)
|
bool UWingComponent::ReparentComponent(UWingComponentReference *Ref, UWingComponentReference *Parent, WingOut Errors)
|
||||||
{
|
{
|
||||||
FoundComponent ParentComponent = FindComponent(BP, Parent->VariableName);
|
FoundComponent ParentComponent = FindComponent(Ref->BP, Parent->VariableName);
|
||||||
if (!CheckValidParent(ParentComponent, Errors)) return false;
|
if (!CheckValidParent(ParentComponent, Errors)) return false;
|
||||||
FoundComponent ThisComponent = FindComponent(BP, VariableName);
|
FoundComponent ThisComponent = FindComponent(Ref->BP, Ref->VariableName);
|
||||||
if (!CheckExists(ThisComponent, Errors)) return false;
|
if (!CheckExists(ThisComponent, Errors)) return false;
|
||||||
if (!CheckNotNative(ThisComponent, TEXT("reparent"), Errors)) return false;
|
if (!CheckNotNative(ThisComponent, TEXT("reparent"), Errors)) return false;
|
||||||
if (!CheckOwnedByBlueprint(ThisComponent, BP, Errors)) return false;
|
if (!CheckOwnedByBlueprint(ThisComponent, Ref->BP, Errors)) return false;
|
||||||
|
|
||||||
if (ParentComponent.SCS && ParentComponent.SCS->IsChildOf(ThisComponent.SCS))
|
if (ParentComponent.SCS && ParentComponent.SCS->IsChildOf(ThisComponent.SCS))
|
||||||
{
|
{
|
||||||
@@ -182,22 +181,22 @@ bool UWingComponentReference::ReparentComponent(UWingComponentReference *Parent,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
BP->SimpleConstructionScript->RemoveNode(ThisComponent.SCS);
|
Ref->BP->SimpleConstructionScript->RemoveNode(ThisComponent.SCS);
|
||||||
AddChildNode(BP, ThisComponent.SCS, ParentComponent);
|
AddChildNode(Ref->BP, ThisComponent.SCS, ParentComponent);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UWingComponentReference::DeleteComponent(WingOut Errors)
|
bool UWingComponent::DeleteComponent(UWingComponentReference *Ref, WingOut Errors)
|
||||||
{
|
{
|
||||||
FoundComponent ThisComponent = FindComponent(BP, VariableName);
|
FoundComponent ThisComponent = FindComponent(Ref->BP, Ref->VariableName);
|
||||||
if (!CheckExists(ThisComponent, Errors)) return false;
|
if (!CheckExists(ThisComponent, Errors)) return false;
|
||||||
if (!CheckNotNative(ThisComponent, TEXT("delete"), Errors)) return false;
|
if (!CheckNotNative(ThisComponent, TEXT("delete"), Errors)) return false;
|
||||||
if (!CheckOwnedByBlueprint(ThisComponent, BP, Errors)) return false;
|
if (!CheckOwnedByBlueprint(ThisComponent, Ref->BP, Errors)) return false;
|
||||||
BP->SimpleConstructionScript->RemoveNodeAndPromoteChildren(ThisComponent.SCS);
|
Ref->BP->SimpleConstructionScript->RemoveNodeAndPromoteChildren(ThisComponent.SCS);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
TMap<FName, FName> UWingComponentReference::CalculateParentNames(USimpleConstructionScript *Script)
|
TMap<FName, FName> UWingComponent::CalculateParentNames(USimpleConstructionScript *Script)
|
||||||
{
|
{
|
||||||
TMap<FName, FName> ParentNames;
|
TMap<FName, FName> ParentNames;
|
||||||
for (USCS_Node* Node : Script->GetAllNodes())
|
for (USCS_Node* Node : Script->GetAllNodes())
|
||||||
@@ -214,14 +213,14 @@ TMap<FName, FName> UWingComponentReference::CalculateParentNames(USimpleConstruc
|
|||||||
return ParentNames;
|
return ParentNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
UActorComponent* UWingComponentReference::GetImmutableTemplate() const
|
UActorComponent* UWingComponent::GetImmutableTemplate(const UWingComponentReference *Ref)
|
||||||
{
|
{
|
||||||
FoundComponent FC = FindComponent(BP, VariableName);
|
FoundComponent FC = FindComponent(Ref->BP, Ref->VariableName);
|
||||||
if (FC.Native) return FC.Native;
|
if (FC.Native) return FC.Native;
|
||||||
if (FC.SCS == nullptr) return nullptr;
|
if (FC.SCS == nullptr) return nullptr;
|
||||||
FComponentKey Key(FC.SCS);
|
FComponentKey Key(FC.SCS);
|
||||||
|
|
||||||
for (UBlueprint *WalkBP : WingUtils::GetAncestorBlueprints(BP, false))
|
for (UBlueprint *WalkBP : WingUtils::GetAncestorBlueprints(Ref->BP, false))
|
||||||
{
|
{
|
||||||
if (FC.SCS->GetSCS()->GetBlueprint() == WalkBP) return FC.SCS->ComponentTemplate;
|
if (FC.SCS->GetSCS()->GetBlueprint() == WalkBP) return FC.SCS->ComponentTemplate;
|
||||||
UInheritableComponentHandler* ICH = WalkBP->GetInheritableComponentHandler(/*bCreateIfNecessary=*/ false);
|
UInheritableComponentHandler* ICH = WalkBP->GetInheritableComponentHandler(/*bCreateIfNecessary=*/ false);
|
||||||
@@ -232,22 +231,22 @@ UActorComponent* UWingComponentReference::GetImmutableTemplate() const
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
UActorComponent* UWingComponentReference::GetMutableTemplate() const
|
UActorComponent* UWingComponent::GetMutableTemplate(const UWingComponentReference *Ref)
|
||||||
{
|
{
|
||||||
FoundComponent FC = FindComponent(BP, VariableName);
|
FoundComponent FC = FindComponent(Ref->BP, Ref->VariableName);
|
||||||
if (FC.Native) return FC.Native;
|
if (FC.Native) return FC.Native;
|
||||||
if (!FC.SCS) return nullptr;
|
if (!FC.SCS) return nullptr;
|
||||||
if (FC.SCS->GetSCS()->GetBlueprint() == BP) return FC.SCS->ComponentTemplate;
|
if (FC.SCS->GetSCS()->GetBlueprint() == Ref->BP) return FC.SCS->ComponentTemplate;
|
||||||
|
|
||||||
FComponentKey Key(FC.SCS);
|
FComponentKey Key(FC.SCS);
|
||||||
UInheritableComponentHandler* ICH = BP->GetInheritableComponentHandler(/*bCreateIfNecessary=*/ true);
|
UInheritableComponentHandler* ICH = Ref->BP->GetInheritableComponentHandler(/*bCreateIfNecessary=*/ true);
|
||||||
if (!ICH) return nullptr;
|
if (!ICH) return nullptr;
|
||||||
UActorComponent* Override = ICH->GetOverridenComponentTemplate(Key);
|
UActorComponent* Override = ICH->GetOverridenComponentTemplate(Key);
|
||||||
if (!Override) Override = ICH->CreateOverridenComponentTemplate(Key);
|
if (!Override) Override = ICH->CreateOverridenComponentTemplate(Key);
|
||||||
return Override;
|
return Override;
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<UWingComponentReference*> UWingComponentReference::GetAll(UBlueprint* BP)
|
TArray<UWingComponentReference*> UWingComponent::GetAll(UBlueprint* BP)
|
||||||
{
|
{
|
||||||
TArray<UWingComponentReference*> Result;
|
TArray<UWingComponentReference*> Result;
|
||||||
if (!BP) return Result;
|
if (!BP) return Result;
|
||||||
@@ -288,7 +287,7 @@ TArray<UWingComponentReference*> UWingComponentReference::GetAll(UBlueprint* BP)
|
|||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UWingComponentReference::PrintComponentInfo(const FString& TypeName, const FString& VarName, const FString& ParentName, bool Inherited, WingOut Out)
|
void UWingComponent::PrintComponentInfo(const FString& TypeName, const FString& VarName, const FString& ParentName, bool Inherited, WingOut Out)
|
||||||
{
|
{
|
||||||
Out.Printf(TEXT(" %s %s"), *TypeName, *VarName);
|
Out.Printf(TEXT(" %s %s"), *TypeName, *VarName);
|
||||||
if (!ParentName.IsEmpty())
|
if (!ParentName.IsEmpty())
|
||||||
@@ -298,7 +297,7 @@ void UWingComponentReference::PrintComponentInfo(const FString& TypeName, const
|
|||||||
Out.Print(TEXT("\n"));
|
Out.Print(TEXT("\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void UWingComponentReference::PrintAll(UBlueprint* BP, WingOut Out)
|
void UWingComponent::PrintAll(UBlueprint* BP, WingOut Out)
|
||||||
{
|
{
|
||||||
if (!BP) return;
|
if (!BP) return;
|
||||||
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
#include "WingFactories.h"
|
#include "WingFactories.h"
|
||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingUtils.h"
|
|
||||||
#include "PackageTools.h"
|
#include "PackageTools.h"
|
||||||
#include "WingProperty.h"
|
#include "WingProperty.h"
|
||||||
#include "AssetRegistry/AssetRegistryModule.h"
|
#include "AssetRegistry/AssetRegistryModule.h"
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingUtils.h"
|
#include "WingUtils.h"
|
||||||
#include "WingActorComponent.h"
|
#include "WingComponent.h"
|
||||||
#include "WingReferences.h"
|
|
||||||
#include "Engine/Blueprint.h"
|
#include "Engine/Blueprint.h"
|
||||||
#include "EdGraph/EdGraph.h"
|
#include "EdGraph/EdGraph.h"
|
||||||
#include "EdGraph/EdGraphNode.h"
|
#include "EdGraph/EdGraphNode.h"
|
||||||
@@ -19,7 +18,6 @@
|
|||||||
#include "WidgetBlueprint.h"
|
#include "WidgetBlueprint.h"
|
||||||
#include "Blueprint/WidgetTree.h"
|
#include "Blueprint/WidgetTree.h"
|
||||||
#include "Components/Widget.h"
|
#include "Components/Widget.h"
|
||||||
#include "WingServer.h"
|
|
||||||
#include "WingManual.h"
|
#include "WingManual.h"
|
||||||
|
|
||||||
WingFetcher::WalkFunc WingFetcher::GetWalker(const FString& Step)
|
WingFetcher::WalkFunc WingFetcher::GetWalker(const FString& Step)
|
||||||
@@ -286,7 +284,7 @@ WingFetcher& WingFetcher::Component(const FString& Value)
|
|||||||
return SetError();
|
return SetError();
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<UWingComponentReference*> AllComponents = UWingComponentReference::GetAll(BP);
|
TArray<UWingComponentReference*> AllComponents = UWingComponent::GetAll(BP);
|
||||||
UWingComponentReference* Found = WingUtils::FindOneWithExternalID(Value, AllComponents, TEXT("component"), Errors);
|
UWingComponentReference* Found = WingUtils::FindOneWithExternalID(Value, AllComponents, TEXT("component"), Errors);
|
||||||
if (!Found)
|
if (!Found)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
#include "BlueprintNodeSpawner.h"
|
#include "BlueprintNodeSpawner.h"
|
||||||
#include "EdGraphSchema_K2.h"
|
#include "EdGraphSchema_K2.h"
|
||||||
#include "WingUtils.h"
|
#include "WingUtils.h"
|
||||||
#include "Kismet2/BlueprintEditorUtils.h"
|
|
||||||
|
|
||||||
FWingGraphAction::FWingGraphAction(TSharedPtr<FEdGraphSchemaAction> &iAction, UEdGraph *iGraph)
|
FWingGraphAction::FWingGraphAction(TSharedPtr<FEdGraphSchemaAction> &iAction, UEdGraph *iGraph)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
#include "WingGraphExport.h"
|
#include "WingGraphExport.h"
|
||||||
#include "WingTypes.h"
|
#include "WingTypes.h"
|
||||||
#include "WingUtils.h"
|
#include "WingUtils.h"
|
||||||
#include "Engine/Blueprint.h"
|
|
||||||
#include "EdGraph/EdGraph.h"
|
#include "EdGraph/EdGraph.h"
|
||||||
#include "EdGraph/EdGraphNode.h"
|
#include "EdGraph/EdGraphNode.h"
|
||||||
#include "EdGraph/EdGraphPin.h"
|
#include "EdGraph/EdGraphPin.h"
|
||||||
#include "EdGraphSchema_K2.h"
|
#include "EdGraphSchema_K2.h"
|
||||||
#include "EdGraphNode_Comment.h"
|
#include "EdGraphNode_Comment.h"
|
||||||
#include "K2Node_CallFunction.h"
|
#include "K2Node_CallFunction.h"
|
||||||
#include "K2Node_FunctionEntry.h"
|
|
||||||
#include "WingVariables.h"
|
#include "WingVariables.h"
|
||||||
#include "MaterialGraph/MaterialGraphNode.h"
|
#include "MaterialGraph/MaterialGraphNode.h"
|
||||||
#include "Kismet2/BlueprintEditorUtils.h"
|
|
||||||
|
|
||||||
WingGraphExport::WingGraphExport(UEdGraph* InGraph, bool Locals, bool Details)
|
WingGraphExport::WingGraphExport(UEdGraph* InGraph, bool Locals, bool Details)
|
||||||
: Graph(InGraph), ShowLocals(Locals), ShowDetails(Details)
|
: Graph(InGraph), ShowLocals(Locals), ShowDetails(Details)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
|
||||||
#include "Modules/ModuleInterface.h"
|
#include "Modules/ModuleInterface.h"
|
||||||
|
|
||||||
class FWingModule : public IModuleInterface
|
class FWingModule : public IModuleInterface
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
#include "BlueprintEditor.h"
|
#include "BlueprintEditor.h"
|
||||||
#include "MaterialEditingLibrary.h"
|
#include "MaterialEditingLibrary.h"
|
||||||
#include "Subsystems/AssetEditorSubsystem.h"
|
#include "Subsystems/AssetEditorSubsystem.h"
|
||||||
#include "Engine/Blueprint.h"
|
|
||||||
#include "WingHacks.h"
|
#include "WingHacks.h"
|
||||||
|
|
||||||
void FWingNotifier::AddTouchedObject(UObject* Obj)
|
void FWingNotifier::AddTouchedObject(UObject* Obj)
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
#include "WingProperty.h"
|
#include "WingProperty.h"
|
||||||
#include "WingActorComponent.h"
|
#include "WingComponent.h"
|
||||||
#include "WingUtils.h"
|
#include "WingUtils.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingReferences.h"
|
|
||||||
#include "WingServer.h"
|
|
||||||
#include "WingTypes.h"
|
#include "WingTypes.h"
|
||||||
#include "Engine/Blueprint.h"
|
#include "Engine/Blueprint.h"
|
||||||
#include "Engine/SCS_Node.h"
|
|
||||||
#include "MaterialGraph/MaterialGraphNode.h"
|
#include "MaterialGraph/MaterialGraphNode.h"
|
||||||
#include "Components/Widget.h"
|
#include "Components/Widget.h"
|
||||||
#include "Components/PanelSlot.h"
|
#include "Components/PanelSlot.h"
|
||||||
@@ -455,7 +452,7 @@ TArray<FWingProperty> FWingProperty::GetDetails(UObject* Obj, bool Mutable)
|
|||||||
// Component references: get the proper template.
|
// Component references: get the proper template.
|
||||||
if (UWingComponentReference* Ref = ::Cast<UWingComponentReference>(Obj))
|
if (UWingComponentReference* Ref = ::Cast<UWingComponentReference>(Obj))
|
||||||
{
|
{
|
||||||
Obj = Mutable ? Ref->GetMutableTemplate() : Ref->GetImmutableTemplate();
|
Obj = Mutable ? UWingComponent::GetMutableTemplate(Ref) : UWingComponent::GetImmutableTemplate(Ref);
|
||||||
if (!Obj)
|
if (!Obj)
|
||||||
{
|
{
|
||||||
WingOut::Stdout.Printf(TEXT("ERROR: Component '%s' has no template\n"), *Ref->VariableName.ToString());
|
WingOut::Stdout.Printf(TEXT("ERROR: Component '%s' has no template\n"), *Ref->VariableName.ToString());
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
#include "WingReferences.h"
|
|
||||||
#include "WingUtils.h"
|
|
||||||
#include "EdGraph/EdGraphNode.h"
|
|
||||||
#include "EdGraph/EdGraphPin.h"
|
|
||||||
|
|
||||||
|
|
||||||
@@ -5,23 +5,15 @@
|
|||||||
#include "WingLogCapture.h"
|
#include "WingLogCapture.h"
|
||||||
#include "WingUtils.h"
|
#include "WingUtils.h"
|
||||||
#include "UObject/StrongObjectPtr.h"
|
#include "UObject/StrongObjectPtr.h"
|
||||||
#include "Materials/MaterialExpression.h"
|
|
||||||
#include "AssetRegistry/AssetRegistryModule.h"
|
#include "AssetRegistry/AssetRegistryModule.h"
|
||||||
#include "AssetRegistry/IAssetRegistry.h"
|
#include "AssetRegistry/IAssetRegistry.h"
|
||||||
#include "Engine/Blueprint.h"
|
#include "Engine/Blueprint.h"
|
||||||
#include "Engine/World.h"
|
|
||||||
#include "Engine/Level.h"
|
|
||||||
#include "Engine/LevelScriptBlueprint.h"
|
|
||||||
#include "EdGraph/EdGraph.h"
|
#include "EdGraph/EdGraph.h"
|
||||||
#include "EdGraph/EdGraphNode.h"
|
#include "EdGraph/EdGraphNode.h"
|
||||||
#include "EdGraph/EdGraphPin.h"
|
#include "EdGraph/EdGraphPin.h"
|
||||||
#include "EdGraphSchema_K2.h"
|
#include "EdGraphSchema_K2.h"
|
||||||
#include "K2Node.h"
|
#include "K2Node.h"
|
||||||
#include "K2Node_CallFunction.h"
|
#include "K2Node_CallFunction.h"
|
||||||
#include "K2Node_Event.h"
|
|
||||||
#include "K2Node_CustomEvent.h"
|
|
||||||
#include "K2Node_FunctionEntry.h"
|
|
||||||
#include "K2Node_EditablePinBase.h"
|
|
||||||
#include "K2Node_VariableGet.h"
|
#include "K2Node_VariableGet.h"
|
||||||
#include "K2Node_VariableSet.h"
|
#include "K2Node_VariableSet.h"
|
||||||
#include "K2Node_BreakStruct.h"
|
#include "K2Node_BreakStruct.h"
|
||||||
@@ -32,57 +24,17 @@
|
|||||||
#include "K2Node_IfThenElse.h"
|
#include "K2Node_IfThenElse.h"
|
||||||
#include "Kismet2/BlueprintEditorUtils.h"
|
#include "Kismet2/BlueprintEditorUtils.h"
|
||||||
#include "Kismet2/KismetEditorUtilities.h"
|
#include "Kismet2/KismetEditorUtilities.h"
|
||||||
#include "Dom/JsonValue.h"
|
|
||||||
#include "Serialization/JsonReader.h"
|
#include "Serialization/JsonReader.h"
|
||||||
#include "Serialization/JsonWriter.h"
|
|
||||||
#include "Serialization/JsonSerializer.h"
|
#include "Serialization/JsonSerializer.h"
|
||||||
#include "Interfaces/IPv4/IPv4Address.h"
|
|
||||||
#include "Interfaces/IPv4/IPv4Endpoint.h"
|
|
||||||
#include "SocketSubsystem.h"
|
#include "SocketSubsystem.h"
|
||||||
#include "Sockets.h"
|
#include "Sockets.h"
|
||||||
#include "Async/Async.h"
|
#include "Async/Async.h"
|
||||||
#include "UObject/SavePackage.h"
|
|
||||||
#include "Misc/Paths.h"
|
#include "Misc/Paths.h"
|
||||||
#include "Misc/FileHelper.h"
|
#include "Misc/FileHelper.h"
|
||||||
#include "Misc/Guid.h"
|
#include "Misc/Guid.h"
|
||||||
#include "AssetToolsModule.h"
|
|
||||||
#include "IAssetTools.h"
|
|
||||||
#include "UObject/UObjectIterator.h"
|
#include "UObject/UObjectIterator.h"
|
||||||
#include "Misc/PackageName.h"
|
#include "Misc/PackageName.h"
|
||||||
#include "UObject/LinkerLoad.h"
|
|
||||||
#include "Engine/UserDefinedEnum.h"
|
|
||||||
#include "Editor.h"
|
#include "Editor.h"
|
||||||
#include "Materials/Material.h"
|
|
||||||
#include "Materials/MaterialInstanceConstant.h"
|
|
||||||
#include "Materials/MaterialFunction.h"
|
|
||||||
#include "Materials/MaterialExpressionScalarParameter.h"
|
|
||||||
#include "Materials/MaterialExpressionVectorParameter.h"
|
|
||||||
#include "Materials/MaterialExpressionTextureObjectParameter.h"
|
|
||||||
#include "Materials/MaterialExpressionTextureSampleParameter2D.h"
|
|
||||||
#include "Materials/MaterialExpressionStaticSwitchParameter.h"
|
|
||||||
#include "Materials/MaterialExpressionConstant.h"
|
|
||||||
#include "Materials/MaterialExpressionConstant2Vector.h"
|
|
||||||
#include "Materials/MaterialExpressionConstant3Vector.h"
|
|
||||||
#include "Materials/MaterialExpressionConstant4Vector.h"
|
|
||||||
#include "Materials/MaterialExpressionTextureSample.h"
|
|
||||||
#include "Materials/MaterialExpressionTextureCoordinate.h"
|
|
||||||
#include "Materials/MaterialExpressionComponentMask.h"
|
|
||||||
#include "Materials/MaterialExpressionCustom.h"
|
|
||||||
#include "Materials/MaterialExpressionAppendVector.h"
|
|
||||||
#include "Materials/MaterialExpressionAdd.h"
|
|
||||||
#include "Materials/MaterialExpressionMultiply.h"
|
|
||||||
#include "Materials/MaterialExpressionLinearInterpolate.h"
|
|
||||||
#include "Materials/MaterialExpressionClamp.h"
|
|
||||||
#include "Materials/MaterialExpressionOneMinus.h"
|
|
||||||
#include "Materials/MaterialExpressionPower.h"
|
|
||||||
#include "Materials/MaterialExpressionTime.h"
|
|
||||||
#include "Materials/MaterialExpressionWorldPosition.h"
|
|
||||||
#include "Materials/MaterialExpressionFunctionInput.h"
|
|
||||||
#include "Materials/MaterialExpressionFunctionOutput.h"
|
|
||||||
#include "Materials/MaterialExpressionMaterialFunctionCall.h"
|
|
||||||
#include "MaterialGraph/MaterialGraph.h"
|
|
||||||
#include "MaterialGraph/MaterialGraphNode.h"
|
|
||||||
#include "MaterialGraph/MaterialGraphSchema.h"
|
|
||||||
|
|
||||||
// Animation Blueprint support
|
// Animation Blueprint support
|
||||||
#include "Animation/AnimBlueprint.h"
|
#include "Animation/AnimBlueprint.h"
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
#include "ToolMenuContext.h"
|
#include "ToolMenuContext.h"
|
||||||
#include "ToolMenus.h"
|
#include "ToolMenus.h"
|
||||||
#include "WingUtils.h"
|
#include "WingUtils.h"
|
||||||
#include "EdGraph/EdGraphSchema.h"
|
|
||||||
#include "EdGraphSchema_K2.h"
|
#include "EdGraphSchema_K2.h"
|
||||||
#include "Framework/Commands/UIAction.h"
|
#include "Framework/Commands/UIAction.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "WingUtils.h"
|
#include "WingUtils.h"
|
||||||
#include "WingActorComponent.h"
|
#include "WingComponent.h"
|
||||||
#include "WingProperty.h"
|
#include "WingProperty.h"
|
||||||
#include "WingTypes.h"
|
#include "WingTypes.h"
|
||||||
#include "WingServer.h"
|
#include "WingServer.h"
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#include "WingVariables.h"
|
#include "WingVariables.h"
|
||||||
#include "WingServer.h"
|
|
||||||
#include "WingTypes.h"
|
#include "WingTypes.h"
|
||||||
#include "WingUtils.h"
|
#include "WingUtils.h"
|
||||||
#include "WingProperty.h"
|
#include "WingProperty.h"
|
||||||
@@ -8,7 +7,6 @@
|
|||||||
#include "K2Node_FunctionEntry.h"
|
#include "K2Node_FunctionEntry.h"
|
||||||
#include "K2Node_FunctionResult.h"
|
#include "K2Node_FunctionResult.h"
|
||||||
#include "K2Node_CustomEvent.h"
|
#include "K2Node_CustomEvent.h"
|
||||||
#include "K2Node_Tunnel.h"
|
|
||||||
#include "K2Node_EditablePinBase.h"
|
#include "K2Node_EditablePinBase.h"
|
||||||
#include "Kismet2/BlueprintEditorUtils.h"
|
#include "Kismet2/BlueprintEditorUtils.h"
|
||||||
#include "Kismet2/KismetEditorUtilities.h"
|
#include "Kismet2/KismetEditorUtilities.h"
|
||||||
|
|||||||
@@ -1,15 +1,11 @@
|
|||||||
#include "WingWidgets.h"
|
#include "WingWidgets.h"
|
||||||
#include "WingServer.h"
|
|
||||||
#include "WingUtils.h"
|
#include "WingUtils.h"
|
||||||
#include "Blueprint/WidgetTree.h"
|
|
||||||
#include "WidgetBlueprint.h"
|
#include "WidgetBlueprint.h"
|
||||||
#include "Components/Widget.h"
|
#include "Components/Widget.h"
|
||||||
#include "Components/PanelWidget.h"
|
#include "Components/PanelWidget.h"
|
||||||
#include "Components/PanelSlot.h"
|
#include "Components/PanelSlot.h"
|
||||||
#include "Blueprint/UserWidget.h"
|
|
||||||
#include "UObject/UObjectIterator.h"
|
#include "UObject/UObjectIterator.h"
|
||||||
#include "AssetRegistry/AssetData.h"
|
#include "AssetRegistry/AssetData.h"
|
||||||
#include "AssetRegistry/AssetRegistryModule.h"
|
|
||||||
#include "AssetRegistry/IAssetRegistry.h"
|
#include "AssetRegistry/IAssetRegistry.h"
|
||||||
|
|
||||||
FString WingWidgets::WidgetMenuString(UClass* WidgetClass)
|
FString WingWidgets::WidgetMenuString(UClass* WidgetClass)
|
||||||
|
|||||||
@@ -6,25 +6,23 @@
|
|||||||
#include "Dom/JsonObject.h"
|
#include "Dom/JsonObject.h"
|
||||||
#include "WingBasics.generated.h"
|
#include "WingBasics.generated.h"
|
||||||
|
|
||||||
// Marker struct for handler parameters that accept a JSON object.
|
class UEdGraphNode;
|
||||||
// PopulateFromJson stashes the actual JSON object into the Json field.
|
class UEdGraphPin;
|
||||||
//
|
class UBlueprint;
|
||||||
USTRUCT()
|
|
||||||
struct FWingJsonObject
|
|
||||||
{
|
|
||||||
GENERATED_BODY()
|
|
||||||
TSharedPtr<FJsonObject> Json;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Marker struct for handler parameters that accept a JSON array.
|
////////////////////////////////////////////////////////////
|
||||||
// PopulateFromJson stashes the actual JSON array into the Array field.
|
|
||||||
//
|
//
|
||||||
USTRUCT()
|
// Handlers.
|
||||||
struct FWingJsonArray
|
//
|
||||||
{
|
// Each command supported by the MCP is implemented by a
|
||||||
GENERATED_BODY()
|
// 'handler'. The server receives the request, which
|
||||||
TArray<TSharedPtr<FJsonValue>> Array;
|
// contains a command. The server looks up the right
|
||||||
};
|
// handler class for the command, and creates a handler
|
||||||
|
// object. Using reflection, it inserts the command
|
||||||
|
// parameters into uproperty fields of the handler, then
|
||||||
|
// calls the handle method, which executes the command.
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
UENUM()
|
UENUM()
|
||||||
enum class EWingHandlerKind
|
enum class EWingHandlerKind
|
||||||
@@ -59,13 +57,56 @@ public:
|
|||||||
|
|
||||||
// The configuration object.
|
// The configuration object.
|
||||||
FWingHandlerConfig *Configuration;
|
FWingHandlerConfig *Configuration;
|
||||||
|
|
||||||
public:
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// A 'WingOut' is our version of an output stream. It always
|
////////////////////////////////////////////////////////////
|
||||||
// contains a pointer to a string builder, or nullptr.
|
|
||||||
//
|
//
|
||||||
|
// Json wrappers.
|
||||||
|
//
|
||||||
|
// Normally, the json request is automatically used to
|
||||||
|
// populate the properties of the handler, so the handler
|
||||||
|
// doesn't have to deal with json. However, in a few cases,
|
||||||
|
// the handler actually does want to see some json. These
|
||||||
|
// wrappers allow a handler to request raw json data instead
|
||||||
|
// of pre-processed values.
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
USTRUCT()
|
||||||
|
struct FWingJsonObject
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
TSharedPtr<FJsonObject> Json;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Marker struct for handler parameters that accept a JSON array.
|
||||||
|
// PopulateFromJson stashes the actual JSON array into the Array field.
|
||||||
|
//
|
||||||
|
USTRUCT()
|
||||||
|
struct FWingJsonArray
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
TArray<TSharedPtr<FJsonValue>> Array;
|
||||||
|
};
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// WingOut.
|
||||||
|
//
|
||||||
|
// A thin wrapper around unreal string builders. Handlers
|
||||||
|
// put their output into a WingOut (string builder), which
|
||||||
|
// eventually gets forwarded to the agent. This output
|
||||||
|
// buffer is called WingOut::Stdout.
|
||||||
|
//
|
||||||
|
// Subroutines that can generate error messages take a
|
||||||
|
// parameter 'WingOut Errors', a string builder where they
|
||||||
|
// can put the error message. Unlike a raw string builder,
|
||||||
|
// a WingOut can be nullptr, which is useful if you want to
|
||||||
|
// ignore error messages from certain subroutines. You can
|
||||||
|
// also direct error messages directly to WingOut::Stdout.
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
class WingOut
|
class WingOut
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -87,6 +128,16 @@ private:
|
|||||||
FStringBuilderBase *Buffer;
|
FStringBuilderBase *Buffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// FWingStructAndUStruct.
|
||||||
|
//
|
||||||
|
// A pointer to a struct, and also a pointer to a UStruct
|
||||||
|
// that describes the struct. This also can store a
|
||||||
|
// UObject and the UClass that describes the UObject.
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// A FWingStructAndUStruct is a pointer to a struct and its associated ustruct.
|
// A FWingStructAndUStruct is a pointer to a struct and its associated ustruct.
|
||||||
//
|
//
|
||||||
struct FWingStructAndUStruct
|
struct FWingStructAndUStruct
|
||||||
@@ -108,3 +159,75 @@ struct FWingStructAndUStruct
|
|||||||
FWingStructAndUStruct(T *Struct) : StructPtr(Struct), UStructPtr(Struct->StaticStruct()) {}
|
FWingStructAndUStruct(T *Struct) : StructPtr(Struct), UStructPtr(Struct->StaticStruct()) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// References.
|
||||||
|
//
|
||||||
|
// The MCP has a variety of operations that can manipulate
|
||||||
|
// any object, including: actors, components, graphs, graph
|
||||||
|
// nodes, graph pins, widgets, and so forth. For example,
|
||||||
|
// the agent can request a 'details panel' for any of these.
|
||||||
|
//
|
||||||
|
// However, some of those objects aren't UObjects. This
|
||||||
|
// makes it awkward to write code that deals with them
|
||||||
|
// uniformly. To homogenize them, we turn them all into
|
||||||
|
// UObjects by creating wrappers for those that aren't.
|
||||||
|
//
|
||||||
|
// Some things that you would think are UObjects, like
|
||||||
|
// components, are actually only UObjects at runtime.
|
||||||
|
// When a blueprint is still being edited, the component
|
||||||
|
// is represented by a bunch of related data structures
|
||||||
|
// inside the blueprint. At that time, there is no one
|
||||||
|
// UObject to point to as 'the component.'
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
// Pin Ref: A pointer to a graph node, plus a pin name.
|
||||||
|
UCLASS()
|
||||||
|
class UWingPinReference : public UObject
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
UPROPERTY()
|
||||||
|
UEdGraphNode* Node = nullptr;
|
||||||
|
|
||||||
|
FName PinName;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Component Ref: A pointer to a blueprint plus a component
|
||||||
|
// name. The component can be an inherited component, as
|
||||||
|
// opposed to one that is defined in the blueprint itself.
|
||||||
|
UCLASS()
|
||||||
|
class UWingComponentReference : public UObject
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
public:
|
||||||
|
UPROPERTY()
|
||||||
|
UBlueprint* BP = nullptr;
|
||||||
|
|
||||||
|
// The component name.
|
||||||
|
FName VariableName;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Struct Ref: A pointer to an object, and a struct inside
|
||||||
|
// that object. The editable flag indicates whether the
|
||||||
|
// struct is marked CPF_Edit. If not, then the intent is
|
||||||
|
// that this struct is for viewing only.
|
||||||
|
UCLASS()
|
||||||
|
class UWingStructPointer : public UObject
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
public:
|
||||||
|
UPROPERTY()
|
||||||
|
UObject* Object;
|
||||||
|
|
||||||
|
UPROPERTY()
|
||||||
|
UStruct* StructType;
|
||||||
|
|
||||||
|
void *StructBase;
|
||||||
|
|
||||||
|
bool Editable;
|
||||||
|
};
|
||||||
|
|||||||
@@ -2,34 +2,21 @@
|
|||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingActorComponent.generated.h"
|
|
||||||
|
|
||||||
class UBlueprint;
|
class UBlueprint;
|
||||||
class USCS_Node;
|
class USCS_Node;
|
||||||
class UActorComponent;
|
class UActorComponent;
|
||||||
class USimpleConstructionScript;
|
class USimpleConstructionScript;
|
||||||
|
|
||||||
// a 'Component Reference' is just a pointer to a
|
|
||||||
// blueprint plus a component name.
|
struct UWingComponent
|
||||||
//
|
|
||||||
UCLASS()
|
|
||||||
class UWingComponentReference : public UObject
|
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
|
||||||
public:
|
public:
|
||||||
// The blueprint that was queried: not necessarily the
|
static UActorComponent* GetImmutableTemplate(const UWingComponentReference *Ref);
|
||||||
// same blueprint that defined the component.
|
static UActorComponent* GetMutableTemplate(const UWingComponentReference *Ref);
|
||||||
UPROPERTY()
|
|
||||||
UBlueprint* BP = nullptr;
|
|
||||||
|
|
||||||
// The component name.
|
static bool ReparentComponent(UWingComponentReference *Ref, UWingComponentReference *Parent, WingOut Errors);
|
||||||
FName VariableName;
|
static bool DeleteComponent(UWingComponentReference *Ref, WingOut Errors);
|
||||||
|
|
||||||
UActorComponent* GetImmutableTemplate() const;
|
|
||||||
UActorComponent* GetMutableTemplate() const;
|
|
||||||
|
|
||||||
bool ReparentComponent(UWingComponentReference *Parent, WingOut Errors);
|
|
||||||
bool DeleteComponent(WingOut Errors);
|
|
||||||
static bool AddComponent(UBlueprint *BP, UClass *Class,
|
static bool AddComponent(UBlueprint *BP, UClass *Class,
|
||||||
UWingComponentReference *Parent, FName Name, WingOut Errors);
|
UWingComponentReference *Parent, FName Name, WingOut Errors);
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "UObject/StrongObjectPtr.h"
|
#include "UObject/StrongObjectPtr.h"
|
||||||
#include "WingUtils.h"
|
#include "WingBasics.h"
|
||||||
|
|
||||||
struct FWalker;
|
struct FWalker;
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "EdGraph/EdGraph.h"
|
|
||||||
|
|
||||||
class UBlueprintNodeSpawner;
|
class UBlueprintNodeSpawner;
|
||||||
|
class UEdGraph;
|
||||||
|
class UEdGraphNode;
|
||||||
struct FEdGraphSchemaAction;
|
struct FEdGraphSchemaAction;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "WingProperty.h"
|
#include "WingProperty.h"
|
||||||
#include "Engine/Blueprint.h"
|
|
||||||
#include "EdGraph/EdGraph.h"
|
|
||||||
#include "EdGraph/EdGraphNode.h"
|
|
||||||
#include "EdGraph/EdGraphPin.h"
|
#include "EdGraph/EdGraphPin.h"
|
||||||
|
|
||||||
|
class UEdGraph;
|
||||||
|
class UEdGraphNode;
|
||||||
|
|
||||||
class WingGraphExport
|
class WingGraphExport
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "Materials/Material.h"
|
#include "Materials/Material.h"
|
||||||
#include "WingTokenizer.h"
|
|
||||||
#include "Materials/MaterialInstanceConstant.h"
|
#include "Materials/MaterialInstanceConstant.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingParameterEditor.generated.h"
|
#include "WingParameterEditor.generated.h"
|
||||||
|
|
||||||
|
struct WingTokenizer;
|
||||||
|
|
||||||
USTRUCT()
|
USTRUCT()
|
||||||
struct FWingFontAndPage
|
struct FWingFontAndPage
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingUtils.h"
|
|
||||||
|
|
||||||
// A resolved property: the FProperty descriptor plus a pointer to
|
// A resolved property: the FProperty descriptor plus a pointer to
|
||||||
// the value's storage.
|
// the value's storage.
|
||||||
|
|||||||
@@ -1,66 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
|
||||||
#include "UObject/Object.h"
|
|
||||||
#include "WingBasics.h"
|
|
||||||
#include "WingReferences.generated.h"
|
|
||||||
|
|
||||||
class UEdGraphNode;
|
|
||||||
class UEdGraphPin;
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// The WingFetcher module allows you to start at an asset and
|
|
||||||
// walk to any object within that asset. For example, you can
|
|
||||||
// start at an actor blueprint, walk to its event graph, then
|
|
||||||
// walk to a graph node, and then walk to a graph pin.
|
|
||||||
//
|
|
||||||
// The following classes make it possible to 'walk' to a
|
|
||||||
// place that isn't a UObject, or that isn't a single UObject.
|
|
||||||
// We accomplish this by creating a UObject class that
|
|
||||||
// contains some sort of reference to the item in question.
|
|
||||||
//
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
// WingStructPointer: Stores a pointer to a ustruct which is
|
|
||||||
// inside a UObject. This makes it possible to walk to a
|
|
||||||
// struct property.
|
|
||||||
//
|
|
||||||
// The Object field should be point at the containing object
|
|
||||||
// to ensure it doesn't get garbage collected.
|
|
||||||
//
|
|
||||||
// The editable flag indicates whether the struct property
|
|
||||||
// we walked into is marked CPF_Edit. If not, then the intent
|
|
||||||
// is that this struct is for viewing only.
|
|
||||||
|
|
||||||
UCLASS()
|
|
||||||
class UWingStructPointer : public UObject
|
|
||||||
{
|
|
||||||
GENERATED_BODY()
|
|
||||||
public:
|
|
||||||
UPROPERTY()
|
|
||||||
UObject* Object;
|
|
||||||
|
|
||||||
UPROPERTY()
|
|
||||||
UStruct* StructType;
|
|
||||||
|
|
||||||
void *StructBase;
|
|
||||||
|
|
||||||
bool Editable;
|
|
||||||
};
|
|
||||||
|
|
||||||
// WingPinReference: Stores the name of a UEdGraphPin which is
|
|
||||||
// inside a UEdGraphNode.
|
|
||||||
|
|
||||||
UCLASS()
|
|
||||||
class UWingPinReference : public UObject
|
|
||||||
{
|
|
||||||
GENERATED_BODY()
|
|
||||||
|
|
||||||
public:
|
|
||||||
UPROPERTY()
|
|
||||||
UEdGraphNode* Node = nullptr;
|
|
||||||
|
|
||||||
FName PinName;
|
|
||||||
};
|
|
||||||
@@ -5,8 +5,6 @@
|
|||||||
#include "Tickable.h"
|
#include "Tickable.h"
|
||||||
#include "TickableEditorObject.h"
|
#include "TickableEditorObject.h"
|
||||||
#include "Async/Future.h"
|
#include "Async/Future.h"
|
||||||
#include "Dom/JsonObject.h"
|
|
||||||
#include "WingUtils.h"
|
|
||||||
#include "WingNotifier.h"
|
#include "WingNotifier.h"
|
||||||
#include "WingLogCapture.h"
|
#include "WingLogCapture.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "WingBasics.h"
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------
|
// -----------------------------------------------------------------
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
#include "WingTypes.generated.h"
|
#include "WingTypes.generated.h"
|
||||||
|
|
||||||
|
struct FAssetData;
|
||||||
struct WingTokenizer;
|
struct WingTokenizer;
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "Dom/JsonObject.h"
|
|
||||||
#include "EdGraph/EdGraph.h"
|
#include "EdGraph/EdGraph.h"
|
||||||
#include "EdGraph/EdGraphPin.h"
|
#include "EdGraph/EdGraphPin.h"
|
||||||
#include "Materials/MaterialInstanceConstant.h"
|
|
||||||
#include "Materials/MaterialExpression.h"
|
#include "Materials/MaterialExpression.h"
|
||||||
#include "MaterialTypes.h"
|
#include "MaterialTypes.h"
|
||||||
#include "Components/ActorComponent.h"
|
#include "Components/ActorComponent.h"
|
||||||
@@ -13,31 +11,30 @@
|
|||||||
#include "Engine/Blueprint.h"
|
#include "Engine/Blueprint.h"
|
||||||
#include "K2Node_EditablePinBase.h"
|
#include "K2Node_EditablePinBase.h"
|
||||||
#include "Components/Widget.h"
|
#include "Components/Widget.h"
|
||||||
#include "WingActorComponent.h"
|
|
||||||
#include "WingVariables.h"
|
#include "WingVariables.h"
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
|
|
||||||
struct FEdGraphSchemaAction;
|
struct FEdGraphSchemaAction;
|
||||||
class UAnimationStateMachineGraph;
|
class UAnimationStateMachineGraph;
|
||||||
|
class UAnimSequence;
|
||||||
class UAnimStateNode;
|
class UAnimStateNode;
|
||||||
class UAnimStateTransitionNode;
|
class UAnimStateTransitionNode;
|
||||||
|
class UBlendSpace;
|
||||||
class IPropertyHandle;
|
class IPropertyHandle;
|
||||||
class UScriptStruct;
|
class UScriptStruct;
|
||||||
class UEnum;
|
class UEnum;
|
||||||
class IAssetEditorInstance;
|
class IAssetEditorInstance;
|
||||||
|
class UMaterial;
|
||||||
|
class UMaterialFunction;
|
||||||
|
class UMaterialInstance;
|
||||||
|
class UStaticMesh;
|
||||||
|
class USkeletalMesh;
|
||||||
|
class UTexture;
|
||||||
|
class UWorld;
|
||||||
struct FBPInterfaceDescription;
|
struct FBPInterfaceDescription;
|
||||||
struct FWingProperty;
|
struct FWingProperty;
|
||||||
class IPropertyHandle;
|
class IPropertyHandle;
|
||||||
|
|
||||||
#include "Engine/World.h"
|
|
||||||
#include "Materials/Material.h"
|
|
||||||
#include "Engine/StaticMesh.h"
|
|
||||||
#include "Engine/SkeletalMesh.h"
|
|
||||||
#include "Animation/AnimSequence.h"
|
|
||||||
#include "Animation/BlendSpace.h"
|
|
||||||
#include "Engine/Texture.h"
|
|
||||||
#include "Materials/MaterialFunction.h"
|
|
||||||
|
|
||||||
// Stateless utility functions used by MCP handlers and the MCP server.
|
// Stateless utility functions used by MCP handlers and the MCP server.
|
||||||
// This is effectively a namespace — all methods are static.
|
// This is effectively a namespace — all methods are static.
|
||||||
class WingUtils
|
class WingUtils
|
||||||
|
|||||||
@@ -2,10 +2,12 @@
|
|||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "EdGraph/EdGraphPin.h"
|
#include "EdGraph/EdGraphPin.h"
|
||||||
#include "Engine/Blueprint.h"
|
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
|
|
||||||
|
struct FBPVariableDescription;
|
||||||
struct WingTokenizer;
|
struct WingTokenizer;
|
||||||
|
class UBlueprint;
|
||||||
|
class UEdGraph;
|
||||||
class UK2Node_CustomEvent;
|
class UK2Node_CustomEvent;
|
||||||
class UK2Node_EditablePinBase;
|
class UK2Node_EditablePinBase;
|
||||||
class UK2Node_FunctionEntry;
|
class UK2Node_FunctionEntry;
|
||||||
@@ -186,4 +188,3 @@ private:
|
|||||||
|
|
||||||
bool ErrorNoBackingStore(WingOut Errors);
|
bool ErrorNoBackingStore(WingOut Errors);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "Components/Widget.h"
|
|
||||||
#include "WingBasics.h"
|
#include "WingBasics.h"
|
||||||
|
|
||||||
|
class UWidget;
|
||||||
class UWidgetTree;
|
class UWidgetTree;
|
||||||
struct FAssetData;
|
struct FAssetData;
|
||||||
|
|
||||||
|
|||||||
84
tools/clangd-diag-files.py
Normal file
84
tools/clangd-diag-files.py
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Run clangd diagnostics on an explicit list of C++ source files.
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
python3 tools/clangd-diag-files.py <file> [<file> ...]
|
||||||
|
"""
|
||||||
|
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
def find_project_root():
|
||||||
|
"""Walk up from this script's directory to find the project root."""
|
||||||
|
d = Path(__file__).resolve().parent.parent
|
||||||
|
if (d / "build.py").exists():
|
||||||
|
return d
|
||||||
|
return Path.cwd()
|
||||||
|
|
||||||
|
|
||||||
|
def run_diagnostics(root, rel_path):
|
||||||
|
"""Run clangd-query.py diagnostics on a single file. Returns output lines."""
|
||||||
|
result = subprocess.run(
|
||||||
|
[sys.executable, "tools/clangd-query.py", "diagnostics", str(rel_path)],
|
||||||
|
cwd=root,
|
||||||
|
capture_output=True,
|
||||||
|
text=True,
|
||||||
|
timeout=120,
|
||||||
|
)
|
||||||
|
output = result.stdout.strip()
|
||||||
|
if result.returncode != 0 and result.stderr.strip():
|
||||||
|
if output:
|
||||||
|
output += "\n"
|
||||||
|
output += result.stderr.strip()
|
||||||
|
return output
|
||||||
|
|
||||||
|
|
||||||
|
def normalize_path(root, raw_path):
|
||||||
|
"""Normalize a user-provided path to a project-relative path."""
|
||||||
|
path = Path(raw_path)
|
||||||
|
if path.is_absolute():
|
||||||
|
path = path.resolve().relative_to(root.resolve())
|
||||||
|
return path
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
if len(sys.argv) < 2:
|
||||||
|
print("Usage: python3 tools/clangd-diag-files.py <file> [<file> ...]", file=sys.stderr)
|
||||||
|
return 2
|
||||||
|
|
||||||
|
root = find_project_root()
|
||||||
|
files = [normalize_path(root, arg) for arg in sys.argv[1:]]
|
||||||
|
|
||||||
|
total_issues = 0
|
||||||
|
files_with_issues = 0
|
||||||
|
|
||||||
|
for i, rel_path in enumerate(files):
|
||||||
|
label = f"[{i + 1}/{len(files)}] {rel_path}"
|
||||||
|
print(f"{label} ... ", end="", flush=True)
|
||||||
|
|
||||||
|
try:
|
||||||
|
output = run_diagnostics(root, rel_path)
|
||||||
|
except subprocess.TimeoutExpired:
|
||||||
|
print("TIMEOUT")
|
||||||
|
continue
|
||||||
|
|
||||||
|
if not output or "No problems found" in output or output.strip() == "No diagnostics.":
|
||||||
|
print("ok")
|
||||||
|
continue
|
||||||
|
|
||||||
|
lines = [line for line in output.splitlines() if line.strip()]
|
||||||
|
count = len(lines)
|
||||||
|
total_issues += count
|
||||||
|
files_with_issues += 1
|
||||||
|
print(f"{count} issue(s)")
|
||||||
|
for line in lines:
|
||||||
|
print(f" {line}")
|
||||||
|
|
||||||
|
print(f"\nDone. {total_issues} issue(s) in {files_with_issues} file(s) out of {len(files)} checked.")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
Reference in New Issue
Block a user