Open Reality Reference Guide
 
Loading...
Searching...
No Matches
fbcomponent.h File Reference

Basic class definitions. More...

#include <kaydaradef.h>
#include <fbsdk/fblibrary.h>
#include <fbsdk/fbplug.h>
#include <fbsdk/fbarray.h>
#include <fbsdk/fbstring.h>
#include <fbsdk/fbproperties.h>

Go to the source code of this file.

Classes

class  FBPropertyListComponentBase
 PropertyList: Component. More...
 
class  FBPropertyListComponent
 PropertyList: Concrete class for PropertyList of component More...
 
class  FBPropertyListObject
 List of scene objects. More...
 
class  FBComponent
 MotionBuilder SDK base class. More...
 
class  FBEvent
 Base Event class. More...
 
class  FBEventConnectionNotify
 Connection notify event class. More...
 
class  FBEventConnectionDataNotify
 Connection notify event class. More...
 
class  FBEventConnectionStateNotify
 Connection notify event class. More...
 
class  FBEventConnectionKeyingNotify
 
class  FBLibraryBase
 Library class for DLL registration. More...
 
class  FBLibrary
 Library class for DLL registration. More...
 
class  FBCustomManager
 Custom manager class for user controlled observer objects. More...
 

Macros

#define FBSDK_DLL   K_DLLIMPORT
 Be sure that FBSDK_DLL is defined only once...
 
#define FB_DEFAULT_SDK_ICON   "openreality_noicon.png"
 Define SDK icon filename.
 
#define __FBClassInit   mLocalPtr = NULL;
 For internal use only.
 
#define __FBClassDeInit   if (mLocalPtr) {delete mLocalPtr; mLocalPtr = NULL;}
 For internal use only.
 
#define __FBClassInitSDKComponent(pObjectToWrappedIsAllocated)
 For internal use onlyL decide if we need to delete the corresponding KObject.
 
#define __FBClassDeclare(Name, Parent)
 For internal use only.
 
#define __FBClassDeclareGroup(Name, Parent)
 For internal use only.
 
#define FBStorableClassImplementation(ClassName, Type)
 Storable Class implementation.
 
#define FBElementClassImplementation(ClassName, IconFileName)
 Element Class implementation.
 
#define FBElementClassImplementationWithName(ClassName, UniqueNameStr, IconFileName)
 Element Class implementation.
 
#define FBShadingElementClassImplementation(ClassName, IconFileName)
 Shading Element Class implementation.
 
#define FBStorableClassDeclare(Name, Parent)
 Storable Class declaration.
 
#define FBPropertyInitComponent(Param, Type, PropName, Get, Set)
 Initialize a property: component.
 
#define FBIS(Component, ComponentType)    ((Component) && (Component)->Is( ComponentType::TypeInfo ))
 Macro to verify the type of a component.
 
#define FBRegisterEvent   ( Object, EventId, EventProc ) IQ( Object,IRegister)->Register ( EventId,(HICallback)this,(kICallbackHandler)EventProc );
 Event registration/un-registration.
 
#define FBUnregisterEvent   ( Object, EventId, EventProc ) IQ( Object,IRegister)->Unregister ( EventId,(HICallback)this,(kICallbackHandler)EventProc );
 Event registration/un-registration.
 
#define FBRegisterObject(LocalId, Path, Name, Description, Constructor, IsMultipleAllowed, IconFilename)    [[maybe_unused]] static bool __R##LocalId = FBObject_Register( Path,Name,Description,Constructor,IsMultipleAllowed,IconFilename )
 Event registration/un-registration.
 
#define FBDeclareUserObject(ClassName)
 Event registration/un-registration.
 
#define FBLibraryDeclare(LibName)
 Declare the library for the application.
 
#define FBLibraryModule(Name)    void FBModule##Name()
 FBLibraryModule Define a module registration call.
 
#define FBLibraryRegister(ClassName)
 FBLibraryRegister Declare the module's registration functions.
 
#define FBLibraryRegisterStorable(ClassName)
 FBLibraryRegisterStorable Declare the module's registration functions for storable classes.
 
#define FBLibraryRegisterElement(ClassName)
 FBLibraryRegisterElement Declare the module's registration functions for element classes.
 
#define FBLibraryRegisterShadingElement(ClassName)
 FBLibraryRegisterShadingElement Declare the module's registration functions for shading element classes.
 
#define FBLibraryDeclareEnd
 Finish library declaration.
 
#define FBCustomManagerImplementation(ThisComponent)    FBClassImplementation( ThisComponent ) \
 FBCustomManagerImplementation.
 
