diff options
-rw-r--r-- | intern/cycles/blender/blender_sync.cpp | 10 | ||||
-rw-r--r-- | intern/cycles/render/session.h | 7 |
2 files changed, 15 insertions, 2 deletions
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index 24a561116ec..c63f72c68c6 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -397,7 +397,15 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine b_engine, BL::Use } else params.progressive = true; - + + /* shading system - scene level needs full refresh */ + int shadingsystem = RNA_enum_get(&cscene, "shading_system"); + + if(shadingsystem == 0) + params.shadingsystem = SessionParams::SVM; + else if(shadingsystem == 1) + params.shadingsystem = SessionParams::OSL; + return params; } diff --git a/intern/cycles/render/session.h b/intern/cycles/render/session.h index a7d2bd56fd1..8941c6ac459 100644 --- a/intern/cycles/render/session.h +++ b/intern/cycles/render/session.h @@ -57,6 +57,8 @@ public: double reset_timeout; double text_timeout; + enum { OSL, SVM } shadingsystem; + SessionParams() { background = false; @@ -73,6 +75,8 @@ public: cancel_timeout = 0.1; reset_timeout = 0.1; text_timeout = 1.0; + + shadingsystem = SVM; } bool modified(const SessionParams& params) @@ -89,7 +93,8 @@ public: && threads == params.threads && cancel_timeout == params.cancel_timeout && reset_timeout == params.reset_timeout - && text_timeout == params.text_timeout); } + && text_timeout == params.text_timeout + && shadingsystem == params.shadingsystem); } }; |