Export an Object to an OAR File

31 July 2019

  • C10 - added the selection parameter.

25 February 2017

  • Release 9.155 - added.
exportoar (Commands)
TypeCorrade progressive command
Commandexportoar
DescriptionThe exportoar command can be used to export an object (including those attached to avatars), along with all the necessary textures to an OAR (OpenSim ARchive).
Permissionsinteract, system (if path is specified)
Parametersgroup, password, item, entity
Last ChangesRelease 9.155 - added.

The exportoar command can be used to export an object (including those attached to avatars), along with all the necessary textures to an OAR (OpenSim ARchive).

Command Required Parameters Required Corrade Permissions Example
exportoar group, password, item, entity interact, system (if path is specified)
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // Export an object named "Mouse"
            "command", "exportoar",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "entity", "object",
            // NOTE: or an UUID can be passed
            // NOTE: this must be the name or
            // the UUID of an object (a root primitive).
            "item", "Mouse",
            "range", 5
            "callback", wasURLEscape(URL)
        ]
    )
);
Optional Parameter Possible Value Description
range A range in meters. The spherical distance from Corrade in which to locate the item.
selection attached, rezzed or all (default: all) Either attached, rezzed or all for selecting only primitives or objects attached to avatars, primitives or objects rezzed in-world or all primitives or objects respectively.
Optional Parameter Possible Value Description
path A path-name ending in a file name (e.g.: C:\\Data\\OARs\\Mouse.oar, or /mnt/data/Mouse.oar) If a path is specified, then the asset will be saved to the file name indicated by the path.

In case the path optional parameter is not specified, then the OAR will be created, encoded as a Base64 string, then URI escaped and then placed as the value to the data key from the callback. If the path parameter is specified, then the data will be saved to the indicated path.

Remarks

  • An OAR file is a Tar archive (tape archive) with a specific structure that can be imported into OpenSim.
  • Contrary to exportdae and exportxml, OAR archives can contain object contents - one level deep. In other words, you can export an object that contains assets (such as clothes, textures, sounds, etc…) but the exportoar command will not be able to export objects contained within objects (that applies to bunched objects as well).
  • Contrary to some distinguished viewers, Corrade will only return data if it has succeeded in downloading all the assets, and successfully created an OAR archive. If at any point there is a failure, Corrade will break execution and return the error. To that effect, the exportoar command does not return partial-results, as in exports with missing assets but will only return completely successful exports.
  • Setting the selection parameter appropriately when it is known beforehand whether the sought object is either attached to an avatar or rezzed in-world can greatly improve the search time and speed up the command.

secondlife/scripted_agents/corrade/api/commands/exportoar.txt · Last modified: 2022/11/24 07:46 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.