diff --git a/Content/Testing/M_Test.uasset b/Content/Testing/M_Test.uasset index 3fb7a0b7..420ac5bb 100644 --- a/Content/Testing/M_Test.uasset +++ b/Content/Testing/M_Test.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ba018d2795620764573fdd12c9ecaf519b31c11e3c789469ecd9782a3f8d4029 -size 12291 +oid sha256:c556b7172995c348c76e164c1f818fc84f96f6be9cb9bbf20f41bf6bcddd20e7 +size 14226 diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/BlueprintExporter.cpp b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/BlueprintExporter.cpp index 2013faa6..d1247046 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/BlueprintExporter.cpp +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/BlueprintExporter.cpp @@ -11,14 +11,46 @@ #include "K2Node_CallFunction.h" #include "K2Node_FunctionEntry.h" +static FString WrapText(const FString& Text, int32 ColLimit, const FString& Prefix) +{ + FString Clean = Text; + Clean.ReplaceInline(TEXT("\r\n"), TEXT("\n")); + TArray Words; + Clean.ParseIntoArrayWS(Words); + + TStringBuilder<1024> Result; + int32 Col = 0; + for (const FString& Word : Words) + { + if (Col > 0 && Col + 1 + Word.Len() > ColLimit) + { + Result.Append(TEXT("\n")); + Col = 0; + } + if (Col == 0) + { + Result.Append(Prefix); + Col = Prefix.Len(); + } + else + { + Result.Append(TEXT(" ")); + Col += 1; + } + Result.Append(Word); + Col += Word.Len(); + } + return Result.ToString(); +} + FlxBlueprintExporter::FlxBlueprintExporter(UEdGraph* InGraph) : Graph(InGraph) { SortNodes(); - AssignNodeNames(); - EmitLocalVariables(); - EmitNodeList(); +EmitLocalVariables(); + EmitDetails(); EmitGraph(); + EmitComments(); } //////////////////////////////////////////////////////// @@ -194,20 +226,11 @@ void FlxBlueprintExporter::SortNodes() } } -void FlxBlueprintExporter::AssignNodeNames() -{ - // Node names are now computed on the fly by FormatNodeName. -} - void FlxBlueprintExporter::EmitNode(UEdGraphNode* Node) { - if (Node->IsA()) - { - Output.Appendf(TEXT("\n// %s\n"), *Node->NodeComment); - return; - } + if (Node->IsA()) return; - Output.Appendf(TEXT("\nnode %s\n"), *MCPUtils::FormatName(Node)); + Output.Appendf(TEXT("\nnode %s: %s\n"), *MCPUtils::FormatName(Node), *MCPUtils::FormatNodeTitle(Node)); // Emit input data pins. for (UEdGraphPin* Pin : FilterPins(Node, EGPD_Input)) @@ -280,14 +303,50 @@ void FlxBlueprintExporter::EmitGraph() } } -void FlxBlueprintExporter::EmitNodeList() +void FlxBlueprintExporter::EmitDetails() { for (UEdGraphNode* Node : SortedNodes) { if (Node->IsA()) continue; if (Node->IsA()) continue; if (Node->IsA()) continue; - Details.Appendf(TEXT("%s = %s\n"), - *MCPUtils::FormatName(Node), *Node->NodeGuid.ToString()); + Details.Appendf(TEXT("details %s\n"), *MCPUtils::FormatName(Node)); + Details.Appendf(TEXT(" pos %d, %d\n"), Node->NodePosX, Node->NodePosY); + } +} + +void FlxBlueprintExporter::EmitComments() +{ + for (UEdGraphNode* CommentNode : SortedNodes) + { + if (!CommentNode->IsA()) continue; + + int32 CX = CommentNode->NodePosX; + int32 CY = CommentNode->NodePosY; + int32 CW = CommentNode->NodeWidth; + int32 CH = CommentNode->NodeHeight; + + // Emit header. + Output.Append(TEXT("\ncomment:\n")); + + // Emit wrapped, indented body. + Output.Append(WrapText(CommentNode->NodeComment, 70, TEXT(" - "))); + Output.Append(TEXT("\n")); + + // Find contained nodes. + TArray ContainedNames; + for (UEdGraphNode* Node : SortedNodes) + { + if (Node->IsA()) continue; + int32 NX = Node->NodePosX; + int32 NY = Node->NodePosY; + if (NX >= CX && NY >= CY && NX <= CX + CW && NY <= CY + CH) + ContainedNames.Add(MCPUtils::FormatName(Node)); + } + + if (ContainedNames.Num() > 0) + { + Output.Appendf(TEXT(" applies to: %s\n"), *FString::Join(ContainedNames, TEXT(", "))); + } } } diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/CodingStandards.md b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/CodingStandards.md index 7e55cfd9..cb209569 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/CodingStandards.md +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/CodingStandards.md @@ -1,99 +1,45 @@ -# Your Goals -We want to do several things. I'll give you -the concise list of goals, then I'll circle back -and give you the coding standard we're trying -to achieve. - -- Convert these handlers to use plain-text output - wherever it is practical. - -- MCPAssetFinder and MCPFetcher are powerful tools - to retrieve assets and objects. We want to migrate - the code to use these over hand-rolled solutions. - -- Get rid of ad-hoc code to calculate object names, - which inevitably results in inconsistent naming. - -- To make some of these handlers process batches, - rather than single objects, where it makes sense - to do so. - -- To reduce the amount of code that's just passing - error messages around. - -- To get rid of UE_LOG calls. - -# Our Coding Standards - -This is what we're trying to achieve with these goals. - -* When searching for uassets, the tool MCPAssetFinder is - often the most precise, concise, and efficient tool. - Please study this API before starting. Using this - tool gives more reliable and more concise code than - hand-rolling code to obtain assets. - -* Class MCPFetcher can precisely and easily retrieve objects - of all different kinds using clear, specific identifiers. - It is the best tool when you need the caller to specify a - blueprint, or a graph, or a pin - you name it. It relieves - you of the burden of digging around in unreal's data - structures. It also enforces a naming consistency - across handlers. Please study this API. +* Command-handlers are classes that implement the MCPHandler + interface. The command's json parameters automatically get + injected into the handler's properties using reflection + code. Check out a few handlers to see how this works. -* To get the name of an object, there are tons of methods - you could call: pin->GetName(), pin->NodeGuid.ToString(), - node->GetTitle()... there are *so many* ways to get a - readable label. All of those ways are *NOT ALLOWED*. The - only valid way to get a name for an object is using - MCPUtils::FormatName(obj). This is to enforce consistent - naming. FormatName has been designed to produce very - clear, very readable, and highly unique identifiers. - More importantly, if one tool outputs a name, a different - tool will accept that name, because both tools use the - same naming scheme. +* Class MCPFetcher can precisely and easily retrieve objects + of all different kinds using a 'path'. Study the API + of this class, we use it everywhere. It is the best tool + when you need the caller to specify a blueprint, or a + graph, or a pin - you name it. + +* When you want to scan for a list of assets, MCPAssets + is the best tool. This wraps Unreal's asset database + in a convenient interface. Please study this API. + +* The only valid way to get a name for an object is using + MCPUtils::FormatName(obj). We don't allow the use of + pin->GetName, or node->GetTitle, or any other name-fetching + routine. Using only MCPUtils::FormatName guarantees + consistency: that means, names output by one tool can + be parsed by a different tool. * To check whether a string matches an object's name, there's only one valid way to do that as well: using - bool MCPUtils::Identifies(Name, Obj). Don't compare - the name yourself: you might get the case-sensitivity - wrong, you might forget to ignore trailing whitespace, - there are too many things that could go wrong. We've - provided MCPUtils::Identifies, which does it right - every time, for every kind of object. + bool MCPUtils::Identifies(Name, Obj). * Concise output is better. The output of these handlers will primarily be consumed by LLMs with finite context - windows. Plain-text handlers beat json handlers for - minimizing tokens: read the API for MCPHandler.h to learn - how to create a plain text handler. Avoid sending - information the caller didn't ask for. Don't echo the - command parameters: the caller knows what parameters he - sent. Don't make things unnecessarily verbose: - "type=int varname=x" can be shortened to "int x." + windows. Avoid sending information the caller didn't ask + for. Don't echo the command parameters: the caller knows + what parameters he sent. Don't make things unnecessarily + verbose: "type=int varname=x" can be shortened to "int x." Generate output in a form that *you* would want to consume. -* It's really important to send good error messages back to - the caller. Every handler has a second parameter, the - "output device", which is used to send data back to the - caller. The "output device" can either be a stringbuilder, - or a json tree. Our two core tools, MCPFetcher and - MCPAssetFinder, have powerful error handling built in: if - you give them a reference to the output device, they - will send error messages directly back to the caller - without your intervention. This is bulletproof. - Study class MCPErrorCallback to see how this works: any - function that takes MCPErrorCallback can put errors - directly into an "output device". - -* If the output device of your handler is a shared ptr - to a json tree, you might see code that passes &*Json to - an MCPErrorCallback. That's legacy: it used to be necessary - to convert the shared pointer into a regular pointer. - Now the MCPErrorCallback can accept the shared pointer - directly. +* You can pass the output StringBuilder directly into + MCPFetcher and MCPAssets. If you do, these will automatically + generate good error messages. If either of these classes + returns 'false', you don't need to generate an error + message: it's already been done. Any other routine that + accepts MCPErrorCallback can do the same. * It's good for handlers to do operations in batches, where possible. SpawnNodes is better than SpawnNode. @@ -108,10 +54,9 @@ This is what we're trying to achieve with these goals. Better to report problems via the response. Please remove UE_LOG calls in handlers. -* In addition to refactoring some handlers, we'd like you - to make some notes in a markdown file. The markdown - file should have the name UMCPHandler_XXX.Notes.md. - Tell us what you think is good about the handler, what - needs more work, and areas where you weren't entirely - confident about what to do, so you acted conservatively. - If there's more to do, we'd like to know. +* When you're going to edit something, it's important to + mark things dirty. There's a very powerful tool for that: + MCPUtils::PreEdit and MCPUtils::PostEdit, which can also + be accessed through MCPFetcher::PreEdit and PostEdit. + These routines are very careful about marking everything + dirty, so you don't have to worry about it. diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddMaterialExpression.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_AddMaterialExpression.h similarity index 99% rename from Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddMaterialExpression.h rename to Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_AddMaterialExpression.h index d2ecaf30..81d31b59 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddMaterialExpression.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_AddMaterialExpression.h @@ -17,7 +17,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_AddMaterialExpression : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ConnectMaterialExpressionPins.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_ConnectMaterialExpressionPins.h similarity index 99% rename from Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ConnectMaterialExpressionPins.h rename to Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_ConnectMaterialExpressionPins.h index 0f5a4400..87a9be9e 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ConnectMaterialExpressionPins.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_ConnectMaterialExpressionPins.h @@ -36,7 +36,7 @@ struct FConnectMaterialPinsEntry }; -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_ConnectMaterialExpressionPins : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DeleteMaterialExpression.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_DeleteMaterialExpression.h similarity index 99% rename from Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DeleteMaterialExpression.h rename to Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_DeleteMaterialExpression.h index fb0838ae..f7c9a691 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DeleteMaterialExpression.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_DeleteMaterialExpression.h @@ -16,7 +16,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_DeleteMaterialExpression : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DescribeMaterialInEnglish.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_DescribeMaterialInEnglish.h similarity index 99% rename from Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DescribeMaterialInEnglish.h rename to Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_DescribeMaterialInEnglish.h index 30b09733..e9ae2cde 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DescribeMaterialInEnglish.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_DescribeMaterialInEnglish.h @@ -30,7 +30,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_DescribeMaterialInEnglish : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DisconnectMaterialExpressionPin.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_DisconnectMaterialExpressionPin.h similarity index 98% rename from Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DisconnectMaterialExpressionPin.h rename to Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_DisconnectMaterialExpressionPin.h index 24393208..e9ac7114 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DisconnectMaterialExpressionPin.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_DisconnectMaterialExpressionPin.h @@ -19,7 +19,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_DisconnectMaterialExpressionPin : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpMaterial.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_DumpMaterial.h similarity index 99% rename from Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpMaterial.h rename to Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_DumpMaterial.h index fe3a410b..5cc89524 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpMaterial.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_DumpMaterial.h @@ -21,7 +21,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_DumpMaterial : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpMaterialFunction.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_DumpMaterialFunction.h similarity index 99% rename from Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpMaterialFunction.h rename to Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_DumpMaterialFunction.h index 857258b3..b31e3a63 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpMaterialFunction.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_DumpMaterialFunction.h @@ -29,7 +29,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_DumpMaterialFunction : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchWithinMaterials.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_SearchWithinMaterials.h similarity index 98% rename from Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchWithinMaterials.h rename to Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_SearchWithinMaterials.h index b6147328..da18ebd5 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchWithinMaterials.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_SearchWithinMaterials.h @@ -17,7 +17,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SearchWithinMaterials : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetMaterialExpressionPosition.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_SetMaterialExpressionPosition.h similarity index 99% rename from Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetMaterialExpressionPosition.h rename to Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_SetMaterialExpressionPosition.h index c624c538..0f0c254e 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetMaterialExpressionPosition.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_SetMaterialExpressionPosition.h @@ -17,7 +17,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SetMaterialExpressionPosition : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetMaterialExpressionProperty.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_SetMaterialExpressionProperty.h similarity index 99% rename from Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetMaterialExpressionProperty.h rename to Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_SetMaterialExpressionProperty.h index 8538119e..bbf936fd 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetMaterialExpressionProperty.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/Deprecated/UMCPHandler_SetMaterialExpressionProperty.h @@ -26,7 +26,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SetMaterialExpressionProperty : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddAnimStateToMachine.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddAnimStateToMachine.h index 3d53b1b2..65dfd979 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddAnimStateToMachine.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddAnimStateToMachine.h @@ -19,7 +19,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_AddAnimStateToMachine : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddAnimStateTransition.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddAnimStateTransition.h index d96d3b00..251c5252 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddAnimStateTransition.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddAnimStateTransition.h @@ -16,7 +16,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_AddAnimStateTransition : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddBlueprintComponent.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddBlueprintComponent.h index b8a71051..b7296e35 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddBlueprintComponent.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddBlueprintComponent.h @@ -16,7 +16,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_AddBlueprintComponent : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddBlueprintInterface.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddBlueprintInterface.h index a79080b7..e6d03742 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddBlueprintInterface.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddBlueprintInterface.h @@ -14,7 +14,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_AddBlueprintInterface : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddBlueprintVariable.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddBlueprintVariable.h index 44a65761..395007db 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddBlueprintVariable.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddBlueprintVariable.h @@ -13,7 +13,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_AddBlueprintVariable : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddEventDispatcher.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddEventDispatcher.h index 3d58a5d8..5252b2b3 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddEventDispatcher.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddEventDispatcher.h @@ -29,7 +29,7 @@ struct FDispatcherParamEntry FString Type; }; -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_AddEventDispatcher : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddFunctionParameter.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddFunctionParameter.h index e29ea77e..ce8ee13a 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddFunctionParameter.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddFunctionParameter.h @@ -18,7 +18,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_AddFunctionParameter : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddStructField.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddStructField.h index 2e9eacbc..999ce409 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddStructField.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_AddStructField.h @@ -13,7 +13,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_AddStructField : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_BackupAsset.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_BackupAsset.h index 000b491b..0f40f2ce 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_BackupAsset.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_BackupAsset.h @@ -13,7 +13,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_BackupAsset : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ChangeBlueprintVariableType.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ChangeBlueprintVariableType.h index b5b01326..8cc12682 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ChangeBlueprintVariableType.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ChangeBlueprintVariableType.h @@ -17,7 +17,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_ChangeBlueprintVariableType : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ChangeFunctionParameterType.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ChangeFunctionParameterType.h index 6e11f46d..e7956d51 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ChangeFunctionParameterType.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ChangeFunctionParameterType.h @@ -18,7 +18,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_ChangeFunctionParameterType : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ChangeStructNodeType.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ChangeStructNodeType.h index 7420b36a..5afe905c 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ChangeStructNodeType.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ChangeStructNodeType.h @@ -19,7 +19,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_ChangeStructNodeType : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CheckPinConnectionCompatibility.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CheckPinConnectionCompatibility.h index d044436c..3db3b7c1 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CheckPinConnectionCompatibility.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CheckPinConnectionCompatibility.h @@ -14,7 +14,7 @@ // Pre-flight check: can two pins be connected? -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_CheckPinConnectionCompatibility : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CompileBlueprint.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CompileBlueprint.h index ac5a70dc..b61fd543 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CompileBlueprint.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CompileBlueprint.h @@ -13,7 +13,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_CompileBlueprint : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CompileMaterial.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CompileMaterial.h index 2a79f8b2..cacfd8d8 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CompileMaterial.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CompileMaterial.h @@ -13,7 +13,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_CompileMaterial : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ConnectPins.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ConnectPins.h index 58bb767f..ae4a2686 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ConnectPins.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ConnectPins.h @@ -26,7 +26,7 @@ struct FConnectPinsEntry }; -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_ConnectPins : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateAnimBlueprintAsset.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateAnimBlueprintAsset.h index efe2fd5e..679af013 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateAnimBlueprintAsset.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateAnimBlueprintAsset.h @@ -16,7 +16,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_CreateAnimBlueprintAsset : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateBlendSpaceAsset.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateBlendSpaceAsset.h index 2b28bfe1..57230f39 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateBlendSpaceAsset.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateBlendSpaceAsset.h @@ -13,7 +13,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_CreateBlendSpaceAsset : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateBlueprintAsset.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateBlueprintAsset.h index e949b4e1..da9a87fc 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateBlueprintAsset.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateBlueprintAsset.h @@ -13,7 +13,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_CreateBlueprintAsset : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateBlueprintGraph.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateBlueprintGraph.h index 2b86893c..48687e17 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateBlueprintGraph.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateBlueprintGraph.h @@ -17,7 +17,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_CreateBlueprintGraph : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateEnumAsset.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateEnumAsset.h index 3fbef19d..d3e51043 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateEnumAsset.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateEnumAsset.h @@ -16,7 +16,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_CreateEnumAsset : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateMaterialAsset.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateMaterialAsset.h index bd21d7c0..c143dbe4 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateMaterialAsset.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateMaterialAsset.h @@ -16,7 +16,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_CreateMaterialAsset : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateMaterialFunctionAsset.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateMaterialFunctionAsset.h index d0339405..438fd019 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateMaterialFunctionAsset.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateMaterialFunctionAsset.h @@ -15,7 +15,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_CreateMaterialFunctionAsset : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateMaterialInstanceAsset.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateMaterialInstanceAsset.h index 8b8a04fd..42fd3b08 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateMaterialInstanceAsset.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateMaterialInstanceAsset.h @@ -17,7 +17,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_CreateMaterialInstanceAsset : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateStructAsset.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateStructAsset.h index a7a429df..74f331b0 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateStructAsset.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_CreateStructAsset.h @@ -29,7 +29,7 @@ struct FStructPropertyEntry FString Type; }; -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_CreateStructAsset : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DeleteAsset.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DeleteAsset.h index 0636ad12..1af7e9a5 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DeleteAsset.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DeleteAsset.h @@ -15,7 +15,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_DeleteAsset : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DeleteBlueprintGraph.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DeleteBlueprintGraph.h index 6ac2b242..f2ab3cef 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DeleteBlueprintGraph.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DeleteBlueprintGraph.h @@ -14,7 +14,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_DeleteBlueprintGraph : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DeleteNodeFromGraph.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DeleteNodeFromGraph.h index 68c620a3..960f7ab2 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DeleteNodeFromGraph.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DeleteNodeFromGraph.h @@ -16,7 +16,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_DeleteNodeFromGraph : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DiffTwoBlueprints.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DiffTwoBlueprints.h index 663e004b..ae6c99db 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DiffTwoBlueprints.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DiffTwoBlueprints.h @@ -15,7 +15,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_DiffTwoBlueprints : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DisconnectPins.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DisconnectPins.h index 4df06dc7..b5af6776 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DisconnectPins.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DisconnectPins.h @@ -26,7 +26,7 @@ struct FDisconnectPinEntry }; -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_DisconnectPins : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpBlueprint.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpBlueprint.h index d19657e9..3c2e5b05 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpBlueprint.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpBlueprint.h @@ -16,7 +16,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_DumpBlueprint : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpGraphs.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpGraphs.h index 823e7101..1c852367 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpGraphs.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpGraphs.h @@ -16,7 +16,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_DumpGraphs : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpMaterialInstanceParameters.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpMaterialInstanceParameters.h index cf6211f5..5d6ca259 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpMaterialInstanceParameters.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpMaterialInstanceParameters.h @@ -19,7 +19,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_DumpMaterialInstanceParameters : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpProperties.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpProperties.h index 81b7f8b4..40720d4b 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpProperties.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DumpProperties.h @@ -11,7 +11,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_DumpProperties : public UObject, public IMCPHandler { GENERATED_BODY() @@ -26,6 +26,9 @@ public: UPROPERTY(meta=(Optional, Description="Truncate values to 80 characters (default true)")) bool Truncate = true; + UPROPERTY(meta=(Optional, Description="Only show properties declared on the object's own class, not inherited ones")) + bool Local = false; + virtual FString GetDescription() const override { return TEXT("List all blueprint-visible properties on an object resolved via MCPFetcher path, " @@ -34,16 +37,12 @@ public: virtual void Handle(const FJsonObject* Json, FStringBuilderBase& Result) override { - // Resolve the path to an object. + // Resolve the path to an object and get its editable template. MCPFetcher F(Result); - UObject* Obj = F.Walk(Path).Cast(); - if (!Obj) return; - - // Get the editable template (e.g. Blueprint → CDO). - UObject* Template = MCPUtils::GetEditableTemplate(Obj, Result); + UObject* Template = F.Walk(Path).Template().Cast(); if (!Template) return; - TArray Props = MCPUtils::BlueprintVisibleProperties(Template, Query); + TArray Props = MCPUtils::SearchProperties(Template, Query, CPF_Edit, Local); UStruct* CurrentOwner = nullptr; for (FProperty* Prop : Props) @@ -63,7 +62,7 @@ public: if (Truncate && (ValueStr.Len() > 80)) ValueStr = ValueStr.Left(80) + TEXT("..."); - bool bEditable = Prop->HasAnyPropertyFlags(CPF_Edit); + bool bEditable = !Prop->HasAnyPropertyFlags(CPF_EditConst); Result.Appendf(TEXT(" %s %s %s = %s\n"), bEditable ? TEXT("editable") : TEXT("readonly"), *MCPUtils::FormatPropertyType(Prop), diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DuplicateNodesInGraph.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DuplicateNodesInGraph.h index 687d675f..3d31742b 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DuplicateNodesInGraph.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_DuplicateNodesInGraph.h @@ -16,7 +16,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_DuplicateNodesInGraph : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_FindAssetReferences.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_FindAssetReferences.h index c2dcf216..d6a7ca1d 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_FindAssetReferences.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_FindAssetReferences.h @@ -11,7 +11,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_FindAssetReferences : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_FindMaterialReferences.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_FindMaterialReferences.h index f8e23f5f..42600879 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_FindMaterialReferences.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_FindMaterialReferences.h @@ -14,7 +14,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_FindMaterialReferences : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_GetNodeComment.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_GetNodeComment.h index 4a937d28..f9c51bfc 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_GetNodeComment.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_GetNodeComment.h @@ -12,7 +12,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_GetNodeComment : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_GetPinDetails.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_GetPinDetails.h index ad2a19fa..7d543327 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_GetPinDetails.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_GetPinDetails.h @@ -16,7 +16,7 @@ // HandleGetPinInfo — detailed information about a specific pin // ============================================================ -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_GetPinDetails : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListAnimSlotNames.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListAnimSlotNames.h index af1bfb7a..ec35bada 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListAnimSlotNames.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListAnimSlotNames.h @@ -13,7 +13,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_ListAnimSlotNames : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListAnimSyncGroups.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListAnimSyncGroups.h index 5898b2e4..540c531b 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListAnimSyncGroups.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListAnimSyncGroups.h @@ -13,7 +13,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_ListAnimSyncGroups : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListBlueprintAssets.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListBlueprintAssets.h index 4ff990ad..8b608f09 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListBlueprintAssets.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListBlueprintAssets.h @@ -13,7 +13,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_ListBlueprintAssets : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListBlueprintComponents.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListBlueprintComponents.h index 88651584..c3ef943d 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListBlueprintComponents.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListBlueprintComponents.h @@ -14,7 +14,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_ListBlueprintComponents : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListBlueprintInterfaces.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListBlueprintInterfaces.h index e95a2b5d..a814ea64 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListBlueprintInterfaces.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListBlueprintInterfaces.h @@ -12,7 +12,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_ListBlueprintInterfaces : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListClassProperties.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListClassProperties.h index 45424cde..1d28ce12 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListClassProperties.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListClassProperties.h @@ -10,7 +10,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_ListClassProperties : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListEventDispatchers.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListEventDispatchers.h index 60a8fe4c..70a6b466 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListEventDispatchers.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListEventDispatchers.h @@ -17,7 +17,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_ListEventDispatchers : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListOpenAssetEditors.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListOpenAssetEditors.h index f1428682..abf8047d 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListOpenAssetEditors.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ListOpenAssetEditors.h @@ -10,7 +10,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_ListOpenAssetEditors : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_OpenAssetEditor.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_OpenAssetEditor.h index 138de601..831a6170 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_OpenAssetEditor.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_OpenAssetEditor.h @@ -11,7 +11,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_OpenAssetEditor : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RefreshAllNodesInGraph.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RefreshAllNodesInGraph.h index f2fc99a7..b5a9ee6b 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RefreshAllNodesInGraph.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RefreshAllNodesInGraph.h @@ -16,7 +16,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_RefreshAllNodesInGraph : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveAnimStateFromMachine.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveAnimStateFromMachine.h index 25b28f18..6db1a2e2 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveAnimStateFromMachine.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveAnimStateFromMachine.h @@ -16,7 +16,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_RemoveAnimStateFromMachine : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveBlueprintComponent.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveBlueprintComponent.h index 9cca83b0..6847a40a 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveBlueprintComponent.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveBlueprintComponent.h @@ -15,7 +15,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_RemoveBlueprintComponent : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveBlueprintInterface.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveBlueprintInterface.h index 306ec257..10dce80e 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveBlueprintInterface.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveBlueprintInterface.h @@ -13,7 +13,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_RemoveBlueprintInterface : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveBlueprintVariable.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveBlueprintVariable.h index b8f52913..db9d347b 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveBlueprintVariable.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveBlueprintVariable.h @@ -13,7 +13,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_RemoveBlueprintVariable : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveFunctionParameter.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveFunctionParameter.h index fca21696..fb408741 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveFunctionParameter.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveFunctionParameter.h @@ -16,7 +16,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_RemoveFunctionParameter : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveStructField.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveStructField.h index 82a9764b..a245dfcb 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveStructField.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RemoveStructField.h @@ -13,7 +13,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_RemoveStructField : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RenameAsset.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RenameAsset.h index fec260e8..ca52f9e9 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RenameAsset.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RenameAsset.h @@ -13,7 +13,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_RenameAsset : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RenameBlueprintGraph.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RenameBlueprintGraph.h index 011dc43e..d41fa400 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RenameBlueprintGraph.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RenameBlueprintGraph.h @@ -14,7 +14,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_RenameBlueprintGraph : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ReparentBlueprint.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ReparentBlueprint.h index 224786e0..a1818a20 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ReparentBlueprint.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ReparentBlueprint.h @@ -15,7 +15,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_ReparentBlueprint : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ReparentMaterialInstance.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ReparentMaterialInstance.h index 5620fb5f..7fa0fdf9 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ReparentMaterialInstance.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ReparentMaterialInstance.h @@ -14,7 +14,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_ReparentMaterialInstance : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ReplaceFunctionCallsInBlueprint.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ReplaceFunctionCallsInBlueprint.h index 03888f03..dc69bc3c 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ReplaceFunctionCallsInBlueprint.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ReplaceFunctionCallsInBlueprint.h @@ -18,7 +18,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_ReplaceFunctionCallsInBlueprint : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RestoreAsset.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RestoreAsset.h index cba3ebdc..1e160453 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RestoreAsset.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_RestoreAsset.h @@ -13,7 +13,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_RestoreAsset : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchAssets.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchAssets.h index ccf66406..1818075d 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchAssets.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchAssets.h @@ -11,7 +11,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SearchAssets : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchSpawnableNodeTypes.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchSpawnableNodeTypes.h index 7dd75b5e..4f937d2c 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchSpawnableNodeTypes.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchSpawnableNodeTypes.h @@ -13,7 +13,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SearchSpawnableNodeTypes : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchTypeUsageInBlueprints.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchTypeUsageInBlueprints.h index b7e2111d..3078bcac 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchTypeUsageInBlueprints.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchTypeUsageInBlueprints.h @@ -31,7 +31,7 @@ // HandleSearchByType — find all usages of a type across blueprints // ============================================================ -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SearchTypeUsageInBlueprints : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchUnrealClasses.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchUnrealClasses.h index 644ef454..62f615e7 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchUnrealClasses.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchUnrealClasses.h @@ -15,7 +15,7 @@ // HandleListClasses — discover available UClasses // ============================================================ -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SearchUnrealClasses : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchWithinBlueprints.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchWithinBlueprints.h index 8f320086..a9935658 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchWithinBlueprints.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SearchWithinBlueprints.h @@ -21,7 +21,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SearchWithinBlueprints : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetAnimStateAnimation.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetAnimStateAnimation.h index 8d49cbd4..becc7920 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetAnimStateAnimation.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetAnimStateAnimation.h @@ -20,7 +20,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SetAnimStateAnimation : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetAnimStateBlendSpace.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetAnimStateBlendSpace.h index 73c3c553..5386fcbd 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetAnimStateBlendSpace.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetAnimStateBlendSpace.h @@ -23,7 +23,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SetAnimStateBlendSpace : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetAnimTransitionRule.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetAnimTransitionRule.h index 1becf72f..ead24994 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetAnimTransitionRule.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetAnimTransitionRule.h @@ -15,7 +15,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SetAnimTransitionRule : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetBlendSpaceSamplePoints.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetBlendSpaceSamplePoints.h index c3c8cc5a..85649303 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetBlendSpaceSamplePoints.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetBlendSpaceSamplePoints.h @@ -29,7 +29,7 @@ struct FBlendSpaceSampleEntry float Y = 0.0f; }; -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SetBlendSpaceSamplePoints : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetBlueprintVariableMetadata.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetBlueprintVariableMetadata.h index d95420e6..96566fbe 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetBlueprintVariableMetadata.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetBlueprintVariableMetadata.h @@ -13,7 +13,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SetBlueprintVariableMetadata : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetClassDefaultValue.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetClassDefaultValue.h index e558d6fd..a6697e53 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetClassDefaultValue.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetClassDefaultValue.h @@ -15,7 +15,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SetClassDefaultValue : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetMaterialInstanceParameter.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetMaterialInstanceParameter.h index dd86e068..68989687 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetMaterialInstanceParameter.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetMaterialInstanceParameter.h @@ -19,7 +19,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SetMaterialInstanceParameter : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetMaterialProperty.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetMaterialProperty.h index 71f26117..3037b053 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetMaterialProperty.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetMaterialProperty.h @@ -13,7 +13,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SetMaterialProperty : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetNodeComment.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetNodeComment.h index a26be4af..4d8d7deb 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetNodeComment.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetNodeComment.h @@ -13,7 +13,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SetNodeComment : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetNodePositions.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetNodePositions.h index a160e476..4849fe88 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetNodePositions.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetNodePositions.h @@ -30,7 +30,7 @@ struct FMoveNodeEntry }; -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SetNodePositions : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetPinDefaultValues.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetPinDefaultValues.h index 5bc73065..67ef7d19 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetPinDefaultValues.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetPinDefaultValues.h @@ -26,7 +26,7 @@ struct FSetPinDefaultEntry }; -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SetPinDefaultValues : public UObject, public IMCPHandler { GENERATED_BODY() @@ -45,7 +45,6 @@ public: int32 SuccessCount = 0; int32 TotalCount = Pins.Array.Num(); TSet ModifiedNodes; - TSet ModifiedBlueprints; for (const TSharedPtr& PinVal : Pins.Array) { @@ -67,19 +66,13 @@ public: const UEdGraphSchema* Schema = Node->GetGraph()->GetSchema(); if (Schema) - { - FString ValidationError = Schema->IsPinDefaultValid(Pin, Entry.Value, nullptr, FText::GetEmpty()); - if (!ValidationError.IsEmpty()) - { - Result.Appendf(TEXT("error: Invalid value for %s: %s\n"), *MCPUtils::FormatName(Pin), *ValidationError); - continue; - } - } + Schema->TrySetDefaultValue(*Pin, Entry.Value); + else + Pin->DefaultValue = Entry.Value; - Pin->DefaultValue = Entry.Value; SuccessCount++; ModifiedNodes.Add(Node); - ModifiedBlueprints.Add(FBlueprintEditorUtils::FindBlueprintForNodeChecked(Node)); + F.PostEdit(); } for (UEdGraphNode* Node : ModifiedNodes) @@ -87,11 +80,6 @@ public: Node->ReconstructNode(); } - for (UBlueprint* BP : ModifiedBlueprints) - { - FBlueprintEditorUtils::MarkBlueprintAsModified(BP); - } - Result.Appendf(TEXT("Set %d/%d pin defaults.\n"), SuccessCount, TotalCount); } }; diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetProperties.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetProperties.h index 8702a163..88856ab6 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetProperties.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SetProperties.h @@ -11,7 +11,7 @@ // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SetProperties : public UObject, public IMCPHandler { GENERATED_BODY() @@ -31,13 +31,9 @@ public: virtual void Handle(const FJsonObject* Json, FStringBuilderBase& Result) override { - // Resolve the path to an object. + // Resolve the path to an object and get its editable template. MCPFetcher F(Result); - UObject* Obj = F.Walk(Path).Cast(); - if (!Obj) return; - - // Get the editable template (e.g. Blueprint → CDO). - UObject* Template = MCPUtils::GetEditableTemplate(Obj, Result); + UObject* Template = F.Walk(Path).Template().Cast(); if (!Template) return; if (!Properties.Json || Properties.Json->Values.Num() == 0) @@ -67,7 +63,7 @@ public: } // Apply all changes in a single Pre/PostEditChange bracket. - Template->PreEditChange(nullptr); + F.PreEdit(); int32 SuccessCount = 0; for (const auto& Pair : Properties.Json->Values) @@ -86,11 +82,10 @@ public: SuccessCount++; } - Template->PostEditChange(); + F.PostEdit(); // Save. - Template->MarkPackageDirty(); - bool bSaved = MCPUtils::SaveGenericPackage(Obj); + bool bSaved = MCPUtils::SaveGenericPackage(Template); Result.Appendf(TEXT("Set %d/%d properties.\n"), SuccessCount, Properties.Json->Values.Num()); if (!bSaved) diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ShowCommands.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ShowCommands.h index 8e0ee1c4..67e4d4ab 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ShowCommands.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_ShowCommands.h @@ -2,10 +2,11 @@ #include "CoreMinimal.h" #include "MCPHandler.h" +#include "MCPFetcher.h" #include "MCPUtils.h" #include "UMCPHandler_ShowCommands.generated.h" -UCLASS() +UCLASS(meta=(Group="Documentation")) class UMCPHandler_ShowCommands : public UObject, public IMCPHandler { GENERATED_BODY() @@ -22,34 +23,71 @@ public: return TEXT("List all available commands with their descriptions."); } + void EmitGroup(const FString& GroupName, const TArray& Classes, FStringBuilderBase& Result) + { + Result.Appendf(TEXT("\n=== %s ===\n\n"), *GroupName); + for (UClass* Class : Classes) + { + if (Verbose) + { + MCPUtils::FormatCommandHelp(Class, Result); + continue; + } + Result.Append(MCPUtils::GetToolName(Class)); + Result.Append(TEXT("(")); + bool bFirst = true; + for (TFieldIterator PropIt(Class, EFieldIterationFlags::None); PropIt; ++PropIt) + { + if (!bFirst) Result.Append(TEXT(",")); + bFirst = false; + if (PropIt->HasMetaData(TEXT("Optional"))) Result.Append(TEXT("?")); + Result.Append(MCPUtils::FormatPropertyType(*PropIt)); + Result.Append(TEXT(" ")); + Result.Append(MCPUtils::PropertyNameToJsonKey(PropIt->GetName())); + } + Result.Append(TEXT(")\n")); + } + } + virtual void Handle(const FJsonObject* Json, FStringBuilderBase& Result) override { FString QueryLower = Query.ToLower(); + // Group handlers by their Group metadata. + TMap> Groups; for (UClass* Class : MCPUtils::CollectHandlerClasses()) { FString ToolName = MCPUtils::GetToolName(Class); if (!ToolName.ToLower().Contains(QueryLower)) continue; - - if (Verbose) - { - MCPUtils::FormatCommandHelp(Class, Result); - } - else - { - Result.Append(MCPUtils::GetToolName(Class)); - Result.Append(TEXT("(")); - bool bFirst = true; - for (TFieldIterator PropIt(Class, EFieldIterationFlags::None); PropIt; ++PropIt) - { - if (!bFirst) Result.Append(TEXT(",")); - bFirst = false; - if (PropIt->HasMetaData(TEXT("Optional"))) Result.Append(TEXT("?")); - Result.Append(MCPUtils::PropertyNameToJsonKey(PropIt->GetName())); - } - Result.Append(TEXT(")\n")); - } + FString Group = Class->GetMetaData(TEXT("Group")); + if (Group.IsEmpty()) Group = TEXT("Unclassified"); + Groups.FindOrAdd(Group).Add(Class); } + + // Emit high-priority groups first, in order. + static const TCHAR* HighPriority[] = { TEXT("Documentation") }; + for (const TCHAR* HP : HighPriority) + { + TArray Classes; + if (Groups.RemoveAndCopyValue(HP, Classes)) + EmitGroup(HP, Classes, Result); + } + + // Emit remaining groups. + for (const auto& Pair : Groups) + EmitGroup(Pair.Key, Pair.Value, Result); + + // Append Path documentation. + Result.Append(TEXT("\n")); + Result.Append(TEXT("Some commands take a Path parameter. A Path starts with an asset\n")); + Result.Append(TEXT("package path (e.g. /Game/Widgets/WB_Hotkeys), followed by zero or\n")); + Result.Append(TEXT("more comma-separated steps that navigate into the asset:\n")); + Result.Append(TEXT("\n")); + for (const MCPFetcher::FWalker& W : MCPFetcher::GetWalkerTable()) + { + Result.Appendf(TEXT(" %s — %s\n"), W.Key, W.Description); + } + Result.Append(TEXT("\nExample: /Game/Widgets/WB_Hotkeys,graph:EventGraph,node:Self_Reference_03,pin:Result\n")); } }; diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SpawnNodes.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SpawnNodes.h index 81035ba2..1d1d1abb 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SpawnNodes.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/Handlers/UMCPHandler_SpawnNodes.h @@ -32,7 +32,7 @@ struct FSpawnNodeEntry }; -UCLASS() +UCLASS(meta=(Group="Unclassified")) class UMCPHandler_SpawnNodes : public UObject, public IMCPHandler { GENERATED_BODY() diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/MCPFetcher.cpp b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/MCPFetcher.cpp index e8cd587c..2cf74f30 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/MCPFetcher.cpp +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/MCPFetcher.cpp @@ -4,12 +4,12 @@ #include "EdGraph/EdGraph.h" #include "EdGraph/EdGraphNode.h" #include "EdGraph/EdGraphPin.h" -#include "UObject/PropertyAccessUtil.h" #include "Engine/SimpleConstructionScript.h" #include "Engine/SCS_Node.h" #include "Engine/World.h" #include "Materials/Material.h" #include "MaterialGraph/MaterialGraph.h" +#include "MaterialGraph/MaterialGraphNode.h" #include "Engine/LevelScriptBlueprint.h" MCPFetcher& MCPFetcher::SetError(const FString& Msg) @@ -31,6 +31,19 @@ MCPFetcher& MCPFetcher::TypeMismatch(const TCHAR* Walker, const TCHAR* Expected) return *this; } +const TArray& MCPFetcher::GetWalkerTable() +{ + static const TArray Table = { + { TEXT("graph"), TEXT("Find a named UEdGraph (blank name for material graphs)"), &MCPFetcher::Graph }, + { TEXT("node"), TEXT("Find a named UEdGraphNode within a graph or blueprint"), &MCPFetcher::Node }, + { TEXT("pin"), TEXT("Find a named UEdGraphPin on a node"), &MCPFetcher::Pin }, + { TEXT("component"), TEXT("Find a named component in a Blueprint's SCS"), &MCPFetcher::Component }, + { TEXT("levelblueprint"), TEXT("Get the level blueprint from a UWorld"), &MCPFetcher::LevelBlueprint }, + // { TEXT("matexp"), TEXT("Get the UMaterialExpression from a UMaterialGraphNode"), &MCPFetcher::MatExp }, + }; + return Table; +} + MCPFetcher& MCPFetcher::Walk(const FString& Path) { if (bError) return *this; @@ -53,6 +66,8 @@ MCPFetcher& MCPFetcher::Walk(const FString& Path) Start = 1; } + const TArray& Walkers = GetWalkerTable(); + // Walk each subsequent segment for (int32 i = Start; i < Segments.Num(); i++) { @@ -60,13 +75,16 @@ MCPFetcher& MCPFetcher::Walk(const FString& Path) if (!Segments[i].Split(TEXT(":"), &Key, &Value)) Key = Segments[i]; - if (StrEq(Key, TEXT("graph"))) Graph(Value); - else if (StrEq(Key, TEXT("node"))) Node(Value); - else if (StrEq(Key, TEXT("pin"))) Pin(Value); - else if (StrEq(Key, TEXT("component"))) Component(Value); - else if (StrEq(Key, TEXT("property"))) Property(Value); - else if (StrEq(Key, TEXT("levelblueprint"))) LevelBlueprint(); - else + bool bFound = false; + for (const FWalker& W : Walkers) + { + if (!StrEq(Key, W.Key)) continue; + (this->*W.Func)(Value); + bFound = true; + break; + } + + if (!bFound) { SetError(FString::Printf(TEXT("Unknown walker '%s'"), *Key)); return *this; @@ -215,30 +233,7 @@ MCPFetcher& MCPFetcher::Component(const FString& Value) return SetError(FString::Printf(TEXT("Component '%s' not found in %s"), *Value, *BP->GetName())); } -MCPFetcher& MCPFetcher::Property(const FString& Value) -{ - if (bError) return *this; - - if (!Obj) - return TypeMismatch(TEXT("property"), TEXT("UObject")); - - FProperty* Prop = Obj->GetClass()->FindPropertyByName(FName(*Value)); - if (!Prop) - return SetError(FString::Printf(TEXT("Property '%s' not found on %s"), *Value, *Obj->GetClass()->GetName())); - - FObjectProperty* ObjProp = CastField(Prop); - if (!ObjProp) - return SetError(FString::Printf(TEXT("Property '%s' is not an object property (type: %s)"), *Value, *Prop->GetCPPType())); - - UObject* PropValue = ObjProp->GetObjectPropertyValue(Prop->ContainerPtrToValuePtr(Obj)); - if (!PropValue) - return SetError(FString::Printf(TEXT("Property '%s' is null on %s"), *Value, *Obj->GetName())); - - SetObj(PropValue); - return *this; -} - -MCPFetcher& MCPFetcher::LevelBlueprint() +MCPFetcher& MCPFetcher::LevelBlueprint(const FString& Value) { if (bError) return *this; @@ -256,3 +251,36 @@ MCPFetcher& MCPFetcher::LevelBlueprint() SetObj(LevelBP); return *this; } + +MCPFetcher& MCPFetcher::Template() +{ + if (bError) return *this; + if (!Obj) + return SetError(TEXT("Template: object is null")); + + if (UBlueprint* BP = ::Cast(Obj)) + { + if (!BP->GeneratedClass) + return SetError(FString::Printf(TEXT("Blueprint '%s' has no GeneratedClass"), *Obj->GetName())); + SetObj(BP->GeneratedClass->GetDefaultObject()); + return *this; + } + + // Everything else is its own template — no navigation needed. + return *this; +} + +MCPFetcher& MCPFetcher::MatExp(const FString& Value) +{ + if (bError) return *this; + + UMaterialGraphNode* MatNode = ::Cast(Obj); + if (!MatNode) + return TypeMismatch(TEXT("matexp"), TEXT("UMaterialGraphNode")); + + if (!MatNode->MaterialExpression) + return SetError(FString::Printf(TEXT("Node '%s' has no MaterialExpression"), *MCPUtils::FormatName(MatNode))); + + SetObj(MatNode->MaterialExpression); + return *this; +} diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/MCPHandlers.cpp b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/MCPHandlers.cpp index 07ae9409..768d5df3 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/MCPHandlers.cpp +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/MCPHandlers.cpp @@ -5,7 +5,6 @@ #include "Handlers/UMCPHandler_AddBlueprintVariable.h" #include "Handlers/UMCPHandler_AddEventDispatcher.h" #include "Handlers/UMCPHandler_AddFunctionParameter.h" -#include "Handlers/UMCPHandler_AddMaterialExpression.h" #include "Handlers/UMCPHandler_AddStructField.h" #include "Handlers/UMCPHandler_BackupAsset.h" #include "Handlers/UMCPHandler_ChangeBlueprintVariableType.h" @@ -15,7 +14,6 @@ #include "Handlers/UMCPHandler_CompileBlueprint.h" #include "Handlers/UMCPHandler_CompileMaterial.h" #include "Handlers/UMCPHandler_ConnectPins.h" -#include "Handlers/UMCPHandler_ConnectMaterialExpressionPins.h" #include "Handlers/UMCPHandler_CreateAnimBlueprintAsset.h" #include "Handlers/UMCPHandler_CreateBlendSpaceAsset.h" #include "Handlers/UMCPHandler_CreateBlueprintAsset.h" @@ -27,17 +25,12 @@ #include "Handlers/UMCPHandler_CreateStructAsset.h" #include "Handlers/UMCPHandler_DeleteAsset.h" #include "Handlers/UMCPHandler_DeleteBlueprintGraph.h" -#include "Handlers/UMCPHandler_DeleteMaterialExpression.h" #include "Handlers/UMCPHandler_DeleteNodeFromGraph.h" -#include "Handlers/UMCPHandler_DescribeMaterialInEnglish.h" #include "Handlers/UMCPHandler_DiffTwoBlueprints.h" #include "Handlers/UMCPHandler_DisconnectPins.h" -#include "Handlers/UMCPHandler_DisconnectMaterialExpressionPin.h" #include "Handlers/UMCPHandler_DumpBlueprint.h" #include "Handlers/UMCPHandler_DumpProperties.h" #include "Handlers/UMCPHandler_DumpGraphs.h" -#include "Handlers/UMCPHandler_DumpMaterial.h" -#include "Handlers/UMCPHandler_DumpMaterialFunction.h" #include "Handlers/UMCPHandler_DumpMaterialInstanceParameters.h" #include "Handlers/UMCPHandler_DuplicateNodesInGraph.h" #include "Handlers/UMCPHandler_FindAssetReferences.h" @@ -71,15 +64,12 @@ #include "Handlers/UMCPHandler_SearchTypeUsageInBlueprints.h" #include "Handlers/UMCPHandler_SearchUnrealClasses.h" #include "Handlers/UMCPHandler_SearchWithinBlueprints.h" -#include "Handlers/UMCPHandler_SearchWithinMaterials.h" #include "Handlers/UMCPHandler_SetAnimStateAnimation.h" #include "Handlers/UMCPHandler_SetAnimStateBlendSpace.h" #include "Handlers/UMCPHandler_SetAnimTransitionRule.h" #include "Handlers/UMCPHandler_SetBlendSpaceSamplePoints.h" #include "Handlers/UMCPHandler_SetBlueprintVariableMetadata.h" #include "Handlers/UMCPHandler_SetClassDefaultValue.h" -#include "Handlers/UMCPHandler_SetMaterialExpressionPosition.h" -#include "Handlers/UMCPHandler_SetMaterialExpressionProperty.h" #include "Handlers/UMCPHandler_SetMaterialInstanceParameter.h" #include "Handlers/UMCPHandler_SetMaterialProperty.h" #include "Handlers/UMCPHandler_SetNodeComment.h" diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/MCPUtils.cpp b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/MCPUtils.cpp index c7866547..2a80655c 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/MCPUtils.cpp +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Private/MCPUtils.cpp @@ -125,11 +125,6 @@ void MCPUtils::SanitizeNameInPlace(FString &Name) if (Name.IsEmpty()) Name = TEXT("_"); } -void MCPUtils::AppendNumericSuffix(FString &Name, int32 N) -{ - if (N > 0) - Name += FString::Printf(TEXT("_%d"), N - 1); -} FString MCPUtils::FormatName(const UWorld *World) { @@ -155,14 +150,7 @@ FString MCPUtils::FormatName(const UEdGraph *Graph) FString MCPUtils::FormatName(const UEdGraphNode* Node) { - // Sanitized first line of the node title. - FString Title = Node->GetNodeTitle(ENodeTitleType::FullTitle).ToString(); - int32 NewlineIdx; - if (Title.FindChar(TEXT('\n'), NewlineIdx)) - Title.LeftInline(NewlineIdx); - SanitizeNameInPlace(Title); - AppendNumericSuffix(Title, Node->GetFName().GetNumber()); - return Title; + return Node->GetName(); } FString MCPUtils::FormatName(const UEdGraphPin *Pin) @@ -259,99 +247,12 @@ FString MCPUtils::FormatName(const FProperty *Prop) return Prop->GetName(); } -bool MCPUtils::Identifies(const FString &Name, const FBPVariableDescription &Var) -{ - return FormatName(Var).Equals(Name, ESearchCase::IgnoreCase); -} - -bool MCPUtils::Identifies(const FString &Name, const UStruct *Struct) -{ - return FormatName(Struct).Equals(Name, ESearchCase::IgnoreCase); -} - -bool MCPUtils::Identifies(const FString &Name, const UMaterial *Material) -{ - return FormatName(Material).Equals(Name, ESearchCase::IgnoreCase); -} - -bool MCPUtils::Identifies(const FString &Name, const UMaterialInstance *MaterialInstance) -{ - return FormatName(MaterialInstance).Equals(Name, ESearchCase::IgnoreCase); -} - -bool MCPUtils::Identifies(const FString &Name, const UMaterialFunction *MaterialFunction) -{ - return FormatName(MaterialFunction).Equals(Name, ESearchCase::IgnoreCase); -} - -bool MCPUtils::Identifies(const FString &Name, const UMaterialExpression *Expression) -{ - return FormatName(Expression).Equals(Name, ESearchCase::IgnoreCase); -} - -bool MCPUtils::Identifies(const FString &Name, const UStaticMesh *Mesh) -{ - return FormatName(Mesh).Equals(Name, ESearchCase::IgnoreCase); -} - -bool MCPUtils::Identifies(const FString &Name, const USkeletalMesh *Mesh) -{ - return FormatName(Mesh).Equals(Name, ESearchCase::IgnoreCase); -} - -bool MCPUtils::Identifies(const FString &Name, const UAnimSequence *Anim) -{ - return FormatName(Anim).Equals(Name, ESearchCase::IgnoreCase); -} - -bool MCPUtils::Identifies(const FString &Name, const UBlendSpace *BlendSpace) -{ - return FormatName(BlendSpace).Equals(Name, ESearchCase::IgnoreCase); -} - -bool MCPUtils::Identifies(const FString &Name, const UTexture *Texture) -{ - return FormatName(Texture).Equals(Name, ESearchCase::IgnoreCase); -} - -bool MCPUtils::Identifies(const FString &Name, const UScriptStruct *Struct) -{ - return FormatName(Struct).Equals(Name, ESearchCase::IgnoreCase); -} - -bool MCPUtils::Identifies(const FString &Name, const UEnum *Enum) -{ - return FormatName(Enum).Equals(Name, ESearchCase::IgnoreCase); -} - -bool MCPUtils::Identifies(const FString &Name, const FProperty *Prop) -{ - return FormatName(Prop).Equals(Name, ESearchCase::IgnoreCase); -} - // ============================================================ // Identifies // ============================================================ -bool MCPUtils::Identifies(const FString &Name, const UWorld *World) -{ - return FormatName(World).Equals(Name, ESearchCase::IgnoreCase); -} - -bool MCPUtils::Identifies(const FString &Name, const UBlueprint *BP) -{ - return FormatName(BP).Equals(Name, ESearchCase::IgnoreCase); -} - -bool MCPUtils::Identifies(const FString &Name, const UActorComponent *C) -{ - return FormatName(C).Equals(Name, ESearchCase::IgnoreCase); -} - -bool MCPUtils::Identifies(const FString &Name, const UEdGraph *Graph) -{ - return FormatName(Graph).Equals(Name, ESearchCase::IgnoreCase); -} +// Most types are handled by the template in MCPUtils.h. +// UEdGraphNode also matches by GUID: bool MCPUtils::Identifies(const FString &Name, const UEdGraphNode* Node) { @@ -360,15 +261,9 @@ bool MCPUtils::Identifies(const FString &Name, const UEdGraphNode* Node) return FormatName(Node).Equals(Name, ESearchCase::IgnoreCase); } -bool MCPUtils::Identifies(const FString &Name, const UEdGraphPin *Pin) -{ - return FormatName(Pin).Equals(Name, ESearchCase::IgnoreCase); -} - -bool MCPUtils::Identifies(const FString &Name, const FMemberReference &Ref) -{ - return FormatName(Ref).Equals(Name, ESearchCase::IgnoreCase); -} +// ============================================================ +// Formatting other things +// ============================================================ FString MCPUtils::FormatPinType(const FEdGraphPinType& PinType) { @@ -386,6 +281,14 @@ FString MCPUtils::FormatPinType(UEdGraphPin* Pin) return FormatPinType(Pin->PinType); } +FString MCPUtils::FormatNodeTitle(const UEdGraphNode *Node) +{ + FString Title = Node->GetNodeTitle(ENodeTitleType::FullTitle).ToString(); + int32 NewlineIdx; + if (Title.FindChar(TEXT('\n'), NewlineIdx)) + Title.LeftInline(NewlineIdx); + return Title; +} // ============================================================ // JSON helpers @@ -1210,6 +1113,29 @@ UMaterial* MCPUtils::ReplaceMaterialWithTransientCopy(UMaterial* Material) return Material; } +// ============================================================ +// PreEdit / PostEdit +// ============================================================ + +void MCPUtils::PreEdit(const TArray& Objects) +{ + for (UObject* Obj : Objects) + Obj->PreEditChange(nullptr); +} + +void MCPUtils::PostEdit(const TArray& Objects) +{ + for (int32 i = Objects.Num() - 1; i >= 0; --i) + { + UObject* Obj = Objects[i]; + Obj->PostEditChange(); + Obj->MarkPackageDirty(); + + if (UBlueprint* BP = Cast(Obj)) + FBlueprintEditorUtils::MarkBlueprintAsModified(BP); + } +} + bool MCPUtils::SaveMaterialPackage(UMaterial* Material) { if (!Material) return false; @@ -1761,10 +1687,10 @@ FString MCPUtils::FormatPropertyType(FProperty* Prop) } // ============================================================ -// GetEditableTemplate +// GetTemplate // ============================================================ -UObject* MCPUtils::GetEditableTemplate(UObject* Obj, MCPErrorCallback Error) +UObject* MCPUtils::GetTemplate(UObject* Obj, MCPErrorCallback Error) { if (!Obj) { @@ -1783,17 +1709,7 @@ UObject* MCPUtils::GetEditableTemplate(UObject* Obj, MCPErrorCallback Error) return BP->GeneratedClass->GetDefaultObject(); } - // These asset types are safe to edit directly. - if (Cast(Obj)) return Obj; - if (Cast(Obj)) return Obj; - if (Cast(Obj)) return Obj; - if (Cast(Obj)) return Obj; - if (Cast(Obj)) return Obj; - if (Cast(Obj)) return Obj; - - // Unknown type — refuse for safety. - Error.SetError(FString::Printf(TEXT("Object type '%s' is not supported for generic property editing"), *Obj->GetClass()->GetName())); - return nullptr; + return Obj; } // ============================================================ @@ -1856,18 +1772,20 @@ bool MCPUtils::SetPropertyValueText(UObject* Container, FProperty* Prop, const F } // ============================================================ -// BlueprintVisibleProperties +// SearchProperties // ============================================================ -TArray MCPUtils::BlueprintVisibleProperties(UObject* Obj, const FString& Query) +TArray MCPUtils::SearchProperties(UObject* Obj, const FString& Query, EPropertyFlags Flags, bool bLocal) { TArray Result; if (!Obj) return Result; - for (TFieldIterator PropIt(Obj->GetClass()); PropIt; ++PropIt) + UClass* ObjClass = Obj->GetClass(); + for (TFieldIterator PropIt(ObjClass); PropIt; ++PropIt) { FProperty* Prop = *PropIt; if (!Prop) continue; - if (!Prop->HasAnyPropertyFlags(CPF_BlueprintVisible)) continue; + if (Flags != 0 && !Prop->HasAnyPropertyFlags(Flags)) continue; + if (bLocal && Prop->GetOwnerStruct() != ObjClass) continue; if (!Query.IsEmpty() && !FormatName(Prop).Contains(Query, ESearchCase::IgnoreCase)) continue; Result.Add(Prop); diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Public/BlueprintExporter.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Public/BlueprintExporter.h index b90256ce..aa414066 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Public/BlueprintExporter.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Public/BlueprintExporter.h @@ -59,11 +59,11 @@ private: FString FormatPinSource(UEdGraphPin* Pin); void Traverse(UEdGraphNode* Node); void SortNodes(); - void AssignNodeNames(); void EmitNode(UEdGraphNode* Node); void EmitLocalVariables(); void EmitGraph(); - void EmitNodeList(); + void EmitDetails(); + void EmitComments(); //////////////////////////////////////////////////////// // diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Public/MCPFetcher.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Public/MCPFetcher.h index 8bd3b672..9cff296b 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Public/MCPFetcher.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Public/MCPFetcher.h @@ -11,17 +11,11 @@ class UEdGraphPin; // followed by zero or more comma-separated walker segments of the form // "key:value". Each segment navigates from the current object to a child. // -// Supported walkers: -// graph:Name - find a named UEdGraph within a UBlueprint -// node:Name - find a named UEdGraphNode within a UEdGraph -// pin:Name - find a named UEdGraphPin on a UEdGraphNode -// component:Name - find a named component in a Blueprint's SCS -// property:Name - follow an object-valued UProperty to its value -// levelblueprint - get the level blueprint from a UWorld +// The list of supported walkers is defined by GetWalkerTable(). // // Example paths: // /Game/Widgets/WB_Hotkeys,graph:ReadLuaConfiguration,node:Self_Reference_03,pin:Result -// /Game/Tangibles/TAN_Character,component:CharacterMesh0,property:SkeletalMeshAsset +// /Game/Tangibles/TAN_Character,component:CharacterMesh0 // // Builder-style usage: // MCPFetcher F(cb); @@ -46,13 +40,31 @@ public: MCPFetcher& Node(const FString& Value); MCPFetcher& Pin(const FString& Value); MCPFetcher& Component(const FString& Value); - MCPFetcher& Property(const FString& Value); - MCPFetcher& LevelBlueprint(); + MCPFetcher& LevelBlueprint(const FString& Value); + MCPFetcher& MatExp(const FString& Value); + + // C++-only walk step: resolve to the editable template + // (e.g. Blueprint → CDO, everything else → as-is). + MCPFetcher& Template(); // Parse string and walk multiple steps. MCPFetcher& Walk(const FString& Path); + // Walker table entry. + struct FWalker + { + const TCHAR* Key; // e.g. "graph", "node", "matexp" + const TCHAR* Description; // brief help text + MCPFetcher& (MCPFetcher::*Func)(const FString& Value); + }; + + // Returns the static table of all supported walkers. + static const TArray& GetWalkerTable(); + bool Ok() const { return !bError; } + const TArray& Visited() const { return Chain; } + void PreEdit() { MCPUtils::PreEdit(Chain); } + void PostEdit() { MCPUtils::PostEdit(Chain); } template T *Cast() { if (bError) return nullptr; @@ -63,8 +75,9 @@ public: } private: + TArray Chain; static bool StrEq(const FString& A, const TCHAR* B) { return A.Equals(B, ESearchCase::IgnoreCase); } - void SetObj(UObject* InObj) { Obj = InObj; ResultPin = nullptr; } + void SetObj(UObject* InObj) { if (InObj) Chain.AddUnique(InObj); Obj = InObj; ResultPin = nullptr; } void SetPin(UEdGraphPin* InPin) { ResultPin = InPin; Obj = nullptr; } MCPFetcher& SetError(const FString& Msg); MCPFetcher& TypeMismatch(const TCHAR* Walker, const TCHAR* Expected); diff --git a/Plugins/BlueprintMCP/Source/BlueprintMCP/Public/MCPUtils.h b/Plugins/BlueprintMCP/Source/BlueprintMCP/Public/MCPUtils.h index cc4321dc..d75c5f87 100644 --- a/Plugins/BlueprintMCP/Source/BlueprintMCP/Public/MCPUtils.h +++ b/Plugins/BlueprintMCP/Source/BlueprintMCP/Public/MCPUtils.h @@ -148,32 +148,20 @@ public: // //////////////////////////////////////////////////////// - static bool Identifies(const FString &Name, const UWorld *World); - static bool Identifies(const FString &Name, const UBlueprint *BP); - static bool Identifies(const FString &Name, const UActorComponent *C); - static bool Identifies(const FString &Name, const UEdGraph *Graph); + template + static bool Identifies(const FString &Name, T&& Obj) + { + return FormatName(std::forward(Obj)).Equals(Name, ESearchCase::IgnoreCase); + } + + // UEdGraphNode also matches by GUID. static bool Identifies(const FString &Name, const UEdGraphNode* Node); - static bool Identifies(const FString &Name, const UEdGraphPin *Pin); - static bool Identifies(const FString &Name, const FMemberReference &Ref); - static bool Identifies(const FString &Name, const FBPVariableDescription &Var); - static bool Identifies(const FString &Name, const UStruct *Struct); - static bool Identifies(const FString &Name, const UMaterial *Material); - static bool Identifies(const FString &Name, const UMaterialInstance *MaterialInstance); - static bool Identifies(const FString &Name, const UMaterialFunction *MaterialFunction); - static bool Identifies(const FString &Name, const UMaterialExpression *Expression); - static bool Identifies(const FString &Name, const UStaticMesh *Mesh); - static bool Identifies(const FString &Name, const USkeletalMesh *Mesh); - static bool Identifies(const FString &Name, const UAnimSequence *Anim); - static bool Identifies(const FString &Name, const UBlendSpace *BlendSpace); - static bool Identifies(const FString &Name, const UTexture *Texture); - static bool Identifies(const FString &Name, const UScriptStruct *Struct); - static bool Identifies(const FString &Name, const UEnum *Enum); - static bool Identifies(const FString &Name, const FProperty *Prop); //////////////////////////////////////////////////////// static FString FormatPinType(const FEdGraphPinType& PinType); static FString FormatPinType(UEdGraphPin* Pin); + static FString FormatNodeTitle(const UEdGraphNode *Node); // ----- Asset path helpers ----- // Splits "/Game/Foo/Bar" into PackagePath="/Game/Foo" and AssetName="Bar". @@ -282,12 +270,19 @@ public: static FString ActionFullName(const TSharedPtr& Action); static TArray> SearchGraphActions(UEdGraph* Graph, const FString& Query, int32 MaxResults = 0, bool ExactMatch = false); + // ----- Pre/Post edit ----- + // Call before and after modifying objects. Walks the list looking for + // known parent types (UMaterial, UBlueprint, etc.) and issues the + // appropriate notifications. + static void PreEdit(const TArray& Objects); + static void PostEdit(const TArray& Objects); + // ----- Editable template ----- // Given an object, returns the appropriate template object for generic // property editing, or nullptr if the type isn't whitelisted. // UBlueprint → CDO; UMaterial, UActorComponent, etc. → as-is. - static UObject* GetEditableTemplate(UObject* Obj, MCPErrorCallback Error); - static TArray BlueprintVisibleProperties(UObject* Obj, const FString& Query = FString()); + static UObject* GetTemplate(UObject* Obj, MCPErrorCallback Error); + static TArray SearchProperties(UObject* Obj, const FString& Query, EPropertyFlags Flags, bool bLocal); static FProperty* FindPropertyByName(UObject* Obj, const FString& Name, MCPErrorCallback Error = nullptr); static FString GetPropertyValueText(UObject* Container, FProperty* Prop); diff --git a/luprex/ext/eris-master/src/eris.c b/luprex/ext/eris-master/src/eris.c index e153f8c7..2a501a7d 100644 --- a/luprex/ext/eris-master/src/eris.c +++ b/luprex/ext/eris-master/src/eris.c @@ -1720,7 +1720,6 @@ p_thread(Info *info) { /* ... thread */ /* Write general information. */ WRITE_VALUE(thread->status, uint8_t); - WRITE_VALUE(thread->nextid, uint64_t); WRITE_VALUE(eris_savestackidx(thread, eris_restorestack(thread, thread->errfunc)), size_t); /* These are only used while a thread is being executed or can be deduced: @@ -1887,7 +1886,6 @@ u_thread(Info *info) { /* ... */ /* Read general information. */ thread->status = READ_VALUE(uint8_t); - thread->nextid = READ_VALUE(uint64_t); thread->errfunc = eris_savestack(thread, eris_restorestackidx(thread, READ_VALUE(size_t))); if (thread->errfunc) { diff --git a/luprex/ext/eris-master/src/lstate.c b/luprex/ext/eris-master/src/lstate.c index 2fe6c503..3ecae527 100644 --- a/luprex/ext/eris-master/src/lstate.c +++ b/luprex/ext/eris-master/src/lstate.c @@ -206,7 +206,6 @@ static void preinit_state (lua_State *L, global_State *g) { L->nny = 1; L->status = LUA_OK; L->errfunc = 0; - L->nextid = 0; } diff --git a/tools/mcp-bridge.py b/tools/mcp-bridge.py index bd17f986..387fba09 100644 --- a/tools/mcp-bridge.py +++ b/tools/mcp-bridge.py @@ -20,7 +20,7 @@ TOOL_DESCRIPTION = ( "Send a command to the Unreal Editor's BlueprintMCP plugin. " "The 'command' field specifies which operation to perform; " "additional fields are command-specific parameters. " - 'Use {"command": "show_commands"} to list available commands. ' + 'Use {"command": "ShowCommands"} to list available commands. ' "If the editor is not running, the call will return an error; " "just ask the user to start the editor and try again." )