13 #ifndef _FBXSDK_CORE_PROPERTY_H_ 14 #define _FBXSDK_CORE_PROPERTY_H_ 52 static FbxProperty Create(
const FbxProperty& pCompoundProperty,
const FbxDataType& pDataType,
const char* pName,
const char* pLabel=
"",
bool pCheckForDup=
true,
bool* pWasFound=
NULL);
87 void DestroyRecursively();
92 void DestroyChildren();
130 const char* GetNameAsCStr()
const;
146 FbxString GetLabel(
bool pReturnNameIfEmpty=
true)
const;
167 void SetUserTag(
int pTag);
175 void SetUserDataPtr(
void* pUserData);
180 void* GetUserDataPtr();
238 bool operator== (
const FbxProperty& pProperty)
const;
244 bool operator!= (
const FbxProperty& pProperty)
const;
249 bool operator< (
const FbxProperty& pProperty)
const;
254 bool operator> (
const FbxProperty& pProperty)
const;
260 inline bool operator== (
int pValue)
const {
return (pValue == 0) ? !IsValid() : IsValid(); }
266 inline bool operator!= (
int pValue)
const {
return (pValue != 0) ? !IsValid() : IsValid(); }
272 bool CompareValue(
const FbxProperty& pProperty)
const;
289 template <
class T>
inline T
Get()
const { T lValue;
Get(&lValue,
FbxTypeOf(lValue));
return lValue; }
295 template <
class T>
inline bool Set(
const T& pValue){
return Set(&pValue,
FbxTypeOf(pValue)); }
300 bool IsValid()
const;
310 static bool HasDefaultValue(
FbxProperty& pProperty);
338 bool Modified()
const;
361 bool SupportSetLimitAsDouble()
const;
367 bool SetMinLimit(
double pMin);
373 bool HasMinLimit()
const;
378 double GetMinLimit()
const;
384 bool HasMaxLimit()
const;
390 bool SetMaxLimit(
double pMax);
395 double GetMaxLimit()
const;
402 bool SetLimits(
double pMin,
double pMax);
417 int AddEnumValue(
const char* pStringValue);
428 void InsertEnumValue(
int pIndex,
const char* pStringValue);
434 int GetEnumCount()
const;
446 void SetEnumValue(
int pIndex,
const char* pStringValue);
452 void RemoveEnumValue(
int pIndex);
458 const char* GetEnumValue(
int pIndex)
const;
468 inline bool IsRoot()
const {
return mPropertyHandle.IsRoot(); }
474 inline bool IsChildOf(
const FbxProperty& pParent)
const {
return mPropertyHandle.IsChildOf(pParent.mPropertyHandle); }
514 inline FbxProperty Find (
const char* pName,
bool pCaseSensitive =
true)
const {
return FbxProperty(mPropertyHandle.Find(pName,pCaseSensitive)); }
547 inline void BeginCreateOrFindProperty(){ mPropertyHandle.BeginCreateOrFindProperty(); }
638 return GetCurve(pAnimLayer, GetName(),
NULL, pCreate);
653 return GetCurve(pAnimLayer, GetName(), pChannel, pCreate);
687 bool IsConnectedSrcObject(
const FbxObject* pObject)
const;
693 bool DisconnectSrcObject(
FbxObject* pObject);
698 bool DisconnectAllSrcObject();
704 bool DisconnectAllSrcObject(
const FbxCriteria& pCriteria);
709 int GetSrcObjectCount()
const;
715 int GetSrcObjectCount(
const FbxCriteria& pCriteria)
const;
721 FbxObject* GetSrcObject(
const int pIndex=0)
const;
735 FbxObject* FindSrcObject(
const char* pName,
const int pStartIndex=0)
const;
743 FbxObject* FindSrcObject(
const FbxCriteria& pCriteria,
const char* pName,
const int pStartIndex=0)
const;
814 bool IsConnectedDstObject(
const FbxObject* pObject)
const;
820 bool DisconnectDstObject(
FbxObject* pObject);
825 bool DisconnectAllDstObject();
831 bool DisconnectAllDstObject(
const FbxCriteria& pCriteria);
836 int GetDstObjectCount()
const;
842 int GetDstObjectCount(
const FbxCriteria& pCriteria)
const;
848 FbxObject* GetDstObject(
const int pIndex=0)
const;
862 FbxObject* FindDstObject(
const char* pName,
const int pStartIndex=0)
const;
870 FbxObject* FindDstObject(
const FbxCriteria& pCriteria,
const char* pName,
const int pStartIndex=0)
const;
940 bool ConnectSrcProperty(
const FbxProperty& pProperty);
946 bool IsConnectedSrcProperty(
const FbxProperty& pProperty);
952 bool DisconnectSrcProperty(
const FbxProperty& pProperty);
957 int GetSrcPropertyCount()
const;
963 bool ConnectDstProperty(
const FbxProperty& pProperty);
969 bool IsConnectedDstProperty(
const FbxProperty& pProperty);
975 bool DisconnectDstProperty(
const FbxProperty& pProperty);
980 int GetDstPropertyCount()
const;
983 void ClearConnectCache();
989 FbxProperty GetSrcProperty(
const int pIndex=0)
const;
996 FbxProperty FindSrcProperty(
const char* pName,
const int pStartIndex=0)
const;
1002 FbxProperty GetDstProperty(
const int pIndex=0)
const;
1009 FbxProperty FindDstProperty(
const char* pName,
const int pStartIndex=0)
const;
1018 #ifndef DOXYGEN_SHOULD_SKIP_THIS 1023 bool Set(
const void* pValue,
const EFbxType& pValueType,
bool pCheckForValueEquality=
true);
1024 bool Get(
void* pValue,
const EFbxType& pValueType)
const;
1026 bool NotifySetRequest();
1028 bool NotifyGet()
const;
1031 inline void* Get()
const { FBX_ASSERT_NOW(
"Cannot get property value as void!");
return NULL; }
1032 inline bool Set(
const void* &){ FBX_ASSERT_NOW(
"Cannot set property value as void!");
return false; }
1036 bool DisconnectAllSrc();
1037 bool DisconnectAllSrc(
const FbxCriteria& pCriteria);
1038 bool IsConnectedSrc(
const FbxProperty& pProperty)
const;
1039 int GetSrcCount()
const;
1040 int GetSrcCount(
const FbxCriteria& pCriteria)
const;
1047 bool DisconnectAllDst();
1048 bool DisconnectAllDst(
const FbxCriteria& pCriteria);
1049 bool IsConnectedDst(
const FbxProperty& pProperty)
const;
1050 int GetDstCount()
const;
1051 int GetDstCount(
const FbxCriteria& pCriteria)
const;
1099 bool lWasFound =
false;
1100 *
this = Create(pObject, pDataType, pName,
"",
true, &lWasFound);
1101 if( pForceSet || !lWasFound )
1103 ModifyFlag(pFlags,
true);
1120 bool lWasFound =
false;
1121 *
this = Create(pCompound, pDataType, pName,
"",
true, &lWasFound);
1122 if( pForceSet || !lWasFound )
1124 ModifyFlag(pFlags,
true);
1150 operator T()
const {
return Get(); }
1161 return GetAnimationEvaluator()->
template GetPropertyValue<T>(*
this, pTime, pForceEval);
1168 #ifndef DOXYGEN_SHOULD_SKIP_THIS 1178 #ifndef DOXYGEN_SHOULD_SKIP_THIS 1193 bool lWasFound =
false;
1194 *
this = Create(pObject, pDataType, pName,
"",
true, &lWasFound);
1195 if( pForceSet || !lWasFound )
1197 ModifyFlag(pFlags,
true);
1206 FbxProperty::NotifyGet();
1207 return GetSrcObject();
1212 if( FbxProperty::NotifySetRequest() )
1214 DisconnectAllSrcObject();
1215 if( ConnectSrcObject(pValue) )
1218 FbxProperty::NotifySet();
The animation layer is a collection of animation curve nodes.
FbxAnimCurve * GetCurve(FbxAnimLayer *pAnimLayer, bool pCreate=false)
Get the FbxAnimCurve from the specified animation layer.
An evaluator implementation that behaves like the original FBX SDK (2010 and previous) evaluation sys...
Class to manage property handle.
FBX SDK environment definition.
bool DisconnectAllDstObject(const FbxCriteria &pCriteria)
Disconnects this property from all the destination objects which are of the specified class type and ...
FbxPropertyT & Set(const T &pValue)
Assignment function.
FbxPropertyT & operator=(const T &pValue)
Assignment operator.
FbxProperty GetParent() const
Returns the parent property of this property.
The Animation stack is a collection of animation layers.
bool IsRoot() const
Judges if this property is the root property.
T Get() const
Retrieve function.
bool IsChildOf(const FbxProperty &pParent) const
Judges whether this property is a child of the specified property.
This class is an composite of animation curves and is called as animation curve node.
EFlags
Property flags that affect their behaviors.
T EvaluateValue(const FbxTime &pTime=FbxTime((0x7fffffffffffffffLL)), bool pForceEval=false)
Evaluate the value of a property if it has animation and return the result.
FbxProperty FindHierarchical(const char *pName, const FbxDataType &pDataType, bool pCaseSensitive=true) const
Searches a property using its full name and data type.
FbxAnimCurve * GetCurve(FbxAnimLayer *pAnimLayer, const char *pChannel, bool pCreate=false)
Get the FbxAnimCurve from the specified animation layer.
Utility class to manipulate strings.
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.
FbxProperty FindHierarchical(const char *pName, bool pCaseSensitive=true) const
Searches a property using its full name.
static const char * sHierarchicalSeparator
Hierarchical separator of properties.
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.
int GetDstObjectCount() const
Returns the number of destination objects of the specified class type with which this property connec...
FbxProperty GetNextDescendent(const FbxProperty &pProperty) const
Returns the property that follows pProperty that is a descendant of this property.
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.
FbxProperty GetFirstDescendent() const
Returns the first property that is a descendant of this property.
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...
bool DisconnectAllSrcObject()
Disconnects this property from all source objects of the specified class type.
int GetSrcObjectCount(const FbxCriteria &pCriteria) const
Returns the number of source objects which are of the specified class type and satisfy the given crit...
T * GetSrcObject(const int pIndex=0) const
Returns the source object of the specified class type at the specified index.
#define FBXSDK_TIME_INFINITE
FbxProperty GetChild() const
Returns the first child of this property.
This class implements an efficient map based on key comparison, which stores key-value pairs...
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.
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...
Class to encapsulate time units.
int GetDstObjectCount(const FbxCriteria &pCriteria) const
Returns the number of destination objects which are of the specified class type and satisfy the given...
The base class of most FBX objects.
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.
bool DisconnectAllSrcObject(const FbxCriteria &pCriteria)
Disconnects this property from all source objects which are of the specified class type and satisfy t...
FbxProperty GetSibling() const
Returns the sibling of this property.
This class contains the description of a 3D scene.
bool IsDescendentOf(const FbxProperty &pAncestor) const
Judges whether this property is a descendant of the specified property.
EFbxType FbxTypeOf(const FbxChar &)
FbxPropertyNameCache(const FbxProperty &prop)
Constructor, the name map is created in the constructor.
This class implements an efficient set based on value comparison, which stores values.
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 ...
FbxProperty Find(const char *pName, bool pCaseSensitive=true) const
Searches a property using its name.
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.
Defines a filtering criteria for a query of objects, connections and properties, so that only those s...
The principal interface for animation evaluators.
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...
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...
T Get() const
Gets the value of the property.
Class to hold user properties.
bool Set(const T &pValue)
Sets the value of the property.
T * GetDstObject(const int pIndex=0) const
Returns the destination object of the specified class type at the specified index with which this pro...
An animation curve, defined by a collection of keys (FbxAnimCurveKey), and indicating how a value cha...
FbxProperty Find(const char *pName, const FbxDataType &pDataType, bool pCaseSensitive=true) const
Searches a property using its name and data type.
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...
void EndCreateOrFindProperty()
Internal function for clearing the property name map.
~FbxPropertyNameCache()
Destructor, the name map is destroyed in destructor.
int GetSrcObjectCount() const
Returns the number of source objects of a specific class type with which this property connects...
EInheritType
Property inherit types.
This template class is used to contain user properties of specific data types.
Property is defined in the class declaration, so it wasn't created dynamically.
Class for array of basic elements such as pointers and basic types.
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...
const FbxPropertyHandle & GetTypeInfoHandle() const
Retrieve the information handle of this data type.