Skip to content

Commit 4f26294

Browse files
authored
Merge pull request #521 from Unity-Technologies/UT-3430-remove-namespace-option-from-export-dialog
UT-3430 remove namespace option from create export set dialogs
2 parents f443792 + c1153a0 commit 4f26294

File tree

1 file changed

+1
-30
lines changed

1 file changed

+1
-30
lines changed

Integrations/Autodesk/maya/scripts/unityCommands.mel

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,6 @@ proc string[] getUnityExportSets(){
694694
}
695695

696696
proc setupNewExportSet(
697-
string $namespace,
698697
string $modelPath,
699698
string $modelFilename,
700699
string $animPath,
@@ -739,10 +738,6 @@ proc setupNewExportSet(
739738

740739
string $origNamespace = `namespaceInfo -cur -an`;
741740

742-
if($namespace != ":" && !(`namespace -exists $namespace`)){
743-
namespace -add $namespace;
744-
}
745-
746741
// Get or create the Unity Fbx Export Set
747742
$setCreated = getOrCreateExportSet($unityExportSet, $origNamespace);
748743

@@ -784,19 +779,6 @@ proc setupNewExportSet(
784779
}
785780
}
786781

787-
// add to the targetNamespace
788-
// iterate over all selected objects and rename
789-
if ($namespace != ":"){
790-
// remove the colon from the beginning of the namespace
791-
// because the $object name does not start with a colon.
792-
$namespace = `substring $namespace 2 (size($namespace))`;
793-
for($object in $selectedObjects){
794-
if(!startsWith($object, $namespace)){
795-
rename $object ($namespace + ":" + $object);
796-
}
797-
}
798-
}
799-
800782
// switch project if file exported to a different Unity project
801783
switchUnityProject($modelPath);
802784
}
@@ -805,7 +787,6 @@ proc setupNewExportSet(
805787

806788
global proc unityOnCreateExportSet(
807789
string $window,
808-
string $namespaceField,
809790
string $modelPathField,
810791
string $modelFileField,
811792
string $animPathField,
@@ -819,11 +800,6 @@ global proc unityOnCreateExportSet(
819800
return;
820801
}
821802

822-
string $namespace = `textField -q -text $namespaceField`;
823-
if ($namespace == ""){
824-
$namespace = ":";
825-
}
826-
827803
string $modelPath = "";
828804
string $modelFilename = "";
829805
if($modelPathField != 0){
@@ -858,7 +834,6 @@ global proc unityOnCreateExportSet(
858834
int $stripNamespaces = `checkBox -q -value $stripNamespaceCheckbox`;
859835

860836
setupNewExportSet(
861-
$namespace,
862837
$modelPath,
863838
$modelFilename,
864839
$animPath,
@@ -980,10 +955,6 @@ proc createExportSetDialog(int $exportType){
980955

981956
int $labelSize = 150;
982957
int $textFieldSize = 300;
983-
984-
// get namespace
985-
string $namespaceField = createTextFieldWithLabel("Namespace", $mainOptions, $labelSize, $textFieldSize);
986-
textField -e -text $commonNamespace $namespaceField;
987958

988959
string $modelFilePath = " 0 0";
989960
if(!$exportAnimOnly){
@@ -1010,7 +981,7 @@ proc createExportSetDialog(int $exportType){
1010981
-columnWidth3 $buttonWidth $buttonWidth $buttonWidth
1011982
-columnAlign3 "center" "center" "center" -p $container`;
1012983

1013-
string $createExportSetCommand = "unityOnCreateExportSet " + $window + " " + $namespaceField + $modelFilePath + $animFilePath + " " + $stripNamespaceCheckbox;
984+
string $createExportSetCommand = "unityOnCreateExportSet " + $window + " " + $modelFilePath + $animFilePath + " " + $stripNamespaceCheckbox;
1014985

1015986
button -label "Create Set and Export"
1016987
-width $buttonWidth

0 commit comments

Comments
 (0)