Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions TombLib/TombLib/Catalogs/TEN Node Catalogs/Moveables.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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