Navigation
API > API/Plugins > API/Plugins/InterchangeImport > API/Plugins/InterchangeImport/MaterialX > API/Plugins/InterchangeImport/MaterialX/MaterialXUtils
Inheritance Hierarchy
References
| Module | InterchangeImport |
| Header | /Engine/Plugins/Interchange/Runtime/Source/Import/Public/MaterialX/MaterialXUtils/MaterialXBase.h |
| Include | #include "MaterialX/MaterialXUtils/MaterialXBase.h" |
Syntax
class FMaterialXBase : public TSharedFromThis< FMaterialXBase >
Variables
| Type | Name | Description | |
|---|---|---|---|
| UInterchangeBaseNodeContainer & | NodeContainer | ||
| const char * | NodeDefinition | It's up to the derive class to initialize it with the proper node definition |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FMaterialXBase
(
UInterchangeBaseNodeContainer& BaseNodeContainer |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddTexCoordToTiledImageNodes
(
MaterialX::ElementPtr Graph |
Add a texcoord input to the tiledimage nodes if the input is missing, and connect it to a texcoord node in the nodegraph This function should be called before the subgraphs substitution to avoid missing UVs input on a texture See for example standard_surface_brick_procedural where the tiledimage nodes have no texcoord input | |
| void | ConvertNeutralNodesToDot
(
MaterialX::ElementPtr NodeGraph |
Convert math nodes (add, sub, div, mul) that have a neutral input, to the MaterialX |
|
| MaterialX::NodePtr | CreateNode
(
MaterialX::ElementPtr NodeGraph, |
Helper function that create a MaterialX node, useful to insert a node between 2 nodes especially when an operation cannot be done in one pass If the node already exists in the graph, this one is returned | |
| FString | GetColorSpace
(
MaterialX::ElementPtr Element |
Return the innermost color space of an element in the current scope, if it has none, it will take the one from its parents | |
| MaterialX::InputPtr | GetInput
(
MaterialX::NodePtr Node, |
Retrieve the input from a surfaceshader node, or take the default input from the library, this function should only be called after testing the MaterialX libraries have been successfully imported, meaning the node definition of the surfaceshader should always be valid | |
| FLinearColor | GetLinearColor
(
MaterialX::InputPtr Input |
Helper function that returns a linear color after a color space conversion, the function makes no assumption on the input, and it should have a value of Color3-4 type | |
| void | Translate
(
MaterialX::NodePtr Node |
||
| void | UpdateDocumentRecursively
(
MaterialX::GraphElementPtr Graph |
Update a MaterialX Document recursively by either initializing nodes (like |
Typedefs
| Name | Description |
|---|---|
| FAttributeValue | |
| FAttributeValueArray | |
| FInputToCopy | |
| FInputToCreate |