Smaller details

This commit is contained in:
barsdeveloper
2023-09-26 21:00:34 +02:00
parent 354944d5c6
commit 71e7c12675
4 changed files with 39 additions and 19 deletions

26
dist/ueblueprint.js vendored
View File

@@ -76,13 +76,20 @@ class Configuration {
static linkCurveWidth = 80 // px static linkCurveWidth = 80 // px
static linkMinWidth = 100 // px static linkMinWidth = 100 // px
static nameRegexSpaceReplacement = new RegExp( static nameRegexSpaceReplacement = new RegExp(
// Leading K2_ or K2Node_
"^K2(?:[Nn]ode)?_" "^K2(?:[Nn]ode)?_"
// ("Alpha2", "AlphaBravo") => ("Alpha 2", "Alpha Bravo") // End of a word (lower case followed by either upper case or number)
+ "|(?<=[a-z])(?=[A-Z0-9])" + "|(?<=[a-z])(?=[A-Z0-9])"
// ("ALPHABravo", "ALPHA2", "BTTask_", "UVs", UVser) => ("ALPHA Bravo", "ALPHA 2", "BTTask", "UVs", "U Vser") // End of upper case work (upper case followed by either word or number)
+ "|(?<=[A-Z](?<!(?<![a-zA-Z])U(?=Vs(?![a-z]))))(?=[A-Z][a-z](?![a-z]+_)|[0-9])" + "|(?<=[A-Z])"
// ("3Times", "3D", "3Delta") => ("3 Times", "3D", "3 Delta") + /* Except "UVs" */ "(?<!U(?=Vs(?![a-z])))"
+ "|(?<=[014-9]|[23](?!D(?:[^a-z]|$)))(?=[a-zA-Z])" + /* Except V3 */ "(?<!V(?=3(?![0-9])))"
+ /* Except T2d */ "(?<!T(?=2d(?![a-z])))"
+ "(?=[A-Z][a-z]|[0-9])"
// Number followed by a letter
+ "|(?<=[0-9])"
+ /* Except 2D 3D */ "(?<![23](?=[dD](?![a-z])))"
+ "(?=[a-zA-Z])"
// "Alpha__Bravo" => "Alpha Bravo" // "Alpha__Bravo" => "Alpha Bravo"
+ "|\\s*_+\\s*" + "|\\s*_+\\s*"
+ "|\\s{2,}", + "|\\s{2,}",
@@ -109,6 +116,7 @@ class Configuration {
static nodeRadius = 8 // px static nodeRadius = 8 // px
static nodeReflowEventName = "ueb-node-reflow" static nodeReflowEventName = "ueb-node-reflow"
static paths = { static paths = {
actorBoundEvent: "/Script/BlueprintGraph.K2Node_ActorBoundEvent",
addDelegate: "/Script/BlueprintGraph.K2Node_AddDelegate", addDelegate: "/Script/BlueprintGraph.K2Node_AddDelegate",
ambientSound: "/Script/Engine.AmbientSound", ambientSound: "/Script/Engine.AmbientSound",
asyncAction: "/Script/BlueprintGraph.K2Node_AsyncAction", asyncAction: "/Script/BlueprintGraph.K2Node_AsyncAction",
@@ -182,8 +190,8 @@ class Configuration {
multiGate: "/Script/BlueprintGraph.K2Node_MultiGate", multiGate: "/Script/BlueprintGraph.K2Node_MultiGate",
pawn: "/Script/Engine.Pawn", pawn: "/Script/Engine.Pawn",
pcgEditorGraphNode: "/Script/PCGEditor.PCGEditorGraphNode", pcgEditorGraphNode: "/Script/PCGEditor.PCGEditorGraphNode",
pcgEditorGraphNodeInput:"/Script/PCGEditor.PCGEditorGraphNodeInput", pcgEditorGraphNodeInput: "/Script/PCGEditor.PCGEditorGraphNodeInput",
pcgEditorGraphNodeOutput:"/Script/PCGEditor.PCGEditorGraphNodeOutput", pcgEditorGraphNodeOutput: "/Script/PCGEditor.PCGEditorGraphNodeOutput",
pcgHiGenGridSizeSettings: "/Script/PCG.PCGHiGenGridSizeSettings", pcgHiGenGridSizeSettings: "/Script/PCG.PCGHiGenGridSizeSettings",
pcgSubgraphSettings: "/Script/PCG.PCGSubgraphSettings", pcgSubgraphSettings: "/Script/PCG.PCGSubgraphSettings",
promotableOperator: "/Script/BlueprintGraph.K2Node_PromotableOperator", promotableOperator: "/Script/BlueprintGraph.K2Node_PromotableOperator",
@@ -4329,6 +4337,7 @@ class ObjectEntity extends IEntity {
isEvent() { isEvent() {
switch (this.getClass()) { switch (this.getClass()) {
case Configuration.paths.actorBoundEvent:
case Configuration.paths.componentBoundEvent: case Configuration.paths.componentBoundEvent:
case Configuration.paths.customEvent: case Configuration.paths.customEvent:
case Configuration.paths.event: case Configuration.paths.event:
@@ -4411,8 +4420,9 @@ class ObjectEntity extends IEntity {
if (this.ProxyFactoryFunctionName) { if (this.ProxyFactoryFunctionName) {
return Utility.formatStringName(this.ProxyFactoryFunctionName) return Utility.formatStringName(this.ProxyFactoryFunctionName)
} }
case Configuration.paths.actorBoundEvent:
case Configuration.paths.componentBoundEvent: case Configuration.paths.componentBoundEvent:
return `${Utility.formatStringName(this.DelegatePropertyName)} (${this.ComponentPropertyName})` return `${Utility.formatStringName(this.DelegatePropertyName)} (${this.ComponentPropertyName ?? "Unknown"})`
case Configuration.paths.createDelegate: case Configuration.paths.createDelegate:
return "Create Event" return "Create Event"
case Configuration.paths.customEvent: case Configuration.paths.customEvent:

File diff suppressed because one or more lines are too long

View File

@@ -52,13 +52,20 @@ export default class Configuration {
static linkCurveWidth = 80 // px static linkCurveWidth = 80 // px
static linkMinWidth = 100 // px static linkMinWidth = 100 // px
static nameRegexSpaceReplacement = new RegExp( static nameRegexSpaceReplacement = new RegExp(
// Leading K2_ or K2Node_
"^K2(?:[Nn]ode)?_" "^K2(?:[Nn]ode)?_"
// ("Alpha2", "AlphaBravo") => ("Alpha 2", "Alpha Bravo") // End of a word (lower case followed by either upper case or number)
+ "|(?<=[a-z])(?=[A-Z0-9])" + "|(?<=[a-z])(?=[A-Z0-9])"
// ("ALPHABravo", "ALPHA2", "BTTask_", "UVs", UVser) => ("ALPHA Bravo", "ALPHA 2", "BTTask", "UVs", "U Vser") // End of upper case work (upper case followed by either word or number)
+ "|(?<=[A-Z](?<!(?<![a-zA-Z])U(?=Vs(?![a-z]))))(?=[A-Z][a-z](?![a-z]+_)|[0-9])" + "|(?<=[A-Z])"
// ("3Times", "3D", "3Delta") => ("3 Times", "3D", "3 Delta") + /* Except "UVs" */ "(?<!U(?=Vs(?![a-z])))"
+ "|(?<=[014-9]|[23](?!D(?:[^a-z]|$)))(?=[a-zA-Z])" + /* Except V3 */ "(?<!V(?=3(?![0-9])))"
+ /* Except T2d */ "(?<!T(?=2d(?![a-z])))"
+ "(?=[A-Z][a-z]|[0-9])"
// Number followed by a letter
+ "|(?<=[0-9])"
+ /* Except 2D 3D */ "(?<![23](?=[dD](?![a-z])))"
+ "(?=[a-zA-Z])"
// "Alpha__Bravo" => "Alpha Bravo" // "Alpha__Bravo" => "Alpha Bravo"
+ "|\\s*_+\\s*" + "|\\s*_+\\s*"
+ "|\\s{2,}", + "|\\s{2,}",
@@ -85,6 +92,7 @@ export default class Configuration {
static nodeRadius = 8 // px static nodeRadius = 8 // px
static nodeReflowEventName = "ueb-node-reflow" static nodeReflowEventName = "ueb-node-reflow"
static paths = { static paths = {
actorBoundEvent: "/Script/BlueprintGraph.K2Node_ActorBoundEvent",
addDelegate: "/Script/BlueprintGraph.K2Node_AddDelegate", addDelegate: "/Script/BlueprintGraph.K2Node_AddDelegate",
ambientSound: "/Script/Engine.AmbientSound", ambientSound: "/Script/Engine.AmbientSound",
asyncAction: "/Script/BlueprintGraph.K2Node_AsyncAction", asyncAction: "/Script/BlueprintGraph.K2Node_AsyncAction",
@@ -158,8 +166,8 @@ export default class Configuration {
multiGate: "/Script/BlueprintGraph.K2Node_MultiGate", multiGate: "/Script/BlueprintGraph.K2Node_MultiGate",
pawn: "/Script/Engine.Pawn", pawn: "/Script/Engine.Pawn",
pcgEditorGraphNode: "/Script/PCGEditor.PCGEditorGraphNode", pcgEditorGraphNode: "/Script/PCGEditor.PCGEditorGraphNode",
pcgEditorGraphNodeInput:"/Script/PCGEditor.PCGEditorGraphNodeInput", pcgEditorGraphNodeInput: "/Script/PCGEditor.PCGEditorGraphNodeInput",
pcgEditorGraphNodeOutput:"/Script/PCGEditor.PCGEditorGraphNodeOutput", pcgEditorGraphNodeOutput: "/Script/PCGEditor.PCGEditorGraphNodeOutput",
pcgHiGenGridSizeSettings: "/Script/PCG.PCGHiGenGridSizeSettings", pcgHiGenGridSizeSettings: "/Script/PCG.PCGHiGenGridSizeSettings",
pcgSubgraphSettings: "/Script/PCG.PCGSubgraphSettings", pcgSubgraphSettings: "/Script/PCG.PCGSubgraphSettings",
promotableOperator: "/Script/BlueprintGraph.K2Node_PromotableOperator", promotableOperator: "/Script/BlueprintGraph.K2Node_PromotableOperator",

View File

@@ -693,6 +693,7 @@ export default class ObjectEntity extends IEntity {
isEvent() { isEvent() {
switch (this.getClass()) { switch (this.getClass()) {
case Configuration.paths.actorBoundEvent:
case Configuration.paths.componentBoundEvent: case Configuration.paths.componentBoundEvent:
case Configuration.paths.customEvent: case Configuration.paths.customEvent:
case Configuration.paths.event: case Configuration.paths.event:
@@ -775,8 +776,9 @@ export default class ObjectEntity extends IEntity {
if (this.ProxyFactoryFunctionName) { if (this.ProxyFactoryFunctionName) {
return Utility.formatStringName(this.ProxyFactoryFunctionName) return Utility.formatStringName(this.ProxyFactoryFunctionName)
} }
case Configuration.paths.actorBoundEvent:
case Configuration.paths.componentBoundEvent: case Configuration.paths.componentBoundEvent:
return `${Utility.formatStringName(this.DelegatePropertyName)} (${this.ComponentPropertyName})` return `${Utility.formatStringName(this.DelegatePropertyName)} (${this.ComponentPropertyName ?? "Unknown"})`
case Configuration.paths.createDelegate: case Configuration.paths.createDelegate:
return "Create Event" return "Create Event"
case Configuration.paths.customEvent: case Configuration.paths.customEvent: