That's good to hear.

At some point this stuff should be more documented, but it's a big task and there's no formal API - here you're just interacting with what happens to be OpenSim's internals.

On 02/02/11 09:51, Gould, Simon wrote:
Hi Justin,

Got it working. I am using the 0.7.0.2 release of the code so had to
make some changes, but you help was invaluable, thanks for the pointer
to the tests too.

Thanks again

Simon

-----Original Message-----
From: opensim-dev-boun...@lists.berlios.de
[mailto:opensim-dev-boun...@lists.berlios.de] On Behalf Of Justin
Clark-Casey
Sent: 01 February 2011 00:44
To: opensim-dev@lists.berlios.de
Subject: Re: [Opensim-dev] Best approach for Vanilla Opensim region
module to create and manipulate scene objects.

On 31/01/11 14:33, Gould, Simon wrote:
Hi All,

I am new to Opensim development and was hoping I could "pick your
brains" about how to best go about creating a region
module, using the Vanilla Opensim c# API, that will create and
manipulate objects within a scene.

API is rather strong at this point, but the internals have been stable
for quite some time.  However, this isn't
guaranteed to be the case in the future.


I have taken a look at the documentation and also seen the Python
Modrex visualisation of a Software project from source
control. Unfortunately I am not very familiar with the Opensim API or
Python and we want to avoid complicating the
project by adding in extensions.

What we have is a simple region module based on the Hello world
example (I couldn't get the updated mechanism to work).

Where I am struggling is with the loading and copying of the objects.
What we want is to have a set of persistent
defined objects stored somewhere, then to create a number of these in
the scene e.g. ObjA, ObjB and ObjC are stored
somewhere, we create 3 objAs and 2 objBs and connect them together
using ObjCs.

The technique I usually use is to place ObjA, ObjB and ObjC in another
prim's inventory.  Then I rez them by retrieving
them by name, with code like the following.

              SceneObjectPart part;
              Scene scene;
              Vector3 rezPos;

              TaskInventoryItem item =
part.Inventory.GetInventoryItems(objAName)[0];

              SceneObjectGroup so =
part.Inventory.GetRezReadySceneObject(item);

              scene.AddNewSceneObject(so, true, rezPos, so.Rotation,
Vector3.Zero);

If you need to link then programatically that's another issue.  There is
some test code in
OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkTests.cs that
should prove useful.



--
Justin Clark-Casey (justincc)
http://justincc.org/blog
http://twitter.com/justincc
_______________________________________________
Opensim-dev mailing list
Opensim-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/opensim-dev

Reply via email to