#define FBRegisterCustomManager(ClassName)
 FBRegisterCustomManager.
 
#define FBCustomManagerDeclare(ClassName)
 FBRegisterCustomDeclare.
 

Typedefs

typedef FBArrayTemplate< FBComponent * > FBComponentList
 typedef FBArrayTemplate<FBComponent*> FBComponentList;
 
typedef HIRegister HISender
 HISender.
 
typedef HKEventBase HKEvent
 HKEvent.
 
typedef void(ICallback::* FBCallback) (HISender pSender, HKEvent pEvent)
 FBCallback.
 
typedef FBComponent FBObject
 Equivalent to FBComponent for gradual transition.
 

Enumerations

enum  FBObjectFlag {
  kFBFlagSelectable = (1 << 0) ,
  kFBFlagDeletable = (1 << 1) ,
  kFBFlagSavable = (1 << 2) ,
  kFBFlagVisible = (1 << 3) ,
  kFBFlagClonable = (1 << 4) ,
  kFBFlagSystem = (1 << 5) ,
  kFBFlagNewable = (1 << 6) ,
  kFBFlagRenamable = (1 << 7) ,
  kFBFlagMergeable = (1 << 8) ,
  kFBFlagBrowsable = (1 << 9) ,
  kFBFlagParentable = (1 << 10) ,
  kFBFlagDetachable = (1 << 11) ,
  kFBFlagUndoable = (1 << 12) ,
  kFBFlagUndoableSeparately = (1 << 13) ,
  kFBFlagKeyable = (1 << 14) ,
  kFBFlagAllocated = (1 << 15) ,
  kFBFlagStory = (1 << 16) ,
  kFBFlagStorable6 = (1 << 17) ,
  kFBFlagStorableData6 = (1 << 18) ,
  kFBFlagStorableBlindData = (1 << 19) ,
  kFBFlagStorableBlindDataForceBinary = (1 << 20) ,
  kFBFlagUniqueName = (1 << 21) ,
  kFBFlagNotSelectableNameSpace = (1 << 22) ,
  kFBFlagNamespaceEditable = (1 << 23)
}
 Available flags for any component. More...
 
enum  FBObjectStatus {
  kFBStatusCreating = (1 << 0) ,
  kFBStatusStoring = (1 << 1) ,
  kFBStatusRetrieving = (1 << 2) ,
  kFBStatusMerging = (1 << 3) ,
  kFBStatusDestroying = (1 << 4) ,
  kFBStatusClearing = (1 << 5)
}
 Available lifetime status for any component. More...
 
enum  FBNamespaceAction {
  kFBConcatNamespace ,
  kFBReplaceNamespace ,
  kFBRemoveAllNamespace
}
 Namespace flags. More...
 

Functions

 K_FORWARD (IRegister)
 
 K_FORWARD (IError)
 
 K_FORWARD (IStore)
 
 K_FORWARD (IKtView)
 
 K_FORWARD (KEventBase)
 
 K_FORWARD (KGlobalNamedEvent)
 
K_DLLIMPORT int __FBRegisterTypeInfo (int pInternalClassId)
 __FBRegisterTypeInfo For internal use only, Register the TypeInfo mapped to internal class id.
 
K_DLLIMPORT int __FBGetInternalClassId (int pTypeInfo)
 __FBGetInternalClassId For internal use only, Get the internal class Id from the ORSDK FBCompoent's TypeInfo.
 
K_DLLIMPORT FBPlug__FBObjectCreatorSub (HIObject pObject)
 __FBObjectCreatorSub For internal use only, Create the FBPlug object from internal object.
 
K_DLLIMPORT void __FBAddModelToScene (HIObject pObject)
 For internal usage only.
 
K_DLLIMPORT void __FBRemoveModelFromScene (HIObject pObject)
 For internal usage only.
 
 __FB_FORWARD (FBComponent)
 
 __FB_FORWARD (FBVisualComponent)
 
K_DLLIMPORT FBComponentGetFBComponent (const HIObject Object)
 Get a handle to the FBComponent belonging to an HIObject.
 
K_DLLIMPORT FBVisualComponentFBGetFBVisualComponent (HIKtView pObject, bool pAutoCreate=true)
 Get the FBComponent from an Internal Object.
 
K_DLLIMPORT FBComponentFBGetFBComponent (HIObject pObject, bool pAutoCreate=true)
 Get the FBComponent from an Internal Object.
 
K_DLLIMPORT FBComponentListFBCreateComponentList ()
 Create a FBObjectList object.
 
K_DLLIMPORT void FBDestroyComponentList (FBComponentList *pObjectList)
 Delete a FBObjectList object.
 
