Open Reality Reference Guide
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 
183  FBPropertySceneChangeType Type;
186 };
187 
189 // FBEventTakeChange
193 {
194  kFBTakeChangeAdded,
195  kFBTakeChangeRemoved,
196  kFBTakeChangeOpened,
197  kFBTakeChangeClosed,
198  kFBTakeChangeRenamed,
199  kFBTakeChangeUpdated,
200  kFBTakeChangeMoved,
201  kFBTakeChangeNone
202 };
203 
204 FB_DEFINE_ENUM( FBSDK_DLL, TakeChangeType );
205 
207 
216 {
217 public:
218 
222  FBEventTakeChange( HKEventBase pEvent );
223 
224  FBPropertyTakeChangeType Type;
225  FBPropertyTake Take;
226 };
227 
229 // FBSceneList
233 FB_DEFINE_LIST ( FBSDK_DLL, Scene );
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 
459  int CleanEmptyGroups();
460 
464  int CleanEmptySets();
465 
469  int CleanUnusedMaterials();
470 
474  int CleanUnusedTextures();
475 
479  int CleanUnusedShaders();
480 
484  int CleanUnusedVideoClips();
485 
489  int CleanUnusedAudioClips();
490 
494  int CleanInactiveConstraints();
495 
499  int CleanRelationConstraintsUnusedBoxes();
500 
504  int CleanEmptyRelationConstraints();
505 
506 #if !defined(K_NO_NAMESPACE_UPGRADE)
507 
513  bool NamespaceUpgradeToFileReference(const char* pNamespace, const char* pFilePath, bool pASCIIFormat = false);
514 
519  bool NamespaceDowngradeFromFileReference(const char* pNamespace);
520 #endif
521 
522 
524  FBPropertyModel RootModel;
532 
534 #if !defined(K_NO_AUDIO)
536 #endif
537 #if !defined(K_NO_VIDEO)
539 #endif
540 
542 
543 #if !defined(K_NO_FOLDER)
545 #endif
546 
547 #if !defined(K_NO_NOTE)
549 #endif
550 
551 #if !defined(K_NO_POSE)
554 #endif
555 
556 #if !defined(K_NO_ACTOR)
559 #endif
560 
561 #if !defined(K_NO_CHARACTER)
569 #endif
570 
571 #ifndef FB_KERNEL
573 #endif
574 
575 #if !defined(K_NO_PROJECTSETTINGS)
576  FBPropertyProjectSettings ProjectSettings;
577 #endif
578 
579  FBPropertyRenderer Renderer;
585 
586 #ifndef K_NO_UI
588 #endif
589 #ifndef K_NO_HUD
591 #endif
592 
595 
597 
600 #ifndef K_NO_OPTICAL
602 #endif
605 };
606 
607 #ifndef __FB_COMPONENT_SCENE
608 #define __FB_COMPONENT_SCENE
610 #endif
611 
612 
613 #ifdef FBSDKUseNamespace
614 }
615 #endif
616 #endif
617 
Motion interface for FBSDK.
After object rename.
Definition: fbscene.h:136
PropertyList: Camera
Definition: fbcamera.h:442
Begin merge transaction.
Definition: fbscene.h:151
FBPropertyListKeyingGroup KeyingGroups
Read Write Property: Keying Groups in the scene.
Definition: fbscene.h:598
FBSceneChangeType
Types of model selection events.
Definition: fbscene.h:122
FBPropertyEvent OnChange
Event: Something in the scene has happened.(FBEventSceneChange)
Definition: fbscene.h:603
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:132
List: Note
Definition: fbnote.h:107
FBPropertyTake Take
Read Only Property: The take modified.
Definition: fbscene.h:225
PropertyList: MarkerSet.
Definition: fbcharacter.h:1854
Soft deselection.
Definition: fbscene.h:141
Animation data types.
PropertyList: Handle.
Definition: fbcore.h:409
#define FB_DEFINE_LIST(DllTag, Type)
Define a component list.
Definition: fbproperties.h:161
PropertyList: Concrete class for PropertyList of component
Definition: fbcomponent.h:549
Object changed parent.
Definition: fbscene.h:159
Take change event class.
Definition: fbscene.h:215
FBPropertyListCharacter Characters
List: Characters in scene.
Definition: fbscene.h:565
Declaration for the FBCommand class.
FB_DEFINE_COMPONENT(K_DLLIMPORT, AnimationNode)
Animation node class.
Template class to contain an array of items.
Definition: fbarray.h:77
FBPropertyListMarkerSet MarkerSets
List: Marker sets in scene.
Definition: fbscene.h:562
Object reordered.
Definition: fbscene.h:161
FBPropertyRenderer Renderer
Read Only Property: Local renderer.
Definition: fbscene.h:579
Contraint classes.
Audio interface for FBSDK.
Before object rename unique prefix.
Definition: fbscene.h:135
FBPropertyListConstraintSolver ConstraintSolvers
List: Constraint Solvers present in the scene.
Definition: fbscene.h:593
Child removed.
Definition: fbscene.h:129
FBPropertyListActor Actors
List: Actors in scene.
Definition: fbscene.h:557
Generic optical motion capture device interface.
PropertyList: Folder
Definition: fbfolder.h:61
PropertyList: ModelOptical.
Definition: fboptical.h:644
Contains definitions for object poses.
Child added.
Definition: fbscene.h:128
FBVideo and derivative classes.
FBPropertyListUserObject UserObjects
List: User objects
Definition: fbscene.h:572
Before object rename.
Definition: fbscene.h:132
FBPropertyListAudioClip AudioClips
List: Audio clips in scene.
Definition: fbscene.h:535
End transaction.
Definition: fbscene.h:150
FBPropertyListMotionClip MotionClips
List: Motion clips in scene.
Definition: fbscene.h:541
FBPropertySceneChangeType Type
Read Only Property: Type of selection event.
Definition: fbscene.h:183
List: MotionClip
Definition: fbmotion.h:91
Select model event class.
Definition: fbscene.h:175
Contains definitions for devices, boxes and models.
PropertyList: Character face.
Before object parenting.
Definition: fbscene.h:156
Base class for Cameras.
Access to the MotionBuilder scene.
Definition: fbscene.h:281
FBPropertyListSet Sets
List: Sets available in the scene.
Definition: fbscene.h:582
PropertyList: Scene.
Definition: fbscene.h:237
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Definition: fbscene.h:49
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:148
PropertyList: Constraint solver
Definition: fbconstraint.h:610
FBPropertyListLight Lights
List: Lights in scene.
Definition: fbscene.h:533
List: Model
Definition: fbpose.h:179
End clearing file (file new)
Definition: fbscene.h:148
PropertyList: Physical properties
Definition: fbconstraint.h:688
Begin loading file.
Definition: fbscene.h:145
FBPropertyListModelOptical ModelOpticals
Read Write Property: Optical Data in the scene.
Definition: fbscene.h:601
PropertyList: Light
Definition: fblight.h:140
FBPropertyListCharacterFace CharacterFaces
List: Character faces in scene.
Definition: fbscene.h:566
FBPropertyListVideoClip VideoClips
List: Video clips in scene.
Definition: fbscene.h:538
List: Take
Definition: fbdata.h:1588
Character extension interface for FBSDK.
PropertyList: KeyingGroup.
FBPropertyListTake Takes
List: Takes for scene.
Definition: fbscene.h:523
After object rename unique prefix.
Definition: fbscene.h:139
PropertyEvent: Base event class.
Definition: fbproperties.h:507
Contains definitions for object poses.
Before object unparenting.
Definition: fbscene.h:157
FBPropertyListHUD HUDs
Read Only Property: Heads Up Displays in the scene.
Definition: fbscene.h:590
Begin clearing file (file new)
Definition: fbscene.h:147
Before object rename unique.
Definition: fbscene.h:134
Object have focus.
Definition: fbscene.h:158
Create new manipulators using the FBManipulator class.
PropertyList: Actor face.
PropertyList: MarkerSet.
Definition: fbcharacter.h:1813
FBPropertyListNote Notes
List: Notes in scene.
Definition: fbscene.h:548
Objects Containing class.
Definition: fbnamespace.h:79
FBPropertyListMaterial Materials
List: Materials for scene.
Definition: fbscene.h:526
PropertyList: VideoClip
Definition: fbvideo.h:495
FBPropertyModel RootModel
Read Only Property: Scene Root model for that scene
Definition: fbscene.h:524
PropertyList: Device
Definition: fbcore.h:566
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
PropertyList: Shader
Definition: fbshader.h:690
End loading file.
Definition: fbscene.h:146
FBPropertyListDeformer Deformers
List: Deformers for scene.
Definition: fbscene.h:529
Hard selection.
Definition: fbscene.h:142
PropertyList: CharacterPose.
Unknown event.
Definition: fbscene.h:124
FBPropertyListShader Shaders
List: Shaders for scene.
Definition: fbscene.h:528
FBPropertyListCharacterExtension CharacterExtensions
List: Character extensions available in the scene.
Definition: fbscene.h:568
String list.
Definition: fbstring.h:201
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
Object destroyed.
Definition: fbscene.h:125
Property class: const char * (String).
FBPropertyComponent ChildComponent
Read Only Property: Child component of the event.
Definition: fbscene.h:185
FBPropertyEvent OnTakeChange
Event: Something related to a take has happened.(FBEventTakeChange)
Definition: fbscene.h:604
Basic class definitions.
PropertyList: ObjectPose.
Definition: fbobjectpose.h:475
Object deselection.
Definition: fbscene.h:131
Groups interface for FBSDK.
PropertyList: Actor.
Definition: fbcharacter.h:1872
FBPropertyListCharacterPose CharacterPoses
List: Character poses in scene.
Definition: fbscene.h:567
FBPropertyProjectSettings ProjectSettings
Read Only Property: Local project settings
Definition: fbscene.h:576
FBPropertyListTexture Textures
List: Textures for scene.
Definition: fbscene.h:527
End merge transaction.
Definition: fbscene.h:152
Contains abstract deck class to interface with a deck.
FBPropertyListControlSet ControlSets
List: Control set rigs in scene.
Definition: fbscene.h:564
List: Namespace
Definition: fbnamespace.h:62
FBPropertyListDevice Devices
List: Devices for scene.
Definition: fbscene.h:530
PropertyList: Character.
Definition: fbcharacter.h:1898
Character extension property list.
FBPropertyListModelSkeleton ModelSkeletons
Read Write Property: Bones (Skeletons) in the scene.
Definition: fbscene.h:599
PropertyList: Handle.
Definition: fbhud.h:415
Object attached.
Definition: fbscene.h:126
Base Event class.
Definition: fbcomponent.h:953
FBPropertyListNamespace Namespaces
List: Namespace (include FileReference) available in the scene
Definition: fbscene.h:583
FBPropertyListCharacterMarkerSet CharacterMarkerSets
List: Character marker sets in scene.
Definition: fbscene.h:563
class K_DLLIMPORT FBPropertyBaseComponent< FBComponent *> FBPropertyComponent
Property: FBPropertyBaseComponent(FBComponent*)
FileReference interface for FBSDK.
FBPropertyListGroup Groups
List: Groups available in the scene.
Definition: fbscene.h:581
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:62
Before object rename prefix.
Definition: fbscene.h:133
PropertyList: Material
Definition: fbmaterial.h:179
List: AudioClip
Definition: fbaudio.h:407
PropertyList: ModelSkeleton.
Definition: fbmodel.h:953
After object rename prefix.
Definition: fbscene.h:137
FBPropertyListActorFace ActorFaces
List: ActorFaces in scene.
Definition: fbscene.h:558
Object change name.
Definition: fbscene.h:154
None Modified.
Definition: fbplug.h:155
Object reorder.
Definition: fbscene.h:160
FBPropertyListCamera Cameras
List: Cameras in scene.
Definition: fbscene.h:525
Access to poses.
Contains definitions for actors, characters, and marker sets In Development.
Object changed name.
Definition: fbscene.h:155
Access to notes.
FBPropertyListHandle Handles
List: Handles present in the scene.
Definition: fbscene.h:587
Contains definitions for actor faces and character faces In Development.
PropertyList: UserObject.
Definition: fbuserobject.h:109
FBPropertyListPose Poses
List: Poses in scene.
Definition: fbscene.h:552
FBPropertyListComponent Components
List: Generic List of components.
Definition: fbscene.h:580
After object rename unique.
Definition: fbscene.h:138
Soft selection.
Definition: fbscene.h:140
List: FileReference
FBPropertyListPhysicalProperties PhysicalProperties
List: PhysicalProperties present in the scene.
Definition: fbscene.h:594
Object detached.
Definition: fbscene.h:127
Declaration for the classes FBShaderManager, FBShader, FBPropertyListShader and other subclasses...
MotionBuilder SDK base class.
Definition: fbcomponent.h:664
FBPropertyListConstraint Constraints
List: Constraints in scene.
Definition: fbscene.h:531
PropertyList: Contraint
Definition: fbconstraint.h:349
FBPropertyComponent Component
Read Only Property: Modified component
Definition: fbscene.h:184
Folders interface for FBSDK.
Object selection.
Definition: fbscene.h:130
FBPropertyString FilePath
Read Write Property: File path of the scene.
Definition: fbscene.h:596
List: Group
Definition: fbgroup.h:67
FBTakeChangeType
Types of take change events.
Definition: fbscene.h:192
FBPropertyListFileReference FileReferences
List: FileReference available in the scene.
Definition: fbscene.h:584
static int TypeInfo
TypeInfo.
Definition: fbplug.h:469
Objects Containing class.
Rendering engine.
HUD (Head Up Display)
PropertyList: CharacterMarkerSet.
Definition: fbcharacter.h:1836
FBPropertyListFolder Folders
List: Folders in scene.
Definition: fbscene.h:544
PropertyList: Texture
Definition: fbtexture.h:158
Begin transaction.
Definition: fbscene.h:149
List: Set
Definition: fbgroup.h:80
FBPropertyListObjectPose ObjectPoses
List: ObjectPoses in scene.
Definition: fbscene.h:553
FBPropertyTakeChangeType Type
Read Only Property: Type of take change event.
Definition: fbscene.h:224
FBPlugModificationFlag
Definition: fbplug.h:153
Re-selection.
Definition: fbscene.h:153