protected static bool ParseColorOp( string parameters, MaterialScriptContext context )
{
// lookup the real enum equivalent to the script value
object val = ScriptEnumAttribute.Lookup( parameters, typeof( LayerBlendOperation ) );
// if a value was found, assign it
if ( val != null )
{
context.textureUnit.SetColorOperation( (LayerBlendOperation)val );
}
else
{
string legalValues = ScriptEnumAttribute.GetLegalValues( typeof( LayerBlendOperation ) );
LogParseError( context, "Bad color_op attribute, valid values are {0}.", legalValues );
}
return false;
}