K_DLLIMPORT FBArrayTemplate< FBComponent * > & FBGetComponentArray ()
 Get the Root FBComponent.
 
K_DLLIMPORT void FBSetStoreableCustomModelRegistered ()
 
K_DLLIMPORT bool FBGetStoreableCustomModelRegistered ()
 
K_DLLIMPORT void FBSetStoreableCustomMaterialRegistered ()
 
K_DLLIMPORT bool FBGetStoreableCustomMaterialRegistered ()
 
K_DLLIMPORT void FBSetStoreableCustomTextureRegistered ()
 
K_DLLIMPORT bool FBGetStoreableCustomTextureRegistered ()
 
K_DLLIMPORT bool FBObject_Register (const char *pGroupName, const char *pEntryName, const char *pDescription, kObjectCreatorFnc pCreatorFnc, bool pIsMultipleAllowed, const char *pIconFilename)
 
K_DLLIMPORT bool FBObject_Unregister (const char *pGroupName, const char *pEntryName, int nth=0)
 
K_DLLIMPORT int FBObject_GetGroupCount ()
 A set of functions to query the registration table.
 
K_DLLIMPORT const char * FBObject_GetGroupName (int pGroupIndex)
 
K_DLLIMPORT int FBObject_GetEntryCount (int pGroupIndex)
 
K_DLLIMPORT const char * FBObject_GetEntryName (int pGroupIndex, int pIndex)
 
K_DLLIMPORT const char * FBObject_GetEntryDescription (int pGroupIndex, int pIndex, int nth=0)
 
K_DLLIMPORT const char * FBObject_GetEntryDLLName (int pGroupIndex, int pIndex, int nth=0)
 
K_DLLIMPORT const char * FBObject_GetIconName (int pGroupIndex, int pIndex, int nth=0)
 
K_DLLIMPORT bool FBObject_GetMultiplicity (int pGroupIndex, int pIndex, int nth=0)
 
K_DLLIMPORT FBComponentFBCreateObject (const char *pGroupName, const char *pEntryName, const char *pName, void *pData=NULL, int nth=0)
 FBCreateObject.
 
bool FBUnregisterObject (const char *pGroupName, const char *pEntryName, int nth=0)
 FBUnregisterObject.
 
K_DLLIMPORT int FBRegister_ClassId (const char *pClassName)
 
 FB_FORWARD (FBPropertyListComponent)
 
 FB_DEFINE_LIST (K_DLLIMPORT, Component)
 
 FB_FORWARD (FBFolder)
 
 FB_DEFINE_COMPONENT (K_DLLIMPORT, Folder)
 
 FB_DEFINE_ENUM (K_DLLIMPORT, ConnectionType)
 
 FB_DEFINE_ENUM (K_DLLIMPORT, ConnectionAction)
 
 FB_DEFINE_ENUM (K_DLLIMPORT, ObjectFlag)
 
 FB_FORWARD (FBPropertyListObject)
 
 __FB_FORWARD (FBNamespace)
 
 __FB_FORWARD (FBFileReference)
 
template<class T >
T * FBCast (FBObject *pObject, bool pAutoCreate=false)
 Cast the SDK object using it's IObject interface into the proper class.
 
K_DLLIMPORT void FBFindObjectsByName (const char *pNamePattern, FBComponentList &pList, bool pIncludeNamespace=true, bool pModelsOnly=false)
 FBFindObjectsByName.
 
K_DLLIMPORT FBComponentFBFindObjectByFullName (const char *pObjectFullName)
 FBFindObjectByFullName.
 
K_DLLIMPORT int FBDeleteObjectsByName (const char *pNamePattern, const char *pNameSpace=NULL, const char *pGroupName=NULL)
 FBDeleteObjectsByName.
 
 __FB_FORWARD (FBEvent)
 
 __FB_FORWARD (FBEventConnectionNotify)
 
 __FB_FORWARD (FBEventConnectionDataNotify)
 
 __FB_FORWARD (FBEventConnectionStateNotify)
 
 __FB_FORWARD (FBEventConnectionKeyingNotify)
 
 __FB_FORWARD (FBCustomManager)
 

Detailed Description

Basic class definitions.

Contains the basic classes that most SDK objects will derive from. These classes form the base of many functionalities of the SDK. The file also contains the base macros used in the definition/registration of the SDK classes.

Definition in file fbcomponent.h.

Macro Definition Documentation

◆ __FBClassDeclare

#define __FBClassDeclare (   Name,
  Parent 
)

For internal use only.

Definition at line 131 of file fbcomponent.h.

