FMaterialEditorUtilities::CreateNewMaterialExpression

Creates a new material expression of the specified class on the material represented by a graph.

Unreal Engine C++ API Reference > Editor > MaterialEditor > FMaterialEditorUtilities

References

   
Module MaterialEditor
Header /Engine/Source/Editor/MaterialEditor/Public/MaterialEditorUtilities.h
Include #include "MaterialEditorUtilities.h"
Source /Engine/Source/Editor/MaterialEditor/Private/MaterialEditorUtilities.cpp
static [UMaterialExpression](API\Runtime\Engine\Materials\UMaterialExpression) * CreateNewMaterialExpression
(
    const class [UEdGraph](API\Runtime\Engine\EdGraph\UEdGraph) * Graph,
    [UClass](API\Runtime\CoreUObject\UObject\UClass) * NewExpressionClass,
    const FVector2D & NodePos,
    bool bAutoSelect,
    bool bAutoAssignResource
)

Remarks

Creates a new material expression of the specified class on the material represented by a graph.

Parameters

Name Description
Graph Graph representing a material.
NewExpressionClass The type of material expression to add. Must be a child of UMaterialExpression.
NodePos Position of the new node.
bAutoSelect If true, deselect all expressions and select the newly created one.
bAutoAssignResource If true, assign resources to new expression.

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library