ED_area_newspace correctly changes an area's space when the type and
subtype are set beforehand. But SCREEN_OT_space_type_set_or_cycle, when
changing to a new editor rather than cycling, needs newspace to ignore
the set subtype and use the last-used saved in the space. This
situation cannot be tested for in newspace. Instead have the operator
pass -1 as subtype to signal this intended behavior.
Pull Request: https://projects.blender.org/blender/blender/pulls/135367
The line-width is used to calculate the `U.pixelsize` which should only
be used to control the size of lines & points.
Update doc-strings to mention the intended use, remove unused defines.
While joining and docking areas there is hint shown near the mouse that
describes the potential operation. But it is cut off if your mouse is
at the extreme right or bottom edge of the window. This PR just clamps
the position so it is always visible.
Co-authored-by: Jonas Holzman <jonas@holzman.fr>
Pull Request: https://projects.blender.org/blender/blender/pulls/135211
The playhead is redrawn as an overlay, so instead of a full region
redraw using `ARegionType.draw()`, at least an overlay only redraw using
`ARegion.draw_overlay()` needs to be triggered.
Any redrawing within a window is skipped if neither the screen, nor any
of its areas or regions are tagged for redraw. So since there are no
other areas or regions to be fully redrawn in this window, no redrawing
will happen. The screen needs to be tagged for redraw, which will skip
most drawing in this case, and just draw the overlays as wanted.
Pull Request: https://projects.blender.org/blender/blender/pulls/134579
Move `Library.runtime` to be a pointer, move the related
`LibraryRuntime` struct to `BKE_library.hh`. Similar to e.g.
Mesh.runtime, that pointer is expected to always be valid, and is
allocated at readtime or when creating a new Library ID.
Related smaller changes:
* Write code now uses standard ID writing codepath for Library IDs too.
* Runtime pointer is reset to nullptr before writing.
* Looking up a library by its absolute path is now handled through a
dedicated utils, `search_filepath_abs`, instead of using
`BLI_findstring`.
Pull Request: https://projects.blender.org/blender/blender/pulls/134188
Fixes: #132422, #133288.
`ED_area_init()` is called when the editor in an area changes, this also changes
the available regions. That means, region polling needs to be executed. The
crash was happening because that wasn't the case, and the asset shelf region was
initialized before the polling was executed, which allocates region data in the
`on_poll_success()` callback.
Also had to pass context to `ED_area_init()`, which is an annoyance, but should
be fine. Similar functions like `ED_area_exit()` take it too.
Pull Request: https://projects.blender.org/blender/blender/pulls/133388
We would update the scene frame before we actually stopped the
callback timers for automatic frame sync.
This could lead to a race condition where the set frame would be
overwritten before we stopped the callback timer.
Pull Request: https://projects.blender.org/blender/blender/pulls/132022
This was trying to smooth out the playback but could instead lead to
worse frame pacing. It was also masking some bugs in the PulseAudio
backend that has been fixed.
Previously changing audio devices or settings while Blender was playing
back could lead to crashes or the playback state between Blender and
Audaspace de-syncing.
These are converted on startup to the new type. There are still
some references left, mostly where it looked like there still needs
to be changes to properly deal with the new object type.
Joining and Docking tag the source and target areas for redrawing. But
there are times when areas are split and recombined as part of the
processes. In some cases areas that are not either source or target
must also be tagged for redraw. Especially for Outliner and 3DView as
they try to avoid full redraws with RGN_DRAW_NO_REBUILD, but needed
here.
Pull Request: https://projects.blender.org/blender/blender/pulls/130801
Changes to area splitting when dragging from a corner action zone.
Increases the distance you must drag into the area before anything
starts. Increases minimum size that you can create to about 2X the
header height. Slight snap to 50% when no modifier keys are held.
Pull Request: https://projects.blender.org/blender/blender/pulls/130706
When dragging an area to a new location, current code limits the size
of the target area to AREAMINX and HEADERY, which is the minimum sizes
that an area can occupy. This is too small and results in frustration
for some users. When moving an existing area you are unlikely to want
it to be an unusable size. This PR makes the minimum target size 3X
wider. If an area is not large enough to be bisected into two such
areas then it won't be offered as a docking target in that orientation.
Pull Request: https://projects.blender.org/blender/blender/pulls/130546
The `fmt::format` can process the format string at compile time. Currently, we
don't seem to be using that as we don't use `FMT_STRING`. Starting with C++20,
that will be the default though, and one has to explicitly opt out in places
where the string is not known at compile time using `fmt::runtime(...)`.
Currently, our code does not compile as C++20 because of that. Unfortunately, we
have many places with runtime format strings, because of i18n.
Pull Request: https://projects.blender.org/blender/blender/pulls/130392
On Linux we can't always determine topmost window under cursor,
therefore check for overlapping windows and, if so, only use the
active window. This allows dragging between windows as long as
they don't overlap
Pull Request: https://projects.blender.org/blender/blender/pulls/130242
When starting a docking operation from an assigned shortcut, the source
area will be incorrect if the Status Bar is not currently being shown.
This PR just adds defaults that are never valid window coordinates.
Pull Request: https://projects.blender.org/blender/blender/pulls/129187
Allow Docking to work correctly if using a shortcut to the area header
context menu item. There is no longer a need to set the source or
target area locations.
Pull Request: https://projects.blender.org/blender/blender/pulls/128730
This makes one change and another correction to the mouse cursors used
during Docking. The change is to use WM_CURSOR_EDIT for Mac while just
hovering over the corner action zones. This means that Mac users will
transition from this to WM_CURSOR_HAND_CLOSED, instead using two hand
cursors. The correction is to use the "split" cursors while splitting
areas. That it doesn't do that now is a mistake made during #127810.
Pull Request: https://projects.blender.org/blender/blender/pulls/128396
Docking can close windows during its operation. If the current window
does not match before and after an operator has run our event handling
code can assume that a new blend file has been loaded and will rerun
the operator. This PR avoid this problem by just not starting if the
event initiating it is of type WINDEACTIVATE. There might be a later
fix that addresses the underlying issue, but this is simple, small, and
harmless.
Pull Request: https://projects.blender.org/blender/blender/pulls/126379
Entering local-view, then setting an axis via the num-pad and exiting
local view would restore the original axis but not the axis-roll.
Store the axis-roll for local-view & smooth-view operations.
With docking enabled, for Mac hovering over the corner actions zones
shows an open hand cursor, while dragging it uses the closed hand
cursor. For other platforms this just uses the "move" cursor.
Pull Request: https://projects.blender.org/blender/blender/pulls/127291
This shows the docking feedback very similar to how tooltips are shown
elsewhere. It describes the operation and also includes the icon and
name of the moving/changing area.
Pull Request: https://projects.blender.org/blender/blender/pulls/126898
Docking uses window overlays during feedback and these have to be
stopped and changed if you move the target from window to window.
The logic of changing the window that gets the overlay will sometimes
fail when the target window is null and old window was null - it
gets stopped (because they are equal) but not started again. This PR
just adds a check for null window.
Pull Request: https://projects.blender.org/blender/blender/pulls/126906