diff --git a/TombLib/TombLib/Catalogs/TEN Node Catalogs/Moveables.lua b/TombLib/TombLib/Catalogs/TEN Node Catalogs/Moveables.lua index e5f8f1232..179966805 100644 --- a/TombLib/TombLib/Catalogs/TEN Node Catalogs/Moveables.lua +++ b/TombLib/TombLib/Catalogs/TEN Node Catalogs/Moveables.lua @@ -655,4 +655,27 @@ LevelFuncs.Engine.Node.HideInteractionHighlight = function(moveable) local mov = GetMoveableByName(moveable) mov:HideInteractionHighlight() +end + +-- !Name "Swap skinned mesh from another slot." +-- !Section "Moveable parameters" +-- !Description "Swap skinned mesh of a moveable. Use this to replace one skinned mesh with another." +-- !Arguments "NewLine, Moveables, Destination moveable." +-- !Arguments "NewLine, WadSlots, 70, Target moveable." +-- !Arguments "Numerical, 30, [1 | 128 ], {0} , If > 0, swaps skinned mesh with bone mesh with a specified index.\nUse if you have several skinned meshes (e.g. outfits) in a single slot. A value of 0 leaves the default mesh." + +LevelFuncs.Engine.Node.SwapSkinnedMesh = function(moveable, targetSlot, mesh) + local mov = TEN.Objects.GetMoveableByName(moveable) + local swapMesh = (mesh ~= nil and mesh ~= 0) and mesh or nil + mov:SwapSkinnedMesh(targetSlot, swapMesh) +end + +-- !Name "Unswap skinned mesh" +-- !Section "Moveable parameters" +-- !Description "Unset skinned mesh swap of a moveable.\nUse this to bring back original unswapped skinned mesh." +-- !Arguments "NewLine, Moveables, Destination moveable." + +LevelFuncs.Engine.Node.UnswapSkinnedMesh = function(moveable) + local mov = TEN.Objects.GetMoveableByName(moveable) + mov:UnswapSkinnedMesh() end \ No newline at end of file