1/****************************************************************************************
2
3 Copyright (C) 2015 Autodesk, Inc.
4 All rights reserved.
5
6 Use of this software is subject to the terms of the Autodesk license agreement
7 provided at the time of installation or download, or which otherwise accompanies
8 this software in either electronic or hard copy form.
9
10****************************************************************************************/
11
12//! \file fbxtakeinfo.h
13#ifndef _FBXSDK_SCENE_TAKEINFO_H_
14#define _FBXSDK_SCENE_TAKEINFO_H_
15
16#include <fbxsdk/fbxsdk_def.h>
17
18#include <fbxsdk/core/base/fbxarray.h>
19#include <fbxsdk/core/base/fbxstring.h>
20#include <fbxsdk/core/base/fbxtime.h>
21
22#include <fbxsdk/fbxsdk_nsbegin.h>
23
24class FbxThumbnail;
25
26/** This FbxTakeLayerInfo structure is used to identify a layer by name and id number.
27 */
28struct FbxTakeLayerInfo
29{
30 FbxString mName;
31 int mId;
32};
33
34/** This class contains take information from an imported file
35 * or exported to an output file.
36 *
37 * A "take" is in fact a group of animation data grouped by name, so
38 * the FBX file format can support many "animation takes" in an FBX file to mimic
39 * how a movie is produced by making many takes of the same scene.
40 *
41 * The most used data is the "take name", other data are rarely used.
42 * Example of use: to get the list of all
43 * animation take names of FBX file without loading all the scene content.
44 * When a FbxImporter is initialized, the take information can be read and can be available
45 * before the long Import() step, this way, we can get the take info data very fast
46 * since we don't need to load all the animation scene data.
47 * \code
48 * // Ex: to get all take names in a FBX file
49 * for(int lAnimStackCount=0; lAnimStackCount < lImporter->GetAnimStackCount(); lAnimStackCount++)
50 * {
51 * FbxTakeInfo* lTakeInfo = lImporter->GetTakeInfo(lAnimStackCount);
52 * FbxString lTakeName = lTakeInfo->mName;
53 * }
54 * \endcode
55 */
56class FBXSDK_DLL FbxTakeInfo
57{
58public:
59
60 /** Default constructor.
61 */
62 FbxTakeInfo();
63
64 /** Destructor.
65 */
66 virtual ~FbxTakeInfo();
67
68 /** Copy Constructor.
69 * \param pTakeInfo The take information to be copied.
70 */
71 FbxTakeInfo(const FbxTakeInfo& pTakeInfo);
72
73 /** Assignment operator.
74 * \param pTakeInfo The take information to be assigned. .
75 */
76 FbxTakeInfo& operator=(const FbxTakeInfo& pTakeInfo);
77
78 //! Take name.
79 FbxString mName;
80
81 /** The take name once it is imported in a scene.
82 * You can modify it if it must be different from the take name in the imported file.
83 * \remarks This field is only used when importing a scene.
84 */
85 FbxString mImportName;
86
87 //! Take description.
88 FbxString mDescription;
89
90 /** Import/export flag.
91 * Set to \c true by default, set to \c false if the take must not be imported or exported.
92 */
93 bool mSelect;
94
95 //! Local time span, set to animation interval if it is left at the default value.
96 FbxTimeSpan mLocalTimeSpan;
97
98 //! Reference time span, set to animation interval if it is left at the default value.
99 FbxTimeSpan mReferenceTimeSpan;
100
101 /** Time value for offsetting the animation keys once they are imported in a scene.
102 * You can modify it if you need the animation of a take to be offset.
103 * The effect depends on the state of \c mImportOffsetType.
104 * \remarks This field is only used when importing a scene.
105 */
106 FbxTime mImportOffset;
107
108 /** \enum EImportOffsetType Import offset types.
109 * - \e eAbsolute
110 * - \e eRelative
111 */
112 enum EImportOffsetType
113 {
114 eAbsolute,
115 eRelative
116 };
117
118 /** Import offset type.
119 * If set to \c eAbsolute, \c mImportOffset gives the absolute time of
120 * the first animation key and the appropriate time shift is applied
121 * to all of the other animation keys.
122 * If set to \c eRelative, \c mImportOffset gives the relative time
123 * shift applied to all animation keys.
124 */
125 EImportOffsetType mImportOffsetType;
126
127 /** Copies the layer information from the take information.
128 * \param pTakeInfo The take information to be copied.
129 */
130 void CopyLayers(const FbxTakeInfo& pTakeInfo);
131
132 //! List of each layer's information.
133 FbxArray<FbxTakeLayerInfo*> mLayerInfoList;
134
135 //! Current Layer.
136 int mCurrentLayer;
137};
138
139#include <fbxsdk/fbxsdk_nsend.h>
140
141#endif /* _FBXSDK_SCENE_TAKEINFO_H_ */
142