Navigation
API > API/Plugins > API/Plugins/InterchangeImport > API/Plugins/InterchangeImport/FMaterialXSurfaceShaderAbstract
Description
Add an attribute to a shader node from the given MaterialX input. Only floats and linear colors are supported.
| Name | AddAttribute |
| Type | function |
| Header File | /Engine/Plugins/Interchange/Runtime/Source/Import/Public/MaterialX/MaterialXUtils/MaterialXSurfaceShaderAbstract.h |
| Include Path | #include "MaterialX/MaterialXUtils/MaterialXSurfaceShaderAbstract.h" |
| Source | /Engine/Plugins/Interchange/Runtime/Source/Import/Private/MaterialX/MaterialXUtils/MaterialXSurfaceShaderAbstract.cpp |
bool AddAttribute
(
MaterialX::InputPtr Input,
const FString & InputChannelName,
UInterchangeShaderNode * ShaderNode,
int32 OutputIndex,
bool bBoolAsScalar
)
true if the attribute was successfully added.
Parameters
| Name | Remarks |
|---|---|
| Input | The MaterialX input to retrieve and add the value from. Must be of type float/color/vector. |
| InputChannelName | The name of the shader node's input to add the attribute. |
| ShaderNode | The shader node to which we want to add the attribute. |
| bBoolAsScalar | Create a scalar instead of a static bool parameter when applicable. |