00001 #ifndef __FBSCENE_H__
00002 #define __FBSCENE_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
00044 #include <kaydaradef.h>
00045 #ifndef FBSDK_DLL
00046
00049 #define FBSDK_DLL K_DLLIMPORT
00050 #endif
00051
00052 #include <fbsdk/fbcomponent.h>
00053 #include <fbsdk/fbcore.h>
00054 #include <fbsdk/fbdata.h>
00055 #include <fbsdk/fbfolder.h>
00056 #include <fbsdk/fbrenderer.h>
00057 #include <fbsdk/fbshader.h>
00058 #include <fbsdk/fbmodel.h>
00059 #include <fbsdk/fbhud.h>
00060 #include <fbsdk/fbcamera.h>
00061 #include <fbsdk/fblight.h>
00062 #include <fbsdk/fbvideo.h>
00063 #include <fbsdk/fbmotion.h>
00064 #include <fbsdk/fbgroup.h>
00065 #include <fbsdk/fbfilereference.h>
00066 #include <fbsdk/fbnamespace.h>
00067 #include <fbsdk/fbobjectpose.h>
00068
00069 #if !defined(K_NO_CHARACTER)
00070 #include <fbsdk/fbcharacter.h>
00071 #include <fbsdk/fbcharacterface.h>
00072 #include <fbsdk/fbcharacterpose.h>
00073 #include <fbsdk/fbcharacterextension.h>
00074 #endif
00075
00076 #if !defined(K_NO_DECK)
00077 #include <fbsdk/fbdeck.h>
00078 #endif
00079
00080 #if !defined(K_NO_AUDIO)
00081 #include <fbsdk/fbaudio.h>
00082 #endif
00083
00084 #if !defined(K_NO_MANIPULATOR)
00085 #include <fbsdk/fbmanipulator.h>
00086 #endif
00087
00088 #if !defined(K_NO_NOTE)
00089 #include <fbsdk/fbnote.h>
00090 #endif
00091
00092 #if !defined(K_NO_POSE)
00093 #include <fbsdk/fbpose.h>
00094 #endif
00095
00096 #if !defined(K_NO_STORY)
00097 #include <fbsdk/fbcommand.h>
00098 #endif
00099
00100 #if !defined(K_NO_PROJECTSETTINGS)
00101 #include <fbsdk/fbprojectsettings.h>
00102 #endif
00103
00104 #ifndef FBSDK_LEAN_AND_MEAN
00105 #include <fbsdk/fbuserobject.h>
00106 #endif
00107
00108 #include <fbsdk/fbconstraint.h>
00109 #include <fbsdk/fboptical.h>
00110
00111
00112 #ifdef FBSDKUseNamespace
00113 namespace FBSDKNamespace {
00114 #endif
00115
00116
00117
00119
00122 enum FBSceneChangeType
00123 {
00124 kFBSceneChangeNone,
00125 kFBSceneChangeDestroy,
00126 kFBSceneChangeAttach,
00127 kFBSceneChangeDetach,
00128 kFBSceneChangeAddChild,
00129 kFBSceneChangeRemoveChild,
00130 kFBSceneChangeSelect,
00131 kFBSceneChangeUnselect,
00132 kFBSceneChangeRename,
00133 kFBSceneChangeRenamePrefix,
00134 kFBSceneChangeRenameUnique,
00135 kFBSceneChangeRenameUniquePrefix,
00136 kFBSceneChangeRenamed,
00137 kFBSceneChangeRenamedPrefix,
00138 kFBSceneChangeRenamedUnique,
00139 kFBSceneChangeRenamedUniquePrefix,
00140 kFBSceneChangeSoftSelect,
00141 kFBSceneChangeSoftUnselect,
00142 kFBSceneChangeHardSelect,
00143 kFBSceneChangeActivate,
00144 kFBSceneChangeDeactivate,
00145 kFBSceneChangeLoadBegin,
00146 kFBSceneChangeLoadEnd,
00147 kFBSceneChangeClearBegin,
00148 kFBSceneChangeClearEnd,
00149 kFBSceneChangeTransactionBegin,
00150 kFBSceneChangeTransactionEnd,
00151 kFBSceneChangeMergeTransactionBegin,
00152 kFBSceneChangeMergeTransactionEnd,
00153 kFBSceneChangeReSelect,
00154 kFBSceneChangeChangeName,
00155 kFBSceneChangeChangedName,
00156 kFBSceneChangePreParent,
00157 kFBSceneChangePreUnparent,
00158 kFBSceneChangeFocus,
00159 kFBSceneChangeChangedParent,
00160 kFBSceneChangeReorder,
00161 kFBSceneChangeReordered,
00162 };
00163
00164 FB_DEFINE_ENUM( FBSDK_DLL, SceneChangeType );
00165
00166 __FB_FORWARD( FBEventSceneChange );
00167
00175 class FBSDK_DLL FBEventSceneChange: public FBEvent
00176 {
00177 public:
00181 FBEventSceneChange( HKEventBase pEvent );
00182
00183 FBPropertySceneChangeType Type;
00184 FBPropertyComponent Component;
00185 FBPropertyComponent ChildComponent;
00186 };
00187
00189
00192 enum FBTakeChangeType
00193 {
00194 kFBTakeChangeAdded,
00195 kFBTakeChangeRemoved,
00196 kFBTakeChangeOpened,
00197 kFBTakeChangeClosed,
00198 kFBTakeChangeRenamed,
00199 kFBTakeChangeUpdated,
00200 kFBTakeChangeMoved,
00201 kFBTakeChangeNone
00202 };
00203
00204 FB_DEFINE_ENUM( FBSDK_DLL, TakeChangeType );
00205
00206 __FB_FORWARD( FBEventTakeChange );
00207
00215 class FBSDK_DLL FBEventTakeChange: public FBEvent
00216 {
00217 public:
00218
00222 FBEventTakeChange( HKEventBase pEvent );
00223
00224 FBPropertyTakeChangeType Type;
00225 FBPropertyTake Take;
00226 };
00227
00229
00231 FB_FORWARD ( FBPropertyListScene );
00232 __FB_FORWARD( FBScene );
00233 FB_DEFINE_LIST ( FBSDK_DLL, Scene );
00234
00237 class FBSDK_DLL FBPropertyListScene : public FBPropertyBaseList< FBScene* >
00238 {
00239 private:
00240 public:
00245 virtual int Add( FBScene* pItem );
00249 virtual void RemoveAt( int pIndex );
00254 virtual FBScene* operator[](int pIndex);
00258 virtual int GetCount();
00259 };
00260
00262
00264
00281 class FBSDK_DLL FBScene : public FBComponent {
00282 __FBClassDeclare( FBScene,FBComponent );
00283
00284
00285 FBScene( const FBScene* );
00286 FBScene( const FBScene& );
00287 FBScene& operator=( const FBScene& );
00288
00289 public:
00290
00296 FBScene(HIObject pObject);
00297
00300 virtual void FBDelete();
00301
00304 void Clear();
00305
00317 bool Evaluate();
00318
00322 bool CandidateEvaluationAndResolve();
00323
00327 bool EvaluateDeformations();
00328
00332 void GetScriptsPaths( FBStringList& pPathList );
00333
00338
00345 int NamespaceGetChildrenList(FBStringList& pNamespaceList, const char* pNamespace = NULL, bool pRecursive = true );
00346
00351 FBFileReference* NamespaceGetOwnerFileReference(const char* pNamespace);
00352
00357 FBNamespace* NamespaceGet(const char* pNamespace);
00358
00363 bool NamespaceExist(const char* pNamespace);
00364
00369 bool NamespaceEmpty(const char* pNamespace);
00370
00380 void NamespaceGetContentList(FBComponentList& pContentList, const char* pNamespace, FBPlugModificationFlag pModificationFlags = kFBPlugAllContent, bool pRecursive = true, int pTypeInfo = FBPlug::TypeInfo, bool pExactTypeMatch = false);
00381
00391 void NamespaceSelectContent(const char* pNamespace, bool pSelect, FBPlugModificationFlag pModificationFlags = kFBPlugAllContent, bool pRecursive = true, int pTypeInfo = FBPlug::TypeInfo, bool pExactTypeMatch = false);
00392
00403 bool NamespaceRename(const char* pNameSpace, const char* pNewNamespace, bool pRecursive = true, int pTypeInfo = FBPlug::TypeInfo, bool pExactTypeMatch = false);
00404
00409 bool NamespaceDelete(const char* pNamespace);
00410
00417 bool NamespaceCleanup();
00418
00429 bool NamespaceDeleteContent(const char* pNamespace, FBPlugModificationFlag pModificationFlags = kFBPlugAllContent, bool pRecursive = true, int pTypeInfo = FBPlug::TypeInfo, bool pExactTypeMatch = false);
00430
00437 bool NamespaceImport(const char* pNamespace, const char* pFilePath, bool pAsFileReference = false );
00438
00445 bool NamespaceImportToMultiple(const FBStringList& pDstNamespaceList, const char* pFilePath, bool pAsFileReference = false );
00446
00453 bool NamespaceExport(const char* pNamespace, const char* pFilePath, bool pASCIIFormat = false);
00454
00456
00457 FBPropertyListTake Takes;
00458 FBPropertyModel RootModel;
00459 FBPropertyListCamera Cameras;
00460 FBPropertyListMaterial Materials;
00461 FBPropertyListTexture Textures;
00462 FBPropertyListShader Shaders;
00463 FBPropertyListDeformer Deformers;
00464 FBPropertyListDevice Devices;
00465 FBPropertyListConstraint Constraints;
00466
00467 FBPropertyListLight Lights;
00468 #if !defined(K_NO_AUDIO)
00469 FBPropertyListAudioClip AudioClips;
00470 #endif
00471 #if !defined(K_NO_VIDEO)
00472 FBPropertyListVideoClip VideoClips;
00473 #endif
00474
00475 FBPropertyListMotionClip MotionClips;
00476
00477 #if !defined(K_NO_FOLDER)
00478 FBPropertyListFolder Folders;
00479 #endif
00480
00481 #if !defined(K_NO_NOTE)
00482 FBPropertyListNote Notes;
00483 #endif
00484
00485 #if !defined(K_NO_POSE)
00486 FBPropertyListPose Poses;
00487 FBPropertyListObjectPose ObjectPoses;
00488 #endif
00489
00490 #if !defined(K_NO_ACTOR)
00491 FBPropertyListActor Actors;
00492 FBPropertyListActorFace ActorFaces;
00493 #endif
00494
00495 #if !defined(K_NO_CHARACTER)
00496 FBPropertyListMarkerSet MarkerSets;
00497 FBPropertyListCharacterMarkerSet CharacterMarkerSets;
00498 FBPropertyListControlSet ControlSets;
00499 FBPropertyListCharacter Characters;
00500 FBPropertyListCharacterFace CharacterFaces;
00501 FBPropertyListCharacterPose CharacterPoses;
00502 FBPropertyListCharacterExtension CharacterExtensions;
00503 #endif
00504
00505 #ifndef FB_KERNEL
00506 FBPropertyListUserObject UserObjects;
00507 #endif
00508
00509 #if !defined(K_NO_PROJECTSETTINGS)
00510 FBPropertyProjectSettings ProjectSettings;
00511 #endif
00512
00513 FBPropertyRenderer Renderer;
00514 FBPropertyListComponent Components;
00515 FBPropertyListGroup Groups;
00516 FBPropertyListSet Sets;
00517 FBPropertyListNamespace Namespaces;
00518 FBPropertyListFileReference FileReferences;
00519
00520 #ifndef FB_KERNEL
00521 FBPropertyListHandle Handles;
00522 #endif
00523 #ifndef K_NO_HUD
00524 FBPropertyListHUD HUDs;
00525 #endif
00526
00527 FBPropertyListConstraintSolver ConstraintSolvers;
00528 FBPropertyListPhysicalProperties PhysicalProperties;
00529
00530 FBPropertyString FilePath;
00531
00532 FBPropertyListKeyingGroup KeyingGroups;
00533 FBPropertyListModelSkeleton ModelSkeletons;
00534 #ifndef K_NO_OPTICAL
00535 FBPropertyListModelOptical ModelOpticals;
00536 #endif
00537 FBPropertyEvent OnChange;
00538 FBPropertyEvent OnTakeChange;
00539 };
00540
00541 #ifndef __FB_COMPONENT_SCENE
00542 #define __FB_COMPONENT_SCENE
00543 FB_DEFINE_COMPONENT( FBSDK_DLL, Scene );
00544 #endif
00545
00546
00547 #ifdef FBSDKUseNamespace
00548 }
00549 #endif
00550 #endif
00551