|
@@ -75,8 +75,9 @@ inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
|
|
|
{
|
|
|
unsigned int iNum = pMax ? *pMax : 1;
|
|
|
|
|
|
- aiMaterialProperty* prop;
|
|
|
- aiReturn ret = ::aiGetMaterialProperty(this,pKey,type,idx,&prop);
|
|
|
+ const aiMaterialProperty* prop;
|
|
|
+ const aiReturn ret = ::aiGetMaterialProperty(this,pKey,(aiTextureType)type,idx,
|
|
|
+ (const aiMaterialProperty**)&prop);
|
|
|
if ( AI_SUCCESS == ret ) {
|
|
|
|
|
|
if (prop->mDataLength < sizeof(Type)*iNum) {
|
|
@@ -100,8 +101,9 @@ template <typename Type>
|
|
|
inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
|
|
|
unsigned int idx,Type& pOut) const
|
|
|
{
|
|
|
- aiMaterialProperty* prop;
|
|
|
- aiReturn ret = ::aiGetMaterialProperty(this,pKey,type,idx,&prop);
|
|
|
+ const aiMaterialProperty* prop;
|
|
|
+ const aiReturn ret = ::aiGetMaterialProperty(this,pKey,(aiTextureType)type,idx,
|
|
|
+ (const aiMaterialProperty**)&prop);
|
|
|
if ( AI_SUCCESS == ret ) {
|
|
|
|
|
|
if (prop->mDataLength < sizeof(Type)) {
|
|
@@ -156,6 +158,16 @@ inline aiReturn aiMaterial::Get<aiColor4D>(const char* pKey,unsigned int type,
|
|
|
}
|
|
|
// ---------------------------------------------------------------------------
|
|
|
template <>
|
|
|
+inline aiReturn aiMaterial::Get<aiColor3D>(const char* pKey,unsigned int type,
|
|
|
+ unsigned int idx,aiColor3D& pOut) const
|
|
|
+{
|
|
|
+ aiColor4D c;
|
|
|
+ const aiReturn ret = aiGetMaterialColor(this,pKey,type,idx,&c);
|
|
|
+ pOut = aiColor3D(c.r,c.g,c.b);
|
|
|
+ return ret;
|
|
|
+}
|
|
|
+// ---------------------------------------------------------------------------
|
|
|
+template <>
|
|
|
inline aiReturn aiMaterial::Get<aiString>(const char* pKey,unsigned int type,
|
|
|
unsigned int idx,aiString& pOut) const
|
|
|
{
|