Timeline node

This commit is contained in:
barsdeveloper
2023-04-23 16:33:12 +02:00
parent 79d5e2b027
commit ef2cc5538b
6 changed files with 94 additions and 5 deletions

View File

@@ -341,6 +341,46 @@ const tests = [
delegate: false, delegate: false,
development: false, development: false,
}, },
{
name: "Timeline",
value: String.raw`
Begin Object Class=/Script/BlueprintGraph.K2Node_Timeline Name="K2Node_Timeline_0"
TimelineName="Timeline"
TimelineGuid=5A2932A3D7004616A4F233DB24D4E31F
NodePosX=-1136
NodePosY=-464
bCanRenameNode=True
NodeGuid=FAA474FEEE534CAB9F8E0828CDE95892
CustomProperties Pin (PinId=73D6A2B467F9472C8069BAB3E3245EE0,PinName="Play",PinType.PinCategory="exec",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,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=A65D68F22BC7446998845F65C262B4AA,PinName="PlayFromStart",PinType.PinCategory="exec",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,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=D1CF97026F034CF3A79C6E6F90C348BA,PinName="Stop",PinType.PinCategory="exec",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,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=16A43012A9A14EB2B917962FD24731A7,PinName="Reverse",PinType.PinCategory="exec",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,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=74C2E50D186D4230B6ED2327D08FDA34,PinName="ReverseFromEnd",PinType.PinCategory="exec",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,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=434043688FB5451293945CA3C0E2D202,PinName="Update",Direction="EGPD_Output",PinType.PinCategory="exec",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,LinkedTo=(K2Node_CallFunction_35 585A3CD5A0BA42569102B28820988070,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=296FA705872C4598BD613C68751387E3,PinName="Finished",Direction="EGPD_Output",PinType.PinCategory="exec",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,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=95467DD3FD76493FB981FCD2B8287EA7,PinName="SetNewTime",PinType.PinCategory="exec",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,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=48F9B48502CC484CA433FB1497A341E0,PinName="NewTime",PinType.PinCategory="real",PinType.PinSubCategory="float",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="0.0",AutogeneratedDefaultValue="0.0",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=5B2BC8D35A154CCE87AEA274C4CACED6,PinName="Direction",Direction="EGPD_Output",PinType.PinCategory="byte",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.Enum'"/Script/Engine.ETimelineDirection"',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,)
End Object
`,
color: Configuration.nodeColors.yellow,
icon: SVGIcon.timer,
pins: 10,
pinNames: [
"Play",
"Play From Start", // No info in the graph that "from" is lower case
"Stop",
"Reverse",
"Reverse From End", // No info in the graph that "from" is lower case
"Set New Time",
"New Time",
"Update",
"Finished",
"Direction",
],
delegate: false,
development: false,
},
] ]
/** @type {Blueprint} */ /** @type {Blueprint} */

28
dist/ueblueprint.js vendored
View File

