Use modifier keys that are pressed before activating a new window.
Allows call of `wm_window_update_eventstate_modifiers` on
`GHOST_kEventWindowActivate` by using `GetAsyncKeyState` instead of
`GetKeyState` in GHOST_SystemWin32::getModifierKeys, which retrieves
actual hardware state.
Pull Request: https://projects.blender.org/blender/blender/pulls/110020
This formats code that is disabled using `#if 0`. Formatting was achieved
by temporarily changing `#if 0` to `#if 1 /*something*/`, then formatting,
and then changing it back to `#if 0`.
Now that liboverride process on save (the diffing + pruning unused
override operations + reset of non-overridable changes) works better. it
leads to a bad side-effect: all system overrides data indirectly
modified through animation or drivers get reset.
Since in current system e.g. most objects of a rigged asset are system
overrides, but their transform is modified by bones animation, this
leads to entire overrides of assets being reset to their linked state
until next depsgraph evaluation.
While this is the expected and correct behavior in absolute, this is
very bad from a user experience PoV.
This commit address the issue by simply re-running a 'frame change'
despgraph update, to ensure all drivers, animations etc. are properly
re-applied after liboverride diffing cleanup & reset.
Note: Change applies to Grease Pencil 3.0 only (experimental feature).
Enables use of drag & drop to reorder grease pencil layers through the layer
tree UI, as well as inserting layers into groups. This is an intuitive and
often requested method of managing such data-structures. Visual feedback should
be improved still, and the gap between items be removed, to reduce flickering
while dragging. These are general improvements for tree views however which
should be done separately.
There is no support yet for dragging layer groups, this requires further
changes in the internal grease pencil APIs.
#109825 introduced the necessary drag & drop support for tree views, #109824
prepared the internal grease pencil API for it.
Pull Request: https://projects.blender.org/blender/blender/pulls/109826
Avoid potential problems when the active window is known but not
assigned to `wm->winactive`, where the first window would be used
as a fallback. Instead, take a window argument, a fallback is still
used as a last resort (when NULL).
Word ordering for wmTimer API wasn't consistent.
- Use "WM_event_timer_" / "WM_event_timers_" prefix.
- Rename "wm_window_timer" to "wm_window_timers_process"
because it wasn't clear what the function did from its name.
- Rename "wm_window_process_events" to "wm_window_events_process"
for consistency with "wm_window_timers_process".
Displaying the warning on file load depended on `wm->winactive`
being set, and didn't work when loading a file from the file-open
window or when loading files using a command-line argument.
Resolve using the first window as a fallback.
This happens to resolve#109770, although not freeing timers on exit
is likely to be an issue under other circumstances.
Logic in FileBrowser and/or `BKE_blendfile_library_path_explode`
probably changed at some point, and the generic 'invalid filetype' error
message was reached before the path is compared to current blendfile path.
There's quite a few libraries that depend on dna_type_offsets.h
but had gotten to it by just adding the folder that contains it to
their includes INC section without declaring a dependency to
bf_dna in the LIB section.
which occasionally lead to the lib building before bf_dna and the
header being missing, while this generally gets fixed in CMake by
adding bf_dna to the LIB section of the lib, however until last
week all libraries in the LIB section were linked as INTERFACE so
adding it in there did not resolve the build issue.
To make things still build, we sprinkled add_dependencies wherever
we needed it to force a build order.
This diff :
Declares public include folders for the bf_dna target so there's
no more fudging the INC section required to get to them.
Removes all dna related paths from the INC section for all
libraries.
Adds an alias target bf:dna to signify it has been updated to
modern cmake
Declares a dependency on bf::dna for all libraries that require it
Removes (almost) all calls to add_dependencies for bf_dna
Future work:
Because of the manual dependency management that was done, there is
now some "clutter" with libs depending on bf_dna that realistically
don't. Example bf_intern_opencolorio itself has no dependency on
bf_dna at all, doesn't need it, doesn't use it. However the
dna include folder had been added to it in the past since bf_blenlib
uses dna headers in some of its public headers and
bf_intern_opencolorio does use those blenlib headers.
Given bf_blenlib now correctly declares the dependency on bf_dna
as public bf_intern_opencolorio will get the dna header directory
automatically from CMake, hence some cleanup could be done for
bf_intern_opencolorio
Because 99% of the changes in this diff have been automated, this diff
does not seek to address these issues as there is no easy way to
determine why a certain dependency is in place. A developer will have
to make a pass a this at some later point in time. As I'd rather not
mix automated and manual labour.
There are a few libraries that could not be automatically processed
(ie bf_blendthumb) that also will need this manual look-over.
Pull Request: https://projects.blender.org/blender/blender/pulls/109835
Renames `OB_MODE_EDIT_GPENCIL`, `OB_MODE_PAINT_GPENCIL`, `OB_MODE_SCULPT_GPENCIL`, `OB_MODE_WEIGHT_GPENCIL`, `OB_MODE_VERTEX_GPENCIL, and the context modes` to `*_LEGACY`.
Pull Request: https://projects.blender.org/blender/blender/pulls/109648
Image buffer display in the animation player was difficult to reason
about because it could potentially access the entire play-state on load
(frame-step, modifier keys... etc) even though these are are only
intended to be used interactively.
Add playanim_toscreen_ex which is called by both
playanim_toscreen & playanim_toscreen_on_load which doesn't use the
PlayState struct.
Replace `typedef struct X {} X;` with `struct X {};`
In some cases the first and last name didn't match although this
is rarely useful, even a typo in some cases, e.g. TrachPathPoint.
Small inconsistency leftover from ebb5643e59, 32bbfbb06e and 7ef8389dad
commits.
Weirdly enough that was not a problem on Linux X11, but did cause
issues at leaast on Windows and Linux Wayland.
Similar to 5f16e24cc9, this adds support for edit mode
to the point cloud object type, which is currently hidden behind an
experimental option. No interaction is possible yet, for now this
can be used as a testing for a node-group-operator-only mode.
The multiplication sign looks like an "x" but should be used in its
stead to display calculations and dimensions such as "1920x1080". It
is supported in many fonts including DejaVu Sans, the font currently
used for the UI.
Pull Request: https://projects.blender.org/blender/blender/pulls/106388
No user visible changes expected.
This function was added in 86b2cf4574 as a more type safe and more
convenient way of setting button callbacks. So use it for simple cases.
Avoid BLI_strcpy_rlen use as this has the same problems as strcpy
(it just returned the length which is useful at times).
Use memcpy instead when the size is calculated immediately beforehand.
Other uses of have been replaced by BLI_string_join_array that prevents
buffer overruns by taking the destination buffer length.
This is cached in Render, and gets cleared along with render pass GPU
textures when there is no editor open using it, or a new final render is
started.
The context and texture pool are cached. But the evaluator is re-created
every time as this only runs on compositing node changes, which require
recreating it anyway (unlike the viewport where e.g. camera navigation
does not need a new evaluator).
Pull Request: https://projects.blender.org/blender/blender/pulls/108909
Before this change the ImBuf struct had dedicated fields for the
buffer data. Now the color space is stored inside of the struct
which wraps around the buffer information.
This only changes the field placement, without changing the way
it is handled. In the future one might imagine that operations
like stealing buffer data should null-ify the buffer colorspace
pointer. Such changes would need to have more accurate thinking
before implementation.
Should be no functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/109291
This was due to a wrong mapping of tools in the toolbar.
The fix makes sure that the correct selection tools are used for the
old grease pencil objects.
In order to accomplish this properly, the new grease pencil objects
use their own edit mode context.
This way the two objects are cleanly seperated.
* Store per RenderPass in RenderResult.
* Caches are cleared when starting rendering, to make more memory available
to GPU rendering.
* Caches are cleared on UI changes, when no compositing node editor and no
image editor with a render result or viewer node image is visible.
* Store 3 channel RGB passes as such, and set alpha 1 in shader.
This is an intermediate step before implementing GPU backed ImBuf, to
improve performance and figure out cache eviction.
Pull Request: https://projects.blender.org/blender/blender/pulls/108818