Previous topic

agentmanager

Next topic

assets

This Page

appearance

class pyogp.lib.base.appearance.AvatarTexture(TextureIndex, TextureID=None)
Represents 1 of the 21 baked and not baked textures of an avatar.
class pyogp.lib.base.appearance.BakedTexture(bakedIndex, TextureID=00000000-0000-0000-0000-000000000000)

Represents 1 of the 6 baked textures of an avatar

get_hash(wearables)
Creates a hash using the assetIDs for each wearable in a baked layer
class pyogp.lib.base.appearance.AppearanceManager(agent, settings=None)

The AppearanceManager class handles appearance of an Agent() instance

Sample implementations: Tests:

initialize the appearance manager TODO Fix the Z by generating actual height

enable_callbacks()
enables the calback handlers for this AppearanceManager
onAgentCachedTextureResponse(packet)
Update the bakedTextures with their TextureIDs and HostNames and call send_AgentSetAppearance
onAgentWearablesUpdate(packet)

Automatically tells simulator avatar is wearing the wearables from the AgentWearables update packet. This message should only be received once.

Error Checking: make sure agent and session id are correct make sure this method is only called once.

onAvatarAppearance(packet)
Informs viewer how other avatars look
onAvatarTextureUpdate(packet)
request_agent_wearables()
Asks the simulator what the avatar is wearing #TODO create a one–shot callback
send_AgentCachedTexture(AgentID, SessionID, bakedTextures, wearables)
Ask the simulator what baked textures it has cached. TODO Create a one-shot callback?
send_AgentIsNowWearing(AgentID, SessionID, wearables)
Tell the simulator that avatar is wearing initial items
send_AgentSetAppearance(AgentID, SessionID, Size, bakedTextures, TextureEntry, visualParams)
Informs simulator how avatar looks
send_AgentWearablesRequest(AgentID, SessionID)
sends and AgentWearablesRequest message.
verifyAgentData(packet)
verifies that packet refers to this agent
wearableArrived(assetID, isSuccess)
callback for wearables request
class pyogp.lib.base.appearance.Wearable(WearableType=None, ItemID=00000000-0000-0000-0000-000000000000, AssetID=00000000-0000-0000-0000-000000000000)

Represents 1 of the 13 wearables an avatar can wear

getAssetType()