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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2010-02-17 00:44:18 +0300
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2010-02-17 00:44:18 +0300
commit39ea873a8bc91a7fc4df7b1fa7a7a18239fddae1 (patch)
tree68a81953a98bc282e804c924b32781230ee74af1 /source/blender/freestyle/intern/application/Controller.cpp
parentca908e21e215a87f0783fed47feed394ccdea4d6 (diff)
Fixed bugs in AppCanvas::readColorPixels() and
AppCanvas::readDepthPixels() that caused a crash when the aspect ratio was not 1:1.
Diffstat (limited to 'source/blender/freestyle/intern/application/Controller.cpp')
-rwxr-xr-xsource/blender/freestyle/intern/application/Controller.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp
index bf8d30b243e..43f091d3fa1 100755
--- a/source/blender/freestyle/intern/application/Controller.cpp
+++ b/source/blender/freestyle/intern/application/Controller.cpp
@@ -176,18 +176,18 @@ void Controller::setView(AppView *iView)
_Canvas->setViewer(_pView);
}
-void Controller::setPassDiffuse(float *pass)
+void Controller::setPassDiffuse(float *buf, int width, int height)
{
AppCanvas *app_canvas = dynamic_cast<AppCanvas *>(_Canvas);
assert(app_canvas != 0);
- app_canvas->setPassDiffuse(pass);
+ app_canvas->setPassDiffuse(buf, width, height);
}
-void Controller::setPassZ(float *pass)
+void Controller::setPassZ(float *buf, int width, int height)
{
AppCanvas *app_canvas = dynamic_cast<AppCanvas *>(_Canvas);
assert(app_canvas != 0);
- app_canvas->setPassZ(pass);
+ app_canvas->setPassZ(buf, width, height);
}
void Controller::setContext(bContext *C)
@@ -367,6 +367,9 @@ void Controller::CloseFile()
_SceneNumFaces = 0;
_minEdgeSize = DBL_MAX;
+ // soc: reset passes
+ setPassDiffuse(NULL, 0, 0);
+ setPassZ(NULL, 0, 0);
}
@@ -867,4 +870,8 @@ void Controller::init_options(){
// soc: initialize canvas
_Canvas->init();
+
+ // soc: initialize passes
+ setPassDiffuse(NULL, 0, 0);
+ setPassZ(NULL, 0, 0);
}