diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-10-24 03:04:58 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-10-24 03:05:41 +0300 |
commit | f5456df095291c6cb2d0223a179746c8e514cd15 (patch) | |
tree | 76384b0c91806c95d55b007850ee225889a3250e /intern/cycles/app | |
parent | 254daf8f8c276a4e5292e5a12fcfa88296131878 (diff) | |
parent | 070a668d04844610059aaedc80c49e9038fd1779 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern/cycles/app')
-rw-r--r-- | intern/cycles/app/cycles_standalone.cpp | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/intern/cycles/app/cycles_standalone.cpp b/intern/cycles/app/cycles_standalone.cpp index 0cd249f0d84..939c6cf7eb5 100644 --- a/intern/cycles/app/cycles_standalone.cpp +++ b/intern/cycles/app/cycles_standalone.cpp @@ -97,27 +97,9 @@ static BufferParams& session_buffer_params() return buffer_params; } -static void session_init() -{ - options.session = new Session(options.session_params); - options.session->reset(session_buffer_params(), options.session_params.samples); - options.session->scene = options.scene; - - if(options.session_params.background && !options.quiet) - options.session->progress.set_update_callback(function_bind(&session_print_status)); -#ifdef WITH_CYCLES_STANDALONE_GUI - else - options.session->progress.set_update_callback(function_bind(&view_redraw)); -#endif - - options.session->start(); - - options.scene = NULL; -} - static void scene_init() { - options.scene = new Scene(options.scene_params, options.session_params.device); + options.scene = new Scene(options.scene_params, options.session->device); /* Read XML */ xml_read_file(options.scene, options.filepath.c_str()); @@ -136,6 +118,25 @@ static void scene_init() options.scene->camera->compute_auto_viewplane(); } +static void session_init() +{ + options.session = new Session(options.session_params); + options.session->reset(session_buffer_params(), options.session_params.samples); + + if(options.session_params.background && !options.quiet) + options.session->progress.set_update_callback(function_bind(&session_print_status)); +#ifdef WITH_CYCLES_STANDALONE_GUI + else + options.session->progress.set_update_callback(function_bind(&view_redraw)); +#endif + + options.session->start(); + + /* load scene */ + scene_init(); + options.session->scene = options.scene; +} + static void session_exit() { if(options.session) { @@ -430,7 +431,6 @@ static void options_parse(int argc, const char **argv) /* find matching device */ DeviceType device_type = Device::type_from_string(devicename.c_str()); vector<DeviceInfo>& devices = Device::available_devices(); - DeviceInfo device_info; bool device_available = false; foreach(DeviceInfo& device, devices) { @@ -467,9 +467,6 @@ static void options_parse(int argc, const char **argv) /* For smoother Viewport */ options.session_params.start_resolution = 64; - - /* load scene */ - scene_init(); } CCL_NAMESPACE_END |