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:
-rw-r--r--intern/cycles/device/device_cuda.cpp2
-rw-r--r--intern/cycles/kernel/closure/bsdf.h20
-rw-r--r--intern/cycles/kernel/svm/svm.h2
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py1
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py3
-rw-r--r--source/blender/editors/interface/interface_handlers.c6
-rw-r--r--source/blender/editors/interface/resources.c2
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c6
9 files changed, 27 insertions, 17 deletions
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index 3ba5a8de8ff..656ad07d657 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,
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
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 6baca880ce3..4749eb7690c 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -231,6 +231,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 804da7ede78..2aaeba653fb 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3845,6 +3845,7 @@ class VIEW3D_PT_overlay_edit_mesh(Panel):
data = context.active_object.data
statvis = tool_settings.statvis
with_freestyle = bpy.app.build_options.freestyle
+ show_developer_ui = context.user_preferences.view.show_developer_ui
col = layout.column()
col.active = display_all
@@ -3867,7 +3868,7 @@ class VIEW3D_PT_overlay_edit_mesh(Panel):
sub.prop(data, "show_extra_face_area", text="Face Area")
sub.prop(data, "show_extra_face_angle", text="Face Angle")
- if bpy.app.debug:
+ if show_developer_ui:
sub.prop(data, "show_extra_indices", text="Indices")
if with_freestyle:
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index f999bbb62f3..d25488670e4 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -7066,8 +7066,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 8bd41b874f5..9c28ed4299d 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -2920,7 +2920,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 f4e8d5e0000..71e7600d2ff 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -632,7 +632,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 b857660cad6..d6e6eb31dc3 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -3492,6 +3492,12 @@ static void rna_def_userdef_view(BlenderRNA *brna)
RNA_def_property_boolean_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");