Create knot on link double click

This commit is contained in:
barsdeveloper
2022-11-15 14:31:26 +01:00
parent decef44d02
commit f2c09faedb
26 changed files with 2136 additions and 1800 deletions

View File

@@ -94,7 +94,7 @@ export default class IEntity extends Observable {
}
// @ts-expect-error
const attributes = this.constructor.attributes
if (values.constructor !== Object && Object.getOwnPropertyNames(attributes).length == 1) {
if (values.constructor !== Object && Object.getOwnPropertyNames(attributes).length === 1) {
// Where there is just one attribute, option can be the value of that attribute
values = {
[Object.getOwnPropertyNames(attributes)[0]]: values

View File

@@ -8,6 +8,11 @@ export default class ObjectReferenceEntity extends IEntity {
}
constructor(options = {}) {
if (options.constructor !== Object) {
options = {
path: options
}
}
super(options)
/** @type {String} */ this.type
/** @type {String} */ this.path

View File

@@ -37,7 +37,7 @@ export default class PinEntity extends IEntity {
PinId: GuidEntity,
PinName: "",
PinFriendlyName: new TypeInitialization(LocalizedTextEntity, false, null),
PinToolTip: "",
PinToolTip: new TypeInitialization(String, false, ""),
Direction: new TypeInitialization(String, false, ""),
PinType: {
PinCategory: "",

View File

@@ -0,0 +1,21 @@
import ObjectEntity from "../ObjectEntity"
import ObjectReferenceEntity from "../ObjectReferenceEntity"
import PinEntity from "../PinEntity"
export default class KnotEntity extends ObjectEntity {
constructor(options = {}) {
super(options)
this.Class = new ObjectReferenceEntity("/Script/BlueprintGraph.K2Node_Knot")
this.Name = "K2Node_Knot"
this.CustomProperties = [
new PinEntity({
PinName: "InputPin",
}),
new PinEntity({
PinName: "OutputPin",
Direction: "EGPD_Output",
})
]
}
}