diff options
author | Justin Clark-Casey (justincc) | 2013-01-18 23:22:02 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-01-25 23:52:25 +0000 |
commit | 10b3c6b5aacb27d40bca803dffa2d2384091ff9a (patch) | |
tree | f519a9d51e41b2eac01264f79dff918ef0d2a623 /OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs | |
parent | Add utility function to clamp a vector to a maximum magnitude. (diff) | |
download | opensim-SC-10b3c6b5aacb27d40bca803dffa2d2384091ff9a.zip opensim-SC-10b3c6b5aacb27d40bca803dffa2d2384091ff9a.tar.gz opensim-SC-10b3c6b5aacb27d40bca803dffa2d2384091ff9a.tar.bz2 opensim-SC-10b3c6b5aacb27d40bca803dffa2d2384091ff9a.tar.xz |
Add "debug set set animations true|false" region console command.
Setting this logs extra information about animation add/remove, such as uuid and animation name
Unfortunately cannot be done per client yet
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs b/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs index e951d9e..84211a9 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs | |||
@@ -161,12 +161,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Animations | |||
161 | UUID defaultAnimId = anims.DefaultAnimation.AnimID; | 161 | UUID defaultAnimId = anims.DefaultAnimation.AnimID; |
162 | cdl.AddRow( | 162 | cdl.AddRow( |
163 | "Default anim", | 163 | "Default anim", |
164 | string.Format("{0}, {1}", defaultAnimId, GetAnimName(sp.Scene.AssetService, defaultAnimId))); | 164 | string.Format("{0}, {1}", defaultAnimId, sp.Animator.GetAnimName(defaultAnimId))); |
165 | 165 | ||
166 | UUID implicitDefaultAnimId = anims.ImplicitDefaultAnimation.AnimID; | 166 | UUID implicitDefaultAnimId = anims.ImplicitDefaultAnimation.AnimID; |
167 | cdl.AddRow( | 167 | cdl.AddRow( |
168 | "Implicit default anim", | 168 | "Implicit default anim", |
169 | string.Format("{0}, {1}", implicitDefaultAnimId, GetAnimName(sp.Scene.AssetService, implicitDefaultAnimId))); | 169 | string.Format("{0}, {1}", |
170 | implicitDefaultAnimId, sp.Animator.GetAnimName(implicitDefaultAnimId))); | ||
170 | 171 | ||
171 | cdl.AddToStringBuilder(sb); | 172 | cdl.AddToStringBuilder(sb); |
172 | 173 | ||
@@ -185,7 +186,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Animations | |||
185 | for (int i = 0; i < animIds.Length; i++) | 186 | for (int i = 0; i < animIds.Length; i++) |
186 | { | 187 | { |
187 | UUID animId = animIds[i]; | 188 | UUID animId = animIds[i]; |
188 | string animName = GetAnimName(sp.Scene.AssetService, animId); | 189 | string animName = sp.Animator.GetAnimName(animId); |
189 | int seq = sequenceNumbers[i]; | 190 | int seq = sequenceNumbers[i]; |
190 | UUID objectId = objectIds[i]; | 191 | UUID objectId = objectIds[i]; |
191 | 192 | ||
@@ -195,21 +196,5 @@ namespace OpenSim.Region.OptionalModules.Avatar.Animations | |||
195 | cdt.AddToStringBuilder(sb); | 196 | cdt.AddToStringBuilder(sb); |
196 | sb.Append("\n"); | 197 | sb.Append("\n"); |
197 | } | 198 | } |
198 | |||
199 | private string GetAnimName(IAssetService assetService, UUID animId) | ||
200 | { | ||
201 | string animName; | ||
202 | |||
203 | if (!DefaultAvatarAnimations.AnimsNames.TryGetValue(animId, out animName)) | ||
204 | { | ||
205 | AssetMetadata amd = assetService.GetMetadata(animId.ToString()); | ||
206 | if (amd != null) | ||
207 | animName = amd.Name; | ||
208 | else | ||
209 | animName = "Unknown"; | ||
210 | } | ||
211 | |||
212 | return animName; | ||
213 | } | ||
214 | } | 199 | } |
215 | } \ No newline at end of file | 200 | } \ No newline at end of file |