Idea: add a Split option to File>ExportSelection UI, that will export every selected top level node into individual file. Exports either to some predefined folder or to user specified one. ProgressBar + prints exported file listing, stats.
Problem: Downloaded asset files sometimes contain many objects, that are tedious to export individually. Forum user requests.
Prototype:
// Exports every selected top-level object/group as separate MA file
string $path = `workspace -q -rd`;
sysFile -makeDir ($path + "export");
chdir ($path + "export/");
$sel = `ls -sl`;
for ($s in $sel){
select -r $s;
string $name = $path +"exp_"+ $s +".ma";
print ("Exporting: "+ $name +"\n");
file -force -options "v=0" -typ "mayaAscii" -pr -es $name;
}
select -r $sel; // restore selection
chdir $path; // unlock the output directory
print("Done.\n");