# bugfix typo in blender loader leading to warnings due to non-existent fields in the DNA.
# bugfix: blender loader no longer fails on embedded textures with uppercase file names. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@892 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
parent
a63c56f4f7
commit
99f2e3bd97
|
@ -419,9 +419,9 @@ void BlenderImporter::ResolveImage(MaterialHelper* out, const Material* mat, con
|
|||
|
||||
while (s >= img->name && *s != '.')--s;
|
||||
|
||||
tex->achFormatHint[0] = s+1>e ? '\0' : s[1];
|
||||
tex->achFormatHint[1] = s+2>e ? '\0' : s[2];
|
||||
tex->achFormatHint[2] = s+3>e ? '\0' : s[3];
|
||||
tex->achFormatHint[0] = s+1>e ? '\0' : ::tolower( s[1] );
|
||||
tex->achFormatHint[1] = s+2>e ? '\0' : ::tolower( s[2] );
|
||||
tex->achFormatHint[2] = s+3>e ? '\0' : ::tolower( s[3] );
|
||||
tex->achFormatHint[3] = '\0';
|
||||
|
||||
// tex->mHeight = 0;
|
||||
|
@ -523,7 +523,7 @@ void BlenderImporter::BuildMaterials(ConversionData& conv_data)
|
|||
|
||||
p->r = p->g = p->b = 0.6f;
|
||||
p->specr = p->specg = p->specb = 0.6f;
|
||||
p->ambir = p->ambig = p->ambib = 0.0f;
|
||||
p->ambr = p->ambg = p->ambb = 0.0f;
|
||||
p->mirr = p->mirg = p->mirb = 0.0f;
|
||||
p->emit = 0.f;
|
||||
p->alpha = 0.f;
|
||||
|
@ -566,7 +566,7 @@ void BlenderImporter::BuildMaterials(ConversionData& conv_data)
|
|||
col = aiColor3D(mat->specr,mat->specg,mat->specb);
|
||||
mout->AddProperty(&col,1,AI_MATKEY_COLOR_SPECULAR);
|
||||
|
||||
col = aiColor3D(mat->ambir,mat->ambig,mat->ambib);
|
||||
col = aiColor3D(mat->ambr,mat->ambg,mat->ambb);
|
||||
mout->AddProperty(&col,1,AI_MATKEY_COLOR_AMBIENT);
|
||||
|
||||
col = aiColor3D(mat->mirr,mat->mirg,mat->mirb);
|
||||
|
|
|
@ -151,8 +151,8 @@ template <> void Structure :: Convert<SubsurfModifierData> (
|
|||
{
|
||||
|
||||
ReadField<ErrorPolicy_Fail>(dest.modifier,"modifier",db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.subdivType,"subdivType",db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.levels,"levels",db);
|
||||
ReadField<ErrorPolicy_Warn>(dest.subdivType,"subdivType",db);
|
||||
ReadField<ErrorPolicy_Fail>(dest.levels,"levels",db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.renderLevels,"renderLevels",db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.flags,"flags",db);
|
||||
|
||||
|
@ -275,9 +275,9 @@ template <> void Structure :: Convert<Material> (
|
|||
ReadField<ErrorPolicy_Warn>(dest.specr,"specr",db);
|
||||
ReadField<ErrorPolicy_Warn>(dest.specg,"specg",db);
|
||||
ReadField<ErrorPolicy_Warn>(dest.specb,"specb",db);
|
||||
ReadField<ErrorPolicy_Warn>(dest.ambir,"ambir",db);
|
||||
ReadField<ErrorPolicy_Warn>(dest.ambig,"ambig",db);
|
||||
ReadField<ErrorPolicy_Warn>(dest.ambib,"ambib",db);
|
||||
ReadField<ErrorPolicy_Warn>(dest.ambr,"ambr",db);
|
||||
ReadField<ErrorPolicy_Warn>(dest.ambg,"ambg",db);
|
||||
ReadField<ErrorPolicy_Warn>(dest.ambb,"ambb",db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.mirr,"mirr",db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.mirg,"mirg",db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.mirb,"mirb",db);
|
||||
|
|
|
@ -208,7 +208,7 @@ struct Material : ElemBase {
|
|||
|
||||
float r,g,b WARN;
|
||||
float specr,specg,specb WARN;
|
||||
float ambir,ambig,ambib WARN;
|
||||
float ambr,ambg,ambb WARN;
|
||||
float mirr,mirg,mirb;
|
||||
float emit WARN;
|
||||
float alpha WARN;
|
||||
|
|
Loading…
Reference in New Issue