Merge branch 'master' into blender2.8
[blender.git] / intern / cycles / blender / blender_session.h
index b8a9096b354655e6060967d845803eafa1337ff2..99b14a09a5cbd051934aa2e967d141980b956793 100644 (file)
@@ -37,12 +37,11 @@ public:
        BlenderSession(BL::RenderEngine& b_engine,
                       BL::UserPreferences& b_userpref,
                       BL::BlendData& b_data,
-                      BL::Scene& b_scene);
+                      bool preview_osl);
 
        BlenderSession(BL::RenderEngine& b_engine,
                       BL::UserPreferences& b_userpref,
                       BL::BlendData& b_data,
-                      BL::Scene& b_scene,
                       BL::SpaceView3D& b_v3d,
                       BL::RegionView3D& b_rv3d,
                       int width, int height);
@@ -56,12 +55,13 @@ public:
        void free_session();
 
        void reset_session(BL::BlendData& b_data,
-                          BL::Scene& b_scene);
+                          BL::Depsgraph& b_depsgraph);
 
        /* offline render */
-       void render();
+       void render(BL::Depsgraph& b_depsgraph);
 
-       void bake(BL::Object& b_object,
+       void bake(BL::Depsgraph& b_depsgrah,
+                 BL::Object& b_object,
                  const string& pass_type,
                  const int custom_flag,
                  const int object_id,
@@ -83,7 +83,7 @@ public:
        void update_render_tile(RenderTile& rtile, bool highlight);
 
        /* interactive updates */
-       void synchronize();
+       void synchronize(BL::Depsgraph& b_depsgraph);
 
        /* drawing */
        bool draw(int w, int h);
@@ -105,6 +105,7 @@ public:
        BL::UserPreferences b_userpref;
        BL::BlendData b_data;
        BL::RenderSettings b_render;
+       BL::Depsgraph b_depsgraph;
        BL::Scene b_scene;
        BL::SpaceView3D b_v3d;
        BL::RegionView3D b_rv3d;
@@ -117,6 +118,7 @@ public:
        double last_status_time;
 
        int width, height;
+       bool preview_osl;
        double start_resize_time;
 
        void *python_thread_state;
@@ -166,6 +168,7 @@ protected:
                                        float *pixels,
                                        const size_t pixels_size,
                                        const bool free_cache);
+       void builtin_images_load();
 
        /* Update tile manager to reflect resumable render settings. */
        void update_resumable_tile_manager(int num_samples);