Avatar Appearance

From libopenmetaverse - libomv - Developer Wiki

Jump to: navigation, search

Version 0.8.0 and newer

Release 0.8.0 and newer deal with appearance settings automatically if you:

  • Make sure you copy folder openmetaverse_data to your clients bin directory.
  • Make sure you have one of the following copied to your bots/clients bin directory
    • openjpeg-dotnet.dll (Windows/.NET and Windows/Mono)
    • openjpeg-dotnet-x86_64.dll (64-bit versions of Windows)
    • libopenjpeg-dotnet- (Apple OSX/Mono)
    • libopenjpeg-dotnet- (Linux/Mono 32bit)
    • libopenjpeg-dotnet- (Linux/Mono x86_64)

For Linux (all architectures) you will also need OpenMetaverse.dll.config copied to your bot/clients bin directory

Your appearance cannot contain any textures from the Library (These "Linden" Textures cannot be downloaded and the bake will fail or produce strange results)

Older versions

The library supports basic appearance baking, which means it can set your previous appearance set in the viewer or set your avatars appearance using items stored in a folder in your inventory.

When you connect to your first region always use SetPreviousAppearance(true);

Meaning make sure you check its the current Sim (The typical mistake is that people do it for all simulator connections)

public void Network_OnEventQueueRuning(Simulator simulator) {
            if (simulator==client.Network.CurrentSim)

When you cross regions you can use the following. This needs to be sent after initial login and anytime you switch from one simulator to another. The best way of doing this is in the OnCurrentSimChanged event

public override void Network_OnCurrentSimChanged(Simulator PreviousSimulator)
            if (PreviousSimulator != null)

Dont forget before you connect to register the above code in your GridClient:

       // subscribe to the events
       Client.Network.OnCurrentSimChanged += Network_OnCurrentSimChanged;
       Client.Network.OnEventQueueRuning += Network_OnEventQueueRuning;