New LSL llAnimeshEnabled(integer enabled); Toggle Animesh Property on/off
Neon Zombie
New LSL function that allows scripts to toggle an object’s Animesh property state at runtime.
llAnimeshEnabled(integer enabled);
## Overview
Currently, enabling Animesh on an object significantly increases its land impact, even when the object is idle. In contrast, a comparable non-Animesh object—especially one with well-optimized geometry and materials—can often remain at a land impact of 1.
At the same time, Animesh animation itself is already fully script-driven. Functions like:
- llStartObjectAnimation(string anim)
- llStopObjectAnimation(string anim)
- llGetObjectAnimationNames()
allow scripts to control animation playback dynamically. However, these functions only operate
after
an object is already in an Animesh-enabled state.This creates a structural limitation: creators can control
what
an object does, but not whether it needs to be Animesh at all
at a given moment.## How Animesh Currently Works
Animesh objects function by associating a skeleton with a rigged mesh linkset. When a script plays an animation, the skeleton drives deformation of the mesh.
Importantly:
- An object does nothing by defaultwhen set to Animesh
- Animations must be explicitly triggered via script
- The visual position of the mesh is driven by the skeleton and active animations, not strictly the object’s base transform
This means Animesh is fundamentally an
on-demand animation system
, but it is currently forced to be always enabled at the object level
, regardless of whether animations are playing.## Problem
There is currently no way to:
- Disable Animesh when no animations are running
- Return an object to a low land impact idle state
- Dynamically enable Animesh only when animation is required
As a result, creators must choose between:
- Keeping Animesh permanently enabled (high land impact, unnecessary overhead)
- Building complex systems involving object swapping, rez/re-rez logic, or duplicate assets
## Use Case
There is a strong need for objects that can dynamically transition between static and animated states. For example:
- A robot or pet that remains dormant until activated
- Creatures that only animate when a user is nearby
- Props that “wake up” briefly to perform an action
- Environmental elements that animate only during interaction
In all of these cases, the object does not need continuous skeletal evaluation.
## Expected Behavior
- enabled = TRUE
- Enables Animesh on the object
- Allows use of
llStartObjectAnimation
and related functions- enabled = FALSE
- Disables Animesh
- Stops all active animations
- Returns the object to static mesh behavior
- Restores lower land impact where applicable
## Benefits
- Land Impact Optimization
Objects only incur Animesh cost when actively animating
- Performance Efficiency
Reduces unnecessary skeletal evaluation on idle objects
- Cleaner Content Architecture
Eliminates the need for duplicate objects or rez-based workarounds
- Better Alignment with Existing API Design
Complements existing animation control functions by adding missing state control
## Additional Considerations
- State transitions should preserve:
- Object transform
- Linkset integrity
- Script execution state
- Simulator safeguards may be needed:
- Throttling or cooldown on toggling
- Permissions checks to prevent abuse
- Documentation should clarify:
- Effects on physics and collision
- Bounding box changes
- Interaction with pathfinding and attachments
Log In
Tapple Gao
I'd rather this was a primitive param:
llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_ANIMATED_MESH, TRUE]);
llGetLinkPrimitiveParams(LINK_THIS, [PRIM_ANIMATED_MESH]);
Though, we can alread test animesh:
list params = llGetLinkPrimitiveParams(linkNum, [PRIM_TYPE]);
integer isAnimesh = llList2Integer(params, 0) == PRIM_TYPE_SCULPT && (llList2Integer(params, 2) & PRIM_SCULPT_FLAG_ANIMESH);