Skip to content

Commit c5ab17d

Browse files
committed
make sure namespace attribute doesn't have extra leading colon
1 parent 4edf283 commit c5ab17d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Assets/Integrations/Autodesk/maya/scripts/unityCommands.mel

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,11 @@ proc importFile(string $filePathStr){
157157
$unityExportSet = `format -stringArg $fileNameWithoutExt $UnityExportSetNameFormat`;
158158

159159
string $origNamespace = `namespaceInfo -cur -an`;
160-
string $targetNamespace = `format -s $origNamespace -s $fileNameWithoutExt "^1s:^2s"`;
160+
string $targetNamespace = ":" + $fileNameWithoutExt;
161+
// make sure there are no duplicate colons in namespace name
162+
if($origNamespace != ":"){
163+
$targetNamespace = `format -s $origNamespace -s $fileNameWithoutExt "^1s:^2s"`;
164+
}
161165

162166
$setNamespaceExists = false;
163167
if (setExists($unityExportSet)){

0 commit comments

Comments
 (0)