Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007009opensim[REGION] OpenSim Corepublic2014-02-14 07:572014-07-29 13:42
ReporterGarmin Kawaguichi 
Assigned ToRobert Adams 
PlatformOperating SystemOperating System Version
Product Versionmaster (dev code) 
Target VersionFixed in Versionmaster (dev code) 
Summary0007009: [VarRegion] load oar --displacement: legacy trees and grass are misplaced
DescriptionIn a VarRegion,
when using the console command load oar and the parameter --displacement, the objects are placed with the new offset except primitive trees and grass that are placed in the region {0-128, 0-128}. Their respective locations are complied with, but the offset was not added.
Steps To Reproduce- Create a VarRegion 1280 x 1280 (5 x 5)
- Download the attached oar file which contains 676 objects including 336 primitive trees.
- On the console: load oar --displacement "<512, 512, 0>" ***path***\201414021331.oar
- If the problem is reproducible on your computer, you should find the 336 trees in the SW corner.
TagsNo tags attached.
Git Revision or version numberopensim_24354_ffd0da2_140214
Run ModeStandalone (1 Region)
Physics EngineBulletSim
Script Engine
Environment.NET / Windows32
Mono VersionNone
ViewerFireStorm & Singularity
Attached Files? file icon 201414021331.oar [^] (236,491 bytes) 2014-02-14 07:57

- Relationships

-  Notes
Garmin Kawaguichi (reporter)
2014-02-14 09:03

After further tests, the issue is extented to the following console commands:
- rotate scene
- translate scene
- scale scene

and it concerns VarRegion and legacy regions.
Garmin Kawaguichi (reporter)
2014-02-14 10:27

Oh man!!!! Trees have attachment point different from 0 ???

StdRegion (Sdb1) # translate scene 0 0 10
Object: Name:Cylinder AttachPoint:0
         ==>> PosAbs:<133.1279, 124.2376, 37.58902> PosAbsRoot:<133.1279, 124.23
76, 37.58902>
Object: Name:Tree2 AttachPoint:13
Object: Name:Cone AttachPoint:0
         ==>> PosAbs:<120.1557, 135.2008, 37.57781> PosAbsRoot:<120.1557, 135.20
08, 37.57781>
Object: Name:Tree3 AttachPoint:14
Object: Name:Tree1 AttachPoint:9
Object: Name:Sphere AttachPoint:0
         ==>> PosAbs:<135.1204, 134.0866, 37.59444> PosAbsRoot:<135.1204, 134.08
66, 37.59444>
Robert Adams (administrator)
2014-02-14 11:04

The is exactly the problem and has been a bug in the --displacement parameter since it was first written. Why trees get away with storing their shape info in the AttachPoint variable is a different discussion.

The fix is to use a different test in --displacement for 'is this a real in-world object that should be displaced'. There is the routine SceneObjectGroup.IsAttachementFullCheck() which also checks the shape's PCode to see if it is a prim but that relies on other logic tracking its attachmentness. The other approach is to check the PCode to see if it is trees or grass and only rely on the AttachPoint setting if it is a prim.

I think there may be other places that fail for legacy trees.
Garmin Kawaguichi (reporter)
2014-02-14 12:50

Visual C# said if (!sceneObject.IsAttachmentCheckFull) cannot be used.

I've tried with if (!sceneObject.IsAttachment) and the results seem correct.
Ln 486 in protected void LoadObjects(Scene scene, List<string> serialisedSceneObjects, List<SceneObjectGroup> sceneObjects)
                if (sceneObject.AttachmentPoint == 0)
                if (!sceneObject.IsAttachment)
Ln 562 in private void HandleRotateScene(string module, string[] args)
                    if (sog.AttachmentPoint == 0)
                    if (!sog.IsAttachment)
Ln 591 in private void HandleScaleScene(string module, string[] args)
                    if (sog.AttachmentPoint == 0)
                    if (!sog.IsAttachment)
Ln 603 in private void HandleScaleScene(string module, string[] args)
                    if (sog.AttachmentPoint == 0)
                    if (!sog.IsAttachment)
Ln 643 in private void HandleTranslateScene(string module, string[] args)
                    if (sog.AttachmentPoint == 0)
                    if (!sog.IsAttachment)
Robert Adams (administrator)
2014-02-15 19:55

I followed your lead and changed both the 'load oar' and the scene commands to use the SOG.IsAttachment method. Is this fixed now?
Garmin Kawaguichi (reporter)
2014-02-16 02:44

All seems OK now! Thank you for all your efforts to improve OpenSimulator!
Robert Adams (administrator)
2014-02-16 09:07

Corrected check for attachment in archive loading and in scene manipulation console commands.

- Issue History
Date Modified Username Field Change
2014-02-14 07:57 Garmin Kawaguichi New Issue
2014-02-14 07:57 Garmin Kawaguichi File Added: 201414021331.oar
2014-02-14 08:10 Robert Adams Assigned To => Robert Adams
2014-02-14 08:10 Robert Adams Status new => assigned
2014-02-14 09:03 Garmin Kawaguichi Note Added: 0025186
2014-02-14 10:27 Garmin Kawaguichi Note Added: 0025187
2014-02-14 11:04 Robert Adams Note Added: 0025188
2014-02-14 12:50 Garmin Kawaguichi Note Added: 0025189
2014-02-15 19:55 Robert Adams Note Added: 0025207
2014-02-16 02:44 Garmin Kawaguichi Note Added: 0025212
2014-02-16 09:07 Robert Adams Note Added: 0025216
2014-02-16 09:07 Robert Adams Status assigned => resolved
2014-02-16 09:07 Robert Adams Fixed in Version => master (dev code)
2014-02-16 09:07 Robert Adams Resolution open => fixed
2014-07-29 13:42 chi11ken Status resolved => closed

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker