Public Member Functions | Protected Attributes

FBProperty Class Reference

This reference page is linked to from the following overview topics: MotionBuilder 2014, Object Model, FBComponent - The Base Entity Class, FBProperty - Object Properties, FBPlug - Object Connection Management, FBCamera - Cameras, FBCharacter - Characters, Overview of the Architecture.


Search for all occurrences

Detailed Description

Property: Base property class.

A property is a holder for function callbacks into the internals of the application.

You cannot instantiate FBProperty objects. To reference a property:

To see how to create a custom property in Python, see CustomProperty.py.

Definition at line 192 of file fbproperties.h.

#include <fbproperties.h>

Inheritance diagram for FBProperty:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 FBProperty ()
 Constructor.
 IObject_Declare (K_IMPLEMENTATION)
 IObject_Declare Interface to IObject.
FBPropertyInitInternal (KProperty *pProperty)
 Initialize internal pointer.
KProperty * GetInternal () const
 Get property.
void * GetValuePtr () const
 Get property value.
FBPropertyCreateInternal (FBComponent *pParent, const char *pName, fbExternalGetSetHandler pGet=NULL, fbExternalGetSetHandler pSet=NULL)
 Creation of internal property.
FBPropertyCreateTextureConnectable (FBComponent *pParent, const char *pName)
 Creation of user texture connect property.
void SetInternal (KProperty *pInternal)
 Set internal property.
void SetEnable (bool pValue)
 Set property enable status.
const char * GetName ()
 Get the property's name.
void SetName (const char *pName)
 Set the property's name.
virtual FBPropertyType GetPropertyType ()
 Get the property's type.
const char * GetPropertyTypeName ()
 Get the property's type name.
virtual KDataType * GetDataType ()
 Get the property datatype pointer.
int AsInt ()
 Get the property as an integer.
bool SetInt (int pInt)
 Set the property from an integer.
virtual const char * AsString (FBDataAsStringFlag pFlag=kFBDataAsStringUI)
 Get the property value as a string.
virtual bool SetString (const char *pString)
 Set the property value from a string.
const char * OriValueAsString ()
 Get the property original value (before any modification) as string.
bool IsAnimated () const
 Get the property animated flag status.
bool OriIsAnimated () const
 Get the property original animated flag status (before any modification)
bool IsMinClamp ()
 Indicate if minimum value clamping will be applied on user input value.
bool IsMaxClamp ()
 Indicate if maximum value clamping will be applied on user input value.
bool IsTemporaryProperty ()
 Indicate if a property was created on retrieve because it didn't exist.
bool AcceptTemporaryProperty (const char *pEnumList[]=NULL, fbExternalGetSetHandler pGet=NULL, fbExternalGetSetHandler pSet=NULL)
 Accept a temporary property as a dynamic property.
bool IsObjectList ()
 Indicate if is an instance of FBPropertyListObject.
virtual bool IsReadOnly ()
 Is property read-only?
virtual const char * EnumList (int pIndex)
 Return the string of an enum value.
FBStringListGetEnumStringList (bool pCreateIt=false)
 String list for enum properties.
void NotifyEnumStringListChanged ()
 Notify system that the enum list was modified.
void ModifyPropertyFlag (FBPropertyFlag pFlag, bool pValue)
 ModifyPropertyFlag.
FBPropertyFlag GetPropertyFlags ()
 GetPropertyFlags.
bool GetPropertyFlag (FBPropertyFlag pFlag)
 GetPropertyFlag.
void SetMinMax (double pMin, double pMax, bool pForceMinClamp=false, bool pForceMaxClamp=false)
 SetMinMax.
void SetMin (double pMin, bool pForceMinClamp=false)
 SetMin.
void SetMax (double pMax, bool pForceMaxClamp=false)
 SetMax.
double GetMin ()
 GetMin.
double GetMax ()
 GetMax.
void * GetParent ()
 Get the parent of the object.
virtual void SetData (void *pData)
 Set the value of the property, passing the type as an argument.
virtual void GetData (void *pData, int pSize, FBEvaluateInfo *pEvalInfo=NULL) const
 Get the value of a property.
virtual bool IsList ()
 Verify if property is of this type.
virtual bool IsAnimatable ()
bool IsInternal () const
bool IsUserProperty ()
bool IsTextureConnectableProperty ()
bool IsReferenceProperty ()
Interface for property locking mechanism.

Locking a property or any number of its channel(s) prevents the user from modifying animation on this property.

This means that the user can�t add, remove or edit any key on any layer of a locked property/channel. It also means that the user can�t change the current value of the property. However, a locked property allows existing animation to flow through. This means that the value of a locked property can change through time as its being driven by existing animation and/or constraints.

