diff options
author | UbitUmarov | 2017-05-31 04:47:59 +0100 |
---|---|---|
committer | UbitUmarov | 2017-05-31 04:47:59 +0100 |
commit | 720a69a49bf02208ea2763a043056aba00a676e5 (patch) | |
tree | c21f714cdbe13aa4c402a577e6a9a8b18340c3c5 /OpenSim/Region/CoreModules | |
parent | remove debug messages (diff) | |
download | opensim-SC-720a69a49bf02208ea2763a043056aba00a676e5.zip opensim-SC-720a69a49bf02208ea2763a043056aba00a676e5.tar.gz opensim-SC-720a69a49bf02208ea2763a043056aba00a676e5.tar.bz2 opensim-SC-720a69a49bf02208ea2763a043056aba00a676e5.tar.xz |
remove the option to store baked textures on assets service, thats suicide use xbakes
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 535d946..14607e9 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -369,7 +369,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
369 | return true; | 369 | return true; |
370 | 370 | ||
371 | // uploaded baked textures will be in assets local cache | 371 | // uploaded baked textures will be in assets local cache |
372 | IAssetService cache = m_scene.AssetService; | 372 | IAssetCache cache = m_scene.RequestModuleInterface<IAssetCache>(); |
373 | IBakedTextureModule m_BakedTextureModule = m_scene.RequestModuleInterface<IBakedTextureModule>(); | 373 | IBakedTextureModule m_BakedTextureModule = m_scene.RequestModuleInterface<IBakedTextureModule>(); |
374 | 374 | ||
375 | int validDirtyBakes = 0; | 375 | int validDirtyBakes = 0; |
@@ -436,7 +436,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
436 | */ | 436 | */ |
437 | wearableCache[idx].TextureAsset = null; | 437 | wearableCache[idx].TextureAsset = null; |
438 | if (cache != null) | 438 | if (cache != null) |
439 | wearableCache[idx].TextureAsset = cache.GetCached(face.TextureID.ToString()); | 439 | { |
440 | AssetBase asb = null; | ||
441 | cache.Get(face.TextureID.ToString(), out asb); | ||
442 | wearableCache[idx].TextureAsset = asb; | ||
443 | } | ||
440 | 444 | ||
441 | if (wearableCache[idx].TextureAsset != null) | 445 | if (wearableCache[idx].TextureAsset != null) |
442 | { | 446 | { |
@@ -481,15 +485,15 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
481 | // if we got a full set of baked textures save all in BakedTextureModule | 485 | // if we got a full set of baked textures save all in BakedTextureModule |
482 | if (m_BakedTextureModule != null) | 486 | if (m_BakedTextureModule != null) |
483 | { | 487 | { |
484 | m_log.Debug("[UpdateBakedCache] start async uploading to bakedModule cache"); | 488 | m_log.DebugFormat("[UpdateBakedCache] Uploading to Bakes Server: cache hits: {0} changed entries: {1} rebakes {2}", |
489 | hits.ToString(), validDirtyBakes.ToString(), missing.Count); | ||
485 | 490 | ||
486 | m_BakedTextureModule.Store(sp.UUID, wearableCache); | 491 | m_BakedTextureModule.Store(sp.UUID, wearableCache); |
487 | } | 492 | } |
488 | } | 493 | } |
489 | 494 | else | |
490 | 495 | m_log.DebugFormat("[UpdateBakedCache] cache hits: {0} changed entries: {1} rebakes {2}", | |
491 | // debug | 496 | hits.ToString(), validDirtyBakes.ToString(), missing.Count); |
492 | m_log.Debug("[UpdateBakedCache] cache hits: " + hits.ToString() + " changed entries: " + validDirtyBakes.ToString() + " rebakes " + missing.Count); | ||
493 | /* | 497 | /* |
494 | for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++) | 498 | for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++) |
495 | { | 499 | { |
@@ -513,7 +517,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
513 | 517 | ||
514 | lock (m_setAppearanceLock) | 518 | lock (m_setAppearanceLock) |
515 | { | 519 | { |
516 | IAssetService cache = m_scene.AssetService; | 520 | IAssetCache cache = m_scene.RequestModuleInterface<IAssetCache>(); |
517 | IBakedTextureModule bakedModule = m_scene.RequestModuleInterface<IBakedTextureModule>(); | 521 | IBakedTextureModule bakedModule = m_scene.RequestModuleInterface<IBakedTextureModule>(); |
518 | WearableCacheItem[] bakedModuleCache = null; | 522 | WearableCacheItem[] bakedModuleCache = null; |
519 | 523 | ||
@@ -553,6 +557,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
553 | } | 557 | } |
554 | } | 558 | } |
555 | */ | 559 | */ |
560 | |||
556 | bool wearableCacheValid = false; | 561 | bool wearableCacheValid = false; |
557 | if (wearableCache == null) | 562 | if (wearableCache == null) |
558 | { | 563 | { |
@@ -577,10 +582,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
577 | hits++; | 582 | hits++; |
578 | wearableCache[idx].TextureAsset.Temporary = true; | 583 | wearableCache[idx].TextureAsset.Temporary = true; |
579 | wearableCache[idx].TextureAsset.Local = true; | 584 | wearableCache[idx].TextureAsset.Local = true; |
580 | cache.Store(wearableCache[idx].TextureAsset); | 585 | cache.Cache(wearableCache[idx].TextureAsset); |
581 | continue; | 586 | continue; |
582 | } | 587 | } |
583 | if (cache.GetCached((wearableCache[idx].TextureID).ToString()) != null) | 588 | |
589 | if (cache.Check((wearableCache[idx].TextureID).ToString())) | ||
584 | { | 590 | { |
585 | hits++; | 591 | hits++; |
586 | continue; | 592 | continue; |
@@ -645,7 +651,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
645 | wearableCache[j].TextureAsset = bakedModuleCache[i].TextureAsset; | 651 | wearableCache[j].TextureAsset = bakedModuleCache[i].TextureAsset; |
646 | bakedModuleCache[i].TextureAsset.Temporary = true; | 652 | bakedModuleCache[i].TextureAsset.Temporary = true; |
647 | bakedModuleCache[i].TextureAsset.Local = true; | 653 | bakedModuleCache[i].TextureAsset.Local = true; |
648 | cache.Store(bakedModuleCache[i].TextureAsset); | 654 | cache.Cache(bakedModuleCache[i].TextureAsset); |
649 | } | 655 | } |
650 | } | 656 | } |
651 | gotbacked = true; | 657 | gotbacked = true; |
@@ -706,7 +712,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
706 | return 0; | 712 | return 0; |
707 | 713 | ||
708 | int texturesRebaked = 0; | 714 | int texturesRebaked = 0; |
709 | // IAssetCache cache = m_scene.RequestModuleInterface<IAssetCache>(); | 715 | IAssetCache cache = m_scene.RequestModuleInterface<IAssetCache>(); |
710 | 716 | ||
711 | for (int i = 0; i < AvatarAppearance.BAKE_INDICES.Length; i++) | 717 | for (int i = 0; i < AvatarAppearance.BAKE_INDICES.Length; i++) |
712 | { | 718 | { |
@@ -722,18 +728,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
722 | 728 | ||
723 | if (missingTexturesOnly) | 729 | if (missingTexturesOnly) |
724 | { | 730 | { |
725 | if (m_scene.AssetService.Get(face.TextureID.ToString()) != null) | 731 | if (cache != null && cache.Check(face.TextureID.ToString())) |
726 | { | 732 | { |
727 | continue; | 733 | continue; |
728 | } | 734 | } |
729 | else | 735 | else |
730 | { | 736 | { |
731 | // On inter-simulator teleports, this occurs if baked textures are not being stored by the | ||
732 | // grid asset service (which means that they are not available to the new region and so have | ||
733 | // to be re-requested from the client). | ||
734 | // | ||
735 | // The only available core OpenSimulator behaviour right now | ||
736 | // is not to store these textures, temporarily or otherwise. | ||
737 | m_log.DebugFormat( | 737 | m_log.DebugFormat( |
738 | "[AVFACTORY]: Missing baked texture {0} ({1}) for {2}, requesting rebake.", | 738 | "[AVFACTORY]: Missing baked texture {0} ({1}) for {2}, requesting rebake.", |
739 | face.TextureID, idx, sp.Name); | 739 | face.TextureID, idx, sp.Name); |