7.1 General User Defined MEL Procedures
The following procedures can be defined to customize 3Delight for Maya's behavior. Since calling the `exists' MEL command repeatedly is costly, a cache of this command's results is kept. This cache is flushed before every render. It can also be flsuhed manually by calling:
delightExists -user -flush;
- global proc DL_userStartup ()
This procedure is called as the last step of the initialization procedure that is run when the 3Delight for Maya plugin is loaded.
- global proc DL_userGetExpandedString(string $str, string $shape_name, string $pass_name)
This procedure is called when a string attribute is parsed, offering the opportunity to completely replace the default string expansion in 3Delight for Maya.
DL_userGetExpandedStringis passed the string to expand, a string that contains the shape name (or an empty string), and a string containing the render pass name (or an empty string). The last two parameters are usually used to replace the `<shape>' and `<pass>' tokens, respectively. The procedure should return a string that requires no further expansion, as there will be no further subsitution attempts done on it.
- global proc DL_userGetStringTokens (string $tokens[], string $values[])
This procedure is called when a string attribute is parsed by
DL_expandString()to expand the tokens and environment variables the attribute may contain.DL_userGetStringis passed two empty string arrays and it is expected to fill the first one with the tokens to look for and the second one with their replacement strings. The user defined token substitution is done after the built-in tokens substitution.
- global proc string DL_userConvertTexture (string $src, string $dst)
This procedure is called when a texture file, such as one referenced by the `file' 2D texture node, needs to be converted to a tdl texture file. The procedure is passed the full path to the source file and the full path to the desired tdl file. The returned string is expected to contained an error message, or an empty string if the conversion completed successfully. The default behaviour is to call
DL_defaultConvertTexture.
3Delight for Maya 6.0. Copyright 2000-2011 The 3Delight Team. All Rights Reserved.