Cycles: make "Open Shading Language" a boolean toggle, the other option "GPU Compatible" was confusing.

This commit is contained in:
Brecht Van Lommel 2012-12-14 15:26:49 +00:00
parent 16003d2738
commit 0f5b5bb5f1
2 changed files with 5 additions and 12 deletions

@ -36,11 +36,6 @@ enum_feature_set = (
('EXPERIMENTAL', "Experimental", "Use experimental and incomplete features that might be broken or change in the future"),
)
enum_shading_systems = (
('GPU_COMPATIBLE', "GPU Compatible", "Restricted shading system compatible with GPU rendering"),
('OSL', "Open Shading Language", "Open Shading Language shading system that only runs on the CPU"),
)
enum_displacement_methods = (
('BUMP', "Bump", "Bump mapping to simulate the appearance of displacement"),
('TRUE', "True", "Use true displacement only, requires fine subdivision"),
@ -89,11 +84,9 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
items=enum_feature_set,
default='SUPPORTED',
)
cls.shading_system = EnumProperty(
name="Shading System",
description="Shading system to use for rendering",
items=enum_shading_systems,
default='GPU_COMPATIBLE',
cls.shading_system = BoolProperty(
name="Open Shading Language",
description="Use Open Shading Language (CPU rendering only)",
)
cls.progressive = BoolProperty(

@ -289,7 +289,7 @@ SceneParams BlenderSync::get_scene_params(BL::Scene b_scene, bool background)
BL::RenderSettings r = b_scene.render();
SceneParams params;
PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
int shadingsystem = RNA_enum_get(&cscene, "shading_system");
int shadingsystem = RNA_boolean_get(&cscene, "shading_system");
if(shadingsystem == 0)
params.shadingsystem = SceneParams::SVM;
@ -414,7 +414,7 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine b_engine, BL::Use
params.progressive = true;
/* shading system - scene level needs full refresh */
int shadingsystem = RNA_enum_get(&cscene, "shading_system");
int shadingsystem = RNA_boolean_get(&cscene, "shading_system");
if(shadingsystem == 0)
params.shadingsystem = SessionParams::SVM;