diff options
author | Justin Clark-Casey (justincc) | 2011-12-06 18:32:27 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-12-06 18:32:27 +0000 |
commit | b9a461c5ad10753e98a17b17858cc3b2eae568ea (patch) | |
tree | 6007fffe8cfc275e31bd5e26cb7fd6e8efea7832 /OpenSim | |
parent | Actually send the avatar data if an individual avatar is specified, rather th... (diff) | |
download | opensim-SC_OLD-b9a461c5ad10753e98a17b17858cc3b2eae568ea.zip opensim-SC_OLD-b9a461c5ad10753e98a17b17858cc3b2eae568ea.tar.gz opensim-SC_OLD-b9a461c5ad10753e98a17b17858cc3b2eae568ea.tar.bz2 opensim-SC_OLD-b9a461c5ad10753e98a17b17858cc3b2eae568ea.tar.xz |
In "appearance show", if a particular avatar is specified, print out texture UUID for each bake type and whether the simulator can find it.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs index b6dfc5c..b949059 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs | |||
@@ -49,9 +49,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance | |||
49 | public class AppearanceInfoModule : ISharedRegionModule | 49 | public class AppearanceInfoModule : ISharedRegionModule |
50 | { | 50 | { |
51 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 51 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
52 | 52 | ||
53 | protected Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); | 53 | public const string SHOW_APPEARANCE_FORMAT = "{0,-9} {1}"; |
54 | protected IAvatarFactoryModule m_avatarFactory; | 54 | |
55 | private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); | ||
56 | private IAvatarFactoryModule m_avatarFactory; | ||
55 | 57 | ||
56 | public string Name { get { return "Appearance Information Module"; } } | 58 | public string Name { get { return "Appearance Information Module"; } } |
57 | 59 | ||
@@ -96,8 +98,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance | |||
96 | this, "appearance show", | 98 | this, "appearance show", |
97 | "appearance show", | 99 | "appearance show", |
98 | "Show appearance information for each avatar in the simulator.", | 100 | "Show appearance information for each avatar in the simulator.", |
99 | "Optionally, you can view just a particular avatar's appearance information" | 101 | "This command checks whether the simulator has all the baked textures required to display an avatar to other viewers. " |
100 | + "\nAt the moment this actually just checks that we have all the required baked textures. If not, then appearance is 'corrupt' and other avatars will continue to see a cloud.", | 102 | + "\nIf not, then appearance is 'corrupt' and other avatars will continue to see it as a cloud." |
103 | + "\nOptionally, you can view just a particular avatar's appearance information." | ||
104 | + "\nIn this case, the texture UUID for each bake type is also shown and whether the simulator can find the referenced texture.", | ||
101 | HandleShowAppearanceCommand); | 105 | HandleShowAppearanceCommand); |
102 | 106 | ||
103 | scene.AddCommand( | 107 | scene.AddCommand( |
@@ -188,6 +192,32 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance | |||
188 | ScenePresence sp = scene.GetScenePresence(optionalTargetFirstName, optionalTargetLastName); | 192 | ScenePresence sp = scene.GetScenePresence(optionalTargetFirstName, optionalTargetLastName); |
189 | if (sp != null && !sp.IsChildAgent) | 193 | if (sp != null && !sp.IsChildAgent) |
190 | { | 194 | { |
195 | MainConsole.Instance.OutputFormat("For {0} in {1}", sp.Name, scene.RegionInfo.RegionName); | ||
196 | MainConsole.Instance.OutputFormat(SHOW_APPEARANCE_FORMAT, "Bake Type", "UUID"); | ||
197 | |||
198 | Dictionary<BakeType, Primitive.TextureEntryFace> bakedTextures | ||
199 | = scene.AvatarFactory.GetBakedTextureFaces(sp.UUID); | ||
200 | foreach (BakeType bt in bakedTextures.Keys) | ||
201 | { | ||
202 | string rawTextureID; | ||
203 | |||
204 | if (bakedTextures[bt] == null) | ||
205 | { | ||
206 | rawTextureID = "not set"; | ||
207 | } | ||
208 | else | ||
209 | { | ||
210 | rawTextureID = bakedTextures[bt].TextureID.ToString(); | ||
211 | |||
212 | if (scene.AssetService.Get(rawTextureID) == null) | ||
213 | rawTextureID += " (not found)"; | ||
214 | else | ||
215 | rawTextureID += " (uploaded)"; | ||
216 | } | ||
217 | |||
218 | MainConsole.Instance.OutputFormat(SHOW_APPEARANCE_FORMAT, bt, rawTextureID); | ||
219 | } | ||
220 | |||
191 | bool bakedTextureValid = scene.AvatarFactory.ValidateBakedTextureCache(sp); | 221 | bool bakedTextureValid = scene.AvatarFactory.ValidateBakedTextureCache(sp); |
192 | MainConsole.Instance.OutputFormat( | 222 | MainConsole.Instance.OutputFormat( |
193 | "{0} baked appearance texture is {1}", sp.Name, bakedTextureValid ? "OK" : "corrupt"); | 223 | "{0} baked appearance texture is {1}", sp.Name, bakedTextureValid ? "OK" : "corrupt"); |