mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:50:33 +08:00
57 lines
1.7 KiB
JavaScript
Executable File
57 lines
1.7 KiB
JavaScript
Executable File
import GuidEntity from "./GuidEntity"
|
|
import IEntity from "./IEntity"
|
|
import LocalizedTextEntity from "./LocalizedTextEntity"
|
|
import ObjectReferenceEntity from "./ObjectReferenceEntity"
|
|
import PinReferenceEntity from "./PinReferenceEntity"
|
|
import TypeInitialization from "./TypeInitialization"
|
|
|
|
export default class PinEntity extends IEntity {
|
|
|
|
static lookbehind = "Pin"
|
|
static attributes = {
|
|
PinId: GuidEntity,
|
|
PinName: "",
|
|
PinFriendlyName: new TypeInitialization(LocalizedTextEntity, false, null),
|
|
PinToolTip: "",
|
|
Direction: new TypeInitialization(String, false, ""),
|
|
PinType: {
|
|
PinCategory: "",
|
|
PinSubCategory: "",
|
|
PinSubCategoryObject: ObjectReferenceEntity,
|
|
PinSubCategoryMemberReference: null,
|
|
PinValueType: null,
|
|
ContainerType: ObjectReferenceEntity,
|
|
bIsReference: false,
|
|
bIsConst: false,
|
|
bIsWeakPointer: false,
|
|
bIsUObjectWrapper: false
|
|
},
|
|
LinkedTo: [PinReferenceEntity],
|
|
DefaultValue: "",
|
|
AutogeneratedDefaultValue: "",
|
|
PersistentGuid: GuidEntity,
|
|
bHidden: false,
|
|
bNotConnectable: false,
|
|
bDefaultValueIsReadOnly: false,
|
|
bDefaultValueIsIgnored: false,
|
|
bAdvancedView: false,
|
|
bOrphanedPin: false,
|
|
}
|
|
|
|
isInput() {
|
|
return !this.bHidden && this.Direction !== "EGPD_Output"
|
|
}
|
|
|
|
isOutput() {
|
|
return !this.bHidden && this.Direction === "EGPD_Output"
|
|
}
|
|
|
|
isConnected() {
|
|
return this.LinkedTo.length > 0
|
|
}
|
|
|
|
getType() {
|
|
return this.PinType.PinCategory ?? "object"
|
|
}
|
|
}
|