summaryrefslogtreecommitdiff
path: root/indra/newview/scripts/lua/require
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-09-04 09:41:39 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-09-04 09:41:39 -0400
commitfe2b1b8a80abceada50e5801dbe4ff5ed781bff1 (patch)
treeae07c021b49b94ebc1fe718a162b61bd105aebfb /indra/newview/scripts/lua/require
parentd67ad5da3b5a37f7b4cb78e686ae36f31c513153 (diff)
parent487973d3f0ee9b8583b3d977ca6a405cba5fe518 (diff)
Merge branch 'release/luau-scripting' into lua-resultset
Diffstat (limited to 'indra/newview/scripts/lua/require')
-rw-r--r--indra/newview/scripts/lua/require/LLAgent.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/require/LLAgent.lua b/indra/newview/scripts/lua/require/LLAgent.lua
index 5ee092f2f6..07ef1e0b0b 100644
--- a/indra/newview/scripts/lua/require/LLAgent.lua
+++ b/indra/newview/scripts/lua/require/LLAgent.lua
@@ -53,4 +53,22 @@ function LLAgent.removeCamParams()
leap.send('LLAgent', {op = 'removeCameraParams'})
end
+-- Play specified animation by "item_id" locally
+-- if "inworld" is specified as true, animation will be played inworld instead
+function LLAgent.playAnimation(...)
+ local args = mapargs('item_id,inworld', ...)
+ args.op = 'playAnimation'
+ return leap.request('LLAgent', args)
+end
+
+function LLAgent.stopAnimation(item_id)
+ return leap.request('LLAgent', {op = 'stopAnimation', item_id=item_id})
+end
+
+-- Get animation info by "item_id"
+-- reply contains "duration", "is_loop", "num_joints", "asset_id", "priority"
+function LLAgent.getAnimationInfo(item_id)
+ return leap.request('LLAgent', {op = 'getAnimationInfo', item_id=item_id}).anim_info
+end
+
return LLAgent