Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006259opensim[REGION] Scripting Enginepublic2012-08-30 08:012012-08-31 02:01
ReporterSignpostMarv 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Statuspatch includedResolutionopen 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0006259: Making GetLinkParts accessible to region modules
DescriptionTo avoid duplicating code, it would be handy for region modules to have access to the LSL_Api method "GetLinkParts". 0006236 achieves this by moving it onto SceneObjectPart, but the changes are a pita to merge/rebase with.

By making LSL_Api.GetLinkParts(SceneObjectPart part, int linkType) method public & static, region modules can more easily access the method.
Steps To Reproduce1) Create a region module
2) Add a reference to OpenSim.Region.ScriptEngine.Shared.Api;
3) Create a function to use with m_scriptModuleComms.RegisterScriptInvocation

SceneObjectPart hostPart = m_scene.GetSceneObjectPart(host);
List<SceneObjectPart> children = LSL_Api.GetLinkParts(hostPart, ScriptBaseClass.LINK_ALL_CHILDREN);
TagsNo tags attached.
Git Revision or version number
Run ModeStandalone (1 Region) , Grid (1 Region per Sim)
Physics EngineBasicPhysics
Script Engine
Environment.NET / Windows32
Mono VersionNone
Viewer
Attached Filespatch file icon GetLinkParts-for-region-modules.patch [^] (1,166 bytes) 2012-08-30 08:01 [Show Content]

- Relationships
related to 0006236closedmelanie move GetLinkParts from LSL_Api.cs to SceneObjectPart.cs 

-  Notes
(0022489)
melanie (administrator)
2012-08-30 08:03

Much better. +1
(0022490)
SignpostMarv (reporter)
2012-08-30 08:05

I was driven do this after attempting several times to `git rebase upstream/master dev-ccir` and ballsing it up, as well as recalling your comments regarding the nature of OpenSim as an upstream project.
(0022492)
justincc (administrator)
2012-08-30 17:28

Applied as git master 3019bea, thanks SignpostMarv.

I will observe that there are a bunch of other methods in LSL_Api.cs that may be better and more consistently available as public static (e.g. GetTexture, RotateTexture, etc.) but I haven't looked closely and it may be better (if more inconsistent) to consider these on a case by case basis.

I'll also say that it may be better to extract such functions to a separate static LSLUtil.cs or similar in OpenSim.Region.ScriptEngine.Shared.Api, and leave LSL_Api to directly implement LL methods rather than also mixing in statics that can be reused by other callers. However, there may be different opinions on this.
(0022493)
SignpostMarv (reporter)
2012-08-31 02:01

I would be of the opinion that anything that could be used by OSSL_Api.cs or region modules to avoid duplicating code should be at least public static. If many of these methods are not specific to a LL implementation (e.g. an implementation of a feature-not-a-bug quirk), then leaving it inside the LL-specific class would feel a bit icky.

- Issue History
Date Modified Username Field Change
2012-08-30 08:01 SignpostMarv New Issue
2012-08-30 08:01 SignpostMarv File Added: GetLinkParts-for-region-modules.patch
2012-08-30 08:01 SignpostMarv Relationship added related to 0006236
2012-08-30 08:01 SignpostMarv Status new => patch included
2012-08-30 08:03 melanie Note Added: 0022489
2012-08-30 08:05 SignpostMarv Note Added: 0022490
2012-08-30 17:28 justincc Note Added: 0022492
2012-08-31 02:01 SignpostMarv Note Added: 0022493


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker