fbxsdk/core/fbxproperty.h Source File

fbxproperty.h
Go to the documentation of this file.
1 /****************************************************************************************
2 
3  Copyright (C) 2015 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 
417  int AddEnumValue(const char* pStringValue);
418 
428  void InsertEnumValue(int pIndex, const char* pStringValue);
429 
434  int GetEnumCount() const;
435 
446  void SetEnumValue(int pIndex, const char* pStringValue);
447 
452  void RemoveEnumValue(int pIndex);
453 
458  const char* GetEnumValue(int pIndex) const;
460 
468  inline bool IsRoot() const { return mPropertyHandle.IsRoot(); }
469 
474  inline bool IsChildOf(const FbxProperty& pParent) const { return mPropertyHandle.IsChildOf(pParent.mPropertyHandle); }
475 
480  inline bool IsDescendentOf(const FbxProperty& pAncestor) const { return mPropertyHandle.IsDescendentOf(pAncestor.mPropertyHandle); }
481 
485  inline FbxProperty GetParent() const { return FbxProperty(mPropertyHandle.GetParent()); }
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 
577  FbxAnimEvaluator* GetAnimationEvaluator() const;
578 
582  bool IsAnimated(FbxAnimLayer* pAnimLayer=NULL) const;
583 
589  template <class T> T EvaluateValue(const FbxTime& pTime=FBXSDK_TIME_INFINITE, bool pForceEval=false);
590 
595  FbxPropertyValue& EvaluateValue(const FbxTime& pTime=FBXSDK_TIME_INFINITE, bool pForceEval=false);
596 
604  FbxAnimCurveNode* CreateCurveNode(FbxAnimLayer* pAnimLayer);
605 
610  FbxAnimCurveNode* GetCurveNode(bool pCreate=false);
611 
618  FbxAnimCurveNode* GetCurveNode(FbxAnimStack* pAnimStack, bool pCreate=false);
619 
625  FbxAnimCurveNode* GetCurveNode(FbxAnimLayer* pAnimLayer, bool pCreate=false);
626 
636  inline FbxAnimCurve* GetCurve(FbxAnimLayer* pAnimLayer, bool pCreate=false)
637  {
638  return GetCurve(pAnimLayer, GetName(), NULL, pCreate);
639  }
640 
651  inline FbxAnimCurve* GetCurve(FbxAnimLayer* pAnimLayer, const char* pChannel, bool pCreate=false)
652  {
653  return GetCurve(pAnimLayer, GetName(), pChannel, pCreate);
654  }
655 
669  FbxAnimCurve* GetCurve(FbxAnimLayer* pAnimLayer, const char* pName, const char* pChannel, bool pCreate);
671 
681  bool ConnectSrcObject(FbxObject* pObject, FbxConnection::EType pType=FbxConnection::eNone);
682 
687  bool IsConnectedSrcObject(const FbxObject* pObject) const;
688 
693  bool DisconnectSrcObject(FbxObject* pObject);
694 
698  bool DisconnectAllSrcObject();
699 
704  bool DisconnectAllSrcObject(const FbxCriteria& pCriteria);
705 
710  FBX_DEPRECATED bool DisconnectAllSrcObject(const FbxClassId& pClassId);
711 
715  int GetSrcObjectCount() const;
716 
721  int GetSrcObjectCount(const FbxCriteria& pCriteria) const;
722 
727  FBX_DEPRECATED int GetSrcObjectCount(const FbxClassId& pClassId) const;
728 
733  FbxObject* GetSrcObject(const int pIndex=0) const;
734 
740  FbxObject* GetSrcObject(const FbxCriteria& pCriteria, const int pIndex=0) const;
741 
747  FBX_DEPRECATED FbxObject* GetSrcObject(const FbxClassId& pClassId, const int pIndex=0) const;
748 
754  FbxObject* FindSrcObject(const char* pName, const int pStartIndex=0) const;
755 
762  FbxObject* FindSrcObject(const FbxCriteria& pCriteria, const char* pName, const int pStartIndex=0) const;
763 
770  FBX_DEPRECATED FbxObject* FindSrcObject(const FbxClassId& pClassId, const char* pName, const int pStartIndex=0) const;
771 
776  template <class T> inline bool DisconnectAllSrcObject(){ return DisconnectAllSrcObject(FbxCriteria::ObjectType(T::ClassId)); }
777 
783  template <class T> inline bool DisconnectAllSrcObject(const FbxCriteria& pCriteria){ return DisconnectAllSrcObject(FbxCriteria::ObjectType(T::ClassId) && pCriteria); }
784 
789  template <class T> inline int GetSrcObjectCount() const { return GetSrcObjectCount(FbxCriteria::ObjectType(T::ClassId)); }
790 
796  template <class T> inline int GetSrcObjectCount(const FbxCriteria& pCriteria) const { return GetSrcObjectCount(FbxCriteria::ObjectType(T::ClassId) && pCriteria); }
797 
803  template <class T> inline T* GetSrcObject(const int pIndex=0) const { return (T*)GetSrcObject(FbxCriteria::ObjectType(T::ClassId), pIndex); }
804 
811  template <class T> inline T* GetSrcObject(const FbxCriteria& pCriteria, const int pIndex=0) const { return (T*)GetSrcObject(FbxCriteria::ObjectType(T::ClassId) && pCriteria, pIndex); }
812 
819  template <class T> inline T* FindSrcObject(const char* pName, const int pStartIndex=0) const { return (T*)FindSrcObject(FbxCriteria::ObjectType(T::ClassId), pName, pStartIndex); }
820 
828  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); }
829 
835  bool ConnectDstObject(FbxObject* pObject, FbxConnection::EType pType=FbxConnection::eNone);
836 
841  bool IsConnectedDstObject(const FbxObject* pObject) const;
842 
847  bool DisconnectDstObject(FbxObject* pObject);
848 
852  bool DisconnectAllDstObject();
853 
858  bool DisconnectAllDstObject(const FbxCriteria& pCriteria);
859 
864  FBX_DEPRECATED bool DisconnectAllDstObject(const FbxClassId& pClassId);
865 
869  int GetDstObjectCount() const;
870 
875  int GetDstObjectCount(const FbxCriteria& pCriteria) const;
876 
881  FBX_DEPRECATED int GetDstObjectCount(const FbxClassId& pClassId) const;
882 
887  FbxObject* GetDstObject(const int pIndex=0) const;
888 
894  FbxObject* GetDstObject(const FbxCriteria& pCriteria, const int pIndex=0) const;
895 
901  FBX_DEPRECATED FbxObject* GetDstObject(const FbxClassId& pClassId, const int pIndex=0) const;
902 
908  FbxObject* FindDstObject(const char* pName, const int pStartIndex=0) const;
909 
916  FbxObject* FindDstObject(const FbxCriteria& pCriteria, const char* pName, const int pStartIndex=0) const;
917 
924  FBX_DEPRECATED FbxObject* FindDstObject(const FbxClassId& pClassId, const char* pName, const int pStartIndex=0) const;
925 
930  template <class T> inline bool DisconnectAllDstObject(){ return DisconnectAllDstObject(FbxCriteria::ObjectType(T::ClassId)); }
931 
937  template <class T> inline bool DisconnectAllDstObject(const FbxCriteria& pCriteria){ return DisconnectAllDstObject(FbxCriteria::ObjectType(T::ClassId) && pCriteria); }
938 
943  template <class T> inline int GetDstObjectCount() const { return GetDstObjectCount(FbxCriteria::ObjectType(T::ClassId)); }
944 
950  template <class T> inline int GetDstObjectCount(const FbxCriteria& pCriteria) const { return GetDstObjectCount(FbxCriteria::ObjectType(T::ClassId) && pCriteria); }
951 
957  template <class T> inline T* GetDstObject(const int pIndex=0) const { return (T*)GetDstObject(FbxCriteria::ObjectType(T::ClassId), pIndex); }
958 
965  template <class T> inline T* GetDstObject(const FbxCriteria& pCriteria, const int pIndex=0) const { return (T*)GetDstObject(FbxCriteria::ObjectType(T::ClassId) && pCriteria, pIndex); }
966 
973  template <class T> inline T* FindDstObject(const char* pName, const int pStartIndex=0) const { return (T*)FindDstObject(FbxCriteria::ObjectType(T::ClassId), pName, pStartIndex); }
974 
982  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); }
984 
989  // Properties
994  bool ConnectSrcProperty(const FbxProperty& pProperty);
995 
1000  bool IsConnectedSrcProperty(const FbxProperty& pProperty);
1001 
1006  bool DisconnectSrcProperty(const FbxProperty& pProperty);
1007 
1011  int GetSrcPropertyCount() const;
1012 
1017  bool ConnectDstProperty(const FbxProperty& pProperty);
1018 
1023  bool IsConnectedDstProperty(const FbxProperty& pProperty);
1024 
1029  bool DisconnectDstProperty(const FbxProperty& pProperty);
1030 
1034  int GetDstPropertyCount() const;
1035 
1037  void ClearConnectCache();
1038 
1043  FbxProperty GetSrcProperty(const int pIndex=0) const;
1044 
1050  FbxProperty FindSrcProperty(const char* pName, const int pStartIndex=0) const;
1051 
1056  FbxProperty GetDstProperty(const int pIndex=0) const;
1057 
1063  FbxProperty FindDstProperty(const char* pName, const int pStartIndex=0) const;
1065 
1067  static const char* sHierarchicalSeparator;
1068 
1069 /*****************************************************************************************************************************
1070 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
1071 *****************************************************************************************************************************/
1072 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1073 protected:
1074  FbxProperty(FbxObject* pObject, const char* pName, const FbxDataType& pDataType=FbxDataType(), const char* pLabel="");
1075  FbxProperty(const FbxProperty& pParent, const char* pName, const FbxDataType& pDataType, const char* pLabel);
1076 
1077  bool Set(const void* pValue, const EFbxType& pValueType, bool pCheckForValueEquality=true);
1078  bool Get(void* pValue, const EFbxType& pValueType) const;
1079 
1080  bool NotifySetRequest();
1081  bool NotifySet();
1082  bool NotifyGet() const;
1083 
1084 private:
1085  inline void* Get() const { FBX_ASSERT_NOW("Cannot get property value as void!"); return NULL; }
1086  inline bool Set(const void* &){ FBX_ASSERT_NOW("Cannot set property value as void!"); return false; }
1087 
1088  bool ConnectSrc(const FbxProperty& pProperty, FbxConnection::EType pType=FbxConnection::eNone);
1089  bool DisconnectSrc(const FbxProperty& pProperty);
1090  bool DisconnectAllSrc();
1091  bool DisconnectAllSrc(const FbxCriteria& pCriteria);
1092  bool IsConnectedSrc(const FbxProperty& pProperty) const;
1093  int GetSrcCount() const;
1094  int GetSrcCount(const FbxCriteria& pCriteria) const;
1095  FbxProperty GetSrc(int pIndex=0) const;
1096  FbxProperty GetSrc(const FbxCriteria& pCriteria, int pIndex=0) const;
1097  FbxProperty FindSrc(const FbxCriteria& pCriteria, const char* pName, int pStartIndex=0) const;
1098 
1099  bool ConnectDst(const FbxProperty& pProperty, FbxConnection::EType pType=FbxConnection::eNone);
1100  bool DisconnectDst(const FbxProperty& pProperty);
1101  bool DisconnectAllDst();
1102  bool DisconnectAllDst(const FbxCriteria& pCriteria);
1103  bool IsConnectedDst(const FbxProperty& pProperty) const;
1104  int GetDstCount() const;
1105  int GetDstCount(const FbxCriteria& pCriteria) const;
1106  FbxProperty GetDst(int pIndex=0) const;
1107  FbxProperty GetDst(const FbxCriteria& pCriteria, int pIndex=0) const;
1108  FbxProperty FindDst(const FbxCriteria& pCriteria, const char* pName, int pStartIndex=0) const;
1109 
1110  mutable FbxPropertyHandle mPropertyHandle;
1111 
1112  friend class FbxObject;
1113  friend class FbxIOSettings;
1114  friend class FbxBindingOperator;
1115  friend class FbxAnimEvalClassic;
1116  friend void FbxMarkObject(FbxObject* pObject, FbxMap<FbxObject*, int>& pObjectDstDisconnectCount, FbxSet<FbxObject*>& pObjectsToDeleted, FbxArray<FbxObject*>& pObjectToDeletedInSequence);
1117  friend void FbxCleanUpConnectionsAtDestructionBoundary(FbxScene* pObject, FbxArray<FbxObject*>& pObjectToDeletedInSequence);
1118 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
1119 };
1120 
1124 template <class T> class FbxPropertyT : public FbxProperty
1125 {
1126 public:
1138  FbxProperty& StaticInit(FbxObject* pObject, const char* pName, const T& pValue, bool pForceSet, FbxPropertyFlags::EFlags pFlags=FbxPropertyFlags::eNone)
1139  {
1140  return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(FbxTypeOf(*((T*)0))), pValue, pForceSet, pFlags);
1141  }
1142 
1151  FbxProperty& StaticInit(FbxObject* pObject, const char* pName, const FbxDataType& pDataType, const T& pValue, bool pForceSet, FbxPropertyFlags::EFlags pFlags=FbxPropertyFlags::eNone)
1152  {
1153  bool lWasFound = false;
1154  *this = Create(pObject, pDataType, pName, "", true, &lWasFound);
1155  if( pForceSet || !lWasFound )
1156  {
1157  ModifyFlag(pFlags, true); // modify the flags before we set the value
1158  FbxProperty::Set(&pValue, FbxTypeOf(pValue), false);
1159  }
1161  return *this;
1162  }
1163 
1172  FbxProperty& StaticInit(FbxProperty pCompound, const char* pName, const FbxDataType& pDataType, const T& pValue, bool pForceSet=true, FbxPropertyFlags::EFlags pFlags=FbxPropertyFlags::eNone)
1173  {
1174  bool lWasFound = false;
1175  *this = Create(pCompound, pDataType, pName, "", true, &lWasFound);
1176  if( pForceSet || !lWasFound )
1177  {
1178  ModifyFlag(pFlags, true); // modify the flags before we set the value
1179  FbxProperty::Set(&pValue, FbxTypeOf(pValue), false);
1180  }
1182  return *this;
1183  }
1185 
1191  FbxPropertyT& Set(const T& pValue){ FbxProperty::Set(&pValue, FbxTypeOf(pValue)); return *this; }
1192 
1195  T Get() const { T lValue; FbxProperty::Get(&lValue, FbxTypeOf(lValue)); return lValue; }
1196 
1200  FbxPropertyT& operator=(const T& pValue){ return Set(pValue); }
1201 
1204  operator T() const { return Get(); }
1206 
1213  T EvaluateValue(const FbxTime& pTime=FBXSDK_TIME_INFINITE, bool pForceEval=false)
1214  {
1215  return GetAnimationEvaluator()-> template GetPropertyValue<T>(*this, pTime, pForceEval);
1216  }
1218 
1219 /*****************************************************************************************************************************
1220 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
1221 *****************************************************************************************************************************/
1222 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1223  FbxPropertyT() : FbxProperty(){}
1224  FbxPropertyT(const FbxProperty& pProperty) : FbxProperty(pProperty){}
1225  ~FbxPropertyT(){}
1226 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
1227 };
1228 
1229 /*****************************************************************************************************************************
1230 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
1231 *****************************************************************************************************************************/
1232 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1233 template <> class FbxPropertyT<FbxReference> : public FbxProperty
1234 {
1235 public:
1236  FbxPropertyT() : FbxProperty(){}
1237  FbxPropertyT(const FbxProperty& pProperty) : FbxProperty(pProperty){}
1238  ~FbxPropertyT(){}
1239 
1240  const FbxProperty& StaticInit(FbxObject* pObject, const char* pName, const FbxReference& pValue, bool pForceSet, FbxPropertyFlags::EFlags pFlags=FbxPropertyFlags::eNone)
1241  {
1242  return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(FbxTypeOf(*((FbxReference*)0))), pValue, pForceSet, pFlags);
1243  }
1244 
1245  const FbxProperty& StaticInit(FbxObject* pObject, const char* pName, const FbxDataType& pDataType, const FbxReference& pValue, bool pForceSet, FbxPropertyFlags::EFlags pFlags=FbxPropertyFlags::eNone)
1246  {
1247  bool lWasFound = false;
1248  *this = Create(pObject, pDataType, pName, "", true, &lWasFound);
1249  if( pForceSet || !lWasFound )
1250  {
1251  ModifyFlag(pFlags, true); // modify the flags before we set the value
1252  Set(pValue); // since we will trigger callbacks in there!
1253  }
1254  ModifyFlag(FbxPropertyFlags::eStatic, true);
1255  return *this;
1256  }
1257 
1258  FbxReference Get() const
1259  {
1260  FbxProperty::NotifyGet();
1261  return GetSrcObject();
1262  }
1263 
1264  FbxPropertyT& Set(const FbxReference& pValue)
1265  {
1266  if( FbxProperty::NotifySetRequest() )
1267  {
1268  DisconnectAllSrcObject();
1269  if( ConnectSrcObject(pValue) )
1270  {
1272  FbxProperty::NotifySet();
1273  }
1274  }
1275  return *this;
1276  }
1277 
1278  operator FbxReference() const
1279  {
1280  return Get();
1281  }
1282 
1283  FbxPropertyT& operator=(const FbxReference& pValue)
1284  {
1285  return Set(pValue);
1286  }
1287 };
1288 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
1289 
1290 #include <fbxsdk/fbxsdk_nsend.h>
1291 
1292 #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:957
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:636
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:796
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:937
FbxPropertyT & Set(const T &pValue)
Assignment function.
Definition: fbxproperty.h:1191
FbxPropertyT & operator=(const T &pValue)
Assignment operator.
Definition: fbxproperty.h:1200
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:1195
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:803
T EvaluateValue(const FbxTime &pTime=FbxTime((0x7fffffffffffffffLL)), bool pForceEval=false)
Evaluate the value of a property if it has animation and return the result.
Definition: fbxproperty.h:1213
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:789
void ModifyFlag(FbxPropertyFlags::EFlags pFlag, bool pValue)
Changes the property attribute.
#define NULL
Definition: fbxarch.h:210
FbxAnimCurve * GetCurve(FbxAnimLayer *pAnimLayer, const char *pChannel, bool pCreate=false)
Get the FbxAnimCurve from the specified animation layer.
Definition: fbxproperty.h:651
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:1151
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:474
static const char * sHierarchicalSeparator
Hierarchical separator of properties.
Definition: fbxproperty.h:1067
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:950
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:965
const FbxDataType & FbxGetDataTypeFromEnum(const EFbxType pType)
Retrieve data type from type enumeration index.
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
static FbxProperty Create(const FbxProperty &pCompoundProperty, const FbxDataType &pDataType, const char *pName, const char *pLabel="", bool pCheckForDup=true, bool *pWasFound=((void *) 0))
Creates a runtime property on the specified property.
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:811
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:776
#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:982
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:819
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:973
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:1138
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:783
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:480
bool IsRoot() const
Judges if this property is the root property.
Definition: fbxproperty.h:468
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:1172
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:828
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:930
#define FBXSDK_DLL
Definition: fbxarch.h:173
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:485
int GetDstObjectCount() const
Returns the number of destination objects of the specified class type with which this property connec...
Definition: fbxproperty.h:943
~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:1124
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