diff options
author | Melanie | 2013-01-19 02:38:04 +0000 |
---|---|---|
committer | Melanie | 2013-01-19 02:38:04 +0000 |
commit | 12efac494a6f55d85b778bf752a9b6c37c1b0ced (patch) | |
tree | 4adec2a3f235f54e47a2216f7c9abaffdfac0c53 /OpenSim/Region/OptionalModules | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Explicitly stop PollServiceRequestManager() rather than relying on its destru... (diff) | |
download | opensim-SC_OLD-12efac494a6f55d85b778bf752a9b6c37c1b0ced.zip opensim-SC_OLD-12efac494a6f55d85b778bf752a9b6c37c1b0ced.tar.gz opensim-SC_OLD-12efac494a6f55d85b778bf752a9b6c37c1b0ced.tar.bz2 opensim-SC_OLD-12efac494a6f55d85b778bf752a9b6c37c1b0ced.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs | 23 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs | 38 |
2 files changed, 27 insertions, 34 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 |
diff --git a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs index 8b8758e..12169ab 100644 --- a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs +++ b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs | |||
@@ -94,6 +94,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments | |||
94 | "debug scene get", | 94 | "debug scene get", |
95 | "List current scene options.", | 95 | "List current scene options.", |
96 | "If active is false then main scene update and maintenance loops are suspended.\n" | 96 | "If active is false then main scene update and maintenance loops are suspended.\n" |
97 | + "If animations is true then extra animations debug information is logged.\n" | ||
97 | + "If collisions is false then collisions with other objects are turned off.\n" | 98 | + "If collisions is false then collisions with other objects are turned off.\n" |
98 | + "If pbackup is false then periodic scene backup is turned off.\n" | 99 | + "If pbackup is false then periodic scene backup is turned off.\n" |
99 | + "If physics is false then all physics objects are non-physical.\n" | 100 | + "If physics is false then all physics objects are non-physical.\n" |
@@ -107,6 +108,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments | |||
107 | "debug scene set active|collisions|pbackup|physics|scripting|teleport|updates true|false", | 108 | "debug scene set active|collisions|pbackup|physics|scripting|teleport|updates true|false", |
108 | "Turn on scene debugging options.", | 109 | "Turn on scene debugging options.", |
109 | "If active is false then main scene update and maintenance loops are suspended.\n" | 110 | "If active is false then main scene update and maintenance loops are suspended.\n" |
111 | + "If animations is true then extra animations debug information is logged.\n" | ||
110 | + "If collisions is false then collisions with other objects are turned off.\n" | 112 | + "If collisions is false then collisions with other objects are turned off.\n" |
111 | + "If pbackup is false then periodic scene backup is turned off.\n" | 113 | + "If pbackup is false then periodic scene backup is turned off.\n" |
112 | + "If physics is false then all physics objects are non-physical.\n" | 114 | + "If physics is false then all physics objects are non-physical.\n" |
@@ -120,10 +122,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments | |||
120 | { | 122 | { |
121 | if (args.Length == 3) | 123 | if (args.Length == 3) |
122 | { | 124 | { |
123 | if (MainConsole.Instance.ConsoleScene == null) | 125 | if (MainConsole.Instance.ConsoleScene != m_scene && MainConsole.Instance.ConsoleScene != null) |
124 | MainConsole.Instance.Output("Please use 'change region <regioname>' first"); | 126 | return; |
125 | else | 127 | |
126 | OutputSceneDebugOptions(); | 128 | OutputSceneDebugOptions(); |
127 | } | 129 | } |
128 | else | 130 | else |
129 | { | 131 | { |
@@ -135,12 +137,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments | |||
135 | { | 137 | { |
136 | ConsoleDisplayList cdl = new ConsoleDisplayList(); | 138 | ConsoleDisplayList cdl = new ConsoleDisplayList(); |
137 | cdl.AddRow("active", m_scene.Active); | 139 | cdl.AddRow("active", m_scene.Active); |
140 | cdl.AddRow("animations", m_scene.DebugAnimations); | ||
138 | cdl.AddRow("pbackup", m_scene.PeriodicBackup); | 141 | cdl.AddRow("pbackup", m_scene.PeriodicBackup); |
139 | cdl.AddRow("physics", m_scene.PhysicsEnabled); | 142 | cdl.AddRow("physics", m_scene.PhysicsEnabled); |
140 | cdl.AddRow("scripting", m_scene.ScriptsEnabled); | 143 | cdl.AddRow("scripting", m_scene.ScriptsEnabled); |
141 | cdl.AddRow("teleport", m_scene.DebugTeleporting); | 144 | cdl.AddRow("teleport", m_scene.DebugTeleporting); |
142 | cdl.AddRow("updates", m_scene.DebugUpdates); | 145 | cdl.AddRow("updates", m_scene.DebugUpdates); |
143 | 146 | ||
147 | MainConsole.Instance.OutputFormat("Scene {0} options:", m_scene.Name); | ||
144 | MainConsole.Instance.Output(cdl.ToString()); | 148 | MainConsole.Instance.Output(cdl.ToString()); |
145 | } | 149 | } |
146 | 150 | ||
@@ -148,18 +152,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments | |||
148 | { | 152 | { |
149 | if (args.Length == 5) | 153 | if (args.Length == 5) |
150 | { | 154 | { |
151 | if (MainConsole.Instance.ConsoleScene == null) | 155 | if (MainConsole.Instance.ConsoleScene != m_scene && MainConsole.Instance.ConsoleScene != null) |
152 | { | 156 | return; |
153 | MainConsole.Instance.Output("Please use 'change region <regioname>' first"); | ||
154 | } | ||
155 | else | ||
156 | { | ||
157 | string key = args[3]; | ||
158 | string value = args[4]; | ||
159 | SetSceneDebugOptions(new Dictionary<string, string>() { { key, value } }); | ||
160 | 157 | ||
161 | MainConsole.Instance.OutputFormat("Set debug scene {0} = {1}", key, value); | 158 | string key = args[3]; |
162 | } | 159 | string value = args[4]; |
160 | SetSceneDebugOptions(new Dictionary<string, string>() { { key, value } }); | ||
161 | |||
162 | MainConsole.Instance.OutputFormat("Set {0} debug scene {1} = {2}", m_scene.Name, key, value); | ||
163 | } | 163 | } |
164 | else | 164 | else |
165 | { | 165 | { |
@@ -178,6 +178,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments | |||
178 | m_scene.Active = active; | 178 | m_scene.Active = active; |
179 | } | 179 | } |
180 | 180 | ||
181 | if (options.ContainsKey("animations")) | ||
182 | { | ||
183 | bool active; | ||
184 | |||
185 | if (bool.TryParse(options["animations"], out active)) | ||
186 | m_scene.DebugAnimations = active; | ||
187 | } | ||
188 | |||
181 | if (options.ContainsKey("pbackup")) | 189 | if (options.ContainsKey("pbackup")) |
182 | { | 190 | { |
183 | bool active; | 191 | bool active; |