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-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.
2021-03-05Cleanup: disambiguate 'queue' struct membersCampbell Barton
The term queue isn't very descruptive on it's own, use: - wmWindow.event_queue - wmWindowManager.notifier_queue
2021-02-23Fix T85638: Child Window Positioning on Multiple MonitorsHarley Acheson
Constraint of new window position can be incorrect when using multiple monitors. Differential Revision: https://developer.blender.org/D10469 Reviewed by Brecht Van Lommel
2021-02-22UI: Simplify Window CreationHarley Acheson
Refactoring: WM_window_open() that can open different types of windows. 'New Window' with simplified layout. Differential Revision: https://developer.blender.org/D10419 Reviewed by Brecht Van Lommel
2021-02-20Cleanup: doxygen sectionsCampbell Barton
2021-02-17Cleanup: Abbreviate enums with 'UNSIGNED_' in the nameGermano Cavalcante
2021-02-10UI: Removal of GHOST_CreateDialogWindowHarley Acheson
Simplification of window creation code to allow greater flexibility. Differential Revision: https://developer.blender.org/D10311 Reviewed by Brecht Van Lommel
2021-02-04UI: Win32 Child Windows On TopHarley Acheson
Win32 child windows on top of parents. Short-term solution of forcing is_dialog when owned. Differential Revision: https://developer.blender.org/D9971 Reviewed by Brecht Van Lommel
2021-01-13Fix: popout windows are sized incorrectly on high DPI screensJesse Y
There should be a conversion to native pixel size as expected by GHOST at the window manager level, the dimensions at screen level do not need a conversion. Differential Revision: https://developer.blender.org/D9976
2020-12-04EEVEE: Arbitrary Output VariablesJeroen Bakker
This patch adds support for AOVs in EEVEE. AOV Outputs can be defined in the render pass tab and used in shader materials. Both Object and World based shaders are supported. The AOV can be previewed in the viewport using the renderpass selector in the shading popover. AOV names that conflict with other AOVs are automatically corrected. AOV conflicts with render passes get a warning icon. The reason behind this is that changing render engines/passes can change the conflict, but you might not notice it. Changing this automatically would also make the materials incorrect, so best to leave this to the user. **Implementation** The patch adds a copies the AOV structures of Cycles into Blender. The goal is that the Cycles will use Blenders AOV defintions. In the Blender kernel (`layer.c`) the logic of these structures are implemented. The GLSL shader of any GPUMaterial can hold multiple outputs (the main output and the AOV outputs) based on the renderPassUBO the right output is selected. This selection uses an hash that encodes the AOV structure. The full AOV needed to be encoded when actually drawing the material pass as the AOV type changes the behavior of the AOV. This isn't known yet when the GLSL is compiled. **Future Developments** * The AOV definitions in the render layer panel isn't shared with Cycles. Cycles should be migrated to use the same viewlayer aovs. During a previous attempt this failed as the AOV validation in cycles and in Blender have implementation differences what made it crash when an aov name was invalid. This could be fixed by extending the external render engine API. * Add support to Cycles to render AOVs in the 3d viewport. * Use a drop down list for selecting AOVs in the AOV Output node. * Give user feedback when multiple AOV output nodes with the same AOV name exists in the same shader. * Fix viewing single channel images in the image editor [T83314] * Reduce viewport render time by only render needed draw passes. [T83316] Reviewed By: Brecht van Lommel, Clément Foucault Differential Revision: https://developer.blender.org/D7010
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-10-21WM: ensure is_repeat isn't copied from the last eventCampbell Barton
This means if a keymap item is set to ignore repeat events, it may do so accidentally from this setting being copied.
2020-10-19Spelling: It's Versus ItsHarley Acheson
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required. Differential Revision: https://developer.blender.org/D9250 Reviewed by Campbell Barton
2020-10-18Cleanup: More miscellaneous code quality changes in wm directoryHans Goudey
- Declare variables where initialized. - Use LISTBASE_FOREACH macro. - Reduce variable scope. - Return early or reduce indentation in some cases.
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-10-02Fix (unreported) design flow in how workspace's relation data are read from ↵Bastien Montagne
.blend file. Relying on pointer addresses across different data-blocks is extremely not recommended (and should be strictly forbidden ideally), in particular in direct_link step of blend file reading. - It assumes a specific order in reading of data, which is not ensured in future, and is in any case a very bad, non explicit, hidden dependency on behaviors of other parts of the codebase. - It is intrinsically unsafe (as in, it makes writing bad code and making mistakes easy, see e.g. fix in rB84b3f6e049b35f9). - It makes advanced handling of data-blocks harder (thinking about partial undo code e.g., even though in this specific case it was not an issue as we do not re-read neither windowmanagers nor worspaces during undo). New code uses windows' `winid` instead as 'anchor' to find again proper workspace hook in windows at read time. As a bonus, it will also cleanup the list of relations from any invalid ones (afaict it was never done previously). Differential Revision: https://developer.blender.org/D9073