mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:50:33 +08:00
Niagara and Metasound nodes WIP
* Keep track of entities * Fix renaming * Niagara variables wip * Several niagara decode and test * Move nodeTemplate code to dedicated file, self node added * Move node decoding functions to dedicated files * Move pin decoding logic to dedicated files * Accept space separated keys in objects * Build * Prevent a crash in case of incomplete object * Avoid creating objects unnecessarily * types formatting * Initial metasound style * Common pcg nodes colors * Fix string serialization * Metasound new styles and fixes * More metasound styles and colors * WIP * Several fixes * More tests and fixes * Clean gitignore
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import IInput from "../IInput.js"
|
||||
import ObjectSerializer from "../../serialization/ObjectSerializer.js"
|
||||
import IInput from "../IInput.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../IInput.js").Options & {
|
||||
@@ -32,10 +32,15 @@ export default class Copy extends IInput {
|
||||
}
|
||||
|
||||
getSerializedText() {
|
||||
return this.blueprint
|
||||
.getNodes(true)
|
||||
.map(node => Copy.#serializer.write(node.entity, false))
|
||||
.join("")
|
||||
const allNodes = this.blueprint.getNodes(true).map(n => n.entity)
|
||||
const exported = allNodes.filter(n => n.isExported).map(n => Copy.#serializer.write(n, false))
|
||||
const result = allNodes.filter(n => !n.isExported).map(n => Copy.#serializer.write(n, false))
|
||||
if (exported.length) {
|
||||
this.blueprint.entity.ExportedNodes = btoa(exported.join(""))
|
||||
result.splice(0, 0, Copy.#serializer.write(this.blueprint.entity, false))
|
||||
delete this.blueprint.entity.ExportedNodes
|
||||
}
|
||||
return result.join("")
|
||||
}
|
||||
|
||||
copied() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import IInput from "../IInput.js"
|
||||
import ObjectSerializer from "../../serialization/ObjectSerializer.js"
|
||||
import IInput from "../IInput.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../IInput.js").Options & {
|
||||
|
||||
@@ -62,6 +62,6 @@ export default class Paste extends IInput {
|
||||
node.setSelected(true)
|
||||
})
|
||||
this.blueprint.addGraphElement(...nodes)
|
||||
return true
|
||||
return nodes
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user