fbsdk/fbscene.h Source File

fbscene.h
Go to the documentation of this file.
1 #ifndef __FBSCENE_H__
2 #define __FBSCENE_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 
44 #include <kaydaradef.h>
45 #ifndef FBSDK_DLL
46 
49 #define FBSDK_DLL K_DLLIMPORT
50 #endif
51 
52 #include <fbsdk/fbcomponent.h>
53 #include <fbsdk/fbcore.h>
54 #include <fbsdk/fbdata.h>
55 #include <fbsdk/fbfolder.h>
56 #include <fbsdk/fbrenderer.h>
57 #include <fbsdk/fbshader.h>
58 #include <fbsdk/fbmodel.h>
59 #include <fbsdk/fbhud.h>
60 #include <fbsdk/fbcamera.h>
61 #include <fbsdk/fblight.h>
62 #include <fbsdk/fbvideo.h>
63 #include <fbsdk/fbmotion.h>
64 #include <fbsdk/fbgroup.h>
65 #include <fbsdk/fbfilereference.h>
66 #include <fbsdk/fbnamespace.h>
67 #include <fbsdk/fbobjectpose.h>
68 
69 #if !defined(K_NO_CHARACTER)
70 #include <fbsdk/fbcharacter.h>
71 #include <fbsdk/fbcharacterface.h>
72 #include <fbsdk/fbcharacterpose.h>
74 #endif
75 
76 #if !defined(K_NO_DECK)
77 #include <fbsdk/fbdeck.h>
78 #endif
79 
80 #if !defined(K_NO_AUDIO)
81 #include <fbsdk/fbaudio.h>
82 #endif
83 
84 #if !defined(K_NO_MANIPULATOR)
85 #include <fbsdk/fbmanipulator.h>
86 #endif
87 
88 #if !defined(K_NO_NOTE)
89 #include <fbsdk/fbnote.h>
90 #endif
91 
92 #if !defined(K_NO_POSE)
93 #include <fbsdk/fbpose.h>
94 #endif
95 
96 #if !defined(K_NO_STORY)
97 #include <fbsdk/fbcommand.h>
98 #endif
99 
100 #if !defined(K_NO_PROJECTSETTINGS)
101 #include <fbsdk/fbprojectsettings.h>
102 #endif
103 
104 #ifndef FBSDK_LEAN_AND_MEAN
105 #include <fbsdk/fbuserobject.h>
106 #endif
107 
108 #include <fbsdk/fbconstraint.h>
109 #if !defined(K_NO_OPTICAL)
110  #include <fbsdk/fboptical.h>
111 #endif
112 
113 
114 #ifdef FBSDKUseNamespace
115 namespace FBSDKNamespace {;
116 #endif
117 
119 // FBSceneEvent
123 {
162 };
163 
164 FB_DEFINE_ENUM( FBSDK_DLL, SceneChangeType );
165 
167 
176 {
177 public:
181  FBEventSceneChange( HKEventBase pEvent );
182 
186 };
187 
189 // FBEventTakeChange
193 {
202 };
203 
204 FB_DEFINE_ENUM( FBSDK_DLL, TakeChangeType );
205 
207 
216 {
217 public:
218 
222  FBEventTakeChange( HKEventBase pEvent );
223 
226 };
227 
229 // FBSceneList
234 
238 {
239 private:
240 public:
245  virtual int Add( FBScene* pItem );
249  virtual void RemoveAt( int pIndex );
254  virtual FBScene* operator[](int pIndex);
258  virtual int GetCount();
259 };
260 
262 // FBScene
264 
281 class FBSDK_DLL FBScene : public FBComponent {
283 
284  // We want to disallow the use of the copy constructor and operator for FBScene.
285  FBScene( const FBScene* );
286  FBScene( const FBScene& );
287  FBScene& operator=( const FBScene& );
288 
289 public:
290 
296  FBScene(HIObject pObject);
297 
300  virtual void FBDelete();
301 
304  void Clear();
305 
317  bool Evaluate();
318 
322  bool CandidateEvaluationAndResolve();
323 
327  bool EvaluateDeformations();
328 
332  void GetScriptsPaths( FBStringList& pPathList );
333 
338 
345  int NamespaceGetChildrenList(FBStringList& pNamespaceList, const char* pNamespace = NULL, bool pRecursive = true );
346 
351  FBFileReference* NamespaceGetOwnerFileReference(const char* pNamespace);
352 
357  FBNamespace* NamespaceGet(const char* pNamespace);
358 
363  bool NamespaceExist(const char* pNamespace);
364 
369  bool NamespaceEmpty(const char* pNamespace);
370 
380  void NamespaceGetContentList(FBComponentList& pContentList, const char* pNamespace, FBPlugModificationFlag pModificationFlags = kFBPlugAllContent, bool pRecursive = true, int pTypeInfo = FBPlug::TypeInfo, bool pExactTypeMatch = false);
381 
391  void NamespaceSelectContent(const char* pNamespace, bool pSelect, FBPlugModificationFlag pModificationFlags = kFBPlugAllContent, bool pRecursive = true, int pTypeInfo = FBPlug::TypeInfo, bool pExactTypeMatch = false);
392 
403  bool NamespaceRename(const char* pNameSpace, const char* pNewNamespace, bool pRecursive = true, int pTypeInfo = FBPlug::TypeInfo, bool pExactTypeMatch = false);
404 
409  bool NamespaceDelete(const char* pNamespace);
410 
417  bool NamespaceCleanup();
418 
429  bool NamespaceDeleteContent(const char* pNamespace, FBPlugModificationFlag pModificationFlags = kFBPlugAllContent, bool pRecursive = true, int pTypeInfo = FBPlug::TypeInfo, bool pExactTypeMatch = false);
430 
437  bool NamespaceImport(const char* pNamespace, const char* pFilePath, bool pAsFileReference = false );
438 
446  bool NamespaceImportToMultiple(const FBStringList& pDstNamespaceList, const char* pFilePath, bool pAsFileReference = false );
447 
454  bool NamespaceExport(const char* pNamespace, const char* pFilePath, bool pASCIIFormat = false);
455 
457 
467 
469 #if !defined(K_NO_AUDIO)
471 #endif
472 #if !defined(K_NO_VIDEO)
474 #endif
475 
477 
478 #if !defined(K_NO_FOLDER)
480 #endif
481 
482 #if !defined(K_NO_NOTE)
484 #endif
485 
486 #if !defined(K_NO_POSE)
489 #endif
490 
491 #if !defined(K_NO_ACTOR)
494 #endif
495 
496 #if !defined(K_NO_CHARACTER)
504 #endif
505 
506 #ifndef FB_KERNEL
508 #endif
509 
510 #if !defined(K_NO_PROJECTSETTINGS)
511  FBPropertyProjectSettings ProjectSettings;
512 #endif
513 
520 
521 #ifndef K_NO_UI
523 #endif
524 #ifndef K_NO_HUD
526 #endif
527 
530 
532 
535 #ifndef K_NO_OPTICAL
537 #endif
540 };
541 
542 #ifndef __FB_COMPONENT_SCENE
543 #define __FB_COMPONENT_SCENE
545 #endif
546 
547 
548 #ifdef FBSDKUseNamespace
549 }
550 #endif
551 #endif
552 
Motion interface for FBSDK.
FBPropertyModel RootModel
Read Only Property: Scene Root model for that scene
Definition: fbscene.h:459
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:132
Begin clearing file (file new)
Definition: fbscene.h:147
FBPlugModificationFlag
Definition: fbplug.h:153
FBPropertySceneChangeType Type
Read Only Property: Type of selection event.
Definition: fbscene.h:183
Before object unparenting.
Definition: fbscene.h:157
FBPropertyListGroup Groups
List: Groups available in the scene.
Definition: fbscene.h:516
FBPropertyListCharacterFace CharacterFaces
List: Character faces in scene.
Definition: fbscene.h:501
Animation data types.
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
Definition: fbproperties.h:139
#define FB_DEFINE_LIST(DllTag, Type)
Define a component list.
Definition: fbproperties.h:161
FBPropertyListMotionClip MotionClips
List: Motion clips in scene.
Definition: fbscene.h:476
Declaration for the FBCommand class.
PropertyList: Handle.
Definition: fbcore.h:409
FBPropertyTakeChangeType Type
Read Only Property: Type of take change event.
Definition: fbscene.h:224
FBPropertyListHUD HUDs
Read Only Property: Heads Up Displays in the scene.
Definition: fbscene.h:525
FBPropertyListDeformer Deformers
List: Deformers for scene.
Definition: fbscene.h:464
FBPropertyListSet Sets
List: Sets available in the scene.
Definition: fbscene.h:517
FBPropertyComponent Component
Read Only Property: Modified component
Definition: fbscene.h:184
Contraint classes.
Audio interface for FBSDK.
class FBPropertyBaseEnum< enum FBTakeChangeType > FBPropertyTakeChangeType
Definition: fbscene.h:204
Object change name.
Definition: fbscene.h:154
PropertyList: Actor face.
Generic optical motion capture device interface.
PropertyList: Texture
Definition: fbtexture.h:158
Contains definitions for object poses.
#define NULL
Definition: kaydara.h:169
FBVideo and derivative classes.
PropertyList: Physical properties
Definition: fbconstraint.h:688
FBPropertyListTexture Textures
List: Textures for scene.
Definition: fbscene.h:462
FBPropertyListDevice Devices
List: Devices for scene.
Definition: fbscene.h:465
Before object parenting.
Definition: fbscene.h:156
PropertyList: Actor.
Definition: fbcharacter.h:1676
Object changed name.
Definition: fbscene.h:155
FBPropertyString FilePath
Read Write Property: File path of the scene.
Definition: fbscene.h:531
End loading file.
Definition: fbscene.h:146
FBPropertyComponent ChildComponent
Read Only Property: Child component of the event.
Definition: fbscene.h:185
Contains definitions for devices, boxes and models.
Property class: const char * (String).
Base Event class.
Definition: fbcomponent.h:959
PropertyList: Folder
Definition: fbfolder.h:61
Base class for Cameras.
PropertyList: MarkerSet.
Definition: fbcharacter.h:1658
FBPropertyListModelOptical ModelOpticals
Read Write Property: Optical Data in the scene.
Definition: fbscene.h:536
Before object rename.
Definition: fbscene.h:132
FBPropertyRenderer Renderer
Read Only Property: Local renderer.
Definition: fbscene.h:514
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Definition: fbscene.h:49
FBPropertyListConstraintSolver ConstraintSolvers
List: Constraint Solvers present in the scene.
Definition: fbscene.h:528
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:148
FBPropertyListConstraint Constraints
List: Constraints in scene.
Definition: fbscene.h:466
Object have focus.
Definition: fbscene.h:158
MotionBuilder SDK base class.
Definition: fbcomponent.h:668
FBPropertyListFolder Folders
List: Folders in scene.
Definition: fbscene.h:479
FBPropertyListCharacter Characters
List: Characters in scene.
Definition: fbscene.h:500
None Modified.
Definition: fbplug.h:155
class FBPropertyBaseComponent< FBTake * > FBPropertyTake
Definition: fbdata.h:1239
Before object rename prefix.
Definition: fbscene.h:133
PropertyList: CharacterMarkerSet.
Definition: fbcharacter.h:1640
Object selection.
Definition: fbscene.h:130
Character extension interface for FBSDK.
Contains definitions for object poses.
Character extension property list.
Select model event class.
Definition: fbscene.h:175
PropertyList: UserObject.
Definition: fbuserobject.h:109
After object rename prefix.
Definition: fbscene.h:137
Before object rename unique prefix.
Definition: fbscene.h:135
Object changed parent.
Definition: fbscene.h:159
Objects Containing class.
Definition: fbnamespace.h:79
Create new manipulators using the FBManipulator class.
FBPropertyListLight Lights
List: Lights in scene.
Definition: fbscene.h:468
Definition: Python-ast.h:18
PropertyList: Concrete class for PropertyList of component
Definition: fbcomponent.h:553
PropertyList: CharacterPose.
class FBPropertyBaseComponent< FBRenderer * > FBPropertyRenderer
Definition: fbrenderer.h:71
Before object rename unique.
Definition: fbscene.h:134
FBPropertyListAudioClip AudioClips
List: Audio clips in scene.
Definition: fbscene.h:470
FBPropertyListTake Takes
List: Takes for scene.
Definition: fbscene.h:458
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
FBPropertyListControlSet ControlSets
List: Control set rigs in scene.
Definition: fbscene.h:499
Template class to contain an array of items.
Definition: fbarray.h:77
class FBPropertyBaseEnum< enum FBSceneChangeType > FBPropertySceneChangeType
Definition: fbscene.h:164
After object rename unique.
Definition: fbscene.h:138
Access to the MotionBuilder scene.
Definition: fbscene.h:281
class FBPropertyBaseComponent< FBModel * > FBPropertyModel
Definition: fbcore.h:70
FBPropertyListPhysicalProperties PhysicalProperties
List: PhysicalProperties present in the scene.
Definition: fbscene.h:529
PropertyList: Material
Definition: fbmaterial.h:179
After object rename.
Definition: fbscene.h:136
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
After object rename unique prefix.
Definition: fbscene.h:139
PropertyList: Shader
Definition: fbshader.h:696
FBPropertyTake Take
Read Only Property: The take modified.
Definition: fbscene.h:225
FBPropertyListObjectPose ObjectPoses
List: ObjectPoses in scene.
Definition: fbscene.h:488
Basic class definitions.
End clearing file (file new)
Definition: fbscene.h:148
Groups interface for FBSDK.
FBPropertyListShader Shaders
List: Shaders for scene.
Definition: fbscene.h:463
PropertyEvent: Base event class.
Definition: fbproperties.h:507
PropertyList: Light
Definition: fblight.h:140
KEventBase * HKEventBase
Definition: fbcomponent.h:75
Contains abstract deck class to interface with a deck.
FBPropertyEvent OnTakeChange
Event: Something related to a take has happened.
Definition: fbscene.h:539
PropertyList: Constraint solver
Definition: fbconstraint.h:610
FBPropertyListCharacterPose CharacterPoses
List: Character poses in scene.
Definition: fbscene.h:502
FBPropertyListActorFace ActorFaces
List: ActorFaces in scene.
Definition: fbscene.h:493
PropertyList: Scene.
Definition: fbscene.h:237
PropertyList: ModelOptical.
Definition: fboptical.h:637
PropertyList: Camera
Definition: fbcamera.h:449
PropertyList: Device
Definition: fbcore.h:566
PropertyList: MarkerSet.
Definition: fbcharacter.h:1617
FileReference interface for FBSDK.
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:62
String list.
Definition: fbstring.h:201
Object destroyed.
Definition: fbscene.h:125
Objects Containing class.
PropertyList: VideoClip
Definition: fbvideo.h:488
FBPropertyListComponent Components
List: Generic List of components.
Definition: fbscene.h:515
Take change event class.
Definition: fbscene.h:215
FBSceneChangeType
Types of model selection events.
Definition: fbscene.h:122
Access to poses.
class FBPropertyBaseComponent< FBComponent * > FBPropertyComponent
Property: FBPropertyBaseComponent(FBComponent*)
Contains definitions for actors, characters, and marker sets In Development.
PropertyList: ObjectPose.
Definition: fbobjectpose.h:470
Access to notes.
FBPropertyListModelSkeleton ModelSkeletons
Read Write Property: Bones (Skeletons) in the scene.
Definition: fbscene.h:534
FBPropertyListNote Notes
List: Notes in scene.
Definition: fbscene.h:483
PropertyList: ModelSkeleton.
Definition: fbmodel.h:921
Contains definitions for actor faces and character faces In Development.
FBPropertyListCharacterMarkerSet CharacterMarkerSets
List: Character marker sets in scene.
Definition: fbscene.h:498
Begin loading file.
Definition: fbscene.h:145
Object deselection.
Definition: fbscene.h:131
FBPropertyListMarkerSet MarkerSets
List: Marker sets in scene.
Definition: fbscene.h:497
PropertyList: Character face.
FBPropertyListCamera Cameras
List: Cameras in scene.
Definition: fbscene.h:460
FBPropertyListUserObject UserObjects
List: User objects
Definition: fbscene.h:507
FBPropertyListNamespace Namespaces
List: Namespace (include FileReference) available in the scene
Definition: fbscene.h:518
Declaration for the classes FBShaderManager, FBShader, FBPropertyListShader and other subclasses...
FBPropertyListPose Poses
List: Poses in scene.
Definition: fbscene.h:487
FBTakeChangeType
Types of take change events.
Definition: fbscene.h:192
Folders interface for FBSDK.
FBPropertyListKeyingGroup KeyingGroups
Read Write Property: Keying Groups in the scene.
Definition: fbscene.h:533
PropertyList: Contraint
Definition: fbconstraint.h:349
PropertyList: Handle.
Definition: fbhud.h:415
PropertyList: Character.
Definition: fbcharacter.h:1702
FBPropertyListMaterial Materials
List: Materials for scene.
Definition: fbscene.h:461
Rendering engine.
FBPropertyListActor Actors
List: Actors in scene.
Definition: fbscene.h:492
HUD (Head Up Display)
FBPropertyListFileReference FileReferences
List: FileReference available in the scene.
Definition: fbscene.h:519
PropertyList: KeyingGroup.
FBPropertyListHandle Handles
List: Handles present in the scene.
Definition: fbscene.h:522
FBPropertyListCharacterExtension CharacterExtensions
List: Character extensions available in the scene.
Definition: fbscene.h:503
FBPropertyEvent OnChange
Event: Something in the scene has happened.
Definition: fbscene.h:538
FBPropertyListVideoClip VideoClips
List: Video clips in scene.
Definition: fbscene.h:473