@@ -778,11 +778,11 @@ global proc unityOpenFileDialog(string $textField)
778
778
}
779
779
780
780
proc string createFilePathField(string $label, string $parent){
781
- string $layout = ` rowLayout
781
+ rowLayout
782
782
-numberOfColumns 3
783
783
-columnWidth3 150 250 50
784
784
-columnAlign3 "right" "left" "left"
785
- -p $parent` ;
785
+ -p $parent;
786
786
787
787
string $unityProject = `optionVar -q "UnityProject"`;
788
788
$unityProject = $unityProject + "/Assets";
@@ -794,6 +794,19 @@ proc string createFilePathField(string $label, string $parent){
794
794
return $textField;
795
795
}
796
796
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
+
797
810
global proc unityCreateExportSet(){
798
811
$origSelection = `ls -sl`;
799
812
if(size($origSelection) <= 0){
@@ -803,23 +816,20 @@ global proc unityCreateExportSet(){
803
816
}
804
817
805
818
// 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 `;
807
820
808
821
string $container = `formLayout -numberOfDivisions 100`;
809
822
810
823
string $mainOptions = `columnLayout -adjustableColumn true -p $container`;
811
824
812
825
// 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);
821
827
822
828
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);
823
833
824
834
string $buttons = `rowLayout
825
835
-numberOfColumns 3
@@ -837,6 +847,7 @@ global proc unityCreateExportSet(){
837
847
-attachForm $buttons "left" 1
838
848
-attachPosition $buttons "right" 1 99
839
849
-attachForm $mainOptions "left" 10
850
+ -attachForm $mainOptions "top" 10
840
851
$container;
841
852
842
853
setParent ..;
0 commit comments