FBX includes a property system (KFbxProperty) that allows FBX objects to contain strongly typed member data in the form of an FBX property. FBX properties can be accessed and managed by means of a rich library of member functions: KFbxProperty::Create(), KFbxProperty::Destroy(), KFbxProperty::DestroyRecursively(), KFbxProperty::IsValid(), KFbxProperty::Get(), KFbxProperty::Set(), etc.
Although you can define your own properties and data types, let’s begin by looking at what you can do with the properties
that are already built in to FBX SDK classes.
An FBX property:
- Has a name that you can get, set, or find.
- Is implemented as a template class: you must specify the data type of the property.
- Can have a data type that is created at run time. For example, see the sample program ExportScene05 in <yourFBXSDKpath>\examples\ExportScene05\.
- Can only be set to a value that is valid for the property’s data type. There are some conversions supported: for example,
if a double is required but an int is specified, the int is converted to a double, and the property is set to the double.
- Contains a set of flags that you can get, set, and manipulate: see KFbxPropertyFlags::eFbxPropertyFlags.
- Can be used to manage the connections between FBX objects (See Connections).
- Can have connections to other properties (see Connections).
- Can be used with assignment and copy operators.
- Is automatically copied when the FBX object is copied. Copying an FBX object copies all the properties of the source object,
as well as the values of each property. The copy does not, however, contain the connections of the source object, should they
exist.
- Can be a compound of two or more properties. A compound property is organized as a hierarchy of its component properties.
See KFbxProperty::CreateFrom, KFbxProperty::DestroyRecursively, and related member functions.
When you create an FBX object, its FBX properties are automatically instantiated and initialized. These are called static properties.
But you can also instantiate and initialize your own additional properties after the FBX object has been created. These are
called dynamic properties.
You can query an FBX object to:
- Determine whether it contains an FBX property with a specified name.
- Enumerate all its FBX properties.
Note
In this documentation, an FBX property refers to an object that is instantiated from the KFbxTypedProperty class. Some FBX objects contain member variables that are not implemented as FBX properties.