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-04-18Add debugging info for Wintab activated by argument `--debug-wintab`.Nicholas Rishel
Bonus: Added docs for `--debug-ghost`. Differential Revision: https://developer.blender.org/D14610
2022-03-21Cleanup: cursor motion events now have value set to KM_NOTHINGCampbell Barton
In some cases value of cursor motion events was set from the last event written to the wmWindow.eventstate. Avoid potential errors by ensuring cursor motion events always have their value set to KM_NOTHING.
2022-03-11Fix out of order event handling when calling operators from gizmosCampbell Barton
Activating a gizmo used the windows eventstate which may have values newer than the event used to activate the gizmo. This meant transforms check for the key that activated transform could be incorrect. Support passing an event when calling operators to avoid this problem.
2022-03-10Event System: key-press while dragging now activates drag firstCampbell Barton
When dragging with a large threshold (using a tablet for example), it's possible to press another key before the drag threshold is reached. So tweaking then pressing X would show the delete popup instead of transforming along the X-axis. Now key presses while dragging cause the drag event to be evaluated before the key press. Note that to properly base the mouse-move event on the previous state the last handled event is now stored in the window. Without this the inserted mouse-move event may contain invalid values from the next event (it's modifier state or other `prev_*` values). Requested by @JulienKaspar.
2022-03-04Cleanup: spelling in comments, function nameCampbell Barton
2022-03-02Merge branch 'blender-v3.1-release'Germano Cavalcante
2022-03-02Fix T95608: Mac issues with drag drop on multi-monitorGermano Cavalcante
Mousemove events are sent to windows. In Windows OS, almost all mousemove events are sent to the window whose mouse cursor is over. On MacOS, the window with mousemove events is always the active window. It doesn't matter if the mouse cursor is inside or outside the window. So, in order for non-active windows to also have events, `WM_window_find_under_cursor` is called to find those windows and send the same events. The problem is that to find the window, `WM_window_find_under_cursor` only has the mouse coordinates available, it doesn't differentiate which monitor these coordinates came from. So the mouse on one monitor may incorrectly send events to a window on another monitor. The solution used is to use a native API on Mac to detect the window under the cursor. For Windows and Linux nothing has changed. Reviewed By: brecht Differential Revision: https://developer.blender.org/D14197
2022-03-01Cleanup: move Event.is_repeat & is_direction_inverted to flagsCampbell Barton
Use a flag for events to avoid adding struct members every time a new kind of tag is needed - so events remain small. This also simplifies copying settings as flags can be copied at once with a mask.
2022-02-25Cleanup: use flags for wmEvent modifier keysCampbell Barton
Using flags makes checking multiple modifiers at once more convenient and avoids macros/functions such as IS_EVENT_MOD & WM_event_modifier_flag which have been removed. It also simplifies checking if modifier keys have changed.
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-10Cleanup: copyright in headers, spelling in commentsCampbell Barton
- Order year consistently. - Minor consistency (case, double-spacing). - Correct typos.
2022-02-09Cleanup: make file headers more consistentCampbell Barton
Also some descriptive text into doc-strings.
2022-01-31Fix wmTimer.ntime becoming NAN with a zero time-stepCampbell Barton
While this didn't cause any user visible bugs, this wouldn't have behaved as intended since the timer would never run again once wmTimer.ntime was set to NAN.
2022-01-30Revert "UI: Do not translate "Blender""Aaron Carlisle
See rB0c5a9a0e776eeb724f7266694153f98721e34fde for the issue with this. This reverts commit 0c5a9a0e776eeb724f7266694153f98721e34fde.
2022-01-30UI: Do not translate "Blender"Aaron Carlisle
Blender is the name of the software, it does not make sense to translate into a language's term for the kitchen appliance.
2022-01-12Fix T85706: wm_window_make_drawable update DPIHarley Acheson
When drawing windows on monitors that differ in DPI, we can sometimes have UI elements draw at an incorrect scale. This patch just ensures that `wm_window_make_drawable` always updates DPI. See D10483 for more details. Differential Revision: https://developer.blender.org/D10483 Reviewed by Brecht Van Lommel
2021-12-16Remove G.relbase_validCampbell Barton
In almost all cases there is no difference between `G.relbase_valid` and checking `G.main->filepath` isn't an empty string. In many places a non-empty string is already being used instead of `G.relbase_valid`. The only situation where this was needed was when saving from `wm_file_write` where they temporarily became out of sync. This has been replaced by adding a new member to `BlendFileWriteParams` to account for saving an unsaved file for the first time. Reviewed By: brecht Ref D13564
2021-12-14Cleanup: correct unbalanced doxygen groupsCampbell Barton
Also add groups in some files.
2021-12-14Remove G.save_overCampbell Barton
The difference between G.save_over and G.relbase_valid was minor. There is one change in functionality. When saving the default-startup file from an already loaded blend file - future save actions will continue to write to the originally loaded file instead of prompting the user to select a location to save the file. This change makes saving the startup file behave the same way "Save a Copy" does. Reviewed By: brecht Ref D13556
2021-12-13Cleanup: use "filepath" term for Main, BlendFileData & FileGlobalCampbell Barton
Use "filepath" which is the current convention for naming full paths. - Main use "name" which isn't obviously a file path. - BlendFileData & FileGlobal used "filename" which is often used for the name component of a path (without the directory).
2021-12-08Cleanup: move public doc-strings into headers for 'windowmanager'Campbell Barton
Ref T92709
2021-10-22Fix T92357: assert changing scenes while in edit modeCampbell Barton
ScrArea.runtime.tool needs to be updated after switching scenes.
2021-10-22Fix crash when creating a new window failsCampbell Barton
Also add operator error report.
2021-10-21Cleanup: use underscore separators for event struct membersCampbell Barton
Improve readability using underscores for separators, e.g. prev_click_time instead of prevclicktime.
2021-10-20Cleanup: use an array for wmEvent cursor position variablesAaron Carlisle
Use arrays for wmEvent coordinates, this quiets warnings with GCC11. - `x, y` -> `xy`. - `prevx, prevy` -> `prev_xy`. - `prevclickx, prevclicky` -> `prev_click_xy`. There is still some cleanup such as using `copy_v2_v2_int()`, this can be done separately. Reviewed By: campbellbarton, Severin Ref D12901
2021-10-19Asset Browser: Improved workflow for asset catalog savingSybren A. Stüvel
No longer save asset catalogs on blendfile save. Instead: - extend the confirmation prompt for unsaved changes to show unsaved catalogs. - In the confirmation prompt, make catalog saving explicit & optional, just like we do it for external images. {F10881736} - In the Asset Browser catalog tree, show an operator icon to save the catalogs to disk. It's grayed out if there are no changes to save, or if the .blend wasn't saved yet (required to know where to save the catalog definitions to). {F10881743} Much of the work was done by @Severin and reviewed by me, then we swapped roles. Reviewed By: Severin Differential Revision: https://developer.blender.org/D12796
2021-10-19Cleanup: use 'e' prefix for enum typesCampbell Barton
2021-09-21Cycles: merge of cycles-x branch, a major update to the rendererBrecht Van Lommel
This includes much improved GPU rendering performance, viewport interactivity, new shadow catcher, revamped sampling settings, subsurface scattering anisotropy, new GPU volume sampling, improved PMJ sampling pattern, and more. Some features have also been removed or changed, breaking backwards compatibility. Including the removal of the OpenCL backend, for which alternatives are under development. Release notes and code docs: https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles https://wiki.blender.org/wiki/Source/Render/Cycles Credits: * Sergey Sharybin * Brecht Van Lommel * Patrick Mours (OptiX backend) * Christophe Hery (subsurface scattering anisotropy) * William Leeson (PMJ sampling pattern) * Alaska (various fixes and tweaks) * Thomas Dinges (various fixes) For the full commit history, see the cycles-x branch. This squashes together all the changes since intermediate changes would often fail building or tests. Ref T87839, T87837, T87836 Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-17Cleanup: remove KM_MOD_SECOND & KM_SHIFT2, KM_CTRL2.. etcCampbell Barton
These were added in a1c8543f2acd7086d412cb794b32f96794b00659 (2007) but never used. Nor did they have any meaning in practice. Note that versioning keymap items isn't needed as these values were never set. The code-paths that set these values also set KM_MOD_FIRST causing `keymap_event_set` to only ever assign values of 0 or 1. These flags complicate further exposing KM_ANY (-1) which is also a valid value for modifiers.
2021-09-09Fix T88755: Reuse Temp Windows by Type not TitleHarley Acheson
Reuse temporary windows when they share the same single area type, not because they share the same title. See D12401 for more details. Differential Revision: https://developer.blender.org/D12401 Reviewed by Campbell Barton
2021-08-31Fix 'WM_window_find_under_cursor'Germano Cavalcante
This function was not working if the window is partially out of screen space.
2021-08-26Cleanup: return window in 'WM_window_find_under_cursor'Germano Cavalcante
This better matches other functions like `BKE_screen_find_area_xy`.
2021-08-04Cleanup: use C comments for descriptive textCampbell Barton
2021-08-03Cleanup: use C++ comments or 'if 0' for commented codeCampbell 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-05Fix: IME conversion candidate window not correctly placed on macOSYuki Hashimoto
Blender needs to tell the input method program where the conversion candidate window is during Japanese and Chinese input. In macOS, there are displays where the window size and the native pixel size are different, so the candidate window may appear in an unnatural position. This patch converts the cursor position x and y for matching macOS window coordinate. On Windows, GHOST_GetNativePixelSize returns 1, so it has no effect. Differential Revision: https://developer.blender.org/D11696
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-28UI: Do Not Resize Already-Open Temporary WindowsJesse Y
There is no longer a need to resize windows that are _already_ open, since temporary windows can no longer take over the space used by other already-open temporary windows. This primarily affects Preferences and Render windows. see D11721 for more details. Differential Revision: https://developer.blender.org/D11721 Reviewed by Julian Eisel
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell 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-12Fix T88812: Child Windows on Vertical MonitorsHarley Acheson
This patch improves the positioning of child windows when on monitors that are arranged vertically (any above any other). When calculating a window position in Ghost coordinates from GL coordinates we were using monitor height, which can give incorrect values when desktop is taller than any single monitor. So use desktop height instead. See D10637 for more details and examples. Differential Revision: https://developer.blender.org/D10637 Reviewed by Brecht Van Lommel
2021-06-11Render Window as Non-Child on Win32 platformHarley Acheson
This patch makes the "Render" window a top-level window, not a child of the main window, which was the case in blender versions prior to 2.93. This means it is no longer "on top", nor is the icon grouped on the taskbar in the same way, but you can Alt-Tab between it and the main window. This change only affects the Windows platform as the other platforms behave this way. See D11576 for links to negative feedback that prompts this change. Differential Revision: https://developer.blender.org/D11576 Reviewed by Brecht Van Lommel
2021-05-03WM: disable idle event handling timer when simulating eventsCampbell Barton
2021-05-03Cleanup: use boolean for has_event variable & return valueCampbell Barton
2021-04-11Cleanup: use ELEM, STREQ macrosCampbell Barton
2021-03-24Cleanup: use new BLI_assert_unreachable macroCampbell Barton
2021-03-18Cleanup: spellingCampbell Barton
2021-03-15Cleanup: replace 'timer_ended' with 'timer_end'Campbell Barton
The previous naming made it seem as if the timer had already ended where as this function ends the timers.
2021-03-06Cleanup: rename wm_get_cursor_positionCampbell Barton
Match naming of other wm_cursor_position_* functions.