◆ __FBClassDeclareGroup

#define __FBClassDeclareGroup (   Name,
  Parent 
)
Value:
__FBClassDeclare( Name,Parent )\
public:\
static const char* ClassGroupName; \\
private:
#define __FBClassDeclare(Name, Parent)
For internal use only.

For internal use only.

Definition at line 155 of file fbcomponent.h.

◆ __FBClassDeInit

#define __FBClassDeInit   if (mLocalPtr) {delete mLocalPtr; mLocalPtr = NULL;}

For internal use only.

Definition at line 100 of file fbcomponent.h.

◆ __FBClassInit

#define __FBClassInit   mLocalPtr = NULL;

For internal use only.

Definition at line 94 of file fbcomponent.h.

◆ __FBClassInitSDKComponent

#define __FBClassInitSDKComponent (   pObjectToWrappedIsAllocated)
Value:
mSDKComponent = pObjectToWrappedIsAllocated;
#define __FBClassInit
For internal use only.
Definition fbcomponent.h:94

For internal use onlyL decide if we need to delete the corresponding KObject.

Definition at line 106 of file fbcomponent.h.

◆ FB_DEFAULT_SDK_ICON

#define FB_DEFAULT_SDK_ICON   "openreality_noicon.png"

Define SDK icon filename.

Definition at line 88 of file fbcomponent.h.

◆ FBCustomManagerDeclare

#define FBCustomManagerDeclare (   ClassName)
Value:
public: \
ClassName() : FBCustomManager() { FBClassInit; } \ \
private:
Custom manager class for user controlled observer objects.
#define FBClassDeclare(Name, Parent)
Class declaration.
Definition fbdefines.h:85
#define FBClassInit
Class initialization.
Definition fbdefines.h:64

FBRegisterCustomDeclare.

Parameters
ClassNameClass to declare registration functions for.

Definition at line 1274 of file fbcomponent.h.

◆ FBCustomManagerImplementation

#define FBCustomManagerImplementation (   ThisComponent)     FBClassImplementation( ThisComponent ) \

FBCustomManagerImplementation.

Parameters
ThisComponentComponent to customize

Definition at line 1257 of file fbcomponent.h.

◆ FBDeclareUserObject

#define FBDeclareUserObject (   ClassName)
Value:
public:\
static int ClassId;\
virtual int GetUserClassId();\
virtual const char* FbxGetObjectSubType() override;\\
private:

Event registration/un-registration.

For internal use only.

Definition at line 411 of file fbcomponent.h.

◆ FBElementClassImplementation

