fbxsdk/core/fbxproperty.h Source File

fbxproperty.h
Go to the documentation of this file.
1 /****************************************************************************************
2 
3  Copyright (C) 2014 Autodesk, Inc.
4  All rights reserved.
5 
6  Use of this software is subject to the terms of the Autodesk license agreement
7  provided at the time of installation or download, or which otherwise accompanies
8  this software in either electronic or hard copy form.
9 
10 ****************************************************************************************/
11 
13 #ifndef _FBXSDK_CORE_PROPERTY_H_
14 #define _FBXSDK_CORE_PROPERTY_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
18 #include <fbxsdk/core/fbxquery.h>
24 
25 #include <fbxsdk/fbxsdk_nsbegin.h>
26 
27 class FbxObject;
28 class FbxAnimStack;
29 class FbxAnimLayer;
30 class FbxAnimCurveNode;
31 class FbxAnimCurve;
32 class FbxAnimEvaluator;
33 
38 {
39 public:
52  static FbxProperty Create(const FbxProperty& pCompoundProperty, const FbxDataType& pDataType, const char* pName, const char* pLabel="", bool pCheckForDup=true, bool* pWasFound=NULL);
53 
62  static FbxProperty Create(FbxObject* pObject, const FbxDataType& pDataType, const char* pName, const char* pLabel="", bool pCheckForDup=true, bool* pWasFound=NULL);
63 
70  static FbxProperty CreateFrom(const FbxProperty& pCompoundProperty, FbxProperty& pFromProperty, bool pCheckForDup=true);
71 
78  static FbxProperty CreateFrom(FbxObject* pObject, FbxProperty& pFromProperty, bool pCheckForDup=true);
79 
82  void Destroy();
83 
87  void DestroyRecursively();
88 
92  void DestroyChildren();
93 
96  FbxProperty();
97 
101  FbxProperty(const FbxProperty& pProperty);
102 
106  FbxProperty(const FbxPropertyHandle& pPropertyHandle);
107 
110  ~FbxProperty();
112 
120  FbxDataType GetPropertyDataType() const;
121 
125  FbxString GetName() const;
126 
130  const char* GetNameAsCStr() const;
131 
135  FbxString GetHierarchicalName() const;
136 
146  FbxString GetLabel(bool pReturnNameIfEmpty=true) const;
147 
148 
152  void SetLabel(const FbxString& pLabel);
153 
157  FbxObject* GetFbxObject() const;
159 
167  void SetUserTag(int pTag);
168 
170  int GetUserTag();
171 
175  void SetUserDataPtr(void* pUserData);
176 
180  void* GetUserDataPtr();
182 
191  void ModifyFlag(FbxPropertyFlags::EFlags pFlag, bool pValue);
192 
197  bool GetFlag(FbxPropertyFlags::EFlags pFlag) const;
198 
202  FbxPropertyFlags::EFlags GetFlags() const;
203 
208  FbxPropertyFlags::EInheritType GetFlagInheritType( FbxPropertyFlags::EFlags pFlag ) const;
209 
215  bool SetFlagInheritType( FbxPropertyFlags::EFlags pFlag, FbxPropertyFlags::EInheritType pType );
216 
221  bool ModifiedFlag( FbxPropertyFlags::EFlags pFlag ) const;
223 
232  FbxProperty& operator= (const FbxProperty& pProperty);
233 
238  bool operator== (const FbxProperty& pProperty) const;
239 
244  bool operator!= (const FbxProperty& pProperty) const;
245 
249  bool operator< (const FbxProperty& pProperty) const;
250 
254  bool operator> (const FbxProperty& pProperty) const;
255 
260  inline bool operator== (int pValue) const { return (pValue == 0) ? !IsValid() : IsValid(); }
261 
266  inline bool operator!= (int pValue) const { return (pValue != 0) ? !IsValid() : IsValid(); }
267 
272  bool CompareValue(const FbxProperty& pProperty) const;
274 
279  bool CopyValue(const FbxProperty& pProperty);
280 
289  template <class T> inline T Get() const { T lValue; Get(&lValue, FbxTypeOf(lValue)); return lValue; }
290 
295  template <class T> inline bool Set(const T& pValue){ return Set(&pValue, FbxTypeOf(pValue)); }
296 
300  bool IsValid() const;
301 
310  static bool HasDefaultValue(FbxProperty& pProperty);
311 
317  FbxPropertyFlags::EInheritType GetValueInheritType() const;
318 
329  bool SetValueInheritType( FbxPropertyFlags::EInheritType pType );
330 
338  bool Modified() const;
340 
361  bool SupportSetLimitAsDouble() const;
362 
367  bool SetMinLimit(double pMin);
368 
373  bool HasMinLimit() const;
374 
378  double GetMinLimit() const;
379 
384  bool HasMaxLimit() const;
385 
390  bool SetMaxLimit(double pMax);
391 
395  double GetMaxLimit() const;
396 
402  bool SetLimits(double pMin, double pMax);
404 
415  int AddEnumValue(const char* pStringValue);
416 
424  void InsertEnumValue(int pIndex, const char* pStringValue);
425 
430  int GetEnumCount() const;
431 
440  void SetEnumValue(int pIndex, const char* pStringValue);
441 
446  void RemoveEnumValue(int pIndex);
447 
452  const char* GetEnumValue(int pIndex) const;
454 
462  inline bool IsRoot() const { return mPropertyHandle.IsRoot(); }
463 
468  inline bool IsChildOf(const FbxProperty& pParent) const { return mPropertyHandle.IsChildOf(pParent.mPropertyHandle); }
469 
474  inline bool IsDescendentOf(const FbxProperty& pAncestor) const { return mPropertyHandle.IsDescendentOf(pAncestor.mPropertyHandle); }
475 
479  inline FbxProperty GetParent() const { return FbxProperty(mPropertyHandle.GetParent()); }
480 
485  FBX_DEPRECATED bool SetParent(const FbxProperty& pOther);
486 
490  inline FbxProperty GetChild() const { return FbxProperty(mPropertyHandle.GetChild()); }
491 
495  inline FbxProperty GetSibling() const { return FbxProperty(mPropertyHandle.GetSibling()); }
496 
500  inline FbxProperty GetFirstDescendent() const { return FbxProperty(mPropertyHandle.GetFirstDescendent()); }
501 
506  inline FbxProperty GetNextDescendent(const FbxProperty& pProperty) const { return FbxProperty(mPropertyHandle.GetNextDescendent(pProperty.mPropertyHandle)); }
507 
514  inline FbxProperty Find (const char* pName, bool pCaseSensitive = true) const { return FbxProperty(mPropertyHandle.Find(pName,pCaseSensitive)); }
515 
523  inline FbxProperty Find (const char* pName, const FbxDataType& pDataType, bool pCaseSensitive = true) const { return FbxProperty(mPropertyHandle.Find(pName,pDataType.GetTypeInfoHandle(),pCaseSensitive)); }
524 
531  inline FbxProperty FindHierarchical (const char* pName, bool pCaseSensitive = true) const { return FbxProperty(mPropertyHandle.Find(pName,sHierarchicalSeparator,pCaseSensitive)); }
532 
540  inline FbxProperty FindHierarchical (const char* pName, const FbxDataType& pDataType, bool pCaseSensitive = true) const { return FbxProperty(mPropertyHandle.Find(pName,sHierarchicalSeparator,pDataType.GetTypeInfoHandle(),pCaseSensitive)); }
542 
547  inline void BeginCreateOrFindProperty(){ mPropertyHandle.BeginCreateOrFindProperty(); }
549 
551  inline void EndCreateOrFindProperty(){ mPropertyHandle.EndCreateOrFindProperty(); }
552 
555  {
556  public:
560  FbxPropertyNameCache(const FbxProperty& prop) : mProp(const_cast<FbxProperty&>(prop)){ mProp.BeginCreateOrFindProperty(); }
561 
563  ~FbxPropertyNameCache(){ mProp.EndCreateOrFindProperty(); }
564 
565  private:
566  FbxProperty& mProp;
567  FbxPropertyNameCache& operator=(const FbxPropertyNameCache& pOther){ mProp = pOther.mProp; mProp.BeginCreateOrFindProperty(); return *this; }
568  };
570 
579  FBX_DEPRECATED bool SetArraySize( int pSize, bool pVariableArray );
580 
582  FBX_DEPRECATED int GetArraySize() const;
583 
588  FBX_DEPRECATED FbxProperty GetArrayItem(int pIndex) const;
589 
594  FBX_DEPRECATED inline FbxProperty operator[](int /*pIndex*/) const { return FbxProperty(); }
596 
603  FbxAnimEvaluator* GetAnimationEvaluator() const;
604 
608  bool IsAnimated(FbxAnimLayer* pAnimLayer=NULL) const;
609 
615  template <class T> T EvaluateValue(const FbxTime& pTime=FBXSDK_TIME_INFINITE, bool pForceEval=false);
616 
621  FbxPropertyValue& EvaluateValue(const FbxTime& pTime=FBXSDK_TIME_INFINITE, bool pForceEval=false);
622 
630  FbxAnimCurveNode* CreateCurveNode(FbxAnimLayer* pAnimLayer);
631 
636  FbxAnimCurveNode* GetCurveNode(bool pCreate=false);
637 
644  FbxAnimCurveNode* GetCurveNode(FbxAnimStack* pAnimStack, bool pCreate=false);
645 
651  FbxAnimCurveNode* GetCurveNode(FbxAnimLayer* pAnimLayer, bool pCreate=false);
652 
662  inline FbxAnimCurve* GetCurve(FbxAnimLayer* pAnimLayer, bool pCreate=false)
663  {
664  return GetCurve(pAnimLayer, GetName(), NULL, pCreate);
665  }
666 
677  inline FbxAnimCurve* GetCurve(FbxAnimLayer* pAnimLayer, const char* pChannel, bool pCreate=false)
678  {
679  return GetCurve(pAnimLayer, GetName(), pChannel, pCreate);
680  }
681 
695  FbxAnimCurve* GetCurve(FbxAnimLayer* pAnimLayer, const char* pName, const char* pChannel, bool pCreate);
697 
707  bool ConnectSrcObject(FbxObject* pObject, FbxConnection::EType pType=FbxConnection::eNone);
708 
713  bool IsConnectedSrcObject(const FbxObject* pObject) const;
714 
719  bool DisconnectSrcObject(FbxObject* pObject);
720 
724  bool DisconnectAllSrcObject();
725 
730  bool DisconnectAllSrcObject(const FbxCriteria& pCriteria);
731 
736  FBX_DEPRECATED bool DisconnectAllSrcObject(const FbxClassId& pClassId);
737 
741  int GetSrcObjectCount() const;
742 
747  int GetSrcObjectCount(const FbxCriteria& pCriteria) const;
748 
753  FBX_DEPRECATED int GetSrcObjectCount(const FbxClassId& pClassId) const;
754 
759  FbxObject* GetSrcObject(const int pIndex=0) const;
760 
766  FbxObject* GetSrcObject(const FbxCriteria& pCriteria, const int pIndex=0) const;
767 
773  FBX_DEPRECATED FbxObject* GetSrcObject(const FbxClassId& pClassId, const int pIndex=0) const;
774 
780  FbxObject* FindSrcObject(const char* pName, const int pStartIndex=0) const;
781 
788  FbxObject* FindSrcObject(const FbxCriteria& pCriteria, const char* pName, const int pStartIndex=0) const;
789 
796  FBX_DEPRECATED FbxObject* FindSrcObject(const FbxClassId& pClassId, const char* pName, const int pStartIndex=0) const;
797 
802  template <class T> inline bool DisconnectAllSrcObject(){ return DisconnectAllSrcObject(FbxCriteria::ObjectType(T::ClassId)); }
803 
809  template <class T> inline bool DisconnectAllSrcObject(const FbxCriteria& pCriteria){ return DisconnectAllSrcObject(FbxCriteria::ObjectType(T::ClassId) && pCriteria); }
810 
815  template <class T> inline int GetSrcObjectCount() const { return GetSrcObjectCount(FbxCriteria::ObjectType(T::ClassId)); }
816 
822  template <class T> inline int GetSrcObjectCount(const FbxCriteria& pCriteria) const { return GetSrcObjectCount(FbxCriteria::ObjectType(T::ClassId) && pCriteria); }
823 
829  template <class T> inline T* GetSrcObject(const int pIndex=0) const { return (T*)GetSrcObject(FbxCriteria::ObjectType(T::ClassId), pIndex); }
830 
837  template <class T> inline T* GetSrcObject(const FbxCriteria& pCriteria, const int pIndex=0) const { return (T*)GetSrcObject(FbxCriteria::ObjectType(T::ClassId) && pCriteria, pIndex); }
838 
845  template <class T> inline T* FindSrcObject(const char* pName, const int pStartIndex=0) const { return (T*)FindSrcObject(FbxCriteria::ObjectType(T::ClassId), pName, pStartIndex); }
846 
854  template <class T> inline T* FindSrcObject(const FbxCriteria& pCriteria, const char* pName, const int pStartIndex=0) const { return (T*)FindSrcObject(FbxCriteria::ObjectType(T::ClassId) && pCriteria, pName, pStartIndex); }
855 
861  bool ConnectDstObject(FbxObject* pObject, FbxConnection::EType pType=FbxConnection::eNone);
862 
867  bool IsConnectedDstObject(const FbxObject* pObject) const;
868 
873  bool DisconnectDstObject(FbxObject* pObject);
874 
878  bool DisconnectAllDstObject();
879 
884  bool DisconnectAllDstObject(const FbxCriteria& pCriteria);
885 
890  FBX_DEPRECATED bool DisconnectAllDstObject(const FbxClassId& pClassId);
891 
895  int GetDstObjectCount() const;
896 
901  int GetDstObjectCount(const FbxCriteria& pCriteria) const;
902 
907  FBX_DEPRECATED int GetDstObjectCount(const FbxClassId& pClassId) const;
908 
913  FbxObject* GetDstObject(const int pIndex=0) const;
914 
920  FbxObject* GetDstObject(const FbxCriteria& pCriteria, const int pIndex=0) const;
921 
927  FBX_DEPRECATED FbxObject* GetDstObject(const FbxClassId& pClassId, const int pIndex=0) const;
928 
934  FbxObject* FindDstObject(const char* pName, const int pStartIndex=0) const;
935 
942  FbxObject* FindDstObject(const FbxCriteria& pCriteria, const char* pName, const int pStartIndex=0) const;
943 
950  FBX_DEPRECATED FbxObject* FindDstObject(const FbxClassId& pClassId, const char* pName, const int pStartIndex=0) const;
951 
956  template <class T> inline bool DisconnectAllDstObject(){ return DisconnectAllDstObject(FbxCriteria::ObjectType(T::ClassId)); }
957 
963  template <class T> inline bool DisconnectAllDstObject(const FbxCriteria& pCriteria){ return DisconnectAllDstObject(FbxCriteria::ObjectType(T::ClassId) && pCriteria); }
964 
969  template <class T> inline int GetDstObjectCount() const { return GetDstObjectCount(FbxCriteria::ObjectType(T::ClassId)); }
970 
976  template <class T> inline int GetDstObjectCount(const FbxCriteria& pCriteria) const { return GetDstObjectCount(FbxCriteria::ObjectType(T::ClassId) && pCriteria); }
977 
983  template <class T> inline T* GetDstObject(const int pIndex=0) const { return (T*)GetDstObject(FbxCriteria::ObjectType(T::ClassId), pIndex); }
984 
991  template <class T> inline T* GetDstObject(const FbxCriteria& pCriteria, const int pIndex=0) const { return (T*)GetDstObject(FbxCriteria::ObjectType(T::ClassId) && pCriteria, pIndex); }
992 
999  template <class T> inline T* FindDstObject(const char* pName, const int pStartIndex=0) const { return (T*)FindDstObject(FbxCriteria::ObjectType(T::ClassId), pName, pStartIndex); }
1000 
1008  template <class T> inline T* FindDstObject(const FbxCriteria& pCriteria, const char* pName, const int pStartIndex=0) const { return (T*)FindDstObject(FbxCriteria::ObjectType(T::ClassId) && pCriteria, pName, pStartIndex); }
1010 
1015  // Properties
1020  bool ConnectSrcProperty(const FbxProperty& pProperty);
1021 
1026  bool IsConnectedSrcProperty(const FbxProperty& pProperty);
1027 
1032  bool DisconnectSrcProperty(const FbxProperty& pProperty);
1033 
1037  int GetSrcPropertyCount() const;
1038 
1043  bool ConnectDstProperty(const FbxProperty& pProperty);
1044 
1049  bool IsConnectedDstProperty(const FbxProperty& pProperty);
1050 
1055  bool DisconnectDstProperty(const FbxProperty& pProperty);
1056 
1060  int GetDstPropertyCount() const;
1061 
1063  void ClearConnectCache();
1064 
1069  FbxProperty GetSrcProperty(const int pIndex=0) const;
1070 
1076  FbxProperty FindSrcProperty(const char* pName, const int pStartIndex=0) const;
1077 
1082  FbxProperty GetDstProperty(const int pIndex=0) const;
1083 
1089  FbxProperty FindDstProperty(const char* pName, const int pStartIndex=0) const;
1091 
1093  static const char* sHierarchicalSeparator;
1094 
1095 /*****************************************************************************************************************************
1096 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
1097 *****************************************************************************************************************************/
1098 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1099 protected:
1100  FbxProperty(FbxObject* pObject, const char* pName, const FbxDataType& pDataType=FbxDataType(), const char* pLabel="");
1101  FbxProperty(const FbxProperty& pParent, const char* pName, const FbxDataType& pDataType, const char* pLabel);
1102 
1103  bool Set(const void* pValue, const EFbxType& pValueType, bool pCheckForValueEquality=true);
1104  bool Get(void* pValue, const EFbxType& pValueType) const;
1105 
1106  bool NotifySetRequest();
1107  bool NotifySet();
1108  bool NotifyGet() const;
1109 
1110 private:
1111  inline void* Get() const { FBX_ASSERT_NOW("Cannot get property value as void!"); return NULL; }
1112  inline bool Set(const void* &){ FBX_ASSERT_NOW("Cannot set property value as void!"); return false; }
1113 
1114  bool ConnectSrc(const FbxProperty& pProperty, FbxConnection::EType pType=FbxConnection::eNone);
1115  bool DisconnectSrc(const FbxProperty& pProperty);
1116  bool DisconnectAllSrc();
1117  bool DisconnectAllSrc(const FbxCriteria& pCriteria);
1118  bool IsConnectedSrc(const FbxProperty& pProperty) const;
1119  int GetSrcCount() const;
1120  int GetSrcCount(const FbxCriteria& pCriteria) const;
1121  FbxProperty GetSrc(int pIndex=0) const;
1122  FbxProperty GetSrc(const FbxCriteria& pCriteria, int pIndex=0) const;
1123  FbxProperty FindSrc(const FbxCriteria& pCriteria, const char* pName, int pStartIndex=0) const;
1124 
1125  bool ConnectDst(const FbxProperty& pProperty, FbxConnection::EType pType=FbxConnection::eNone);
1126  bool DisconnectDst(const FbxProperty& pProperty);
1127  bool DisconnectAllDst();
1128  bool DisconnectAllDst(const FbxCriteria& pCriteria);
1129  bool IsConnectedDst(const FbxProperty& pProperty) const;
1130  int GetDstCount() const;
1131  int GetDstCount(const FbxCriteria& pCriteria) const;
1132  FbxProperty GetDst(int pIndex=0) const;
1133  FbxProperty GetDst(const FbxCriteria& pCriteria, int pIndex=0) const;
1134  FbxProperty FindDst(const FbxCriteria& pCriteria, const char* pName, int pStartIndex=0) const;
1135 
1136  mutable FbxPropertyHandle mPropertyHandle;
1137 
1138  friend class FbxObject;
1139  friend class FbxIOSettings;
1140  friend class FbxBindingOperator;
1141  friend class FbxAnimEvalClassic;
1142  friend void FbxMarkObject(FbxObject* pObject, FbxMap<FbxObject*, int>& pObjectDstDisconnectCount, FbxSet<FbxObject*>& pObjectsToDeleted, FbxArray<FbxObject*>& pObjectToDeletedInSequence);
1143  friend void FbxCleanUpConnectionsAtDestructionBoundary(FbxScene* pObject, FbxArray<FbxObject*>& pObjectToDeletedInSequence);
1144 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
1145 };
1146 
1150 template <class T> class FbxPropertyT : public FbxProperty
1151 {
1152 public:
1164  FbxProperty& StaticInit(FbxObject* pObject, const char* pName, const T& pValue, bool pForceSet, FbxPropertyFlags::EFlags pFlags=FbxPropertyFlags::eNone)
1165  {
1166  return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(FbxTypeOf(*((T*)0))), pValue, pForceSet, pFlags);
1167  }
1168 
1177  FbxProperty& StaticInit(FbxObject* pObject, const char* pName, const FbxDataType& pDataType, const T& pValue, bool pForceSet, FbxPropertyFlags::EFlags pFlags=FbxPropertyFlags::eNone)
1178  {
1179  bool lWasFound = false;
1180  *this = Create(pObject, pDataType, pName, "", true, &lWasFound);
1181  if( pForceSet || !lWasFound )
1182  {
1183  ModifyFlag(pFlags, true); // modify the flags before we set the value
1184  FbxProperty::Set(&pValue, FbxTypeOf(pValue), false);
1185  }
1187  return *this;
1188  }
1189 
1198  FbxProperty& StaticInit(FbxProperty pCompound, const char* pName, const FbxDataType& pDataType, const T& pValue, bool pForceSet=true, FbxPropertyFlags::EFlags pFlags=FbxPropertyFlags::eNone)
1199  {
1200  bool lWasFound = false;
1201  *this = Create(pCompound, pDataType, pName, "", true, &lWasFound);
1202  if( pForceSet || !lWasFound )
1203  {
1204  ModifyFlag(pFlags, true); // modify the flags before we set the value
1205  FbxProperty::Set(&pValue, FbxTypeOf(pValue), false);
1206  }
1208  return *this;
1209  }
1211 
1217  FbxPropertyT& Set(const T& pValue){ FbxProperty::Set(&pValue, FbxTypeOf(pValue)); return *this; }
1218 
1221  T Get() const { T lValue; FbxProperty::Get(&lValue, FbxTypeOf(lValue)); return lValue; }
1222 
1226  FbxPropertyT& operator=(const T& pValue){ return Set(pValue); }
1227 
1230  operator T() const { return Get(); }
1232 
1239  T EvaluateValue(const FbxTime& pTime=FBXSDK_TIME_INFINITE, bool pForceEval=false)
1240  {
1241  return GetAnimationEvaluator()-> template GetPropertyValue<T>(*this, pTime, pForceEval);
1242  }
1244 
1245 /*****************************************************************************************************************************
1246 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
1247 *****************************************************************************************************************************/
1248 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1249  FbxPropertyT() : FbxProperty(){}
1250  FbxPropertyT(const FbxProperty& pProperty) : FbxProperty(pProperty){}
1251  ~FbxPropertyT(){}
1252 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
1253 };
1254 
1255 /*****************************************************************************************************************************
1256 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
1257 *****************************************************************************************************************************/
1258 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1259 template <> class FbxPropertyT<FbxReference> : public FbxProperty
1260 {
1261 public:
1262  FbxPropertyT() : FbxProperty(){}
1263  FbxPropertyT(const FbxProperty& pProperty) : FbxProperty(pProperty){}
1264  ~FbxPropertyT(){}
1265 
1266  const FbxProperty& StaticInit(FbxObject* pObject, const char* pName, const FbxReference& pValue, bool pForceSet, FbxPropertyFlags::EFlags pFlags=FbxPropertyFlags::eNone)
1267  {
1268  return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(FbxTypeOf(*((FbxReference*)0))), pValue, pForceSet, pFlags);
1269  }
1270 
1271  const FbxProperty& StaticInit(FbxObject* pObject, const char* pName, const FbxDataType& pDataType, const FbxReference& pValue, bool pForceSet, FbxPropertyFlags::EFlags pFlags=FbxPropertyFlags::eNone)
1272  {
1273  bool lWasFound = false;
1274  *this = Create(pObject, pDataType, pName, "", true, &lWasFound);
1275  if( pForceSet || !lWasFound )
1276  {
1277  ModifyFlag(pFlags, true); // modify the flags before we set the value
1278  Set(pValue); // since we will trigger callbacks in there!
1279  }
1280  ModifyFlag(FbxPropertyFlags::eStatic, true);
1281  return *this;
1282  }
1283 
1284  FbxReference Get() const
1285  {
1286  FbxProperty::NotifyGet();
1287  return GetSrcObject();
1288  }
1289 
1290  FbxPropertyT& Set(const FbxReference& pValue)
1291  {
1292  if( FbxProperty::NotifySetRequest() )
1293  {
1294  DisconnectAllSrcObject();
1295  if( ConnectSrcObject(pValue) )
1296  {
1298  FbxProperty::NotifySet();
1299  }
1300  }
1301  return *this;
1302  }
1303 
1304  operator FbxReference() const
1305  {
1306  return Get();
1307  }
1308 
1309  FbxPropertyT& operator=(const FbxReference& pValue)
1310  {
1311  return Set(pValue);
1312  }
1313 };
1314 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
1315 
1316 #include <fbxsdk/fbxsdk_nsend.h>
1317 
1318 #endif /* _FBXSDK_CORE_PROPERTY_H_ */
T * GetDstObject(const int pIndex=0) const
Returns the destination object of the specified class type at the specified index with which this pro...
Definition: fbxproperty.h:983
The animation layer is a collection of animation curve nodes.
Definition: fbxanimlayer.h:30
FbxAnimCurve * GetCurve(FbxAnimLayer *pAnimLayer, bool pCreate=false)
Get the FbxAnimCurve from the specified animation layer.
Definition: fbxproperty.h:662
An evaluator implementation that behaves like the original FBX SDK (2010 and previous) evaluation sys...
Class to manage property handle.
T Get() const
Gets the value of the property.
Definition: fbxproperty.h:289
int GetSrcObjectCount(const FbxCriteria &pCriteria) const
Returns the number of source objects which are of the specified class type and satisfy the given crit...
Definition: fbxproperty.h:822
FBX SDK environment definition.
FbxProperty GetNextDescendent(const FbxProperty &pProperty) const
Returns the property that follows pProperty that is a descendant of this property.
Definition: fbxproperty.h:506
bool DisconnectAllDstObject(const FbxCriteria &pCriteria)
Disconnects this property from all the destination objects which are of the specified class type and ...
Definition: fbxproperty.h:963
FbxPropertyT & Set(const T &pValue)
Assignment function.
Definition: fbxproperty.h:1217
FbxPropertyT & operator=(const T &pValue)
Assignment operator.
Definition: fbxproperty.h:1226
The Animation stack is a collection of animation layers.
Definition: fbxanimstack.h:37
This class is an composite of animation curves and is called as animation curve node.
T Get() const
Retrieve function.
Definition: fbxproperty.h:1221
EFlags
Property flags that affect their behaviors.
T * GetSrcObject(const int pIndex=0) const
Returns the source object of the specified class type at the specified index.
Definition: fbxproperty.h:829
FbxObject * FbxReference
Definition: fbxtypes.h:55
int GetSrcObjectCount() const
Returns the number of source objects of a specific class type with which this property connects...
Definition: fbxproperty.h:815
void ModifyFlag(FbxPropertyFlags::EFlags pFlag, bool pValue)
Changes the property attribute.
#define NULL
Definition: fbxarch.h:207
FbxAnimCurve * GetCurve(FbxAnimLayer *pAnimLayer, const char *pChannel, bool pCreate=false)
Get the FbxAnimCurve from the specified animation layer.
Definition: fbxproperty.h:677
static FbxProperty Create(const FbxProperty &pCompoundProperty, const FbxDataType &pDataType, const char *pName, const char *pLabel="", bool pCheckForDup=true, bool *pWasFound=NULL)
Creates a runtime property on the specified property.
Utility class to manipulate strings.
Definition: fbxstring.h:66
FbxProperty & StaticInit(FbxObject *pObject, const char *pName, const FbxDataType &pDataType, const T &pValue, bool pForceSet, FbxPropertyFlags::EFlags pFlags=FbxPropertyFlags::eNone)
Creates a property and initializes it using a specific value and flag.
Definition: fbxproperty.h:1177
FBX SDK data type class.
Definition: fbxdatatypes.h:26
bool IsChildOf(const FbxProperty &pParent) const
Judges whether this property is a child of the specified property.
Definition: fbxproperty.h:468
static const char * sHierarchicalSeparator
Hierarchical separator of properties.
Definition: fbxproperty.h:1093
int GetDstObjectCount(const FbxCriteria &pCriteria) const
Returns the number of destination objects which are of the specified class type and satisfy the given...
Definition: fbxproperty.h:976
FBXSDK_DLL const FbxDataType & FbxGetDataTypeFromEnum(const EFbxType pType)
Retrieve data type from type enumeration index.
FbxProperty GetChild() const
Returns the first child of this property.
Definition: fbxproperty.h:490
T * GetDstObject(const FbxCriteria &pCriteria, const int pIndex=0) const
Returns the destination object which is of the specified class type and satisfies the given criteria ...
Definition: fbxproperty.h:991
FbxIOSettings is a collection of properties, arranged as a tree, that can be used by FBX file readers...
void BeginCreateOrFindProperty()
Internal function for building a property name map.
Definition: fbxproperty.h:548
T * GetSrcObject(const FbxCriteria &pCriteria, const int pIndex=0) const
Returns the source object which is of the specified class type and satisfies the given criteria at th...
Definition: fbxproperty.h:837
FbxProperty FindHierarchical(const char *pName, const FbxDataType &pDataType, bool pCaseSensitive=true) const
Searches a property using its full name and data type.
Definition: fbxproperty.h:540
Property override this flag from its reference property.
This is an internal class that you can use to build and clear the name map of properties. You can use the name map to speed up searching for property names.
Definition: fbxproperty.h:554
bool DisconnectAllSrcObject()
Disconnects this property from all source objects of the specified class type.
Definition: fbxproperty.h:802
#define FBXSDK_TIME_INFINITE
Definition: fbxtime.h:23
FbxProperty GetFirstDescendent() const
Returns the first property that is a descendant of this property.
Definition: fbxproperty.h:500
T * FindDstObject(const FbxCriteria &pCriteria, const char *pName, const int pStartIndex=0) const
Searches the destination object with the specified name which is of the specified class type and sati...
Definition: fbxproperty.h:1008
FBX_DEPRECATED FbxProperty operator[](int) const
Returns the (pIndex)th array item.
Definition: fbxproperty.h:594
This class implements an efficient map based on key comparison, which stores key-value pairs...
Definition: fbxmap.h:68
T * FindSrcObject(const char *pName, const int pStartIndex=0) const
Searches the source object with the specified name which is of the specified class type...
Definition: fbxproperty.h:845
const FbxPropertyHandle & GetTypeInfoHandle() const
Retrieve the information handle of this data type.
Definition: fbxdatatypes.h:103
static FbxCriteria ObjectType(const FbxClassId &pClassId)
Creates a new query criteria that only selects objects which have a specific class ID or derive from ...
bool SetValueInheritType(FbxPropertyFlags::EInheritType pType)
Sets the inheritance type of the property.
EFbxType
Type identifier constants.
Class to encapsulate time units.
Definition: fbxtime.h:44
T * FindDstObject(const char *pName, const int pStartIndex=0) const
Searches the destination object with the specified name which is of the specified class type...
Definition: fbxproperty.h:999
The base class of most FBX objects.
Definition: fbxobject.h:157
FbxProperty & StaticInit(FbxObject *pObject, const char *pName, const T &pValue, bool pForceSet, FbxPropertyFlags::EFlags pFlags=FbxPropertyFlags::eNone)
Creates a property and initializes it using a specific value and flag.
Definition: fbxproperty.h:1164
bool DisconnectAllSrcObject(const FbxCriteria &pCriteria)
Disconnects this property from all source objects which are of the specified class type and satisfy t...
Definition: fbxproperty.h:809
T EvaluateValue(const FbxTime &pTime=FBXSDK_TIME_INFINITE, bool pForceEval=false)
Evaluate the value of a property if it has animation and return the result.
Definition: fbxproperty.h:1239
This class contains the description of a 3D scene.
Definition: fbxscene.h:61
EFbxType FbxTypeOf(const FbxChar &)
FbxPropertyNameCache(const FbxProperty &prop)
Constructor, the name map is created in the constructor.
Definition: fbxproperty.h:560
This class implements an efficient set based on value comparison, which stores values.
Definition: fbxset.h:25
bool IsDescendentOf(const FbxProperty &pAncestor) const
Judges whether this property is a descendant of the specified property.
Definition: fbxproperty.h:474
bool IsRoot() const
Judges if this property is the root property.
Definition: fbxproperty.h:462
FbxProperty GetSibling() const
Returns the sibling of this property.
Definition: fbxproperty.h:495
FbxProperty & StaticInit(FbxProperty pCompound, const char *pName, const FbxDataType &pDataType, const T &pValue, bool pForceSet=true, FbxPropertyFlags::EFlags pFlags=FbxPropertyFlags::eNone)
Creates a property and initializes it using a specific value and flag.
Definition: fbxproperty.h:1198
Defines a filtering criteria for a query of objects, connections and properties, so that only those s...
Definition: fbxquery.h:104
The principal interface for animation evaluators.
FbxProperty Find(const char *pName, bool pCaseSensitive=true) const
Searches a property using its name.
Definition: fbxproperty.h:514
Internal class used to differentiate objects during run-time.
Definition: fbxclassid.h:39
FbxAnimEvaluator * GetAnimationEvaluator() const
Retrieve the proper animation evaluator to use for this property.
FbxProperty Find(const char *pName, const FbxDataType &pDataType, bool pCaseSensitive=true) const
Searches a property using its name and data type.
Definition: fbxproperty.h:523
Class to hold user properties.
Definition: fbxproperty.h:37
bool Set(const T &pValue)
Sets the value of the property.
Definition: fbxproperty.h:295
An animation curve, defined by a collection of keys (FbxAnimCurveKey), and indicating how a value cha...
Definition: fbxanimcurve.h:779
T * FindSrcObject(const FbxCriteria &pCriteria, const char *pName, const int pStartIndex=0) const
Searches the source object with the specified name which is of the specified class type and satisfies...
Definition: fbxproperty.h:854
This object represents a binding operation on a FbxObject or FbxProperty.
bool DisconnectAllDstObject()
Disconnects this property from all the destination objects of the specified class type...
Definition: fbxproperty.h:956
#define FBXSDK_DLL
Definition: fbxarch.h:170
void EndCreateOrFindProperty()
Internal function for clearing the property name map.
Definition: fbxproperty.h:551
FbxProperty GetParent() const
Returns the parent property of this property.
Definition: fbxproperty.h:479
int GetDstObjectCount() const
Returns the number of destination objects of the specified class type with which this property connec...
Definition: fbxproperty.h:969
~FbxPropertyNameCache()
Destructor, the name map is destroyed in destructor.
Definition: fbxproperty.h:563
EInheritType
Property inherit types.
This template class is used to contain user properties of specific data types.
Definition: fbxproperty.h:1150
Property is defined in the class declaration, so it wasn't created dynamically.
FbxProperty FindHierarchical(const char *pName, bool pCaseSensitive=true) const
Searches a property using its full name.
Definition: fbxproperty.h:531
Class for array of basic elements such as pointers and basic types.
Definition: fbxarray.h:23