@@ -37,6 +37,7 @@ class Configuration {
lime: i$3`150, 160, 30`, lime: i$3`150, 160, 30`,
red: i$3`151, 33, 32`, red: i$3`151, 33, 32`,
turquoise: i$3`46, 104, 106`, turquoise: i$3`46, 104, 106`,
yellow: i$3`148, 116, 24`,
} }
static alphaPattern = "repeating-conic-gradient(#7c8184 0% 25%, #c2c3c4 0% 50%) 50% / 10px 10px" static alphaPattern = "repeating-conic-gradient(#7c8184 0% 25%, #c2c3c4 0% 50%) 50% / 10px 10px"
static colorDragEventName = "ueb-color-drag" static colorDragEventName = "ueb-color-drag"
@@ -159,6 +160,7 @@ class Configuration {
switchInteger: "/Script/BlueprintGraph.K2Node_SwitchInteger", switchInteger: "/Script/BlueprintGraph.K2Node_SwitchInteger",
switchName: "/Script/BlueprintGraph.K2Node_SwitchName", switchName: "/Script/BlueprintGraph.K2Node_SwitchName",
switchString: "/Script/BlueprintGraph.K2Node_SwitchString", switchString: "/Script/BlueprintGraph.K2Node_SwitchString",
timeline: "/Script/BlueprintGraph.K2Node_Timeline",
transform: "/Script/CoreUObject.Transform", transform: "/Script/CoreUObject.Transform",
userDefinedEnum: "/Script/Engine.UserDefinedEnum", userDefinedEnum: "/Script/Engine.UserDefinedEnum",
variableGet: "/Script/BlueprintGraph.K2Node_VariableGet", variableGet: "/Script/BlueprintGraph.K2Node_VariableGet",
@@ -2687,6 +2689,13 @@ class SVGIcon {
</svg> </svg>
` `
static timer = x`
<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 0.5C3.9 0.5 0.5 3.9 0.5 8C0.5 12.1 3.9 15.5 8 15.5C12.1 15.5 15.5 12.1 15.5 8C15.5 3.9 12.1 0.5 8 0.5ZM8 14.1C4.6 14.1 1.9 11.4 1.9 8C1.9 4.6 4.6 1.90002 8 1.90002C11.4 1.90002 14.1 4.6 14.1 8C14.1 11.4 11.4 14.1 8 14.1Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.60003 3.19995H7.40002V8.49994L10.5 11.4999L11.4 10.5999L8.60003 7.99994V3.19995Z" fill="white"/>
</svg>
`
static touchpad = x` static touchpad = x`
<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill="white" fill-rule="evenodd" clip-rule="evenodd" d="M13 0H3C2.4 0 2 0.4 2 1V15C2 15.6 2.4 16 3 16H13C13.6 16 14 15.6 14 15V1C14 0.4 13.6 0 13 0ZM8 15.5C7.2 15.5 6.5 14.8 6.5 14C6.5 13.2 7.2 12.5 8 12.5C8.8 12.5 9.5 13.2 9.5 14C9.5 14.8 8.8 15.5 8 15.5ZM13 12H3V1H13V12Z" /> <path fill="white" fill-rule="evenodd" clip-rule="evenodd" d="M13 0H3C2.4 0 2 0.4 2 1V15C2 15.6 2.4 16 3 16H13C13.6 16 14 15.6 14 15V1C14 0.4 13.6 0 13 0ZM8 15.5C7.2 15.5 6.5 14.8 6.5 14C6.5 13.2 7.2 12.5 8 12.5C8.8 12.5 9.5 13.2 9.5 14C9.5 14.8 8.8 15.5 8 15.5ZM13 12H3V1H13V12Z" />
@@ -2872,6 +2881,14 @@ class ObjectEntity extends IEntity {
type: SymbolEntity, type: SymbolEntity,
showDefault: false, showDefault: false,
}, },
TimelineName: {
type: String,
showDefault: false,
},
TimelineGuid: {
type: GuidEntity,
showDefault: false,
},
NodePosX: { NodePosX: {
type: IntegerEntity, type: IntegerEntity,
showDefault: false, showDefault: false,
@@ -2888,6 +2905,10 @@ class ObjectEntity extends IEntity {
type: IntegerEntity, type: IntegerEntity,
showDefault: false, showDefault: false,
}, },
bCanRenameNode: {
type: Boolean,
showDefault: false,
},
bCommentBubblePinned: { bCommentBubblePinned: {
type: Boolean, type: Boolean,
showDefault: false, showDefault: false,
@@ -3336,6 +3357,8 @@ class ObjectEntity extends IEntity {
return this.bIsPureFunc return this.bIsPureFunc
? Configuration.nodeColors.green ? Configuration.nodeColors.green
: Configuration.nodeColors.blue : Configuration.nodeColors.blue
case Configuration.nodeType.dynamicCast:
return Configuration.nodeColors.turquoise
case Configuration.nodeType.inputDebugKey: case Configuration.nodeType.inputDebugKey:
case Configuration.nodeType.inputKey: case Configuration.nodeType.inputKey:
return Configuration.nodeColors.red return Configuration.nodeColors.red
@@ -3350,8 +3373,8 @@ class ObjectEntity extends IEntity {
case Configuration.nodeType.macro: case Configuration.nodeType.macro:
case Configuration.nodeType.multiGate: case Configuration.nodeType.multiGate:
return Configuration.nodeColors.gray return Configuration.nodeColors.gray
case Configuration.nodeType.dynamicCast: case Configuration.nodeType.timeline:
return Configuration.nodeColors.turquoise return Configuration.nodeColors.yellow
} }
if (this.switchTarget()) { if (this.switchTarget()) {
return Configuration.nodeColors.lime return Configuration.nodeColors.lime
@@ -3396,6 +3419,7 @@ class ObjectEntity extends IEntity {
case Configuration.nodeType.makeSet: return SVGIcon.makeSet case Configuration.nodeType.makeSet: return SVGIcon.makeSet
case Configuration.nodeType.select: return SVGIcon.select case Configuration.nodeType.select: return SVGIcon.select
case Configuration.nodeType.spawnActorFromClass: return SVGIcon.spawnActor case Configuration.nodeType.spawnActorFromClass: return SVGIcon.spawnActor
case Configuration.nodeType.timeline: return SVGIcon.timer
} }
if (this.switchTarget()) { if (this.switchTarget()) {
return SVGIcon.switch return SVGIcon.switch

File diff suppressed because one or more lines are too long

View File

@@ -13,6 +13,7 @@ export default class Configuration {
lime: css`150, 160, 30`, lime: css`150, 160, 30`,
red: css`151, 33, 32`, red: css`151, 33, 32`,
turquoise: css`46, 104, 106`, turquoise: css`46, 104, 106`,
yellow: css`148, 116, 24`,
} }
static alphaPattern = "repeating-conic-gradient(#7c8184 0% 25%, #c2c3c4 0% 50%) 50% / 10px 10px" static alphaPattern = "repeating-conic-gradient(#7c8184 0% 25%, #c2c3c4 0% 50%) 50% / 10px 10px"
static colorDragEventName = "ueb-color-drag" static colorDragEventName = "ueb-color-drag"
@@ -135,6 +136,7 @@ export default class Configuration {
switchInteger: "/Script/BlueprintGraph.K2Node_SwitchInteger", switchInteger: "/Script/BlueprintGraph.K2Node_SwitchInteger",
switchName: "/Script/BlueprintGraph.K2Node_SwitchName", switchName: "/Script/BlueprintGraph.K2Node_SwitchName",
switchString: "/Script/BlueprintGraph.K2Node_SwitchString", switchString: "/Script/BlueprintGraph.K2Node_SwitchString",
timeline: "/Script/BlueprintGraph.K2Node_Timeline",
transform: "/Script/CoreUObject.Transform", transform: "/Script/CoreUObject.Transform",
userDefinedEnum: "/Script/Engine.UserDefinedEnum", userDefinedEnum: "/Script/Engine.UserDefinedEnum",
variableGet: "/Script/BlueprintGraph.K2Node_VariableGet", variableGet: "/Script/BlueprintGraph.K2Node_VariableGet",

View File

@@ -329,6 +329,13 @@ export default class SVGIcon {
</svg> </svg>
` `
static timer = html`
<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 0.5C3.9 0.5 0.5 3.9 0.5 8C0.5 12.1 3.9 15.5 8 15.5C12.1 15.5 15.5 12.1 15.5 8C15.5 3.9 12.1 0.5 8 0.5ZM8 14.1C4.6 14.1 1.9 11.4 1.9 8C1.9 4.6 4.6 1.90002 8 1.90002C11.4 1.90002 14.1 4.6 14.1 8C14.1 11.4 11.4 14.1 8 14.1Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.60003 3.19995H7.40002V8.49994L10.5 11.4999L11.4 10.5999L8.60003 7.99994V3.19995Z" fill="white"/>
</svg>
`
static touchpad = html` static touchpad = html`
<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill="white" fill-rule="evenodd" clip-rule="evenodd" d="M13 0H3C2.4 0 2 0.4 2 1V15C2 15.6 2.4 16 3 16H13C13.6 16 14 15.6 14 15V1C14 0.4 13.6 0 13 0ZM8 15.5C7.2 15.5 6.5 14.8 6.5 14C6.5 13.2 7.2 12.5 8 12.5C8.8 12.5 9.5 13.2 9.5 14C9.5 14.8 8.8 15.5 8 15.5ZM13 12H3V1H13V12Z" /> <path fill="white" fill-rule="evenodd" clip-rule="evenodd" d="M13 0H3C2.4 0 2 0.4 2 1V15C2 15.6 2.4 16 3 16H13C13.6 16 14 15.6 14 15V1C14 0.4 13.6 0 13 0ZM8 15.5C7.2 15.5 6.5 14.8 6.5 14C6.5 13.2 7.2 12.5 8 12.5C8.8 12.5 9.5 13.2 9.5 14C9.5 14.8 8.8 15.5 8 15.5ZM13 12H3V1H13V12Z" />

View File

@@ -1,4 +1,5 @@
import Configuration from "../Configuration.js" import Configuration from "../Configuration.js"
import FormatTextEntity from "./FormatTextEntity.js"
import FunctionReferenceEntity from "./FunctionReferenceEntity.js" import FunctionReferenceEntity from "./FunctionReferenceEntity.js"
import GuidEntity from "./GuidEntity.js" import GuidEntity from "./GuidEntity.js"
import IdentifierEntity from "./IdentifierEntity.js" import IdentifierEntity from "./IdentifierEntity.js"
@@ -152,6 +153,14 @@ export default class ObjectEntity extends IEntity {
type: SymbolEntity, type: SymbolEntity,
showDefault: false, showDefault: false,
}, },
TimelineName: {
type: String,
showDefault: false,
},
TimelineGuid: {
type: GuidEntity,
showDefault: false,
},
NodePosX: { NodePosX: {
type: IntegerEntity, type: IntegerEntity,
showDefault: false, showDefault: false,
@@ -168,6 +177,10 @@ export default class ObjectEntity extends IEntity {
type: IntegerEntity, type: IntegerEntity,
showDefault: false, showDefault: false,
}, },
bCanRenameNode: {
type: Boolean,
showDefault: false,
},
bCommentBubblePinned: { bCommentBubblePinned: {
type: Boolean, type: Boolean,
showDefault: false, showDefault: false,
@@ -616,6 +629,8 @@ export default class ObjectEntity extends IEntity {
return this.bIsPureFunc return this.bIsPureFunc
? Configuration.nodeColors.green ? Configuration.nodeColors.green
: Configuration.nodeColors.blue : Configuration.nodeColors.blue
case Configuration.nodeType.dynamicCast:
return Configuration.nodeColors.turquoise
case Configuration.nodeType.inputDebugKey: case Configuration.nodeType.inputDebugKey:
case Configuration.nodeType.inputKey: case Configuration.nodeType.inputKey:
return Configuration.nodeColors.red return Configuration.nodeColors.red
@@ -630,8 +645,8 @@ export default class ObjectEntity extends IEntity {
case Configuration.nodeType.macro: case Configuration.nodeType.macro:
case Configuration.nodeType.multiGate: case Configuration.nodeType.multiGate:
return Configuration.nodeColors.gray return Configuration.nodeColors.gray
case Configuration.nodeType.dynamicCast: case Configuration.nodeType.timeline:
return Configuration.nodeColors.turquoise return Configuration.nodeColors.yellow
} }
if (this.switchTarget()) { if (this.switchTarget()) {
return Configuration.nodeColors.lime return Configuration.nodeColors.lime
@@ -676,6 +691,7 @@ export default class ObjectEntity extends IEntity {
case Configuration.nodeType.makeSet: return SVGIcon.makeSet case Configuration.nodeType.makeSet: return SVGIcon.makeSet
case Configuration.nodeType.select: return SVGIcon.select case Configuration.nodeType.select: return SVGIcon.select
case Configuration.nodeType.spawnActorFromClass: return SVGIcon.spawnActor case Configuration.nodeType.spawnActorFromClass: return SVGIcon.spawnActor
case Configuration.nodeType.timeline: return SVGIcon.timer
} }
if (this.switchTarget()) { if (this.switchTarget()) {
return SVGIcon.switch return SVGIcon.switch