From 867ffacabf6c25ded40a39b5af7d61fee1dacc4d Mon Sep 17 00:00:00 2001 From: Alex Fuller Date: Mon, 14 Jan 2019 15:41:24 +0100 Subject: Fix Cycles node definition typos and incorrect enum value. Differential Revision: https://developer.blender.org/D4174 --- intern/cycles/render/nodes.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'intern') diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp index a1f88dca466..77a452674fb 100644 --- a/intern/cycles/render/nodes.cpp +++ b/intern/cycles/render/nodes.cpp @@ -3735,7 +3735,7 @@ void LightPathNode::compile(OSLCompiler& compiler) NODE_DEFINE(LightFalloffNode) { - NodeType* type = NodeType::add("light_fallof", create, NodeType::SHADER); + NodeType* type = NodeType::add("light_falloff", create, NodeType::SHADER); SOCKET_IN_FLOAT(strength, "Strength", 100.0f); SOCKET_IN_FLOAT(smooth, "Smooth", 0.0f); @@ -5843,7 +5843,7 @@ NODE_DEFINE(NormalMapNode) space_enum.insert("world", NODE_NORMAL_MAP_WORLD); space_enum.insert("blender_object", NODE_NORMAL_MAP_BLENDER_OBJECT); space_enum.insert("blender_world", NODE_NORMAL_MAP_BLENDER_WORLD); - SOCKET_ENUM(space, "Space", space_enum, NODE_TANGENT_RADIAL); + SOCKET_ENUM(space, "Space", space_enum, NODE_NORMAL_MAP_TANGENT); SOCKET_STRING(attribute, "Attribute", ustring()); @@ -6054,7 +6054,7 @@ NODE_DEFINE(DisplacementNode) space_enum.insert("object", NODE_NORMAL_MAP_OBJECT); space_enum.insert("world", NODE_NORMAL_MAP_WORLD); - SOCKET_ENUM(space, "Space", space_enum, NODE_NORMAL_MAP_TANGENT); + SOCKET_ENUM(space, "Space", space_enum, NODE_NORMAL_MAP_OBJECT); SOCKET_IN_FLOAT(height, "Height", 0.0f); SOCKET_IN_FLOAT(midlevel, "Midlevel", 0.5f); -- cgit v1.2.3 From c08c6c8336e069c844fff49b4b870b6a727a2ef9 Mon Sep 17 00:00:00 2001 From: Alex Fuller Date: Mon, 14 Jan 2019 15:42:54 +0100 Subject: Cleanup: add begin/end iterators to Cycles NodeEnum. Differential Revision: https://developer.blender.org/D4173 --- intern/cycles/graph/node_enum.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'intern') diff --git a/intern/cycles/graph/node_enum.h b/intern/cycles/graph/node_enum.h index 9de776ddb55..705aec9a918 100644 --- a/intern/cycles/graph/node_enum.h +++ b/intern/cycles/graph/node_enum.h @@ -39,6 +39,9 @@ struct NodeEnum { int operator[](ustring x) const { return left.find(x)->second; } ustring operator[](int y) const { return right.find(y)->second; } + unordered_map::const_iterator begin() const { return left.begin(); } + unordered_map::const_iterator end() const { return left.end(); } + private: unordered_map left; unordered_map right; -- cgit v1.2.3 From 165caafb99c6846e53d11c4e966990aaffc06cea Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 15 Jan 2019 16:44:08 +1100 Subject: Revert fix for T48901: Use of XIWarpPointer Xorg's XIWarpPointer doesn't support multi-head display while XWarpPointer does. Revert since this is a known TODO in Xorg and setting a custom xinput matrix seems not to be used often. Resolves T50383 --- intern/ghost/intern/GHOST_SystemX11.cpp | 2 +- intern/ghost/intern/GHOST_SystemX11.h | 6 ++++++ intern/ghost/intern/GHOST_WindowX11.cpp | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'intern') diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index 1791908f670..194b0fc5df7 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -1573,7 +1573,7 @@ setCursorPosition( } #endif -#ifdef WITH_X11_XINPUT +#if defined(WITH_X11_XINPUT) && defined(USE_X11_XINPUT_WARP) if ((m_xinput_version.present) && (m_xinput_version.major_version >= 2)) { diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h index b5d06eed412..a166ca86dea 100644 --- a/intern/ghost/intern/GHOST_SystemX11.h +++ b/intern/ghost/intern/GHOST_SystemX11.h @@ -42,6 +42,12 @@ // For tablets #ifdef WITH_X11_XINPUT # include + +/* Disable xinput warp, currently not implemented by Xorg for multi-head display. + * (see comment in xserver "Xi/xiwarppointer.c" -> "FIXME: panoramix stuff is missing" ~ v1.13.4) + * If this is supported we can add back xinput for warping (fixing T48901). + * For now disable (see T50383). */ +// # define USE_X11_XINPUT_WARP #endif #if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING) diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp index ee8218b4827..7e5c77618dd 100644 --- a/intern/ghost/intern/GHOST_WindowX11.cpp +++ b/intern/ghost/intern/GHOST_WindowX11.cpp @@ -1529,7 +1529,7 @@ setWindowCursorGrab( * blender gets can be outside the screen causing menus not to show * properly unless the user moves the mouse */ -#ifdef WITH_X11_XINPUT +#if defined(WITH_X11_XINPUT) && defined(USE_X11_XINPUT_WARP) if ((m_system->m_xinput_version.present) && (m_system->m_xinput_version.major_version >= 2)) { -- cgit v1.2.3