57 #define FBSDK_DLL K_DLLIMPORT
67 #pragma warning (disable: 4275) // 'int' : forcing value to bool 'true' or 'false' (performance warning)
68 #pragma warning (disable: 4661) // no suitable definition provided for explicit template instantiation request
78 #ifdef FBSDKUseNamespace
89 #define FB_DEFAULT_SDK_ICON "openreality_noicon.png"
95 #define __FBClassInit mLocalPtr = NULL;
101 #define __FBClassDeInit if (mLocalPtr) {delete mLocalPtr; mLocalPtr = NULL;}
107 #define __FBClassInitSDKComponent( pObjectToWrappedIsAllocated ) \
109 mSDKComponent = pObjectToWrappedIsAllocated;
132 #define __FBClassDeclare( Name,Parent ) \
133 friend FBSDK_DLL FBPlug* __FBObjectCreatorSub(HIObject pObject);\
138 typedef Parent __FBParentClass;\
142 typedef Name __FBClassType;\
146 virtual const char* ClassName() override { return #Name; } \
151 virtual bool Is( int pTypeId ) override { return (pTypeId==TypeInfo) ? true : Parent::Is( pTypeId ); } \
152 virtual int GetTypeId() override { return TypeInfo; } \
156 static int GetInternalClassId(); \
160 Data##Name* mLocalPtr; \
162 static int TypeInfo; \
169 #define __FBClassDeclareGroup( Name,Parent ) \
170 __FBClassDeclare( Name,Parent )\
172 static const char* ClassGroupName; \
182 #define FBStorableClassImplementation(ClassName, Type)\
183 const char* ClassName::FbxGetObjectSubType(){ return #ClassName; }\
184 HIObject RegisterStorable##ClassName##Create(HIObject , const char* pName, void* ){\
185 ClassName* Class = new ClassName(pName);\
186 Class->mAllocated = true;\
187 if( Class->FBCreate() ){\
188 __FBRemoveModelFromScene( Class->GetHIObject() ); \
189 return Class->GetHIObject();\
193 FBLibraryModule(ClassName##Storable){\
194 FBString lGroup = "FbxStorable/";\
196 FBRegisterObject(ClassName##R2, lGroup, #ClassName, "", RegisterStorable##ClassName##Create, true, NULL);}
201 #define FBElementClassImplementation(ClassName,IconFileName)\
202 HIObject RegisterElement##ClassName##Create(HIObject , const char* pName, void* ){\
203 ClassName* Class = new ClassName(pName);\
204 Class->mAllocated = true;\
205 if( Class->FBCreate() ){\
206 __FBRemoveModelFromScene( Class->GetHIObject() ); \
207 return Class->GetHIObject();\
211 FBLibraryModule(ClassName##Element){\
212 FBRegisterObject(ClassName##R2, "Browsing/Templates/Elements", #ClassName, "", RegisterElement##ClassName##Create, true, IconFileName);}
217 #define FBShadingElementClassImplementation(ClassName,IconFileName)\
218 HIObject RegisterShadingElement##ClassName##Create(HIObject , const char* pName, void* ){\
219 ClassName* Class = new ClassName(pName);\
220 Class->mAllocated = true;\
221 if( Class->FBCreate() ){\
222 return Class->GetHIObject();\
226 FBLibraryModule(ClassName##ShadingElement){\
227 FBRegisterObject(ClassName##R2, "Browsing/Templates/Shading Elements", #ClassName, "", RegisterShadingElement##ClassName##Create, true, IconFileName);}
235 #define FBStorableClassDeclare(Name, Parent)\
236 FBClassDeclare(Name, Parent);\
238 virtual const char* FbxGetObjectSubType() override; \
250 #define FBPropertyInitComponent( Param,Type,PropName,Get,Set ) \
252 PropertyAdd(PropName.Init( (void *)Param,#PropName,(Type* (*)(void *))Get,(void (*)(void *,Type*))Set )); \
253 PropName.TypeInfo = &Type::TypeInfo; \
263 #define FBIS( Component,ComponentType ) \
264 ((Component) && (Component)->Is( ComponentType::TypeInfo ))
281 #if !defined(K_NO_UI)
325 #define FBRegisterEvent ( Object, EventId, EventProc ) IQ( Object,IRegister)->Register ( EventId,(HICallback)this,(kICallbackHandler)EventProc );
330 #define FBUnregisterEvent ( Object, EventId, EventProc ) IQ( Object,IRegister)->Unregister ( EventId,(HICallback)this,(kICallbackHandler)EventProc );
374 FBSDK_DLL FBComponent*
FBCreateObject(
const char* pGroupName,
const char* pEntryName,
const char* pName,
void* pData =
NULL,
int nth = 0 );
387 #define FBRegisterObject( LocalId,Path,Name,Description,Constructor,IsMultipleAllowed,IconFilename ) \
388 static int __R##LocalId = FBObject_Register( Path,Name,Description,Constructor,IsMultipleAllowed,IconFilename )
408 #define FBDeclareUserObject(ClassName)\
411 virtual int GetUserClassId();\
412 virtual const char* FbxGetObjectSubType() override;\
512 virtual void RemoveAt(
int pIndex );
526 virtual int GetCount();
541 void SetClassId(
int pClassId );
543 void SetListOfParents(
bool pListOfParents );
544 bool GetIsListOfParents();
582 virtual int GetCount();
604 virtual int SetAt(
int pIndex,
FBComponent* pObject);
609 virtual void RemoveAt(
int pIndex );
616 virtual int InsertAt(
int pIndex,
FBComponent* pObject);
620 virtual void Clear();
625 virtual void SetSingleConnect(
bool pSingleConnect);
630 virtual int GetSingleConnect();
635 void SetFilter(
int pInternalClassId);
671 #ifndef DOXYGEN_SHOULD_SKIP_THIS
672 DataFBComponent* mLocalPtr;
686 static int GetInternalClassId();
699 virtual bool FBCreate();
702 virtual void FBDestroy();
705 virtual void FBDelete()
override;
708 virtual bool SetHIObject(
HIObject pObject,
bool pSDKComponent)
override;
714 virtual int PropertyAdd(
FBProperty* pProperty );
720 bool PropertyAddReferenceProperty(
FBProperty* pReferenceProperty );
791 bool ProcessNamespaceHierarchy(
FBNamespaceAction pNamespaceAction,
const char* pNamespaceName,
const char* pReplaceTo=
NULL,
bool pAddRight=
true );
803 bool ProcessObjectNamespace (
FBNamespaceAction pNamespaceAction,
const char* pNamespaceName,
const char* pReplaceTo=
NULL,
bool pAddRight=
true );
808 virtual const char* ClassName()
override;
819 const char* GetFullName(
void );
841 #ifndef DOXYGEN_SHOULD_SKIP_THIS
844 void *
operator new(
size_t stAllocateBlock );
845 void operator delete(
void *pvMem );
847 void *
operator new(
size_t stAllocateBlock,
int blockType,
const char *filename,
int linenumber );
849 void operator delete(
void *pvMem,
int blockType,
const char *filename,
int linenumber );
857 void InvalidatePropertyEventsParents();
868 #if !defined(K_NO_FOLDER)
873 #ifndef DOXYGEN_SHOULD_SKIP_THIS
882 virtual bool Is(
int pTypeId );
883 virtual int GetTypeId();
885 static void FBComponentSetName(
FBComponent* pObject,
const char *pName );
886 static const char* FBComponentGetName(
FBComponent* pObject );
888 static void FBComponentSetLongName(
FBComponent* pObject,
const char *pName );
889 static const char* FBComponentGetLongName(
FBComponent* pObject );
892 #ifndef DOXYGEN_SHOULD_SKIP_THIS
894 KObject* mDummyObject;
907 template<
class T>
inline T*
FBCast(FBObject* pObject,
bool pAutoCreate =
false)
921 FBSDK_DLL void FBFindObjectsByName(
const char* pNamePattern, FBComponentList& pList,
bool pIncludeNamespace =
true,
bool pModelsOnly =
false );
949 #define new new( _NORMAL_BLOCK, __FILE__, __LINE__)
970 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1073 FBPlug* GetProperty(
void );
1079 void* GetData(
void );
1102 virtual bool LibInit();
1108 virtual bool LibOpen();
1115 virtual bool LibReady();
1120 virtual bool LibClose();
1125 virtual bool LibRelease();
1127 KGlobalNamedEvent *mLibrary_Open,
1152 virtual bool LibInit();
1158 virtual bool LibOpen();
1165 virtual bool LibReady();
1170 virtual bool LibClose();
1175 virtual bool LibRelease();
1181 #if defined(K_NODLL)
1182 #define FBLibraryDeclare( LibName ) \
1183 FB_DLL_INIT( LibName, Operation ) \
1185 switch( Operation ) \
1191 #define FBLibraryDeclare( LibName ) \
1192 static FBLibrary LibName##GlobalFBLibrary; \
1194 K_DLLEXPORT bool LIBRARY_INIT(HIError ) \
1196 FB_EXT_INIT( LibName ); if (LibName##GlobalFBLibrary.LibInit()) return true; return false; \
1199 FB_DLL_INIT( LibName, Operation ) \
1201 switch( Operation ) \
1211 #define FBLibraryModule(Name) \
1212 void FBModule##Name()
1218 #define FBLibraryRegister( ClassName ) \
1219 extern void FBModule##ClassName( ); \
1220 FBModule##ClassName( );
1226 #define FBLibraryRegisterStorable( ClassName ) \
1227 extern void FBModule##ClassName##Storable( ); \
1228 FBModule##ClassName##Storable( );
1234 #define FBLibraryRegisterElement( ClassName ) \
1235 extern void FBModule##ClassName##Element( ); \
1236 FBModule##ClassName##Element( );
1242 #define FBLibraryRegisterShadingElement( ClassName ) \
1243 extern void FBModule##ClassName##ShadingElement( ); \
1244 FBModule##ClassName##ShadingElement( );
1247 #define FBLibraryDeclareEnd \
1260 #define FBCustomManagerImplementation( ThisComponent ) \
1261 FBClassImplementation( ThisComponent ) \
1266 #define FBRegisterCustomManager( ClassName ) \
1267 FBLibraryModule( ClassName ) \
1269 static ClassName g##ClassName; \
1270 g##ClassName.FBCreate(); \
1271 g##ClassName.RegisterManager(); \
1277 #define FBCustomManagerDeclare( ClassName ) \
1278 FBClassDeclare( ClassName, FBCustomManager ); \
1280 ClassName() : FBCustomManager() { FBClassInit; } \
1314 void RegisterManager();
1319 virtual bool FBCreate();
1327 virtual bool Init() ;
1334 virtual bool Open() ;
1340 virtual bool Clear() ;
1345 virtual bool Close() ;
1350 #ifdef FBSDKUseNamespace
HKEventBase HKEvent
HKEvent.
FBComponent * FBCreateObject(const char *pGroupName, const char *pEntryName, const char *pName, void *pData=((void *) 0), int nth=0)
FBCreateObject.
A template class for arrays.
#define __FBClassDeclare(Name, Parent)
For internal use only.
Remove all the namespace name.
int FBObject_GetGroupCount()
A set of functions to query the registration table.
void(ICallback::* FBCallback)(HISender pSender, HKEvent pEvent)
FBCallback.
class FBPropertyBaseEnum< enum FBConnectionAction > FBPropertyConnectionAction
FBPropertyConnectionType ConnectionType
Read Only Property: Connection's type.
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
#define FB_DEFINE_LIST(DllTag, Type)
Define a component list.
FBPropertyBool Selected
Read Write Property: Selected property.
Connection notify event class.
Allow editing on the namespace objects.
Object can undo its actions and states, in a global Undo Stack.
FBPropertyConnectionAction Action
Read Only Property: Connection's action performed.
void FBSetStoreableCustomTextureRegistered()
FBArrayTemplate< FBComponent * > & FBGetComponentArray()
Get the Root FBComponent.
int FBRegister_ClassId(const char *pClassName)
KGlobalNamedEvent * mLibrary_Release
Library Release.
Object can be "detached".
Connection notify event class.
FBComponent FBObject
Equivalent to FBComponent for gradual transition.
void FBFindObjectsByName(const char *pNamePattern, FBComponentList &pList, bool pIncludeNamespace=true, bool pModelsOnly=false)
FBFindObjectsByName.
The entity will not add the namespace of the object to his list of all the namespaces of the scene...
bool FBObject_Unregister(const char *pGroupName, const char *pEntryName, int nth=0)
Library class for DLL registration.
const char * FBObject_GetEntryName(int pGroupIndex, int pIndex)
FBComponent * FBGetFBComponent(HIObject pObject, bool pAutoCreate=true)
Get the FBComponent from an Internal Object.
FBPropertyManager PropertyList
Read Only Property: Manages all of the properties for the component.
Object which has kFlagUndoableSeparately flag turned on will have a separate Undo Stack...
#define ICallback_Declare(IsPure)
Forwarding.
void FBSetStoreableCustomModelRegistered()
Object is in Merging operations.
Visible in the Scene Navigator/Schematic View/Property View/Model View.
void __FBAddModelToScene(HIObject pObject)
For internal usage only.
const int kFBFlagCustomObject
User custom class instances (Internal usage only, to be removed in the future).
Object can Key his property.
FBPropertyPlug DstPlug
Read Only Property: The destination plug involved in the action.
bool FBGetStoreableCustomTextureRegistered()
#define IObject_Declare(IsPure)
Property class: const char * (String).
Use to add a namespace name to object.
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
FBPropertyString LongName
Read Write Property: Name and namespace for object.
Connections Basic Open Reality SDK Element.
class FBPropertyBaseEnum< enum FBConnectionType > FBPropertyConnectionType
MotionBuilder SDK base class.
Object is in storing operations.
void FBSetStoreableCustomMaterialRegistered()
FBPropertyPlug Plug
Read Only Property: The plug involved in the action.
FBPropertyInt SrcIndex
Read Only Property: Index of the source in the destination component.
FBPropertyPlug Plug
Read Only Property: The plug involved in the action.
Connection notify event class.
class FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
FBObjectFlag
Available flags for any component.
FBVisualComponent * FBGetFBVisualComponent(HIKtView pObject, bool pAutoCreate=true)
Get the FBComponent from an Internal Object.
const char * FBObject_GetEntryDLLName(int pGroupIndex, int pIndex, int nth=0)
class FBPropertyBaseComponent< FBPlug * > FBPropertyPlug
Property: FBPropertyBaseComponent(FBPlug*)
int FBDeleteObjectsByName(const char *pNamePattern, const char *pNameSpace=((void *) 0), const char *pGroupName=((void *) 0))
FBDeleteObjectsByName.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
const char * FBObject_GetIconName(int pGroupIndex, int pIndex, int nth=0)
Object is allocated, so it must call 'delete this' on destroy.
FBPropertyPlug NewPlug
Read Only Property: New plug created by the action.
class FBPropertyBaseComponent< FBFolder * > FBPropertyFolder
FBPropertyFolder Folder
Read Write Property: The folder that contain this component.
const int kFBStatusOwnedByUndo
Object is in destruction operations.
Definition of the class FBPlug and related enums and utility functions.
FBPropertyType
Property types.
Objects Containing class.
FBPropertyListComponent Parents
List: Parents.
HIRegister HISender
HISender.
< used="" in="" fbx="" sdk="" native="" io,="" force="" bindary="" format="" for="" the="" bindary="" data.="" />
FBComponent * FBFindObjectByFullName(const char *pObjectFullName)
FBFindObjectByFullName.
PropertyList: Concrete class for PropertyList of component
int __FBGetInternalClassId(int pTypeInfo)
__FBGetInternalClassId For internal use only, Get the internal class Id from the ORSDK FBCompoent's T...
FBPropertyListComponent Components
List: List of components.
Use to replace a define namespace.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Property: Base property class.
virtual bool UseCustomPropertyViewSet() const
Use the custom property viewSet or not.
Template class to contain an array of items.
Created from System (not from user)
T * FBCast(FBObject *pObject, bool pAutoCreate=false)
Cast the SDK object using it's IObject interface into the proper class.
static int TypeInfo
Contains the Type information of the object.
FBPropertyPlug SrcPlug
Read Only Property: The source plug involved in the action.
const char * FBObject_GetGroupName(int pGroupIndex)
HIObject(* kObjectCreatorFnc)(HIObject pOwner, const char *pName, void *pData)
int FBObject_GetEntryCount(int pGroupIndex)
#define FBSDKNamespace
FBSDKNamespace define.
Object (model) can be "parented".
int __FBRegisterTypeInfo(int pInternalClassId)
__FBRegisterTypeInfo For internal use only, Register the TypeInfo mapped to internal class id...
PropertyEvent: Base event class.
bool FBGetStoreableCustomModelRegistered()
FBArrayTemplate< FBComponent * > FBComponentList
typedef FBArrayTemplate FBComponentList;
void __FBRemoveModelFromScene(HIObject pObject)
For internal usage only.
const char * FBObject_GetEntryDescription(int pGroupIndex, int pIndex, int nth=0)
HIObject FBGetFBObject(HIObject pObject, bool pAutoCreate=false)
Get the SDK object from an Internal Object.
Library class for DLL registration.
#define K_DEPRECATED_2014
FBNamespaceAction
Namespace flags.
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
bool FBGetStoreableCustomMaterialRegistered()
Objects Containing class.
FBPlug * __FBObjectCreatorSub(HIObject pObject)
__FBObjectCreatorSub For internal use only, Create the FBPlug object from internal object...
FBPropertyConnectionAction Action
Read Only Property: Connection's action performed.
Used in FBX SDK native IO.
FBPropertyInt Type
Read Only Property: Type of event.
bool FBObject_Register(const char *pGroupName, const char *pEntryName, const char *pDescription, kObjectCreatorFnc pCreatorFnc, bool pIsMultipleAllowed, const char *pIconFilename)
FBPropertyString Name
Read Write Property: Unique name of object.
FBObjectStatus
Available lifetime status for any component.
virtual FBPropertyType GetPropertyType()
Get the property's type.
FBComponent * GetFBComponent(const HIObject Object)
Get a handle to the FBComponent belonging to an HIObject.
bool FBUnregisterObject(const char *pGroupName, const char *pEntryName, int nth=0)
FBUnregisterObject.
class FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
Custom manager class for user controlled observer objects.
FBPropertyConnectionAction Action
Read Only Property: Connection's action performed.
Object created/used by the Story tool.
FBComponentList * FBCreateComponentList()
Create a FBObjectList object.
bool FBObject_GetMultiplicity(int pGroupIndex, int pIndex, int nth=0)
void FBDestroyComponentList(FBComponentList *pObjectList)
Delete a FBObjectList object.
FBConnectionAction
Possible actions when a notify plug event occurs.
Object is in creation operations.
Object is in retrieving operations.