Open Reality Reference Guide
fbmotionfileoptions.h
1 #ifndef __FBMOTIONFILEOPTIONS_H__
2 #define __FBMOTIONFILEOPTIONS_H__
3 /**************************************************************************
4  Copyright (c) 1994 - 2009 Autodesk, Inc. and/or its licensors.
5  All Rights Reserved.
6 
7  The coded instructions, statements, computer programs, and/or related
8  material (collectively the "Data") in these files contain unpublished
9  information proprietary to Autodesk, Inc. and/or its licensors, which is
10  protected by Canada and United States of America federal copyright law
11  and by international treaties.
12 
13  The Data may not be disclosed or distributed to third parties, in whole
14  or in part, without the prior written consent of Autodesk, Inc.
15  ("Autodesk").
16 
17  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
18  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
19  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR
20  ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES
21  OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
22  PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT
23  WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR
24  FREE.
25 
26  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
27  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR
28  EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE
29  DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS
30  OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR
31  DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF
32  LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT
33  LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE
34  DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS
35  BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
36 
37 **************************************************************************/
38 
39 #include <kaydaradef.h>
40 #ifndef FBSDK_DLL
44  #define FBSDK_DLL K_DLLIMPORT
45 #endif
46 
47 #include <fbsdk/fbcomponent.h>
48 
49 #ifdef FBSDKUseNamespace
50  namespace FBSDKNamespace {
51 #endif
52 
54 
56 enum FBModelSelection {
57  kFBNone,
58  kFBCreateModels,
59  kFBSelectedModels,
60  kFBSelectedModelAndChildren,
61  kFBPrefixGroupContainingModel,
62  kFBInHierarchy,
63  kFBAllModels,
64 };
65 FB_DEFINE_ENUM( FBSDK_DLL, ModelSelection ); // FBPropertyModelSelection
66 
69 enum FBUpAxis {
70  kFBUpAxisY,
71  kFBUpAxisZ,
72 };
73 FB_DEFINE_ENUM( FBSDK_DLL, UpAxis ); // FBPropertyUpAxis
74 
78 public:
85  FBMotionFileOptions(FBStringList* pStringList, HIObject pObject=NULL);
86 
88 
90  FBPropertyModelSelection ModelSelection;
91 
96 
97  FBPropertyTakeSpanOnLoad TakeStartEnd;
98 
109  FBPropertyUpAxis UpAxisUsedInFile;
110 
115  int GetTakeCount() const;
116 
121  bool GetTakeSelect(int pTakeIndex) const;
122 
127  void SetTakeSelect(int pTakeIndex, bool pSelect);
128 
133  const char* GetTakeName(int pTakeIndex) const;
134 
139  void SetTakeName(int pTakeIndex, const char* pName);
140 
145  FBTime GetTakeStart(int pTakeIndex);
146 
152  void SetTakeStart(int pTakeIndex, FBTime pStartTime);
153 
158  FBTime GetTakeStop(int pTakeIndex);
159 
165  void SetTakeStop(int pTakeIndex, FBTime pStopTime);
166 
171  int GetTakeSamples(int pTakeIndex);
172 
178  void SetTakeSamples(int pTakeIndex, int pSamplesCount);
179 
186 
191  double GetTakeSamplingRate(int pTakeIndex);
192 
199  void SetTakeSamplingRate(int pTakeIndex, FBTimeMode pTimeMode, double pCustomSamplingRate=30.0);
200 };
201 
202 #ifdef FBSDKUseNamespace
203  }
204 #endif
205 
206 #endif
MotionBuilder SDK base class.
Definition: fbcomponent.h:651
Customize motion file loading.
void SetTakeSamplingRate(int pTakeIndex, FBTimeMode pTimeMode, double pCustomSamplingRate=30.0)
Set the sampling rate for a particular take.
FBTime GetTakeStart(int pTakeIndex)
Return the Take Start time.
FBPropertyBool CreateUnusedOpticalSegments
Read Write Property: If set to true, unused optical segments will be created. Used for trc,...
FBPropertyBool SetLimits
Read Write Property: If set to true, use motion limits. Used for asf/amc files.
FBPropertyBool KeepDummyNode
Read Write Property: If set to true, dummy bones from the file are not removed. Used for asf/amc file...
double GetTakeSamplingRate(int pTakeIndex)
Return the actual sampling rate as a double, useful when you have a custom sampling rate.
FBPropertyBool BaseTranslationOnRotationOffset
Read Write Property: If set to true, the base translation will be imported as Rotation Pivot offset....
FBPropertyBool SetOccludedToLastValidPosition
Read Write Property: If set to true, occluded segments will be set to their last valid position....
void SetTakeSamples(int pTakeIndex, int pSamplesCount)
Set the number of samples for a particular take.
FBPropertyUpAxis UpAxisUsedInFile
Read Write Property: Indicated the up axis used in the motion file. Only effective when loading c3d f...
void SetTakeStop(int pTakeIndex, FBTime pStopTime)
Set the Take Stop time.
FBPropertyTakeSpanOnLoad TakeStartEnd
Read Write Property: Indicates how the start/end value of the take will be modified.
bool GetTakeSelect(int pTakeIndex) const
Return true if the take will be loaded.
FBPropertyBool CreateOpticalSegments
Read Write Property: If set to true, optical segments will be created. Used for trc,...
FBPropertyBool CreateInsteadOfMerge
Read Write Property: If set to true, the motion will imported/models will be created in the scene,...
FBPropertyBool CreateUnmatchedModels
Read Write Property: If set to true, nodes will be created to match the hierarchical structure of the...
FBPropertyBool ImportDOF
Read Write Property: If set to true, the DOF value will be imported from the file.
const char * GetTakeName(int pTakeIndex) const
Get the take name.
void SetTakeSelect(int pTakeIndex, bool pSelect)
Indicate if the take will be loaded.
FBMotionFileOptions(FBStringList *pStringList, HIObject pObject=NULL)
Constructor.
FBPropertyBool KeepActorPrefix
Read Write Property: If set to true, the Actor prefix will be kept when naming each optical marker....
void SetTakeStart(int pTakeIndex, FBTime pStartTime)
Set the Take Start time.
FBPropertyModelSelection ModelSelection
Common settings when merging, unused with the CreateInsteadOfMerge property is set to true.
FBPropertyBool IgnoreModelType
Read Write Property: If set to true, model type will not be considered when finding a matching model ...
FBPropertyBool ImportScaling
Read Write Property: If set to true, scaling values will be imported.
FBPropertyBool BaseRotationOnPreRotation
Read Write Property: If set to true, the base rotation will be imported as Pre Rotation....
void SetTakeName(int pTakeIndex, const char *pName)
Set the take name.
int GetTakeSamples(int pTakeIndex)
Return the number of samples.
FBTime GetTakeStop(int pTakeIndex)
Return the Take Stop time.
FBPropertyBool CreateReferenceNode
Settings based on file type.
FBTimeMode GetTakeSamplingRateMode(int pTakeIndex)
Return the sampling rate mode.
int GetTakeCount() const
Return the take count in the file to be loaded.
String list.
Definition: fbstring.h:208
Time data structure.
Definition: fbtime.h:88
Basic class definitions.
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:131
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:150
FBTimeMode
Different time modes available.
Definition: fbtime.h:63
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68