From dd4b4f6b416db0dcedee4e28f0dedaf87cbf99b6 Mon Sep 17 00:00:00 2001 From: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Date: Thu, 26 Mar 2026 03:02:34 +0000 Subject: [PATCH 1/3] Swap skinned mesh from another slot / Unswap skinned mesh --- .../Catalogs/TEN Node Catalogs/Moveables.lua | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/TombLib/TombLib/Catalogs/TEN Node Catalogs/Moveables.lua b/TombLib/TombLib/Catalogs/TEN Node Catalogs/Moveables.lua index e5f8f1232c..200a7f81a0 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, [0 | 128 ], {0} , If set, swaps skinned mesh with bone mesh with a specified index.\nUse if you have several skinned meshes (e.g. outfits) in a single slot." + +LevelFuncs.Engine.Node.SwapSkinnedMesh = function(moveable,target,mesh) + local mov = TEN.Objects.GetMoveableByName(moveable) + local swapMesh = (mesh ~= nil and mesh ~= 0) and mesh or nil + mov:SwapSkinnedMesh(target, 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 From e9d9c4f34aa215f25f910e9fdbb89af92586c7a4 Mon Sep 17 00:00:00 2001 From: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Date: Thu, 26 Mar 2026 03:09:45 +0000 Subject: [PATCH 2/3] Update TombLib/TombLib/Catalogs/TEN Node Catalogs/Moveables.lua Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- TombLib/TombLib/Catalogs/TEN Node Catalogs/Moveables.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TombLib/TombLib/Catalogs/TEN Node Catalogs/Moveables.lua b/TombLib/TombLib/Catalogs/TEN Node Catalogs/Moveables.lua index 200a7f81a0..8b231a5cdc 100644 --- a/TombLib/TombLib/Catalogs/TEN Node Catalogs/Moveables.lua +++ b/TombLib/TombLib/Catalogs/TEN Node Catalogs/Moveables.lua @@ -662,7 +662,7 @@ end -- !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, [0 | 128 ], {0} , If set, swaps skinned mesh with bone mesh with a specified index.\nUse if you have several skinned meshes (e.g. outfits) in a single slot." +-- !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,target,mesh) local mov = TEN.Objects.GetMoveableByName(moveable) From 5f0df4ed30f885936eb0397d1775f6053f8044ac Mon Sep 17 00:00:00 2001 From: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Date: Thu, 26 Mar 2026 03:10:13 +0000 Subject: [PATCH 3/3] Update TombLib/TombLib/Catalogs/TEN Node Catalogs/Moveables.lua Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- TombLib/TombLib/Catalogs/TEN Node Catalogs/Moveables.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TombLib/TombLib/Catalogs/TEN Node Catalogs/Moveables.lua b/TombLib/TombLib/Catalogs/TEN Node Catalogs/Moveables.lua index 8b231a5cdc..1799668054 100644 --- a/TombLib/TombLib/Catalogs/TEN Node Catalogs/Moveables.lua +++ b/TombLib/TombLib/Catalogs/TEN Node Catalogs/Moveables.lua @@ -664,10 +664,10 @@ end -- !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,target,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(target, swapMesh) + mov:SwapSkinnedMesh(targetSlot, swapMesh) end -- !Name "Unswap skinned mesh"