Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save land-Y/3d160ee1ac16c043291ac20ec63d806a to your computer and use it in GitHub Desktop.
Save land-Y/3d160ee1ac16c043291ac20ec63d806a to your computer and use it in GitHub Desktop.
MAYA
global proc exportFbxWithName(){
string $path, $oSel[],$sel, $output;
string $result = `promptDialog
-title "ファイルパス"
-message "UE4向けにアセットを書き出す場所"
-button "OK" -button "Cancel"
-defaultButton "OK" -cancelButton "Cancel"
-dismissString "Cancel"`;
if ($result == "OK") {
$path = `promptDialog -query -text`;
$path += "\\" ;
}
print $path;
$oSel =`ls -sl`;
{
for($i in $oSel){
select -r $i;
$sel = $i;
$sel += ".fbx";
$output = $path + $sel;
FBXExportTriangulate -v true;
FBXExportSmoothMesh -v true;
FBXExportSmoothingGroups -v true;
FBXExportFileVersion -v FBX201800;
FBXExport -f $output -s;
}
}
}
exportFbxWithName;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment