Fix for #36823, SSS node now displays a warning, that it does not work on the GPU.

This commit is contained in:
Thomas Dinges
2013-09-27 10:53:55 +00:00
parent d0a092be5c
commit 467e3005ed

View File

@@ -913,8 +913,16 @@ static void node_shader_buts_glossy(uiLayout *layout, bContext *UNUSED(C), Point
uiItemR(layout, ptr, "distribution", 0, "", ICON_NONE);
}
static void node_shader_buts_subsurface(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static void node_shader_buts_subsurface(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
/* SSS does not work on GPU yet */
PointerRNA scene = CTX_data_pointer_get(C, "scene");
if (scene.data) {
PointerRNA cscene = RNA_pointer_get(&scene, "cycles");
if (cscene.data && RNA_enum_get(&cscene, "device") == 1)
uiItemL(layout, IFACE_("SSS not supported on GPU"), ICON_NONE);
}
uiItemR(layout, ptr, "falloff", 0, "", ICON_NONE);
}