aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-01-18 23:22:02 +0000
committerJustin Clark-Casey (justincc)2013-01-25 23:52:25 +0000
commit10b3c6b5aacb27d40bca803dffa2d2384091ff9a (patch)
treef519a9d51e41b2eac01264f79dff918ef0d2a623 /OpenSim/Region/Framework/Scenes
parentAdd utility function to clamp a vector to a maximum magnitude. (diff)
downloadopensim-SC_OLD-10b3c6b5aacb27d40bca803dffa2d2384091ff9a.zip
opensim-SC_OLD-10b3c6b5aacb27d40bca803dffa2d2384091ff9a.tar.gz
opensim-SC_OLD-10b3c6b5aacb27d40bca803dffa2d2384091ff9a.tar.bz2
opensim-SC_OLD-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/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs33
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs5
2 files changed, 33 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
index 5b16b67..8bd3cf9 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -86,7 +86,10 @@ namespace OpenSim.Region.Framework.Scenes.Animation
86 if (m_scenePresence.IsChildAgent) 86 if (m_scenePresence.IsChildAgent)
87 return; 87 return;
88 88
89// m_log.DebugFormat("[SCENE PRESENCE ANIMATOR]: Adding animation {0} for {1}", animID, m_scenePresence.Name); 89 if (m_scenePresence.Scene.DebugAnimations)
90 m_log.DebugFormat(
91 "[SCENE PRESENCE ANIMATOR]: Adding animation {0} {1} for {2}",
92 GetAnimName(animID), animID, m_scenePresence.Name);
90 93
91 if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID)) 94 if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID))
92 SendAnimPack(); 95 SendAnimPack();
@@ -114,7 +117,10 @@ namespace OpenSim.Region.Framework.Scenes.Animation
114 if (m_scenePresence.IsChildAgent) 117 if (m_scenePresence.IsChildAgent)
115 return; 118 return;
116 119
117// m_log.DebugFormat("[SCENE PRESENCE ANIMATOR]: Removing animation {0} for {1}", animID, m_scenePresence.Name); 120 if (m_scenePresence.Scene.DebugAnimations)
121 m_log.DebugFormat(
122 "[SCENE PRESENCE ANIMATOR]: Removing animation {0} {1} for {2}",
123 GetAnimName(animID), animID, m_scenePresence.Name);
118 124
119 if (m_animations.Remove(animID)) 125 if (m_animations.Remove(animID))
120 SendAnimPack(); 126 SendAnimPack();
@@ -137,9 +143,10 @@ namespace OpenSim.Region.Framework.Scenes.Animation
137 143
138 public void ResetAnimations() 144 public void ResetAnimations()
139 { 145 {
140// m_log.DebugFormat( 146 if (m_scenePresence.Scene.DebugAnimations)
141// "[SCENE PRESENCE ANIMATOR]: Resetting animations for {0} in {1}", 147 m_log.DebugFormat(
142// m_scenePresence.Name, m_scenePresence.Scene.RegionInfo.RegionName); 148 "[SCENE PRESENCE ANIMATOR]: Resetting animations for {0} in {1}",
149 m_scenePresence.Name, m_scenePresence.Scene.RegionInfo.RegionName);
143 150
144 m_animations.Clear(); 151 m_animations.Clear();
145 } 152 }
@@ -550,5 +557,21 @@ namespace OpenSim.Region.Framework.Scenes.Animation
550 557
551 SendAnimPack(animIDs, sequenceNums, objectIDs); 558 SendAnimPack(animIDs, sequenceNums, objectIDs);
552 } 559 }
560
561 public string GetAnimName(UUID animId)
562 {
563 string animName;
564
565 if (!DefaultAvatarAnimations.AnimsNames.TryGetValue(animId, out animName))
566 {
567 AssetMetadata amd = m_scenePresence.Scene.AssetService.GetMetadata(animId.ToString());
568 if (amd != null)
569 animName = amd.Name;
570 else
571 animName = "Unknown";
572 }
573
574 return animName;
575 }
553 } 576 }
554} 577}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 0c8aa6c..f87d469 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -68,6 +68,11 @@ namespace OpenSim.Region.Framework.Scenes
68 public bool EmergencyMonitoring = false; 68 public bool EmergencyMonitoring = false;
69 69
70 /// <summary> 70 /// <summary>
71 /// Show debug information about animations.
72 /// </summary>
73 public bool DebugAnimations { get; set; }
74
75 /// <summary>
71 /// Show debug information about teleports. 76 /// Show debug information about teleports.
72 /// </summary> 77 /// </summary>
73 public bool DebugTeleporting { get; set; } 78 public bool DebugTeleporting { get; set; }