![]() |
Plasma Engine
2.0
|
Add this attribute to an embedded class or container property to make it retrieve its default values from a dynamic meta info object on an asset. More...
#include <PropertyAttributes.h>
Public Member Functions | |
plDynamicDefaultValueAttribute (const char *szClassSource, const char *szClassType, const char *szClassProperty=nullptr) | |
const char * | GetClassSource () const |
const char * | GetClassType () const |
const char * | GetClassProperty () const |
![]() | |
virtual const plRTTI * | GetDynamicRTTI () const |
bool | IsInstanceOf (const plRTTI *pType) const |
Returns whether the type of this instance is of the given type or derived from it. | |
template<typename T > | |
PL_ALWAYS_INLINE bool | IsInstanceOf () const |
Returns whether the type of this instance is of the given type or derived from it. | |
Additional Inherited Members | |
![]() | |
static const plRTTI * | GetStaticRTTI () |
Add this attribute to an embedded class or container property to make it retrieve its default values from a dynamic meta info object on an asset.
The default values are retrieved from the asset meta data of the currently set asset on that property.
Usage: PL_ACCESSOR_PROPERTY("Skeleton", GetSkeletonFile, SetSkeletonFile)->AddAttributes(new plAssetBrowserAttribute("Skeleton")),
// Use this if the embedded class m_SkeletonMetaData is of type plSkeletonMetaData. PL_MEMBER_PROPERTY("SkeletonMetaData", m_SkeletonMetaData)->AddAttributes(new plDynamicDefaultValueAttribute("Skeleton", "plSkeletonMetaData")),
// Use this if you don't want embed the entire meta object but just some container of it. In this case the LocalBones container must match in type to the property 'BonesArrayNameInMetaData' in the meta data type 'plSkeletonMetaData'. PL_MAP_MEMBER_PROPERTY("LocalBones", m_Bones)->AddAttributes(new plDynamicDefaultValueAttribute("Skeleton", "plSkeletonMetaData", "BonesArrayNameInMetaData")),