global proc string[] scenesNameAndPath(){
//获取当前文件长路径,无MB路径,无文件名路径,文件名,无MB文件名,拍屏文件名,有文件名的拍屏路径
string $sceneShortPath;
string $sceneLongPath = `file -q -sceneName`;
string $sceneName = `file -q -shn -sceneName`;
$sceneShortPath = `substitute $sceneName $sceneLongPath ""`;
string $sceneNameNoMB = `substitute ".mb" $sceneName ""`;
string $sceneLongPathNoMB = `substitute ".mb" $sceneLongPath ""`;
string $buff[];
tokenize $sceneNameNoMB "_" $buff;
string $playBlastName = $buff[0] +"_"+ $buff[1] +"_"+ $buff[2];
string $playBlastPath = $sceneLongPathNoMB +$playBlastName;
string $return[7] = {$sceneLongPath,$sceneLongPathNoMB, $sceneShortPath,$sceneName,$sceneNameNoMB,$playBlastName,$playBlastPath};
return $return;
}
网友评论