aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMW2007-09-08 11:08:38 +0000
committerMW2007-09-08 11:08:38 +0000
commit741a967bb3bf67c986775523996327a3858f3933 (patch)
treea9bf478f54a5a71fb974c7a1b462d67a217e4042
parentCut down on the number of compile warnings. Now down to 5: 4 are related to u... (diff)
downloadopensim-SC-741a967bb3bf67c986775523996327a3858f3933.zip
opensim-SC-741a967bb3bf67c986775523996327a3858f3933.tar.gz
opensim-SC-741a967bb3bf67c986775523996327a3858f3933.tar.bz2
opensim-SC-741a967bb3bf67c986775523996327a3858f3933.tar.xz
Added region console command "edit-scale". To use first use change-region to set the active region as the one you want. Then use "edit-scale <primitivename> <xvalue> <yvalue> <zvalue>" so a example is "edit-scale myprimitive 30.0 25.0 35.0" [ Note the primitive name can't have spaces in it. Also if there is more than one primitive with that name in the region, then it will edit the first one it finds. Also it currently doesn't search through the sub primitives of linked groups. So the primitive needs to be either a single primitive object or the root prim of a group. ]
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs28
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs1
2 files changed, 29 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 1ce75e0..4f8d60b 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1310,12 +1310,40 @@ namespace OpenSim.Region.Environment.Scenes
1310 HandleAlertCommand(cmdparams); 1310 HandleAlertCommand(cmdparams);
1311 break; 1311 break;
1312 1312
1313 case "edit-scale":
1314 if (cmdparams.Length == 4)
1315 {
1316 HandleEditCommand(cmdparams);
1317 }
1318 break;
1319
1313 default: 1320 default:
1314 MainLog.Instance.Error("Unknown command: " + command); 1321 MainLog.Instance.Error("Unknown command: " + command);
1315 break; 1322 break;
1316 } 1323 }
1317 } 1324 }
1318 1325
1326 public void HandleEditCommand(string[] cmmdparams)
1327 {
1328 Console.WriteLine("Searching for Primitive: '" + cmmdparams[0] + "'");
1329 foreach (EntityBase ent in this.Entities.Values)
1330 {
1331 if (ent is SceneObjectGroup)
1332 {
1333 SceneObjectPart part = ((SceneObjectGroup)ent).GetChildPart(((SceneObjectGroup)ent).UUID);
1334 if (part != null)
1335 {
1336 if (part.Name == cmmdparams[0])
1337 {
1338 part.Resize( new LLVector3(Convert.ToSingle(cmmdparams[1]), Convert.ToSingle(cmmdparams[2]), Convert.ToSingle(cmmdparams[3])));
1339
1340 Console.WriteLine("Edited scale of Primitive: " + part.Name);
1341 }
1342 }
1343 }
1344 }
1345 }
1346
1319 public void Show(string ShowWhat) 1347 public void Show(string ShowWhat)
1320 { 1348 {
1321 switch (ShowWhat) 1349 switch (ShowWhat)
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index b202f3c..45d975c 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -606,6 +606,7 @@ namespace OpenSim.Region.Environment.Scenes
606 /// <param name="name"></param> 606 /// <param name="name"></param>
607 public void SetPartName(string name, uint localID) 607 public void SetPartName(string name, uint localID)
608 { 608 {
609 name = name.Remove(name.Length - 1, 1);
609 SceneObjectPart part = this.GetChildPart(localID); 610 SceneObjectPart part = this.GetChildPart(localID);
610 if (part != null) 611 if (part != null)
611 { 612 {