Exemple #1
0
        //void EnumerateNodeRecursive(FbxNode pNode)
        //{
        //	FbxMesh pMesh;
        //	if (IsNodeMesh(pNode, out pMesh))
        //	{
        //		CreateMaterialsFromNode(pNode);
        //		CreateMeshesFromNode(pNode, pMesh);
        //	}

        //	for (int j = 0; j < pNode.GetChildCount(); j++)
        //		EnumerateNodeRecursive(pNode.GetChild(j));
        //}

        void LoadAnimations(FbxScene scene)
        {
            FbxTime.EMode timeMode = scene.GetGlobalSettings().GetTimeMode();
            FrameRate = FbxTime.GetFrameRate(timeMode);

            int animationCount = FbxExtensions.GetAnimStackCount(scene);

            AnimationTracks = new List <AnimationTrackInfo>();
            for (int i = 0; i < animationCount; i++)
            {
                FbxAnimStack       pAnimStack      = FbxExtensions.GetAnimStack(scene, i);
                AnimationTrackInfo pAnimationTrack = new AnimationTrackInfo(pAnimStack, scene.GetRootNode());
                AnimationTracks.Add(pAnimationTrack);
            }
        }