Screenshot
Apr 28, 2010
Post id: 303172 Report Item

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

Dashboard_avatar
Apr 29, 2010
Post id: 303197 Report Item

In Slate example {scriptName} that will get the filename with entire path, I want only the filename. plz help me.

Regards
Narasimham k

Dashboard_avatar
Apr 29, 2010
Post id: 303198 Report Item

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