Setting up a Malleable Linkset
A Malleable Linkset (ML) is set up as follows:
1. The main ML script is put into the root prim of a given linkset
2. Prims or mesh objects in the Linkset that are moveable must have at least a '*' in their description
3. The ML Linkset inventory, which is the same as the inventory of its root, contains objects that can be rezzed and linked to the existing ML
Every object that goes into the ML inventory needs to be pre-configured as follows:
*<id>/<a,a,a>/<b,b,b> (asterisk, integer, slash, vector, slash, vector)
[Please note that the <id> is generated by the script]
where <a,a,a> is the contact point
and <b,b,b> is the contact orientation
Note:
A boolean argument was added to enable/disable the rotation, with the test for "&" in the parameters being used for that argument to the new MovePrim.
*/param1/param2/& in the description will cause an object to be translated to a new position without any rotations.
ML menu items can be prims/mesh objects linked to an existing ML
!PrimName will trigger PrimName function
E.g. !clone will duplicated selected object.
The current list of ML functions:
The precise behaviour of load and save commands depends on: (a) if the user is an administrator, and (b) if the button as assigned to a seat. Administrators can load and save the whole setup or the associated seat, whereas non-admins can only save their own seat's data. So a non-admin that is not on a seat has no access to load or save functions.
Outsourced commands
Note that since v0.71, due to the size of the main LM script, it is possible for additional scripts to interpret commands from the main LM and to call functions directly from outside the LM.
The LM main script will output a link message with numerical value LM_OUTSOURCE_COMMAND (-405510) for each command it executes, including commands which are ignored because they are unknown to the LM. The string portion of the link message will consist of comma-separated values: <command>,<seat number>,<argument>,<is admin?>. The key portion will contain the UUID of the avatar initiating the command.
To call a function from outside the LM, use the numerical value LM_EXECUTE_COMMAND (-405502), with the command and arguments (not CSV) as the string portion and the initiating avatar's UUID as the key portion.
At the time of writing, the Notecard Manager uses this method to implement interactive load/save/delete functions. Using this approach lessens the complexity and size of the main LM, which is already over capacity in terms of the default viewer's source lines (see here for fix). The runtime cost is negligible.
It is anticipated that as the needs of the LM continue to grow, this method of working will be used more and more.