mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-19 04:07:33 +08:00
Large refactoring and new nodes
* Fix node reference when changing elements * Fix ScriptVariables parsing * Fix invariant text and niagara types * Niagara convert nodes * Move node tests to own files * More Niagara tests * Niagara float and smaller fixes * More Decoding * More decoding * WIP * Float is real * WIP * More types and colors * Test case and small polish * WIP * WIP * Fix niagara script variables merging * Fix Niagara variables * Fixing mirrored ExportPath * Fix Export paths name adjustments * Simplify arc calculation * Simplify a bit arc calculation * source / destionation => origin / target * Minor refactoring * Fix switched link position * Rename some properties for uniformity * Fix input escape * Simplify test * About window * Dialog backdrop style * About dialog touches * Remove dependency and minot improvement * Light mode * Fix link location and css small improvement * Link direction and minor fixes * Some minor fixes and refactoring * Refactoring WIP * Shorting repetitive bits * More tests * Simplify linking tests
This commit is contained in:
30
js/decoding/pinTemplate.js
Normal file → Executable file
30
js/decoding/pinTemplate.js
Normal file → Executable file
@@ -7,6 +7,7 @@ import IntPinTemplate from "../template/pin/IntPinTemplate.js"
|
||||
import LinearColorPinTemplate from "../template/pin/LinearColorPinTemplate.js"
|
||||
import NamePinTemplate from "../template/pin/NamePinTemplate.js"
|
||||
import PinTemplate from "../template/pin/PinTemplate.js"
|
||||
import ReadonlyNamePinTemplate from "../template/pin/ReadonlyInputPinTemplate.js"
|
||||
import RealPinTemplate from "../template/pin/RealPinTemplate.js"
|
||||
import ReferencePinTemplate from "../template/pin/ReferencePinTemplate.js"
|
||||
import RotatorPinTemplate from "../template/pin/RotatorPinTemplate.js"
|
||||
@@ -14,11 +15,14 @@ import StringPinTemplate from "../template/pin/StringPinTemplate.js"
|
||||
import Vector2DPinTemplate from "../template/pin/Vector2DPinTemplate.js"
|
||||
import Vector4DPinTemplate from "../template/pin/Vector4DPinTemplate.js"
|
||||
import VectorPinTemplate from "../template/pin/VectorPinTemplate.js"
|
||||
import pinTitle from "./pinTitle.js"
|
||||
|
||||
const p = Configuration.paths
|
||||
const inputPinTemplates = {
|
||||
"bool": BoolPinTemplate,
|
||||
"byte": IntPinTemplate,
|
||||
"enum": EnumPinTemplate,
|
||||
"float": RealPinTemplate,
|
||||
"int": IntPinTemplate,
|
||||
"int64": Int64PinTemplate,
|
||||
"MUTABLE_REFERENCE": ReferencePinTemplate,
|
||||
@@ -26,14 +30,17 @@ const inputPinTemplates = {
|
||||
"real": RealPinTemplate,
|
||||
"rg": Vector2DPinTemplate,
|
||||
"string": StringPinTemplate,
|
||||
[Configuration.paths.linearColor]: LinearColorPinTemplate,
|
||||
[Configuration.paths.niagaraBool]: BoolPinTemplate,
|
||||
[Configuration.paths.niagaraPosition]: VectorPinTemplate,
|
||||
[Configuration.paths.rotator]: RotatorPinTemplate,
|
||||
[Configuration.paths.vector]: VectorPinTemplate,
|
||||
[Configuration.paths.vector2D]: Vector2DPinTemplate,
|
||||
[Configuration.paths.vector3f]: VectorPinTemplate,
|
||||
[Configuration.paths.vector4f]: Vector4DPinTemplate,
|
||||
[p.linearColor]: LinearColorPinTemplate,
|
||||
[p.niagaraBool]: BoolPinTemplate,
|
||||
[p.niagaraFloat]: RealPinTemplate,
|
||||
[p.niagaraInt32]: IntPinTemplate,
|
||||
[p.niagaraPosition]: VectorPinTemplate,
|
||||
[p.rotator]: RotatorPinTemplate,
|
||||
[p.vector]: VectorPinTemplate,
|
||||
[p.vector2D]: Vector2DPinTemplate,
|
||||
[p.vector2f]: Vector2DPinTemplate,
|
||||
[p.vector3f]: VectorPinTemplate,
|
||||
[p.vector4f]: Vector4DPinTemplate,
|
||||
}
|
||||
|
||||
/** @param {PinEntity<IEntity>} entity */
|
||||
@@ -44,9 +51,12 @@ export default function pinTemplate(entity) {
|
||||
if (entity.PinType.bIsReference?.valueOf() && !entity.PinType.bIsConst?.valueOf()) {
|
||||
return inputPinTemplates["MUTABLE_REFERENCE"]
|
||||
}
|
||||
const type = entity.getType()
|
||||
if (type === "exec") {
|
||||
if (entity.isExecution()) {
|
||||
return ExecPinTemplate
|
||||
}
|
||||
if (entity.PinName?.toString() === "self" && pinTitle(entity) === "Target") {
|
||||
return ReadonlyNamePinTemplate
|
||||
}
|
||||
const type = entity.getType()
|
||||
return (entity.isInput() ? inputPinTemplates[type] : PinTemplate) ?? PinTemplate
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user