diff options
author | UbitUmarov | 2019-09-03 15:19:36 +0100 |
---|---|---|
committer | UbitUmarov | 2019-09-03 15:19:36 +0100 |
commit | 3aae1d0918e5d9fe29c213cd05df3e95cd6e3c0e (patch) | |
tree | 3a9b187424c0118abcd62f18dc53b4ae943e2b31 /OpenSim/Region | |
parent | avoid a null ref (diff) | |
download | opensim-SC-3aae1d0918e5d9fe29c213cd05df3e95cd6e3c0e.zip opensim-SC-3aae1d0918e5d9fe29c213cd05df3e95cd6e3c0e.tar.gz opensim-SC-3aae1d0918e5d9fe29c213cd05df3e95cd6e3c0e.tar.bz2 opensim-SC-3aae1d0918e5d9fe29c213cd05df3e95cd6e3c0e.tar.xz |
mantis 8585: add a bit more debug messages
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs index f927573..1edda0a 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | |||
@@ -541,6 +541,11 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
541 | } | 541 | } |
542 | } | 542 | } |
543 | } | 543 | } |
544 | else | ||
545 | { | ||
546 | m_log.WarnFormat("[Warp3D] failed to get mesh or sculpt asset {0} of prim {1} at {2}", | ||
547 | omvPrim.Sculpt.SculptTexture.ToString(), prim.Name, prim.GetWorldPosition().ToString()); | ||
548 | } | ||
544 | } | 549 | } |
545 | } | 550 | } |
546 | 551 | ||
@@ -579,7 +584,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
579 | // if(lod > DetailLevel.Low) | 584 | // if(lod > DetailLevel.Low) |
580 | { | 585 | { |
581 | // materialName = GetOrCreateMaterial(renderer, faceColor, teFace.TextureID, lod == DetailLevel.Low); | 586 | // materialName = GetOrCreateMaterial(renderer, faceColor, teFace.TextureID, lod == DetailLevel.Low); |
582 | materialName = GetOrCreateMaterial(renderer, faceColor, teFace.TextureID, false); | 587 | materialName = GetOrCreateMaterial(renderer, faceColor, teFace.TextureID, false, prim); |
583 | if (String.IsNullOrEmpty(materialName)) | 588 | if (String.IsNullOrEmpty(materialName)) |
584 | continue; | 589 | continue; |
585 | int c = renderer.Scene.material(materialName).getColor(); | 590 | int c = renderer.Scene.material(materialName).getColor(); |
@@ -747,7 +752,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
747 | return name; | 752 | return name; |
748 | } | 753 | } |
749 | 754 | ||
750 | public string GetOrCreateMaterial(WarpRenderer renderer, Color4 faceColor, UUID textureID, bool useAverageTextureColor) | 755 | public string GetOrCreateMaterial(WarpRenderer renderer, Color4 faceColor, UUID textureID, bool useAverageTextureColor, SceneObjectPart sop) |
751 | { | 756 | { |
752 | int color = ConvertColor(faceColor); | 757 | int color = ConvertColor(faceColor); |
753 | string idstr = textureID.ToString() + color.ToString(); | 758 | string idstr = textureID.ToString() + color.ToString(); |
@@ -757,7 +762,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
757 | return materialName; | 762 | return materialName; |
758 | 763 | ||
759 | warp_Material mat = new warp_Material(); | 764 | warp_Material mat = new warp_Material(); |
760 | warp_Texture texture = GetTexture(textureID); | 765 | warp_Texture texture = GetTexture(textureID, sop); |
761 | if (texture != null) | 766 | if (texture != null) |
762 | { | 767 | { |
763 | if (useAverageTextureColor) | 768 | if (useAverageTextureColor) |
@@ -774,7 +779,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
774 | return materialName; | 779 | return materialName; |
775 | } | 780 | } |
776 | 781 | ||
777 | private warp_Texture GetTexture(UUID id) | 782 | private warp_Texture GetTexture(UUID id, SceneObjectPart sop) |
778 | { | 783 | { |
779 | warp_Texture ret = null; | 784 | warp_Texture ret = null; |
780 | if (id == UUID.Zero) | 785 | if (id == UUID.Zero) |
@@ -794,9 +799,13 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
794 | } | 799 | } |
795 | catch (Exception e) | 800 | catch (Exception e) |
796 | { | 801 | { |
797 | m_log.Warn(string.Format("[WARP 3D IMAGE MODULE]: Failed to decode asset {0}, exception ", id), e); | 802 | m_log.WarnFormat("[Warp3D]: Failed to decode texture {0} for prim {1} at {2}, exception {3] ", id.ToString(), sop.Name, sop.GetWorldPosition().ToString(), e); |
798 | } | 803 | } |
799 | } | 804 | } |
805 | else | ||
806 | m_log.WarnFormat("[Warp3D]: missing texture {0} data for prim {1} at {2}", | ||
807 | id.ToString(), sop.Name, sop.GetWorldPosition().ToString()); | ||
808 | |||
800 | m_warpTextures[id.ToString()] = ret; | 809 | m_warpTextures[id.ToString()] = ret; |
801 | return ret; | 810 | return ret; |
802 | } | 811 | } |