Thank you kindly, Ewe Loon, for a patch that solves:

PRIM_TEXGEN not in llSetPrimitiveParams. Patch has 
been included to implement it.
0.6.5-rc1
Charles Krinke 2009-04-26 00:45:48 +00:00
parent 94ab683fe1
commit c3d619498f
1 changed files with 39 additions and 0 deletions

View File

@ -1305,6 +1305,36 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
}
public void SetTexGen(SceneObjectPart part, int face,int style)
{
Primitive.TextureEntry tex = part.Shape.Textures;
MappingType textype;
textype = MappingType.Default;
if (style == (int)ScriptBaseClass.PRIM_TEXGEN_PLANAR)
textype = MappingType.Planar;
if (face >= 0 && face < GetNumberOfSides(part))
{
tex.CreateFace((uint) face);
tex.FaceTextures[face].TexMapType = textype;
part.UpdateTexture(tex);
return;
}
else if (face == ScriptBaseClass.ALL_SIDES)
{
for (uint i = 0; i < GetNumberOfSides(part); i++)
{
if (tex.FaceTextures[i] != null)
{
tex.FaceTextures[i].TexMapType = textype;
}
tex.DefaultTexture.TexMapType = textype;
}
part.UpdateTexture(tex);
return;
}
}
public void SetGlow(SceneObjectPart part, int face, float glow)
{
Primitive.TextureEntry tex = part.Shape.Textures;
@ -6822,6 +6852,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
part.ScriptSetTemporaryStatus(tempOnRez);
break;
case (int)ScriptBaseClass.PRIM_TEXGEN:
if (remain < 2)
return;
//face,type
face = rules.GetLSLIntegerItem(idx++);
int style = rules.GetLSLIntegerItem(idx++);
SetTexGen(part, face, style);
break;
}
}
}