Skip to content

Commit f460b01

Browse files
committed
add to target namespace after populating export set
1 parent e500c44 commit f460b01

File tree

1 file changed

+6
-10
lines changed
  • Assets/com.unity.formats.fbx/Editor/Integrations/Autodesk/maya/scripts

1 file changed

+6
-10
lines changed

Assets/com.unity.formats.fbx/Editor/Integrations/Autodesk/maya/scripts/unityCommands.mel

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -523,12 +523,6 @@ proc string[] getUnityExportSets(){
523523
}
524524

525525
proc setupNewExportSet(string $exportPath, int $exportAnimOnly, string $selectedObjects[]){
526-
// extract name from path
527-
// create export set
528-
// create namespace
529-
// move objects into namespace
530-
// add objects to export set
531-
// add attributes to set
532526
$isAnimFile = $exportAnimOnly;
533527

534528
// Get the export set attributes
@@ -570,10 +564,6 @@ proc setupNewExportSet(string $exportPath, int $exportAnimOnly, string $selected
570564

571565
setExportSetAttributes($unityExportSet, $isAnimFile, $setCreated, $exportAttrs, $targetNamespace);
572566

573-
// add to the targetNamespace
574-
// iterate over all selected objects and rename
575-
// rename FOO:sphere2 :BAR:sphere2;
576-
577567
if (setExists($unityExportSet) == true){
578568
// add newly imported items to set
579569
if (size($selectedObjects) > 0){
@@ -582,6 +572,12 @@ proc setupNewExportSet(string $exportPath, int $exportAnimOnly, string $selected
582572
// lock set so it doesn't get deleted when empty
583573
lockNode -lock true $unityExportSet;
584574
}
575+
576+
// add to the targetNamespace
577+
// iterate over all selected objects and rename
578+
for($object in $selectedObjects){
579+
rename $object ($targetNamespace + ":" + $object);
580+
}
585581
}
586582

587583
proc unityExport(int $exportType){

0 commit comments

Comments
 (0)