Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004465opensim[REGION] Script Functionspublic2009-12-27 16:022021-11-01 17:20
ReporterChristos Lightling 
Assigned Totampa 
PlatformOperating SystemOperating System Version
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0004465: Optimization tweak for osGetLinkPrimitiveParams()
DescriptionStudying the source for this wonderful function (I use it a LOT), it appeared to me to be creating 2 superflous lists and a for loop - all being used to identify the desired prim of a linkset for which the method seeks a list of parameters. Unless I am not seeing something (and please inform me if I am), the attached patch will alleviate a lot of load by simply assigning the desired prim in a much more direct fashion.

This method will return the desired list of parameters, OR an empty list should a non-existant link number be given.
Additional InformationIt should be noted that contrary to what one might expect from a method involving linked prims, this will return global, not local, parameters. Normal math must be applied to obtain local offsets/rotations (This remains unchanged by this patch).
TagsNo tags attached.
Git Revision or version numberhead
Run ModeStandalone (1 Region)
Physics EngineODE
Script Engine
Environment.NET / Windows32
Mono VersionNone
Attached Filespatch file icon osGetLinkPrimitiveParams.patch [^] (1,336 bytes) 2009-12-27 16:02 [Show Content]

- Relationships
child of 0003986closed [OSSL] 

-  Notes
justincc (administrator)
2010-01-29 15:52

I'm not that familiar with this area but it appears from reading the code that


actually treats the linknumber as a link type (confusingly) and does case based reasoning on that, while


simply treats linknumber as, well, the number of a link. I'm imagining this will result in rather different behaviour.

Please feel free to tell me why I'm wrong. Some kind of unit test to demonstrate would be even better! (though I know that's probably a lot to ask here).
Christos Lightling (reporter)
2010-01-29 16:01

That was pretty much my logic... you wish to get the Primitive Parameters of a specific linked Part.... so.... why not just tell it which linked part you want the parameters from?

Seems to work fine for me in live use. If I missed a specific reason for the original method, I'm all ears.
makopoppo (manager)
2011-08-20 05:51
edited on: 2011-08-20 05:51

To say more specific ...

If you apply this patch, it will work fine if you expect the behavior like llGetLinkPrimitiveParams, specifying 1,2,3,4,.... and LINK_THIS as linknumber.

But osGetLinkPrimitiveParams works even if you specify LINK_SET, LINK_ALL_OTHERS and LINK_ALL_CHILDREN, which can return more than one prims. However, GetLinkNumPart() can only cover single prim. That will be the difference of current implementation and your patch, and it will be the answer for the submitter's question.

tampa (reporter)
2021-11-01 17:20

The code on this function is still not ideal, but this approach, as stated, doesn't survive tests for all conditions.

- Issue History
Date Modified Username Field Change
2009-12-27 16:02 Christos Lightling New Issue
2009-12-27 16:02 Christos Lightling File Added: osGetLinkPrimitiveParams.patch
2009-12-27 16:02 Christos Lightling Git Revision => head
2009-12-27 16:02 Christos Lightling SVN Revision => 0
2009-12-27 16:02 Christos Lightling Run Mode => Standalone (1 Region)
2009-12-27 16:02 Christos Lightling Physics Engine => ODE
2009-12-27 16:02 Christos Lightling Environment => .NET / Windows32
2009-12-27 16:02 Christos Lightling Mono Version => None
2009-12-30 17:51 Revolution Status new => patch included
2010-01-07 11:05 Fly-Man- Relationship added child of 0003986
2010-01-29 15:52 justincc Note Added: 0014903
2010-01-29 15:52 justincc Status patch included => patch feedback
2010-01-29 16:01 Christos Lightling Note Added: 0014906
2011-08-20 05:51 makopoppo Note Added: 0019648
2011-08-20 05:51 makopoppo Note Edited: 0019648
2021-11-01 17:20 tampa Note Added: 0038208
2021-11-01 17:20 tampa Status patch feedback => resolved
2021-11-01 17:20 tampa Assigned To => tampa

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker