From 5c53660a7f055be9ed41f30893de673acac8a0f1 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 13 Mar 2013 22:59:06 +0000
Subject: Add prototype dynamic objects map for scene object parts
This allows region modules to add dynamic objects to SOPs rather than having to continually push and pull OSD dynamic attributes.
This is to explore the original MOAP use case for dynamic attributes where it could be very awkward and possibly time-consuming to keep reconstructing MediaEntrys from stored DynamicAttributes.
This commit adds a DOExampleModule to demonstrate/evolve this code.
Dynamic objects involve no storage or persistence changes - the 'backing store' for any data that does need to be saved will remain the DAMap.
DOExampleModule in this commit only attaches a fresh dynamic object. Actually constructing this from stored dynamic attributes and handling persistence is left for later.
These changes should affect no existing functionality, though it may or may not reveal necessary changes in DAMap down the road.
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 3e9a6fa..ee7c4f4 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -129,6 +129,27 @@ namespace OpenSim.Region.Framework.Scenes
/// Dynamic attributes can be created and deleted as required.
///
public DAMap DynAttrs { get; set; }
+
+ private DOMap m_dynObjs;
+
+ ///
+ /// Dynamic objects that can be created and deleted as required.
+ ///
+ public DOMap DynObjs
+ {
+ get
+ {
+ if (m_dynObjs == null)
+ m_dynObjs = new DOMap();
+
+ return m_dynObjs;
+ }
+
+ set
+ {
+ m_dynObjs = value;
+ }
+ }
///
/// Is this a root part?
@@ -348,6 +369,7 @@ namespace OpenSim.Region.Framework.Scenes
Rezzed = DateTime.UtcNow;
Description = String.Empty;
DynAttrs = new DAMap();
+ DynObjs = new DOMap();
// Prims currently only contain a single folder (Contents). From looking at the Second Life protocol,
// this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from
--
cgit v1.1