diff options
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 5 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index bf44a558b1a..7486edf2319 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -53,19 +53,20 @@ class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel): scene = context.scene cscene = scene.cycles + device_type = context.user_preferences.system.compute_device_type split = layout.split() col = split.column() sub = col.column() - sub.active = cscene.device == 'CPU' + sub.enabled = (device_type == 'NONE' or cscene.device == 'CPU') sub.prop(cscene, "progressive") sub = col.column(align=True) sub.prop(cscene, "seed") sub.prop(cscene, "sample_clamp") - if cscene.progressive or cscene.device != 'CPU': + if cscene.progressive or (device_type != 'NONE' and cscene.device == 'GPU'): col = split.column() col.label(text="Samples:") sub = col.column(align=True) diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 7f8c6951620..666fa4d7b81 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -3265,6 +3265,7 @@ static void rna_def_userdef_system(BlenderRNA *brna) RNA_def_property_enum_items(prop, compute_device_type_items); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_userdef_compute_device_type_itemf"); RNA_def_property_ui_text(prop, "Compute Device Type", "Device to use for computation (rendering with Cycles)"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_PROPERTIES, NULL); prop = RNA_def_property(srna, "compute_device", PROP_ENUM, PROP_NONE); RNA_def_property_flag(prop, PROP_ENUM_NO_CONTEXT); |