mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-24 07:44:42 +08:00
New node types and smaller fixes
This commit is contained in:
@@ -8,6 +8,7 @@ import { css } from "lit"
|
||||
export default class Configuration {
|
||||
static nodeColors = {
|
||||
blue: css`84, 122, 156`,
|
||||
darkBlue: css`19, 100, 137`,
|
||||
gray: css`150,150,150`,
|
||||
green: css`95, 129, 90`,
|
||||
lime: css`150, 160, 30`,
|
||||
@@ -55,10 +56,14 @@ export default class Configuration {
|
||||
static linkMinWidth = 100 // px
|
||||
static nameRegexSpaceReplacement = new RegExp(
|
||||
"^K2(?:[Nn]ode)?_"
|
||||
+ "|(?<=[a-z])(?=[A-Z0-9])" // ("Alpha2", "AlphaBravo") => ("Alpha 2", "Alpha Bravo")
|
||||
+ "|(?<=[A-Z])(?=[A-Z][a-z](?![a-z]+_)|[0-9])" // ("ALPHABravo", "ALPHA2", "BTTask_") => ("ALPHA Bravo", "ALPHA 2", "BTTask")
|
||||
+ "|(?<=[014-9]|[23](?!D(?:[^a-z]|$)))(?=[a-zA-Z])" // ("3Times", "3D", "3Delta") => ("3 Times", "3D", "3 Delta")
|
||||
+ "|\\s*_+\\s*" // "Alpha__Bravo" => "Alpha Bravo"
|
||||
// ("Alpha2", "AlphaBravo") => ("Alpha 2", "Alpha Bravo")
|
||||
+ "|(?<=[a-z])(?=[A-Z0-9])"
|
||||
// ("ALPHABravo", "ALPHA2", "BTTask_", "UVs", UVser) => ("ALPHA Bravo", "ALPHA 2", "BTTask", "UVs", "U Vser")
|
||||
+ "|(?<=[A-Z](?<!(?<![a-zA-Z])U(?=Vs(?![a-z]))))(?=[A-Z][a-z](?![a-z]+_)|[0-9])"
|
||||
// ("3Times", "3D", "3Delta") => ("3 Times", "3D", "3 Delta")
|
||||
+ "|(?<=[014-9]|[23](?!D(?:[^a-z]|$)))(?=[a-zA-Z])"
|
||||
// "Alpha__Bravo" => "Alpha Bravo"
|
||||
+ "|\\s*_+\\s*"
|
||||
+ "|\\s{2,}",
|
||||
"g"
|
||||
)
|
||||
@@ -141,6 +146,7 @@ export default class Configuration {
|
||||
materialExpressionLogarithm2: "/Script/Engine.MaterialExpressionLogarithm2",
|
||||
materialExpressionSquareRoot: "/Script/Engine.MaterialExpressionSquareRoot",
|
||||
materialExpressionTextureCoordinate: "/Script/Engine.MaterialExpressionTextureCoordinate",
|
||||
materialExpressionTextureSample: "/Script/Engine.MaterialExpressionTextureSample",
|
||||
materialGraphNode: "/Script/UnrealEd.MaterialGraphNode",
|
||||
materialGraphNodeComment: "/Script/UnrealEd.MaterialGraphNode_Comment",
|
||||
multiGate: "/Script/BlueprintGraph.K2Node_MultiGate",
|
||||
|
||||
@@ -704,6 +704,8 @@ export default class ObjectEntity extends IEntity {
|
||||
case Configuration.paths.materialExpressionConstant3Vector:
|
||||
case Configuration.paths.materialExpressionConstant4Vector:
|
||||
return Configuration.nodeColors.yellow
|
||||
case Configuration.paths.materialExpressionTextureSample:
|
||||
return Configuration.nodeColors.darkBlue
|
||||
case Configuration.paths.materialExpressionTextureCoordinate:
|
||||
return Configuration.nodeColors.red
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import ByteEntity from "./ByteEntity.js"
|
||||
import ComputedType from "./ComputedType.js"
|
||||
import Configuration from "../Configuration.js"
|
||||
import EnumDisplayValueEntity from "./EnumDisplayValueEntity.js"
|
||||
import EnumEntity from "./EnumEntity.js"
|
||||
import FormatTextEntity from "./FormatTextEntity.js"
|
||||
import GuidEntity from "./GuidEntity.js"
|
||||
@@ -20,7 +21,6 @@ import UnionType from "./UnionType.js"
|
||||
import Utility from "../Utility.js"
|
||||
import Vector2DEntity from "./Vector2DEntity.js"
|
||||
import VectorEntity from "./VectorEntity.js"
|
||||
import EnumDisplayValueEntity from "./EnumDisplayValueEntity.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("./IEntity.js").AnyValue} AnyValue
|
||||
@@ -180,7 +180,9 @@ export default class PinEntity extends IEntity {
|
||||
}
|
||||
|
||||
getDisplayName() {
|
||||
let result = Utility.formatStringName(this.PinFriendlyName?.toString() ?? this.PinName)
|
||||
let result = this.PinFriendlyName
|
||||
? this.PinFriendlyName.toString()
|
||||
: Utility.formatStringName(this.PinName ?? "")
|
||||
let match
|
||||
if (
|
||||
this.PinToolTip
|
||||
|
||||
@@ -16,6 +16,6 @@ export default class ExecPinTemplate extends PinTemplate {
|
||||
} else if (pinName === "execute" || pinName === "then") {
|
||||
return html``
|
||||
}
|
||||
return html`${Utility.formatStringName(pinName)}`
|
||||
return html`${this.element.getPinDisplayName()}`
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user