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:
authorThomas Dinges <blender@dingto.org>2014-01-25 21:57:02 +0400
committerThomas Dinges <blender@dingto.org>2014-01-25 21:57:02 +0400
commitf746d90398760b604c0b0037ab5d592dfd88c1ee (patch)
tree53b0d4a66f9b48fc29ae4bd84678f6783f693895 /intern/cycles/app/cycles_xml.cpp
parent70e844ea11f3ed0c215bd667f668303ad55fd785 (diff)
Cycles Standalone: Various changes
* Change Info in header, put more important info to the left * API: Move Camera width/height to camera, add some film properties * Add ESC key to help menu
Diffstat (limited to 'intern/cycles/app/cycles_xml.cpp')
-rw-r--r--intern/cycles/app/cycles_xml.cpp44
1 files changed, 23 insertions, 21 deletions
diff --git a/intern/cycles/app/cycles_xml.cpp b/intern/cycles/app/cycles_xml.cpp
index e6e047a5642..1e41525a70e 100644
--- a/intern/cycles/app/cycles_xml.cpp
+++ b/intern/cycles/app/cycles_xml.cpp
@@ -223,28 +223,12 @@ static bool xml_read_enum(ustring *str, ShaderEnum& enm, pugi::xml_node node, co
static void xml_read_film(const XMLReadState& state, pugi::xml_node node)
{
- Camera *cam = state.scene->camera;
-
- xml_read_int(&cam->width, node, "width");
- xml_read_int(&cam->height, node, "height");
-
- float aspect = (float)cam->width/(float)cam->height;
-
- if(cam->width >= cam->height) {
- cam->viewplane.left = -aspect;
- cam->viewplane.right = aspect;
- cam->viewplane.bottom = -1.0f;
- cam->viewplane.top = 1.0f;
- }
- else {
- cam->viewplane.left = -1.0f;
- cam->viewplane.right = 1.0f;
- cam->viewplane.bottom = -1.0f/aspect;
- cam->viewplane.top = 1.0f/aspect;
- }
+ Film *film = state.scene->film;
+
+ xml_read_float(&film->exposure, node, "exposure");
- cam->need_update = true;
- cam->update();
+ /* ToDo: Filter Type */
+ xml_read_float(&film->filter_width, node, "filter_width");
}
/* Integrator */
@@ -301,6 +285,24 @@ static void xml_read_camera(const XMLReadState& state, pugi::xml_node node)
{
Camera *cam = state.scene->camera;
+ xml_read_int(&cam->width, node, "width");
+ xml_read_int(&cam->height, node, "height");
+
+ float aspect = (float)cam->width/(float)cam->height;
+
+ if(cam->width >= cam->height) {
+ cam->viewplane.left = -aspect;
+ cam->viewplane.right = aspect;
+ cam->viewplane.bottom = -1.0f;
+ cam->viewplane.top = 1.0f;
+ }
+ else {
+ cam->viewplane.left = -1.0f;
+ cam->viewplane.right = 1.0f;
+ cam->viewplane.bottom = -1.0f/aspect;
+ cam->viewplane.top = 1.0f/aspect;
+ }
+
if(xml_read_float(&cam->fov, node, "fov"))
cam->fov *= M_PI/180.0f;