diff options
4 files changed, 67 insertions, 66 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index f2c8b3d..18bd018 100644 --- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs | |||
@@ -355,7 +355,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
355 | // I'm pretty sure noone whats to set fullbright true if it wasn't true before. | 355 | // I'm pretty sure noone whats to set fullbright true if it wasn't true before. |
356 | // tmptex.DefaultTexture.Fullbright = true; | 356 | // tmptex.DefaultTexture.Fullbright = true; |
357 | 357 | ||
358 | part.UpdateTexture(tmptex); | 358 | part.UpdateTextureEntry(tmptex.GetBytes()); |
359 | } | 359 | } |
360 | 360 | ||
361 | if (oldID != UUID.Zero && ((Disp & DISP_EXPIRE) != 0)) | 361 | if (oldID != UUID.Zero && ((Disp & DISP_EXPIRE) != 0)) |
@@ -437,4 +437,4 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
437 | 437 | ||
438 | #endregion | 438 | #endregion |
439 | } | 439 | } |
440 | } \ No newline at end of file | 440 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 11040b7..c88e1d7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -3231,7 +3231,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
3231 | /// <param name="face"></param> | 3231 | /// <param name="face"></param> |
3232 | public void SetFaceColor(Vector3 color, int face) | 3232 | public void SetFaceColor(Vector3 color, int face) |
3233 | { | 3233 | { |
3234 | Primitive.TextureEntry tex = Shape.Textures; | 3234 | // The only way to get a deep copy/ If we don't do this, we can |
3235 | // mever detect color changes further down. | ||
3236 | Byte[] buf = Shape.Textures.GetBytes(); | ||
3237 | Primitive.TextureEntry tex = new Primitive.TextureEntry(buf, 0, buf.Length); | ||
3235 | Color4 texcolor; | 3238 | Color4 texcolor; |
3236 | if (face >= 0 && face < GetNumberOfSides()) | 3239 | if (face >= 0 && face < GetNumberOfSides()) |
3237 | { | 3240 | { |
@@ -3240,8 +3243,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3240 | texcolor.G = Util.Clip((float)color.Y, 0.0f, 1.0f); | 3243 | texcolor.G = Util.Clip((float)color.Y, 0.0f, 1.0f); |
3241 | texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f); | 3244 | texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f); |
3242 | tex.FaceTextures[face].RGBA = texcolor; | 3245 | tex.FaceTextures[face].RGBA = texcolor; |
3243 | UpdateTexture(tex); | 3246 | UpdateTextureEntry(tex.GetBytes()); |
3244 | TriggerScriptChangedEvent(Changed.COLOR); | ||
3245 | return; | 3247 | return; |
3246 | } | 3248 | } |
3247 | else if (face == ALL_SIDES) | 3249 | else if (face == ALL_SIDES) |
@@ -3262,8 +3264,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3262 | texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f); | 3264 | texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f); |
3263 | tex.DefaultTexture.RGBA = texcolor; | 3265 | tex.DefaultTexture.RGBA = texcolor; |
3264 | } | 3266 | } |
3265 | UpdateTexture(tex); | 3267 | UpdateTextureEntry(tex.GetBytes()); |
3266 | TriggerScriptChangedEvent(Changed.COLOR); | ||
3267 | return; | 3268 | return; |
3268 | } | 3269 | } |
3269 | } | 3270 | } |
@@ -4585,46 +4586,46 @@ namespace OpenSim.Region.Framework.Scenes | |||
4585 | } | 4586 | } |
4586 | 4587 | ||
4587 | /// <summary> | 4588 | /// <summary> |
4588 | /// Update the textures on the part. | ||
4589 | /// </summary> | ||
4590 | /// <remarks> | ||
4591 | /// Added to handle bug in libsecondlife's TextureEntry.ToBytes() | ||
4592 | /// not handling RGBA properly. Cycles through, and "fixes" the color | ||
4593 | /// info | ||
4594 | /// </remarks> | ||
4595 | /// <param name="tex"></param> | ||
4596 | public void UpdateTexture(Primitive.TextureEntry tex) | ||
4597 | { | ||
4598 | //Color4 tmpcolor; | ||
4599 | //for (uint i = 0; i < 32; i++) | ||
4600 | //{ | ||
4601 | // if (tex.FaceTextures[i] != null) | ||
4602 | // { | ||
4603 | // tmpcolor = tex.GetFace((uint) i).RGBA; | ||
4604 | // tmpcolor.A = tmpcolor.A*255; | ||
4605 | // tmpcolor.R = tmpcolor.R*255; | ||
4606 | // tmpcolor.G = tmpcolor.G*255; | ||
4607 | // tmpcolor.B = tmpcolor.B*255; | ||
4608 | // tex.FaceTextures[i].RGBA = tmpcolor; | ||
4609 | // } | ||
4610 | //} | ||
4611 | //tmpcolor = tex.DefaultTexture.RGBA; | ||
4612 | //tmpcolor.A = tmpcolor.A*255; | ||
4613 | //tmpcolor.R = tmpcolor.R*255; | ||
4614 | //tmpcolor.G = tmpcolor.G*255; | ||
4615 | //tmpcolor.B = tmpcolor.B*255; | ||
4616 | //tex.DefaultTexture.RGBA = tmpcolor; | ||
4617 | UpdateTextureEntry(tex.GetBytes()); | ||
4618 | } | ||
4619 | |||
4620 | /// <summary> | ||
4621 | /// Update the texture entry for this part. | 4589 | /// Update the texture entry for this part. |
4622 | /// </summary> | 4590 | /// </summary> |
4623 | /// <param name="textureEntry"></param> | 4591 | /// <param name="textureEntry"></param> |
4624 | public void UpdateTextureEntry(byte[] textureEntry) | 4592 | public void UpdateTextureEntry(byte[] textureEntry) |
4625 | { | 4593 | { |
4594 | Primitive.TextureEntry newTex = new Primitive.TextureEntry(textureEntry, 0, textureEntry.Length); | ||
4595 | Primitive.TextureEntry oldTex = Shape.Textures; | ||
4596 | |||
4597 | Changed changeFlags = 0; | ||
4598 | |||
4599 | for (int i = 0 ; i < GetNumberOfSides(); i++) | ||
4600 | { | ||
4601 | Primitive.TextureEntryFace newFace = newTex.DefaultTexture; | ||
4602 | Primitive.TextureEntryFace oldFace = oldTex.DefaultTexture; | ||
4603 | |||
4604 | if (oldTex.FaceTextures[i] != null) | ||
4605 | oldFace = oldTex.FaceTextures[i]; | ||
4606 | if (newTex.FaceTextures[i] != null) | ||
4607 | newFace = newTex.FaceTextures[i]; | ||
4608 | |||
4609 | Color4 oldRGBA = oldFace.RGBA; | ||
4610 | Color4 newRGBA = newFace.RGBA; | ||
4611 | |||
4612 | if (oldRGBA.R != newRGBA.R || | ||
4613 | oldRGBA.G != newRGBA.G || | ||
4614 | oldRGBA.B != newRGBA.B || | ||
4615 | oldRGBA.A != newRGBA.A) | ||
4616 | changeFlags |= Changed.COLOR; | ||
4617 | |||
4618 | if (oldFace.TextureID != newFace.TextureID) | ||
4619 | changeFlags |= Changed.TEXTURE; | ||
4620 | |||
4621 | // Max change, skip the rest of testing | ||
4622 | if (changeFlags == (Changed.TEXTURE | Changed.COLOR)) | ||
4623 | break; | ||
4624 | } | ||
4625 | |||
4626 | m_shape.TextureEntry = textureEntry; | 4626 | m_shape.TextureEntry = textureEntry; |
4627 | TriggerScriptChangedEvent(Changed.TEXTURE); | 4627 | if (changeFlags != 0) |
4628 | TriggerScriptChangedEvent(changeFlags); | ||
4628 | UpdateFlag = UpdateRequired.FULL; | 4629 | UpdateFlag = UpdateRequired.FULL; |
4629 | ParentGroup.HasGroupChanged = true; | 4630 | ParentGroup.HasGroupChanged = true; |
4630 | 4631 | ||
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs index 0cba6af..cea738c 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
55 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face); | 55 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face); |
56 | texface.RGBA = new Color4(value.R,value.G,value.B,value.A); | 56 | texface.RGBA = new Color4(value.R,value.G,value.B,value.A); |
57 | tex.FaceTextures[m_face] = texface; | 57 | tex.FaceTextures[m_face] = texface; |
58 | m_parent.UpdateTexture(tex); | 58 | m_parent.UpdateTextureEntry(tex.GetBytes()); |
59 | } | 59 | } |
60 | } | 60 | } |
61 | 61 | ||
@@ -72,7 +72,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
72 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face); | 72 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face); |
73 | texface.TextureID = value; | 73 | texface.TextureID = value; |
74 | tex.FaceTextures[m_face] = texface; | 74 | tex.FaceTextures[m_face] = texface; |
75 | m_parent.UpdateTexture(tex); | 75 | m_parent.UpdateTextureEntry(tex.GetBytes()); |
76 | } | 76 | } |
77 | } | 77 | } |
78 | 78 | ||
@@ -97,7 +97,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
97 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face); | 97 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face); |
98 | texface.Fullbright = value; | 98 | texface.Fullbright = value; |
99 | tex.FaceTextures[m_face] = texface; | 99 | tex.FaceTextures[m_face] = texface; |
100 | m_parent.UpdateTexture(tex); | 100 | m_parent.UpdateTextureEntry(tex.GetBytes()); |
101 | } | 101 | } |
102 | } | 102 | } |
103 | 103 | ||
@@ -110,7 +110,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
110 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face); | 110 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face); |
111 | texface.Glow = (float) value; | 111 | texface.Glow = (float) value; |
112 | tex.FaceTextures[m_face] = texface; | 112 | tex.FaceTextures[m_face] = texface; |
113 | m_parent.UpdateTexture(tex); | 113 | m_parent.UpdateTextureEntry(tex.GetBytes()); |
114 | } | 114 | } |
115 | } | 115 | } |
116 | 116 | ||
@@ -123,7 +123,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
123 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face); | 123 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face); |
124 | texface.Shiny = value ? Shininess.High : Shininess.None; | 124 | texface.Shiny = value ? Shininess.High : Shininess.None; |
125 | tex.FaceTextures[m_face] = texface; | 125 | tex.FaceTextures[m_face] = texface; |
126 | m_parent.UpdateTexture(tex); | 126 | m_parent.UpdateTextureEntry(tex.GetBytes()); |
127 | } | 127 | } |
128 | } | 128 | } |
129 | 129 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index e26aef3..ea99113 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1540,7 +1540,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1540 | texcolor.G = Util.Clip((float)color.y, 0.0f, 1.0f); | 1540 | texcolor.G = Util.Clip((float)color.y, 0.0f, 1.0f); |
1541 | texcolor.B = Util.Clip((float)color.z, 0.0f, 1.0f); | 1541 | texcolor.B = Util.Clip((float)color.z, 0.0f, 1.0f); |
1542 | tex.FaceTextures[face].RGBA = texcolor; | 1542 | tex.FaceTextures[face].RGBA = texcolor; |
1543 | part.UpdateTexture(tex); | 1543 | part.UpdateTextureEntry(tex.GetBytes()); |
1544 | return; | 1544 | return; |
1545 | } | 1545 | } |
1546 | else if (face == ScriptBaseClass.ALL_SIDES) | 1546 | else if (face == ScriptBaseClass.ALL_SIDES) |
@@ -1561,7 +1561,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1561 | texcolor.B = Util.Clip((float)color.z, 0.0f, 1.0f); | 1561 | texcolor.B = Util.Clip((float)color.z, 0.0f, 1.0f); |
1562 | tex.DefaultTexture.RGBA = texcolor; | 1562 | tex.DefaultTexture.RGBA = texcolor; |
1563 | } | 1563 | } |
1564 | part.UpdateTexture(tex); | 1564 | part.UpdateTextureEntry(tex.GetBytes()); |
1565 | return; | 1565 | return; |
1566 | } | 1566 | } |
1567 | 1567 | ||
@@ -1586,7 +1586,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1586 | { | 1586 | { |
1587 | tex.CreateFace((uint) face); | 1587 | tex.CreateFace((uint) face); |
1588 | tex.FaceTextures[face].TexMapType = textype; | 1588 | tex.FaceTextures[face].TexMapType = textype; |
1589 | part.UpdateTexture(tex); | 1589 | part.UpdateTextureEntry(tex.GetBytes()); |
1590 | return; | 1590 | return; |
1591 | } | 1591 | } |
1592 | else if (face == ScriptBaseClass.ALL_SIDES) | 1592 | else if (face == ScriptBaseClass.ALL_SIDES) |
@@ -1599,7 +1599,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1599 | } | 1599 | } |
1600 | tex.DefaultTexture.TexMapType = textype; | 1600 | tex.DefaultTexture.TexMapType = textype; |
1601 | } | 1601 | } |
1602 | part.UpdateTexture(tex); | 1602 | part.UpdateTextureEntry(tex.GetBytes()); |
1603 | return; | 1603 | return; |
1604 | } | 1604 | } |
1605 | } | 1605 | } |
@@ -1614,7 +1614,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1614 | { | 1614 | { |
1615 | tex.CreateFace((uint) face); | 1615 | tex.CreateFace((uint) face); |
1616 | tex.FaceTextures[face].Glow = glow; | 1616 | tex.FaceTextures[face].Glow = glow; |
1617 | part.UpdateTexture(tex); | 1617 | part.UpdateTextureEntry(tex.GetBytes()); |
1618 | return; | 1618 | return; |
1619 | } | 1619 | } |
1620 | else if (face == ScriptBaseClass.ALL_SIDES) | 1620 | else if (face == ScriptBaseClass.ALL_SIDES) |
@@ -1627,7 +1627,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1627 | } | 1627 | } |
1628 | tex.DefaultTexture.Glow = glow; | 1628 | tex.DefaultTexture.Glow = glow; |
1629 | } | 1629 | } |
1630 | part.UpdateTexture(tex); | 1630 | part.UpdateTextureEntry(tex.GetBytes()); |
1631 | return; | 1631 | return; |
1632 | } | 1632 | } |
1633 | } | 1633 | } |
@@ -1664,7 +1664,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1664 | tex.CreateFace((uint) face); | 1664 | tex.CreateFace((uint) face); |
1665 | tex.FaceTextures[face].Shiny = sval; | 1665 | tex.FaceTextures[face].Shiny = sval; |
1666 | tex.FaceTextures[face].Bump = bump; | 1666 | tex.FaceTextures[face].Bump = bump; |
1667 | part.UpdateTexture(tex); | 1667 | part.UpdateTextureEntry(tex.GetBytes()); |
1668 | return; | 1668 | return; |
1669 | } | 1669 | } |
1670 | else if (face == ScriptBaseClass.ALL_SIDES) | 1670 | else if (face == ScriptBaseClass.ALL_SIDES) |
@@ -1679,7 +1679,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1679 | tex.DefaultTexture.Shiny = sval; | 1679 | tex.DefaultTexture.Shiny = sval; |
1680 | tex.DefaultTexture.Bump = bump; | 1680 | tex.DefaultTexture.Bump = bump; |
1681 | } | 1681 | } |
1682 | part.UpdateTexture(tex); | 1682 | part.UpdateTextureEntry(tex.GetBytes()); |
1683 | return; | 1683 | return; |
1684 | } | 1684 | } |
1685 | } | 1685 | } |
@@ -1694,7 +1694,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1694 | { | 1694 | { |
1695 | tex.CreateFace((uint) face); | 1695 | tex.CreateFace((uint) face); |
1696 | tex.FaceTextures[face].Fullbright = bright; | 1696 | tex.FaceTextures[face].Fullbright = bright; |
1697 | part.UpdateTexture(tex); | 1697 | part.UpdateTextureEntry(tex.GetBytes()); |
1698 | return; | 1698 | return; |
1699 | } | 1699 | } |
1700 | else if (face == ScriptBaseClass.ALL_SIDES) | 1700 | else if (face == ScriptBaseClass.ALL_SIDES) |
@@ -1707,7 +1707,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1707 | } | 1707 | } |
1708 | } | 1708 | } |
1709 | tex.DefaultTexture.Fullbright = bright; | 1709 | tex.DefaultTexture.Fullbright = bright; |
1710 | part.UpdateTexture(tex); | 1710 | part.UpdateTextureEntry(tex.GetBytes()); |
1711 | return; | 1711 | return; |
1712 | } | 1712 | } |
1713 | } | 1713 | } |
@@ -1776,7 +1776,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1776 | texcolor = tex.CreateFace((uint)face).RGBA; | 1776 | texcolor = tex.CreateFace((uint)face).RGBA; |
1777 | texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f); | 1777 | texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f); |
1778 | tex.FaceTextures[face].RGBA = texcolor; | 1778 | tex.FaceTextures[face].RGBA = texcolor; |
1779 | part.UpdateTexture(tex); | 1779 | part.UpdateTextureEntry(tex.GetBytes()); |
1780 | return; | 1780 | return; |
1781 | } | 1781 | } |
1782 | else if (face == ScriptBaseClass.ALL_SIDES) | 1782 | else if (face == ScriptBaseClass.ALL_SIDES) |
@@ -1800,7 +1800,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1800 | tex.DefaultTexture.RGBA = texcolor; | 1800 | tex.DefaultTexture.RGBA = texcolor; |
1801 | } | 1801 | } |
1802 | 1802 | ||
1803 | part.UpdateTexture(tex); | 1803 | part.UpdateTextureEntry(tex.GetBytes()); |
1804 | return; | 1804 | return; |
1805 | } | 1805 | } |
1806 | } | 1806 | } |
@@ -1969,7 +1969,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1969 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)face); | 1969 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)face); |
1970 | texface.TextureID = textureID; | 1970 | texface.TextureID = textureID; |
1971 | tex.FaceTextures[face] = texface; | 1971 | tex.FaceTextures[face] = texface; |
1972 | part.UpdateTexture(tex); | 1972 | part.UpdateTextureEntry(tex.GetBytes()); |
1973 | return; | 1973 | return; |
1974 | } | 1974 | } |
1975 | else if (face == ScriptBaseClass.ALL_SIDES) | 1975 | else if (face == ScriptBaseClass.ALL_SIDES) |
@@ -1982,7 +1982,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1982 | } | 1982 | } |
1983 | } | 1983 | } |
1984 | tex.DefaultTexture.TextureID = textureID; | 1984 | tex.DefaultTexture.TextureID = textureID; |
1985 | part.UpdateTexture(tex); | 1985 | part.UpdateTextureEntry(tex.GetBytes()); |
1986 | return; | 1986 | return; |
1987 | } | 1987 | } |
1988 | } | 1988 | } |
@@ -2007,7 +2007,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2007 | texface.RepeatU = (float)u; | 2007 | texface.RepeatU = (float)u; |
2008 | texface.RepeatV = (float)v; | 2008 | texface.RepeatV = (float)v; |
2009 | tex.FaceTextures[face] = texface; | 2009 | tex.FaceTextures[face] = texface; |
2010 | part.UpdateTexture(tex); | 2010 | part.UpdateTextureEntry(tex.GetBytes()); |
2011 | return; | 2011 | return; |
2012 | } | 2012 | } |
2013 | if (face == ScriptBaseClass.ALL_SIDES) | 2013 | if (face == ScriptBaseClass.ALL_SIDES) |
@@ -2022,7 +2022,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2022 | } | 2022 | } |
2023 | tex.DefaultTexture.RepeatU = (float)u; | 2023 | tex.DefaultTexture.RepeatU = (float)u; |
2024 | tex.DefaultTexture.RepeatV = (float)v; | 2024 | tex.DefaultTexture.RepeatV = (float)v; |
2025 | part.UpdateTexture(tex); | 2025 | part.UpdateTextureEntry(tex.GetBytes()); |
2026 | return; | 2026 | return; |
2027 | } | 2027 | } |
2028 | } | 2028 | } |
@@ -2046,7 +2046,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2046 | texface.OffsetU = (float)u; | 2046 | texface.OffsetU = (float)u; |
2047 | texface.OffsetV = (float)v; | 2047 | texface.OffsetV = (float)v; |
2048 | tex.FaceTextures[face] = texface; | 2048 | tex.FaceTextures[face] = texface; |
2049 | part.UpdateTexture(tex); | 2049 | part.UpdateTextureEntry(tex.GetBytes()); |
2050 | return; | 2050 | return; |
2051 | } | 2051 | } |
2052 | if (face == ScriptBaseClass.ALL_SIDES) | 2052 | if (face == ScriptBaseClass.ALL_SIDES) |
@@ -2061,7 +2061,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2061 | } | 2061 | } |
2062 | tex.DefaultTexture.OffsetU = (float)u; | 2062 | tex.DefaultTexture.OffsetU = (float)u; |
2063 | tex.DefaultTexture.OffsetV = (float)v; | 2063 | tex.DefaultTexture.OffsetV = (float)v; |
2064 | part.UpdateTexture(tex); | 2064 | part.UpdateTextureEntry(tex.GetBytes()); |
2065 | return; | 2065 | return; |
2066 | } | 2066 | } |
2067 | } | 2067 | } |
@@ -2084,7 +2084,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2084 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)face); | 2084 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)face); |
2085 | texface.Rotation = (float)rotation; | 2085 | texface.Rotation = (float)rotation; |
2086 | tex.FaceTextures[face] = texface; | 2086 | tex.FaceTextures[face] = texface; |
2087 | part.UpdateTexture(tex); | 2087 | part.UpdateTextureEntry(tex.GetBytes()); |
2088 | return; | 2088 | return; |
2089 | } | 2089 | } |
2090 | if (face == ScriptBaseClass.ALL_SIDES) | 2090 | if (face == ScriptBaseClass.ALL_SIDES) |
@@ -2097,7 +2097,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2097 | } | 2097 | } |
2098 | } | 2098 | } |
2099 | tex.DefaultTexture.Rotation = (float)rotation; | 2099 | tex.DefaultTexture.Rotation = (float)rotation; |
2100 | part.UpdateTexture(tex); | 2100 | part.UpdateTextureEntry(tex.GetBytes()); |
2101 | return; | 2101 | return; |
2102 | } | 2102 | } |
2103 | } | 2103 | } |