mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-19 12:23:14 +08:00
Make struct node
This commit is contained in:
@@ -498,6 +498,30 @@ const tests = [
|
||||
delegate: false,
|
||||
development: false,
|
||||
},
|
||||
{
|
||||
name: "Make Some_§-AStruct",
|
||||
value: String.raw`
|
||||
Begin Object Class=/Script/BlueprintGraph.K2Node_MakeStruct Name="K2Node_MakeStruct_1" ExportPath=/Script/BlueprintGraph.K2Node_MakeStruct'"/Temp/Untitled_1.Untitled_1:PersistentLevel.Untitled.EventGraph.K2Node_MakeStruct_1"'
|
||||
"bMadeAfterOverridePinRemoval"=True
|
||||
"ShowPinForProperties"(0)=(PropertyName="FirstVariable_1_13DD7A0E491E619509C7408F7D8C4071",PropertyFriendlyName="First.Variable",bShowPin=True,bCanToggleVisibility=True)
|
||||
"ShowPinForProperties"(1)=(PropertyName="Second-Variable_5_B897B051478F270D20FF29B3BC3B5A8C",PropertyFriendlyName="Second-Variable",bShowPin=True,bCanToggleVisibility=True)
|
||||
"StructType"=/Script/Engine.UserDefinedStruct'"/Game/StarterContent/Blueprints/Some_§-AStruct.Some_§-AStruct"'
|
||||
"NodePosX"=384
|
||||
"NodePosY"=144
|
||||
"NodeGuid"=118962B441E9282349A21EA43ADEE816
|
||||
CustomProperties Pin (PinId=3DD8E64049B1CD7AF21517B9C9C0E52E,PinName="Some_§-AStruct",Direction="EGPD_Output",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/Engine.UserDefinedStruct'"/Game/StarterContent/Blueprints/Some_§-AStruct.Some_§-AStruct"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
|
||||
CustomProperties Pin (PinId=97BAE50C41A8924F13A6E9B6EB9F83C8,PinName="FirstVariable_1_13DD7A0E491E619509C7408F7D8C4071",PinFriendlyName="First.Variable",PinToolTip="First. Variable\nBoolean",PinType.PinCategory="bool",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="False",AutogeneratedDefaultValue="False",PersistentGuid=13DD7A0E491E619509C7408F7D8C4071,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
|
||||
CustomProperties Pin (PinId=94B8DE014A527EBDC91E48A6E95D8D2E,PinName="Second-Variable_5_B897B051478F270D20FF29B3BC3B5A8C",PinFriendlyName="Second-Variable",PinToolTip="Second- Variable\nArray of Transforms",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.ScriptStruct'"/Script/CoreUObject.Transform"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=Array,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=B897B051478F270D20FF29B3BC3B5A8C,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=True,bAdvancedView=False,bOrphanedPin=False,)
|
||||
End Object
|
||||
`,
|
||||
size: [17.5, 6],
|
||||
color: Configuration.nodeColors.darkBlue,
|
||||
icon: SVGIcon.makeStruct,
|
||||
pins: 3,
|
||||
pinNames: ["First.Variable", "Second-Variable", "Some_§-AStruct"],
|
||||
delegate: false,
|
||||
development: false,
|
||||
},
|
||||
]
|
||||
|
||||
generateNodeTests(tests)
|
||||
|
||||
@@ -83,7 +83,7 @@ function generateNodeTest(nodeTest, getBlueprint) {
|
||||
it("Maintains the order of attributes", () => {
|
||||
getBlueprint().selectAll()
|
||||
const value = getBlueprint().template.getCopyInputObject().getSerializedText()
|
||||
const words = value.split("\n").map(row => row.match(/\s*(\w+(\s+\w+)*).+/)?.[1]).filter(v => v?.length > 0)
|
||||
const words = value.split("\n").map(row => row.match(/\s*("?\w+(\s+\w+)*).+/)?.[1]).filter(v => v?.length > 0)
|
||||
expect(value).to.match(getFirstWordOrder(words))
|
||||
})
|
||||
if (nodeTest.additionalTest) {
|
||||
|
||||
Reference in New Issue
Block a user