Skip to content

Commit 702176a

Browse files
committed
print error if missing arguments in dialog
1 parent c121628 commit 702176a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Integrations/Autodesk/maya/scripts/unityCommands.mel

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ global proc unityOnCreateExportSet(
696696
$origSelection = `ls -sl`;
697697
if(size($origSelection) <= 0){
698698
// nothing selected
699-
print ("Nothing selected");
699+
error ("Unity FBX Export Set Creation: Nothing selected");
700700
return;
701701
}
702702

@@ -724,6 +724,17 @@ global proc unityOnCreateExportSet(
724724
$animFilename = $animFilename + ".fbx";
725725
}
726726
}
727+
728+
// make sure all necessary variables are set
729+
if ($modelFilename == "" && $animFilename == ""){
730+
error ("Unity FBX Export Set Creation: Missing filename for export.");
731+
return;
732+
}
733+
734+
if ($modelPath == "" && $animPath == ""){
735+
error ("Unity FBX Export Set Creation: Missing filepath for export.");
736+
return;
737+
}
727738

728739
setupNewExportSet(
729740
$namespace,

0 commit comments

Comments
 (0)