Skip to content

Commit 55c7d82

Browse files
committed
code review fixes
1 parent 702176a commit 55c7d82

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Integrations/Autodesk/maya/scripts/unityCommands.mel

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,10 +588,12 @@ proc setupNewExportSet(
588588

589589
// make sure all necessary variables are set
590590
if ($modelFilename == "" && $animFilename == ""){
591+
error ("Unity FBX Export Set Creation: Missing filename for export.");
591592
return;
592593
}
593594

594595
if ($modelPath == "" && $animPath == ""){
596+
error ("Unity FBX Export Set Creation: Missing filepath for export.");
595597
return;
596598
}
597599

@@ -790,6 +792,20 @@ proc string createTextFieldWithLabel(string $label, string $parent, int $labelSi
790792
return $textField;
791793
}
792794

795+
// Find the most common namespace among the selected objects. If there are multiple (because of nested namespaces),
796+
// prefer the most specific. For example if you have:
797+
//
798+
// test1:test2:sphere
799+
// test1:test3:cube
800+
// test1:test2:cylinder
801+
//
802+
// test1 will be returned because all objects have that namespace in common. However if you have:
803+
//
804+
// test1:test2:sphere
805+
// test1:test2:cube
806+
// test1:test2:cylinder
807+
//
808+
// Then it will return test1:test2.
793809
proc string getCommonNamespace(string $origSelection[]){
794810
// gather up all the unique namespaces
795811
string $selectedNamespaces[];

0 commit comments

Comments
 (0)