|Anonymous | Login | Signup for a new account||2021-10-15 16:43 PDT|
|Main | My View | View Issues | Change Log | Roadmap | Summary | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0007509||opensim||[REGION] Script Functions||public||2015-03-20 11:55||2015-04-20 22:36|
|Platform||Intel Core i7||Operating System||Ubuntu||Operating System Version||12.04|
|Product Version||master (dev code)|
|Target Version||Fixed in Version|
|Summary||0007509: llSetLinkPrimitiveParams can't set some prim parameters as small as the viewer can|
|Description||The following properties differ in limits between script and viewer, and needs to be reset in script handling to allow the same settings as from viewer. The attached patches allow this. Thanks to FreakyTech for getting my attention to this.|
hollow: 95% -> 99%
dimple diff: 0.05 -> 0.02
hole_size: 0.05 -> 0.01
advanced_cut diff: 0.05 -> 0.02
|Tags||No tags attached.|
|Git Revision or version number||0.8.2|
|Run Mode||Grid (1 Region per Sim)|
|Environment||Mono / Linux32|
|Viewer||Firestorm 4.4.2 for OS X|
|Attached Files|| 0001-Allow-setting-dimple-diff-to-0.02-from-scripts.patch [^] (1,372 bytes) 2015-03-20 11:55 [Show Content]
0001-Allow-setting-holesize-to-0.01-from-scripts.patch [^] (1,388 bytes) 2015-03-20 11:56 [Show Content]
0001-Allow-setting-hollow-to-99-from-scripts.patch [^] (3,199 bytes) 2015-03-20 11:56 [Show Content]
0001-Allow-setting-profilecut-diff-to-0.02-from-scripts.patch [^] (1,359 bytes) 2015-03-20 11:56 [Show Content]
|Patches added to adjust limits, one per property. The patch for dimple also fixes an old error and adds clipping.|
Robert Adams (administrator)
Good changes but could you change the constants to be parameters? Maybe an XEngine parameter like 'MinimumCutSize' or something appropriate. The problem originally came because there are constants scattered around the code.
Also, could you look at the Util.Clamp* functions. There are some Util functions for bounding and min/max'ing values that might be useful.
Sorry, but since I neither have the time, skills or a long enough stick to poke deeper into the XEngine mess, and have no clue what an "XEngine parameter" is, the answer will have to be no on the first, and I see no use in wasting time on the second then.
Feel free to close this Mantis.
I'd suggest taking these patches and FreakyTech's in Mantis 7508 as is, and do the parameterization and re-factoring of code separately and consistently over the entire LSL_Api.
I've started looking into parameterization, having submitted one patch for the 63 sleep constants in Mantis 7510, that'll probably need updating after merging Mantis 7508 and 7509 or revising to better programming practice.
I've inventoried the 69 constants I deem suitable for parameterization for limits and clamping, but need advice on where to stash the parameters for them and how to make them accessible to the API and tests where they are used. Sorry, but I'm no C++ programmer, so don't expect anything too fancy.
Robert Adams (administrator)
I will push the commits shortly. Thanks for improving OpenSimulator!
As to parameters, OpenSimulator uses Nini which parses the INI files. Since most of your variables are in LSL_Api.cs, check out the routine 'LoadConfig()'. You will see that 'm_ScriptEngine.ConfigSource' is a handle to the base configuration. The call to 'seConfigSource.Config["LL-Functions"]' gets a handle to the "[LL-Functions]" INI section. You can use "lslConfig.GetBoolean(name, default)", 'GetFloat', and 'GetInteger' to fetch the values from the INI files. The calls give a default if the named parameter is not in the init file.
I'd think that the sleep parameters should go in the INI "[LL-Functions]" section rather than the "[XEngine]" section because they relate to the language parameters and not the particular engine executing them.
The other alternative is table driven parameters like in 'OpenSim/Region/Physics/BulletSPlugin/BSParam.cs' but that would be larger changes to XEngine.
Robert Adams (administrator)
oops. It's IConfig.GetInt(name, default) and not IConfig.GetInteger(name, default).
I get used to auto complete. :)
|applied in master git|
|The fourth patch "0001-Allow-setting-profilecut-diff-to-0.02-from-scripts.patch" was never applied.|
|fourth patch has been applied to git master > http://opensimulator.org/viewgit/?a=commit&p=opensim&h=e855c8e7118823808f6af89f878f81858fbf35c6 [^]|
|Verified code and function, so closing.|
|2015-03-20 11:55||Magnuz||New Issue|
|2015-03-20 11:55||Magnuz||File Added: 0001-Allow-setting-dimple-diff-to-0.02-from-scripts.patch|
|2015-03-20 11:55||Magnuz||Relationship added||related to 0007508|
|2015-03-20 11:56||Magnuz||File Added: 0001-Allow-setting-holesize-to-0.01-from-scripts.patch|
|2015-03-20 11:56||Magnuz||File Added: 0001-Allow-setting-hollow-to-99-from-scripts.patch|
|2015-03-20 11:56||Magnuz||File Added: 0001-Allow-setting-profilecut-diff-to-0.02-from-scripts.patch|
|2015-03-20 12:00||Magnuz||Note Added: 0027907|
|2015-03-20 12:00||Magnuz||Status||new => patch included|
|2015-03-21 08:39||Robert Adams||Note Added: 0027919|
|2015-03-21 11:58||Magnuz||Note Added: 0027923|
|2015-03-22 08:22||Magnuz||Note Added: 0027933|
|2015-03-22 10:23||Robert Adams||Note Added: 0027934|
|2015-03-22 10:25||Robert Adams||Note Added: 0027935|
|2015-04-12 12:30||nebadon||Note Added: 0027996|
|2015-04-12 12:30||nebadon||Status||patch included => resolved|
|2015-04-12 12:30||nebadon||Resolution||open => fixed|
|2015-04-12 12:30||nebadon||Assigned To||=> nebadon|
|2015-04-13 10:39||Magnuz||Note Added: 0027998|
|2015-04-13 10:39||Magnuz||Status||resolved => patch included|
|2015-04-20 14:04||nebadon||Note Added: 0028038|
|2015-04-20 14:04||nebadon||Status||patch included => resolved|
|2015-04-20 22:36||Magnuz||Note Added: 0028039|
|2015-04-20 22:36||Magnuz||Status||resolved => closed|
|Copyright © 2000 - 2012 MantisBT Group|