diff options
author | Nathan Letwory <nathan@mcneel.com> | 2014-05-16 17:43:28 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@mcneel.com> | 2014-05-19 15:46:57 +0400 |
commit | 9a7c4ead3f57052c911570d1b507e1f5229210c8 (patch) | |
tree | 7477e4947f2a49d74e7601887f58f64ddaf364e4 /intern/cycles/blender/blender_sync.cpp | |
parent | 74f77a295649b7f42ede5072c5642fd02d67c5dd (diff) |
Move BVHType and shadingsystem enums to top-level of Cycles namespace.
Easier access of BVHType and deduplication for ShadingSystem.
Reviewers: dingto, brecht
Differential Revision: https://developer.blender.org/D534
Diffstat (limited to 'intern/cycles/blender/blender_sync.cpp')
-rw-r--r-- | intern/cycles/blender/blender_sync.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index 555692d9e21..d0eac1619f9 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -35,6 +35,7 @@ #include "util_debug.h" #include "util_foreach.h" #include "util_opengl.h" +#include "util_types.h" CCL_NAMESPACE_BEGIN @@ -362,19 +363,19 @@ SceneParams BlenderSync::get_scene_params(BL::Scene b_scene, bool background) const bool shadingsystem = RNA_boolean_get(&cscene, "shading_system"); if(shadingsystem == 0) - params.shadingsystem = SceneParams::SVM; + params.shadingsystem = ShadingSystem::SVM; else if(shadingsystem == 1) - params.shadingsystem = SceneParams::OSL; + params.shadingsystem = ShadingSystem::OSL; if(background) - params.bvh_type = SceneParams::BVH_STATIC; + params.bvh_type = BVHType::BVH_STATIC; else - params.bvh_type = (SceneParams::BVHType)RNA_enum_get(&cscene, "debug_bvh_type"); + params.bvh_type = (BVHType)RNA_enum_get(&cscene, "debug_bvh_type"); params.use_bvh_spatial_split = RNA_boolean_get(&cscene, "debug_use_spatial_splits"); params.use_bvh_cache = (background)? RNA_boolean_get(&cscene, "use_cache"): false; - if(background && params.shadingsystem != SceneParams::OSL) + if(background && params.shadingsystem != ShadingSystem::OSL) params.persistent_data = r.use_persistent_data(); else params.persistent_data = false; @@ -511,9 +512,9 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine b_engine, BL::Use const bool shadingsystem = RNA_boolean_get(&cscene, "shading_system"); if(shadingsystem == 0) - params.shadingsystem = SessionParams::SVM; + params.shadingsystem = ShadingSystem::SVM; else if(shadingsystem == 1) - params.shadingsystem = SessionParams::OSL; + params.shadingsystem = ShadingSystem::OSL; /* color managagement */ params.display_buffer_linear = GLEW_ARB_half_float_pixel && b_engine.support_display_space_shader(b_scene); |