Skip to content

Commit 9dc93b1

Browse files
committed
add other export set options and clean up UI
1 parent 7e39837 commit 9dc93b1

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

Integrations/Autodesk/maya/scripts/unityCommands.mel

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -778,11 +778,11 @@ global proc unityOpenFileDialog(string $textField)
778778
}
779779

780780
proc string createFilePathField(string $label, string $parent){
781-
string $layout = `rowLayout
781+
rowLayout
782782
-numberOfColumns 3
783783
-columnWidth3 150 250 50
784784
-columnAlign3 "right" "left" "left"
785-
-p $parent`;
785+
-p $parent;
786786

787787
string $unityProject = `optionVar -q "UnityProject"`;
788788
$unityProject = $unityProject + "/Assets";
@@ -794,6 +794,19 @@ proc string createFilePathField(string $label, string $parent){
794794
return $textField;
795795
}
796796

797+
proc string createTextFieldWithLabel(string $label, string $parent)
798+
{
799+
rowLayout
800+
-numberOfColumns 2
801+
-columnWidth2 150 250
802+
-columnAlign2 "right" "left"
803+
-p $parent;
804+
805+
text -label $label;
806+
string $textField = `textField -width 250`;
807+
return $textField;
808+
}
809+
797810
global proc unityCreateExportSet(){
798811
$origSelection = `ls -sl`;
799812
if(size($origSelection) <= 0){
@@ -803,23 +816,20 @@ global proc unityCreateExportSet(){
803816
}
804817

805818
// open up a dialog for choosing the export set options
806-
string $window = `window -title "FBX Export Options" -iconName "Short Name" -widthHeight 475 100`;
819+
string $window = `window -title "FBX Export Options" -iconName "Short Name" -widthHeight 475 250`;
807820

808821
string $container = `formLayout -numberOfDivisions 100`;
809822

810823
string $mainOptions = `columnLayout -adjustableColumn true -p $container`;
811824

812825
// get namespace
813-
string $namespaceName = `rowLayout
814-
-numberOfColumns 2
815-
-columnWidth2 150 250
816-
-columnAlign2 "right" "left"
817-
-p $mainOptions`;
818-
819-
text -label "Unity FBX namespace";
820-
string $namespaceField = `textField -width 250`;
826+
string $namespaceField = createTextFieldWithLabel("Unity FBX namespace", $mainOptions);
821827

822828
string $modelFilePath = createFilePathField("Unity FBX Model File Path", $mainOptions);
829+
string $modelFileName = createTextFieldWithLabel("Unity FBX Model File Name", $mainOptions);
830+
831+
string $animFilePath = createFilePathField("Unity FBX Anim File Path", $mainOptions);
832+
string $animFileName = createTextFieldWithLabel("Unity FBX Anim File Name", $mainOptions);
823833

824834
string $buttons = `rowLayout
825835
-numberOfColumns 3
@@ -837,6 +847,7 @@ global proc unityCreateExportSet(){
837847
-attachForm $buttons "left" 1
838848
-attachPosition $buttons "right" 1 99
839849
-attachForm $mainOptions "left" 10
850+
-attachForm $mainOptions "top" 10
840851
$container;
841852

842853
setParent ..;

0 commit comments

Comments
 (0)