Now we decode all alpha mask/color params for each texture. TODO make function to calculate final color tint of the texture and modify baker to use color tint and alpha masks (towards LIBOMV-658)

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3050 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
Latif Khalifa
2009-08-02 23:29:48 +00:00
parent cfa9b5b8f9
commit dc60f34a6d
3 changed files with 39 additions and 5 deletions

View File

@@ -112,6 +112,7 @@ namespace VisualParamGenerator
int id = Int32.Parse(node.Attributes["id"].Value);
string bumpAttrib = "false";
bool skipColor = false;
if (node.ParentNode.Name == "layer")
{
@@ -119,6 +120,19 @@ namespace VisualParamGenerator
{
bumpAttrib = "true";
}
for (int nodeNr = 0; nodeNr < node.ParentNode.ChildNodes.Count; nodeNr++)
{
XmlNode lnode = node.ParentNode.ChildNodes[nodeNr];
if (lnode.Name == "texture")
{
if (lnode.Attributes["local_texture_alpha_only"] != null && lnode.Attributes["local_texture_alpha_only"].Value.ToLower() == "true")
{
skipColor = true;
}
}
}
}
@@ -186,7 +200,7 @@ namespace VisualParamGenerator
}
}
if (colors.Count > 0)
if (colors.Count > 0 && !skipColor)
{
string colorsStr = string.Join(", ", colors.ToArray());
Colors.Add(id, string.Format("new VisualColorParam({0}, new System.Drawing.Color[] {{ {1} }})", operation, colorsStr));