Grid Size node title

This commit is contained in:
barsdeveloper
2023-09-25 00:02:38 +02:00
parent 25a445ec0e
commit 354944d5c6
5 changed files with 27 additions and 5 deletions

13
dist/ueblueprint.js vendored
View File

@@ -184,6 +184,7 @@ class Configuration {
pcgEditorGraphNode: "/Script/PCGEditor.PCGEditorGraphNode",
pcgEditorGraphNodeInput:"/Script/PCGEditor.PCGEditorGraphNodeInput",
pcgEditorGraphNodeOutput:"/Script/PCGEditor.PCGEditorGraphNodeOutput",
pcgHiGenGridSizeSettings: "/Script/PCG.PCGHiGenGridSizeSettings",
pcgSubgraphSettings: "/Script/PCG.PCGSubgraphSettings",
promotableOperator: "/Script/BlueprintGraph.K2Node_PromotableOperator",
reverseForEachLoop: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ReverseForEachLoop",
@@ -1154,7 +1155,7 @@ class IEntity extends Serializable {
let attribute = attributes[attributeName];
if (!suppressWarns && value !== undefined) {
if (!(attributeName in attributes)) {
if (!(attributeName in attributes) && !attributeName.startsWith("#SubObject")) {
const typeName = value instanceof Array ? `[${value[0]?.constructor.name}]` : value.constructor.name;
console.warn(
`UEBlueprint: Attribute ${attributeName} (of type ${typeName}) in the serialized data is not `
@@ -3874,6 +3875,9 @@ class ObjectEntity extends IEntity {
PCGNode: {
type: ObjectReferenceEntity,
},
HiGenGridSize: {
type: SymbolEntity,
},
Operation: {
type: SymbolEntity,
},
@@ -4137,6 +4141,7 @@ class ObjectEntity extends IEntity {
/** @type {MirroredEntity} */ this.PositionX;
/** @type {MirroredEntity} */ this.PositionY;
/** @type {ObjectReferenceEntity} */ this.PCGNode;
/** @type {SymbolEntity} */ this.HiGenGridSize;
/** @type {String} */ this.Operation;
/** @type {IntegerEntity} */ this.NodePosX;
/** @type {IntegerEntity} */ this.NodePosY;
@@ -4540,6 +4545,12 @@ class ObjectEntity extends IEntity {
}
const settingsObject = this.getSettingsObject();
if (settingsObject) {
if (settingsObject.ExportPath.type === Configuration.paths.pcgHiGenGridSizeSettings) {
return `Grid Size: ${(
settingsObject.HiGenGridSize?.toString().match(/\d+/)?.[0]?.concat("00")
?? settingsObject.HiGenGridSize?.toString().match(/^\w+$/)?.[0]
) ?? "256"}`
}
if (settingsObject.BlueprintElementInstance) {
return Utility.formatStringName(settingsObject.BlueprintElementType.getName())
}

File diff suppressed because one or more lines are too long

View File

@@ -160,6 +160,7 @@ export default class Configuration {
pcgEditorGraphNode: "/Script/PCGEditor.PCGEditorGraphNode",
pcgEditorGraphNodeInput:"/Script/PCGEditor.PCGEditorGraphNodeInput",
pcgEditorGraphNodeOutput:"/Script/PCGEditor.PCGEditorGraphNodeOutput",
pcgHiGenGridSizeSettings: "/Script/PCG.PCGHiGenGridSizeSettings",
pcgSubgraphSettings: "/Script/PCG.PCGSubgraphSettings",
promotableOperator: "/Script/BlueprintGraph.K2Node_PromotableOperator",
reverseForEachLoop: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ReverseForEachLoop",

View File

@@ -61,7 +61,7 @@ export default class IEntity extends Serializable {
let attribute = attributes[attributeName]
if (!suppressWarns && value !== undefined) {
if (!(attributeName in attributes)) {
if (!(attributeName in attributes) && !attributeName.startsWith("#SubObject")) {
const typeName = value instanceof Array ? `[${value[0]?.constructor.name}]` : value.constructor.name
console.warn(
`UEBlueprint: Attribute ${attributeName} (of type ${typeName}) in the serialized data is not `

View File

@@ -239,6 +239,9 @@ export default class ObjectEntity extends IEntity {
PCGNode: {
type: ObjectReferenceEntity,
},
HiGenGridSize: {
type: SymbolEntity,
},
Operation: {
type: SymbolEntity,
},
@@ -502,6 +505,7 @@ export default class ObjectEntity extends IEntity {
/** @type {MirroredEntity} */ this.PositionX
/** @type {MirroredEntity} */ this.PositionY
/** @type {ObjectReferenceEntity} */ this.PCGNode
/** @type {SymbolEntity} */ this.HiGenGridSize
/** @type {String} */ this.Operation
/** @type {IntegerEntity} */ this.NodePosX
/** @type {IntegerEntity} */ this.NodePosY
@@ -905,6 +909,12 @@ export default class ObjectEntity extends IEntity {
}
const settingsObject = this.getSettingsObject()
if (settingsObject) {
if (settingsObject.ExportPath.type === Configuration.paths.pcgHiGenGridSizeSettings) {
return `Grid Size: ${(
settingsObject.HiGenGridSize?.toString().match(/\d+/)?.[0]?.concat("00")
?? settingsObject.HiGenGridSize?.toString().match(/^\w+$/)?.[0]
) ?? "256"}`
}
if (settingsObject.BlueprintElementInstance) {
return Utility.formatStringName(settingsObject.BlueprintElementType.getName())
}