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
AgeCommit message (Collapse)Author
2022-03-01Cleanup: use doxygen comments, correct spellingCampbell Barton
Also move eDupli_ID_Flags doc-string to it's declaration.
2022-02-26Merge branch 'blender-v3.1-release'Germano Cavalcante
2022-02-26Ghost/Event System: Support mapping more keysGermano Cavalcante
This fixes T93051, T76405 and maybe others. Characters like '²', '<' are not recognized in Blender's shortcut keys. And sometimes simple buttons like {key .} and {key /} on the Windows keyboard, although the symbol is "known", Blender also doesn't detect for shortcuts. For Windows, some of the symbols represented by `VK_OEM_[1-8]` values, depending on the language, are not mapped by Blender. On Mac there is a fallback reading the "actual character value of the 'remappable' keys". But sometimes the character is not mapped either. On Windows, the solution now mimics the Mac and tries to read the button's character as a fallback. For unmapped characters ('²', '<', '\''), now another value is chosen as a substitute. More "substitutes" may be added over time. Differential Revision: https://developer.blender.org/D14149
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-02-09Cleanup: GHOST_ISystem::toggleConsole APIShrey Aggarwal
GHOST_ISystem::toggleConsole had a somewhat misleading name it could be fed 4 different values, so it was not as much a toggle as a set console window state. This change renames `toggleConsole` to a more appropriately named `setConsoleWindowState` and replaces the integer it had to an enum so it's easy to tell what is being asked of it at the call site. Reviewed By: LazyDodo Differential Revision: https://developer.blender.org/D14020
2022-02-07Fix T90868: Console window flash when exitingShrey Aggarwal
If the console was hidden on windows, it would be made visible during shutdown in an effort not hide a potentially active interactive console session. This however did not take in account if blender was actually launched from an interactive console causing the console window to briefly flash during shutdown even when launched from the new launcher, the brief flash concerned some users. This change adjusts the behaviour to restore the console only when blender was started from the console. Reviewed By: LazyDodo Differential Revision: https://developer.blender.org/D14016
2022-01-29Fix T93626: Win IME Chinese Numpad DecimalHarley Acheson
Allow Windows IME Pinyin, when in Chinese mode, to use numpad decimal key to enter decimal point. See D13902 for more details. Differential Revision: https://developer.blender.org/D13902 Reviewed by Brecht Van Lommel
2022-01-06Cleanup: spelling in commentsCampbell Barton
2021-11-24Add tablet data to Wintab fallback cursor movement.Nicholas Rishel
2021-11-22IME: Fix Multi-Window Duplicated First CharacterTakahiro Shizuki
Fix problem with duplicated initial character when initiating or switching to new windows. This is done by updating our copies of state and modes from the new window when it receives WM_IME_SETCONTEXT message. This problem and fix are only for the Windows platform.
2021-10-12Revert "GHOST: Unify behavior of offscreen context creation"Clément Foucault
Commited by mistake This reverts commit 6535779c92b90035870047f178cf3eff95f0bdf0.
2021-10-12GHOST: Unify behavior of offscreen context creationClément Foucault
This makes sure the previously bound context is restored after creating a new context. This follows what is already happening on windows. All system backend are patched. This also removes the goto and some code duplication. Differential Revision: https://developer.blender.org/D12455
2021-09-24Cleanup: spelling in commentsCampbell Barton
2021-08-20Fix memory leak while processing mouse eventGermano Cavalcante
Assignment missed.
2021-08-05Win32 IME: Rename SetInputLanguage()Harley Acheson
GHOST_ImeWin32::SetInputLanguage() has a confusing name because it does not set the input language. It actually retrieves the current input locale from the OS and caches the value of the current input language ID. Therefore this patch renames it to "UpdateInputLanguage" Differential Revision: https://developer.blender.org/D12134 Reviewed by Ray Molenkamp
2021-08-01IME Win32: Fix Duplicated Initial CharacterTakahiro Shizuki
When entering characters using IME on Windows, Japanese and Chinese will both usually result in the first keystroke being duplicated. The problem is that we are informed too late, after the first key is pressed, that we are IME composing. This patch ensures we are entering non-English characters using ImmGetConversionStatus() and then deals with editing keys (like arrows and backspace) on a per-language basis. see D11929 for more details. Differential Revision: https://developer.blender.org/D11929 Reviewed by Brecht Van Lommel
2021-07-30Cleanup: clang-format (re-run after v12 version bump)Campbell Barton
2021-07-26Cleanup: spelling in commentsCampbell Barton
2021-07-06Cleanup: quiet discarded-qualifiers warningCampbell Barton
2021-07-05Replace Ghost integrals with stdint fixed width integers.Nicholas Rishel
Also replace integer with bool in Ghost API when only used as boolean, and uint8* with char* in Ghost API when variable is a string. Reviewed By: brecht Differential Revision: https://developer.blender.org/D11617 Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-29Fix T89465: Loss of mouse movement when window left with pen.Nicholas Rishel
When a window is left with a WinPointer pen, the inrange check prevents resetting pen info.
2021-06-28Cleanup: repeated terms in code comments & error messagesCampbell Barton
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24GHOST: remove unused EGL context includes in Win32 and CocoaChristian Rauch
2021-06-24Cleanup: clang-format, spellingCampbell Barton
2021-06-23Remove window iteration in WM_DISPLAYCHANGE.Nicholas Rishel
Iteration was incorrectly calling the same object. Had it called every window it would still be unnecessary as WM_DISPLAYCHANGE is sent to all broadcast receiving windows.
2021-06-22Cleanup: spellingCampbell Barton
2021-06-22Refactor of Wintab to use Wintab supplied mouse movement once verified ↵Nicholas Rishel
against system input. Reviewed By: brecht, LazyDodo Maniphest Tasks: T88852 Differential Revision: https://developer.blender.org/D11508
2021-06-15Win8 cleanup, remove dead function pointer and macro.Nicholas Rishel
2021-06-08Remove noop code from WM_MOUSEWHEEL processing.Nicholas Rishel
ChildWindowFromPoint retrieves the child of the provided window at a point. In this case it always returns 0 because HWND_DESKTOP is flag defined as 0, which is never a valid window handle and is not intended for use in place of a window handle. Forwarding of mousewheel events was added in adb08def613d, and later modified to the current unworking state in e9645806f563. Sending mouse wheel events to the window under the cursor is a system preference and therefore should not be overridden by Blender, therefore the noop code has been removed.
2021-05-31Windows: Clean-up win 8/8.1 API useRay Molenkamp
For 2.93 we bumped the minimum windows requirement to windows 8.1, but did not do any clean-up of any win 8/8.1 API usage we dynamically accessed though LoadLibrary/GetProcAddress. This patch bumps _WIN32_WINNT to 0x0603 (win 8.1) and cleans up any API use that was accessed in a more convoluted way than necessary Differential Revision: https://developer.blender.org/D11331 Reviewed by: harley, nicholas_rishel
2021-04-12Win32: Fix fullscreen errors using Taskbar system menuHarley Acheson
Changing window state using taskbar system menu could result in a titleless window. Differential Revision: https://developer.blender.org/D10812 Reviewed by Ray Molenkamp
2021-02-24Revert Automatic Tablet API dynamic fallback.Nicholas Rishel
Removes fallback to Windows Ink when Wintab reports no devices present. Returns to old behavior of using only Wintab if Wintab.dll exists.
2021-02-24Fix T85844: high pressure at start of line.Nicholas Rishel
m_tabletInRange is no longer set for Wintab after 2e81f2c01abd21fdbc reverted Wintab changes. This reverts most button processing to behavior present in 2.91.2. Left in place is a bugfix for Windows Ink: button events while a Windows Ink pen is in range should still be processed. Events processed by Windows Ink and not passed to DefWindowProc do not create WM_*BUTTON events, but button events from e.g. tablet pad express keys do create WM_*BUTTON events and should be handled.
2021-02-24Revert high fequency mouse input for Windows.Nicholas Rishel
Windows mouse history function GetMouesMovePointsEx has well documented bugs where it receives and returns 32 bit screen coordinates, but internally truncates to unsigned 16 bits. For mouse (relative position) input this is not a problem as motion events and the resulting screen coordinates reliably fit within 16 bit precision. For tablets (absolute position) the 16 bit truncation results in corrupt history when tablet drivers use mouse_event or SendInput from the Windows API to move the mouse cursor. Both of these functions take absolute mouse position as singed 32 bit value on the range of 0-65535 (or 0x0-0xFFFF) inclusive. Values larger than 0x7FFF (the largest signed 16 bit value) are reliably corrupt when retrieved from GetMouesMovePointsEx history. This is true regardless of whether mouse history is retrieved using display resolution (GMMP_USE_DISPLAY_POINTS) or high resolution points (GMMP_USE_HIGH_RESOLUTION_POINTS), the latter of which should return points in range 0-65535. Reviewed By: brecht Maniphest Tasks: T85874 Differential Revision: https://developer.blender.org/D10507
2021-02-23WM_MOUSEMOVE cleanup.Nicholas Rishel
2021-02-20Cleanup: doxygen sectionsCampbell Barton
2021-02-17Merge branch 'blender-v2.92-release'Nicholas Rishel
2021-02-17Fix T84701: Popup closes on release while dragging parameter.Nicholas Rishel
Windows Ghost cursor movement was previously changed to use SendInput because SetCursorPos sporadically allows the cursor to escape the window. This is now reverted because SendInput causes mouse history via GetMouseMovePointsEx to contain invalid movement history, likely due to interaction with mouse acceleration. This resulted in popups closing when the cursor appeared to leave their range.
2021-02-16Merge branch 'blender-v2.92-release'Nicholas Rishel
# Conflicts: # intern/ghost/intern/GHOST_SystemWin32.cpp # intern/ghost/intern/GHOST_WindowWin32.cpp # intern/ghost/intern/GHOST_WindowWin32.h
2021-02-16Revert Wintab High Frequency Input.Nicholas Rishel
This revert removes handling of cursor move and button press events during Wintab's WT_PACKET event, instead storing pressure and tilt information to be combined with Window's WM_MOUSEMOVE events. This also reverts dynamic enabling and disabling of Wintab, dependent on the chosen Tablet API. If the Tablet API is not explictly Windows Ink during startup, Wintab is loaded and enabled. Left in place is a fallback to Windows Ink when the Tablet API is set to Automatic and no Wintab devices are present. This allows devices with Wintab installed but not active to fallback to Windows Ink. Using position provided by Wintab was found to have too many regressions to include in Blender 2.93. The primary source of regressions was tablets which mapped coordinates incorrectly on multi- monitor and scaled displays. This resulted in an offset between what the driver controlled Win32 cursor position and the Wintab reported position. A special case of this included tablets set to mouse mode, where Wintab reported absolute position while the system cursor moved as a relative mouse with mouse acceleration.
2021-02-12Fix T85562: Remove Win32 RIM_INPUTSINKHarley Acheson
Removal of Win32 code that allows background windows to receive raw input. Differential Revision: https://developer.blender.org/D10408 Reviewed by Brecht Van Lommel
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-01-15Fix T84645 cursor moves when clicking selector.Nicholas Rishel
The absolute position desktop mapping has been corrected. The correct mapping is 0-65535 inclusive. Additionally, division by the virtual desktop width and height needed to be subtracted by 1 as width and height are one more than the final pixel index.
2021-01-14Fix T84645 cursor moves when clicking selector.Nicholas Rishel
The absolute position desktop mapping has been corrected. The correct mapping is 0-65535 inclusive. Additionally, division by the virtual desktop width and height needed to be subtracted by 1 as width and height are one more than the final pixel index.
2021-01-11Fix T81211 Add high frequency mouse input for Windows.Nicholas Rishel
Also send mouse move event instead of moving cursor via SetCursorPos. SetCursorPos did not reliably move the mouse when it is leaving the window quickly. Reviewed By: brecht Differential Revision: https://developer.blender.org/D9981
2021-01-11Fix T84501: Wintab button lag.Nicholas Rishel
Multiple Wintab tablets do not send relative button state when configured to do so. This causes button events to be delayed until processed as Win32 button events. This commit fixes the issue by configuring Wintab to use absolute button state and tracking changes manually.
2020-12-29Fix T84144 cursor wrap broken for Windows.Nicholas Rishel
Modifies WM_BUTTON processing to reuse existing mousemove logic. Fixes case where cursor wrap was not being handled on mouse release. Bonus: flattened mouse move logic so all paths lead to a single return. Removed case where wrap is not handled until subsequent mousemove as button press may rely on updated mouse move position.
2020-12-25Simplification of Wintab event handling.Nicholas Rishel
Previously Wintab packets were added to a local queue to be processed during Win32 mouse events, in order to correlate Wintab to Win32 mouse buttons. Wintab packets before Win32 mouse down events were expired on a timer. This commit drives mouse events during Wintab events when a device is in range. When a Wintab button is found it is dispatched if an equivalent event can be popped from the Win32 event queue. If a Win32 mouse button event is not associated with a Wintab event, it falls through to WM_BUTTON handling. All Wintab packets are handled as they are received. Reviewed By: brecht Differential Revision: https://developer.blender.org/D9908