Merge pull request #5161 from malytomas/master

fix incorrect default for material::get with aiColor3D
This commit is contained in:
Kim Kulling 2023-08-28 11:45:54 +02:00 committed by GitHub
commit 2f6f58707d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -211,7 +211,8 @@ AI_FORCE_INLINE aiReturn aiMaterial::Get(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);
if (ret == aiReturn_SUCCESS)
pOut = aiColor3D(c.r,c.g,c.b);
return ret;
}
// ---------------------------------------------------------------------------