File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Assets/FbxExporters/Editor Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -2341,13 +2341,9 @@ public void ComputeObjectsInAnimationClips(
2341
2341
GameObject animationRootObject ,
2342
2342
bool exportSkinnedMeshAnim = true
2343
2343
) {
2344
- // Force export of FbxNodeAttribute for camera and light with animation
2345
- // so that they point the right way when imported into Maya.
2346
- if ( animationRootObject . GetComponent < Light > ( ) )
2347
- this . exportComponent [ animationRootObject ] = typeof ( Light ) ;
2348
- else if ( animationRootObject . GetComponent < Camera > ( ) )
2349
- this . exportComponent [ animationRootObject ] = typeof ( Camera ) ;
2350
-
2344
+ // NOTE: the object (animationRootObject) containing the animation is not necessarily animated
2345
+ // when driven by an animator or animation component.
2346
+
2351
2347
foreach ( var animClip in animClips ) {
2352
2348
if ( this . animationClips . ContainsKey ( animClip ) ) {
2353
2349
// we have already exported gameobjects for this clip
@@ -2371,6 +2367,8 @@ public void ComputeObjectsInAnimationClips(
2371
2367
continue ;
2372
2368
}
2373
2369
2370
+ // If we have a clip driving a camera or light then force the export of FbxNodeAttribute
2371
+ // so that they point the right way when imported into Maya.
2374
2372
if ( unityGo . GetComponent < Light > ( ) )
2375
2373
this . exportComponent [ unityGo ] = typeof ( Light ) ;
2376
2374
else if ( unityGo . GetComponent < Camera > ( ) )
You can’t perform that action at this time.
0 commit comments