mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:50:33 +08:00
Create knot on link double click
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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: "",
|
||||
|
||||
21
js/entity/objects/KnotEntity.js
Normal file
21
js/entity/objects/KnotEntity.js
Normal 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",
|
||||
})
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user