Know location fix

This commit is contained in:
barsdeveloper
2023-05-01 14:42:01 +02:00
parent 74a9dd7ca3
commit fff40b7619
11 changed files with 239 additions and 144 deletions

154
dist/ueblueprint.js vendored
View File

@@ -72,7 +72,7 @@ class Configuration {
static hexColorRegex = /^\s*#(?<r>[0-9a-fA-F]{2})(?<g>[0-9a-fA-F]{2})(?<b>[0-9a-fA-F]{2})([0-9a-fA-F]{2})?|#(?<rs>[0-9a-fA-F])(?<gs>[0-9a-fA-F])(?<bs>[0-9a-fA-F])\s*$/
static indentation = " "
static keysSeparator = /[\.\(\)]/
static knotOffset = [-26, -16]
static knotOffset = [-Configuration.gridSize, -0.5 * Configuration.gridSize]
static lineTracePattern = /LineTrace(Single|Multi)(\w*)/
static linkCurveHeight = 15 // px
static linkCurveWidth = 80 // px
@@ -492,20 +492,67 @@ class UnionType {
}
}
/**
* @typedef {import("./IEntity.js").default} IEntity
* @typedef {import("./IEntity.js").EntityConstructor} EntityConstructor
*/
class MirroredEntity {
static attributes = {
type: {
ignored: true,
},
key: {
ignored: true,
},
getter: {
ignored: true,
},
}
/**
* @param {EntityConstructor} type
* @param {String} key
*/
constructor(type, key, getter = () => null) {
this.type = type;
this.key = key;
this.getter = getter;
}
get() {
return this.getter()
}
getTargetType() {
const result = this.type.attributes[this.key].type;
if (result instanceof MirroredEntity) {
return result.getTargetType()
}
return result
}
}
/**
* @typedef {import("./Blueprint.js").default} Blueprint
* @typedef {import("./entity/IEntity.js").AnyValue} AnyValue
* @typedef {import("./entity/IEntity.js").AnyValueConstructor<*>} AnyValueConstructor
* @typedef {import("./entity/IEntity.js").AttributeInformation} TypeInformation
* @typedef {import("./entity/IEntity.js").AttributeInformation} AttributeInformation
* @typedef {import("./entity/IEntity.js").default} IEntity
* @typedef {import("./entity/IEntity.js").EntityConstructor} EntityConstructor
* @typedef {import("./entity/LinearColorEntity.js").default} LinearColorEntity
*/
/**
* @template {AnyValue} T
* @typedef {import("./entity/IEntity.js").AnyValueConstructor<T>} AnyValueConstructor
*/
/**
* @template T
* @typedef {import("./entity/IEntity.js").TypeGetter<T>} TypeGetter
*/
class Utility {
static emptyObj = {}
static booleanConverter = {
fromAttribute: (value, type) => {
},
@@ -614,7 +661,7 @@ class Utility {
attribute = /** @type {EntityConstructor} */(entity.constructor).attributes?.[key]
) {
if (attribute?.constructor === Object) {
return /** @type {TypeInformation} */(attribute).serialized
return /** @type {AttributeInformation} */(attribute).serialized
}
return false
}
@@ -665,10 +712,7 @@ class Utility {
*/
static equals(a, b) {
// Here we cannot check both instanceof IEntity because this would introduce a circular include dependency
if (
/** @type {IEntity?} */(a)?.equals
&& /** @type {IEntity?} */(b)?.equals
) {
if (/** @type {IEntity?} */(a)?.equals && /** @type {IEntity?} */(b)?.equals) {
return /** @type {IEntity} */(a).equals(/** @type {IEntity} */(b))
}
a = Utility.sanitize(a);
@@ -688,8 +732,7 @@ class Utility {
}
/**
* @param {null | AnyValue | TypeInformation} value
* @returns {AnyValueConstructor}
* @param {null | AnyValue | AttributeInformation} value
*/
static getType(value) {
if (value === null) {
@@ -698,14 +741,17 @@ class Utility {
if (value?.constructor === Object && value?.type instanceof Function) {
return value.type
}
return /** @type {AnyValueConstructor} */(value?.constructor)
return /** @type {AnyValueConstructor<any>} */(value?.constructor)
}
/**
* @param {AnyValue} value
* @param {AnyValueConstructor} type
* @param {AnyValueConstructor<T>} type
*/
static isValueOfType(value, type, acceptNull = false) {
if (type instanceof MirroredEntity) {
type = type.getTargetType();
}
return (acceptNull && value === null) || value instanceof type || value?.constructor === type
}
@@ -2774,42 +2820,6 @@ class VariableReferenceEntity extends IEntity {
}
}
/** @typedef {import("./IEntity.js").EntityConstructor} EntityConstructor */
class MirroredEntity extends IEntity {
static attributes = {
...super.attributes,
type: {
ignored: true,
},
key: {
ignored: true,
},
object: {
ignored: true,
},
}
constructor(values = {}) {
super({});
/** @type {EntityConstructor} */ this.type;
/** @type {String} */ this.key;
/** @type {IEntity} */ this.object;
}
get() {
return this.object?.[this.key]
}
set(value) {
if (this.object[this.key]) {
this.object[this.key] = value;
}
}
}
class ObjectEntity extends IEntity {
static attributes = {
@@ -3813,6 +3823,8 @@ class Grammar {
? this.unknownValue
: P.alt(acc, cur)
);
} else if (type instanceof MirroredEntity) {
return this.grammarFor(type.type.attributes[type.key])
} else if (attribute?.constructor === Object) {
result = this.grammarFor(undefined, type);
} else {
@@ -3972,8 +3984,9 @@ class Grammar {
valueSeparator,
).chain(([attributeName, _1]) => {
const attributeKey = attributeName.split(Configuration.keysSeparator);
const attributeValue = this.getAttribute(entityType, attributeKey);
return this
.grammarFor(this.getAttribute(entityType, attributeKey))
.grammarFor(attributeValue)
.map(attributeValue =>
values => Utility.objectSet(values, attributeKey, attributeValue, true)
)
@@ -4329,7 +4342,6 @@ class Grammar {
this.customProperty,
this.createAttributeGrammar(ObjectEntity),
this.inlinedArrayEntry,
// Legacy subobject
this.subObjectEntity
)
)
@@ -5871,6 +5883,10 @@ class BlueprintTemplate extends ITemplate {
/** @type {HTMLElement} */ nodesContainerElement
viewportSize = [0, 0]
#setViewportSize() {
}
/** @param {Blueprint} element */
initialize(element) {
super.initialize(element);
@@ -5881,7 +5897,13 @@ class BlueprintTemplate extends ITemplate {
)?.content.textContent;
if (htmlTemplate) {
this.element.requestUpdate();
this.element.updateComplete.then(() => this.getPasteInputObject().pasted(htmlTemplate));
this.element.updateComplete.then(() => {
this.blueprint.mousePosition = [
Math.round(this.viewportSize[0] / 2),
Math.round(this.viewportSize[1] / 2),
];
this.getPasteInputObject().pasted(htmlTemplate);
});
}
}
@@ -6066,13 +6088,27 @@ class BlueprintTemplate extends ITemplate {
centerContentInViewport(smooth = true) {
let avgX = 0;
let avgY = 0;
let minX = Number.MAX_SAFE_INTEGER;
let maxX = Number.MIN_SAFE_INTEGER;
let minY = Number.MAX_SAFE_INTEGER;
let maxY = Number.MIN_SAFE_INTEGER;
const nodes = this.blueprint.getNodes();
for (const node of nodes) {
avgX += node.leftBoundary() + node.rightBoundary();
avgY += node.topBoundary() + node.bottomBoundary();
minX = Math.min(minX, node.leftBoundary());
maxX = Math.max(maxX, node.rightBoundary());
minY = Math.min(minY, node.topBoundary());
maxY = Math.max(maxY, node.bottomBoundary());
}
avgX = nodes.length > 0 ? Math.round(avgX / (2 * nodes.length)) : 0;
avgY = nodes.length > 0 ? Math.round(avgY / (2 * nodes.length)) : 0;
avgX = Math.round(maxX - minX <= this.viewportSize[0]
? (maxX + minX) / 2
: avgX / (2 * nodes.length)
);
avgY = Math.round(maxY - minY <= this.viewportSize[1]
? (maxY + minY) / 2
: avgY / (2 * nodes.length)
);
this.centerViewport(avgX, avgY, smooth);
}
}
@@ -6355,6 +6391,7 @@ class LinkTemplate extends IFromToPositionedTemplate {
location => {
location[0] += Configuration.knotOffset[0];
location[1] += Configuration.knotOffset[1];
location = Utility.snapToGrid(location[0], location[1], Configuration.gridSize);
this.#createKnot(location);
}
)
@@ -10949,7 +10986,6 @@ function initializeSerializerFactory() {
(array, insideString) =>
`(${array
.map(v =>
// @ts-expect-error
SerializerFactory.getSerializer(Utility.getType(v)).write(v, insideString) + ","
)
.join("")
@@ -10999,7 +11035,6 @@ function initializeSerializerFactory() {
(v, insideString) => {
let result = FormatTextEntity.lookbehind + "("
+ v.value.map(v =>
// @ts-expect-error
SerializerFactory.getSerializer(Utility.getType(v)).write(v, insideString)
).join(", ")
+ ")";
@@ -11058,6 +11093,11 @@ function initializeSerializerFactory() {
new Serializer(MacroGraphReferenceEntity, Serializer.bracketsWrapped)
);
SerializerFactory.registerSerializer(
MirroredEntity,
new Serializer(MirroredEntity)
);
SerializerFactory.registerSerializer(
Number,
new ToStringSerializer(Number)

File diff suppressed because one or more lines are too long

View File

@@ -24,44 +24,49 @@
<code>
<ueb-blueprint>
<template>
Begin Object Class=/Script/BlueprintGraph.K2Node_FunctionEntry Name="K2Node_FunctionEntry_11" ExportPath=/Script/BlueprintGraph.K2Node_FunctionEntry'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_FunctionEntry_11"'
Begin Object Class="/Script/BlueprintGraph.K2Node_FunctionEntry" Name="K2Node_FunctionEntry_11"
ExportPath=/Script/BlueprintGraph.K2Node_FunctionEntry'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_FunctionEntry_11"'
bEnforceConstCorrectness=False
FunctionReference=(MemberParent=/Script/CoreUObject.Class'"/Script/Engine.Actor"',MemberName="UserConstructionScript")
NodePosX=32
NodePosY=-48
NodePosX=-336
NodePosY=-208
NodeGuid=521B69F742A30F8EA5B92B8CC131AB54
CustomProperties Pin (PinId=71907A84935B4C5CAAB3008925461DF1,PinName="then",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_4248 25CB1132A7BA49AB925A8FA318964E23,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
End Object
Begin Object Class=/Script/BlueprintGraph.K2Node_VariableGet Name="K2Node_VariableGet_1" ExportPath=/Script/BlueprintGraph.K2Node_VariableGet'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_VariableGet_1"'
VariableReference=(MemberName="PointLight2",bSelfContext=True)
NodePosX=-128
NodePosY=240
Begin Object Class="/Script/BlueprintGraph.K2Node_VariableGet" Name="K2Node_VariableGet_1"
ExportPath=/Script/BlueprintGraph.K2Node_VariableGet'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_VariableGet_1"'
VariableReference=(MemberName="PointLight2",MemberGuid=1AB0457660F94A2ED12420B8AEE681DC,bSelfContext=True)
NodePosX=-496
NodePosY=80
NodeGuid=10979856497BCAB0294340A98E5231DE
CustomProperties Pin (PinId=31AFCE7083BE417EA1B4267CAD23C84F,PinName="PointLight2",Direction="EGPD_Output",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.Class'"/Script/Engine.SpotLightComponent"',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_19069 166F92FA9C8B45178DA43D14E4B62467,K2Node_Knot_0 D2794C8E4DB3434AAB92AC0592A1CDAD,K2Node_Knot_1 7D324917BCA94CEE995AC89D2E1C5CEC,K2Node_Knot_2 E8181E5FDB2D46ABBBFADC7007AB2514,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=F34CF32EFD844A1C91B2C69947082846,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/Engine.BlueprintGeneratedClass'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce_C"',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=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
End Object
Begin Object Class=/Script/BlueprintGraph.K2Node_CallFunction Name="K2Node_CallFunction_4248" ExportPath=/Script/BlueprintGraph.K2Node_CallFunction'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_CallFunction_4248"'
Begin Object Class="/Script/BlueprintGraph.K2Node_CallFunction" Name="K2Node_CallFunction_4248"
ExportPath=/Script/BlueprintGraph.K2Node_CallFunction'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_CallFunction_4248"'
FunctionReference=(MemberParent=/Script/CoreUObject.Class'"/Script/Engine.LightComponent"',MemberName="SetIntensity")
NodePosX=272
NodePosY=-64
NodePosX=-96
NodePosY=-224
NodeGuid=A6A251FD44C9D09ACE54E19DF6182B12
CustomProperties Pin (PinId=25CB1132A7BA49AB925A8FA318964E23,PinName="execute",PinToolTip="\nExec",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_FunctionEntry_11 71907A84935B4C5CAAB3008925461DF1,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=0342A5C2A6524BC496509A5FE3E7878B,PinName="then",PinToolTip="\nExec",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_10657 88008E0A9E5542DA9068EF1C6658B46E,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=061FD7FAE33B40F49B6F736AEBD0FDA9,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinToolTip="Target\nLight Component Object Reference",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.Class'"/Script/Engine.LightComponent"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_Knot_0 36BEECD9937E406AB95722BB5BB7D8BF,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=A045E5D76A2541AE8B9D41EEA8684D06,PinName="NewIntensity",PinToolTip="New Intensity\nFloat (single-precision)",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",LinkedTo=(K2Node_VariableGet_44 90D78D3F13EC4FA181FCC19C7C6106D4,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=A045E5D76A2541AE8B9D41EEA8684D06,PinName="NewIntensity",PinToolTip="New Intensity\nFloat (single-precision)",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,LinkedTo=(K2Node_VariableGet_44 90D78D3F13EC4FA181FCC19C7C6106D4,),DefaultValue="0",AutogeneratedDefaultValue="0.0",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
End Object
Begin Object Class=/Script/BlueprintGraph.K2Node_VariableGet Name="K2Node_VariableGet_44" ExportPath=/Script/BlueprintGraph.K2Node_VariableGet'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_VariableGet_44"'
Begin Object Class="/Script/BlueprintGraph.K2Node_VariableGet" Name="K2Node_VariableGet_44"
ExportPath=/Script/BlueprintGraph.K2Node_VariableGet'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_VariableGet_44"'
VariableReference=(MemberName="Brightness",MemberGuid=BA0410F246F371A058CD72AB86D957BD,bSelfContext=True)
NodePosX=112
NodePosY=48
NodePosX=-256
NodePosY=-112
NodeGuid=8A92F2CC426BB42C5AD261B6E6548557
CustomProperties Pin (PinId=90D78D3F13EC4FA181FCC19C7C6106D4,PinName="Brightness",Direction="EGPD_Output",PinType.PinCategory="real",PinType.PinSubCategory="double",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",LinkedTo=(K2Node_CallFunction_4248 A045E5D76A2541AE8B9D41EEA8684D06,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=90D78D3F13EC4FA181FCC19C7C6106D4,PinName="Brightness",Direction="EGPD_Output",PinType.PinCategory="real",PinType.PinSubCategory="double",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_4248 A045E5D76A2541AE8B9D41EEA8684D06,),DefaultValue="0",AutogeneratedDefaultValue="0.0",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=170640B252CF4012A122D22A9AC1C8B4,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/Engine.BlueprintGeneratedClass'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce_C"',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=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
End Object
Begin Object Class=/Script/BlueprintGraph.K2Node_CallFunction Name="K2Node_CallFunction_10657" ExportPath=/Script/BlueprintGraph.K2Node_CallFunction'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_CallFunction_10657"'
Begin Object Class="/Script/BlueprintGraph.K2Node_CallFunction" Name="K2Node_CallFunction_10657"
ExportPath=/Script/BlueprintGraph.K2Node_CallFunction'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_CallFunction_10657"'
FunctionReference=(MemberParent=/Script/CoreUObject.Class'"/Script/Engine.LightComponent"',MemberName="SetLightColor")
NodePosX=512
NodePosY=48
NodePosX=144
NodePosY=-112
NodeGuid=7647C9FC4D4D28E89F85C88A8CB2AD12
CustomProperties Pin (PinId=88008E0A9E5542DA9068EF1C6658B46E,PinName="execute",PinToolTip="\nExec",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_4248 0342A5C2A6524BC496509A5FE3E7878B,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=EB4CC7B4FAE04D3396AC3D17FF87E3C8,PinName="then",PinToolTip="\nExec",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_19069 037FE176F48E445593DC9E7A481AEF3D,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
@@ -69,71 +74,79 @@
CustomProperties Pin (PinId=72534005C78C420EAEFA19172038B1F3,PinName="NewLightColor",PinToolTip="New Light Color\nLinear Color Structure",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.ScriptStruct'"/Script/CoreUObject.LinearColor"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_VariableGet_131 E11890DA93464F48A6221977085C4549,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=4BE93BAC1CCB45AAAF1ADB7ADBE9FC4C,PinName="bSRGB",PinToolTip="SRGB\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="true",AutogeneratedDefaultValue="true",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
End Object
Begin Object Class=/Script/BlueprintGraph.K2Node_VariableGet Name="K2Node_VariableGet_131" ExportPath=/Script/BlueprintGraph.K2Node_VariableGet'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_VariableGet_131"'
Begin Object Class="/Script/BlueprintGraph.K2Node_VariableGet" Name="K2Node_VariableGet_131"
ExportPath=/Script/BlueprintGraph.K2Node_VariableGet'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_VariableGet_131"'
VariableReference=(MemberName="Color",MemberGuid=AAEC3E9C476A2187972DDE8D142A814B,bSelfContext=True)
NodePosX=336
NodePosY=160
NodePosX=-32
NodePosY=0
NodeGuid=5BE70A964537A1F13BE2489B0DC06370
CustomProperties Pin (PinId=E11890DA93464F48A6221977085C4549,PinName="Color",Direction="EGPD_Output",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.ScriptStruct'"/Script/CoreUObject.LinearColor"',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_10657 72534005C78C420EAEFA19172038B1F3,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=506366A2BD594C01A714D4B3A4B67508,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/Engine.BlueprintGeneratedClass'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce_C"',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=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
End Object
Begin Object Class=/Script/BlueprintGraph.K2Node_CallFunction Name="K2Node_CallFunction_19069" ExportPath=/Script/BlueprintGraph.K2Node_CallFunction'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_CallFunction_19069"'
Begin Object Class="/Script/BlueprintGraph.K2Node_CallFunction" Name="K2Node_CallFunction_19069"
ExportPath=/Script/BlueprintGraph.K2Node_CallFunction'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_CallFunction_19069"'
FunctionReference=(MemberParent=/Script/CoreUObject.Class'"/Script/Engine.SpotLightComponent"',MemberName="SetInnerConeAngle")
NodePosX=768
NodePosY=160
NodePosX=384
NodePosY=0
NodeGuid=BA1662924D2E0511EE6434B1176BA651
CustomProperties Pin (PinId=037FE176F48E445593DC9E7A481AEF3D,PinName="execute",PinToolTip="\nExec",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_10657 EB4CC7B4FAE04D3396AC3D17FF87E3C8,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=6F6DF8EDC2A548D8AA650E2226E492B2,PinName="then",PinToolTip="\nExec",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_23382 97E5A95A95D146349651027B62E74C6B,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=166F92FA9C8B45178DA43D14E4B62467,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinToolTip="Target\nSpot Light Component Object Reference",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.Class'"/Script/Engine.SpotLightComponent"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_VariableGet_1 31AFCE7083BE417EA1B4267CAD23C84F,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=02BAE745DB3C4EEA9C4FD44D2877E95D,PinName="NewInnerConeAngle",PinToolTip="New Inner Cone Angle\nFloat (single-precision)",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",LinkedTo=(K2Node_VariableGet_181 7F19DF17FB3C4927A31AC4A642E3FC82,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=02BAE745DB3C4EEA9C4FD44D2877E95D,PinName="NewInnerConeAngle",PinToolTip="New Inner Cone Angle\nFloat (single-precision)",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,LinkedTo=(K2Node_VariableGet_181 7F19DF17FB3C4927A31AC4A642E3FC82,),DefaultValue="0",AutogeneratedDefaultValue="0.0",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
End Object
Begin Object Class=/Script/BlueprintGraph.K2Node_VariableGet Name="K2Node_VariableGet_181" ExportPath=/Script/BlueprintGraph.K2Node_VariableGet'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_VariableGet_181"'
Begin Object Class="/Script/BlueprintGraph.K2Node_VariableGet" Name="K2Node_VariableGet_181"
ExportPath=/Script/BlueprintGraph.K2Node_VariableGet'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_VariableGet_181"'
VariableReference=(MemberName="Inner Cone Angle",MemberGuid=89450A00436C23321534D7AF2F9B70FB,bSelfContext=True)
NodePosX=528
NodePosY=272
NodePosX=160
NodePosY=112
NodeGuid=A37690AE4A2AB23BBA55C2828CCA575E
CustomProperties Pin (PinId=7F19DF17FB3C4927A31AC4A642E3FC82,PinName="Inner Cone Angle",Direction="EGPD_Output",PinType.PinCategory="real",PinType.PinSubCategory="double",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",LinkedTo=(K2Node_CallFunction_19069 02BAE745DB3C4EEA9C4FD44D2877E95D,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=7F19DF17FB3C4927A31AC4A642E3FC82,PinName="Inner Cone Angle",Direction="EGPD_Output",PinType.PinCategory="real",PinType.PinSubCategory="double",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_19069 02BAE745DB3C4EEA9C4FD44D2877E95D,),DefaultValue="0",AutogeneratedDefaultValue="0.0",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=4A7B5FE1C8904A129EA3DA71EADFC22F,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/Engine.BlueprintGeneratedClass'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce_C"',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=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
End Object
Begin Object Class=/Script/BlueprintGraph.K2Node_CallFunction Name="K2Node_CallFunction_23382" ExportPath=/Script/BlueprintGraph.K2Node_CallFunction'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_CallFunction_23382"'
Begin Object Class="/Script/BlueprintGraph.K2Node_CallFunction" Name="K2Node_CallFunction_23382"
ExportPath=/Script/BlueprintGraph.K2Node_CallFunction'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_CallFunction_23382"'
FunctionReference=(MemberParent=/Script/CoreUObject.Class'"/Script/Engine.SpotLightComponent"',MemberName="SetOuterConeAngle")
NodePosX=1040
NodePosY=304
NodePosX=656
NodePosY=128
NodeGuid=A5A1294746E0AE46D3A54898D49E3AAC
CustomProperties Pin (PinId=97E5A95A95D146349651027B62E74C6B,PinName="execute",PinToolTip="\nExec",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_19069 6F6DF8EDC2A548D8AA650E2226E492B2,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=EEE223529F7B4518AD4728D162BD53A4,PinName="then",PinToolTip="\nExec",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=F77504B5153A43548D6327B5AD7211DA,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinToolTip="Target\nSpot Light Component Object Reference",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.Class'"/Script/Engine.SpotLightComponent"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_Knot_2 3927E661939B49E4B147C0A02AB5B2E9,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=FB753E8540C1460EA0564D3BF1C962EA,PinName="NewOuterConeAngle",PinToolTip="New Outer Cone Angle\nFloat (single-precision)",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",LinkedTo=(K2Node_VariableGet_232 DF69580CD4D5489A99B4AB51D36B1EF2,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=FB753E8540C1460EA0564D3BF1C962EA,PinName="NewOuterConeAngle",PinToolTip="New Outer Cone Angle\nFloat (single-precision)",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,LinkedTo=(K2Node_VariableGet_232 DF69580CD4D5489A99B4AB51D36B1EF2,),DefaultValue="0",AutogeneratedDefaultValue="0.0",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
End Object
Begin Object Class=/Script/BlueprintGraph.K2Node_VariableGet Name="K2Node_VariableGet_232" ExportPath=/Script/BlueprintGraph.K2Node_VariableGet'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_VariableGet_232"'
Begin Object Class="/Script/BlueprintGraph.K2Node_VariableGet" Name="K2Node_VariableGet_232"
ExportPath=/Script/BlueprintGraph.K2Node_VariableGet'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_VariableGet_232"'
VariableReference=(MemberName="Outer Cone Angle",MemberGuid=F7A3E7204D4A41FD52F9E0BE45776108,bSelfContext=True)
NodePosX=816
NodePosY=432
NodePosX=464
NodePosY=240
NodeGuid=1E08943C45AAC05E77B8CA8C7B9719E2
CustomProperties Pin (PinId=DF69580CD4D5489A99B4AB51D36B1EF2,PinName="Outer Cone Angle",Direction="EGPD_Output",PinType.PinCategory="real",PinType.PinSubCategory="double",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",LinkedTo=(K2Node_CallFunction_23382 FB753E8540C1460EA0564D3BF1C962EA,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=DF69580CD4D5489A99B4AB51D36B1EF2,PinName="Outer Cone Angle",Direction="EGPD_Output",PinType.PinCategory="real",PinType.PinSubCategory="double",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_23382 FB753E8540C1460EA0564D3BF1C962EA,),DefaultValue="0",AutogeneratedDefaultValue="0.0",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=60068FD03F8E42E6B86734A63966C978,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/Engine.BlueprintGeneratedClass'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce_C"',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=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
End Object
Begin Object Class=/Script/BlueprintGraph.K2Node_Knot Name="K2Node_Knot_0" ExportPath=/Script/BlueprintGraph.K2Node_Knot'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_Knot_0"'
NodePosX=112
NodePosY=16
Begin Object Class="/Script/BlueprintGraph.K2Node_Knot" Name="K2Node_Knot_0"
ExportPath=/Script/BlueprintGraph.K2Node_Knot'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_Knot_0"'
NodePosX=-256
NodePosY=-144
NodeGuid=2673BBB2B8F74DB68ADAD5FED768E1FD
CustomProperties Pin (PinId=D2794C8E4DB3434AAB92AC0592A1CDAD,PinName="InputPin",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.Class'"/Script/Engine.SpotLightComponent"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_VariableGet_1 31AFCE7083BE417EA1B4267CAD23C84F,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=True,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=36BEECD9937E406AB95722BB5BB7D8BF,PinName="OutputPin",Direction="EGPD_Output",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.Class'"/Script/Engine.SpotLightComponent"',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_4248 061FD7FAE33B40F49B6F736AEBD0FDA9,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
End Object
Begin Object Class=/Script/BlueprintGraph.K2Node_Knot Name="K2Node_Knot_1" ExportPath=/Script/BlueprintGraph.K2Node_Knot'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_Knot_1"'
NodePosX=112
NodePosY=128
Begin Object Class="/Script/BlueprintGraph.K2Node_Knot" Name="K2Node_Knot_1"
ExportPath=/Script/BlueprintGraph.K2Node_Knot'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_Knot_1"'
NodePosX=-256
NodePosY=-32
NodeGuid=3B925EE47581488FA93929801A3CCDEA
CustomProperties Pin (PinId=7D324917BCA94CEE995AC89D2E1C5CEC,PinName="InputPin",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.Class'"/Script/Engine.SpotLightComponent"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_VariableGet_1 31AFCE7083BE417EA1B4267CAD23C84F,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=True,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=DCC8906B038E4BA4A697831AC6252FA7,PinName="OutputPin",Direction="EGPD_Output",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.Class'"/Script/Engine.SpotLightComponent"',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_10657 10F6E0C030124D83844D944D7116B98A,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
End Object
Begin Object Class=/Script/BlueprintGraph.K2Node_Knot Name="K2Node_Knot_2" ExportPath=/Script/BlueprintGraph.K2Node_Knot'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_Knot_2"'
NodePosX=112
NodePosY=384
Begin Object Class="/Script/BlueprintGraph.K2Node_Knot" Name="K2Node_Knot_2"
ExportPath=/Script/BlueprintGraph.K2Node_Knot'"/Game/StarterContent/Blueprints/Blueprint_WallSconce.Blueprint_WallSconce:UserConstructionScript.K2Node_Knot_2"'
NodePosX=-256
NodePosY=208
NodeGuid=09D2ED0B5CAF4B1DAE6145B8ADCE0E1B
CustomProperties Pin (PinId=E8181E5FDB2D46ABBBFADC7007AB2514,PinName="InputPin",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.Class'"/Script/Engine.SpotLightComponent"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_VariableGet_1 31AFCE7083BE417EA1B4267CAD23C84F,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=True,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=3927E661939B49E4B147C0A02AB5B2E9,PinName="OutputPin",Direction="EGPD_Output",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.Class'"/Script/Engine.SpotLightComponent"',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_23382 F77504B5153A43548D6327B5AD7211DA,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
End Object
End Object
</template>
</ueb-blueprint>
</code>

View File

@@ -48,7 +48,7 @@ export default class Configuration {
static hexColorRegex = /^\s*#(?<r>[0-9a-fA-F]{2})(?<g>[0-9a-fA-F]{2})(?<b>[0-9a-fA-F]{2})([0-9a-fA-F]{2})?|#(?<rs>[0-9a-fA-F])(?<gs>[0-9a-fA-F])(?<bs>[0-9a-fA-F])\s*$/
static indentation = " "
static keysSeparator = /[\.\(\)]/
static knotOffset = [-26, -16]
static knotOffset = [-Configuration.gridSize, -0.5 * Configuration.gridSize]
static lineTracePattern = /LineTrace(Single|Multi)(\w*)/
static linkCurveHeight = 15 // px
static linkCurveWidth = 80 // px

View File

@@ -1,21 +1,27 @@
import ComputedType from "./entity/ComputedType.js"
import Configuration from "./Configuration.js"
import MirroredEntity from "./entity/MirroredEntity.js"
import UnionType from "./entity/UnionType.js"
/**
* @typedef {import("./Blueprint.js").default} Blueprint
* @typedef {import("./entity/IEntity.js").AnyValue} AnyValue
* @typedef {import("./entity/IEntity.js").AnyValueConstructor<*>} AnyValueConstructor
* @typedef {import("./entity/IEntity.js").AttributeInformation} TypeInformation
* @typedef {import("./entity/IEntity.js").AttributeInformation} AttributeInformation
* @typedef {import("./entity/IEntity.js").default} IEntity
* @typedef {import("./entity/IEntity.js").EntityConstructor} EntityConstructor
* @typedef {import("./entity/LinearColorEntity.js").default} LinearColorEntity
*/
/**
* @template {AnyValue} T
* @typedef {import("./entity/IEntity.js").AnyValueConstructor<T>} AnyValueConstructor
*/
/**
* @template T
* @typedef {import("./entity/IEntity.js").TypeGetter<T>} TypeGetter
*/
export default class Utility {
static emptyObj = {}
static booleanConverter = {
fromAttribute: (value, type) => {
value ? "true" : "false"
@@ -125,7 +131,7 @@ export default class Utility {
attribute = /** @type {EntityConstructor} */(entity.constructor).attributes?.[key]
) {
if (attribute?.constructor === Object) {
return /** @type {TypeInformation} */(attribute).serialized
return /** @type {AttributeInformation} */(attribute).serialized
}
return false
}
@@ -176,10 +182,7 @@ export default class Utility {
*/
static equals(a, b) {
// Here we cannot check both instanceof IEntity because this would introduce a circular include dependency
if (
/** @type {IEntity?} */(a)?.equals
&& /** @type {IEntity?} */(b)?.equals
) {
if (/** @type {IEntity?} */(a)?.equals && /** @type {IEntity?} */(b)?.equals) {
return /** @type {IEntity} */(a).equals(/** @type {IEntity} */(b))
}
a = Utility.sanitize(a)
@@ -199,8 +202,7 @@ export default class Utility {
}
/**
* @param {null | AnyValue | TypeInformation} value
* @returns {AnyValueConstructor}
* @param {null | AnyValue | AttributeInformation} value
*/
static getType(value) {
if (value === null) {
@@ -209,14 +211,17 @@ export default class Utility {
if (value?.constructor === Object && value?.type instanceof Function) {
return value.type
}
return /** @type {AnyValueConstructor} */(value?.constructor)
return /** @type {AnyValueConstructor<any>} */(value?.constructor)
}
/**
* @param {AnyValue} value
* @param {AnyValueConstructor} type
* @param {AnyValueConstructor<T>} type
*/
static isValueOfType(value, type, acceptNull = false) {
if (type instanceof MirroredEntity) {
type = type.getTargetType()
}
return (acceptNull && value === null) || value instanceof type || value?.constructor === type
}

View File

@@ -1,37 +1,42 @@
import IEntity from "./IEntity.js"
/** @typedef {import("./IEntity.js").EntityConstructor} EntityConstructor */
/**
* @typedef {import("./IEntity.js").default} IEntity
* @typedef {import("./IEntity.js").EntityConstructor} EntityConstructor
*/
export default class MirroredEntity extends IEntity {
export default class MirroredEntity {
static attributes = {
...super.attributes,
type: {
ignored: true,
},
key: {
ignored: true,
},
object: {
getter: {
ignored: true,
},
}
constructor(values = {}) {
super({})
/** @type {EntityConstructor} */ this.type
/** @type {String} */ this.key
/** @type {IEntity} */ this.object
/**
* @param {EntityConstructor} type
* @param {String} key
*/
constructor(type, key, getter = () => null) {
this.type = type
this.key = key
this.getter = getter
}
get() {
return this.object?.[this.key]
return this.getter()
}
set(value) {
if (this.object[this.key]) {
this.object[this.key] = value
getTargetType() {
const result = this.type.attributes[this.key].type
if (result instanceof MirroredEntity) {
return result.getTargetType()
}
return result
}
}

View File

@@ -14,6 +14,7 @@ import KeyBindingEntity from "../entity/KeyBindingEntity.js"
import LinearColorEntity from "../entity/LinearColorEntity.js"
import LocalizedTextEntity from "../entity/LocalizedTextEntity.js"
import MacroGraphReferenceEntity from "../entity/MacroGraphReferenceEntity.js"
import MirroredEntity from "../entity/MirroredEntity.js"
import NaturalNumberEntity from "../entity/NaturalNumberEntity.js"
import ObjectEntity from "../entity/ObjectEntity.js"
import ObjectReferenceEntity from "../entity/ObjectReferenceEntity.js"
@@ -172,6 +173,8 @@ export default class Grammar {
? this.unknownValue
: P.alt(acc, cur)
)
} else if (type instanceof MirroredEntity) {
return this.grammarFor(type.type.attributes[type.key])
} else if (attribute?.constructor === Object) {
result = this.grammarFor(undefined, type)
} else {
@@ -331,8 +334,9 @@ export default class Grammar {
valueSeparator,
).chain(([attributeName, _1]) => {
const attributeKey = attributeName.split(Configuration.keysSeparator)
const attributeValue = this.getAttribute(entityType, attributeKey)
return this
.grammarFor(this.getAttribute(entityType, attributeKey))
.grammarFor(attributeValue)
.map(attributeValue =>
values => Utility.objectSet(values, attributeKey, attributeValue, true)
)
@@ -688,7 +692,6 @@ export default class Grammar {
this.customProperty,
this.createAttributeGrammar(ObjectEntity),
this.inlinedArrayEntry,
// Legacy subobject
this.subObjectEntity
)
)

View File

@@ -13,6 +13,7 @@ import KeyBindingEntity from "../entity/KeyBindingEntity.js"
import LinearColorEntity from "../entity/LinearColorEntity.js"
import LocalizedTextEntity from "../entity/LocalizedTextEntity.js"
import MacroGraphReferenceEntity from "../entity/MacroGraphReferenceEntity.js"
import MirroredEntity from "../entity/MirroredEntity.js"
import ObjectEntity from "../entity/ObjectEntity.js"
import ObjectReferenceEntity from "../entity/ObjectReferenceEntity.js"
import ObjectSerializer from "./ObjectSerializer.js"
@@ -54,7 +55,6 @@ export default function initializeSerializerFactory() {
(array, insideString) =>
`(${array
.map(v =>
// @ts-expect-error
SerializerFactory.getSerializer(Utility.getType(v)).write(v, insideString) + ","
)
.join("")
@@ -104,7 +104,6 @@ export default function initializeSerializerFactory() {
(v, insideString) => {
let result = FormatTextEntity.lookbehind + "("
+ v.value.map(v =>
// @ts-expect-error
SerializerFactory.getSerializer(Utility.getType(v)).write(v, insideString)
).join(", ")
+ ")"
@@ -163,6 +162,11 @@ export default function initializeSerializerFactory() {
new Serializer(MacroGraphReferenceEntity, Serializer.bracketsWrapped)
)
SerializerFactory.registerSerializer(
MirroredEntity,
new Serializer(MirroredEntity)
)
SerializerFactory.registerSerializer(
Number,
new ToStringSerializer(Number)

View File

@@ -57,6 +57,10 @@ export default class BlueprintTemplate extends ITemplate {
/** @type {HTMLElement} */ nodesContainerElement
viewportSize = [0, 0]
#setViewportSize() {
}
/** @param {Blueprint} element */
initialize(element) {
super.initialize(element)
@@ -67,7 +71,13 @@ export default class BlueprintTemplate extends ITemplate {
)?.content.textContent
if (htmlTemplate) {
this.element.requestUpdate()
this.element.updateComplete.then(() => this.getPasteInputObject().pasted(htmlTemplate))
this.element.updateComplete.then(() => {
this.blueprint.mousePosition = [
Math.round(this.viewportSize[0] / 2),
Math.round(this.viewportSize[1] / 2),
]
this.getPasteInputObject().pasted(htmlTemplate)
})
}
}
@@ -252,13 +262,27 @@ export default class BlueprintTemplate extends ITemplate {
centerContentInViewport(smooth = true) {
let avgX = 0
let avgY = 0
let minX = Number.MAX_SAFE_INTEGER
let maxX = Number.MIN_SAFE_INTEGER
let minY = Number.MAX_SAFE_INTEGER
let maxY = Number.MIN_SAFE_INTEGER
const nodes = this.blueprint.getNodes()
for (const node of nodes) {
avgX += node.leftBoundary() + node.rightBoundary()
avgY += node.topBoundary() + node.bottomBoundary()
minX = Math.min(minX, node.leftBoundary())
maxX = Math.max(maxX, node.rightBoundary())
minY = Math.min(minY, node.topBoundary())
maxY = Math.max(maxY, node.bottomBoundary())
}
avgX = nodes.length > 0 ? Math.round(avgX / (2 * nodes.length)) : 0
avgY = nodes.length > 0 ? Math.round(avgY / (2 * nodes.length)) : 0
avgX = Math.round(maxX - minX <= this.viewportSize[0]
? (maxX + minX) / 2
: avgX / (2 * nodes.length)
)
avgY = Math.round(maxY - minY <= this.viewportSize[1]
? (maxY + minY) / 2
: avgY / (2 * nodes.length)
)
this.centerViewport(avgX, avgY, smooth)
}
}

View File

@@ -95,6 +95,7 @@ export default class LinkTemplate extends IFromToPositionedTemplate {
location => {
location[0] += Configuration.knotOffset[0]
location[1] += Configuration.knotOffset[1]
location = Utility.snapToGrid(location[0], location[1], Configuration.gridSize)
this.#createKnot(location)
}
)

View File

@@ -2,7 +2,7 @@
"compilerOptions": {
"checkJs": true,
"module": "commonjs",
"target": "ES2022",
"target": "ESNext",
},
"include": [
"js/**/*.js",