FbxPropertyPage Class Reference

#include <fbxpropertypage.h>

Class Description

Definition at line 421 of file fbxpropertypage.h.

Public Types

enum  EValueIndex {
  eValueMin, eValueSoftMin, eValueMax, eValueSoftMax,
  eValueCount
}
 

Public Member Functions

 FBXSDK_FRIEND_NEW ()
 
void Destroy ()
 
template<class T >
T * GetPropertyItem (const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
 
template<class T >
T * ChangePropertyItemState (const T *pItemType, FbxInt pIndex, FbxPropertyFlags::EInheritType pInheritType)
 
template<class T >
FbxPropertyPageGetFirstPropertyItem (FbxInt pId, const T *pItem) const
 
const char * GetName (FbxInt pId=FBXSDK_PROPERTY_ID_ROOT)
 
const char * GetLabel (FbxInt pId=FBXSDK_PROPERTY_ID_ROOT)
 
bool SetLabel (FbxInt pId=FBXSDK_PROPERTY_ID_ROOT, const char *pLabel="")
 
void * GetUserData (FbxInt pId=FBXSDK_PROPERTY_ID_ROOT)
 
bool SetUserData (FbxInt pId=FBXSDK_PROPERTY_ID_ROOT, const void *pUserData=0)
 
int GetUserTag (FbxInt pId=FBXSDK_PROPERTY_ID_ROOT)
 
bool SetUserTag (FbxInt pId=FBXSDK_PROPERTY_ID_ROOT, int pUserTag=0)
 
EFbxType GetType (FbxInt pId=FBXSDK_PROPERTY_ID_ROOT) const
 
FbxInt GetParent (FbxInt pId=FBXSDK_PROPERTY_ID_ROOT) const
 
FbxPropertyPageGetTypeInfo (FbxInt pId=FBXSDK_PROPERTY_ID_ROOT)
 
FbxInt Add (FbxInt pParentId, const char *pName, EFbxType pType)
 
FbxInt Add (FbxInt pParentId, const char *pName, FbxPropertyPage *pTypeInfo)
 
bool Reparent (FbxInt, FbxInt)
 
bool IsChildOf (FbxInt pId, FbxInt pParentId) const
 
bool IsDescendentOf (FbxInt pId, FbxInt pAncestorId) const
 
FbxInt GetChild (FbxInt pParentId=FBXSDK_PROPERTY_ID_ROOT) const
 Retrieves the first child property id of a specified property id. More...
 
FbxInt GetSibling (FbxInt pId) const
 Retrieves the next sibling property id of a specified property id. More...
 
FbxInt GetFirstDescendent (FbxInt pAnscestorId=FBXSDK_PROPERTY_ID_ROOT) const
 Retrieves the first descendent property id of a specified property id. More...
 
FbxInt GetNextDescendent (FbxInt pAnscestorId, FbxInt pId) const
 Retrieves the next descendent property id of a specified property id, with given a descendent property id. More...
 
FbxInt FastFind (FbxInt pId, const char *pName, FbxPropertyPage *pTypeInfo, bool pCaseSensitive)
 
FbxInt Find (FbxInt pId, const char *pName, FbxPropertyPage *pTypeInfo, bool pCaseSensitive, const char *pChildrenSeparators)
 
int AddEnumValue (FbxInt pId, const char *pStringValue)
 
void InsertEnumValue (FbxInt pId, int pIndex, const char *pStringValue)
 
int GetEnumCount (FbxInt pId)
 
void SetEnumValue (FbxInt pId, int pIndex, const char *pStringValue)
 
void RemoveEnumValue (FbxInt pId, int pIndex)
 
char * GetEnumValue (FbxInt pId, int pIndex)
 
void ClearConnectCache (FbxInt pId)
 
void WipeAllConnections (FbxInt pId)
 
bool ConnectSrc (FbxInt pDstId, FbxPropertyPage *pSrcPage, FbxInt pSrcId, FbxConnection::EType pType)
 
bool DisconnectSrc (FbxInt pDstId, FbxPropertyPage *pSrcPage, FbxInt pSrcId)
 
bool IsConnectedSrc (FbxInt pDstId, FbxPropertyPage *pSrcPage, FbxInt pSrcId)
 
int GetSrcCount (FbxInt pId, FbxConnectionPointFilter *pFilter)
 
bool GetSrc (FbxInt pId, int pIndex, FbxConnectionPointFilter *pFilter, FbxPropertyPage **pSrcPage, FbxInt *pSrcId)
 
bool ConnectDst (FbxInt pSrcId, FbxPropertyPage *pDstPage, FbxInt pDstId, FbxConnection::EType pType)
 
bool DisconnectDst (FbxInt pSrcId, FbxPropertyPage *pDstPage, FbxInt pDstId)
 
bool IsConnectedDst (FbxInt pSrcId, FbxPropertyPage *pDstPage, FbxInt pDstId)
 
int GetDstCount (FbxInt pId, FbxConnectionPointFilter *pFilter)
 
bool GetDst (FbxInt pId, int pIndex, FbxConnectionPointFilter *pFilter, FbxPropertyPage **pDstPage, FbxInt *pDstId)
 
bool HasMinMax (FbxInt pId, FbxPropertyInfo::EValueIndex pValueId) const
 
bool GetMinMax (FbxInt pId, FbxPropertyInfo::EValueIndex pValueId, void *pValue, EFbxType pValueType)
 
bool SetMinMax (FbxInt pId, FbxPropertyInfo::EValueIndex pValueId, const void *pValue, EFbxType pValueType)
 
bool Get (FbxInt pId, void *pValue, EFbxType pValueType)
 
bool Set (FbxInt pId, const void *pValue, EFbxType pValueType, bool pCheckValueEquality)
 
FbxPropertyFlags::EInheritType GetValueInherit (FbxInt pId, bool pCheckInstanceOf) const
 
bool SetValueInherit (FbxInt pId, FbxPropertyFlags::EInheritType pType)
 
bool GetDefaultValue (FbxInt pId, void *pValue, EFbxType pValueType) const
 
template<class T >
bool Set (FbxInt pId, const T &pValue)
 
template<class T >
Get (FbxInt pId, const T *pFBX_TYPE)
 
void SetDataPtr (void *pDataPtr)
 
void * GetDataPtr () const
 
void PushPropertiesToParentInstance ()
 
const FbxPropertyPageGetInstanceOf () const
 
FbxPropertyPageGetInstanceOf ()
 
const FbxArray
< FbxPropertyPage * > & 
GetInstances () const
 
FbxArray< FbxPropertyPage * > & GetInstances ()
 
FbxPropertyFlags::EFlags GetFlags (FbxInt pId=FBXSDK_PROPERTY_ID_ROOT) const
 
bool ModifyFlags (FbxInt pId=FBXSDK_PROPERTY_ID_ROOT, FbxPropertyFlags::EFlags pFlags=FbxPropertyFlags::eNone, bool pValue=true, bool pCheckFlagEquality=true)
 
FbxPropertyFlags::EInheritType GetFlagsInheritType (FbxPropertyFlags::EFlags pFlags, bool pCheckInstanceOf, FbxInt pId=FBXSDK_PROPERTY_ID_ROOT) const
 
bool SetFlagsInheritType (FbxPropertyFlags::EInheritType pInheritType, FbxPropertyFlags::EFlags pFlags, FbxInt pId=FBXSDK_PROPERTY_ID_ROOT)
 
void BeginCreateOrFindProperty ()
 
void EndCreateOrFindProperty ()
 

Static Public Member Functions

static FbxPropertyPageCreate (FbxPropertyPage *pInstanceOf=0)
 
static FbxPropertyPageCreate (const char *pName, FbxPropertyPage *pTypeInfo)
 
static FbxPropertyPageCreate (const char *pName, EFbxType pType=eFbxUndefined)
 

Protected Member Functions

 FbxPropertyPage (FbxPropertyPage *pInstanceOf=0)
 
 FbxPropertyPage (const char *pName, EFbxType pType)
 
 FbxPropertyPage (const char *pName, FbxPropertyPage *pTypeInfo)
 
 ~FbxPropertyPage ()
 
bool Is (FbxPropertyPage *pPage)
 

Friends

class FbxPropertyHandle
 

Member Enumeration Documentation

Constructor & Destructor Documentation

FbxPropertyPage ( FbxPropertyPage pInstanceOf = 0)
inlineprotected

Definition at line 1442 of file fbxpropertypage.h.

1443  : mInstanceOf(0)
1444  , mDataPtr(0)
1445  , mPropNextId(0)
1446  {
1447  mEntryMap.Reserve(32);
1448  mNameMap.mFirst = 0;
1449 
1450  // instances don't need to create a root property
1451  if( !pInstanceOf )
1452  {
1453  mPropNextId = FbxNew< FbxPropertyIdGenerator >();
1454  mPropNextId->IncRef();
1455 
1456  // First item is the root information
1458  }
1459 
1460  // Hook the instances
1461  // ------------------------
1462  mInstanceOf = pInstanceOf;
1463  if (mInstanceOf) {
1464  mInstanceOf->mInstances.Add(this);
1465 
1466  mPropNextId = mInstanceOf->mPropNextId;
1467  mPropNextId->IncRef();
1468  }
1469  }
FbxInt Add(FbxInt pParentId, const char *pName, EFbxType pType)
#define FBXSDK_PROPERTY_ID_NULL
Unidentified.
int Add(const T &pElement)
Append an element at the end of the array, doubling the array if capacity is not sufficient.
Definition: fbxarray.h:83
void Reserve(unsigned int pRecordCount)
Preallocate memory.
Definition: fbxmap.h:104
First mFirst
The first object in the pair.
Definition: fbxpair.h:56
FbxPropertyPage ( const char *  pName,
EFbxType  pType 
)
inlineprotected

Definition at line 1470 of file fbxpropertypage.h.

1471  : mInstanceOf(0)
1472  , mDataPtr(0)
1473  , mPropNextId(0)
1474  {
1475  mEntryMap.Reserve(32);
1476  mNameMap.mFirst = 0;
1477 
1478  mPropNextId = FbxNew< FbxPropertyIdGenerator >();
1479  mPropNextId->IncRef();
1480 
1481  // First item is the root information
1482  Add(FBXSDK_PROPERTY_ID_NULL,pName,pType);
1483  }
FbxInt Add(FbxInt pParentId, const char *pName, EFbxType pType)
#define FBXSDK_PROPERTY_ID_NULL
void Reserve(unsigned int pRecordCount)
Preallocate memory.
Definition: fbxmap.h:104
First mFirst
The first object in the pair.
Definition: fbxpair.h:56
FbxPropertyPage ( const char *  pName,
FbxPropertyPage pTypeInfo 
)
inlineprotected

Definition at line 1484 of file fbxpropertypage.h.

1485  : mInstanceOf(0)
1486  , mDataPtr(0)
1487  , mPropNextId(0)
1488  {
1489  mEntryMap.Reserve(32);
1490  mNameMap.mFirst = 0;
1491 
1492  mPropNextId = FbxNew< FbxPropertyIdGenerator >();
1493  mPropNextId->IncRef();
1494 
1495  // First item is the root information
1496  Add(FBXSDK_PROPERTY_ID_NULL,pName,pTypeInfo);
1497  }
FbxInt Add(FbxInt pParentId, const char *pName, EFbxType pType)
#define FBXSDK_PROPERTY_ID_NULL
void Reserve(unsigned int pRecordCount)
Preallocate memory.
Definition: fbxmap.h:104
First mFirst
The first object in the pair.
Definition: fbxpair.h:56
~FbxPropertyPage ( )
inlineprotected

Definition at line 1498 of file fbxpropertypage.h.

1499  {
1500  // Propagate our property entries.
1501  int i = 0, j = 0;
1502  for( i = 0; i < mInstances.GetCount(); ++i )
1503  {
1504  for( j = 0; j < GetPropertyEntryCount(); ++j )
1505  {
1506  if( mInstances[i]->ChangePropertyEntryState((FbxInt)j, FbxPropertyFlags::eOverride) )
1507  {
1508  // Clone the info and values. Don't clone the connections,
1509  // since they aren't propagated.
1510  mInstances[i]->ChangePropertyItemState( FBX_TYPE(FbxPropertyInfo), (FbxInt)j, FbxPropertyFlags::eOverride );
1511  mInstances[i]->ChangePropertyItemState( FBX_TYPE(FbxPropertyValue), (FbxInt)j, FbxPropertyFlags::eOverride );
1512 
1513  // Since all entries have their own flags, just override the ones in the instance.
1514  mInstances[i]->SetFlagsInheritType(FbxPropertyFlags::eOverride, FbxPropertyFlags::eAllFlags, (FbxInt)j );
1515  }
1516  }
1517 
1518  // Instances become their own copies.
1519  mInstances[i]->mInstanceOf = NULL;
1520  }
1521 
1522  FbxMapDestroy(mEntryMap);
1523 
1524  if (mInstanceOf) {
1525  int lIndex = mInstanceOf->mInstances.Find(this);
1526  mInstanceOf->mInstances.SetAt(lIndex, mInstanceOf->mInstances[mInstanceOf->mInstances.GetCount()-1]);
1527  mInstanceOf->mInstances.RemoveAt(mInstanceOf->mInstances.GetCount()-1);
1528 
1529  //mInstanceOf->mInstances.RemoveIt(this);
1530  }
1531 
1532  mPropNextId->DecRef();
1533  mPropNextId = NULL;
1534 
1535  mInstanceOf = NULL;
1536  mInstances.Clear();
1537  }
void FbxMapDestroy(FbxMap< K, V, C, A > &pMap)
Call Destroy on each element of the map, and then clear it.
Definition: fbxmap.h:394
#define NULL
Definition: fbxarch.h:207
T RemoveAt(const int pIndex)
Remove an element at the given position in the array.
Definition: fbxarray.h:239
Property override this flag from its reference property.
void Clear()
Reset the number of element to zero and free the memory allocated.
Definition: fbxarray.h:350
void SetAt(const int pIndex, const T &pElement)
Set the element at given position in the array.
Definition: fbxarray.h:212
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
signed int FbxInt
Definition: fbxtypes.h:39
int Find(const T &pElement, const int pStartIndex=0) const
Find first matching element, from first to last.
Definition: fbxarray.h:164

Member Function Documentation

FBXSDK_FRIEND_NEW ( )
static FbxPropertyPage* Create ( FbxPropertyPage pInstanceOf = 0)
inlinestatic

Definition at line 426 of file fbxpropertypage.h.

426 { return FbxNew< FbxPropertyPage >(pInstanceOf); }
static FbxPropertyPage* Create ( const char *  pName,
FbxPropertyPage pTypeInfo 
)
inlinestatic

Definition at line 427 of file fbxpropertypage.h.

427 { return FbxNew< FbxPropertyPage >(pName,pTypeInfo); }
static FbxPropertyPage* Create ( const char *  pName,
EFbxType  pType = eFbxUndefined 
)
inlinestatic

Definition at line 428 of file fbxpropertypage.h.

428 { return FbxNew< FbxPropertyPage >(pName,pType); }
void Destroy ( )
inline

Definition at line 429 of file fbxpropertypage.h.

429 { FbxDelete(this); }
void FbxDelete(T *p)
Definition: fbxnew.h:341
T* GetPropertyItem ( const T *  pItemType,
FbxInt  pIndex,
FbxPropertyPage **  pFoundIn = 0 
) const
inline

Definition at line 431 of file fbxpropertypage.h.

432  {
433  FbxPropertyPage* lReferencePage = 0;
434  FbxPropertyEntry* lReferenceEntry = GetPropertyEntry(pIndex,&lReferencePage);
435  if (pFoundIn) *pFoundIn = 0;
436  if (lReferenceEntry) {
437  T* lItem = lReferenceEntry->Get( FBX_TYPE(T) );
438  if (lItem) {
439  if (pFoundIn) *pFoundIn = lReferencePage;
440  return lItem;
441  } else {
442  return lReferencePage->mInstanceOf ? lReferencePage->mInstanceOf->GetPropertyItem(pItemType,pIndex,pFoundIn) : 0 ;
443  }
444  }
445  return 0;
446  }
FbxPropertyInfo * Get(const FbxPropertyInfo *)
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
T* ChangePropertyItemState ( const T *  pItemType,
FbxInt  pIndex,
FbxPropertyFlags::EInheritType  pInheritType 
)
inline

Definition at line 448 of file fbxpropertypage.h.

449  {
450  FbxPropertyPage* lReferencePage = NULL;
451  T* lItem = GetPropertyItem(pItemType, pIndex, &lReferencePage);
452  if( pInheritType == FbxPropertyFlags::eOverride )
453  {
454  if( lReferencePage == this )
455  {
456  return lItem;
457  }
458  else if( lItem )
459  {
460  FbxPropertyEntry* lEntry = ChangePropertyEntryState(pIndex, FbxPropertyFlags::eOverride);
461  lEntry->Set(lItem->Clone(this));
462  return lEntry->Get(FBX_TYPE(T));
463  }
464  }
465  else
466  {
467  // can't inherit entries that were created on our page.
468  bool lOwnEntry = !mInstanceOf || (mInstanceOf->GetPropertyItem(pItemType, pIndex) == NULL);
469  if( lOwnEntry && FbxPropertyFlags::eInherit == pInheritType) return 0;
470 
471  if( lItem && (lReferencePage == this) )
472  {
473  FbxPropertyEntry* lEntry = GetPropertyEntry(pIndex);
474  lEntry->Set((T*)0);
475  if( lEntry->IsEmpty() )
476  {
477  ChangePropertyEntryState(pIndex, FbxPropertyFlags::eInherit);
478  }
479  }
480  return 0;
481  }
482  return 0;
483  }
FbxPropertyInfo * Get(const FbxPropertyInfo *)
#define NULL
Definition: fbxarch.h:207
void Set(FbxPropertyInfo *pInfo)
Property override this flag from its reference property.
Property inherit this flag from its reference property.
bool IsEmpty()
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
FbxPropertyPage* GetFirstPropertyItem ( FbxInt  pId,
const T *  pItem 
) const
inline

Definition at line 485 of file fbxpropertypage.h.

486  {
487  FbxPropertyPage* lReferencePage = NULL;
488  GetPropertyItem(FBX_TYPE(T), pId, &lReferencePage);
489  if( lReferencePage && lReferencePage->mInstanceOf )
490  {
491  FbxPropertyPage* lReferencePage2 = lReferencePage->mInstanceOf->GetFirstPropertyItem(pId, pItem);
492  return lReferencePage2 ? lReferencePage2 : lReferencePage;
493  }
494  return lReferencePage;
495  }
#define NULL
Definition: fbxarch.h:207
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
FbxPropertyPage * GetFirstPropertyItem(FbxInt pId, const T *pItem) const
const char* GetName ( FbxInt  pId = FBXSDK_PROPERTY_ID_ROOT)
inline

Definition at line 497 of file fbxpropertypage.h.

498  {
499  FbxPropertyInfo* lPropertyInfo = GetPropertyItem( FBX_TYPE(FbxPropertyInfo),pId );
500  return lPropertyInfo ? ((const char*)lPropertyInfo->GetName()) : "";
501  }
FbxStringSymbol GetName() const
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
const char* GetLabel ( FbxInt  pId = FBXSDK_PROPERTY_ID_ROOT)
inline

Definition at line 503 of file fbxpropertypage.h.

504  {
505  FbxPropertyInfo* lPropertyInfo = GetPropertyItem( FBX_TYPE(FbxPropertyInfo),pId );
506  return lPropertyInfo ? ((const char*)lPropertyInfo->GetLabel()) : "";
507  }
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
const char * GetLabel() const
bool SetLabel ( FbxInt  pId = FBXSDK_PROPERTY_ID_ROOT,
const char *  pLabel = "" 
)
inline

Definition at line 509 of file fbxpropertypage.h.

510  {
511  FbxPropertyInfo* lPropertyInfo = GetPropertyItem( FBX_TYPE(FbxPropertyInfo),pId );
512  // Don't make it writeable (Keep it shared)
513  if (lPropertyInfo) {
514  lPropertyInfo->SetLabel(pLabel);
515  return true;
516  } else {
517  return false;
518  }
519  }
void SetLabel(const char *pLabel)
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
void* GetUserData ( FbxInt  pId = FBXSDK_PROPERTY_ID_ROOT)
inline

Definition at line 521 of file fbxpropertypage.h.

522  {
523  FbxPropertyInfo* lPropertyInfo = GetPropertyItem( FBX_TYPE(FbxPropertyInfo),pId );
524  return lPropertyInfo ? lPropertyInfo->GetUserData() : 0;
525  }
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
void * GetUserData() const
bool SetUserData ( FbxInt  pId = FBXSDK_PROPERTY_ID_ROOT,
const void *  pUserData = 0 
)
inline

Definition at line 527 of file fbxpropertypage.h.

528  {
529  FbxPropertyInfo* lPropertyInfo = GetPropertyItem( FBX_TYPE(FbxPropertyInfo),pId );
530  // Don't make it writeable (Keep it shared)
531  if (lPropertyInfo) {
532  lPropertyInfo->SetUserData(pUserData);
533  return true;
534  } else {
535  return false;
536  }
537  }
void SetUserData(const void *pUserData)
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
int GetUserTag ( FbxInt  pId = FBXSDK_PROPERTY_ID_ROOT)
inline

Definition at line 539 of file fbxpropertypage.h.

540  {
541  FbxPropertyInfo* lPropertyInfo = GetPropertyItem( FBX_TYPE(FbxPropertyInfo),pId );
542  return lPropertyInfo ? lPropertyInfo->GetUserTag() : 0;
543  }
int GetUserTag() const
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
bool SetUserTag ( FbxInt  pId = FBXSDK_PROPERTY_ID_ROOT,
int  pUserTag = 0 
)
inline

Definition at line 545 of file fbxpropertypage.h.

546  {
547  FbxPropertyInfo* lPropertyInfo = GetPropertyItem( FBX_TYPE(FbxPropertyInfo),pId );
548  // Don't make it writeable (Keep it shared)
549  if (lPropertyInfo) {
550  lPropertyInfo->SetUserTag(pUserTag);
551  return true;
552  } else {
553  return false;
554  }
555  }
void SetUserTag(int pUserTag)
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
EFbxType GetType ( FbxInt  pId = FBXSDK_PROPERTY_ID_ROOT) const
inline

Definition at line 557 of file fbxpropertypage.h.

558  {
559  FbxPropertyInfo* lPropertyInfo = GetPropertyItem( FBX_TYPE(FbxPropertyInfo),pId );
560  return lPropertyInfo ? lPropertyInfo->GetType() : eFbxUndefined;
561  }
Unidentified.
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
EFbxType GetType() const
FbxInt GetParent ( FbxInt  pId = FBXSDK_PROPERTY_ID_ROOT) const
inline

Definition at line 563 of file fbxpropertypage.h.

564  {
565  FbxPropertyEntry* lPropertyEntry = GetPropertyEntry( pId );
566  return lPropertyEntry ? lPropertyEntry->GetParentId() : FBXSDK_PROPERTY_ID_NULL;
567  }
#define FBXSDK_PROPERTY_ID_NULL
FbxInt GetParentId()
FbxPropertyPage* GetTypeInfo ( FbxInt  pId = FBXSDK_PROPERTY_ID_ROOT)
inline

Definition at line 569 of file fbxpropertypage.h.

570  {
571  FbxPropertyInfo* lPropertyInfo = GetPropertyItem( FBX_TYPE(FbxPropertyInfo),pId );
572  return lPropertyInfo ? lPropertyInfo->GetTypeInfo() : 0;
573  }
FbxPropertyPage * GetTypeInfo() const
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
FbxInt Add ( FbxInt  pParentId,
const char *  pName,
EFbxType  pType 
)
inline

Definition at line 574 of file fbxpropertypage.h.

575  {
576  return Add(pParentId,FbxPropertyInfo::Create(pName,pType),FbxPropertyValue::Create(0,pType),0);
577  }
FbxInt Add(FbxInt pParentId, const char *pName, EFbxType pType)
static FbxPropertyInfo * Create(const char *pName, FbxPropertyPage *pTypeInfo)
static FbxPropertyValue * Create(void *pData, EFbxType pType)
FbxInt Add ( FbxInt  pParentId,
const char *  pName,
FbxPropertyPage pTypeInfo 
)
inline

Definition at line 578 of file fbxpropertypage.h.

579  {
580  return Add(pParentId,FbxPropertyInfo::Create(pName,pTypeInfo),FbxPropertyValue::Create(0,pTypeInfo->GetType()),0);
581  }
FbxInt Add(FbxInt pParentId, const char *pName, EFbxType pType)
static FbxPropertyInfo * Create(const char *pName, FbxPropertyPage *pTypeInfo)
static FbxPropertyValue * Create(void *pData, EFbxType pType)
EFbxType GetType(FbxInt pId=FBXSDK_PROPERTY_ID_ROOT) const
bool Reparent ( FbxInt  ,
FbxInt   
)
inline

Definition at line 583 of file fbxpropertypage.h.

584  {
585  // Not implemented.
586  /*
587  if( GetParent(pChildId) != pNewParentId && pChildId < mEntries.GetCount() )
588  {
589  FbxPropertyEntry* lChildEntry = mEntries[pChildId];
590  lChildEntry->mParentId = pNewParentId;
591 
592  //@@@@@ TODO: propagate to instances
593 
594  return true;
595  }
596  */
597  return false;
598  }
bool IsChildOf ( FbxInt  pId,
FbxInt  pParentId 
) const
inline

Definition at line 600 of file fbxpropertypage.h.

601  {
602  return GetParent(pId)==pParentId;
603 
604  }
FbxInt GetParent(FbxInt pId=FBXSDK_PROPERTY_ID_ROOT) const
bool IsDescendentOf ( FbxInt  pId,
FbxInt  pAncestorId 
) const
inline

Definition at line 606 of file fbxpropertypage.h.

607  {
608  if (pAncestorId>0) {
609  FbxInt lParentId = GetParent(pId);
610  while (lParentId != FBXSDK_PROPERTY_ID_NULL ) {
611  if (lParentId==pAncestorId) {
612  return true;
613  }
614  lParentId = GetParent(lParentId);
615  }
616  return false;
617  } else {
618  return true;
619  }
620 
621  }
#define FBXSDK_PROPERTY_ID_NULL
FbxInt GetParent(FbxInt pId=FBXSDK_PROPERTY_ID_ROOT) const
signed int FbxInt
Definition: fbxtypes.h:39
FbxInt GetChild ( FbxInt  pParentId = FBXSDK_PROPERTY_ID_ROOT) const
inline

Retrieves the first child property id of a specified property id.

Parameters
pParentIdThe specified property id
Returns
the first child property id

Definition at line 629 of file fbxpropertypage.h.

630  {
631  #ifdef PROPERTY_PAGE_SANITY_CHECK
633  if (pParentId!=FBXSDK_PROPERTY_ID_NULL) {
634  FbxInt lId = GetMinimumPropertyId(pParentId);
635  FbxInt lParentId = GetParent(lId);
636  const FbxInt lLastId = GetPropertyEntryCount();
637 
638  while (lId<lLastId && lParentId!=pParentId) lParentId=GetParent(++lId);
639  ret0 = lId<lLastId ? lId : FBXSDK_PROPERTY_ID_NULL;
640  } else {
642  }
643  #endif
645  if (pParentId != FBXSDK_PROPERTY_ID_NULL)
646  {
647  FbxPropertyEntry* lEntry;
648  FbxInt lId = pParentId;
649  do
650  {
651  lId = GetMinimumPropertyIdAndEntry(lId, &lEntry);
652  } while (lId != FBXSDK_PROPERTY_ID_NULL && lEntry->GetParentId() != pParentId);
653  ret1 = lId;
654  }
655  #ifdef PROPERTY_PAGE_SANITY_CHECK
656  FBX_ASSERT(ret0==ret1);
657  #endif
658  return ret1;
659  }
#define FBXSDK_PROPERTY_ID_NULL
FbxInt GetParent(FbxInt pId=FBXSDK_PROPERTY_ID_ROOT) const
FbxInt GetParentId()
signed int FbxInt
Definition: fbxtypes.h:39
FbxInt GetSibling ( FbxInt  pId) const
inline

Retrieves the next sibling property id of a specified property id.

Parameters
pIdThe specified property id
Returns
the next sibling property id

Definition at line 665 of file fbxpropertypage.h.

666  {
667  #ifdef PROPERTY_PAGE_SANITY_CHECK
668  FbxInt pIdBackup = pId;
670  if (pId!=FBXSDK_PROPERTY_ID_NULL) {
671  FbxInt lReferenceParentId = GetParent(pId);
672  FbxInt lParentId = GetParent(++pId);
673  const FbxInt lLastId = GetPropertyEntryCount();
674 
675  while (pId<lLastId && lReferenceParentId!=FBXSDK_PROPERTY_ID_NULL && lParentId!=lReferenceParentId)
676  lParentId=GetParent(++pId);
677  ret0 = pId<lLastId ? pId : FBXSDK_PROPERTY_ID_NULL;
678  } else {
680  }
681  pId = pIdBackup;
682  #endif
684  if (pId != FBXSDK_PROPERTY_ID_NULL)
685  {
686  FbxInt lReferenceParentId = GetParent(pId);
687 
688  if (lReferenceParentId != FBXSDK_PROPERTY_ID_NULL)
689  {
690  FbxPropertyEntry *lEntry;
691  do
692  {
693  pId = GetMinimumPropertyIdAndEntry(pId, &lEntry);
694  } while (pId != FBXSDK_PROPERTY_ID_NULL && lEntry->GetParentId() != lReferenceParentId);
695 
696  ret1 = pId;
697  }
698  }
699 
700  #ifdef PROPERTY_PAGE_SANITY_CHECK
701  FBX_ASSERT(ret0==ret1);
702  #endif
703  return ret1;
704  }
#define FBXSDK_PROPERTY_ID_NULL
FbxInt GetParent(FbxInt pId=FBXSDK_PROPERTY_ID_ROOT) const
FbxInt GetParentId()
signed int FbxInt
Definition: fbxtypes.h:39
FbxInt GetFirstDescendent ( FbxInt  pAnscestorId = FBXSDK_PROPERTY_ID_ROOT) const
inline

Retrieves the first descendent property id of a specified property id.

Parameters
pAnscestorIdThe specified property id
Returns
the first descendent property id

Definition at line 710 of file fbxpropertypage.h.

711  {
712  #ifdef PROPERTY_PAGE_SANITY_CHECK
714  if (pAnscestorId!=FBXSDK_PROPERTY_ID_NULL) {
715  FbxInt lId = GetMinimumPropertyId(pAnscestorId);
716  FbxInt lParentId = GetParent(lId);
717  const FbxInt lLastId = GetPropertyEntryCount();
718 
719  while (lId<lLastId) {
720  if( lParentId!=FBXSDK_PROPERTY_ID_NULL && IsDescendentOf(lId,pAnscestorId) )
721  {
722  ret0 = lId;
723  break;
724  }
725  lParentId = GetParent(++lId);
726  }
727  }
728  #endif
730  FbxInt lId = pAnscestorId;
731  FbxPropertyEntry* lEntry;
732  if (pAnscestorId != FBXSDK_PROPERTY_ID_NULL)
733  {
734  for(;;)
735  {
736  lId = GetMinimumPropertyIdAndEntry(lId, &lEntry);
737  if (lId == FBXSDK_PROPERTY_ID_NULL)
738  break;
739  if(lEntry->GetParentId() != FBXSDK_PROPERTY_ID_NULL && IsDescendentOf(lId, pAnscestorId))
740  {
741  ret1 = lId;
742  break;
743  }
744  }
745  }
746 
747  #ifdef PROPERTY_PAGE_SANITY_CHECK
748  FBX_ASSERT(ret0==ret1);
749  #endif
750  return ret1;
751  }
#define FBXSDK_PROPERTY_ID_NULL
bool IsDescendentOf(FbxInt pId, FbxInt pAncestorId) const
FbxInt GetParent(FbxInt pId=FBXSDK_PROPERTY_ID_ROOT) const
FbxInt GetParentId()
signed int FbxInt
Definition: fbxtypes.h:39
FbxInt GetNextDescendent ( FbxInt  pAnscestorId,
FbxInt  pId 
) const
inline

Retrieves the next descendent property id of a specified property id, with given a descendent property id.

Parameters
pAnscestorIdThe specified property id
pIdThe descendent property id
Returns
the next descendent property id

Definition at line 758 of file fbxpropertypage.h.

759  {
760  #ifdef PROPERTY_PAGE_SANITY_CHECK
761  FbxInt pIdBackup = pId;
763  if (pId!=FBXSDK_PROPERTY_ID_NULL) {
764  FbxInt lParentId = GetParent(++pId);
765  const FbxInt lLastId = GetPropertyEntryCount();
766 
767  while (pId<lLastId) {
768  // GetParent returns null when the given id isn't in our page,
769  // or our ancestor's page.
770  if( lParentId != FBXSDK_PROPERTY_ID_NULL && IsDescendentOf(pId, pAnscestorId) )
771  {
772  ret0 = pId;
773  break;
774  }
775 
776  lParentId = GetParent(++pId);
777  }
778  }
779 
780  pId = pIdBackup;
781  #endif
783  if (pId != FBXSDK_PROPERTY_ID_NULL)
784  {
785  FbxPropertyEntry* lEntry;
786  for(;;)
787  {
788  pId = GetMinimumPropertyIdAndEntry(pId, &lEntry);
789  if (pId == FBXSDK_PROPERTY_ID_NULL)
790  break;
791  if(lEntry->GetParentId() != FBXSDK_PROPERTY_ID_NULL && IsDescendentOf(pId, pAnscestorId) )
792  {
793  ret1 = pId;
794  break;
795  }
796  }
797 
798  }
799  #ifdef PROPERTY_PAGE_SANITY_CHECK
800  FBX_ASSERT(ret0==ret1);
801  #endif
802  return ret1;
803 
804  }
#define FBXSDK_PROPERTY_ID_NULL
bool IsDescendentOf(FbxInt pId, FbxInt pAncestorId) const
FbxInt GetParent(FbxInt pId=FBXSDK_PROPERTY_ID_ROOT) const
FbxInt GetParentId()
signed int FbxInt
Definition: fbxtypes.h:39
FbxInt FastFind ( FbxInt  pId,
const char *  pName,
FbxPropertyPage pTypeInfo,
bool  pCaseSensitive 
)
inline

Definition at line 806 of file fbxpropertypage.h.

807  {
809 
810  bool lSlowQuery = true;
811  if( mNameMap.mSecond.GetSize() > 0 )
812  {
813  lSlowQuery = false;
814  // try to use the map if we've got it
815  NameMap::RecordType* lIterator = mNameMap.mSecond.Find( FbxNameMapKey( pId, pName ) );
816  if( !lIterator )
817  {
819  }
820  else
821  {
822  lId = lIterator->GetValue();
823  if (lId != FBXSDK_PROPERTY_ID_NULL && pTypeInfo)
824  {
825  lSlowQuery = true;
826 
827  // Try to match types.
828  // If they are mismatched, fall back to the slow query,
829  // since we might have multiple property with the same name but different types
830  FbxPropertyInfo* lPropertyInfo = GetPropertyItem( FBX_TYPE(FbxPropertyInfo), lId );
831  if (lPropertyInfo)
832  {
833  FbxPropertyPage* lTypeInfo2 = lPropertyInfo->GetTypeInfo();
834  if ( lTypeInfo2 && lTypeInfo2->Is(pTypeInfo) )
835  {
836  lSlowQuery = false;
837  }
838  }
839  }
840  }
841  }
842 
843  if (!lSlowQuery)
844  return lId;
845 
846  // fall back if there's no map or we got one with a different type
847 
848  lId = GetChild(pId);
849  FbxStringSymbol lSearchSymbol( pName );
850  while( lId != FBXSDK_PROPERTY_ID_NULL ) {
851  FbxPropertyInfo* lPropertyInfo = GetPropertyItem( FBX_TYPE(FbxPropertyInfo), lId );
852  if ( (!pTypeInfo || lPropertyInfo->GetTypeInfo()->Is(pTypeInfo)) &&
853  ((!pCaseSensitive && FBXSDK_stricmp(lPropertyInfo->GetName(),pName)==0) ||
854  (pCaseSensitive && lPropertyInfo->GetName() == lSearchSymbol)) ) {
855  return lId;
856  }
857  lId = GetSibling(lId);
858  }
859 
861  }
#define FBXSDK_PROPERTY_ID_NULL
FbxPropertyPage * GetTypeInfo() const
const RecordType * Find(const KeyType &pKey) const
Query a key.
Definition: fbxmap.h:171
FbxStringSymbol GetName() const
int GetSize() const
Retrieve the number of key-value pairs it holds.
Definition: fbxmap.h:110
This class is to mark a string as symbol.
Definition: fbxsymbol.h:81
FbxInt GetChild(FbxInt pParentId=FBXSDK_PROPERTY_ID_ROOT) const
Retrieves the first child property id of a specified property id.
FbxPair< FbxInt, const char * > FbxNameMapKey
FbxInt GetSibling(FbxInt pId) const
Retrieves the next sibling property id of a specified property id.
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
Second mSecond
The second object in the pair.
Definition: fbxpair.h:57
signed int FbxInt
Definition: fbxtypes.h:39
bool Is(FbxPropertyPage *pPage)
StorageType::RecordType RecordType
Definition: fbxmap.h:98
FbxInt Find ( FbxInt  pId,
const char *  pName,
FbxPropertyPage pTypeInfo,
bool  pCaseSensitive,
const char *  pChildrenSeparators 
)
inline

Definition at line 863 of file fbxpropertypage.h.

864  {
865  if (pChildrenSeparators)
866  {
867  FbxInt lId;
868  size_t lFoundIndex = strcspn(pName,pChildrenSeparators);
869 
870  // Strip the first part of the name and search
871  if (lFoundIndex<strlen(pName))
872  {
873  FbxString pRootName;
874  pRootName.Append(pName,lFoundIndex);
875  lId = FastFind(pId,pRootName.Buffer(),NULL,pCaseSensitive);
876  return lId != FBXSDK_PROPERTY_ID_NULL ? Find(lId,pName+lFoundIndex+1,pTypeInfo,pCaseSensitive,pChildrenSeparators) : lId;
877  } else {
878  return FastFind(pId,pName,pTypeInfo,pCaseSensitive);
879  }
880  } else {
881  return FastFind(pId,pName,pTypeInfo,pCaseSensitive);
882  }
883  }
#define FBXSDK_PROPERTY_ID_NULL
#define NULL
Definition: fbxarch.h:207
Utility class to manipulate strings.
Definition: fbxstring.h:66
char * Buffer()
Non-const buffer access.
const FbxString & Append(const char *pString, size_t pLength)
Append as "C" strncat().
FbxInt FastFind(FbxInt pId, const char *pName, FbxPropertyPage *pTypeInfo, bool pCaseSensitive)
signed int FbxInt
Definition: fbxtypes.h:39
FbxInt Find(FbxInt pId, const char *pName, FbxPropertyPage *pTypeInfo, bool pCaseSensitive, const char *pChildrenSeparators)
int AddEnumValue ( FbxInt  pId,
const char *  pStringValue 
)
inline

Definition at line 886 of file fbxpropertypage.h.

887  {
888  FbxPropertyInfo* lPropertyInfo = GetPropertyItem( FBX_TYPE(FbxPropertyInfo),pId );
889  // Don't make it writeable (Keep it shared)
890  return lPropertyInfo ? lPropertyInfo->AddEnumValue(pStringValue) : - 1;
891  }
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
int AddEnumValue(const char *pStringValue)
void InsertEnumValue ( FbxInt  pId,
int  pIndex,
const char *  pStringValue 
)
inline

Definition at line 893 of file fbxpropertypage.h.

894  {
895  FbxPropertyInfo* lPropertyInfo = GetPropertyItem( FBX_TYPE(FbxPropertyInfo),pId );
896  // Don't make it writeable (Keep it shared)
897  if (lPropertyInfo) lPropertyInfo->InsertEnumValue(pIndex,pStringValue);
898  }
void InsertEnumValue(int pIndex, const char *pStringValue)
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
int GetEnumCount ( FbxInt  pId)
inline

Definition at line 900 of file fbxpropertypage.h.

901  {
902  FbxPropertyInfo* lPropertyInfo = GetPropertyItem( FBX_TYPE(FbxPropertyInfo),pId );
903  // Don't make it writeable (Keep it shared)
904  return lPropertyInfo ? lPropertyInfo->GetEnumCount() : 0;
905  }
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
void SetEnumValue ( FbxInt  pId,
int  pIndex,
const char *  pStringValue 
)
inline

Definition at line 907 of file fbxpropertypage.h.

908  {
909  FbxPropertyInfo* lPropertyInfo = GetPropertyItem( FBX_TYPE(FbxPropertyInfo),pId );
910  // Don't make it writeable (Keep it shared)
911  if (lPropertyInfo) lPropertyInfo->SetEnumValue(pIndex,pStringValue);
912  }
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
void SetEnumValue(int pIndex, const char *pStringValue)
void RemoveEnumValue ( FbxInt  pId,
int  pIndex 
)
inline

Definition at line 914 of file fbxpropertypage.h.

915  {
916  FbxPropertyInfo* lPropertyInfo = GetPropertyItem( FBX_TYPE(FbxPropertyInfo),pId );
917  // Don't make it writeable (Keep it shared)
918  if (lPropertyInfo) lPropertyInfo->RemoveEnumValue(pIndex);
919  }
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
void RemoveEnumValue(int pIndex)
char* GetEnumValue ( FbxInt  pId,
int  pIndex 
)
inline

Definition at line 921 of file fbxpropertypage.h.

922  {
923  FbxPropertyInfo* lPropertyInfo = GetPropertyItem( FBX_TYPE(FbxPropertyInfo),pId );
924  return lPropertyInfo ? lPropertyInfo->GetEnumValue(pIndex) : (char*)"";
925  }
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
char * GetEnumValue(int pIndex)
void ClearConnectCache ( FbxInt  pId)
inline

Definition at line 929 of file fbxpropertypage.h.

930  {
931  FbxPropertyPage* lReferencePage = 0;
932  FbxPropertyConnect* lPropertyConnect = GetPropertyItem( FBX_TYPE(FbxPropertyConnect),pId,&lReferencePage );
933 
934  // Connections are not considered propagated so
935  // make sure that we own the FbxPropertyConnect objects
936  if (lPropertyConnect) {
937  lPropertyConnect->ClearConnectCache();
938  }
939  }
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
void WipeAllConnections ( FbxInt  pId)
inline

Definition at line 941 of file fbxpropertypage.h.

942  {
943  FbxPropertyPage* lReferencePage = 0;
944  FbxPropertyConnect* lPropertyConnect = GetPropertyItem( FBX_TYPE(FbxPropertyConnect),pId,&lReferencePage );
945 
946  if (lPropertyConnect) {
947  lPropertyConnect->WipeAllConnections();
948  }
949  }
void WipeAllConnections()
Clear all connect without sending any notification (Internal use ONLY)
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
bool ConnectSrc ( FbxInt  pDstId,
FbxPropertyPage pSrcPage,
FbxInt  pSrcId,
FbxConnection::EType  pType 
)
inline

Definition at line 951 of file fbxpropertypage.h.

952  {
953  FbxPropertyEntry* lDstEntry = ChangePropertyEntryState(pDstId,FbxPropertyFlags::eOverride);
954  FbxPropertyEntry* lSrcEntry = pSrcPage->ChangePropertyEntryState(pSrcId,FbxPropertyFlags::eOverride);
955  FbxPropertyConnect* lDstConnect= lDstEntry->Get( FBX_TYPE(FbxPropertyConnect) );
956  FbxPropertyConnect* lSrcConnect= lSrcEntry->Get( FBX_TYPE(FbxPropertyConnect) );
957 
958  // Make sure we have a connection point on both sides of the connection
959  if (!lDstConnect) {
960  lDstConnect = FbxPropertyConnect::Create( this,pDstId );
961  lDstEntry->Set( lDstConnect );
962  }
963  if (!lSrcConnect) {
964  lSrcConnect = FbxPropertyConnect::Create( pSrcPage,pSrcId );
965  lSrcEntry->Set( lSrcConnect );
966  }
967 
968  // Must @@@@@@@ Propagate to inherited children
969  return lDstConnect->ConnectSrc(lSrcConnect,pType);
970 
971  }
FbxPropertyInfo * Get(const FbxPropertyInfo *)
void Set(FbxPropertyInfo *pInfo)
Property override this flag from its reference property.
static FbxPropertyConnect * Create(FbxPropertyPage *pPage, FbxInt pId)
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
bool ConnectSrc(FbxPropertyConnect *pSrc, FbxConnection::EType pType)
bool DisconnectSrc ( FbxInt  pDstId,
FbxPropertyPage pSrcPage,
FbxInt  pSrcId 
)
inline

Definition at line 973 of file fbxpropertypage.h.

974  {
975  FbxPropertyPage* lDstReferencePage = 0;
976  FbxPropertyConnect* lDstConnect = GetPropertyItem( FBX_TYPE(FbxPropertyConnect),pDstId,&lDstReferencePage );
977  FbxPropertyPage* lSrcReferencePage = 0;
978  FbxPropertyConnect* lSrcConnect = pSrcPage->GetPropertyItem( FBX_TYPE(FbxPropertyConnect),pSrcId,&lSrcReferencePage );
979 
980  // Make sure we have a connection point on both sides of the connection
981  if (lDstConnect && lSrcConnect && lDstReferencePage==this && lSrcReferencePage==pSrcPage) {
982  // Must @@@@@@@ Remove unused connections
983  return lDstConnect->DisconnectSrc(lSrcConnect);
984  }
985  return false;
986  }
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
bool DisconnectSrc(FbxPropertyConnect *pSrc)
bool IsConnectedSrc ( FbxInt  pDstId,
FbxPropertyPage pSrcPage,
FbxInt  pSrcId 
)
inline

Definition at line 988 of file fbxpropertypage.h.

989  {
990  FbxPropertyPage* lDstReferencePage = 0;
991  FbxPropertyConnect* lDstConnect = GetPropertyItem( FBX_TYPE(FbxPropertyConnect),pDstId,&lDstReferencePage );
992  FbxPropertyPage* lSrcReferencePage = 0;
993  FbxPropertyConnect* lSrcConnect = pSrcPage->GetPropertyItem( FBX_TYPE(FbxPropertyConnect),pSrcId,&lSrcReferencePage );
994 
995  // Make sure we have a connection point on both sides of the connection
996  if (lDstConnect && lSrcConnect && lDstReferencePage==this && lSrcReferencePage==pSrcPage) {
997  // Must @@@@@@@ Remove unused connections
998  return lDstConnect->IsConnectedSrc(lSrcConnect);
999  }
1000  return false;
1001  }
bool IsConnectedSrc(FbxPropertyConnect *pSrc)
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
int GetSrcCount ( FbxInt  pId,
FbxConnectionPointFilter pFilter 
)
inline

Definition at line 1003 of file fbxpropertypage.h.

1004  {
1005  FbxPropertyPage* lReferencePage = 0;
1006  FbxPropertyConnect* lPropertyConnect = GetPropertyItem( FBX_TYPE(FbxPropertyConnect),pId,&lReferencePage );
1007 
1008  // Connections are not considered propagated so
1009  // make sure that we own the FbxPropertyConnect objects
1010  return (lPropertyConnect && lReferencePage==this) ? lPropertyConnect->GetSrcCount(pFilter) : 0;
1011  }
int GetSrcCount(FbxConnectionPointFilter *pFilter)
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
bool GetSrc ( FbxInt  pId,
int  pIndex,
FbxConnectionPointFilter pFilter,
FbxPropertyPage **  pSrcPage,
FbxInt pSrcId 
)
inline

Definition at line 1013 of file fbxpropertypage.h.

1014  {
1015  FbxPropertyPage* lReferencePage = 0;
1016  FbxPropertyConnect* lPropertyConnect = GetPropertyItem( FBX_TYPE(FbxPropertyConnect),pId,&lReferencePage );
1017 
1018  // Connections are always overridden
1019  // make sure that we own the FbxPropertyConnect Item
1020  if (lPropertyConnect && lReferencePage==this)
1021  {
1022  FbxPropertyConnect* lSrc = lPropertyConnect->GetSrc(pFilter,pIndex);
1023  if (lSrc)
1024  {
1025  if (pSrcPage) *pSrcPage = lSrc->GetPage();
1026  if (pSrcId) *pSrcId = lSrc->GetPropertyId();
1027  return true;
1028  }
1029  }
1030  return false;
1031  }
FbxPropertyConnect * GetSrc(FbxConnectionPointFilter *pFilter, int pIndex)
FbxPropertyPage * GetPage()
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
bool ConnectDst ( FbxInt  pSrcId,
FbxPropertyPage pDstPage,
FbxInt  pDstId,
FbxConnection::EType  pType 
)
inline

Definition at line 1033 of file fbxpropertypage.h.

1034  {
1035  return pDstPage->ConnectSrc(pDstId,this,pSrcId,pType);
1036  }
bool ConnectSrc(FbxInt pDstId, FbxPropertyPage *pSrcPage, FbxInt pSrcId, FbxConnection::EType pType)
bool DisconnectDst ( FbxInt  pSrcId,
FbxPropertyPage pDstPage,
FbxInt  pDstId 
)
inline

Definition at line 1038 of file fbxpropertypage.h.

1039  {
1040  return pDstPage->DisconnectSrc(pDstId,this,pSrcId);
1041  }
bool DisconnectSrc(FbxInt pDstId, FbxPropertyPage *pSrcPage, FbxInt pSrcId)
bool IsConnectedDst ( FbxInt  pSrcId,
FbxPropertyPage pDstPage,
FbxInt  pDstId 
)
inline

Definition at line 1043 of file fbxpropertypage.h.

1044  {
1045  return pDstPage->IsConnectedSrc(pDstId,this,pSrcId);
1046  }
bool IsConnectedSrc(FbxInt pDstId, FbxPropertyPage *pSrcPage, FbxInt pSrcId)
int GetDstCount ( FbxInt  pId,
FbxConnectionPointFilter pFilter 
)
inline

Definition at line 1048 of file fbxpropertypage.h.

1049  {
1050  FbxPropertyPage* lReferencePage = 0;
1051  FbxPropertyConnect* lPropertyConnect = GetPropertyItem( FBX_TYPE(FbxPropertyConnect),pId,&lReferencePage );
1052 
1053  // Connections are not considered propagated so
1054  // make sure that we own the FbxPropertyConnect objects
1055  return (lPropertyConnect && lReferencePage==this) ? lPropertyConnect->GetDstCount(pFilter) : 0;
1056  }
int GetDstCount(FbxConnectionPointFilter *pFilter)
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
bool GetDst ( FbxInt  pId,
int  pIndex,
FbxConnectionPointFilter pFilter,
FbxPropertyPage **  pDstPage,
FbxInt pDstId 
)
inline

Definition at line 1058 of file fbxpropertypage.h.

1059  {
1060  FbxPropertyPage* lReferencePage = 0;
1061  FbxPropertyConnect* lPropertyConnect = GetPropertyItem( FBX_TYPE(FbxPropertyConnect),pId,&lReferencePage );
1062 
1063  // Connections are always overridden
1064  // make sure that we own the FbxPropertyConnect Item
1065  if (lPropertyConnect && lReferencePage==this)
1066  {
1067  FbxPropertyConnect* lDst = lPropertyConnect->GetDst(pFilter,pIndex);
1068  if (lDst)
1069  {
1070  if (pDstPage) *pDstPage = lDst->GetPage();
1071  if (pDstId) *pDstId = lDst->GetPropertyId();
1072  return true;
1073  }
1074  }
1075  return false;
1076  }
FbxPropertyPage * GetPage()
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
FbxPropertyConnect * GetDst(FbxConnectionPointFilter *pFilter, int pIndex)
bool HasMinMax ( FbxInt  pId,
FbxPropertyInfo::EValueIndex  pValueId 
) const
inline

Definition at line 1082 of file fbxpropertypage.h.

1083  {
1084  FbxPropertyInfo* lPropertyInfo = GetPropertyItem( FBX_TYPE(FbxPropertyInfo),pId );
1085 
1086  return lPropertyInfo ? lPropertyInfo->HasMinMax(pValueId) : false;
1087  }
bool HasMinMax(EValueIndex pId) const
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
bool GetMinMax ( FbxInt  pId,
FbxPropertyInfo::EValueIndex  pValueId,
void *  pValue,
EFbxType  pValueType 
)
inline

Definition at line 1089 of file fbxpropertypage.h.

1090  {
1091  FbxPropertyInfo* lPropertyInfo = GetPropertyItem( FBX_TYPE(FbxPropertyInfo),pId );
1092  // Don't make it writeable (Keep it shared)
1093  return lPropertyInfo ? lPropertyInfo->GetMinMax(pValueId,pValue,pValueType) : false;
1094  }
bool GetMinMax(EValueIndex pId, void *pValue, EFbxType pValueType) const
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
bool SetMinMax ( FbxInt  pId,
FbxPropertyInfo::EValueIndex  pValueId,
const void *  pValue,
EFbxType  pValueType 
)
inline

Definition at line 1096 of file fbxpropertypage.h.

1097  {
1098  FbxPropertyInfo* lPropertyInfo = GetPropertyItem( FBX_TYPE(FbxPropertyInfo),pId );
1099  // Don't make it writeable (Keep it shared)
1100  return lPropertyInfo ? lPropertyInfo->SetMinMax(pValueId,pValue,pValueType) : false;
1101  }
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
bool SetMinMax(EValueIndex pId, const void *pValue, EFbxType pValueType)
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
bool Get ( FbxInt  pId,
void *  pValue,
EFbxType  pValueType 
)
inline

Definition at line 1105 of file fbxpropertypage.h.

1106  {
1107  FbxPropertyValue* lPropertyValue = GetPropertyItem( FBX_TYPE(FbxPropertyValue),pId );
1108  return lPropertyValue ? lPropertyValue->Get(pValue,pValueType) : 0;
1109  }
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
bool Get(void *pValue, EFbxType pValueType)
bool Set ( FbxInt  pId,
const void *  pValue,
EFbxType  pValueType,
bool  pCheckValueEquality 
)
inline

Definition at line 1111 of file fbxpropertypage.h.

1112  {
1113  if( pCheckValueEquality )
1114  {
1115  FbxPropertyPage* lReferencePage = NULL;
1116  FbxPropertyValue* lPropertyValue = GetPropertyItem( FBX_TYPE(FbxPropertyValue),pId,&lReferencePage );
1117  void* lCurrentValue = FbxTypeAllocate( pValueType );
1118  bool lValuesEqual = false;
1119  bool lValueChanged = false;
1120  if( lReferencePage && lReferencePage != this )
1121  {
1122  // this page inherits, so check if we have to override the value.
1123  if( lPropertyValue )
1124  {
1125  lPropertyValue->Get( lCurrentValue, pValueType );
1126  lValuesEqual = FbxTypeCompare( pValue, lCurrentValue, pValueType );
1127  }
1128  }
1129  else
1130  {
1131  FbxPropertyPage* lReferencePage2 = NULL;
1132  FbxPropertyValue* lPropertyValue2 = mInstanceOf ? mInstanceOf->GetPropertyItem( FBX_TYPE(FbxPropertyValue),pId,&lReferencePage2 ) : NULL;
1133  if( lReferencePage2 && lPropertyValue2 )
1134  {
1135  // this page is an override, but there is another page before us that overrides the value
1136  lPropertyValue2->Get( lCurrentValue, pValueType );
1137  lValuesEqual = FbxTypeCompare( pValue, lCurrentValue, pValueType );
1138 
1139  if( lValuesEqual )
1140  {
1142  lValueChanged = true;
1143  }
1144 
1145  }
1146  // else this page is the originator of the property, so no need to check,
1147  }
1148 
1149  FbxTypeDeallocate(pValueType, lCurrentValue);
1150  lCurrentValue = NULL;
1151 
1152  if( lValuesEqual )
1153  return lValueChanged;
1154  }
1155 
1157  return lPropertyValue ? lPropertyValue->Set(pValue,pValueType) : false;
1158  }
bool Set(const void *pValue, EFbxType pValueType)
#define NULL
Definition: fbxarch.h:207
FBXSDK_DLL bool FbxTypeDeallocate(const EFbxType pType, void *pData)
Destroys an fbx primitive type.
Property override this flag from its reference property.
Property inherit this flag from its reference property.
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
T * ChangePropertyItemState(const T *pItemType, FbxInt pIndex, FbxPropertyFlags::EInheritType pInheritType)
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
FBXSDK_DLL bool FbxTypeCompare(const void *pA, const void *pB, const EFbxType pType)
Compare two values of the same type.
FBXSDK_DLL void * FbxTypeAllocate(const EFbxType pType)
Creates a fbx primitive type and initializes its memory.
bool Get(void *pValue, EFbxType pValueType)
FbxPropertyFlags::EInheritType GetValueInherit ( FbxInt  pId,
bool  pCheckInstanceOf 
) const
inline

Definition at line 1160 of file fbxpropertypage.h.

1161  {
1162  FbxPropertyPage* lReferencePage = NULL;
1163  GetPropertyItem(FBX_TYPE(FbxPropertyValue), pId, &lReferencePage);
1164 
1165  // check one level
1166  if( !pCheckInstanceOf )
1167  {
1168  return lReferencePage == this ? FbxPropertyFlags::eOverride : FbxPropertyFlags::eInherit;
1169  }
1170  else
1171  {
1172  if( lReferencePage == this ) return FbxPropertyFlags::eOverride; // this page is either an override, or the originator
1173  else if( !lReferencePage->mInstanceOf ) return FbxPropertyFlags::eInherit; // the reference is the class root, so we must be inheriting
1174 
1175  // The reference page is not the class root, might be another override, or the originator.
1176  FbxPropertyValue* lPropertyValue = lReferencePage->mInstanceOf->GetPropertyItem( FBX_TYPE(FbxPropertyValue), pId );
1177 
1178  // if lReferencePage->mInstanceOf has the property value,
1179  // lReferencePage is an override
1180  // else
1181  // its the originator, so this page inherits from it.
1182  return lPropertyValue ? FbxPropertyFlags::eOverride : FbxPropertyFlags::eInherit;
1183  }
1184  }
#define NULL
Definition: fbxarch.h:207
Property override this flag from its reference property.
Property inherit this flag from its reference property.
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
bool SetValueInherit ( FbxInt  pId,
FbxPropertyFlags::EInheritType  pType 
)
inline

Definition at line 1186 of file fbxpropertypage.h.

1187  {
1188  // no support for this mode yet
1189  if( FbxPropertyFlags::eDeleted == pType )
1190  return false;
1191 
1193 
1194  // Above call doesn't return error codes, so just check that we match types.
1195  return GetValueInherit(pId, false) == pType;
1196  }
FbxPropertyFlags::EInheritType GetValueInherit(FbxInt pId, bool pCheckInstanceOf) const
T * ChangePropertyItemState(const T *pItemType, FbxInt pIndex, FbxPropertyFlags::EInheritType pInheritType)
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
Property has been deleted, so inheritance is invalid.
bool GetDefaultValue ( FbxInt  pId,
void *  pValue,
EFbxType  pValueType 
) const
inline

Definition at line 1198 of file fbxpropertypage.h.

1199  {
1201  FbxPropertyValue* lPropertyValue = lReferencePage ? lReferencePage->GetPropertyItem( FBX_TYPE(FbxPropertyValue), pId ) : NULL;
1202 
1203  return lPropertyValue ? lPropertyValue->Get( pValue, pValueType ) : false;
1204  }
#define NULL
Definition: fbxarch.h:207
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
FbxPropertyPage * GetFirstPropertyItem(FbxInt pId, const T *pItem) const
bool Get(void *pValue, EFbxType pValueType)
bool Set ( FbxInt  pId,
const T &  pValue 
)
inline

Definition at line 1208 of file fbxpropertypage.h.

1208 { return Set( pId,&pValue,FbxTypeOf(pValue),true ); }
EFbxType FbxTypeOf(const FbxChar &)
bool Set(FbxInt pId, const void *pValue, EFbxType pValueType, bool pCheckValueEquality)
T Get ( FbxInt  pId,
const T *  pFBX_TYPE 
)
inline

Definition at line 1209 of file fbxpropertypage.h.

1209 { T lValue; Get( pId,&lValue,FbxTypeOf(lValue) ); return lValue; }
bool Get(FbxInt pId, void *pValue, EFbxType pValueType)
EFbxType FbxTypeOf(const FbxChar &)
void SetDataPtr ( void *  pDataPtr)
inline

Definition at line 1212 of file fbxpropertypage.h.

1212 { mDataPtr = pDataPtr; }
void* GetDataPtr ( ) const
inline

Definition at line 1213 of file fbxpropertypage.h.

1213 { return mDataPtr; }
void PushPropertiesToParentInstance ( )
inline

Definition at line 1217 of file fbxpropertypage.h.

1218  {
1219  if (mInstanceOf) {
1220  const int lCount = GetPropertyEntryCount();
1221  // push the existing properties into the parent
1222  // ----------------------------------------------
1223  for( int i = 0; i < lCount; ++i )
1224  {
1225  FbxPropertyEntry* lParentEntry = mInstanceOf->ChangePropertyEntryState( (FbxInt)i,FbxPropertyFlags::eOverride );
1226  FbxPropertyEntry* lEntry = GetPropertyEntry( (FbxInt)i );
1227 
1228  if( !lParentEntry )
1229  {
1230  lParentEntry = FbxPropertyEntry::Create( lEntry->GetParentId(), 0, 0, 0 );
1231  mInstanceOf->mEntryMap.Insert( i, lParentEntry );
1232 
1233  //mInstanceOf->AddChild(i);
1234 
1235  }
1236 
1237  FBX_ASSERT( lParentEntry );
1238 
1239  // Add it to the parent
1240  // Don't touch the connections
1241  // -----------------------------------------
1242  if (lParentEntry) {
1243  lParentEntry->Set( lEntry->Get(FBX_TYPE(FbxPropertyInfo)) );
1244  lParentEntry->Set( lEntry->Get(FBX_TYPE(FbxPropertyValue)) );
1245  lParentEntry->Set( lEntry->Get(FBX_TYPE(FbxPropertyFlags)) );
1246  }
1247 
1248  /*
1249  else {
1250  mInstanceOf->Add(
1251  lEntry->GetParentId(),
1252  lEntry->Get(FBX_TYPE(FbxPropertyInfo)), // The info
1253  lEntry->Get(FBX_TYPE(FbxPropertyValue)), // The Value
1254  0, // The connections
1255  false,
1256  false
1257  );
1258  }
1259  */
1260 
1261  // Empty the current entry
1262  // Don't touch the connections
1263  // -----------------------------------------
1267  }
1268  }
1269  }
FbxPropertyInfo * Get(const FbxPropertyInfo *)
FbxPair< RecordType *, bool > Insert(const KeyType &pKey, const ValueType &pValue)
Insert a key-value pair.
Definition: fbxmap.h:119
void Set(FbxPropertyInfo *pInfo)
Property override this flag from its reference property.
static FbxPropertyEntry * Create(FbxInt pParentId, FbxPropertyInfo *pInfo, FbxPropertyValue *pValue, FbxPropertyConnect *pConnect)
Property inherit this flag from its reference property.
T * ChangePropertyItemState(const T *pItemType, FbxInt pIndex, FbxPropertyFlags::EInheritType pInheritType)
FbxInt GetParentId()
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
signed int FbxInt
Definition: fbxtypes.h:39
const FbxPropertyPage* GetInstanceOf ( ) const
inline

Definition at line 1271 of file fbxpropertypage.h.

1271 { return mInstanceOf; }
FbxPropertyPage* GetInstanceOf ( )
inline

Definition at line 1272 of file fbxpropertypage.h.

1272 { return mInstanceOf; }
const FbxArray<FbxPropertyPage*>& GetInstances ( ) const
inline

Definition at line 1274 of file fbxpropertypage.h.

1274 { return mInstances; }
FbxArray<FbxPropertyPage*>& GetInstances ( )
inline

Definition at line 1275 of file fbxpropertypage.h.

1275 { return mInstances; }
FbxPropertyFlags::EFlags GetFlags ( FbxInt  pId = FBXSDK_PROPERTY_ID_ROOT) const
inline

Definition at line 1280 of file fbxpropertypage.h.

1281  {
1282  FbxPropertyPage* lFoundIn = NULL;
1283  FbxPropertyFlags* lPropertyFlags = GetPropertyItem( FBX_TYPE(FbxPropertyFlags), pId, &lFoundIn );
1285 
1286  if( lPropertyFlags )
1287  {
1288  if( !mInstanceOf ) // no inheritance.
1289  lFlags = lPropertyFlags->GetFlags();
1290  else
1291  {
1292  lFlags = mInstanceOf->GetFlags(pId);
1293  lFlags = lPropertyFlags->GetMergedFlags(lFlags);
1294  }
1295  }
1296  return lFlags;
1297  }
FbxPropertyFlags::EFlags GetFlags() const
EFlags
Property flags that affect their behaviors.
#define NULL
Definition: fbxarch.h:207
FbxPropertyFlags::EFlags GetMergedFlags(FbxPropertyFlags::EFlags pFlags) const
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
FbxPropertyFlags::EFlags GetFlags(FbxInt pId=FBXSDK_PROPERTY_ID_ROOT) const
bool ModifyFlags ( FbxInt  pId = FBXSDK_PROPERTY_ID_ROOT,
FbxPropertyFlags::EFlags  pFlags = FbxPropertyFlags::eNone,
bool  pValue = true,
bool  pCheckFlagEquality = true 
)
inline

Definition at line 1299 of file fbxpropertypage.h.

1300  {
1301  if( pCheckFlagEquality )
1302  {
1303  FbxPropertyPage* lFoundIn = NULL;
1304  FbxPropertyFlags* lFlag = GetPropertyItem( FBX_TYPE(FbxPropertyFlags), pId, &lFoundIn );
1305 
1306  if( lFlag )
1307  {
1308  if( lFoundIn == this )
1309  {
1310  // set them in us.
1311  lFlag->ModifyFlags( pFlags, pValue );
1312 
1313  // we override this entry, check if we need to revert
1314  FbxPropertyFlags* lInheritedFlags = mInstanceOf ? mInstanceOf->GetPropertyItem( FBX_TYPE(FbxPropertyFlags), pId ) : NULL;
1315  if( lInheritedFlags && lInheritedFlags->Equal( *lFlag, pFlags ) )
1316  {
1317  lFlag->UnsetMask( pFlags );
1318 
1319  if( lFlag->GetMask() == 0 )
1321 
1322  return true;
1323  }
1324  }
1325  else
1326  {
1327  // its not us. Just check if we need to set.
1328  FbxPropertyFlags lNewValues( pFlags );
1329  if( lFlag->Equal( lNewValues, pFlags ) )
1330  return true;
1331  }
1332  }
1333  }
1334 
1336  return lPropertyFlags ? lPropertyFlags->ModifyFlags( pFlags, pValue ) : false;
1337  }
bool UnsetMask(FbxPropertyFlags::EFlags pFlags)
#define NULL
Definition: fbxarch.h:207
bool ModifyFlags(FbxPropertyFlags::EFlags pFlags, bool pValue)
Property override this flag from its reference property.
Property inherit this flag from its reference property.
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
T * ChangePropertyItemState(const T *pItemType, FbxInt pIndex, FbxPropertyFlags::EInheritType pInheritType)
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
FbxPropertyFlags::EFlags GetMask() const
bool Equal(const FbxPropertyFlags &pOther, FbxPropertyFlags::EFlags pFlags) const
FbxPropertyFlags::EInheritType GetFlagsInheritType ( FbxPropertyFlags::EFlags  pFlags,
bool  pCheckInstanceOf,
FbxInt  pId = FBXSDK_PROPERTY_ID_ROOT 
) const
inline

Definition at line 1339 of file fbxpropertypage.h.

1340  {
1341  FbxPropertyPage* lFoundIn = NULL;
1342  FbxPropertyFlags* lPropertyFlags = GetPropertyItem( FBX_TYPE(FbxPropertyFlags), pId, &lFoundIn );
1343 
1344  if( !pCheckInstanceOf )
1345  return lFoundIn != this ? FbxPropertyFlags::eInherit : ( lPropertyFlags ? lPropertyFlags->GetFlagsInheritType(pFlags) : FbxPropertyFlags::eInherit );
1346  else
1347  {
1348  // This code basically counts the number of overrides for the
1349  // given flags. The original entry is always considered an override.
1350  // so if we see more than one, something overrode the original.
1351  // and thus we are an override.
1352  FbxPropertyPage* lRefPage = lFoundIn;
1353  bool lFoundOverride = false;
1354  while( lRefPage )
1355  {
1356  lPropertyFlags = lRefPage->GetPropertyItem( FBX_TYPE(FbxPropertyFlags), pId );
1357 
1358  if( !lPropertyFlags )
1359  break; // gone too far, break.
1360 
1361  if( lPropertyFlags->GetFlagsInheritType( pFlags ) == FbxPropertyFlags::eOverride )
1362  {
1363  if( this == lRefPage || lFoundOverride )
1364  return FbxPropertyFlags::eOverride; // found two overrides or this page is the override.
1365  else
1366  lFoundOverride = true; // signal that we found the first override.
1367  }
1368  lRefPage = lRefPage->mInstanceOf;
1369  }
1370 
1372  }
1373  }
#define NULL
Definition: fbxarch.h:207
Property override this flag from its reference property.
Property inherit this flag from its reference property.
FbxPropertyFlags::EInheritType GetFlagsInheritType(FbxPropertyFlags::EFlags pFlags) const
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
bool SetFlagsInheritType ( FbxPropertyFlags::EInheritType  pInheritType,
FbxPropertyFlags::EFlags  pFlags,
FbxInt  pId = FBXSDK_PROPERTY_ID_ROOT 
)
inline

Definition at line 1375 of file fbxpropertypage.h.

1376  {
1377  FbxPropertyPage* lFoundIn = NULL;
1378  FbxPropertyFlags* lPropertyFlags = NULL;
1379 
1380  if( FbxPropertyFlags::eOverride == pInheritType )
1381  {
1383 
1384  // we should initialize our flag to the inherited value, if any.
1385  FbxPropertyFlags* lParentFlags = mInstanceOf ? mInstanceOf->GetPropertyItem( FBX_TYPE(FbxPropertyFlags), pId ) : NULL;
1386  if( lParentFlags && lPropertyFlags )
1387  {
1388  FbxPropertyFlags::EFlags lParentValues = lParentFlags->GetFlags();
1389  lPropertyFlags->SetFlags( pFlags, lParentValues );
1390  return lPropertyFlags->SetMask( pFlags );
1391  }
1392 
1393  return false;
1394  }
1395  else if( FbxPropertyFlags::eInherit == pInheritType )
1396  {
1397  lPropertyFlags = GetPropertyItem(FBX_TYPE(FbxPropertyFlags), pId, &lFoundIn);
1398  if( !lPropertyFlags ) return false;
1399  if( lFoundIn != this ) return true; // not us
1400  lPropertyFlags->UnsetMask( pFlags );
1401  if( lPropertyFlags->GetMask() == 0 ) // revert
1403 
1404  return true;
1405  }
1406  return false;
1407  }
bool UnsetMask(FbxPropertyFlags::EFlags pFlags)
FbxPropertyFlags::EFlags GetFlags() const
EFlags
Property flags that affect their behaviors.
#define NULL
Definition: fbxarch.h:207
bool SetMask(FbxPropertyFlags::EFlags pFlags)
Property override this flag from its reference property.
Property inherit this flag from its reference property.
bool SetFlags(FbxPropertyFlags::EFlags pMask, FbxPropertyFlags::EFlags pFlags)
T * GetPropertyItem(const T *pItemType, FbxInt pIndex, FbxPropertyPage **pFoundIn=0) const
T * ChangePropertyItemState(const T *pItemType, FbxInt pIndex, FbxPropertyFlags::EInheritType pInheritType)
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
FbxPropertyFlags::EFlags GetMask() const
void BeginCreateOrFindProperty ( )
inline

Definition at line 1409 of file fbxpropertypage.h.

1410  {
1411  if( 0 == mNameMap.mFirst )
1412  {
1413  mNameMap.mSecond.Reserve(20);
1414 
1415  // push the existing properties into the map. Note: this includes the root property!
1416  FbxInt lFoundId = FBXSDK_PROPERTY_ID_ROOT;
1417  FbxPropertyEntry* lEntry = GetPropertyEntry(lFoundId);
1418  while(lFoundId != FBXSDK_PROPERTY_ID_NULL)
1419  {
1420  FbxPropertyInfo* lInfo = lEntry->Get(FBX_TYPE(FbxPropertyInfo));
1421  //FBX_ASSERT( lInfo );
1422  if (lInfo)
1423  {
1424  mNameMap.mSecond.Insert(FbxNameMapKey(lEntry->GetParentId(), lInfo->GetName()), lFoundId);
1425  }
1426  lFoundId = GetMinimumPropertyIdAndEntry(lFoundId, &lEntry);
1427  }
1428  mNameMap.mFirst++;
1429  }
1430  }
#define FBXSDK_PROPERTY_ID_NULL
FbxPropertyInfo * Get(const FbxPropertyInfo *)
FbxStringSymbol GetName() const
FbxPair< RecordType *, bool > Insert(const KeyType &pKey, const ValueType &pValue)
Insert a key-value pair.
Definition: fbxmap.h:119
FbxPair< FbxInt, const char * > FbxNameMapKey
void Reserve(unsigned int pRecordCount)
Preallocate memory.
Definition: fbxmap.h:104
FbxInt GetParentId()
#define FBX_TYPE(class)
Convert the class type parameter into a C class parameter for other function inputs.
Definition: fbxobject.h:1531
#define FBXSDK_PROPERTY_ID_ROOT
Second mSecond
The second object in the pair.
Definition: fbxpair.h:57
signed int FbxInt
Definition: fbxtypes.h:39
First mFirst
The first object in the pair.
Definition: fbxpair.h:56
void EndCreateOrFindProperty ( )
inline

Definition at line 1432 of file fbxpropertypage.h.

1433  {
1434  if( mNameMap.mFirst > 0 )
1435  {
1436  if( --(mNameMap.mFirst) == 0 )
1437  mNameMap.mSecond.Clear();
1438  }
1439  }
Second mSecond
The second object in the pair.
Definition: fbxpair.h:57
void Clear()
Clear the map.
Definition: fbxmap.h:133
First mFirst
The first object in the pair.
Definition: fbxpair.h:56
bool Is ( FbxPropertyPage pPage)
inlineprotected

Definition at line 1539 of file fbxpropertypage.h.

1540  {
1541  // @@@@@@@@@@@@@@@ Must complete for sub types
1542  return this==pPage;
1543  }

Friends And Related Function Documentation

friend class FbxPropertyHandle
friend

Definition at line 1731 of file fbxpropertypage.h.


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