Open Reality Reference Guide
fbplug.h File Reference

Definition of the class FBPlug and related enums and utility functions. More...

#include <kaydaradef.h>
#include <object/i/icallback.h>
#include <fbsdk/fbdefines.h>
#include <fbsdk/fbscriptwrapper.h>
#include <fbsdk/fbarray.h>

Go to the source code of this file.

Classes

class  FBPlug
 Connections Basic Open Reality SDK Element. More...
 
class  HdlFBPlug
 Handler of FBPlug object Use this handler object to gracefully take care of dangling pointer problem. More...
 
class  HdlFBPlugTemplate< T >
 

Macros

#define FBSDK_DLL   K_DLLIMPORT
 Be sure that FBSDK_DLL is defined only once... More...
 
#define __FBClassImplementation(ThisComponent, pInternalClassId)
 For internal use only. More...
 
#define __FBClassImplementationGroup(ThisComponent, pInternalClass)
 

Typedefs

typedef FBArrayTemplate< FBPlug * > FBPlugList
 typedef FBArrayTemplate<FBPlug*> FBPlugList; More...
 

Enumerations

enum  FBConnectionAction {
  kFBRequestConnectSrc = 0,
  kFBRequestConnectDst,
  kFBConnectSrc,
  kFBConnectDst,
  kFBConnectedSrc,
  kFBConnectedDst,
  kFBRequestDisconnectSrc,
  kFBRequestDisconnectDst,
  kFBDisconnectSrc,
  kFBDisconnectDst,
  kFBDisconnectedSrc,
  kFBDisconnectedDst,
  kFBBeginReplaceSrc,
  kFBEndReplaceSrc,
  kFBBeginReplaceDst,
  kFBEndReplaceDst,
  kFBReorderSrc,
  kFBReorderedSrc,
  kFBBeginChange,
  kFBEndChange,
  kFBConnectedOwner,
  kFBDisconnectOwner,
  kFBCandidate,
  kFBCandidated,
  kFBCandidateGlobal,
  kFBDetached,
  kFBDestroy,
  kFBSelect,
  kFBUnselect,
  kFBReselect,
  kFBRequestRename,
  kFBRename,
  kFBRenamed,
  kFBRequestPrefixRename,
  kFBPrefixRename,
  kFBPrefixRenamed,
  kFBDescription,
  kFBKeyingKey,
  kFBKeyingDeleteKey,
  kFBKeyingCandidate,
  kFBKeyingCurveChange,
  kFBKeyingCurveEndChange,
  kFBConnect = kFBConnectSrc,
  kFBConnected = kFBConnectedSrc,
  kFBDisconnect = kFBDisconnectSrc,
  kFBDisconnected = kFBDisconnectedSrc
}
 Possible actions when a notify plug event occurs. More...
 
enum  FBConnectionType {
  kFBConnectionTypeNone,
  kFBConnectionTypeSystem
}
 Connection types available between plugs. More...
 
enum  FBPlugModificationFlag {
  kFBPlugAllContent = 0,
  kFBSelfDataModified = 1 << 8,
  kFBContentDataModified = 1 << 9,
  kFBAllDataModified = kFBSelfDataModified | kFBContentDataModified,
  kFBSelfKeyingModified = 1 << 10,
  kFBContentKeyingModified = 1 << 11,
  kFBAllKeyingModified = kFBSelfKeyingModified | kFBContentKeyingModified,
  kFBSelfStateModified = 1 << 12,
  kFBContentStateModified = 1 << 13,
  kFBAllStateModified = kFBSelfStateModified | kFBContentStateModified,
  kFBSelfConnectionSrcObjectModified = 1 << 14,
  kFBSelfConnectionSrcPropertyModified = 1 << 15,
  kFBSelfConnectionDstObjectModified = 1 << 16,
  kFBSelfConnectionDstPropertyModified = 1 << 17,
  kFBSelfConnectionModifiedMask = kFBSelfConnectionSrcObjectModified | kFBSelfConnectionSrcPropertyModified | kFBSelfConnectionDstObjectModified | kFBSelfConnectionDstPropertyModified,
  kFBContentConnectionModified = 1 << 18,
  kFBAllConnectionModified = kFBSelfConnectionModifiedMask | kFBContentConnectionModified,
  kFBSelfCustomPropertyModified = 1 << 19,
  kFBContentCustomPropertyModified = 1 << 20,
  kFBAllCustomPropertyModified = kFBSelfCustomPropertyModified | kFBContentCustomPropertyModified,
  kFBSelfAllModifiedMask = kFBSelfDataModified | kFBSelfKeyingModified | kFBSelfStateModified | kFBSelfCustomPropertyModified | kFBSelfConnectionModifiedMask,
  kFBContentAllModifiedMask = kFBContentDataModified | kFBContentKeyingModified | kFBContentStateModified | kFBContentCustomPropertyModified | kFBContentConnectionModified,
  kFBAllModifiedMask = kFBSelfAllModifiedMask | kFBContentAllModifiedMask
}
 
