Navigation
Unreal Engine C++ API Reference > Editor > MaterialEditor > UMaterialEditingLibrary
References
Module | MaterialEditor |
Header | /Engine/Source/Editor/MaterialEditor/Public/MaterialEditingLibrary.h |
Include | #include "MaterialEditingLibrary.h" |
Source | /Engine/Source/Editor/MaterialEditor/Private/MaterialEditingLibrary.cpp |
static [UMaterialExpression](API\Runtime\Engine\Materials\UMaterialExpression) * CreateMaterialExpressionEx ( [UMaterial](API\Runtime\Engine\Materials\UMaterial) * Material, [UMaterialFunction](API\Runtime\Engine\Materials\UMaterialFunction) * MaterialFunction, [TSubclassOf](API\Runtime\CoreUObject\Templates\TSubclassOf)< [UMaterialExpression](API\Runtime\Engine\Materials\UMaterialExpression) > ExpressionClass, [UObject](API\Runtime\CoreUObject\UObject\UObject) * SelectedAsset, int32 NodePosX, int32 NodePosY, bool bAllowMarkingPackageDirty )
Remarks
Create a new material expression node within the supplied material, optionally specifying asset to use
If a MaterialFunction and Material are specified, expression is added to Material and not MaterialFunction, assuming Material is a preview that will be copied to Function later by user.
Parameters
Name | Description |
---|---|
Material | Material asset to add an expression to |
MaterialFunction | Specified if adding an expression to a MaterialFunction, used as Outer for new expression object |
SelectedAsset | If specified, new node will attempt to use this asset, if of the appropriate type (e.g. Texture for a TextureSampler) |
ExpressionClass | Class of expression to add |
NodePosX | X position of new expression node |
NodePosY | Y position of new expression node |
bAllowMarkingPackageDirty | Packages can't be marked dirty outside of the game thread. If this is false, package will need to be dirtied through other means. |