diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-30 10:29:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-30 10:29:38 +0300 |
commit | 25b7bdb6a96acfa0a43a50d5087a2d9be17347c1 (patch) | |
tree | 2e2feeb5e205cdc4328df0ab40975809ef4369f5 | |
parent | 1f1c2d8ce8744c84d0c663885ef5da04c301fefc (diff) | |
parent | 5c0d8bcdc7c928d389f54ce3beb6f7d9d3c63021 (diff) |
Merge branch 'master' into blender2.8
6 files changed, 18 insertions, 24 deletions
diff --git a/intern/cycles/kernel/shaders/node_ambient_occlusion.osl b/intern/cycles/kernel/shaders/node_ambient_occlusion.osl index 865ad4c9fb9..825cccd59ce 100644 --- a/intern/cycles/kernel/shaders/node_ambient_occlusion.osl +++ b/intern/cycles/kernel/shaders/node_ambient_occlusion.osl @@ -18,11 +18,11 @@ shader node_ambient_occlusion( color ColorIn = color(1.0, 1.0, 1.0), - int samples = 8, + int samples = 16, float Distance = 1.0, normal Normal = N, int inside = 0, - int only_local = 1, + int only_local = 0, output color ColorOut = color(1.0, 1.0, 1.0), output float AO = 1.0) { diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp index ea25056e9fd..e7f13f3123f 100644 --- a/intern/cycles/render/nodes.cpp +++ b/intern/cycles/render/nodes.cpp @@ -2792,14 +2792,14 @@ NODE_DEFINE(AmbientOcclusionNode) { NodeType* type = NodeType::add("ambient_occlusion", create, NodeType::SHADER); - SOCKET_INT(samples, "Samples", 8); + SOCKET_INT(samples, "Samples", 16); SOCKET_IN_COLOR(color, "Color", make_float3(1.0f, 1.0f, 1.0f)); SOCKET_IN_FLOAT(distance, "Distance", 1.0f); SOCKET_IN_NORMAL(normal, "Normal", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_NORMAL); SOCKET_BOOLEAN(inside, "Inside", false); - SOCKET_BOOLEAN(only_local, "Only Local", true); + SOCKET_BOOLEAN(only_local, "Only Local", false); SOCKET_OUT_COLOR(color, "Color"); SOCKET_OUT_FLOAT(ao, "AO"); diff --git a/release/scripts/modules/bpy/utils/previews.py b/release/scripts/modules/bpy/utils/previews.py index 568116b027c..a3baf8f878c 100644 --- a/release/scripts/modules/bpy/utils/previews.py +++ b/release/scripts/modules/bpy/utils/previews.py @@ -37,7 +37,7 @@ __all__ = ( "new", "remove", "ImagePreviewCollection", - ) +) import _bpy _utils_previews = _bpy._utils_previews @@ -76,9 +76,9 @@ class ImagePreviewCollection(dict): return raise ResourceWarning( - "<%s id=%s[%d]>: left open, remove with " - "'bpy.utils.previews.remove()'" % - (self.__class__.__name__, self._uuid, len(self))) + f"{self!r}: left open, remove with " + "'bpy.utils.previews.remove()'" + ) self.close() def _gen_key(self, name): @@ -86,17 +86,17 @@ class ImagePreviewCollection(dict): def new(self, name): if name in self: - raise KeyError("key %r already exists" % name) + raise KeyError(f"key {name!r} already exists") p = self[name] = _utils_previews.new( - self._gen_key(name)) + self._gen_key(name)) return p new.__doc__ = _utils_previews.new.__doc__ def load(self, name, path, path_type, force_reload=False): if name in self: - raise KeyError("key %r already exists" % name) + raise KeyError("key {name!r} already exists") p = self[name] = _utils_previews.load( - self._gen_key(name), path, path_type, force_reload) + self._gen_key(name), path, path_type, force_reload) return p load.__doc__ = _utils_previews.load.__doc__ @@ -116,11 +116,7 @@ class ImagePreviewCollection(dict): super().__delitem__(key) def __repr__(self): - return "<%s id=%s[%d], %s>" % ( - self.__class__.__name__, - self._uuid, - len(self), - super().__repr__()) + return f"<{self.__class__.__name__:s} id={self._uuid:s}[{len(self):d}], {super()!r}>" def new(): @@ -149,5 +145,6 @@ import atexit def exit_clear_warning(): del ImagePreviewCollection.__del__ + atexit.register(exit_clear_warning) del atexit, exit_clear_warning diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index bb54f26131a..5edc66300ce 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -7122,10 +7122,7 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s /* highlight has timers for tooltips and auto open */ if (state == BUTTON_STATE_HIGHLIGHT) { - /* for list-items (that are not drawn with regular emboss), don't change selection based on hovering */ - if (((but->flag & UI_BUT_LIST_ITEM) == 0) && (but->dragflag & UI_EMBOSS_NONE)) { - but->flag &= ~UI_SELECT; - } + but->flag &= ~UI_SELECT; button_tooltip_timer_reset(C, but); diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index f4c0123567c..0a794a18b20 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -1710,7 +1710,7 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index } /* Mark non-embossed textfields inside a listbox. */ - if (but && (block->flag & UI_BLOCK_LIST_ITEM) && (but->dt & UI_EMBOSS_NONE)) { + if (but && (block->flag & UI_BLOCK_LIST_ITEM) && (but->type == UI_BTYPE_TEXT) && (but->dt & UI_EMBOSS_NONE)) { UI_but_flag_enable(but, UI_BUT_LIST_ITEM); } diff --git a/source/blender/nodes/shader/nodes/node_shader_ambient_occlusion.c b/source/blender/nodes/shader/nodes/node_shader_ambient_occlusion.c index 673e6c61885..4c770984717 100644 --- a/source/blender/nodes/shader/nodes/node_shader_ambient_occlusion.c +++ b/source/blender/nodes/shader/nodes/node_shader_ambient_occlusion.c @@ -52,8 +52,8 @@ static int node_shader_gpu_ambient_occlusion(GPUMaterial *mat, bNode *node, bNod static void node_shader_init_ambient_occlusion(bNodeTree *UNUSED(ntree), bNode *node) { - node->custom1 = 8; /* samples */ - node->custom2 = SHD_AO_LOCAL; + node->custom1 = 16; /* samples */ + node->custom2 = 0; } /* node type definition */ |