OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
/// <summary>
/// Optionally modify a loaded SceneObjectGroup. Currently this just ensures that the
/// User IDs and Group IDs are valid, but other manipulations could be done as well.
/// </summary>
Optionally modify a loaded SceneObjectGroup. Currently this just ensures that the
User IDs and Group IDs are valid, but other manipulations could be done as well.
Optionally modify a loaded SceneObjectGroup . Currently this just ensures that the User IDs and Group IDs are valid but other manipulations could be done as well .
private void ModifySceneObject(Scene scene, SceneObjectGroup sceneObject)
        {
            foreach (SceneObjectPart part in sceneObject.Parts)
            {
                if (string.IsNullOrEmpty(part.CreatorData))
                {
                    if (!ResolveUserUuid(scene, part.CreatorID))
                        part.CreatorID = m_defaultUser;
                }
                if (UserManager != null)
                    UserManager.AddUser(part.CreatorID, part.CreatorData);
                if (!(ResolveUserUuid(scene, part.OwnerID) || ResolveGroupUuid(part.OwnerID)))
                    part.OwnerID = m_defaultUser;
                if (!(ResolveUserUuid(scene, part.LastOwnerID) || ResolveGroupUuid(part.LastOwnerID)))
                    part.LastOwnerID = m_defaultUser;
                if (!ResolveGroupUuid(part.GroupID))
                    part.GroupID = UUID.Zero;
                lock (part.TaskInventory)
                {
                    TaskInventoryDictionary inv = part.TaskInventory;
                    foreach (KeyValuePair<UUID, TaskInventoryItem> kvp in inv)
                    {
                        if (!(ResolveUserUuid(scene, kvp.Value.OwnerID) || ResolveGroupUuid(kvp.Value.OwnerID)))
                        {
                            kvp.Value.OwnerID = m_defaultUser;
                        }
                        if (string.IsNullOrEmpty(kvp.Value.CreatorData))
                        {
                            if (!ResolveUserUuid(scene, kvp.Value.CreatorID))
                                kvp.Value.CreatorID = m_defaultUser;
                        }
                        if (UserManager != null)
                            UserManager.AddUser(kvp.Value.CreatorID, kvp.Value.CreatorData);
                        if (!ResolveGroupUuid(kvp.Value.GroupID))
                            kvp.Value.GroupID = UUID.Zero;
                    }
                }
            }
        }
private void ModifySceneObject ( Scene scene , SceneObjectGroup sceneObject ) { foreach ( SceneObjectPart part in sceneObject . Parts ) { if ( string . IsNullOrEmpty ( part . CreatorData ) ) { if ( ! ResolveUserUuid ( scene , part . CreatorID ) ) part . CreatorID = m_defaultUser ; } if ( UserManager != null ) UserManager . AddUser ( part . CreatorID , part . CreatorData ) ; if ( ! ( ResolveUserUuid ( scene , part . OwnerID ) || ResolveGroupUuid ( part . OwnerID ) ) ) part . OwnerID = m_defaultUser ; if ( ! ( ResolveUserUuid ( scene , part . LastOwnerID ) || ResolveGroupUuid ( part . LastOwnerID ) ) ) part . LastOwnerID = m_defaultUser ; if ( ! ResolveGroupUuid ( part . GroupID ) ) part . GroupID = UUID . Zero ; lock ( part . TaskInventory ) { TaskInventoryDictionary inv = part . TaskInventory ; foreach ( KeyValuePair < UUID , TaskInventoryItem > kvp in inv ) { if ( ! ( ResolveUserUuid ( scene , kvp . Value . OwnerID ) || ResolveGroupUuid ( kvp . Value . OwnerID ) ) ) { kvp . Value . OwnerID = m_defaultUser ; } if ( string . IsNullOrEmpty ( kvp . Value . CreatorData ) ) { if ( ! ResolveUserUuid ( scene , kvp . Value . CreatorID ) ) kvp . Value . CreatorID = m_defaultUser ; } if ( UserManager != null ) UserManager . AddUser ( kvp . Value . CreatorID , kvp . Value . CreatorData ) ; if ( ! ResolveGroupUuid ( kvp . Value . GroupID ) ) kvp . Value . GroupID = UUID . Zero ; } } } }
Optionally modify a loaded SceneObjectGroup.
Optionally modify a loaded SceneObjectGroup .
// Try to retain the original creator/owner/lastowner if their uuid is present on this grid // or creator data is present.  Otherwise, use the estate owner instead. // And zap any troublesome sit target information //                    part.SitTargetOrientation = new Quaternion(0, 0, 0, 1); //                    part.SitTargetPosition    = new Vector3(0, 0, 0); // Fix ownership/creator of inventory items // Not doing so results in inventory items // being no copy/no mod for everyone
scene
Scene
sceneObject
SceneObjectGroup