| Item | Quantity | Price |
|---|
| Your cart is empty. Check out our collection of 3d models! |
Prices in:
Clear Cart
In Slate example {scriptName} that will get the filename with entire path, I want only the filename. plz help me.
Regards
Narasimham k
Hai to all
If I use {scriptName} in the text get the entire path of the script i.e "c:/documents and settings/test/test.shk", I want only the file name like test.shk
Text Manipulation V: Extracting Part of a String
This function can be used to extract the file name from a FileOut or FileIn node so you
can print it on a slate. Use it in a Text function.
const char *getBaseFilename(const char *fileName)
{
extern const char * strrchr(const char *, char);
const char *baseName = strrchr(fileName, ’/’);
return baseName ? baseName+1 : fileName;
}
To use it, place a line in the text parameter of a Text function, such as:
{getBaseFilename(FileIn1.imageName)}
how to use this function inside the node
please help me
Regards
Narasimham k
in the cookbook folder is an example macro called Slate which will help you start rolling on this
/Applications/Shake/doc/html/cook/macros/slate