mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-13 16:44:49 +08:00
More Niagara tests
This commit is contained in:
@@ -76,5 +76,8 @@ export default function nodeColor(entity) {
|
||||
if (entity.bIsPureFunc?.valueOf()) {
|
||||
return Configuration.nodeColors.green
|
||||
}
|
||||
if (entity["Input"]?.["Name"]) {
|
||||
return Configuration.nodeColors.gray
|
||||
}
|
||||
return Configuration.nodeColors.blue
|
||||
}
|
||||
|
||||
@@ -10,12 +10,13 @@ export default function nodeSubtitle(entity) {
|
||||
switch (entity.getType()) {
|
||||
case Configuration.paths.addDelegate:
|
||||
case Configuration.paths.clearDelegate:
|
||||
case Configuration.paths.callDelegate:
|
||||
case Configuration.paths.removeDelegate:
|
||||
return null
|
||||
}
|
||||
const targetPin = entity
|
||||
.getPinEntities()
|
||||
.find(pin => pin.PinName?.toString() === "self" && pinTitle(pin) === "Target")
|
||||
.find(pin => !pin.isHidden() && pin.PinName?.toString() === "self" && pinTitle(pin) === "Target")
|
||||
if (targetPin) {
|
||||
const target = entity.FunctionReference?.MemberParent?.getName()
|
||||
?? targetPin.PinType?.PinSubCategoryObject?.getName()
|
||||
|
||||
@@ -250,8 +250,9 @@ export default function nodeTitle(entity) {
|
||||
if (className === Configuration.paths.macro) {
|
||||
return Utility.formatStringName(entity.MacroGraphReference?.getMacroName())
|
||||
}
|
||||
if (entity.isMaterial() && entity.getMaterialSubobject()) {
|
||||
let result = nodeTitle(entity.getMaterialSubobject())
|
||||
const materialSubobject = entity.getMaterialSubobject()
|
||||
if (materialSubobject) {
|
||||
let result = nodeTitle(materialSubobject)
|
||||
result = result.match(/Material Expression (.+)/)?.[1] ?? result
|
||||
return result
|
||||
}
|
||||
@@ -457,7 +458,10 @@ export default function nodeTitle(entity) {
|
||||
className.startsWith(prefix = "/Script/NiagaraEditor.NiagaraNodeParameter")
|
||||
|| className.startsWith(prefix = "/Script/NiagaraEditor.NiagaraNode")
|
||||
) {
|
||||
return Utility.formatStringName(className.substring(prefix.length))
|
||||
return entity["Input"]?.["Name"]?.toString() ?? Utility.formatStringName(className.substring(prefix.length))
|
||||
}
|
||||
if (entity.ParameterName) {
|
||||
return entity.ParameterName.toString()
|
||||
}
|
||||
return Utility.formatStringName(entity.getNameAndCounter()[0])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user