| Anonymous | Login | Signup for a new account | 2013-05-20 07:45 UTC | ![]() |
| Main | My View | View Issues | Change Log | Roadmap | Summary | My Account |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0006171 | opensim | [REGION] Scripting Engine | public | 2012-08-17 14:13 | 2012-08-20 22:26 | ||||
| Reporter | SignpostMarv | ||||||||
| Assigned To | justincc | ||||||||
| Priority | normal | Severity | tweak | Reproducibility | N/A | ||||
| Status | resolved | Resolution | fixed | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | master (dev code) | ||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0006171: PRIM_COLOR performs two texture entry updates rather than one | ||||||||
| Description | Attached patch adds a new method to SceneObjectPart that largely duplicates SetFaceColor with the exception of also updating the alpha channel. | ||||||||
| Tags | No tags attached. | ||||||||
| Git Revision or version number | dc82ad0 | ||||||||
| Run Mode | Standalone (1 Region) , Grid (1 Region per Sim) | ||||||||
| Physics Engine | BasicPhysics | ||||||||
| Environment | .NET / Windows32, .NET / Windows64 | ||||||||
| Mono Version | None | ||||||||
| Viewer | |||||||||
| Attached Files | From e23ec05e91cb415948afe1143c258d3113bf1064 Mon Sep 17 00:00:00 2001
From: SignpostMarv <github@signpostmarv.name>
Date: Fri, 17 Aug 2012 14:47:53 +0100
Subject: [PATCH 1/2] fix typo
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index bd6369c..687af1a 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2858,7 +2858,7 @@ namespace OpenSim.Region.Framework.Scenes
public void SetFaceColor(Vector3 color, int face)
{
// The only way to get a deep copy/ If we don't do this, we can
- // mever detect color changes further down.
+ // never detect color changes further down.
Byte[] buf = Shape.Textures.GetBytes();
Primitive.TextureEntry tex = new Primitive.TextureEntry(buf, 0, buf.Length);
Color4 texcolor;
--
1.7.11.msysgit.1
From 4a30b64aeeffd2e039a146e302fded51e19c0d27 Mon Sep 17 00:00:00 2001
From: SignpostMarv <github@signpostmarv.name>
Date: Fri, 17 Aug 2012 15:09:52 +0100
Subject: [PATCH 2/2] single operation for PRIM_COLOR
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 49 ++++++++++++++++++++++
.../Shared/Api/Implementation/LSL_Api.cs | 5 ++-
2 files changed, 52 insertions(+), 2 deletions(-)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 687af1a..35cb3cd 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2896,6 +2896,55 @@ namespace OpenSim.Region.Framework.Scenes
}
/// <summary>
+ /// Set the color & alpha of prim faces
+ /// </summary>
+ /// <param name="face"></param>
+ /// <param name="color"></param>
+ /// <param name="alpha"></param>
+ public void SetFaceColorAlpha(int face, Vector3 color, double alpha)
+ {
+ // The only way to get a deep copy/ If we don't do this, we can
+ // never detect color changes further down.
+ Byte[] buf = Shape.Textures.GetBytes();
+ Primitive.TextureEntry tex = new Primitive.TextureEntry(buf, 0, buf.Length);
+ Color4 texcolor;
+ if (face >= 0 && face < GetNumberOfSides())
+ {
+ texcolor = tex.CreateFace((uint)face).RGBA;
+ texcolor.R = Util.Clip((float)color.X, 0.0f, 1.0f);
+ texcolor.G = Util.Clip((float)color.Y, 0.0f, 1.0f);
+ texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f);
+ texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f);
+ tex.FaceTextures[face].RGBA = texcolor;
+ UpdateTextureEntry(tex.GetBytes());
+ return;
+ }
+ else if (face == ALL_SIDES)
+ {
+ for (uint i = 0; i < GetNumberOfSides(); i++)
+ {
+ if (tex.FaceTextures[i] != null)
+ {
+ texcolor = tex.FaceTextures[i].RGBA;
+ texcolor.R = Util.Clip((float)color.X, 0.0f, 1.0f);
+ texcolor.G = Util.Clip((float)color.Y, 0.0f, 1.0f);
+ texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f);
+ texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f);
+ tex.FaceTextures[i].RGBA = texcolor;
+ }
+ texcolor = tex.DefaultTexture.RGBA;
+ texcolor.R = Util.Clip((float)color.X, 0.0f, 1.0f);
+ texcolor.G = Util.Clip((float)color.Y, 0.0f, 1.0f);
+ texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f);
+ texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f);
+ tex.DefaultTexture.RGBA = texcolor;
+ }
+ UpdateTextureEntry(tex.GetBytes());
+ return;
+ }
+ }
+
+ /// <summary>
/// Get the number of sides that this part has.
/// </summary>
/// <returns></returns>
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 23a2e36..8868530 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7516,8 +7516,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
LSL_Vector color=rules.GetVector3Item(idx++);
double alpha=(double)rules.GetLSLFloatItem(idx++);
- part.SetFaceColor(new Vector3((float)color.x, (float)color.y, (float)color.z), face);
- SetAlpha(part, alpha, face);
+ part.SetFaceColorAlpha(face,
+ new Vector3((float)color.x,
+ (float)color.y, (float)color.z), alpha);
break;
--
1.7.11.msysgit.1
From 4e14b04cc875221c738423270c84f23488d76b77 Mon Sep 17 00:00:00 2001
From: SignpostMarv <github@signpostmarv.name>
Date: Fri, 17 Aug 2012 14:47:53 +0100
Subject: [PATCH 1/4] fix typo
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 53b4f7e..0535dcb 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2858,7 +2858,7 @@ namespace OpenSim.Region.Framework.Scenes
public void SetFaceColor(Vector3 color, int face)
{
// The only way to get a deep copy/ If we don't do this, we can
- // mever detect color changes further down.
+ // never detect color changes further down.
Byte[] buf = Shape.Textures.GetBytes();
Primitive.TextureEntry tex = new Primitive.TextureEntry(buf, 0, buf.Length);
Color4 texcolor;
--
1.7.11.msysgit.1
From d061f6f5a53a3388b9850c6729d995c9326af3bb Mon Sep 17 00:00:00 2001
From: SignpostMarv <github@signpostmarv.name>
Date: Fri, 17 Aug 2012 15:09:52 +0100
Subject: [PATCH 2/4] single operation for PRIM_COLOR
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 49 ++++++++++++++++++++++
.../Shared/Api/Implementation/LSL_Api.cs | 3 +-
2 files changed, 50 insertions(+), 2 deletions(-)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 0535dcb..6741e5e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2896,6 +2896,55 @@ namespace OpenSim.Region.Framework.Scenes
}
/// <summary>
+ /// Set the color & alpha of prim faces
+ /// </summary>
+ /// <param name="face"></param>
+ /// <param name="color"></param>
+ /// <param name="alpha"></param>
+ public void SetFaceColorAlpha(int face, Vector3 color, double alpha)
+ {
+ // The only way to get a deep copy/ If we don't do this, we can
+ // never detect color changes further down.
+ Byte[] buf = Shape.Textures.GetBytes();
+ Primitive.TextureEntry tex = new Primitive.TextureEntry(buf, 0, buf.Length);
+ Color4 texcolor;
+ if (face >= 0 && face < GetNumberOfSides())
+ {
+ texcolor = tex.CreateFace((uint)face).RGBA;
+ texcolor.R = Util.Clip((float)color.X, 0.0f, 1.0f);
+ texcolor.G = Util.Clip((float)color.Y, 0.0f, 1.0f);
+ texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f);
+ texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f);
+ tex.FaceTextures[face].RGBA = texcolor;
+ UpdateTextureEntry(tex.GetBytes());
+ return;
+ }
+ else if (face == ALL_SIDES)
+ {
+ for (uint i = 0; i < GetNumberOfSides(); i++)
+ {
+ if (tex.FaceTextures[i] != null)
+ {
+ texcolor = tex.FaceTextures[i].RGBA;
+ texcolor.R = Util.Clip((float)color.X, 0.0f, 1.0f);
+ texcolor.G = Util.Clip((float)color.Y, 0.0f, 1.0f);
+ texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f);
+ texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f);
+ tex.FaceTextures[i].RGBA = texcolor;
+ }
+ texcolor = tex.DefaultTexture.RGBA;
+ texcolor.R = Util.Clip((float)color.X, 0.0f, 1.0f);
+ texcolor.G = Util.Clip((float)color.Y, 0.0f, 1.0f);
+ texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f);
+ texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f);
+ tex.DefaultTexture.RGBA = texcolor;
+ }
+ UpdateTextureEntry(tex.GetBytes());
+ return;
+ }
+ }
+
+ /// <summary>
/// Get the number of sides that this part has.
/// </summary>
/// <returns></returns>
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 663452d..72ba9ed 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7484,8 +7484,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
LSL_Vector color=rules.GetVector3Item(idx++);
double alpha=(double)rules.GetLSLFloatItem(idx++);
- part.SetFaceColor(color, face);
- SetAlpha(part, alpha, face);
+ part.SetFaceColorAlpha(face, new Vector3((float)color.x, (float)color.y, (float)color.z), alpha);
break;
--
1.7.11.msysgit.1
From 4050a1a16e7b75dc59f94a62bfed4a905f1591d0 Mon Sep 17 00:00:00 2001
From: SignpostMarv <github@signpostmarv.name>
Date: Mon, 20 Aug 2012 09:26:26 +0100
Subject: [PATCH 3/4] making use of implicit operators and Util.Clip handling
of Vector3
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 47 ++++++++++++----------
.../Shared/Api/Implementation/LSL_Api.cs | 2 +-
2 files changed, 27 insertions(+), 22 deletions(-)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 6741e5e..098b2d9 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2857,6 +2857,8 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="face"></param>
public void SetFaceColor(Vector3 color, int face)
{
+ Vector3 clippedColor = Util.Clip(color, 0.0f, 1.0f);
+
// The only way to get a deep copy/ If we don't do this, we can
// never detect color changes further down.
Byte[] buf = Shape.Textures.GetBytes();
@@ -2865,9 +2867,9 @@ namespace OpenSim.Region.Framework.Scenes
if (face >= 0 && face < GetNumberOfSides())
{
texcolor = tex.CreateFace((uint)face).RGBA;
- texcolor.R = Util.Clip((float)color.X, 0.0f, 1.0f);
- texcolor.G = Util.Clip((float)color.Y, 0.0f, 1.0f);
- texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f);
+ texcolor.R = clippedColor.X;
+ texcolor.G = clippedColor.Y;
+ texcolor.B = clippedColor.Z;
tex.FaceTextures[face].RGBA = texcolor;
UpdateTextureEntry(tex.GetBytes());
return;
@@ -2879,15 +2881,15 @@ namespace OpenSim.Region.Framework.Scenes
if (tex.FaceTextures[i] != null)
{
texcolor = tex.FaceTextures[i].RGBA;
- texcolor.R = Util.Clip((float)color.X, 0.0f, 1.0f);
- texcolor.G = Util.Clip((float)color.Y, 0.0f, 1.0f);
- texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f);
+ texcolor.R = clippedColor.X;
+ texcolor.G = clippedColor.Y;
+ texcolor.B = clippedColor.Z;
tex.FaceTextures[i].RGBA = texcolor;
}
texcolor = tex.DefaultTexture.RGBA;
- texcolor.R = Util.Clip((float)color.X, 0.0f, 1.0f);
- texcolor.G = Util.Clip((float)color.Y, 0.0f, 1.0f);
- texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f);
+ texcolor.R = clippedColor.X;
+ texcolor.G = clippedColor.Y;
+ texcolor.B = clippedColor.Z;
tex.DefaultTexture.RGBA = texcolor;
}
UpdateTextureEntry(tex.GetBytes());
@@ -2903,6 +2905,9 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="alpha"></param>
public void SetFaceColorAlpha(int face, Vector3 color, double alpha)
{
+ Vector3 clippedColor = Util.Clip(color, 0.0f, 1.0f);
+ float clippedAlpha = Util.Clip((float)alpha, 0.0f, 1.0f);
+
// The only way to get a deep copy/ If we don't do this, we can
// never detect color changes further down.
Byte[] buf = Shape.Textures.GetBytes();
@@ -2911,10 +2916,10 @@ namespace OpenSim.Region.Framework.Scenes
if (face >= 0 && face < GetNumberOfSides())
{
texcolor = tex.CreateFace((uint)face).RGBA;
- texcolor.R = Util.Clip((float)color.X, 0.0f, 1.0f);
- texcolor.G = Util.Clip((float)color.Y, 0.0f, 1.0f);
- texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f);
- texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f);
+ texcolor.R = clippedColor.X;
+ texcolor.G = clippedColor.Y;
+ texcolor.B = clippedColor.Z;
+ texcolor.A = clippedAlpha;
tex.FaceTextures[face].RGBA = texcolor;
UpdateTextureEntry(tex.GetBytes());
return;
@@ -2926,17 +2931,17 @@ namespace OpenSim.Region.Framework.Scenes
if (tex.FaceTextures[i] != null)
{
texcolor = tex.FaceTextures[i].RGBA;
- texcolor.R = Util.Clip((float)color.X, 0.0f, 1.0f);
- texcolor.G = Util.Clip((float)color.Y, 0.0f, 1.0f);
- texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f);
- texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f);
+ texcolor.R = clippedColor.X;
+ texcolor.G = clippedColor.Y;
+ texcolor.B = clippedColor.Z;
+ texcolor.A = clippedAlpha;
tex.FaceTextures[i].RGBA = texcolor;
}
texcolor = tex.DefaultTexture.RGBA;
- texcolor.R = Util.Clip((float)color.X, 0.0f, 1.0f);
- texcolor.G = Util.Clip((float)color.Y, 0.0f, 1.0f);
- texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f);
- texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f);
+ texcolor.R = clippedColor.X;
+ texcolor.G = clippedColor.Y;
+ texcolor.B = clippedColor.Z;
+ texcolor.A = clippedAlpha;
tex.DefaultTexture.RGBA = texcolor;
}
UpdateTextureEntry(tex.GetBytes());
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 72ba9ed..f2a4808 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7484,7 +7484,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
LSL_Vector color=rules.GetVector3Item(idx++);
double alpha=(double)rules.GetLSLFloatItem(idx++);
- part.SetFaceColorAlpha(face, new Vector3((float)color.x, (float)color.y, (float)color.z), alpha);
+ part.SetFaceColorAlpha(face, color, alpha);
break;
--
1.7.11.msysgit.1
From 25686cde2cbbcb83740dbbedb4b08f7830baf34c Mon Sep 17 00:00:00 2001
From: SignpostMarv <github@signpostmarv.name>
Date: Mon, 20 Aug 2012 09:31:29 +0100
Subject: [PATCH 4/4] refactoring out SetFaceColor
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 67 +++++-----------------
.../Shared/Api/Implementation/LSL_Api.cs | 4 +-
2 files changed, 17 insertions(+), 54 deletions(-)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 098b2d9..2a9ee3a 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2851,62 +2851,16 @@ namespace OpenSim.Region.Framework.Scenes
}
/// <summary>
- /// Set the color of prim faces
- /// </summary>
- /// <param name="color"></param>
- /// <param name="face"></param>
- public void SetFaceColor(Vector3 color, int face)
- {
- Vector3 clippedColor = Util.Clip(color, 0.0f, 1.0f);
-
- // The only way to get a deep copy/ If we don't do this, we can
- // never detect color changes further down.
- Byte[] buf = Shape.Textures.GetBytes();
- Primitive.TextureEntry tex = new Primitive.TextureEntry(buf, 0, buf.Length);
- Color4 texcolor;
- if (face >= 0 && face < GetNumberOfSides())
- {
- texcolor = tex.CreateFace((uint)face).RGBA;
- texcolor.R = clippedColor.X;
- texcolor.G = clippedColor.Y;
- texcolor.B = clippedColor.Z;
- tex.FaceTextures[face].RGBA = texcolor;
- UpdateTextureEntry(tex.GetBytes());
- return;
- }
- else if (face == ALL_SIDES)
- {
- for (uint i = 0; i < GetNumberOfSides(); i++)
- {
- if (tex.FaceTextures[i] != null)
- {
- texcolor = tex.FaceTextures[i].RGBA;
- texcolor.R = clippedColor.X;
- texcolor.G = clippedColor.Y;
- texcolor.B = clippedColor.Z;
- tex.FaceTextures[i].RGBA = texcolor;
- }
- texcolor = tex.DefaultTexture.RGBA;
- texcolor.R = clippedColor.X;
- texcolor.G = clippedColor.Y;
- texcolor.B = clippedColor.Z;
- tex.DefaultTexture.RGBA = texcolor;
- }
- UpdateTextureEntry(tex.GetBytes());
- return;
- }
- }
-
- /// <summary>
/// Set the color & alpha of prim faces
/// </summary>
/// <param name="face"></param>
/// <param name="color"></param>
/// <param name="alpha"></param>
- public void SetFaceColorAlpha(int face, Vector3 color, double alpha)
+ public void SetFaceColorAlpha(int face, Vector3 color, double ?alpha)
{
Vector3 clippedColor = Util.Clip(color, 0.0f, 1.0f);
- float clippedAlpha = Util.Clip((float)alpha, 0.0f, 1.0f);
+ float clippedAlpha = alpha.HasValue ?
+ Util.Clip((float)alpha.Value, 0.0f, 1.0f) : 0;
// The only way to get a deep copy/ If we don't do this, we can
// never detect color changes further down.
@@ -2919,7 +2873,10 @@ namespace OpenSim.Region.Framework.Scenes
texcolor.R = clippedColor.X;
texcolor.G = clippedColor.Y;
texcolor.B = clippedColor.Z;
- texcolor.A = clippedAlpha;
+ if (alpha.HasValue)
+ {
+ texcolor.A = clippedAlpha;
+ }
tex.FaceTextures[face].RGBA = texcolor;
UpdateTextureEntry(tex.GetBytes());
return;
@@ -2934,14 +2891,20 @@ namespace OpenSim.Region.Framework.Scenes
texcolor.R = clippedColor.X;
texcolor.G = clippedColor.Y;
texcolor.B = clippedColor.Z;
- texcolor.A = clippedAlpha;
+ if (alpha.HasValue)
+ {
+ texcolor.A = clippedAlpha;
+ }
tex.FaceTextures[i].RGBA = texcolor;
}
texcolor = tex.DefaultTexture.RGBA;
texcolor.R = clippedColor.X;
texcolor.G = clippedColor.Y;
texcolor.B = clippedColor.Z;
- texcolor.A = clippedAlpha;
+ if (alpha.HasValue)
+ {
+ texcolor.A = clippedAlpha;
+ }
tex.DefaultTexture.RGBA = texcolor;
}
UpdateTextureEntry(tex.GetBytes());
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index f2a4808..aeb506c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1377,7 +1377,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (face == ScriptBaseClass.ALL_SIDES)
face = SceneObjectPart.ALL_SIDES;
- m_host.SetFaceColor(color, face);
+ m_host.SetFaceColorAlpha(face, color, null);
}
public void SetTexGen(SceneObjectPart part, int face,int style)
@@ -3572,7 +3572,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
List<SceneObjectPart> parts = GetLinkParts(linknumber);
foreach (SceneObjectPart part in parts)
- part.SetFaceColor(color, face);
+ part.SetFaceColorAlpha(face, color, null);
}
public void llCreateLink(string target, int parent)
--
1.7.11.msysgit.1
| ||||||||
Notes |
|
|
(0022103) justincc (administrator) 2012-08-17 17:56 |
I would want to see a SetFaceColorAlpha() method that was called by SetFaceColor() with a possible null alpha parameter (in which case no alpha would be applied) rather than copy/pasting SetFaceColor() |
|
(0022385) SignpostMarv (reporter) 2012-08-20 08:45 |
rebased & refactored patch attached. |
|
(0022400) justincc (administrator) 2012-08-20 22:26 |
Applied as git master aee4353, b863a15a, ede3b9a and 481c00f. Thanks SignpostMarv. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-08-17 14:13 | SignpostMarv | New Issue | |
| 2012-08-17 14:13 | SignpostMarv | File Added: SetFaceColorAlpha.patch | |
| 2012-08-17 17:56 | justincc | Note Added: 0022103 | |
| 2012-08-17 17:56 | justincc | Assigned To | => justincc |
| 2012-08-17 17:56 | justincc | Status | new => feedback |
| 2012-08-17 17:56 | justincc | Status | feedback => patch feedback |
| 2012-08-18 11:32 | DMX04 | Issue cloned: 0006188 | |
| 2012-08-20 08:44 | SignpostMarv | File Added: SetFaceColorAlpha-refactored.patch | |
| 2012-08-20 08:45 | SignpostMarv | Note Added: 0022385 | |
| 2012-08-20 08:45 | SignpostMarv | Status | patch feedback => patch included |
| 2012-08-20 22:26 | justincc | Note Added: 0022400 | |
| 2012-08-20 22:26 | justincc | Status | patch included => resolved |
| 2012-08-20 22:26 | justincc | Resolution | open => fixed |
| Copyright © 2000 - 2012 MantisBT Group |




