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;\
508 virtual void RemoveAt(
int pIndex );
522 virtual int GetCount();
537 void SetClassId(
int pClassId );
539 void SetListOfParents(
bool pListOfParents );
540 bool GetIsListOfParents();
578 virtual int GetCount();
600 virtual int SetAt(
int pIndex,
FBComponent* pObject);
605 virtual void RemoveAt(
int pIndex );
612 virtual int InsertAt(
int pIndex,
FBComponent* pObject);
616 virtual void Clear();
621 virtual void SetSingleConnect(
bool pSingleConnect);
626 virtual int GetSingleConnect();
631 void SetFilter(
int pInternalClassId);
667 #ifndef DOXYGEN_SHOULD_SKIP_THIS
668 DataFBComponent* mLocalPtr;
682 static int GetInternalClassId();
695 virtual bool FBCreate();
698 virtual void FBDestroy();
701 virtual void FBDelete()
override;
704 virtual bool SetHIObject(
HIObject pObject,
bool pSDKComponent)
override;
710 virtual int PropertyAdd(
FBProperty* pProperty );
716 bool PropertyAddReferenceProperty(
FBProperty* pReferenceProperty );
787 bool ProcessNamespaceHierarchy(
FBNamespaceAction pNamespaceAction,
const char* pNamespaceName,
const char* pReplaceTo=
NULL,
bool pAddRight=
true );
799 bool ProcessObjectNamespace (
FBNamespaceAction pNamespaceAction,
const char* pNamespaceName,
const char* pReplaceTo=
NULL,
bool pAddRight=
true );
804 virtual const char* ClassName()
override;
815 const char* GetFullName(
void );
837 #ifndef DOXYGEN_SHOULD_SKIP_THIS
840 void *
operator new(
size_t stAllocateBlock );
841 void operator delete(
void *pvMem );
843 void *
operator new(
size_t stAllocateBlock,
int blockType,
const char *filename,
int linenumber );
845 void operator delete(
void *pvMem,
int blockType,
const char *filename,
int linenumber );
853 void InvalidatePropertyEventsParents();
864 #if !defined(K_NO_FOLDER)
869 #ifndef DOXYGEN_SHOULD_SKIP_THIS
878 virtual bool Is(
int pTypeId );
879 virtual int GetTypeId();
881 static void FBComponentSetName(
FBComponent* pObject,
const char *pName );
882 static const char* FBComponentGetName(
FBComponent* pObject );
884 static void FBComponentSetLongName(
FBComponent* pObject,
const char *pName );
885 static const char* FBComponentGetLongName(
FBComponent* pObject );
888 #ifndef DOXYGEN_SHOULD_SKIP_THIS
890 KObject* mDummyObject;
903 template<
class T>
inline T*
FBCast(FBObject* pObject,
bool pAutoCreate =
false)
917 FBSDK_DLL void FBFindObjectsByName(
const char* pNamePattern, FBComponentList& pList,
bool pIncludeNamespace =
true,
bool pModelsOnly =
false );
945 #define new new( _NORMAL_BLOCK, __FILE__, __LINE__)
966 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1069 FBPlug* GetProperty(
void );
1075 void* GetData(
void );
1098 virtual bool LibInit();
1104 virtual bool LibOpen();
1111 virtual bool LibReady();
1116 virtual bool LibClose();
1121 virtual bool LibRelease();
1123 KGlobalNamedEvent *mLibrary_Open,
1148 virtual bool LibInit();
1154 virtual bool LibOpen();
1161 virtual bool LibReady();
1166 virtual bool LibClose();
1171 virtual bool LibRelease();
1177 #if defined(K_NODLL)
1178 #define FBLibraryDeclare( LibName ) \
1179 FB_DLL_INIT( LibName, Operation ) \
1181 switch( Operation ) \
1187 #define FBLibraryDeclare( LibName ) \
1188 static FBLibrary LibName##GlobalFBLibrary; \
1190 K_DLLEXPORT bool LIBRARY_INIT(HIError ) \
1192 FB_EXT_INIT( LibName ); if (LibName##GlobalFBLibrary.LibInit()) return true; return false; \
1195 FB_DLL_INIT( LibName, Operation ) \
1197 switch( Operation ) \
1207 #define FBLibraryModule(Name) \
1208 void FBModule##Name()
1214 #define FBLibraryRegister( ClassName ) \
1215 extern void FBModule##ClassName( ); \
1216 FBModule##ClassName( );
1222 #define FBLibraryRegisterStorable( ClassName ) \
1223 extern void FBModule##ClassName##Storable( ); \
1224 FBModule##ClassName##Storable( );
1230 #define FBLibraryRegisterElement( ClassName ) \
1231 extern void FBModule##ClassName##Element( ); \
1232 FBModule##ClassName##Element( );
1238 #define FBLibraryRegisterShadingElement( ClassName ) \
1239 extern void FBModule##ClassName##ShadingElement( ); \
1240 FBModule##ClassName##ShadingElement( );
1243 #define FBLibraryDeclareEnd \
1256 #define FBCustomManagerImplementation( ThisComponent ) \
1257 FBClassImplementation( ThisComponent ) \
1262 #define FBRegisterCustomManager( ClassName ) \
1263 FBLibraryModule( ClassName ) \
1265 static ClassName g##ClassName; \
1266 g##ClassName.FBCreate(); \
1267 g##ClassName.RegisterManager(); \
1273 #define FBCustomManagerDeclare( ClassName ) \
1274 FBClassDeclare( ClassName, FBCustomManager ); \
1276 ClassName() : FBCustomManager() { FBClassInit; } \
1310 void RegisterManager();
1315 virtual bool FBCreate();
1323 virtual bool Init() ;
1330 virtual bool Open() ;
1336 virtual bool Clear() ;
1341 virtual bool Close() ;
1346 #ifdef FBSDKUseNamespace
Object is in destruction operations.
PropertyEvent: Base event class.
Property: Base property class.
void FBSetStoreableCustomTextureRegistered()
A template class for arrays.
#define __FBClassDeclare(Name, Parent)
For internal use only.
class FBPropertyBaseComponent< FBFolder * > FBPropertyFolder
Object is in clearing operations (File new).
int FBObject_GetGroupCount()
A set of functions to query the registration table.
FBPropertyPlug Plug
Read Only Property: The plug involved in the action.
< used="" in="" fbx="" sdk="" native="" io,="" force="" bindary="" format="" for="" the="" bindary="" data.="">
Object (model) can be "parented".
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
const char * FBObject_GetEntryName(int pGroupIndex, int pIndex)
#define FB_DEFINE_LIST(DllTag, Type)
Define a component list.
Property class: const char * (String).
HIRegister HISender
HISender.
Connection notify event class.
Created from System (not from user)
int __FBRegisterTypeInfo(int pInternalClassId)
__FBRegisterTypeInfo For internal use only, Register the TypeInfo mapped to internal class id...
FBPropertyConnectionType ConnectionType
Read Only Property: Connection's type.
Library class for DLL registration.
void FBSetStoreableCustomMaterialRegistered()
Connection notify event class.
Objects Containing class.
FBPropertyPlug Plug
Read Only Property: The plug involved in the action.
Template class to contain an array of items.
#define ICallback_Declare(IsPure)
Forwarding.
FBObjectStatus
Available lifetime status for any component.
FBPropertyConnectionAction Action
Read Only Property: Connection's action performed.
Used in FBX SDK native IO.
class FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
FBArrayTemplate< FBComponent * > FBComponentList
typedef FBArrayTemplate FBComponentList;
#define IObject_Declare(IsPure)
virtual bool UseCustomPropertyViewSet() const
Use the custom property viewSet or not.
FBNamespaceAction
Namespace flags.
bool FBObject_GetMultiplicity(int pGroupIndex, int pIndex, int nth=0)
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
FBVisualComponent * FBGetFBVisualComponent(HIKtView pObject, bool pAutoCreate=true)
Get the FBComponent from an Internal Object.
bool FBUnregisterObject(const char *pGroupName, const char *pEntryName, int nth=0)
FBUnregisterObject.
const char * FBObject_GetEntryDLLName(int pGroupIndex, int pIndex, int nth=0)
HKEventBase HKEvent
HKEvent.
FBComponentList * FBCreateComponentList()
Create a FBObjectList object.
Object created/used by the Story tool.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
int FBObject_GetEntryCount(int pGroupIndex)
FBComponent * FBFindObjectByFullName(const char *pObjectFullName)
FBFindObjectByFullName.
FBPropertyInt Type
Read Only Property: Type of event.
bool FBGetStoreableCustomMaterialRegistered()
void FBFindObjectsByName(const char *pNamePattern, FBComponentList &pList, bool pIncludeNamespace=true, bool pModelsOnly=false)
FBFindObjectsByName.
Connection notify event class.
Definition of the class FBPlug and related enums and utility functions.
Object is in creation operations.
FBArrayTemplate< FBComponent * > & FBGetComponentArray()
Get the Root FBComponent.
FBPropertyListComponent Parents
List: Parents.
FBPropertyPlug DstPlug
Read Only Property: The destination plug involved in the action.
Object is in retrieving operations.
const char * FBObject_GetIconName(int pGroupIndex, int pIndex, int nth=0)
Remove all the namespace name.
FBPropertyPlug SrcPlug
Read Only Property: The source plug involved in the action.
Library class for DLL registration.
FBPropertyString LongName
Read Write Property: Name and namespace for object.
FBConnectionAction
Possible actions when a notify plug event occurs.
PropertyList: Concrete class for PropertyList of component
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Object can undo its actions and states, in a global Undo Stack.
static int TypeInfo
Contains the Type information of the object.
FBComponent FBObject
Equivalent to FBComponent for gradual transition.
HIObject(* kObjectCreatorFnc)(HIObject pOwner, const char *pName, void *pData)
FBPropertyConnectionAction Action
Read Only Property: Connection's action performed.
void __FBAddModelToScene(HIObject pObject)
For internal usage only.
FBPropertyManager PropertyList
Read Only Property: Manages all of the properties for the component.
Object can be "detached".
#define FBSDKNamespace
FBSDKNamespace define.
Allow editing on the namespace objects.
The entity will not add the namespace of the object to his list of all the namespaces of the scene...
void(ICallback::* FBCallback)(HISender pSender, HKEvent pEvent)
FBCallback.
class FBPropertyBaseEnum< enum FBConnectionAction > FBPropertyConnectionAction
const char * FBObject_GetGroupName(int pGroupIndex)
FBPropertyPlug NewPlug
Read Only Property: New plug created by the action.
FBPropertyConnectionAction Action
Read Only Property: Connection's action performed.
Object is in Merging operations.
int FBRegister_ClassId(const char *pClassName)
KGlobalNamedEvent * mLibrary_Release
Library Release.
MotionBuilder SDK base class.
T * FBCast(FBObject *pObject, bool pAutoCreate=false)
Cast the SDK object using it's IObject interface into the proper class.
FBPropertyInt SrcIndex
Read Only Property: Index of the source in the destination component.
FBPlug * __FBObjectCreatorSub(HIObject pObject)
__FBObjectCreatorSub For internal use only, Create the FBPlug object from internal object...
Object can Key his property.
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
FBPropertyListComponent Components
List: List of components.
Object which has kFlagUndoableSeparately flag turned on will have a separate Undo Stack...
Use to add a namespace name to object.
void FBDestroyComponentList(FBComponentList *pObjectList)
Delete a FBObjectList object.
bool FBObject_Register(const char *pGroupName, const char *pEntryName, const char *pDescription, kObjectCreatorFnc pCreatorFnc, bool pIsMultipleAllowed, const char *pIconFilename)
Visible in the Scene Navigator/Schematic View/Property View/Model View.
Connections Basic Open Reality SDK Element.
Object is in storing operations.
FBComponent * FBCreateObject(const char *pGroupName, const char *pEntryName, const char *pName, void *pData=((void *) 0), int nth=0)
FBCreateObject.
FBObjectFlag
Available flags for any component.
FBComponent * FBGetFBComponent(HIObject pObject, bool pAutoCreate=true)
Get the FBComponent from an Internal Object.
class FBPropertyBaseComponent< FBPlug * > FBPropertyPlug
Property: FBPropertyBaseComponent(FBPlug*)
int __FBGetInternalClassId(int pTypeInfo)
__FBGetInternalClassId For internal use only, Get the internal class Id from the ORSDK FBCompoent's T...
FBPropertyBool Selected
Read Write Property: Selected property.
FBComponent * GetFBComponent(const HIObject Object)
Get a handle to the FBComponent belonging to an HIObject.
virtual FBPropertyType GetPropertyType() override
Get the property's type.
Objects Containing class.
bool FBGetStoreableCustomModelRegistered()
void FBSetStoreableCustomModelRegistered()
bool FBObject_Unregister(const char *pGroupName, const char *pEntryName, int nth=0)
const char * FBObject_GetEntryDescription(int pGroupIndex, int pIndex, int nth=0)
FBPropertyType
Property types.
HIObject FBGetFBObject(HIObject pObject, bool pAutoCreate=false)
Get the SDK object from an Internal Object.
FBPropertyFolder Folder
Read Write Property: The folder that contain this component.
class FBPropertyBaseEnum< enum FBConnectionType > FBPropertyConnectionType
FBPropertyString Name
Read Write Property: Unique name of object.
bool FBGetStoreableCustomTextureRegistered()
int FBDeleteObjectsByName(const char *pNamePattern, const char *pNameSpace=((void *) 0), const char *pGroupName=((void *) 0))
FBDeleteObjectsByName.
void __FBRemoveModelFromScene(HIObject pObject)
For internal usage only.
Object is allocated, so it must call 'delete this' on destroy.
Custom manager class for user controlled observer objects.
Use to replace a define namespace.
class FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool