Age | Commit message (Collapse) | Author |
|
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>
|
|
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
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
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
|
|
|
|
|
|
against system input.
Reviewed By: brecht, LazyDodo
Maniphest Tasks: T88852
Differential Revision: https://developer.blender.org/D11508
|
|
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
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
The previous naming made it seem as if the timer had already ended
where as this function ends the timers.
|
|
Match naming of other wm_cursor_position_* functions.
|
|
The term queue isn't very descruptive on it's own, use:
- wmWindow.event_queue
- wmWindowManager.notifier_queue
|
|
Constraint of new window position can be incorrect when using multiple monitors.
Differential Revision: https://developer.blender.org/D10469
Reviewed by Brecht Van Lommel
|
|
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
|
|
|
|
|
|
Simplification of window creation code to allow greater flexibility.
Differential Revision: https://developer.blender.org/D10311
Reviewed by Brecht Van Lommel
|
|
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
|
|
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
|
|
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
|
|
|
|
This means if a keymap item is set to ignore repeat events,
it may do so accidentally from this setting being copied.
|
|
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required.
Differential Revision: https://developer.blender.org/D9250
Reviewed by Campbell Barton
|
|
- Declare variables where initialized.
- Use LISTBASE_FOREACH macro.
- Reduce variable scope.
- Return early or reduce indentation in some cases.
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
.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
|
|
Cleanup old tracker task format to the new. e.g: [#34039] to T34039
Ref D8718
|
|
This avoids unecessary complexity.
Also makes the GPUImmediate threadsafe by using a threadlocal imm variable.
|
|
This was a long standing TODO. This was also preventing debug callbacks
form other context than the main window.
|
|
This should have no consequence nowadays.
Can be reverted if needed.
|
|
This is related to the Vulkan port T68990.
This is a full cleanup of the Framebuffer module and a separation
of OpenGL related functions.
There is some changes with how the default framebuffers are handled.
Now the default framebuffers are individually wrapped inside special
GLFrameBuffers. This make it easier to keep track of the currently bound
framebuffer state and have some specificity for operations on these
framebuffers.
Another change is dropping the optimisation of only configuring the
changed attachements during framebuffers update. This does not give
any benefits and add some complexity to the code. This might be brought
back if it has a performance impact on some systems.
This also adds support for naming framebuffers but it is currently not
used.
|
|
This replace `GPU_clear()` by `GPU_clear_color()` and `GPU_clear_depth()`.
Since we always set the clear value before clearing, it is unecessary
to track the clear color state.
Moreover, it makes it clearer what we clear the framebuffer to.
|
|
|
|
This is done at drawtime automatically.
|
|
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenlib` module. Not all warnings are
addressed in this commit.
No functional changes.
|
|
The abbreviation 'init' is brief, unambiguous and already used
in thousands of places, also initialize is often accidentally
written with British spelling.
|
|
This impacts GHOST/Wayland which draws windows using alpha.
|
|
|
|
|
|
Steps to reproduce were:
* From factory settings, change Outliner Display Mode to "Blender File"
* Open "Screens" item, make sure all listed screens are visible
* Open Preference window, close it
* Mouse hover the outliner -> crash
Fix is to force an Outliner tree rebuild when closing screens.
|
|
This fix T77226
Differential Revision: https://developer.blender.org/D7910
|
|
* Simplify workspace API a bit
* Comment on behavior of workspace-layout relations where exposed in API
* Remove annoying getters/setters
* Avoid lookups if we can early exit
* A NULL check is removed in `direct_link_workspace()` that I don't see
a need for. Am not 100% sure though, fingers crossed.
In general these changes should improve readability and make things
easier to reason about.
|
|
E.g. when opening the File Browser from the Preferences window, it would
be the child of the main window the Preferences belong to. Now it can be
a child of the Preferences window itself.
The File Browser always stays on top of its parent window. Which avoids
some issues with OS window management, see T76418 and T72693.
Also removes a now unnecessary workaround to move the child window back
to the front after closing the file browser (opening the file browser
would move the main window and the file browser to the front).
Fixes T76418, T72693.
|
|
Also put glDisable(GL_DITHER) in it since we don't even use it (but is
enabled by default).
Also leave GL_MULTISAMPLE on by default since it has no impact on non-MSAA
framebuffers.
|