From d6313f47af8aa0156fa3beffad71cd689eadf397 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 21 Jun 2018 11:18:51 +0200 Subject: Fix T55564: Cycles OpenCL build error on some scenes. --- intern/cycles/kernel/svm/svm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intern/cycles/kernel/svm/svm.h b/intern/cycles/kernel/svm/svm.h index 10d5fe0e42b..2bee4bc7b69 100644 --- a/intern/cycles/kernel/svm/svm.h +++ b/intern/cycles/kernel/svm/svm.h @@ -144,7 +144,6 @@ CCL_NAMESPACE_END #include "kernel/svm/svm_color_util.h" #include "kernel/svm/svm_math_util.h" -#include "kernel/svm/svm_ao.h" #include "kernel/svm/svm_attribute.h" #include "kernel/svm/svm_gradient.h" #include "kernel/svm/svm_blackbody.h" @@ -185,6 +184,7 @@ CCL_NAMESPACE_END #include "kernel/svm/svm_bump.h" #ifdef __SHADER_RAYTRACE__ +# include "kernel/svm/svm_ao.h" # include "kernel/svm/svm_bevel.h" #endif -- cgit v1.2.3 From a283333cd8eaaa163469ecbc1d878cd4e82217de Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 21 Jun 2018 11:29:09 +0200 Subject: Fix Cycles CUDA render errors with CUDA 9.2. Work around what might be a compiler bug. --- intern/cycles/device/device_cuda.cpp | 2 +- intern/cycles/kernel/closure/bsdf.h | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp index 9d893ee61ad..bf5a95dd233 100644 --- a/intern/cycles/device/device_cuda.cpp +++ b/intern/cycles/device/device_cuda.cpp @@ -385,7 +385,7 @@ public: VLOG(1) << "Found nvcc " << nvcc << ", CUDA version " << cuda_version << "."; - const int major = cuda_version / 10, minor = cuda_version & 10; + const int major = cuda_version / 10, minor = cuda_version % 10; if(cuda_version == 0) { cuda_error_message("CUDA nvcc compiler version could not be parsed."); return false; diff --git a/intern/cycles/kernel/closure/bsdf.h b/intern/cycles/kernel/closure/bsdf.h index d8ff69ca241..c1b02cd4be1 100644 --- a/intern/cycles/kernel/closure/bsdf.h +++ b/intern/cycles/kernel/closure/bsdf.h @@ -72,15 +72,15 @@ ccl_device_inline float bsdf_get_roughness_squared(const ShaderClosure *sc) return bsdf_get_specular_roughness_squared(sc); } -ccl_device_forceinline int bsdf_sample(KernelGlobals *kg, - ShaderData *sd, - const ShaderClosure *sc, - float randu, - float randv, - float3 *eval, - float3 *omega_in, - differential3 *domega_in, - float *pdf) +ccl_device_inline int bsdf_sample(KernelGlobals *kg, + ShaderData *sd, + const ShaderClosure *sc, + float randu, + float randv, + float3 *eval, + float3 *omega_in, + differential3 *domega_in, + float *pdf) { int label; @@ -210,7 +210,7 @@ ccl_device_forceinline int bsdf_sample(KernelGlobals *kg, #ifndef __KERNEL_CUDA__ ccl_device #else -ccl_device_forceinline +ccl_device_inline #endif float3 bsdf_eval(KernelGlobals *kg, ShaderData *sd, -- cgit v1.2.3 From 52aa963f0ef1b6f4abba6653e9a441dee234127a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 21 Jun 2018 10:58:03 +0200 Subject: Fix T55568: second click event ignored Double-click handling caused the second click to be ignored for keymaps that only handle click. --- source/blender/windowmanager/intern/wm_event_system.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index c9a09f46a37..76e9b116321 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2329,6 +2329,13 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers) else if (event->val == KM_DBL_CLICK) { event->val = KM_PRESS; action |= wm_handlers_do_intern(C, event, handlers); + event->val = KM_RELEASE; + action |= wm_handlers_do_intern(C, event, handlers); + + if (wm_action_not_handled(action)) { + event->val = KM_CLICK; + action |= wm_handlers_do_intern(C, event, handlers); + } /* revert value if not handled */ if (wm_action_not_handled(action)) { -- cgit v1.2.3 From a4f08297ed3c201c66a340e5261cac0aeb68b523 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 21 Jun 2018 14:54:21 +0200 Subject: UI: preference for developer extras Currently only used for "Edit Source" feature. --- release/scripts/startup/bl_ui/space_userpref.py | 1 + release/scripts/startup/bl_ui/space_view3d.py | 2 +- source/blender/editors/interface/interface_handlers.c | 6 ++++-- source/blender/editors/interface/resources.c | 2 +- source/blender/makesdna/DNA_userdef_types.h | 2 +- source/blender/makesrna/intern/rna_userdef.c | 6 ++++++ 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 8db9d63c0aa..b7d425bbc6f 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -223,6 +223,7 @@ class USERPREF_PT_interface(Panel): col.prop(view, "ui_line_width", text="Line Width") col.prop(view, "show_tooltips") col.prop(view, "show_tooltips_python") + col.prop(view, "show_developer_ui") col.prop(view, "show_object_info", text="Object Info") col.prop(view, "show_large_cursors") col.prop(view, "show_view_name", text="View Name") diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 7d582f8536f..c8f113f558d 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3728,7 +3728,7 @@ class VIEW3D_PT_view3d_meshdisplay(Panel): col.label(text="Face Info:") col.prop(mesh, "show_extra_face_area", text="Area") col.prop(mesh, "show_extra_face_angle", text="Angle") - if bpy.app.debug: + if context.user_preferences.view.show_developer_ui: layout.prop(mesh, "show_extra_indices") diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 48d9e186863..49617786236 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -7138,8 +7138,10 @@ static bool ui_but_menu(bContext *C, uiBut *but) } /* perhaps we should move this into (G.debug & G_DEBUG) - campbell */ - if (ui_block_is_menu(but->block) == false) { - uiItemFullO(layout, "UI_OT_editsource", NULL, ICON_NONE, NULL, WM_OP_INVOKE_DEFAULT, 0, NULL); + if (U.flag & USER_DEVELOPER_UI) { + if (ui_block_is_menu(but->block) == false) { + uiItemFullO(layout, "UI_OT_editsource", NULL, ICON_NONE, NULL, WM_OP_INVOKE_DEFAULT, 0, NULL); + } } if (BKE_addon_find(&U.addons, "ui_translate")) { diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 4864133c905..f9ca2095390 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -2758,7 +2758,7 @@ void init_userdef_do_versions(Main *bmain) U.flag &= ~( USER_FLAG_DEPRECATED_1 | USER_FLAG_DEPRECATED_2 | USER_FLAG_DEPRECATED_3 | USER_FLAG_DEPRECATED_6 | USER_FLAG_DEPRECATED_7 | - USER_FLAG_DEPRECATED_9 | USER_FLAG_DEPRECATED_10); + USER_FLAG_DEPRECATED_9 | USER_DEVELOPER_UI); U.uiflag &= ~( USER_UIFLAG_DEPRECATED_7); U.transopts &= ~( diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 0a9f715f86b..314ca1dfaa9 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -613,7 +613,7 @@ typedef enum eUserPref_Flag { USER_FLAG_DEPRECATED_7 = (1 << 7), /* cleared */ USER_MAT_ON_OB = (1 << 8), USER_FLAG_DEPRECATED_9 = (1 << 9), /* cleared */ - USER_FLAG_DEPRECATED_10 = (1 << 10), /* cleared */ + USER_DEVELOPER_UI = (1 << 10), USER_TOOLTIPS = (1 << 11), USER_TWOBUTTONMOUSE = (1 << 12), USER_NONUMPAD = (1 << 13), diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 15ebbd02018..c5a74122b3b 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -3374,6 +3374,12 @@ static void rna_def_userdef_view(BlenderRNA *brna) RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_TOOLTIPS_PYTHON); RNA_def_property_ui_text(prop, "Python Tooltips", "Show Python references in tooltips"); + prop = RNA_def_property(srna, "show_developer_ui", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_DEVELOPER_UI); + RNA_def_property_ui_text( + prop, "Developer Extras", + "Show options for developers (edit source in context menu, geometry indices)"); + prop = RNA_def_property(srna, "show_object_info", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DRAWVIEWINFO); RNA_def_property_ui_text(prop, "Display Object Info", "Display objects name and frame number in 3D view"); -- cgit v1.2.3