Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo de Greef <eeshlo@yahoo.com>2005-10-25 13:30:54 +0400
committerAlfredo de Greef <eeshlo@yahoo.com>2005-10-25 13:30:54 +0400
commitd21d25538959611bd090c7d5c3709164290d4b42 (patch)
tree9ebcf3384a5d837fd79c556bba04e2d2ca2ee8b8 /source/blender/yafray
parenta7e9a9d9c0e4154db41de6184eefcccfd6e4ed0a (diff)
fix for bug #3193, winmat was not calculated properly because of
some previously uninitialized parameters.
Diffstat (limited to 'source/blender/yafray')
-rwxr-xr-xsource/blender/yafray/intern/export_File.cpp4
-rw-r--r--source/blender/yafray/intern/export_Plugin.cpp16
2 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/yafray/intern/export_File.cpp b/source/blender/yafray/intern/export_File.cpp
index 43128b35933..79e83704ee9 100755
--- a/source/blender/yafray/intern/export_File.cpp
+++ b/source/blender/yafray/intern/export_File.cpp
@@ -1207,7 +1207,9 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_li
// 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->texco & TEXCO_ORCO)!=0);
+ // update2: bug #3193 it seems it has changed again with the introduction of static 'hair' particles,
+ // now it uses the vert pointer again as an extra test to make sure there are orco coords available
+ bool EXPORT_ORCO = (((face0mat->texco & TEXCO_ORCO)!=0) && (face0->v1->orco!=NULL));
string has_orco = "off";
if (EXPORT_ORCO) has_orco = "on";
diff --git a/source/blender/yafray/intern/export_Plugin.cpp b/source/blender/yafray/intern/export_Plugin.cpp
index 27333c89b89..fc587bab2e0 100644
--- a/source/blender/yafray/intern/export_Plugin.cpp
+++ b/source/blender/yafray/intern/export_Plugin.cpp
@@ -1279,8 +1279,7 @@ void yafrayPluginRender_t::genVertices(vector<yafray::point3d_t> &verts, int &vi
MTC_cp3Float(ver->co, tvec);
MTC_Mat4MulVecfl(imat, tvec);
verts.push_back(yafray::point3d_t(tvec[0], tvec[1], tvec[2]));
- if (has_orco)
- verts.push_back(yafray::point3d_t(ver->orco[0],ver->orco[1],ver->orco[2]));
+ if (has_orco) verts.push_back(yafray::point3d_t(ver->orco[0], ver->orco[1], ver->orco[2]));
}
if (vert_idx.find(vlr->v2)==vert_idx.end())
{
@@ -1289,8 +1288,7 @@ void yafrayPluginRender_t::genVertices(vector<yafray::point3d_t> &verts, int &vi
MTC_cp3Float(ver->co, tvec);
MTC_Mat4MulVecfl(imat, tvec);
verts.push_back(yafray::point3d_t(tvec[0], tvec[1], tvec[2]));
- if (has_orco)
- verts.push_back(yafray::point3d_t(ver->orco[0],ver->orco[1],ver->orco[2]));
+ if (has_orco) verts.push_back(yafray::point3d_t(ver->orco[0], ver->orco[1], ver->orco[2]));
}
if (vert_idx.find(vlr->v3)==vert_idx.end())
{
@@ -1299,8 +1297,7 @@ void yafrayPluginRender_t::genVertices(vector<yafray::point3d_t> &verts, int &vi
MTC_cp3Float(ver->co, tvec);
MTC_Mat4MulVecfl(imat, tvec);
verts.push_back(yafray::point3d_t(tvec[0], tvec[1], tvec[2]));
- if (has_orco)
- verts.push_back(yafray::point3d_t(ver->orco[0],ver->orco[1],ver->orco[2]));
+ if (has_orco) verts.push_back(yafray::point3d_t(ver->orco[0], ver->orco[1], ver->orco[2]));
}
if ((vlr->v4) && (vert_idx.find(vlr->v4)==vert_idx.end()))
{
@@ -1309,8 +1306,7 @@ void yafrayPluginRender_t::genVertices(vector<yafray::point3d_t> &verts, int &vi
MTC_cp3Float(ver->co, tvec);
MTC_Mat4MulVecfl(imat, tvec);
verts.push_back(yafray::point3d_t(tvec[0], tvec[1], tvec[2]));
- if (has_orco)
- verts.push_back(yafray::point3d_t(ver->orco[0],ver->orco[1],ver->orco[2]));
+ if (has_orco) verts.push_back(yafray::point3d_t(ver->orco[0], ver->orco[1], ver->orco[2]));
}
}
@@ -1341,7 +1337,9 @@ void yafrayPluginRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_
// 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 has_orco = ((face0mat->texco & TEXCO_ORCO)!=0);
+ // update2: bug #3193 it seems it has changed again with the introduction of static 'hair' particles,
+ // now it uses the vert pointer again as an extra test to make sure there are orco coords available
+ bool has_orco = (((face0mat->texco & TEXCO_ORCO)!=0) && (face0->v1->orco!=NULL));
bool no_auto = true; //in case non-mesh, or mesh has no autosmooth
float sm_angle = 0.1f;