mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-03 23:55:04 +08:00
Material function color and name
This commit is contained in:
@@ -149,6 +149,7 @@ export default class Configuration {
|
||||
materialExpressionLogarithm: "/Script/InterchangeImport.MaterialExpressionLogarithm",
|
||||
materialExpressionLogarithm10: "/Script/Engine.MaterialExpressionLogarithm10",
|
||||
materialExpressionLogarithm2: "/Script/Engine.MaterialExpressionLogarithm2",
|
||||
materialExpressionMaterialFunctionCall: "/Script/Engine.MaterialExpressionMaterialFunctionCall",
|
||||
materialExpressionSquareRoot: "/Script/Engine.MaterialExpressionSquareRoot",
|
||||
materialExpressionTextureCoordinate: "/Script/Engine.MaterialExpressionTextureCoordinate",
|
||||
materialExpressionTextureSample: "/Script/Engine.MaterialExpressionTextureSample",
|
||||
|
||||
@@ -97,6 +97,9 @@ export default class ObjectEntity extends IEntity {
|
||||
InputKey: {
|
||||
type: SymbolEntity,
|
||||
},
|
||||
MaterialFunction: {
|
||||
type: ObjectReferenceEntity,
|
||||
},
|
||||
bOverrideFunction: {
|
||||
type: Boolean,
|
||||
},
|
||||
@@ -319,6 +322,7 @@ export default class ObjectEntity extends IEntity {
|
||||
/** @type {ObjectReferenceEntity?} */ this.Enum
|
||||
/** @type {String[]?} */ this.EnumEntries
|
||||
/** @type {SymbolEntity?} */ this.InputKey
|
||||
/** @type {ObjectReferenceEntity?} */ this.MaterialFunction
|
||||
/** @type {Boolean?} */ this.bOverrideFunction
|
||||
/** @type {Boolean?} */ this.bInternalEvent
|
||||
/** @type {Boolean?} */ this.bConsumeInput
|
||||
@@ -618,12 +622,19 @@ export default class ObjectEntity extends IEntity {
|
||||
if (input.length > 0) {
|
||||
return input.map(v => Utility.printExponential(v)).reduce((acc, cur) => acc + "," + cur)
|
||||
}
|
||||
break
|
||||
case Configuration.paths.materialExpressionLogarithm:
|
||||
return "Ln"
|
||||
case Configuration.paths.materialExpressionLogarithm10:
|
||||
return "Log10"
|
||||
case Configuration.paths.materialExpressionLogarithm2:
|
||||
return "Log2"
|
||||
case Configuration.paths.materialExpressionMaterialFunctionCall:
|
||||
const materialFunction = this.getMaterialSubobject()?.MaterialFunction
|
||||
if (materialFunction) {
|
||||
return materialFunction.getName()
|
||||
}
|
||||
break
|
||||
case Configuration.paths.materialExpressionSquareRoot:
|
||||
return "Sqrt"
|
||||
case Configuration.paths.spawnActorFromClass:
|
||||
@@ -805,6 +816,8 @@ export default class ObjectEntity extends IEntity {
|
||||
case Configuration.paths.materialExpressionConstant3Vector:
|
||||
case Configuration.paths.materialExpressionConstant4Vector:
|
||||
return Configuration.nodeColors.yellow
|
||||
case Configuration.paths.materialExpressionMaterialFunctionCall:
|
||||
return Configuration.nodeColors.blue
|
||||
case Configuration.paths.materialExpressionTextureSample:
|
||||
return Configuration.nodeColors.darkBlue
|
||||
case Configuration.paths.materialExpressionTextureCoordinate:
|
||||
|
||||
Reference in New Issue
Block a user