FBX C++ API Reference
fbximplementationutils.h File Reference


const FbxImplementationGetImplementation (const FbxObject *pObject, const char *pImplementationTarget)
 Get FbxImplementation from FbxObject. More...
template<typename T >
bool GetBoundPropertyValue (const FbxBindingTable *pBindingTable, const char *pEntryName, const FbxImplementation *pImplementation, const FbxObject *pBoundObject, T &pValue)
 Get bound property value from FbxBindingTable. More...

Function Documentation

◆ GetImplementation()

const FbxImplementation* GetImplementation ( const FbxObject pObject,
const char *  pImplementationTarget 

Get FbxImplementation from FbxObject.

pObjectFbxObject to get FbxImplementation.
pImplementationTargetName of the implementation property to get.
FbxImplementation Pointer to FbxImplementation.

◆ GetBoundPropertyValue()

bool GetBoundPropertyValue ( const FbxBindingTable pBindingTable,
const char *  pEntryName,
const FbxImplementation pImplementation,
const FbxObject pBoundObject,
T &  pValue 

Get bound property value from FbxBindingTable.

pBindingTableFbxBindingTable to get bound property value.
pEntryNameName of the Entry type to get.
pImplementationFbxImplementation of the bound property value to get if the Entry type is FbxOperatorEntryView::sEntryType.
pBoundObjectFbxObject of the bound property value to get if the Entry type is FbxPropertyEntryView::sEntryType.
pValuePointer to bound property value from FbxBindingTable.
Whether get bound property value success or not.

Definition at line 40 of file fbximplementationutils.h.

45 {
46  if ((NULL != pImplementation) && (NULL != pBindingTable) && (NULL != pBoundObject) && (NULL != pEntryName))
47  {
48  const FbxBindingTableEntry* lEntry = pBindingTable->GetEntryForDestination(pEntryName);
50  if (NULL != lEntry)
51  {
52  if (strcmp(lEntry->GetEntryType(true), FbxPropertyEntryView::sEntryType) == 0)
53  {
54  const char* lPropName = lEntry->GetSource();
55  FbxProperty lProp = pBoundObject->FindPropertyHierarchical(lPropName);
56  if (lProp.IsValid())
57  {
58  pValue = lProp.Get<T>();
59  return true;
60  }
61  }
62  else if (strcmp(lEntry->GetEntryType(true), FbxOperatorEntryView::sEntryType) == 0)
63  {
64  const char* lOperatorName = lEntry->GetSource();
65  const FbxBindingOperator* lOp = pImplementation->GetOperatorByTargetName(lOperatorName);
66  if (lOp)
67  {
68  return lOp->Evaluate(pBoundObject, &pValue);
69  }
70  }
71  }
72  }
74  return false;
75 }
FbxProperty FindPropertyHierarchical(const char *pName, bool pCaseSensitive=true) const
Searches a property by full name.
Definition: fbxobject.h:688
const FbxBindingOperator * GetOperatorByTargetName(const char *pTargetName) const
Returns the binding operator that has the given name.
#define NULL
Definition: fbxarch.h:210
A binding table entry stores a binding between a source and a destination.
bool Evaluate(const FbxObject *pObject, FBXTYPE *pResult) const
Run the operator on the given object.
const FbxBindingTableEntry * GetEntryForDestination(const char *pDestName) const
Retrieve the table entry for the given destination value.
const char * GetEntryType(bool pAsSource) const
Get the source type or destination type.
static const char * sEntryType
Name of the entry type used in the binding entry.
T Get() const
Gets the value of the property.
Definition: fbxproperty.h:289
Class to hold user properties.
Definition: fbxproperty.h:37
This object represents a binding operation on a FbxObject or FbxProperty.
bool IsValid() const
Judges the property&#39;s validity.
static const char * sEntryType
Name of the entry type used in the binding entry.
const char * GetSource() const
Retrieve the source.

Go to the source code of this file.