diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs | 61 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 6 |
2 files changed, 62 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs index 78f86cc..b378f7a 100644 --- a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs | |||
@@ -80,19 +80,33 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands | |||
80 | 80 | ||
81 | m_console.Commands.AddCommand("region", false, "delete object owner", | 81 | m_console.Commands.AddCommand("region", false, "delete object owner", |
82 | "delete object owner <UUID>", | 82 | "delete object owner <UUID>", |
83 | "Delete object by owner", HandleDeleteObject); | 83 | "Delete a scene object by owner", HandleDeleteObject); |
84 | m_console.Commands.AddCommand("region", false, "delete object creator", | 84 | m_console.Commands.AddCommand("region", false, "delete object creator", |
85 | "delete object creator <UUID>", | 85 | "delete object creator <UUID>", |
86 | "Delete object by creator", HandleDeleteObject); | 86 | "Delete a scene object by creator", HandleDeleteObject); |
87 | m_console.Commands.AddCommand("region", false, "delete object uuid", | 87 | m_console.Commands.AddCommand("region", false, "delete object uuid", |
88 | "delete object uuid <UUID>", | 88 | "delete object uuid <UUID>", |
89 | "Delete object by uuid", HandleDeleteObject); | 89 | "Delete a scene object by uuid", HandleDeleteObject); |
90 | m_console.Commands.AddCommand("region", false, "delete object name", | 90 | m_console.Commands.AddCommand("region", false, "delete object name", |
91 | "delete object name <name>", | 91 | "delete object name <name>", |
92 | "Delete object by name", HandleDeleteObject); | 92 | "Delete a scene object by name", HandleDeleteObject); |
93 | m_console.Commands.AddCommand("region", false, "delete object outside", | 93 | m_console.Commands.AddCommand("region", false, "delete object outside", |
94 | "delete object outside", | 94 | "delete object outside", |
95 | "Delete all objects outside boundaries", HandleDeleteObject); | 95 | "Delete all scene objects outside region boundaries", HandleDeleteObject); |
96 | |||
97 | m_console.Commands.AddCommand( | ||
98 | "region", | ||
99 | false, | ||
100 | "show object uuid", | ||
101 | "show object uuid <UUID>", | ||
102 | "Show details of a scene object with the given UUID", HandleShowObjectByUuid); | ||
103 | |||
104 | // m_console.Commands.AddCommand( | ||
105 | // "region", | ||
106 | // false, | ||
107 | // "show object name <UUID>", | ||
108 | // "show object name <UUID>", | ||
109 | // "Show details of scene objects with the given name", HandleShowObjectName); | ||
96 | } | 110 | } |
97 | 111 | ||
98 | public void RemoveRegion(Scene scene) | 112 | public void RemoveRegion(Scene scene) |
@@ -105,6 +119,43 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands | |||
105 | // m_log.DebugFormat("[OBJECTS COMMANDS MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); | 119 | // m_log.DebugFormat("[OBJECTS COMMANDS MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); |
106 | } | 120 | } |
107 | 121 | ||
122 | private void HandleShowObjectByUuid(string module, string[] cmd) | ||
123 | { | ||
124 | if (!(m_console.ConsoleScene == null || m_console.ConsoleScene == m_scene)) | ||
125 | return; | ||
126 | |||
127 | if (cmd.Length < 4) | ||
128 | { | ||
129 | m_console.OutputFormat("Usage: show object uuid <uuid>"); | ||
130 | return; | ||
131 | } | ||
132 | |||
133 | UUID objectUuid; | ||
134 | if (!UUID.TryParse(cmd[3], out objectUuid)) | ||
135 | { | ||
136 | m_console.OutputFormat("{0} is not a valid uuid", cmd[3]); | ||
137 | return; | ||
138 | } | ||
139 | |||
140 | SceneObjectPart sop = m_scene.GetSceneObjectPart(objectUuid); | ||
141 | |||
142 | if (sop == null) | ||
143 | { | ||
144 | m_console.OutputFormat("No object found with uuid {0}", objectUuid); | ||
145 | return; | ||
146 | } | ||
147 | |||
148 | StringBuilder sb = new StringBuilder(); | ||
149 | sb.AppendFormat("Name: {0}\n", sop.Name); | ||
150 | sb.AppendFormat("Description: {0}\n", sop.Description); | ||
151 | sb.AppendFormat("Location: {0} @ {1}\n", sop.AbsolutePosition, sop.ParentGroup.Scene.RegionInfo.RegionName); | ||
152 | sb.AppendFormat("Parent: {0}", | ||
153 | sop.IsRoot ? "Is Root\n" : string.Format("{0} {1}\n", sop.ParentGroup.Name, sop.ParentGroup.UUID)); | ||
154 | sb.AppendFormat("Parts: {0}", sop.IsRoot ? "1" : sop.ParentGroup.PrimCount.ToString()); | ||
155 | |||
156 | m_console.OutputFormat(sb.ToString()); | ||
157 | } | ||
158 | |||
108 | private void HandleDeleteObject(string module, string[] cmd) | 159 | private void HandleDeleteObject(string module, string[] cmd) |
109 | { | 160 | { |
110 | if (!(m_console.ConsoleScene == null || m_console.ConsoleScene == m_scene)) | 161 | if (!(m_console.ConsoleScene == null || m_console.ConsoleScene == m_scene)) |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 739c5fa..e7f2fdb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -264,6 +264,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
264 | set { RootPart.Name = value; } | 264 | set { RootPart.Name = value; } |
265 | } | 265 | } |
266 | 266 | ||
267 | public string Description | ||
268 | { | ||
269 | get { return RootPart.Description; } | ||
270 | set { RootPart.Description = value; } | ||
271 | } | ||
272 | |||
267 | /// <summary> | 273 | /// <summary> |
268 | /// Added because the Parcel code seems to use it | 274 | /// Added because the Parcel code seems to use it |
269 | /// but not sure a object should have this | 275 | /// but not sure a object should have this |