diff options
author | Alfredo de Greef <eeshlo@yahoo.com> | 2006-06-30 08:53:59 +0400 |
---|---|---|
committer | Alfredo de Greef <eeshlo@yahoo.com> | 2006-06-30 08:53:59 +0400 |
commit | 3ba91bce8e21239f41804617d5519e0c5a2534e5 (patch) | |
tree | 74ef64a8a79ad39e598d2cbe8c541aa4fe641acd /source/blender | |
parent | 7e614bbac9504738f2df41766f2b5e4d1f4df1dc (diff) |
bug #4532, when field rendering enabled in blender (not supported in yafray),
blender doubles the aspect ratio. This is now taken into account.
Diffstat (limited to 'source/blender')
-rwxr-xr-x | source/blender/yafray/intern/export_File.cpp | 7 | ||||
-rw-r--r-- | source/blender/yafray/intern/export_Plugin.cpp | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/yafray/intern/export_File.cpp b/source/blender/yafray/intern/export_File.cpp index 2e1b63b2ecc..f4ba9f59409 100755 --- a/source/blender/yafray/intern/export_File.cpp +++ b/source/blender/yafray/intern/export_File.cpp @@ -1790,7 +1790,12 @@ void yafrayFileRender_t::writeCamera() if ((re->winx * re->r.xasp) <= (re->winy * re->r.yasp)) f_aspect = float(re->winx * re->r.xasp) / float(re->winy * re->r.yasp); ostr << "\n\tfocal=\"" << mainCamLens/(f_aspect*32.f); - ostr << "\" aspect_ratio=\"" << re->ycor << "\""; + // bug #4532, when field rendering is enabled, ycor is doubled + if (re->r.mode & R_FIELDS) + ostr << "\" aspect_ratio=\"" << (re->ycor * 0.5f) << "\""; + else + ostr << "\" aspect_ratio=\"" << re->ycor << "\""; + // dof params, only valid for real camera float fdist = 1; // only changes for ortho diff --git a/source/blender/yafray/intern/export_Plugin.cpp b/source/blender/yafray/intern/export_Plugin.cpp index 44567f28cf2..ff2599eecb9 100644 --- a/source/blender/yafray/intern/export_Plugin.cpp +++ b/source/blender/yafray/intern/export_Plugin.cpp @@ -1670,7 +1670,11 @@ void yafrayPluginRender_t::writeCamera() if ((re->winx * re->r.xasp) <= (re->winy * re->r.yasp)) f_aspect = float(re->winx * re->r.xasp) / float(re->winy * re->r.yasp); params["focal"] = yafray::parameter_t(mainCamLens/(f_aspect*32.f)); - params["aspect_ratio"] = yafray::parameter_t(re->ycor); + // bug #4532, when field rendering is enabled, ycor is doubled + if (re->r.mode & R_FIELDS) + params["aspect_ratio"] = yafray::parameter_t(re->ycor * 0.5f); + else + params["aspect_ratio"] = yafray::parameter_t(re->ycor); // dof params, only valid for real camera float fdist = 1; // only changes for ortho |