summaryrefslogtreecommitdiff
path: root/indra/newview/scripts/lua
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2024-08-30 12:18:20 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2024-08-30 12:18:20 +0300
commit6e47dc1af90c242c792c90e93d013355c9a43b97 (patch)
tree406c8d49cbb6e759c8eb4dad7b3f4263f8acbddf /indra/newview/scripts/lua
parent11e6c77129ae27756df627ccc1ea0ffa279976e6 (diff)
Add Lua api to start/stop playing animation
Diffstat (limited to 'indra/newview/scripts/lua')
-rw-r--r--indra/newview/scripts/lua/require/LLAgent.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/require/LLAgent.lua b/indra/newview/scripts/lua/require/LLAgent.lua
index 5ee092f2f6..56907f53cd 100644
--- a/indra/newview/scripts/lua/require/LLAgent.lua
+++ b/indra/newview/scripts/lua/require/LLAgent.lua
@@ -53,4 +53,18 @@ function LLAgent.removeCamParams()
leap.send('LLAgent', {op = 'removeCameraParams'})
end
+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
+
+function LLAgent.getAnimationInfo(item_id)
+ return leap.request('LLAgent', {op = 'getAnimationInfo', item_id=item_id}).anim_info
+end
+
return LLAgent