diff options
Diffstat (limited to 'source/blender/yafray/intern/export_File.cpp')
-rwxr-xr-x | source/blender/yafray/intern/export_File.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/yafray/intern/export_File.cpp b/source/blender/yafray/intern/export_File.cpp index 9ac6d1b1e90..49811c5a336 100755 --- a/source/blender/yafray/intern/export_File.cpp +++ b/source/blender/yafray/intern/export_File.cpp @@ -985,9 +985,10 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_li ostr << "\t</attributes>\n"; xmlfile << ostr.str(); - // if any face in the Blender mesh uses an orco texture, every face has orco coords, - // so only need to check the first facevtx.orco in the list if they need to be exported - bool EXPORT_ORCO = (face0->v1->orco!=NULL); + // Export orco coords test. + // Previously was done by checking orco pointer, however this can be non-null but still not initialized. + // Test the rendermaterial texco flag instead. + bool EXPORT_ORCO = ((face0mat->ren->texco & TEXCO_ORCO)!=0); string has_orco = "off"; if (EXPORT_ORCO) has_orco = "on"; |