int GetSubMemberCount () const
 GetSubMemberCount.
bool AllowsLocking () const
 AllowsLocking.
bool HasSomethingLocked () const
 HasSomethingLocked.
bool IsLocked () const
 IsLocked.
bool IsMemberLocked (int pIndex) const
 IsMemberLocked.
void SetLocked (bool pLocked)
 SetLocked.
void SetMemberLocked (int pIndex, bool pLocked)
 SetMemberLocked.

Protected Attributes

FBString mName
 mName Property unique name.
void * mParent
 mParent Parent of the property.

Constructor & Destructor Documentation

Constructor.


Member Function Documentation

IObject_Declare ( K_IMPLEMENTATION  )

IObject_Declare Interface to IObject.

Reimplemented from FBPlug.

FBProperty* InitInternal ( KProperty *  pProperty)

Initialize internal pointer.

KProperty* GetInternal ( ) const
void* GetValuePtr ( ) const

Get property value.

FBProperty* CreateInternal ( FBComponent pParent,
const char *  pName,
fbExternalGetSetHandler  pGet = NULL,
fbExternalGetSetHandler  pSet = NULL 
)

Creation of internal property.

FBProperty* CreateTextureConnectable ( FBComponent pParent,
const char *  pName 
)

Creation of user texture connect property.

void SetInternal ( KProperty *  pInternal)

Set internal property.

void SetEnable ( bool  pValue)

Set property enable status.

const char* GetName ( )

Get the property's name.

Returns:
The property's name.
void SetName ( const char *  pName)

Set the property's name.

Parameters:
pNameNew name for the property.
virtual FBPropertyType GetPropertyType ( ) [virtual]
const char* GetPropertyTypeName ( )

Get the property's type name.

Returns:
The property's type name.
virtual KDataType* GetDataType ( ) [virtual]

Get the property datatype pointer.

Returns:
Datatype of property (NULL in the case of the FBProperty is not internal).

Reimplemented in FBPropertyAnimatable.

virtual void SetData ( void *  pData) [virtual]
virtual void GetData ( void *  pData,
int  pSize,
FBEvaluateInfo pEvalInfo = NULL 
) const [virtual]
int AsInt ( )

Get the property as an integer.

Returns:
The integer version of the property.
bool SetInt ( int  pInt)

Set the property from an integer.

Parameters:
pIntInt to set property from.
Returns:
True if it was possible.
virtual const char* AsString ( FBDataAsStringFlag  pFlag = kFBDataAsStringUI) [virtual]

Get the property value as a string.

Parameters:
pFlagIndicates the returned string to be used for UI or storage. It defaults to kFBDataAsStringUI.
Returns:
The string version of the property.

Reimplemented in FBPropertyBaseEnum< tType >, FBPropertyStringList, FBPropertyBaseAnimatableEnum< tType >, FBPropertyBaseEnum< EPathEndCapStyle >, FBPropertyBaseEnum< ELengthUnitType >, and FBPropertyBaseEnum< EAreaLightShapes >.

virtual bool SetString ( const char *  pString) [virtual]

Set the property value from a string.

Parameters:
pStringString to set property value from, with format same as AsString(kFBDataAsStringPersistence)
Returns:
True if it was possible.

Reimplemented in FBPropertyBaseEnum< tType >, FBPropertyStringList, FBPropertyBaseAnimatableEnum< tType >, FBPropertyBaseEnum< EPathEndCapStyle >, FBPropertyBaseEnum< ELengthUnitType >, and FBPropertyBaseEnum< EAreaLightShapes >.

const char* OriValueAsString ( )

Get the property original value (before any modification) as string.

Returns:
returns the original value of the property in string with format same as AsString(kDataAsStringPersistence)
bool IsAnimated ( ) const

Get the property animated flag status.

bool OriIsAnimated ( ) const

Get the property original animated flag status (before any modification)

virtual bool IsList ( ) [virtual]

Verify if property is of this type.

Returns:
true if property is of type.

Reimplemented in FBPropertyBasicList, and FBPropertyStringList.

virtual bool IsAnimatable ( ) [virtual]
bool IsInternal ( ) const
bool IsUserProperty ( )
bool IsTextureConnectableProperty ( )
bool IsReferenceProperty ( )
bool IsMinClamp ( )

Indicate if minimum value clamping will be applied on user input value.

Returns:
true if property the value will be clamped to a minimum value.
bool IsMaxClamp ( )

Indicate if maximum value clamping will be applied on user input value.

Returns:
true if property the value will be clamped to a maximum value.
bool IsTemporaryProperty ( )

Indicate if a property was created on retrieve because it didn't exist.

