Message 1 of 9

Not applicable
11-21-2017
09:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
The whole script runs successfully but for some reason string $pathName[] = eval("file -q -l"); is not executing when running in the script. When I execute the code in script editor it runs with no error.
I'm writing a code to automatically save an mb file into the same folder that the fbx is imported from. Here's the snippet.
string $pathName[] = eval("file -q -l"); $pathLength = eval("size $pathName[1]")-4; string $fileName = eval("substring $pathName[1] 1 $pathLength"); //exclude the extension from the path $fileName = $fileName + ".mb"; file -rename $fileName; file -f -save -options "v=0;" -type "mayaBinary"; print ("File saved at: " + $fileName);
Regards.
Solved! Go to Solution.