#include"saveSS.h" #include #include #include #include #include MStatus saveSS::doIt( const MArgList &) { MString preDir = "scenes/"; printf("now running\n"); getSnapName(); puts(snapNameStr.asChar()); MFileIO::exportAll(preDir + snapNameStr, "mayaBinary"); return MS::kSuccess; } void saveSS::getSnapName() { time_t ltime; struct tm *today; char timestr[126]; MString preSnapName; MFileObject fileobj; time(<ime); today = localtime(<ime); strftime(timestr, 128, "%y%m%d%H%M\0", today); preSnapName = MFileIO::currentFile(); fileobj.setFullName(preSnapName); // path폜 preSnapName = fileobj.name(); // preSnapName = preSnapName.substring(0, preSnapName.length()-3); snapNameStr = preSnapName + timestr; }