Warning:
if there is no call to AcceptTemporaryProperty(), is will be converted to a user property after the file is retrieved.
Returns:
true if property is temporary.
bool AcceptTemporaryProperty ( const char *  pEnumList[] = NULL,
fbExternalGetSetHandler  pGet = NULL,
fbExternalGetSetHandler  pSet = NULL 
)

Accept a temporary property as a dynamic property.

Warning:
if there is no call to AcceptTemporaryProperty(), is will be converted to a user property after the file is retrieved.
Returns:
true if property was temporary and converted to a user property.
bool IsObjectList ( )

Indicate if is an instance of FBPropertyListObject.

Warning:
A FBPropertyListObject will also return true on a call to 'IsList()'.
virtual bool IsReadOnly ( ) [virtual]
virtual const char* EnumList ( int  pIndex) [virtual]

Return the string of an enum value.

Parameters:
pIndexEnum value to get string for.
Returns:
String value of enum specified by pIndex.

Reimplemented in FBPropertyBaseEnum< tType >, FBPropertyBaseAnimatableEnum< tType >, FBPropertyBaseEnum< EPathEndCapStyle >, FBPropertyBaseEnum< ELengthUnitType >, and FBPropertyBaseEnum< EAreaLightShapes >.

FBStringList* GetEnumStringList ( bool  pCreateIt = false)

String list for enum properties.

Parameters:
pCreateItCreate a new list if necessary.
Returns:
the pointer to the string list..
void NotifyEnumStringListChanged ( )

Notify system that the enum list was modified.

void ModifyPropertyFlag ( FBPropertyFlag  pFlag,
bool  pValue 
)

ModifyPropertyFlag.

Parameters:
pFlagThe flag to switch to True or False.
pValueThe value to set about this flag.
Warning:
Flags are not saved into or read from a FBX file.
FBPropertyFlag GetPropertyFlags ( )

GetPropertyFlags.

Returns:
Return all flags at once.
bool GetPropertyFlag ( FBPropertyFlag  pFlag)

GetPropertyFlag.

Parameters:
pFlagFlag to test if it is True or False.
Returns:
If the flag is True, the function returns True and vice-versa.
Warning:
Flags are not saved into or read from a FBX file.
void SetMinMax ( double  pMin,
double  pMax,
bool  pForceMinClamp = false,
bool  pForceMaxClamp = false 
)

SetMinMax.

Parameters:
pMinMinimum value of the property.
pMaxMaximum value of the property.
pForceMinClampForce clamping to minimum value of the property.
pForceMaxClampForce clamping to maximum value of the property.
void SetMin ( double  pMin,
bool  pForceMinClamp = false 
)

SetMin.

Parameters:
pMinMinimum value of the property.
pForceMinClampForce clamping to minimum value of the property.
void SetMax ( double  pMax,
bool  pForceMaxClamp = false 
)

SetMax.

Parameters:
pMaxMaximum value of the property.
pForceMaxClampForce clamping to maximum value of the property.
double GetMin ( )

GetMin.

Returns:
Minimum value for the property.
double GetMax ( )

GetMax.

Returns:
Maximum value for the property.
void* GetParent ( ) [inline]

Get the parent of the object.

Returns:
Parent object.

Definition at line 420 of file fbproperties.h.

{ return mParent; } 
int GetSubMemberCount ( ) const

GetSubMemberCount.

Returns:
Number of sub-members.
bool AllowsLocking ( ) const

AllowsLocking.

Returns:
true if property can be locked
bool HasSomethingLocked ( ) const

HasSomethingLocked.

Returns:
true if property or any of its members is locked
bool IsLocked ( ) const

IsLocked.

Returns:
true if property is locked
bool IsMemberLocked ( int  pIndex) const

IsMemberLocked.

Parameters:
pIndexIndex of the sub-member of the property to check.
Returns:
true if property sub-member is locked
void SetLocked ( bool  pLocked)

SetLocked.

Parameters:
pLockedTrue if the property is to be locked, false if it is to be unlocked.
void SetMemberLocked ( int  pIndex,
bool  pLocked 
)

SetMemberLocked.

Parameters:
pIndexIndex of the sub-member of the property to lock or unlock.
pLockedTrue if the sub-member is to be locked, false if it is to be unlocked.

Member Data Documentation

FBString mName [protected]

mName Property unique name.

Definition at line 198 of file fbproperties.h.

void* mParent [protected]

mParent Parent of the property.

Definition at line 200 of file fbproperties.h.


The documentation for this class was generated from the following file:

FBProperty FBProperty FBProperty FBProperty FBProperty FBProperty FBProperty FBProperty FBProperty FBProperty
FBProperty FBProperty FBProperty FBProperty FBProperty FBProperty FBProperty FBProperty FBProperty FBProperty