FBProperty objects cannot be instantiated by the user. Reference to a property can be obtained either via an instance of a FBComponent object, or by calling the method 'Find()' of a FBPropertyManager. The class FBComponent has a FBPropertyManager data member named 'PropertyList'.
When accessing a FBProperty object via its containing object, you can get or set (assuming it is not read-only) its value directly:
lObject.Visibility = True
When accessing a property reference directly, its value is obtained via it's 'Data' member.
lProp = lObject.PropertyList.Find( 'Visibility' )
if lProp: lProp.Data = True
The methods 'PropertyCreate()' and 'PropertyRemove' of the class FBComponent can be used to modify an object's set of properties.
Public Member Functions |
|
FBProperty () | |
Constructor. |
|
float | GetMax () |
GetMax. |
|
float | GetMin () |
GetMin. |
|
str | GetName () |
Get the property's name. |
|
bool | GetPropertyFlag (FBFlag pFlag) |
GetPropertyFlag. |
|
FBFlag | GetPropertyFlags () |
GetPropertyFlags. |
|
FBType | GetPropertyType () |
Get the property's type. |
|
str | GetPropertyTypeName () |
Get the property's type name. |
|
bool | IsAnimatable () |
Verify if property is of this type. |
|
bool | IsInternal () |
Verify if property is of this type. |
|
bool | IsList () |
Verify if property is of this type. |
|
bool | IsMaxClamp () |
Indicate if maximum value clamping will be
applied on user input value. |
|
bool | IsMinClamp () |
Indicate if minimum value clamping will be
applied on user input value. |
|
bool | IsObjectList () |
Indicate if is an instance of FBPropertyListObject.
|
|
bool | IsReadOnly () |
Is property read-only? |
|
bool | IsReferenceProperty () |
Verify if property is of this type. |
|
bool | IsUserProperty () |
Verify if property is of this type. |
|
SetMax (float pMax, bool pForceMaxClamp=False) | |
SetMax. |
|
SetMin (float pMin, bool pForceMinClamp=False) | |
SetMin. |
|
Public Attributes |
|
str | Name |
Read Property: The property's name.
|
|
object | Data |
Read Write Property: The property
data value. Type of this depends on the subclass of FBProperty (ex: in a FBPropertyInt, Data is
of type int). |
FBProperty | ( | ) |
Constructor.
float GetMax | ( | ) |
GetMax.
float GetMin | ( | ) |
GetMin.
str GetName | ( | ) |
Get the property's name.
bool GetPropertyFlag | ( | FBFlag | pFlag | ) |
GetPropertyFlag.
pFlag | Flag to test if it is True or False. |
FBFlag GetPropertyFlags | ( | ) |
GetPropertyFlags.
FBType GetPropertyType | ( | ) |
Get the property's type.
str GetPropertyTypeName | ( | ) |
Get the property's type name.
bool IsAnimatable | ( | ) |
Verify if property is of this type.
bool IsInternal | ( | ) |
Verify if property is of this type.
bool IsList | ( | ) |
Verify if property is of this type.
bool IsMaxClamp | ( | ) |
Indicate if maximum value clamping will be applied on user input value.
bool IsMinClamp | ( | ) |
Indicate if minimum value clamping will be applied on user input value.
bool IsObjectList | ( | ) |
Indicate if is an instance of FBPropertyListObject.
bool IsReadOnly | ( | ) |
Is property read-only?
bool IsReferenceProperty | ( | ) |
Verify if property is of this type.
bool IsUserProperty | ( | ) |
Verify if property is of this type.
SetMax.
pMax | Maximum value of the property. | |
pForceMaxClamp | Force clamping to maximum value of the property. |
SetMin.
pMin | Minimum value of the property. | |
pForceMinClamp | Force clamping to minimum value of the property. |
Read Write Property: The property data value. Type of this depends on the subclass of FBProperty (ex: in a FBPropertyInt, Data is of type int).
Reimplemented in FBPropertyAction, FBPropertyBool, FBPropertyColor, FBPropertyColorAndAlpha, FBPropertyComponent, FBPropertyDouble, FBPropertyFloat, FBPropertyInt, FBPropertyString, FBPropertyTime, FBPropertyVector2d, FBPropertyVector3d, FBPropertyVector4d, FBPropertyEnum, FBPropertyAnimatable, FBPropertyAnimatableAction, FBPropertyAnimatableBool, FBPropertyAnimatableColor, FBPropertyAnimatableColorAndAlpha, FBPropertyAnimatableDouble, FBPropertyAnimatableTime, FBPropertyAnimatableEnum, FBPropertyAnimatableInt, FBPropertyAnimatableVector2d, FBPropertyAnimatableVector3d, and FBPropertyAnimatableVector4d.