diff options
Diffstat (limited to 'OpenSim')
-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"); |