bugfix: add obj-material handling for <color> 0 instead of <color> r g b.
Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>pull/334/head
parent
3d6b1932f9
commit
5e265610fb
|
@ -223,14 +223,16 @@ void ObjFileMtlImporter::getColorRGBA( aiColor3D *pColor )
|
||||||
{
|
{
|
||||||
ai_assert( NULL != pColor );
|
ai_assert( NULL != pColor );
|
||||||
|
|
||||||
float r, g, b;
|
float r( 0.0f ), g( 0.0f ), b( 0.0f );
|
||||||
m_DataIt = getFloat<DataArrayIt>( m_DataIt, m_DataItEnd, r );
|
m_DataIt = getFloat<DataArrayIt>( m_DataIt, m_DataItEnd, r );
|
||||||
pColor->r = r;
|
pColor->r = r;
|
||||||
|
|
||||||
|
// we have to check if color is default 0 with only one token
|
||||||
|
if( !isNewLine( *m_DataIt ) ) {
|
||||||
m_DataIt = getFloat<DataArrayIt>( m_DataIt, m_DataItEnd, g );
|
m_DataIt = getFloat<DataArrayIt>( m_DataIt, m_DataItEnd, g );
|
||||||
pColor->g = g;
|
|
||||||
|
|
||||||
m_DataIt = getFloat<DataArrayIt>( m_DataIt, m_DataItEnd, b );
|
m_DataIt = getFloat<DataArrayIt>( m_DataIt, m_DataItEnd, b );
|
||||||
|
}
|
||||||
|
pColor->g = g;
|
||||||
pColor->b = b;
|
pColor->b = b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue