Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_node/drawnode.c')
-rw-r--r--source/blender/editors/space_node/drawnode.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index effb8eb7de5..f51d6cc3660 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -37,6 +37,7 @@
#include "DNA_object_types.h"
#include "DNA_space_types.h"
#include "DNA_screen_types.h"
+#include "DNA_userdef_types.h"
#include "BKE_context.h"
#include "BKE_curve.h"
@@ -923,7 +924,7 @@ static void node_shader_buts_subsurface(uiLayout *layout, bContext *C, PointerRN
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)
+ if (cscene.data && (RNA_enum_get(&cscene, "device") == 1 && U.compute_device_type != 0))
uiItemL(layout, IFACE_("SSS not supported on GPU"), ICON_ERROR);
}
@@ -933,12 +934,12 @@ static void node_shader_buts_subsurface(uiLayout *layout, bContext *C, PointerRN
static void node_shader_buts_volume(uiLayout *layout, bContext *C, PointerRNA *UNUSED(ptr))
{
- /* SSS does not work on GPU yet */
+ /* Volume 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)
+ if (cscene.data && (RNA_enum_get(&cscene, "device") == 1 && U.compute_device_type != 0))
uiItemL(layout, IFACE_("Volumes not supported on GPU"), ICON_ERROR);
}
}