Mod:Creation Kit/ApplyMaterialSwap - ObjectReference

F4SE Member of: Mod:Creation Kit/ObjectReference Script

Applies a Mod:Creation Kit/Material Swap to this reference, optionally renaming the material.

Syntax
MatSwap:RemapData[] Function ApplyMaterialSwap(MatSwap mSwap, bool renameMaterial = false) Native

Parameters

 * mSwap: The Mod:Creation Kit/Material Swap applied to this reference.
 * renameMaterial: Rename material allows independent control over the Mod:Creation Kit/Initialization File setting.
 * Default: false

Return Value

 * Returns the source/target RemapData pairs that succeeded in swapping.

Examples
Game.GetPlayer.ApplyMaterialSwap(MyMaterialSwap)