enum  FBPlugStatusFlag {
  kFBPlugStatusFlagNone = 0,
  kFBOwnedByUndo = 1<<21,
  kFBPlugStatusFlagMask = kFBOwnedByUndo
}
 

Functions

 FB_FORWARD (FBPlug)
 
K_DLLIMPORT const char * FBGetConnectionActionString (FBConnectionAction pAction)
 
K_DLLIMPORT FBPlugListFBCreatePlugList ()
 Create a FBPlugList object. More...
 
K_DLLIMPORT void FBDestroyPlugList (FBPlugList *pPlugList)
 Delete a FBPlugList object. More...
 
K_DLLIMPORT const char * FBGetConnectionTypeString (FBConnectionType pType)
 
K_DLLIMPORT bool FBConnect (FBPlug *pSrc, FBPlug *pDst, FBConnectionType pConnectionType=kFBConnectionTypeNone)
 Request the connection two FBPlug objects. More...
 
K_DLLIMPORT bool FBDisconnect (FBPlug *pSrc, FBPlug *pDst)
 Connect two FBPlug objects. More...
 
K_DLLIMPORT FBPlugFBGetFBPlug (HIObject pObject, bool pAutoCreate=true)
 Get the FBPlug from an Internal Object. More...
 
K_DLLIMPORT HIObject FBGetFBObject (HIObject pObject, bool pAutoCreate=false)
 Get the SDK object from an Internal Object. More...
 
template<class T >
T * FBCast (HIObject pObject, bool pAutoCreate=false)
 Cast the SDK object using it's IObject interface into the proper class. More...
 

Detailed Description

Definition of the class FBPlug and related enums and utility functions.

All the Open Reality objects that expose application objects will inherit from FBPlug.

Definition in file fbplug.h.

Macro Definition Documentation

◆ __FBClassImplementation

#define __FBClassImplementation (   ThisComponent,
  pInternalClassId 
)
Value:
int ThisComponent::TypeInfo=__FBRegisterTypeInfo(pInternalClassId);\
int ThisComponent::GetInternalClassId() { return pInternalClassId; }

For internal use only.

Definition at line 67 of file fbplug.h.

◆ __FBClassImplementationGroup

#define __FBClassImplementationGroup (   ThisComponent,
  pInternalClass 
)
Value:
__FBClassImplementation( ThisComponent,pInternalClass::ClassId )\
const char* ThisComponent::ClassGroupName = pInternalClass::ClassGroupName;

Definition at line 71 of file fbplug.h.

◆ FBSDK_DLL

#define FBSDK_DLL   K_DLLIMPORT

Be sure that FBSDK_DLL is defined only once...

Definition at line 51 of file fbplug.h.

Typedef Documentation

◆ FBPlugList

typedef FBArrayTemplate<FBPlug*> FBPlugList;

Definition at line 193 of file fbplug.h.

Enumeration Type Documentation

◆ FBConnectionAction

Possible actions when a notify plug event occurs.

Enumerator
kFBRequestConnectSrc 

Request connection of source to destination.

kFBRequestConnectDst 

Request connection of destination to source.

kFBConnectSrc 

Connect source to destination.

kFBConnectDst 

Connect destination to source.

kFBConnectedSrc 

Connected source to destination.

kFBConnectedDst 

Connected destination to source.

kFBRequestDisconnectSrc 

Request disconnection of source to destination.

kFBRequestDisconnectDst 

Request disconnection of destination to source.

kFBDisconnectSrc 

Disconnect source from destination.

kFBDisconnectDst 

Disconnect destination from source.

kFBDisconnectedSrc 

Disconnected source from destination.

kFBDisconnectedDst 

Disconnected destination from source.

kFBBeginReplaceSrc 

Begin replace source during merge.

kFBEndReplaceSrc 

End replace source during merge.

kFBBeginReplaceDst 

Begin replace destination during merge.

kFBEndReplaceDst 

End replace destination during merge.

kFBReorderSrc 

Reorder of source.

kFBReorderedSrc 

Source has been reordered.

kFBBeginChange 

Begin change on destination.

kFBEndChange 

End change on destination.

kFBConnectedOwner 

Connected owner to destination.

kFBDisconnectOwner 

Disconnect owner from destination.

kFBCandidate 

Data candidate event, before the data is set.

kFBCandidated 

Data candidate event, after the data is set.

kFBCandidateGlobal 

Data candidate event, global candidate.

kFBDetached 

Component detached from scene.

kFBDestroy 

Component destroy.

