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:
-rw-r--r--source/blender/render/intern/source/initrender.c8
-rwxr-xr-xsource/blender/yafray/intern/export_File.cpp4
-rw-r--r--source/blender/yafray/intern/export_Plugin.cpp16
3 files changed, 17 insertions, 11 deletions
diff --git a/source/blender/render/intern/source/initrender.c b/source/blender/render/intern/source/initrender.c
index f79b86f018b..7705609a46f 100644
--- a/source/blender/render/intern/source/initrender.c
+++ b/source/blender/render/intern/source/initrender.c
@@ -583,7 +583,7 @@ void RE_setwindowclip(int mode, int jmode)
else
i_window(minx, maxx, miny, maxy, R.near, R.far, R.winmat);
-// printmatrix4("win", R.winmat);
+ //printmatrix4("win", R.winmat);
}
@@ -836,6 +836,12 @@ static void yafrayRender(void)
{
R.flag |= R_RENDERING; /* !!! */
+ /* bug #3193: these params were not initialized, needed later for winmat calc. */
+ R.xstart = -R.afmx;
+ R.ystart = -R.afmy;
+ R.xend = R.xstart + R.rectx - 1;
+ R.yend = R.ystart + R.recty - 1;
+
/* all allocs moved here, out of export code */
/* display rgba buf */
if (R.rectot) MEM_freeN(R.rectot);
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;