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:
barsdeveloper
2024-05-20 12:56:36 +02:00
committed by GitHub
parent 08e2e8edd8
commit a5813d0b4d
72 changed files with 6903 additions and 4879 deletions

View File

@@ -80,7 +80,7 @@ export default class Serializer {
attributeKeyPrinter = this.attributeKeyPrinter
) {
let result = ""
const keys = Object.keys(entity)
const keys = entity._keys ?? Object.keys(entity)
let first = true
for (const key of keys) {
const value = entity[key]
@@ -150,15 +150,18 @@ export default class Serializer {
*/
showProperty(entity, key) {
if (entity instanceof IEntity) {
if (
AttributeInfo.getAttribute(entity, key, "ignored")
|| AttributeInfo.getAttribute(entity, key, "silent") && Utility.equals(
AttributeInfo.getAttribute(entity, key, "default"),
entity[key]
)
) {
if (AttributeInfo.getAttribute(entity, key, "ignored")) {
return false
}
if (AttributeInfo.getAttribute(entity, key, "silent")) {
let defaultValue = AttributeInfo.getAttribute(entity, key, "default")
if (defaultValue instanceof Function) {
defaultValue = defaultValue(entity)
}
if (Utility.equals(entity[key], defaultValue)) {
return false
}
}
}
return true
}