more fixes to default avatar appearance creation

0.6.5-rc1
Dr Scofield 2009-05-12 15:12:21 +00:00
parent 1b7d0a6c93
commit 8039946c76
1 changed files with 18 additions and 14 deletions

View File

@ -162,6 +162,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
public void PostInitialise()
{
if (!createDefaultAvatars())
{
m_log.Info("[RADMIN]: Default avatars not loaded");
}
}
public XmlRpcResponse XmlRpcRestartMethod(XmlRpcRequest request)
@ -904,8 +908,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
firstname, lastname));
// Establish the avatar's initial appearance
// TODO: need to add code to do this only when requested
// updateUserAppearance(responseData, requestData, userID);
updateUserAppearance(responseData, requestData, userID);
responseData["success"] = true;
responseData["avatar_uuid"] = userID.ToString();
@ -1131,14 +1135,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (String.Empty != aboutAvatar) userProfile.AboutText = aboutAvatar;
// User has been created. Now establish gender and appearance.
// Default appearance is 'Default Male'. Specifying gender can
// establish "Default Female". Specifying a specific model can
// establish a specific appearance without regard for gender.
// TODO: need to add code to do this only when
// requested
if (requestData.ContainsKey("model"))
updateUserAppearance(responseData, requestData, userProfile.ID);
updateUserAppearance(responseData, requestData, userProfile.ID);
if (!m_app.CommunicationsManager.UserService.UpdateUserProfile(userProfile))
throw new Exception("did not manage to update user profile");
@ -1165,6 +1163,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
m_log.Info("[RADMIN]: UpdateUserAccount: request complete");
return response;
}
/// <summary>
@ -1207,12 +1206,17 @@ namespace OpenSim.ApplicationPlugins.RemoteController
// Has an explicit model been specified?
if (requestData.Contains("model"))
{
model = (string)requestData["model"];
}
// No appearance attributes were set
if (model == String.Empty)
if(model == String.Empty)
{
m_log.DebugFormat("[RADMIN] Appearance update not requested");
return;
}
m_log.DebugFormat("[RADMIN] Setting appearance for avatar {0}, using model {1}", userid, model);
@ -1238,9 +1242,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
// Set current user's appearance. This bit is easy. The appearance structure is populated with
// actual asset ids, however to complete the magic we need to populate the inventory with the
// assets in question.
establishAppearance(userid, mprof.ID);
m_log.DebugFormat("[RADMIN] Finished setting appearance for avatar {0}, using model {1}",
userid, model);
}
@ -1379,8 +1383,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
private bool createDefaultAvatars()
{
m_log.DebugFormat("[RADMIN] Creating default avatar entries");
// Only load once
if (daload)
@ -1388,6 +1390,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
return false;
}
m_log.DebugFormat("[RADMIN] Creating default avatar entries");
daload = true;
// Load processing starts here...