00001 #ifndef __FBSTORY_H__
00002 #define __FBSTORY_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00043 #include <kaydaradef.h>
00044 #ifndef FBSDK_DLL
00045
00048 #define FBSDK_DLL K_DLLIMPORT
00049 #endif
00050
00051 #include <fbsdk/fbcomponent.h>
00052 #include <fbsdk/fbcore.h>
00053 #include <fbsdk/fbvideo.h>
00054 #include <fbsdk/fbmodel.h>
00055
00056 #ifdef FBSDKUseNamespace
00057 namespace FBSDKNamespace {
00058 #endif
00059
00060 __FB_FORWARD( FBStory );
00061 __FB_FORWARD( FBStoryFolder );
00062 __FB_FORWARD( FBStoryTrack );
00063 __FB_FORWARD( FBStoryClip );
00064 FB_DEFINE_COMPONENT( FBSDK_DLL, Story );
00065 FB_DEFINE_COMPONENT( FBSDK_DLL, StoryFolder );
00066 FB_DEFINE_COMPONENT( FBSDK_DLL, StoryTrack );
00067 FB_DEFINE_COMPONENT( FBSDK_DLL, StoryClip );
00068 FB_DEFINE_COMPONENT( FBSDK_DLL, AnimationNode );
00069 FB_DEFINE_COMPONENT( FBSDK_DLL, Video );
00070 FB_DEFINE_COMPONENT( FBSDK_DLL, AudioClip );
00071
00073 enum FBStoryTrackType {
00074 kFBStoryTrackAnimation,
00075 kFBStoryTrackCamera,
00076 kFBStoryTrackCharacter,
00077 kFBStoryTrackConstraint,
00078 kFBStoryTrackCommand,
00079 kFBStoryTrackShot,
00080 kFBStoryTrackAudio,
00081 kFBStoryTrackVideo,
00082 kFBStoryTrackUnknown
00083 };
00084
00086 enum FBStoryTrackRefMode {
00087 kFBStoryTrackOverride,
00088 kFBStoryTrackAdditive
00089 };
00090
00092 enum FBStoryTrackBodyPart {
00093 kFBStoryTrackBodyPartNone = 0,
00094
00095 kFBStoryTrackBodyPartHead = 1 << 0,
00096
00097 kFBStoryTrackBodyPartLeftShoulder = 1 << 1,
00098 kFBStoryTrackBodyPartLeftHand = 1 << 2,
00099 kFBStoryTrackBodyPartLeftArm = 1 << 3 | kFBStoryTrackBodyPartLeftShoulder | kFBStoryTrackBodyPartLeftHand,
00100 kFBStoryTrackBodyPartRightShoulder = 1 << 4,
00101 kFBStoryTrackBodyPartRightHand = 1 << 5,
00102 kFBStoryTrackBodyPartRightArm = 1 << 6 | kFBStoryTrackBodyPartRightShoulder | kFBStoryTrackBodyPartRightHand,
00103
00104 kFBStoryTrackBodyPartUpperBody = kFBStoryTrackBodyPartHead |
00105 kFBStoryTrackBodyPartLeftArm | kFBStoryTrackBodyPartLeftShoulder | kFBStoryTrackBodyPartLeftHand |
00106 kFBStoryTrackBodyPartRightArm | kFBStoryTrackBodyPartRightShoulder | kFBStoryTrackBodyPartRightHand,
00107
00108 kFBStoryTrackBodyPartLeftFoot = 1 << 7,
00109 kFBStoryTrackBodyPartLeftLeg = 1 << 8 | kFBStoryTrackBodyPartLeftFoot,
00110 kFBStoryTrackBodyPartRightFoot = 1 << 9,
00111 kFBStoryTrackBodyPartRightLeg = 1 << 10| kFBStoryTrackBodyPartRightFoot,
00112
00113 kFBStoryTrackBodyPartLowerBody = kFBStoryTrackBodyPartLeftLeg | kFBStoryTrackBodyPartLeftFoot | kFBStoryTrackBodyPartRightLeg | kFBStoryTrackBodyPartRightFoot,
00114
00115 kFBStoryTrackBodyPartAll = kFBStoryTrackBodyPartUpperBody | kFBStoryTrackBodyPartLowerBody,
00116
00117 kFBStoryTrackBodyPartProps = 1 << 11,
00118 kFBStoryTrackBodyPartExtensions = 1 << 12
00119 };
00120
00122 enum FBStoryClipShowGhostMode {
00123 kFBStoryClipAlways,
00124 kFBStoryClipTimeCursor
00125 };
00126
00128 enum FBStoryClipSolveMode {
00129 kFBStoryClipRetargetSkeleton,
00130 kFBStoryClipAnimSkeleton,
00131 kFBStoryClipAnimFkIk,
00132 kFBStoryClipAnimSkeletonIk
00133 };
00134
00136 enum FBStoryClipCompMode {
00137 kFBStoryClipOff,
00138 kFBStoryClipAuto,
00139 kFBStoryClipUser
00140 };
00141
00142 FB_DEFINE_ENUM(FBSDK_DLL, StoryTrackType);
00143 FB_DEFINE_ENUM(FBSDK_DLL, StoryTrackRefMode);
00144 FB_DEFINE_ENUM(FBSDK_DLL, StoryClipShowGhostMode);
00145 FB_DEFINE_ENUM(FBSDK_DLL, StoryClipSolveMode);
00146 FB_DEFINE_ENUM(FBSDK_DLL, StoryClipCompMode);
00147
00148 FB_FORWARD( FBPropertyListStoryFolder );
00150 class FBSDK_DLL FBPropertyListStoryFolder : public FBPropertyListComponentBase
00151 {
00152 public:
00158 virtual int Add(HFBStoryFolder pItem);
00159
00165 virtual int Remove(HFBStoryFolder pItem);
00166
00170 virtual void RemoveAt(int pIndex);
00171
00176 virtual HFBStoryFolder operator[](int pIndex);
00177
00181 virtual int GetCount();
00182
00183 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00184 inline virtual FBComponent* GetAt(int pIndex) { return (FBComponent*)operator[](pIndex); }
00185 private:
00186 inline virtual int Add ( FBComponent* pItem ) { return Add((FBStoryFolder*)pItem); }
00187 #endif
00188 };
00189
00190 FB_FORWARD( FBPropertyListStoryTrack );
00192 class FBSDK_DLL FBPropertyListStoryTrack : public FBPropertyListComponentBase
00193 {
00194 public:
00200 virtual int Add(HFBStoryTrack pItem);
00201
00207 virtual int Remove(HFBStoryTrack pItem);
00208
00212 virtual void RemoveAt(int pIndex);
00213
00218 virtual HFBStoryTrack operator[](int pIndex);
00219
00223 virtual int GetCount();
00224 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00225 inline virtual FBComponent* GetAt(int pIndex) { return (FBComponent*)operator[](pIndex); }
00226 private:
00227 inline virtual int Add ( FBComponent* pItem ) { return Add((FBStoryTrack*)pItem); }
00228 #endif
00229 };
00230
00231 FB_FORWARD( FBPropertyListStorySubTrack );
00233 class FBSDK_DLL FBPropertyListStorySubTrack : public FBPropertyListComponentBase
00234 {
00235 public:
00241 virtual int Add(HFBStoryTrack pItem);
00242
00248 virtual int Remove(HFBStoryTrack pItem);
00249
00253 virtual void RemoveAt(int pIndex);
00254
00259 virtual HFBStoryTrack operator[](int pIndex);
00260
00264 virtual int GetCount();
00265 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00266 inline virtual FBComponent* GetAt(int pIndex) { return (FBComponent*)operator[](pIndex); }
00267 private:
00268 inline virtual int Add ( FBComponent* pItem ) { return Add((FBStoryTrack*)pItem); }
00269 #endif
00270 };
00271
00272 FB_FORWARD( FBPropertyListStoryClip );
00274 class FBSDK_DLL FBPropertyListStoryClip : public FBPropertyListComponentBase
00275 {
00276 public:
00281 virtual int Add(HFBStoryClip pItem);
00282
00287 virtual int Remove(HFBStoryClip pItem);
00288
00292 virtual void RemoveAt(int pIndex);
00293
00298 virtual HFBStoryClip operator[](int pIndex);
00299
00303 virtual int GetCount();
00304 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00305 inline virtual FBComponent* GetAt(int pIndex) { return (FBComponent*)operator[](pIndex); }
00306 private:
00307 inline virtual int Add ( FBComponent* pItem ) { return Add((FBStoryClip*)pItem); }
00308 #endif
00309 };
00310
00311 FB_FORWARD( FBPropertyListStoryDetails );
00313 class FBSDK_DLL FBPropertyListStoryDetails : public FBPropertyListComponentBase
00314 {
00315 public:
00320 virtual int Add(HFBComponent pItem);
00321
00326 virtual int Remove(HFBComponent pItem);
00327
00331 virtual void RemoveAt(int pIndex);
00332
00337 virtual HFBComponent operator[](int pIndex);
00338
00342 virtual int GetCount();
00343 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00344 inline virtual FBComponent* GetAt(int pIndex) { return (FBComponent*)operator[](pIndex); }
00345 #endif
00346 };
00347
00348 FB_FORWARD( FBPropertyListPivot );
00350 class FBSDK_DLL FBPropertyListPivot : public FBPropertyListComponentBase
00351 {
00352 public:
00357 virtual int Add(HFBModel pItem);
00358
00363 virtual int Remove(HFBModel pItem);
00364
00368 virtual void RemoveAt(int pIndex);
00369
00374 virtual HFBModel operator[](int pIndex);
00375
00379 virtual int GetCount();
00380 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00381 inline virtual FBComponent* GetAt(int pIndex) { return (FBComponent*)operator[](pIndex); }
00382 private:
00383 inline virtual int Add ( FBComponent* pItem ) { return Add((FBModel*)pItem); }
00384 #endif
00385 };
00386
00388
00390
00393 class FBSDK_DLL FBStory : public FBComponent
00394 {
00395
00396 __FBClassDeclare(FBStory, FBComponent);
00397 public:
00398
00401 FBStory();
00402 FBPropertyBool Mute;
00403 FBPropertyBool LockedShot;
00404 FBPropertyStoryFolder RootFolder;
00405 FBPropertyStoryFolder RootEditFolder;
00406 };
00407
00409
00411
00414 class FBSDK_DLL FBStoryFolder : public FBComponent
00415 {
00416
00417 __FBClassDeclare(FBStoryFolder, FBComponent);
00418 public:
00419
00425 FBStoryFolder(HFBStoryFolder pParentFolder=NULL, HIObject pObject=NULL);
00426
00429 virtual void FBDelete();
00430
00431 FBPropertyString Label;
00432 FBPropertyBool Solo;
00433 FBPropertyBool Mute;
00434 FBPropertyStoryFolder Parent;
00435 FBPropertyListStoryFolder Childs;
00436 FBPropertyListStoryTrack Tracks;
00437 };
00438
00440
00442
00445 class FBSDK_DLL FBStoryTrack : public FBConstraint
00446 {
00447
00448 __FBClassDeclare(FBStoryTrack, FBConstraint);
00449 public:
00450
00456 FBStoryTrack(FBStoryTrackType pTrackType, HFBStoryFolder pFolder=NULL, HIObject pObject=NULL);
00457
00463 FBStoryTrack(HFBComponent pSource, HFBStoryFolder pFolder=NULL, HIObject pObject=NULL);
00464
00467 virtual void FBDelete();
00468
00472 void ChangeDetailsBegin();
00473
00477 void ChangeDetailsEnd();
00478
00479
00488 FBStoryClip* CopyTakeIntoTrack(FBTimeSpan& pTimeSpan, FBTake* pTake, FBTime pOutputOffset = 0, bool pMakeUndoable = false);
00489
00490
00496 void EnableBodyPart(FBStoryTrackBodyPart pPart, bool pEnable);
00497
00501 bool IsBodyPartEnabled(FBStoryTrackBodyPart pPart);
00502
00506 void AddClip(HFBComponent pClip, FBTime pTime);
00507
00508
00509 FBPropertyStoryTrackType Type;
00510 FBPropertyString Label;
00511 FBPropertyBool Mute;
00512 FBPropertyBool Solo;
00513 FBPropertyStoryFolder ParentFolder;
00514 FBPropertyStoryTrack ParentTrack;
00515 FBPropertyListStorySubTrack SubTracks;
00516 FBPropertyListStoryClip Clips;
00517 FBPropertyListStoryDetails Details;
00518
00519
00520 FBPropertyAnimatableDouble Weight;
00521
00522
00523 FBPropertyBool Ghost;
00524 FBPropertyBool GhostModel;
00525 FBPropertyBool GhostTravelling;
00526 FBPropertyBool GhostPivot;
00527 FBPropertyBool AcceptKey;
00528 FBPropertyStoryTrackRefMode ReferenceMode;
00529 FBPropertyBool OffsetEnable;
00530 FBPropertyBool PassThrough;
00531
00532
00533 FBPropertyCharacter Character;
00534 FBPropertyInt CharacterIndex;
00535
00536
00537 FBPropertyBool ShowBackplate;
00538 FBPropertyBool ShowFrontplate;
00539
00540
00541 FBPropertyInt AudioOutIndex;
00542
00543
00544 FBPropertyVideo TrackVideo;
00545 private:
00546 void FBStoryTrackInitProperties();
00547 };
00548
00550
00552
00555 class FBSDK_DLL FBStoryClip : public FBComponent
00556 {
00557
00558 __FBClassDeclare(FBStoryClip, FBComponent);
00559 public:
00560
00567 FBStoryClip(HFBComponent pClipObject, HFBStoryTrack pTrack, FBTime pTime, HIObject pObject=NULL);
00568
00575 FBStoryClip(char* pFilePath, HFBStoryTrack pTrack, FBTime pTime, HIObject pObject=NULL);
00576
00579 virtual void FBDelete();
00580
00583 HFBStoryClip Clone();
00584
00591 FBTime Move(FBTime pDelta, bool pForce=true);
00592
00599 FBTime MoveTo(FBTime pTime, bool pForce=true);
00600
00606 HFBStoryClip Razor(FBTime pTime);
00607
00608
00612 void Match();
00613
00619 bool ExportToFile(FBString pOutputFile);
00620
00628 void GetAffectedObjects( FBArrayTemplate<HFBComponent>* pAffectedObjects );
00629
00638 void GetAffectedAnimationNodes( FBArrayTemplate<HFBAnimationNode>* pAffectedAnimationNodes, HFBComponent pClipObject );
00639
00640
00641 FBPropertyColor Color;
00642 FBPropertyTime Start;
00643 FBPropertyTime Stop;
00644 FBPropertyTime MarkIn;
00645 FBPropertyTime MarkOut;
00646 FBPropertyTimeSpan PreBlend;
00647 FBPropertyTimeSpan PostBlend;
00648 FBPropertyTime Offset;
00649 FBPropertyDouble Speed;
00650
00651
00652 FBPropertyCamera ShotCamera;
00653 FBPropertyVideo ShotBackplate;
00654 FBPropertyVideo ShotFrontplate;
00655 FBPropertyBool ShowBackplate;
00656 FBPropertyBool ShowFrontplate;
00657 FBPropertyTime ShotActionStart;
00658 FBPropertyTime ShotActionStop;
00659
00660
00661 FBPropertyAudioClip AudioClip;
00662
00663
00664 FBPropertyDouble Scale;
00665 FBPropertyVector3d Translation;
00666 FBPropertyVector3d Rotation;
00667 FBPropertyVector3d LoopTranslation;
00668 FBPropertyBool AutoLoop;
00669 FBPropertyBool Loop;
00670 FBPropertyBool Ghost;
00671 FBPropertyBool GhostModel;
00672 FBPropertyBool GhostTravelling;
00673 FBPropertyBool GhostPivot;
00674 FBPropertyStoryClipShowGhostMode ShowGhostClipMode;
00675 FBPropertyAnimationNode PreBlendData;
00676 FBPropertyAnimationNode PostBlendData;
00677 FBPropertyListPivot Pivots;
00678
00679
00680 FBPropertyStoryClipSolveMode SolvingMode;
00681 private:
00682 void FBStoryClipInitProperties();
00683 };
00684
00685 #ifdef FBSDKUseNamespace
00686 }
00687 #endif
00688 #endif