#define FBElementClassImplementation (   ClassName,
  IconFileName 
)
Value:
HIObject RegisterElement##ClassName##Create(HIObject /*pOwner*/, const char* pName, void* /*pData*/){\
ClassName* Class = new ClassName(pName);\
Class->mAllocated = true;\
if( Class->FBCreate() ){\
__FBRemoveModelFromScene( Class->GetHIObject() ); /* Hack in MoBu2013, we shouldn't add object to the scene/entity automatically*/\
return Class->GetHIObject();\
} else {\
delete Class;\
return NULL;}}\
FBLibraryModule(ClassName##Element){\
FBRegisterObject(ClassName##R2, "Browsing/Templates/Elements", #ClassName, "", RegisterElement##ClassName##Create, true, IconFileName);}

Element Class implementation.

(Asset system) This should be placed in the source code file for a class.

Definition at line 187 of file fbcomponent.h.

◆ FBElementClassImplementationWithName

#define FBElementClassImplementationWithName (   ClassName,
  UniqueNameStr,
  IconFileName 
)
Value:
HIObject RegisterElement##ClassName##Create(HIObject /*pOwner*/, const char* pName, void* /*pData*/){\
ClassName* Class = new ClassName(pName);\
Class->mAllocated = true;\
Class->UniqueName = UniqueNameStr; \
if( Class->FBCreate() ){\
__FBRemoveModelFromScene( Class->GetHIObject() ); /* Hack in MoBu2013, we shouldn't add object to the scene/entity automatically*/\
return Class->GetHIObject();\
} else {\
delete Class;\
return NULL;}}\
FBLibraryModule(ClassName##Element){\
FBRegisterObject(ClassName##R2, "Browsing/Templates/Elements", UniqueNameStr, "", RegisterElement##ClassName##Create, true, IconFileName);}

Element Class implementation.

(Asset system) This should be placed in the source code file for a class.

Definition at line 203 of file fbcomponent.h.

◆ FBIS

#define FBIS (   Component,
  ComponentType 
)     ((Component) && (Component)->Is( ComponentType::TypeInfo ))

Macro to verify the type of a component.

Used to compare a component to another, by verifying their Class::TypeInfo values.

Parameters
ComponentComponent to verify.
ComponentTypeType to verify Component with.
Returns
true if object is of type ComponentType.

Definition at line 266 of file fbcomponent.h.

◆ FBLibraryDeclare

#define FBLibraryDeclare (   LibName)
Value:
static FBLibrary LibName##GlobalFBLibrary; \
extern "C" { \
K_DLLEXPORT bool LIBRARY_INIT(HIError /*Error*/) \
{ \
FB_EXT_INIT( LibName ); if (LibName##GlobalFBLibrary.LibInit()) return true; return false; \
} \
} \
FB_DLL_INIT( LibName, Operation ) \
{ \
switch( Operation ) \
{ \
case kFBDllLoad: \
{
Library class for DLL registration.

Declare the library for the application.

Creates the FBLibrary object and generic interface functions for DLL access.

Definition at line 1188 of file fbcomponent.h.

◆ FBLibraryDeclareEnd

#define FBLibraryDeclareEnd
Value:
} \
break; \
default: \
break; \
} \
}

Finish library declaration.

Definition at line 1244 of file fbcomponent.h.

◆ FBLibraryModule

#define FBLibraryModule (   Name)     void FBModule##Name()

FBLibraryModule Define a module registration call.

Parameters
NameModule to register.

Definition at line 1208 of file fbcomponent.h.

◆ FBLibraryRegister

#define FBLibraryRegister (   ClassName)
Value:
extern void FBModule##ClassName( ); \
FBModule##ClassName( );

FBLibraryRegister Declare the module's registration functions.

Parameters
ClassNameClass to declare registration functions for.

Definition at line 1215 of file fbcomponent.h.

◆ FBLibraryRegisterElement

#define FBLibraryRegisterElement (   ClassName)
Value:
extern void FBModule##ClassName##Element( ); \
FBModule##ClassName##Element( );

FBLibraryRegisterElement Declare the module's registration functions for element classes.

Parameters
ClassNameClass to declare registration functions for.

Definition at line 1231 of file fbcomponent.h.

◆ FBLibraryRegisterShadingElement

#define FBLibraryRegisterShadingElement (   ClassName)
Value:
extern void FBModule##ClassName##ShadingElement( ); \
FBModule##ClassName##ShadingElement( );

FBLibraryRegisterShadingElement Declare the module's registration functions for shading element classes.

Parameters
ClassNameClass to declare registration functions for.

Definition at line 1239 of file fbcomponent.h.

◆ FBLibraryRegisterStorable

#define FBLibraryRegisterStorable (   ClassName)
Value:
extern void FBModule##ClassName##Storable( ); \
FBModule##ClassName##Storable( );

FBLibraryRegisterStorable Declare the module's registration functions for storable classes.

Parameters
ClassNameClass to declare registration functions for.

Definition at line 1223 of file fbcomponent.h.

◆ FBPropertyInitComponent

#define FBPropertyInitComponent (   Param,
  Type,
  PropName,
  Get,
  Set 
)
Value:
{ \
PropertyAdd(PropName.Init( (void *)Param,#PropName,(Type* (*)(void *))Get,(void (*)(void *,Type*))Set )); \
PropName.TypeInfo = &Type::TypeInfo; \
}

Initialize a property: component.

Parameters
ParamOwner name.
TypeType of variable.
PropNameComponent name.
GetGet function pointer.
SetSet function pointer.

Definition at line 253 of file fbcomponent.h.

◆ FBRegisterCustomManager

#define FBRegisterCustomManager (   ClassName)
Value:
FBLibraryModule( ClassName ) \
{ \
static ClassName g##ClassName; \
g##ClassName.FBCreate(); \
g##ClassName.RegisterManager(); \
} \
#define FBLibraryModule(Name)
FBLibraryModule Define a module registration call.

FBRegisterCustomManager.

Parameters
ClassNameClass to declare registration functions for.

Definition at line 1263 of file fbcomponent.h.

◆ FBRegisterEvent

#define FBRegisterEvent   ( Object, EventId, EventProc ) IQ( Object,IRegister)->Register ( EventId,(HICallback)this,(kICallbackHandler)EventProc );

Event registration/un-registration.

For internal use only.

Definition at line 328 of file fbcomponent.h.

◆ FBRegisterObject

#define FBRegisterObject (   LocalId,
  Path,
  Name,
  Description,
  Constructor,
  IsMultipleAllowed,
  IconFilename 
)     [[maybe_unused]] static bool __R##LocalId = FBObject_Register( Path,Name,Description,Constructor,IsMultipleAllowed,IconFilename )

Event registration/un-registration.

For internal use only.

Definition at line 390 of file fbcomponent.h.

◆ FBSDK_DLL

#define FBSDK_DLL   K_DLLIMPORT

Be sure that FBSDK_DLL is defined only once...

Definition at line 57 of file fbcomponent.h.

◆ FBShadingElementClassImplementation

#define FBShadingElementClassImplementation (   ClassName,
  IconFileName 
)
Value:
HIObject RegisterShadingElement##ClassName##Create(HIObject /*pOwner*/, const char* pName, void* /*pData*/){\
ClassName* Class = new ClassName(pName);\
Class->mAllocated = true;\
if( Class->FBCreate() ){\
return Class->GetHIObject();\
} else {\
delete Class;\
return NULL;}}\
FBLibraryModule(ClassName##ShadingElement){\
FBRegisterObject(ClassName##R2, "Browsing/Templates/Shading Elements", #ClassName, "", RegisterShadingElement##ClassName##Create, true, IconFileName);}

Shading Element Class implementation.

This should be placed in the source code file for a class.

Definition at line 220 of file fbcomponent.h.

◆ FBStorableClassDeclare

#define FBStorableClassDeclare (   Name,
  Parent 
)
Value:
FBClassDeclare(Name, Parent);\
public:\
virtual const char* FbxGetObjectSubType() override; \\
private: \

Storable Class declaration.

Overloads the necessary functions when a class inherits from FBComponent (or its derivatives) and that you want it to be persistent.

Parameters
NameName of class to declare.
ParentParent class to associate with Name.

Definition at line 238 of file fbcomponent.h.

◆ FBStorableClassImplementation

#define FBStorableClassImplementation (   ClassName,
  Type 
)
Value:
const char* ClassName::FbxGetObjectSubType(){ return #ClassName; }\
HIObject RegisterStorable##ClassName##Create(HIObject /*pOwner*/, const char* pName, void* /*pData*/){\
ClassName* Class = new ClassName(pName);\
Class->mAllocated = true;\
if( Class->FBCreate() ){\
__FBRemoveModelFromScene( Class->GetHIObject() ); /* Hack in MoBu2013, we shouldn't add object to the scene/entity automatically*/\
return Class->GetHIObject();\
} else {\
delete Class;\
return NULL;}}\
FBLibraryModule(ClassName##Storable){\
FBString lGroup = "FbxStorable/";\
lGroup += #Type;\
FBRegisterObject(ClassName##R2, lGroup, #ClassName, "", RegisterStorable##ClassName##Create, true, NULL);}
Basic string class.
Definition fbstring.h:67

Storable Class implementation.

This should be placed in the source code file for a class.

Definition at line 168 of file fbcomponent.h.

◆ FBUnregisterEvent

#define FBUnregisterEvent   ( Object, EventId, EventProc ) IQ( Object,IRegister)->Unregister ( EventId,(HICallback)this,(kICallbackHandler)EventProc );

Event registration/un-registration.

For internal use only.

Definition at line 333 of file fbcomponent.h.

Typedef Documentation

◆ FBCallback

typedef void(ICallback::* FBCallback) (HISender pSender, HKEvent pEvent)

FBCallback.

Parameters
pSenderSet the sender
pEventSet the event

Definition at line 403 of file fbcomponent.h.

◆ FBComponentList

typedef FBArrayTemplate<FBComponent*> FBComponentList;

Definition at line 301 of file fbcomponent.h.

◆ FBObject

Equivalent to FBComponent for gradual transition.

Definition at line 897 of file fbcomponent.h.

◆ HISender

typedef HIRegister HISender

HISender.

Definition at line 394 of file fbcomponent.h.

◆ HKEvent

typedef HKEventBase HKEvent

HKEvent.

Definition at line 397 of file fbcomponent.h.

Enumeration Type Documentation

◆ FBNamespaceAction

Namespace flags.

Enumerator
kFBConcatNamespace 

Use to add a namespace name to object.

kFBReplaceNamespace 

Use to replace a define namespace.

kFBRemoveAllNamespace 

Remove all the namespace name.

Definition at line 480 of file fbcomponent.h.

◆ FBObjectFlag

Available flags for any component.

Enumerator
kFBFlagSelectable 

Can be selected. If disabled, representation of the object, like in the navigator, can still be selected and can still affect the original object.

kFBFlagDeletable 

Can be deleted.

kFBFlagSavable 

Can be saved.

kFBFlagVisible 

Can be visible. If disabled, the object will still be available in the navigator, it is only hidden in the viewer.

kFBFlagClonable 

Can be cloned. If disabled, the "Duplicate" option will be removed in the contextual menu.

kFBFlagSystem 

Created from System (not from user)

kFBFlagNewable 

Deleted on File->New.

kFBFlagRenamable 

Can be renamed.

kFBFlagMergeable 

Can be merged.

kFBFlagBrowsable 

Visible in the Scene Navigator/Schematic View/Property View/Model View. If disabled, the object representation in the navigator will not be visible. In the Schematic View, system object are not shown and other objects will still be visible, but a red X will be drawn on them. It is not possible to select the object in the Schematic View. After disabling that flag of a selected object, it will still be selected to allow a script based on selection to work. It will then be possible for a user to deselect the object, but it will not be possible to select it.

kFBFlagParentable 

Object (model) can be "parented". Used by the apply manager contextual menu.

kFBFlagDetachable 

Object can be "detached". Used by the apply manager contextual menu.

kFBFlagUndoable 

Object can undo its actions and states, in a global Undo Stack.

kFBFlagUndoableSeparately 

Object which has kFlagUndoableSeparately flag turned on will have a separate Undo Stack.

kFBFlagKeyable 

Object can Key his property. (System Camera can't)

kFBFlagAllocated 

Object is allocated, so it must call 'delete this' on destroy.

kFBFlagStory 

Object created/used by the Story tool. Useful flag for filtering Story objects.

kFBFlagStorable6 

System/Obsolete.

kFBFlagStorableData6 

System/Obsolete.

kFBFlagStorableBlindData 

Used in FBX SDK native IO.

kFBFlagUniqueName 

< Used in FBX SDK native IO, force bindary format for the bindary data.

Object unique name can be added to the unique name list (at first, only RootNode have this flag)

kFBFlagNotSelectableNameSpace 

The entity will not add the namespace of the object to his list of all the namespaces of the scene.

kFBFlagNamespaceEditable 

Allow editing on the namespace objects. If disabled, the "Add/Remove Namespace..." option is removed from the contextual menu.

Definition at line 441 of file fbcomponent.h.

◆ FBObjectStatus

Available lifetime status for any component.

Enumerator
kFBStatusCreating 

Object is in creation operations.

kFBStatusStoring 

Object is in storing operations.

kFBStatusRetrieving 

Object is in retrieving operations.

kFBStatusMerging 

Object is in Merging operations.

kFBStatusDestroying 

Object is in destruction operations.

kFBStatusClearing 

Object is in clearing operations (File new).

Definition at line 470 of file fbcomponent.h.

Function Documentation

◆ __FBAddModelToScene()

K_DLLIMPORT void __FBAddModelToScene ( HIObject  pObject)

For internal usage only.

◆ __FBGetInternalClassId()

K_DLLIMPORT int __FBGetInternalClassId ( int  pTypeInfo)

__FBGetInternalClassId For internal use only, Get the internal class Id from the ORSDK FBCompoent's TypeInfo.

◆ __FBObjectCreatorSub()

K_DLLIMPORT FBPlug * __FBObjectCreatorSub ( HIObject  pObject)

__FBObjectCreatorSub For internal use only, Create the FBPlug object from internal object.

◆ __FBRegisterTypeInfo()

K_DLLIMPORT int __FBRegisterTypeInfo ( int  pInternalClassId)

__FBRegisterTypeInfo For internal use only, Register the TypeInfo mapped to internal class id.

◆ __FBRemoveModelFromScene()

K_DLLIMPORT void __FBRemoveModelFromScene ( HIObject  pObject)

For internal usage only.

◆ FBCast()

template<class T >
T * FBCast ( FBObject pObject,
bool  pAutoCreate = false 
)
inline

Cast the SDK object using it's IObject interface into the proper class.

Parameters
pObjectObject to get SDK object for.
pAutoCreateCreate object if it doesn't exist? (default = false)
Returns
SDK object for pObject.

Definition at line 904 of file fbcomponent.h.

◆ FBCreateComponentList()

K_DLLIMPORT FBComponentList * FBCreateComponentList ( )

Create a FBObjectList object.

This is to get around memory management issues when mixing debug and release runtime libraries on Windows. By using the FBCreateObjectList/FBDestroyObjectList duo of functions, you ensure that the memory used in the array is allocated, reallocated and freed in the same memory pool.

◆ FBCreateObject()

K_DLLIMPORT FBComponent * FBCreateObject ( const char *  pGroupName,
const char *  pEntryName,
const char *  pName,
void *  pData = NULL,
int  nth = 0 
)

FBCreateObject.

Parameters
pGroupNameSet the name of the Group.
pEntryNameSet the name of the Entry.
pNameSet the name of the Object to create.
pDataData to pass to object creator function.
nthSet the occurrence of the object to remove.

◆ FBDeleteObjectsByName()

K_DLLIMPORT int FBDeleteObjectsByName ( const char *  pNamePattern,
const char *  pNameSpace = NULL,
const char *  pGroupName = NULL 
)

FBDeleteObjectsByName.

This function will query the system for objects fulfilling a particular name pattern and delete them. specify a namespace preferred, delete all objects with the group name without specified a namespace specified may lead to inconsistent in scene. Wrap multiple calls to FBDeleteObjectsByName() inside pair of FBPreventUIUpdateBegin() / FBPreventUIUpdateEnd() could improve application's performance.

Parameters
pNamePatternif not NULL, indicate the name pattern to search. This pattern can contain any amount of *. (ex: *tr*mod*scene ). if is NULL or Empty string, * will be used for match all.
pNameSpaceif not NULL, the objects must be inside the given namespace.
pGroupNameif not NULL, indicate the object group name (type).
Returns
the count of objects found and deleted.

◆ FBDestroyComponentList()

K_DLLIMPORT void FBDestroyComponentList ( FBComponentList pObjectList)

Delete a FBObjectList object.

Parameters
pObjectListpointer to the object created with a call to FBCreateObjectList().

◆ FBFindObjectByFullName()

K_DLLIMPORT FBComponent * FBFindObjectByFullName ( const char *  pObjectFullName)

FBFindObjectByFullName.

This function will query the system for an object with its FullName matching. Full name is "GroupName::NameSpaceName:ObjectName". Label name is "NameSpaceName:ObjectName". also known as "PrefixName::ObjectName"

Parameters
pObjectFullNameFull Name of object to search for. Specify it with schema like "GroupName::NameSpaceName:ObjectName",or "GroupName::ObjectName" if no NameSpaceName.
Returns
A handle onto the object with Full name matching pObjectFullName, returns NULL if no object was found by the search.

◆ FBFindObjectsByName()

K_DLLIMPORT void FBFindObjectsByName ( const char *  pNamePattern,
FBComponentList pList,
bool  pIncludeNamespace = true,
bool  pModelsOnly = false 
)

FBFindObjectsByName.

This function will query the system for objects fulfilling a particular name pattern

Parameters
pNamePatternIndicate the name pattern to search. This pattern can contain any amount of *. (ex: *tr*mod*scene )
pListList that contains the objects
pIncludeNamespaceDoes the search use the complete name (with namespace)
pModelsOnlyIs the search on models or all types of objects

References FBGetFBObject().

◆ FBGetComponentArray()

K_DLLIMPORT FBArrayTemplate< FBComponent * > & FBGetComponentArray ( )

Get the Root FBComponent.

◆ FBGetFBComponent()

K_DLLIMPORT FBComponent * FBGetFBComponent ( HIObject  pObject,
bool  pAutoCreate = true 
)

Get the FBComponent from an Internal Object.

Parameters
pObjectObject to get SDK object for.
pAutoCreateCreate object if it doesn't exist? (default is true)
Returns
FBComponent for pObject.

◆ FBGetFBVisualComponent()

K_DLLIMPORT FBVisualComponent * FBGetFBVisualComponent ( HIKtView  pObject,
bool  pAutoCreate = true 
)

Get the FBComponent from an Internal Object.

Parameters
pObjectObject to get SDK object for.
pAutoCreateCreate object if it doesn't exist? (default is true)
Returns
FBComponent for pObject.

◆ FBObject_GetGroupCount()

K_DLLIMPORT int FBObject_GetGroupCount ( )

A set of functions to query the registration table.

◆ FBUnregisterObject()

bool FBUnregisterObject ( const char *  pGroupName,
const char *  pEntryName,
int  nth = 0 
)
inline

FBUnregisterObject.

Parameters
pGroupNameSet the Name of the Group from which unregister an object.
pEntryNameSet the name of the Object to unregister.
nthSet the occurrence of the object to remove.

Definition at line 384 of file fbcomponent.h.

◆ GetFBComponent()

K_DLLIMPORT FBComponent * GetFBComponent ( const HIObject  Object)

Get a handle to the FBComponent belonging to an HIObject.

This will not create the internal SDK object, and will return NULL if the SDK object has not been initialized.

Parameters
ObjectInternal object for which the FBComponent is required.
Returns
Handle to FBComponent belonging to Object.