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.
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:
myProp = myObject.PropertyList.Find( 'Visibility' ) if myProp: myProp.Data = True
To see how to create a custom property in Python, see CustomProperty.py.
Definition at line 192 of file fbproperties.h.
#include <fbproperties.h>
Public Member Functions | |
FBProperty () | |
Constructor. | |
IObject_Declare (K_IMPLEMENTATION) | |
IObject_Declare Interface to IObject. | |
FBProperty * | InitInternal (KProperty *pProperty) |
Initialize internal pointer. | |
KProperty * | GetInternal () const |
Get property. | |
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. | |
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. | |
FBStringList * | GetEnumStringList (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. |
FBProperty | ( | ) |
Constructor.
IObject_Declare | ( | K_IMPLEMENTATION | ) |
FBProperty* InitInternal | ( | KProperty * | pProperty | ) |
Initialize internal pointer.
KProperty* GetInternal | ( | ) | const |
Get property.
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 | ( | ) |
void SetName | ( | const char * | pName | ) |
virtual FBPropertyType GetPropertyType | ( | ) | [virtual] |
Get the property's type.
Reimplemented in FBPropertyListComponentBase, FBPropertyEvent, FBPropertyBase< tType, pPT >, FBPropertyStringList, FBPropertyBaseAnimatable< tType, pPT >, FBPropertyBase< ELengthUnitType, kFBPT_enum >, FBPropertyBase< FBTimeSpan, kFBPT_TimeSpan >, FBPropertyBase< FBProperty *, kFBPT_Reference >, FBPropertyBase< FBColor, kFBPT_ColorRGB >, FBPropertyBase< FBColorAndAlpha, kFBPT_ColorRGBA >, FBPropertyBase< double, kFBPT_double >, FBPropertyBase< tType, kFBPT_object >, FBPropertyBase< int, kFBPT_int >, FBPropertyBase< bool, kFBPT_bool >, FBPropertyBase< tType, kFBPT_enum >, FBPropertyBase< bool, kFBPT_Action >, FBPropertyBase< FBVector2d, kFBPT_Vector2D >, FBPropertyBase< FBVector3d, kFBPT_Vector3D >, FBPropertyBase< FBTime, kFBPT_Time >, FBPropertyBase< const char *, kFBPT_charptr >, FBPropertyBase< EPathEndCapStyle, kFBPT_enum >, FBPropertyBase< EAreaLightShapes, kFBPT_enum >, FBPropertyBase< kReference, kFBPT_kReference >, FBPropertyBase< FBPlug *, kFBPT_object >, FBPropertyBase< FBComponent *, kFBPT_object >, FBPropertyBase< float, kFBPT_float >, FBPropertyBaseAnimatable< FBColor, kFBPT_ColorRGB >, FBPropertyBaseAnimatable< int, kFBPT_enum >, FBPropertyBaseAnimatable< double, kFBPT_double >, FBPropertyBaseAnimatable< FBColorAndAlpha, kFBPT_ColorRGBA >, FBPropertyBaseAnimatable< bool, kFBPT_bool >, and FBPropertyBaseAnimatable< FBVector3d, kFBPT_Vector3D >.
const char* GetPropertyTypeName | ( | ) |
virtual KDataType* GetDataType | ( | ) | [virtual] |
Get the property datatype pointer.
Reimplemented in FBPropertyAnimatable.
virtual void SetData | ( | void * | pData | ) | [virtual] |
Set the value of the property, passing the type as an argument.
pData | Value to affect property with. |
Reimplemented in FBPropertyBase< tType, pPT >, FBPropertyAnimatable, FBPropertyBase< ELengthUnitType, kFBPT_enum >, FBPropertyBase< FBTimeSpan, kFBPT_TimeSpan >, FBPropertyBase< FBProperty *, kFBPT_Reference >, FBPropertyBase< FBColor, kFBPT_ColorRGB >, FBPropertyBase< FBColorAndAlpha, kFBPT_ColorRGBA >, FBPropertyBase< double, kFBPT_double >, FBPropertyBase< tType, kFBPT_object >, FBPropertyBase< int, kFBPT_int >, FBPropertyBase< bool, kFBPT_bool >, FBPropertyBase< tType, kFBPT_enum >, FBPropertyBase< bool, kFBPT_Action >, FBPropertyBase< FBVector2d, kFBPT_Vector2D >, FBPropertyBase< FBVector3d, kFBPT_Vector3D >, FBPropertyBase< FBTime, kFBPT_Time >, FBPropertyBase< const char *, kFBPT_charptr >, FBPropertyBase< EPathEndCapStyle, kFBPT_enum >, FBPropertyBase< EAreaLightShapes, kFBPT_enum >, FBPropertyBase< kReference, kFBPT_kReference >, FBPropertyBase< FBPlug *, kFBPT_object >, FBPropertyBase< FBComponent *, kFBPT_object >, and FBPropertyBase< float, kFBPT_float >.
virtual void GetData | ( | void * | pData, |
int | pSize, | ||
FBEvaluateInfo * | pEvalInfo = NULL |
||
) | const [virtual] |
Get the value of a property.
pData | Value to fill with property's current value. |
pSize | Size of pData buffer |
pEvalInfo | Used only with animated properties |
Reimplemented in FBPropertyBase< tType, pPT >, FBPropertyAnimatable, FBPropertyBase< ELengthUnitType, kFBPT_enum >, FBPropertyBase< FBTimeSpan, kFBPT_TimeSpan >, FBPropertyBase< FBProperty *, kFBPT_Reference >, FBPropertyBase< FBColor, kFBPT_ColorRGB >, FBPropertyBase< FBColorAndAlpha, kFBPT_ColorRGBA >, FBPropertyBase< double, kFBPT_double >, FBPropertyBase< tType, kFBPT_object >, FBPropertyBase< int, kFBPT_int >, FBPropertyBase< bool, kFBPT_bool >, FBPropertyBase< tType, kFBPT_enum >, FBPropertyBase< bool, kFBPT_Action >, FBPropertyBase< FBVector2d, kFBPT_Vector2D >, FBPropertyBase< FBVector3d, kFBPT_Vector3D >, FBPropertyBase< FBTime, kFBPT_Time >, FBPropertyBase< const char *, kFBPT_charptr >, FBPropertyBase< EPathEndCapStyle, kFBPT_enum >, FBPropertyBase< EAreaLightShapes, kFBPT_enum >, FBPropertyBase< kReference, kFBPT_kReference >, FBPropertyBase< FBPlug *, kFBPT_object >, FBPropertyBase< FBComponent *, kFBPT_object >, and FBPropertyBase< float, kFBPT_float >.
int AsInt | ( | ) |
Get the property as an integer.
bool SetInt | ( | int | pInt | ) |
Set the property from an integer.
pInt | Int to set property from. |
virtual const char* AsString | ( | FBDataAsStringFlag | pFlag = kFBDataAsStringUI | ) | [virtual] |
Get the property value as a string.
pFlag | Indicates the returned string to be used for UI or storage. It defaults to kFBDataAsStringUI. |
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.
pString | String to set property value from, with format same as AsString(kFBDataAsStringPersistence) |
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.
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.
Reimplemented in FBPropertyBasicList, and FBPropertyStringList.
virtual bool IsAnimatable | ( | ) | [virtual] |
Reimplemented in FBPropertyAnimatable.
bool IsInternal | ( | ) | const |
bool IsUserProperty | ( | ) |
bool IsTextureConnectableProperty | ( | ) |
bool IsReferenceProperty | ( | ) |
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 | ( | ) | [virtual] |
Is property read-only?
Reimplemented in FBPropertyBase< tType, pPT >, FBPropertyBase< ELengthUnitType, kFBPT_enum >, FBPropertyBase< FBTimeSpan, kFBPT_TimeSpan >, FBPropertyBase< FBProperty *, kFBPT_Reference >, FBPropertyBase< FBColor, kFBPT_ColorRGB >, FBPropertyBase< FBColorAndAlpha, kFBPT_ColorRGBA >, FBPropertyBase< double, kFBPT_double >, FBPropertyBase< tType, kFBPT_object >, FBPropertyBase< int, kFBPT_int >, FBPropertyBase< bool, kFBPT_bool >, FBPropertyBase< tType, kFBPT_enum >, FBPropertyBase< bool, kFBPT_Action >, FBPropertyBase< FBVector2d, kFBPT_Vector2D >, FBPropertyBase< FBVector3d, kFBPT_Vector3D >, FBPropertyBase< FBTime, kFBPT_Time >, FBPropertyBase< const char *, kFBPT_charptr >, FBPropertyBase< EPathEndCapStyle, kFBPT_enum >, FBPropertyBase< EAreaLightShapes, kFBPT_enum >, FBPropertyBase< kReference, kFBPT_kReference >, FBPropertyBase< FBPlug *, kFBPT_object >, FBPropertyBase< FBComponent *, kFBPT_object >, and FBPropertyBase< float, kFBPT_float >.
virtual const char* EnumList | ( | int | pIndex | ) | [virtual] |
Return the string of an enum value.
pIndex | Enum value to get string for. |
pIndex
. Reimplemented in FBPropertyBaseEnum< tType >, FBPropertyBaseAnimatableEnum< tType >, FBPropertyBaseEnum< EPathEndCapStyle >, FBPropertyBaseEnum< ELengthUnitType >, and FBPropertyBaseEnum< EAreaLightShapes >.
FBStringList* GetEnumStringList | ( | bool | pCreateIt = false | ) |
String list for enum properties.
pCreateIt | Create a new list if necessary. |
void NotifyEnumStringListChanged | ( | ) |
Notify system that the enum list was modified.
void ModifyPropertyFlag | ( | FBPropertyFlag | pFlag, |
bool | pValue | ||
) |
ModifyPropertyFlag.
pFlag | The flag to switch to True or False. |
pValue | The value to set about this flag. |
FBPropertyFlag GetPropertyFlags | ( | ) |
bool GetPropertyFlag | ( | FBPropertyFlag | pFlag | ) |
GetPropertyFlag.
pFlag | Flag to test if it is True or False. |
void SetMinMax | ( | double | pMin, |
double | pMax, | ||
bool | pForceMinClamp = false , |
||
bool | pForceMaxClamp = false |
||
) |
SetMinMax.
pMin | Minimum value of the property. |
pMax | Maximum value of the property. |
pForceMinClamp | Force clamping to minimum value of the property. |
pForceMaxClamp | Force clamping to maximum value of the property. |
void SetMin | ( | double | pMin, |
bool | pForceMinClamp = false |
||
) |
SetMin.
pMin | Minimum value of the property. |
pForceMinClamp | Force clamping to minimum value of the property. |
void SetMax | ( | double | pMax, |
bool | pForceMaxClamp = false |
||
) |
SetMax.
pMax | Maximum value of the property. |
pForceMaxClamp | Force clamping to maximum value of the property. |
double GetMin | ( | ) |
double GetMax | ( | ) |
void* GetParent | ( | ) | [inline] |
Get the parent of the object.
Definition at line 420 of file fbproperties.h.
{ return mParent; }
int GetSubMemberCount | ( | ) | const |
bool AllowsLocking | ( | ) | const |
bool HasSomethingLocked | ( | ) | const |
HasSomethingLocked.
bool IsLocked | ( | ) | const |
bool IsMemberLocked | ( | int | pIndex | ) | const |
IsMemberLocked.
pIndex | Index of the sub-member of the property to check. |
void SetLocked | ( | bool | pLocked | ) |
SetLocked.
pLocked | True if the property is to be locked, false if it is to be unlocked. |
void SetMemberLocked | ( | int | pIndex, |
bool | pLocked | ||
) |
SetMemberLocked.
pIndex | Index of the sub-member of the property to lock or unlock. |
pLocked | True if the sub-member is to be locked, false if it is to be unlocked. |
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.