/Engine/Source/Editor/MaterialEditor/Public/MaterialEditingLibrary.h
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.
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 )