Body params wasn't correctly detecting some parameters because they didn't specify labels

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@555 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
Michael Cortez
2006-11-10 19:08:35 +00:00
parent 5dc6f96d88
commit 63ca911da5
2 changed files with 1632 additions and 7 deletions

View File

@@ -61,7 +61,7 @@ namespace BodyPartMorphGenerator
Labels.WriteLine(" switch( Param )");
Labels.WriteLine(" {");
Labels.WriteLine(" default:");
Labels.WriteLine(" throw new Exception(\"Unknown Body Part Parameter: \" + Param);");
Labels.WriteLine(" return \"\";");
StringWriter LabelMin = new StringWriter();
LabelMin.WriteLine(" public string GetLabelMin( uint Param )");
@@ -145,14 +145,17 @@ namespace BodyPartMorphGenerator
// Used to identify which nodes are bodyshape parameter nodes
if ( node.Attributes["id"] != null
&& node.Attributes["name"] != null
&& node.Attributes["label"] != null
&& ( (node.Attributes["label"] != null) || (node.Attributes["label_min"] != null) )
)
{
string ID = node.Attributes["id"].Value;
// Label
Labels.WriteLine(" case " + ID + ":");
Labels.WriteLine(" return \"" + node.Attributes["label"].Value + "\";");
if (node.Attributes["label"] != null)
{
// Label
Labels.WriteLine(" case " + ID + ":");
Labels.WriteLine(" return \"" + node.Attributes["label"].Value + "\";");
}
if (node.Attributes["label_min"] != null)
{
@@ -161,7 +164,7 @@ namespace BodyPartMorphGenerator
LabelMin.WriteLine(" return \"" + node.Attributes["label_min"].Value + "\";");
}
if (node.Attributes["label_min"] != null)
if (node.Attributes["label_max"] != null)
{
// Label Max
LabelMax.WriteLine(" case " + ID + ":");