Show details of scene objects with given ownerId.
Signed-off-by: Mandarinka Tasty <mandarinka.tasty@gmail.com> Signed-off-by: Melanie Thielker <melanie@t-data.com>melanie
parent
b0db575220
commit
ed641b22b3
OpenSim/Region/CoreModules/World/Objects/Commands
|
@ -149,6 +149,15 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
+ "If --regex is specified then the name is treatead as a regular expression.",
|
+ "If --regex is specified then the name is treatead as a regular expression.",
|
||||||
HandleShowObjectByName);
|
HandleShowObjectByName);
|
||||||
|
|
||||||
|
m_console.Commands.AddCommand(
|
||||||
|
"Objects",
|
||||||
|
false,
|
||||||
|
"show object owner",
|
||||||
|
"show object owner [--full] <OwnerID>",
|
||||||
|
"Show details of scene objects with given owner.",
|
||||||
|
"The --full option will print out information on all the parts of the object.\n",
|
||||||
|
HandleShowObjectByOwnerID);
|
||||||
|
|
||||||
m_console.Commands.AddCommand(
|
m_console.Commands.AddCommand(
|
||||||
"Objects",
|
"Objects",
|
||||||
false,
|
false,
|
||||||
|
@ -325,6 +334,32 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
OutputSogsToConsole(searchPredicate, showFull);
|
OutputSogsToConsole(searchPredicate, showFull);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void HandleShowObjectByOwnerID(string module, string[] cmdparams)
|
||||||
|
{
|
||||||
|
if (!(m_console.ConsoleScene == null || m_console.ConsoleScene == m_scene))
|
||||||
|
return;
|
||||||
|
|
||||||
|
bool showFull = false;
|
||||||
|
OptionSet options = new OptionSet().Add("full", v => showFull = v != null);
|
||||||
|
|
||||||
|
List<string> mainParams = options.Parse(cmdparams);
|
||||||
|
|
||||||
|
if (mainParams.Count < 4)
|
||||||
|
{
|
||||||
|
m_console.OutputFormat("Usage: show object owner <OwnerID>");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
UUID ownerID;
|
||||||
|
if (!ConsoleUtil.TryParseConsoleUuid(m_console, mainParams[3], out ownerID))
|
||||||
|
return;
|
||||||
|
|
||||||
|
Predicate<SceneObjectGroup> searchPredicate
|
||||||
|
= so => so.OwnerID == ownerID && !so.IsAttachment;
|
||||||
|
|
||||||
|
OutputSogsToConsole(searchPredicate, showFull);
|
||||||
|
}
|
||||||
|
|
||||||
private void HandleShowObjectByPos(string module, string[] cmdparams)
|
private void HandleShowObjectByPos(string module, string[] cmdparams)
|
||||||
{
|
{
|
||||||
if (!(m_console.ConsoleScene == null || m_console.ConsoleScene == m_scene))
|
if (!(m_console.ConsoleScene == null || m_console.ConsoleScene == m_scene))
|
||||||
|
|
Loading…
Reference in New Issue