fbsdk/fbcomponent.h Source File

fbcomponent.h
Go to the documentation of this file.
1 #ifndef __FBBASE_H__
2 #define __FBBASE_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 
47 #include <kaydaradef.h>
48 
49 // This include directive is necessary because of the definition of the
50 // FBLibrary class.
51 #include <fbsdk/fblibrary.h>
52 
53 #ifndef FBSDK_DLL
54 
57  #define FBSDK_DLL K_DLLIMPORT
58 #endif
59 
60 // Global includes
61 #include <fbsdk/fbplug.h>
62 #include <fbsdk/fbarray.h>
63 #include <fbsdk/fbstring.h>
64 #include <fbsdk/fbproperties.h>
65 
66 #ifdef _MSC_VER
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
69 #endif
70 
71 K_FORWARD( IRegister );
72 K_FORWARD( IError );
73 K_FORWARD( IStore );
74 K_FORWARD( IKtView );
75 K_FORWARD( KEventBase );
76 K_FORWARD( KGlobalNamedEvent );
77 
78 #ifdef FBSDKUseNamespace
79  namespace FBSDKNamespace {
80 #endif
81 
82 #ifndef FBINCLUDE
83 // Section that must be exported
84 #else
85 #endif
86 
89 #define FB_DEFAULT_SDK_ICON "openreality_noicon.png"
90 
91 // For internal use only.
95 #define __FBClassInit mLocalPtr = NULL;
96 
97 // For internal use only.
101 #define __FBClassDeInit if (mLocalPtr) {delete mLocalPtr; mLocalPtr = NULL;}
102 
103 // For internal use only.
107 #define __FBClassInitSDKComponent( pObjectToWrappedIsAllocated ) \
108  __FBClassInit; \
109  mSDKComponent = pObjectToWrappedIsAllocated;
110 
115 FBSDK_DLL int __FBRegisterTypeInfo(int pInternalClassId);
116 
121 FBSDK_DLL int __FBGetInternalClassId(int pTypeInfo);
122 
127 FBSDK_DLL FBPlug* __FBObjectCreatorSub(HIObject pObject);
128 
132 #define __FBClassDeclare( Name,Parent ) \
133  friend FBSDK_DLL FBPlug* __FBObjectCreatorSub(HIObject pObject);\
134  public: \
135 \
138  typedef Parent __FBParentClass;\
139 \
142  typedef Name __FBClassType;\
143 \
146  virtual const char* ClassName() override { return #Name; } \
147 \
151  virtual bool Is( int pTypeId ) override { return (pTypeId==TypeInfo) ? true : Parent::Is( pTypeId ); } \
152  virtual int GetTypeId() override { return TypeInfo; } \
153 \
156  static int GetInternalClassId(); \
157 \
160  Data##Name* mLocalPtr; \
161  virtual ~Name(); \
162  static int TypeInfo; \
163 \
164  private:
165 
169 #define __FBClassDeclareGroup( Name,Parent ) \
170  __FBClassDeclare( Name,Parent )\
171  public:\
172  static const char* ClassGroupName; \
173 \
174  private:
175 
176 FBSDK_DLL void __FBAddModelToScene( HIObject pObject );
178 
182 #define FBStorableClassImplementation(ClassName, Type)\
183  const char* ClassName::FbxGetObjectSubType(){ return #ClassName; }\
184  HIObject RegisterStorable##ClassName##Create(HIObject /*pOwner*/, const char* pName, void* /*pData*/){\
185  ClassName* Class = new ClassName(pName);\
186  Class->mAllocated = true;\
187  if( Class->FBCreate() ){\
188  __FBRemoveModelFromScene( Class->GetHIObject() ); /* Hack in MoBu2013, we shouldn't add object to the scene/entity automatically*/\
189  return Class->GetHIObject();\
190  } else {\
191  delete Class;\
192  return NULL;}}\
193  FBLibraryModule(ClassName##Storable){\
194  FBString lGroup = "FbxStorable/";\
195  lGroup += #Type;\
196  FBRegisterObject(ClassName##R2, lGroup, #ClassName, "", RegisterStorable##ClassName##Create, true, NULL);}
197 
201 #define FBElementClassImplementation(ClassName,IconFileName)\
202  HIObject RegisterElement##ClassName##Create(HIObject /*pOwner*/, const char* pName, void* /*pData*/){\
203  ClassName* Class = new ClassName(pName);\
204  Class->mAllocated = true;\
205  if( Class->FBCreate() ){\
206  __FBRemoveModelFromScene( Class->GetHIObject() ); /* Hack in MoBu2013, we shouldn't add object to the scene/entity automatically*/\
207  return Class->GetHIObject();\
208  } else {\
209  delete Class;\
210  return NULL;}}\
211  FBLibraryModule(ClassName##Element){\
212  FBRegisterObject(ClassName##R2, "Browsing/Templates/Elements", #ClassName, "", RegisterElement##ClassName##Create, true, IconFileName);}
213 
217 #define FBShadingElementClassImplementation(ClassName,IconFileName)\
218  HIObject RegisterShadingElement##ClassName##Create(HIObject /*pOwner*/, const char* pName, void* /*pData*/){\
219  ClassName* Class = new ClassName(pName);\
220  Class->mAllocated = true;\
221  if( Class->FBCreate() ){\
222  return Class->GetHIObject();\
223  } else {\
224  delete Class;\
225  return NULL;}}\
226  FBLibraryModule(ClassName##ShadingElement){\
227  FBRegisterObject(ClassName##R2, "Browsing/Templates/Shading Elements", #ClassName, "", RegisterShadingElement##ClassName##Create, true, IconFileName);}
228 
235 #define FBStorableClassDeclare(Name, Parent)\
236  FBClassDeclare(Name, Parent);\
237 public:\
238  virtual const char* FbxGetObjectSubType() override; \
239 \
240 private: \
241 
242 
250 #define FBPropertyInitComponent( Param,Type,PropName,Get,Set ) \
251  { \
252  PropertyAdd(PropName.Init( (void *)Param,#PropName,(Type* (*)(void *))Get,(void (*)(void *,Type*))Set )); \
253  PropName.TypeInfo = &Type::TypeInfo; \
254  }
255 
263 #define FBIS( Component,ComponentType ) \
264  ((Component) && (Component)->Is( ComponentType::TypeInfo ))
265 
267 // Utility function
269 // For internal use only.
270 __FB_FORWARD( FBComponent );
271 __FB_FORWARD( FBVisualComponent );
272 
279 FBSDK_DLL FBComponent* GetFBComponent( const HIObject Object );
280 
281 #if !defined(K_NO_UI)
282 
287 FBSDK_DLL FBVisualComponent* FBGetFBVisualComponent( HIKtView pObject,bool pAutoCreate=true );
288 #endif
289 
295 FBSDK_DLL FBComponent* FBGetFBComponent( HIObject pObject, bool pAutoCreate=true );
296 
299 
306 FBSDK_DLL FBComponentList* FBCreateComponentList();
307 
311 FBSDK_DLL void FBDestroyComponentList( FBComponentList* pObjectList );
312 
316 
318 // Registration macros
320 
325 #define FBRegisterEvent ( Object, EventId, EventProc ) IQ( Object,IRegister)->Register ( EventId,(HICallback)this,(kICallbackHandler)EventProc );
326 
330 #define FBUnregisterEvent ( Object, EventId, EventProc ) IQ( Object,IRegister)->Unregister ( EventId,(HICallback)this,(kICallbackHandler)EventProc );
331 
338 
345 
352 
353 FBSDK_DLL bool FBObject_Register ( const char * pGroupName,const char * pEntryName,const char * pDescription, kObjectCreatorFnc pCreatorFnc, bool pIsMultipleAllowed,const char * pIconFilename);
354 FBSDK_DLL bool FBObject_Unregister( const char * pGroupName,const char * pEntryName, int nth=0 );
355 
359 FBSDK_DLL const char* FBObject_GetGroupName ( int pGroupIndex );
360 FBSDK_DLL int FBObject_GetEntryCount ( int pGroupIndex );
361 FBSDK_DLL const char* FBObject_GetEntryName ( int pGroupIndex, int pIndex );
362 FBSDK_DLL const char* FBObject_GetEntryDescription ( int pGroupIndex, int pIndex, int nth = 0 );
363 FBSDK_DLL const char* FBObject_GetEntryDLLName ( int pGroupIndex, int pIndex, int nth = 0 );
364 FBSDK_DLL const char* FBObject_GetIconName ( int pGroupIndex, int pIndex, int nth = 0 );
365 FBSDK_DLL bool FBObject_GetMultiplicity ( int pGroupIndex, int pIndex, int nth = 0 );
366 
374 FBSDK_DLL FBComponent* FBCreateObject( const char* pGroupName, const char* pEntryName, const char* pName, void* pData = NULL, int nth = 0 );
375 
381 inline bool FBUnregisterObject( const char * pGroupName, const char * pEntryName, int nth=0 ) { return FBObject_Unregister( pGroupName,pEntryName,nth ); }
382 
387 #define FBRegisterObject( LocalId,Path,Name,Description,Constructor,IsMultipleAllowed,IconFilename ) \
388  static int __R##LocalId = FBObject_Register( Path,Name,Description,Constructor,IsMultipleAllowed,IconFilename )
389 
392 
395 
400 typedef void (ICallback::*FBCallback)(HISender pSender,HKEvent pEvent);
401 
402 FBSDK_DLL int FBRegister_ClassId(const char* pClassName);
403 
408 #define FBDeclareUserObject(ClassName)\
409 public:\
410  static int ClassId;\
411  virtual int GetUserClassId();\
412  virtual const char* FbxGetObjectSubType() override;\
413 \
414 private:
415 
417 // FBComponent
419 #ifdef new
420 
423  #define RENEW new
424  #undef new
425 #endif
426 
428 // FBSceneList
430 FB_FORWARD( FBPropertyListComponent );
431 __FB_FORWARD( FBComponent );
432 FB_DEFINE_LIST( FBSDK_DLL, Component );
433 
436 
439 {
440  kFBFlagSelectable = (1 << 0),
441  kFBFlagDeletable = (1 << 1),
442  kFBFlagSavable = (1 << 2),
443  kFBFlagVisible = (1 << 3),
444  kFBFlagClonable = (1 << 4),
445  kFBFlagSystem = (1 << 5),
446  kFBFlagNewable = (1 << 6),
447  kFBFlagRenamable = (1 << 7),
448  kFBFlagMergeable = (1 << 8),
449  kFBFlagBrowsable = (1 << 9),
450  kFBFlagParentable = (1 << 10),
451  kFBFlagDetachable = (1 << 11),
452  kFBFlagUndoable = (1 << 12),
454  kFBFlagKeyable = (1 << 14),
455  kFBFlagAllocated = (1 << 15),
456  kFBFlagStory = (1 << 16),
457  kFBFlagStorable6 = (1 << 17),
458  kFBFlagStorableData6 = (1 << 18),
461  kFBFlagUniqueName = (1 << 21),
464 };
465 
466 K_DEPRECATED_2014 const int kFBFlagCustomObject = (1 << 24);
467 
470  kFBStatusCreating = (1 << 0),
471  kFBStatusStoring = (1 << 1),
472  kFBStatusRetrieving = (1 << 2),
473  kFBStatusMerging = (1 << 3),
474  kFBStatusDestroying = (1 << 4),
475 };
476 
479 
482 {
486 };
487 
488 FB_DEFINE_ENUM(FBSDK_DLL, ConnectionType);
489 FB_DEFINE_ENUM(FBSDK_DLL, ConnectionAction);
491 
495 {
496  protected:
498  int mClassId;
500  bool mParents;
501  public:
508  virtual int Add( FBComponent* pItem );
512  virtual void RemoveAt( int pIndex );
517  virtual FBComponent* GetAt(int pIndex)=0;
522  FBComponent* operator[](int pIndex);
526  virtual int GetCount();
527 
532  virtual int Find( FBComponent* pItem );
533 
538  virtual int Remove( FBComponent* pItem );
539 
540  // Internal functions
541  void SetClassId( int pClassId );
542  int GetClassId( );
543  void SetListOfParents( bool pListOfParents );
544  bool GetIsListOfParents();
545 
549  virtual FBPropertyType GetPropertyType( ) override { return kFBPT_object; }
550 };
554 {
555  public:
560  virtual FBComponent* GetAt(int pIndex);
561 };
562 
564 // FBPropertyListObject
566 
568 
574 {
575  public:
578 
582  virtual int GetCount();
583 
585 
589  virtual FBComponent* operator[]( int pIndex );
590  virtual FBComponent* GetAt( int pIndex );
592 
597  virtual int Add( FBComponent* pObject );
598 
604  virtual int SetAt(int pIndex, FBComponent* pObject);
605 
609  virtual void RemoveAt( int pIndex );
610 
616  virtual int InsertAt(int pIndex, FBComponent* pObject);
617 
620  virtual void Clear();
621 
625  virtual void SetSingleConnect(bool pSingleConnect);
626 
630  virtual int GetSingleConnect();
631 
635  void SetFilter(int pInternalClassId);
636 
640  int GetFilter();
641 
642 private:
644 
649  const FBPropertyListObject& operator =( const FBPropertyListObject& );
651 };
652 
655 
669 {
670 public:
671 #ifndef DOXYGEN_SHOULD_SKIP_THIS
672  DataFBComponent* mLocalPtr;
674 protected:
676  FBString mName;
677 #endif
678 
679 public:
681  static int TypeInfo;
682 
686  static int GetInternalClassId();
687 
691  FBComponent( HIObject pObject );
692 
694  virtual ~FBComponent();
695 
699  virtual bool FBCreate();
700 
702  virtual void FBDestroy();
703 
705  virtual void FBDelete() override;
706 
708  virtual bool SetHIObject(HIObject pObject, bool pSDKComponent) override;
709 
714  virtual int PropertyAdd( FBProperty* pProperty );
715 
720  bool PropertyAddReferenceProperty( FBProperty* pReferenceProperty );
721 
726  void PropertyRemove( FBProperty* pProperty );
727 
732  void PropertyGetModifiedList(FBArrayTemplate<FBProperty*>& pPropList, FBPlugModificationFlag pModificationFlags);
733 
742  FBProperty* PropertyCreate( const char* pName, FBPropertyType pType, const char * pDataType, bool pAnimatable, bool pIsUser = false, FBProperty* pReferenceSource = NULL );
743 
747  FBObjectFlag GetObjectFlags();
748 
752  void SetObjectFlags(FBObjectFlag pFlags);
753 
758  bool HasObjectFlags(FBObjectFlag pFlags);
759 
763  void EnableObjectFlags(FBObjectFlag pFlags);
764 
768  void DisableObjectFlags(FBObjectFlag pFlags);
769 
774  void SetObjectStatus(FBObjectStatus pStatus, bool pValue);
775 
779  bool GetObjectStatus(FBObjectStatus pStatus);
780 
791  bool ProcessNamespaceHierarchy( FBNamespaceAction pNamespaceAction, const char* pNamespaceName, const char* pReplaceTo=NULL, bool pAddRight=true );
792 
803  bool ProcessObjectNamespace ( FBNamespaceAction pNamespaceAction, const char* pNamespaceName, const char* pReplaceTo=NULL, bool pAddRight=true );
804 
808  virtual const char* ClassName() override;
809 
814  virtual bool UseCustomPropertyViewSet() const { return true; }
815 
819  const char* GetFullName( void );
820 
823  void SetOwnerNamespace(FBNamespace* pOwnerNSObj);
824 
828  FBNamespace* GetOwnerNamespace( void );
829 
830 
834  FBFileReference* GetOwnerFileReference( void );
835 
839  void HardSelect();
840 
841 #ifndef DOXYGEN_SHOULD_SKIP_THIS
842 
843  // Overloaded allocation/destruction operator.
844  void *operator new( size_t stAllocateBlock );
845  void operator delete( void *pvMem );
846 
847  void *operator new( size_t stAllocateBlock, int blockType, const char *filename, int linenumber );
848 #if _MSC_VER >= 1200
849  void operator delete( void *pvMem, int blockType, const char *filename, int linenumber );
850 #endif
851 
852 
854  // Used to manage sub property events.
855  void RegisterPropertyEvent(FBPropertyEvent* pPropertyEvent);
856  void UnregisterPropertyEvent(FBPropertyEvent* pPropertyEvent);
857  void InvalidatePropertyEventsParents();
859 #endif
860 
867 
868 #if !defined(K_NO_FOLDER)
870 #endif
871 
872 public:
873 #ifndef DOXYGEN_SHOULD_SKIP_THIS
876 #endif
877 
882  virtual bool Is( int pTypeId );
883  virtual int GetTypeId();
884 
885  static void FBComponentSetName( FBComponent* pObject, const char *pName );
886  static const char* FBComponentGetName( FBComponent* pObject );
887 
888  static void FBComponentSetLongName( FBComponent* pObject, const char *pName );
889  static const char* FBComponentGetLongName( FBComponent* pObject );
890 
891 public:
892 #ifndef DOXYGEN_SHOULD_SKIP_THIS
893 
894  KObject* mDummyObject;
895  void KObjectEvent(HIRegister pView, HKEventBase pEvent);
896 #endif
897 };
898 
901 
907 template<class T> inline T* FBCast(FBObject* pObject, bool pAutoCreate = false)
908 {
909  HIObject lObject = pObject ? FBGetFBObject(pObject->GetHIObject(), pAutoCreate) : NULL;
910  // Should also validate type but not available for now
911  return (T*)lObject;
912 }
913 
921 FBSDK_DLL void FBFindObjectsByName( const char* pNamePattern, FBComponentList& pList, bool pIncludeNamespace = true, bool pModelsOnly = false );
922 
931 FBSDK_DLL FBComponent* FBFindObjectByFullName( const char* pObjectFullName );
932 
946 FBSDK_DLL int FBDeleteObjectsByName( const char* pNamePattern, const char* pNameSpace = NULL, const char* pGroupName = NULL);
947 
948 #ifdef RENEW
949  #define new new( _NORMAL_BLOCK, __FILE__, __LINE__)
950  #undef RENEW
951 #endif
952 
954 // FBEvent
956 __FB_FORWARD( FBEvent );
957 
960 {
961 public:
967  FBEvent( HKEvent pEvent );
968 
970 #ifndef DOXYGEN_SHOULD_SKIP_THIS
971 protected:
973  HKEventBase mEvent;
974 public:
976  void PropertyAdd( FBProperty* ) {};
977 #endif
978 };
979 
981 // FBEventConnectionNotify
983 __FB_FORWARD( FBEventConnectionNotify );
984 
987 {
988 public:
993 
1000 };
1001 
1003 // FBEventConnectionDataNotify
1006 
1009 {
1010 public:
1015 
1018  void* GetData();
1019  void* GetOldData();
1020 };
1021 
1023 // FBEventConnectionStateNotify
1026 
1029 {
1030 public:
1035 
1038  void* GetData();
1039  void* GetOldData();
1040 };
1041 
1043 // __FB_FORWARD( FBEventConnectionKeyingNotify ); //
1046 
1048 {
1049 public:
1054 
1060  FBConnectionAction GetAction( void );
1061 
1067  FBPlug* GetPlug( void );
1073  FBPlug* GetProperty( void );
1079  void* GetData( void );
1080 };
1081 
1082 
1084 // FBLibrary
1086 
1091 {
1092 public:
1093  FBLibraryBase();
1094  virtual ~FBLibraryBase();
1097 
1102  virtual bool LibInit();
1103 
1108  virtual bool LibOpen();
1109 
1115  virtual bool LibReady();
1116 
1120  virtual bool LibClose();
1121 
1125  virtual bool LibRelease();
1127  KGlobalNamedEvent *mLibrary_Open,
1128  *mLibrary_Ready,
1129  *mLibrary_Close,
1130  *mLibrary_Release;
1131 
1132  void Library_OpenHandler(HIRegister pCaller,HKEventBase pEvent);
1133  void Library_ReadyHandler(HIRegister pCaller,HKEventBase pEvent);
1134  void Library_CloseHandler(HIRegister pCaller,HKEventBase pEvent);
1135  void Library_ReleaseHandler(HIRegister pCaller,HKEventBase pEvent);
1136 };
1137 
1139 // FBLibrary
1141 
1145 class FBLibrary : public FBLibraryBase
1146 {
1147 public:
1152  virtual bool LibInit();
1153 
1158  virtual bool LibOpen();
1159 
1165  virtual bool LibReady();
1166 
1170  virtual bool LibClose();
1171 
1175  virtual bool LibRelease();
1176 };
1177 
1181 #if defined(K_NODLL)
1182  #define FBLibraryDeclare( LibName ) \
1183  FB_DLL_INIT( LibName, Operation ) \
1184  { \
1185  switch( Operation ) \
1186  { \
1187  case kFBDllLoad: \
1188  { \
1189 
1190 #else
1191  #define FBLibraryDeclare( LibName ) \
1192  static FBLibrary LibName##GlobalFBLibrary; \
1193  extern "C" { \
1194  K_DLLEXPORT bool LIBRARY_INIT(HIError /*Error*/) \
1195  { \
1196  FB_EXT_INIT( LibName ); if (LibName##GlobalFBLibrary.LibInit()) return true; return false; \
1197  } \
1198  } \
1199  FB_DLL_INIT( LibName, Operation ) \
1200  { \
1201  switch( Operation ) \
1202  { \
1203  case kFBDllLoad: \
1204  {
1205 #endif
1206 
1211 #define FBLibraryModule(Name) \
1212  void FBModule##Name()
1213 
1218 #define FBLibraryRegister( ClassName ) \
1219  extern void FBModule##ClassName( ); \
1220  FBModule##ClassName( );
1221 
1226 #define FBLibraryRegisterStorable( ClassName ) \
1227  extern void FBModule##ClassName##Storable( ); \
1228  FBModule##ClassName##Storable( );
1229 
1234 #define FBLibraryRegisterElement( ClassName ) \
1235  extern void FBModule##ClassName##Element( ); \
1236  FBModule##ClassName##Element( );
1237 
1242 #define FBLibraryRegisterShadingElement( ClassName ) \
1243  extern void FBModule##ClassName##ShadingElement( ); \
1244  FBModule##ClassName##ShadingElement( );
1245 
1247 #define FBLibraryDeclareEnd \
1248  } \
1249  break; \
1250  default: \
1251  break; \
1252  } \
1253 }
1254 
1255 // **********************************************************************************
1256 
1260 #define FBCustomManagerImplementation( ThisComponent ) \
1261  FBClassImplementation( ThisComponent ) \
1262 
1263 
1266 #define FBRegisterCustomManager( ClassName ) \
1267  FBLibraryModule( ClassName ) \
1268  { \
1269  static ClassName g##ClassName; \
1270  g##ClassName.FBCreate(); \
1271  g##ClassName.RegisterManager(); \
1272  } \
1273 
1274 
1277 #define FBCustomManagerDeclare( ClassName ) \
1278 FBClassDeclare( ClassName, FBCustomManager ); \
1279  public: \
1280  ClassName() : FBCustomManager() { FBClassInit; } \
1281  \
1282  private:
1283 
1284 
1286 // FBCustomManager
1288 
1289 __FB_FORWARD( FBCustomManager );
1290 
1305 public:
1308  FBCustomManager();
1309 
1314  void RegisterManager();
1315 
1319  virtual bool FBCreate();
1320 
1327  virtual bool Init() ;
1328 
1334  virtual bool Open() ;
1335 
1340  virtual bool Clear() ;
1341 
1345  virtual bool Close() ;
1346 
1347 };
1348 
1349 
1350 #ifdef FBSDKUseNamespace
1351  }
1352 #endif
1353 
1354 #endif
HKEventBase HKEvent
HKEvent.
Definition: fbcomponent.h:394
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.
Definition: fbcomponent.h:132
Remove all the namespace name.
Definition: fbcomponent.h:485
int FBObject_GetGroupCount()
A set of functions to query the registration table.
FBPlugModificationFlag
Definition: fbplug.h:153
void(ICallback::* FBCallback)(HISender pSender, HKEvent pEvent)
FBCallback.
Definition: fbcomponent.h:400
class FBPropertyBaseEnum< enum FBConnectionAction > FBPropertyConnectionAction
Definition: fbcomponent.h:489
K_FORWARD(KStringList)
FBPropertyConnectionType ConnectionType
Read Only Property: Connection's type.
Definition: fbcomponent.h:996
Deleted on File->New.
Definition: fbcomponent.h:446
#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
FBPropertyBool Selected
Read Write Property: Selected property.
Definition: fbcomponent.h:864
Connection notify event class.
Definition: fbcomponent.h:986
Allow editing on the namespace objects.
Definition: fbcomponent.h:463
Object can undo its actions and states, in a global Undo Stack.
Definition: fbcomponent.h:452
FBPropertyConnectionAction Action
Read Only Property: Connection's action performed.
Definition: fbcomponent.h:1016
void FBSetStoreableCustomTextureRegistered()
IKtView * HIKtView
Definition: fbcontrols.h:57
FBArrayTemplate< FBComponent * > & FBGetComponentArray()
Get the Root FBComponent.
int FBRegister_ClassId(const char *pClassName)
KGlobalNamedEvent * mLibrary_Release
Library Release.
Definition: fbcomponent.h:1127
Object can be "detached".
Definition: fbcomponent.h:451
Connection notify event class.
Definition: fbcomponent.h:1028
FBComponent FBObject
Equivalent to FBComponent for gradual transition.
Definition: fbcomponent.h:900
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...
Definition: fbcomponent.h:462
bool FBObject_Unregister(const char *pGroupName, const char *pEntryName, int nth=0)
Basic string class.
Definition: fbstring.h:66
List of scene objects.
Definition: fbcomponent.h:573
Library class for DLL registration.
Definition: fbcomponent.h:1090
const char * FBObject_GetEntryName(int pGroupIndex, int pIndex)
FBComponent * FBGetFBComponent(HIObject pObject, bool pAutoCreate=true)
Get the FBComponent from an Internal Object.
#define NULL
Definition: kaydara.h:169
FBPropertyManager PropertyList
Read Only Property: Manages all of the properties for the component.
Definition: fbcomponent.h:861
Object which has kFlagUndoableSeparately flag turned on will have a separate Undo Stack...
Definition: fbcomponent.h:453
#define ICallback_Declare(IsPure)
Forwarding.
Definition: icallback.h:42
void FBSetStoreableCustomModelRegistered()
#define K_IMPLEMENTATION
Definition: iobject.h:53
Object is in Merging operations.
Definition: fbcomponent.h:473
Property classes.
Visible in the Scene Navigator/Schematic View/Property View/Model View.
Definition: fbcomponent.h:449
void __FBAddModelToScene(HIObject pObject)
For internal usage only.
const int kFBFlagCustomObject
User custom class instances (Internal usage only, to be removed in the future).
Definition: fbcomponent.h:466
Object can Key his property.
Definition: fbcomponent.h:454
FBPropertyPlug DstPlug
Read Only Property: The destination plug involved in the action.
Definition: fbcomponent.h:998
bool FBGetStoreableCustomTextureRegistered()
#define IObject_Declare(IsPure)
Definition: iobject.h:75
Property class: const char * (String).
Use to add a namespace name to object.
Definition: fbcomponent.h:483
Base Event class.
Definition: fbcomponent.h:959
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:148
FBPropertyString LongName
Read Write Property: Name and namespace for object.
Definition: fbcomponent.h:866
Connections Basic Open Reality SDK Element.
Definition: fbplug.h:220
class FBPropertyBaseEnum< enum FBConnectionType > FBPropertyConnectionType
Definition: fbcomponent.h:488
Definition: Python-ast.h:24
MotionBuilder SDK base class.
Definition: fbcomponent.h:668
Object is in storing operations.
Definition: fbcomponent.h:471
void FBSetStoreableCustomMaterialRegistered()
FBPropertyPlug Plug
Read Only Property: The plug involved in the action.
Definition: fbcomponent.h:1017
FBPropertyInt SrcIndex
Read Only Property: Index of the source in the destination component.
Definition: fbcomponent.h:995
FBPropertyPlug Plug
Read Only Property: The plug involved in the action.
Definition: fbcomponent.h:1037
Can be visible.
Definition: fbcomponent.h:443
Connection notify event class.
Definition: fbcomponent.h:1008
class FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
FBObjectFlag
Available flags for any component.
Definition: fbcomponent.h:438
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...
Definition: fbcomponent.h:57
const char * FBObject_GetIconName(int pGroupIndex, int pIndex, int nth=0)
Object is allocated, so it must call 'delete this' on destroy.
Definition: fbcomponent.h:455
FBPropertyPlug NewPlug
Read Only Property: New plug created by the action.
Definition: fbcomponent.h:999
class FBPropertyBaseComponent< FBFolder * > FBPropertyFolder
Definition: fbcomponent.h:435
FBPropertyFolder Folder
Read Write Property: The folder that contain this component.
Definition: fbcomponent.h:869
Folder class.
Definition: fbfolder.h:78
const int kFBStatusOwnedByUndo
Definition: fbcomponent.h:478
Object is in destruction operations.
Definition: fbcomponent.h:474
Definition of the class FBPlug and related enums and utility functions.
PropertyList: Component.
Definition: fbcomponent.h:494
FBPropertyType
Property types.
Definition: fbproperties.h:79
Objects Containing class.
Definition: fbnamespace.h:79
FBPropertyListComponent Parents
List: Parents.
Definition: fbcomponent.h:863
HIRegister HISender
HISender.
Definition: fbcomponent.h:391
< used="" in="" fbx="" sdk="" native="" io,="" force="" bindary="" format="" for="" the="" bindary="" data.="" />
Definition: fbcomponent.h:461
FBComponent * FBFindObjectByFullName(const char *pObjectFullName)
FBFindObjectByFullName.
Definition: Python-ast.h:18
PropertyList: Concrete class for PropertyList of component
Definition: fbcomponent.h:553
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.
Definition: fbcomponent.h:862
Use to replace a define namespace.
Definition: fbcomponent.h:484
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
Property: Base property class.
Definition: fbproperties.h:192
virtual bool UseCustomPropertyViewSet() const
Use the custom property viewSet or not.
Definition: fbcomponent.h:814
Template class to contain an array of items.
Definition: fbarray.h:77
Created from System (not from user)
Definition: fbcomponent.h:445
T * FBCast(FBObject *pObject, bool pAutoCreate=false)
Cast the SDK object using it's IObject interface into the proper class.
Definition: fbcomponent.h:907
static int TypeInfo
Contains the Type information of the object.
Definition: fbcomponent.h:681
FBPropertyPlug SrcPlug
Read Only Property: The source plug involved in the action.
Definition: fbcomponent.h:997
const char * FBObject_GetGroupName(int pGroupIndex)
HIObject(* kObjectCreatorFnc)(HIObject pOwner, const char *pName, void *pData)
Definition: iobject.h:88
int FBObject_GetEntryCount(int pGroupIndex)
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
Object (model) can be "parented".
Definition: fbcomponent.h:450
int __FBRegisterTypeInfo(int pInternalClassId)
__FBRegisterTypeInfo For internal use only, Register the TypeInfo mapped to internal class id...
PropertyEvent: Base event class.
Definition: fbproperties.h:507
KEventBase * HKEventBase
Definition: fbcomponent.h:75
bool FBGetStoreableCustomModelRegistered()
FBArrayTemplate< FBComponent * > FBComponentList
typedef FBArrayTemplate FBComponentList;
Definition: fbcomponent.h:298
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.
Definition: fbcomponent.h:1145
#define K_DEPRECATED_2014
Definition: kaydara.h:412
FBNamespaceAction
Namespace flags.
Definition: fbcomponent.h:481
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:62
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.
Definition: fbcomponent.h:994
Used in FBX SDK native IO.
Definition: fbcomponent.h:459
FBPropertyInt Type
Read Only Property: Type of event.
Definition: fbcomponent.h:969
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.
Definition: fbcomponent.h:865
FBObjectStatus
Available lifetime status for any component.
Definition: fbcomponent.h:469
virtual FBPropertyType GetPropertyType()
Get the property's type.
Definition: fbcomponent.h:549
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.
Definition: fbcomponent.h:381
class FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
Custom manager class for user controlled observer objects.
Definition: fbcomponent.h:1303
FBPropertyConnectionAction Action
Read Only Property: Connection's action performed.
Definition: fbcomponent.h:1036
Object created/used by the Story tool.
Definition: fbcomponent.h:456
FBComponentList * FBCreateComponentList()
Create a FBObjectList object.
bool FBObject_GetMultiplicity(int pGroupIndex, int pIndex, int nth=0)
String class.
void FBDestroyComponentList(FBComponentList *pObjectList)
Delete a FBObjectList object.
FBConnectionAction
Possible actions when a notify plug event occurs.
Definition: fbplug.h:78
Object is in creation operations.
Definition: fbcomponent.h:470
Object is in retrieving operations.
Definition: fbcomponent.h:472
IRegister * HIRegister
Definition: fbcomponent.h:71