Skip to content

Commit f503e6f

Browse files
committed
move animated objects to export to a new set
this prevents non-animated children of animated objects from being exported.
1 parent df73419 commit f503e6f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ proc unityExport(int $exportAnim){
275275

276276
string $unitySetContents[] = `listConnections $unitySet`;
277277

278+
string $animatedObjectSet = "";
278279
if($exportAnim){
279280
string $animCurveSelect[] = `ls -typ animCurve`;
280281
string $animatedTransforms[] = `listConnections -t transform $animCurveSelect`;
@@ -286,6 +287,8 @@ proc unityExport(int $exportAnim){
286287
string $setAnimatedTransforms[] = `stringArrayIntersector -query $myIntersector`;
287288

288289
select -r $setAnimatedTransforms;
290+
$animatedObjectSet = `sets`;
291+
select -r -ne $animatedObjectSet;
289292
}
290293

291294
$pathAttr = $UnityFbxFilePathAttr;
@@ -304,6 +307,10 @@ proc unityExport(int $exportAnim){
304307
$strCmd = "file -force -options \"\" -typ \"FBX export\" -pr -es \"" + $unity_fbx_file_path + "/" + $unity_fbx_file_name + "\"";
305308
eval $strCmd;
306309
}
310+
311+
if(setExists($animatedObjectSet)){
312+
delete $animatedObjectSet;
313+
}
307314
}
308315

309316
// Delete the intersector

0 commit comments

Comments
 (0)