kFBSelect 

Component selection.

kFBUnselect 

Component de-selection.

kFBReselect 

Component re-selection.

kFBRequestRename 

Component request rename.

kFBRename 

Component is going to be renamed.

kFBRenamed 

Component has been renamed.

kFBRequestPrefixRename 

Compoent request Prefix Rename.

kFBPrefixRename 

Component prefix is going to be renamed.

kFBPrefixRenamed 

Component prefix has been renamed.

kFBDescription 

Component description event.

kFBKeyingKey 

Component keying add event.

kFBKeyingDeleteKey 

Component keying delete event.

kFBKeyingCandidate 

Component keying candidate event.

kFBKeyingCurveChange 

Component curve has changed.

kFBKeyingCurveEndChange 

Component curve changes in Dopesheet completed.

Definition at line 78 of file fbplug.h.

◆ FBConnectionType

Connection types available between plugs.

Enumerator
kFBConnectionTypeNone 

Default connection type.

kFBConnectionTypeSystem 

System connection type.

Definition at line 147 of file fbplug.h.

◆ FBPlugModificationFlag

Enumerator
kFBPlugAllContent 

None Modified.

kFBSelfDataModified 

Object/Property itself has been dirty, in case of property get dirty, its owner object will be set dirty as well.

kFBContentDataModified 

Owner object/Namespace has data dirty property/objects.

kFBSelfKeyingModified 

Object/Property itself has been dirty, in case of property get dirty, its owner object will be set dirty as well.

kFBContentKeyingModified 

Owner object/Namespace has data dirty property/objects.

kFBSelfStateModified 

Object/Property naming change.

kFBContentStateModified 

Owner object/Namespace has state dirty property/objects.

kFBSelfConnectionSrcObjectModified 

The src object of this plug has been modified.

kFBSelfConnectionSrcPropertyModified 

The src property of this plug has been modified.

kFBSelfConnectionDstObjectModified 

The dst object of this plug has been modified.

kFBSelfConnectionDstPropertyModified 

The dst property of this plug has been modified.

kFBContentConnectionModified 

Owner object/namespace has connection modified property/objects.

kFBSelfCustomPropertyModified 

Object custom property change.

kFBContentCustomPropertyModified 

Owner object/Namespace has dirty property/objects.

Definition at line 153 of file fbplug.h.

◆ FBPlugStatusFlag

Enumerator
kFBPlugStatusFlagNone 

Plug has no status set.

kFBOwnedByUndo 

Plug is owned by undo framework.

Definition at line 185 of file fbplug.h.

Function Documentation

◆ FBCast()

T* FBCast ( HIObject  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 569 of file fbplug.h.

References FBGetFBObject().

◆ FBConnect()

K_DLLIMPORT bool FBConnect ( FBPlug pSrc,
FBPlug pDst,
FBConnectionType  pConnectionType = kFBConnectionTypeNone 
)

Request the connection two FBPlug objects.

Parameters
pSrcSource plug.
pDstDestination plug.
pConnectionTypeType of connection, taken from FBConnectionType.
Returns
A boolean indicating success (True) or failure (False).
Remarks
This global function is used primarily to connect connectors in a FBConstraintRelation.

◆ FBCreatePlugList()

K_DLLIMPORT FBPlugList* FBCreatePlugList ( )

Create a FBPlugList 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.

◆ FBDestroyPlugList()

K_DLLIMPORT void FBDestroyPlugList ( FBPlugList pPlugList)

Delete a FBPlugList object.

Parameters
pPlugListpointer to the object created with a call to FBCreatePlugList().

◆ FBDisconnect()

K_DLLIMPORT bool FBDisconnect ( FBPlug pSrc,
FBPlug pDst 
)

Connect two FBPlug objects.

Parameters
pSrcSource plug.
pDstDestination plug.
Returns
A boolean indicating success (True) or failure (False).
Remarks
This global function is used primarily to disconnect connectors in a FBConstraintRelation.

◆ FBGetFBObject()

K_DLLIMPORT HIObject FBGetFBObject ( HIObject  pObject,
bool  pAutoCreate = false 
)

Get the SDK object from an Internal Object.

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

Referenced by FBCast(), and FBFindObjectsByName().

◆ FBGetFBPlug()

K_DLLIMPORT FBPlug* FBGetFBPlug ( HIObject  pObject,
bool  pAutoCreate = true 
)

Get the FBPlug 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.
__FBRegisterTypeInfo
K_DLLIMPORT int __FBRegisterTypeInfo(int pInternalClassId)
__FBRegisterTypeInfo For internal use only, Register the TypeInfo mapped to internal class id.
__FBClassImplementation
#define __FBClassImplementation(ThisComponent, pInternalClassId)
For internal use only.
Definition: fbplug.h:67