diff options
author | Melanie Thielker | 2014-11-11 07:09:30 +0100 |
---|---|---|
committer | Melanie Thielker | 2014-11-11 07:09:30 +0100 |
commit | bec456c2a529ca0b9ca7fd59e8110e5d5b27c126 (patch) | |
tree | fdeb239af06878f6cfb39a137e61adfe04f0baa5 | |
parent | Merge branch 'avination-current' (diff) | |
download | opensim-SC-bec456c2a529ca0b9ca7fd59e8110e5d5b27c126.zip opensim-SC-bec456c2a529ca0b9ca7fd59e8110e5d5b27c126.tar.gz opensim-SC-bec456c2a529ca0b9ca7fd59e8110e5d5b27c126.tar.bz2 opensim-SC-bec456c2a529ca0b9ca7fd59e8110e5d5b27c126.tar.xz |
Remove the Invisible stuff and add more baked caching. Refactor selection of textures to save to Bakes module.
5 files changed, 7 insertions, 54 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 257997e..3874c47 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -72,7 +72,6 @@ namespace OpenSim.Framework | |||
72 | protected float m_avatarAnimOffset = 0; | 72 | protected float m_avatarAnimOffset = 0; |
73 | protected WearableCacheItem[] m_cacheitems; | 73 | protected WearableCacheItem[] m_cacheitems; |
74 | protected bool m_cacheItemsDirty = true; | 74 | protected bool m_cacheItemsDirty = true; |
75 | public static Primitive.TextureEntry Invisible = null; | ||
76 | 75 | ||
77 | public virtual int Serial | 76 | public virtual int Serial |
78 | { | 77 | { |
@@ -135,30 +134,8 @@ namespace OpenSim.Framework | |||
135 | set { m_cacheItemsDirty = value; } | 134 | set { m_cacheItemsDirty = value; } |
136 | } | 135 | } |
137 | 136 | ||
138 | private void CreateInvisibleTextureEntry() | ||
139 | { | ||
140 | if (Invisible != null) | ||
141 | return; | ||
142 | Invisible = new Primitive.TextureEntry(new UUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903")); | ||
143 | |||
144 | Invisible.FaceTextures[8] = new Primitive.TextureEntryFace(null); | ||
145 | Invisible.FaceTextures[8].TextureID = new UUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"); | ||
146 | Invisible.FaceTextures[9] = new Primitive.TextureEntryFace(null); | ||
147 | Invisible.FaceTextures[9].TextureID = new UUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"); | ||
148 | Invisible.FaceTextures[10] = new Primitive.TextureEntryFace(null); | ||
149 | Invisible.FaceTextures[10].TextureID = new UUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"); | ||
150 | Invisible.FaceTextures[11] = new Primitive.TextureEntryFace(null); | ||
151 | Invisible.FaceTextures[11].TextureID = new UUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"); | ||
152 | Invisible.FaceTextures[19] = new Primitive.TextureEntryFace(null); | ||
153 | Invisible.FaceTextures[19].TextureID = new UUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"); | ||
154 | Invisible.FaceTextures[20] = new Primitive.TextureEntryFace(null); | ||
155 | Invisible.FaceTextures[20].TextureID = new UUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"); | ||
156 | } | ||
157 | |||
158 | public AvatarAppearance() | 137 | public AvatarAppearance() |
159 | { | 138 | { |
160 | CreateInvisibleTextureEntry(); | ||
161 | |||
162 | // m_log.WarnFormat("[AVATAR APPEARANCE]: create empty appearance"); | 139 | // m_log.WarnFormat("[AVATAR APPEARANCE]: create empty appearance"); |
163 | 140 | ||
164 | m_serial = 0; | 141 | m_serial = 0; |
@@ -172,9 +149,6 @@ namespace OpenSim.Framework | |||
172 | 149 | ||
173 | public AvatarAppearance(OSDMap map) | 150 | public AvatarAppearance(OSDMap map) |
174 | { | 151 | { |
175 | CreateInvisibleTextureEntry(); | ||
176 | |||
177 | Invisible = new Primitive.TextureEntry(new UUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903")); | ||
178 | // m_log.WarnFormat("[AVATAR APPEARANCE]: create appearance from OSDMap"); | 152 | // m_log.WarnFormat("[AVATAR APPEARANCE]: create appearance from OSDMap"); |
179 | 153 | ||
180 | Unpack(map); | 154 | Unpack(map); |
@@ -183,7 +157,6 @@ namespace OpenSim.Framework | |||
183 | 157 | ||
184 | public AvatarAppearance(AvatarWearable[] wearables, Primitive.TextureEntry textureEntry, byte[] visualParams) | 158 | public AvatarAppearance(AvatarWearable[] wearables, Primitive.TextureEntry textureEntry, byte[] visualParams) |
185 | { | 159 | { |
186 | CreateInvisibleTextureEntry(); | ||
187 | // m_log.WarnFormat("[AVATAR APPEARANCE] create initialized appearance"); | 160 | // m_log.WarnFormat("[AVATAR APPEARANCE] create initialized appearance"); |
188 | 161 | ||
189 | m_serial = 0; | 162 | m_serial = 0; |
@@ -221,7 +194,6 @@ namespace OpenSim.Framework | |||
221 | 194 | ||
222 | public AvatarAppearance(AvatarAppearance appearance, bool copyWearables, bool copyBaked) | 195 | public AvatarAppearance(AvatarAppearance appearance, bool copyWearables, bool copyBaked) |
223 | { | 196 | { |
224 | CreateInvisibleTextureEntry(); | ||
225 | // m_log.WarnFormat("[AVATAR APPEARANCE] create from an existing appearance"); | 197 | // m_log.WarnFormat("[AVATAR APPEARANCE] create from an existing appearance"); |
226 | 198 | ||
227 | if (appearance == null) | 199 | if (appearance == null) |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index b7a4b93..849fec3 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -5143,10 +5143,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5143 | 5143 | ||
5144 | if (sendTexture) | 5144 | if (sendTexture) |
5145 | { | 5145 | { |
5146 | if (presence.Invisible) | 5146 | textureEntry = presence.Appearance.Texture.GetBytes(); |
5147 | textureEntry = AvatarAppearance.Invisible.GetBytes(); | ||
5148 | else | ||
5149 | textureEntry = presence.Appearance.Texture.GetBytes(); | ||
5150 | } | 5147 | } |
5151 | else | 5148 | else |
5152 | textureEntry = null; | 5149 | textureEntry = null; |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 1eb7d2d..22f0366 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -460,18 +460,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
460 | { | 460 | { |
461 | m_log.Debug("[UpdateBakedCache] uploading to bakedModule cache"); | 461 | m_log.Debug("[UpdateBakedCache] uploading to bakedModule cache"); |
462 | 462 | ||
463 | WearableCacheItem[] toBakedModule = new WearableCacheItem[AvatarAppearance.BAKE_INDICES.Length]; | 463 | m_BakedTextureModule.Store(sp.UUID); |
464 | |||
465 | for (int i = 0; i < AvatarAppearance.BAKE_INDICES.Length; i++) | ||
466 | { | ||
467 | int idx = (int)AvatarAppearance.BAKE_INDICES[i]; | ||
468 | toBakedModule[i] = new WearableCacheItem(); | ||
469 | toBakedModule[i].TextureIndex = (uint)idx; | ||
470 | toBakedModule[i].CacheId = wearableCache[idx].CacheId; | ||
471 | toBakedModule[i].TextureID = wearableCache[idx].TextureID; | ||
472 | toBakedModule[i].TextureAsset = wearableCache[idx].TextureAsset; | ||
473 | } | ||
474 | m_BakedTextureModule.Store(sp.UUID, toBakedModule); | ||
475 | } | 464 | } |
476 | } | 465 | } |
477 | 466 | ||
@@ -610,8 +599,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
610 | { | 599 | { |
611 | bakedModuleCache = bakedModule.Get(sp.UUID); | 600 | bakedModuleCache = bakedModule.Get(sp.UUID); |
612 | } | 601 | } |
613 | catch (Exception) | 602 | catch (Exception e) |
614 | { | 603 | { |
604 | m_log.ErrorFormat(e.ToString()); | ||
615 | bakedModuleCache = null; | 605 | bakedModuleCache = null; |
616 | } | 606 | } |
617 | 607 | ||
diff --git a/OpenSim/Region/Framework/Interfaces/IBakedTextureModule.cs b/OpenSim/Region/Framework/Interfaces/IBakedTextureModule.cs index 3d2e083..570d31c 100644 --- a/OpenSim/Region/Framework/Interfaces/IBakedTextureModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IBakedTextureModule.cs | |||
@@ -35,7 +35,7 @@ namespace OpenSim.Services.Interfaces | |||
35 | public interface IBakedTextureModule | 35 | public interface IBakedTextureModule |
36 | { | 36 | { |
37 | WearableCacheItem[] Get(UUID id); | 37 | WearableCacheItem[] Get(UUID id); |
38 | void Store(UUID id, WearableCacheItem[] data); | 38 | void Store(UUID id); |
39 | void UpdateMeshAvatar(UUID id); | 39 | void UpdateMeshAvatar(UUID id); |
40 | } | 40 | } |
41 | } | 41 | } |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 5a3e554..cd9dcf5 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -90,7 +90,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
90 | 90 | ||
91 | public bool isNPC { get; private set; } | 91 | public bool isNPC { get; private set; } |
92 | 92 | ||
93 | public bool Invisible { get; set; } | ||
94 | private PresenceType m_presenceType; | 93 | private PresenceType m_presenceType; |
95 | public PresenceType PresenceType { | 94 | public PresenceType PresenceType { |
96 | get {return m_presenceType;} | 95 | get {return m_presenceType;} |
@@ -950,7 +949,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
950 | public ScenePresence( | 949 | public ScenePresence( |
951 | IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) | 950 | IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) |
952 | { | 951 | { |
953 | Invisible = false; | ||
954 | AttachmentsSyncLock = new Object(); | 952 | AttachmentsSyncLock = new Object(); |
955 | AllowMovement = true; | 953 | AllowMovement = true; |
956 | IsChildAgent = true; | 954 | IsChildAgent = true; |
@@ -3716,12 +3714,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3716 | 3714 | ||
3717 | public void SendAppearanceToAgentNF(ScenePresence avatar) | 3715 | public void SendAppearanceToAgentNF(ScenePresence avatar) |
3718 | { | 3716 | { |
3719 | if (Invisible) | 3717 | avatar.ControllingClient.SendAppearance( |
3720 | avatar.ControllingClient.SendAppearance( | 3718 | UUID, Appearance.VisualParams, Appearance.Texture.GetBytes()); |
3721 | UUID, Appearance.VisualParams, AvatarAppearance.Invisible.GetBytes()); | ||
3722 | else | ||
3723 | avatar.ControllingClient.SendAppearance( | ||
3724 | UUID, Appearance.VisualParams, Appearance.Texture.GetBytes()); | ||
3725 | } | 3719 | } |
3726 | 3720 | ||
3727 | public void SendAnimPackToAgent(ScenePresence p) | 3721 | public void SendAnimPackToAgent(ScenePresence p) |