QueryParserSettings
 
 
 

QueryParserSettings


Description

Tells Softimage where to find the files to parse (Folders attribute) and what extension(s) (FileTypes attribute) they will have.

This callback is fired at startup or when updating the preset manager prior to ParseInfo.


Applies To

Custom Shaders


Syntax

public class <plugin-item_name>
{
        public bool QueryParserSettings( Context in_context )
        {
                ...
        }
}
CStatus <plugin-item_name>_QueryParserSettings( CRef& in_context ) 
{ 
        ... 
}
function <plugin-item_name>_QueryParserSettings( in_context ) 
{ 
        ... 
}
def <plugin-item_name>_QueryParserSettings( in_context ):
        ...
Function <plugin-item_name>_QueryParserSettings( in_context )
        ...
End Function
sub <plugin-item_name>_QueryParserSettings 
{ 
        my $in_context = shift; 
}

<plugin-item-name> is the parser name specified in the call to PluginRegistrar.RegisterShaderLanguageParser with any spaces converted to underscores. For example, if you register a parser in a plug-in called "My Parser", the callback function names start with "My_Parser".


Parameters

Parameter Language Type Description
in_context Scripting and C# Context Context.SetAttribute("FileTypes") sets the list of file extensions for files to parse.
C++ CRef& Context::SetAttribute("FileTypes") sets the list of file extensions for files to parse.

Context Attributes

Attribute Get/Set Description
Folders Sets a String or CString Folder location(s) under the factory Application folder of the files to parse. To specify multiple locations, separate each folder name with a semi-colon (;). For example, setting this attribute to ParserABC;ParserXYZ means that all files found under the %XSI_USERHOME%\Application\ParserABC and %XSI_USERHOME%\Application\Shaders\Cgfx directories will be parsed (if they have the extension(s) specified in the FileTypes attribute).
FileTypes Sets a String or CString File extensions to parse. List of strings separated by a semi-colon (;). For example, ".mi;.spdl".
IgnoreFiles Sets a String or CString Filenames to be ignored by the parser. List of strings separated by a semi-colon (;). For example, "internal.mi;builtins.msl".

Example

SICALLBACK UtShaderLanguageParser_QueryParserSettings( CRef& in_ctxt )
{
        XSI::Context ctxt(in_ctxt);
        ctxt.PutAttribute( L"Folders", L"sltest" );
        ctxt.PutAttribute( L"FileTypes", L".sltest" );
        return CStatus::OK;
}

See Also