bf_usd is a bit slow to build, and most time is spend on the front end
of the compiler parsing USD's headers.
this change enables pre-compiled headers for the most expensive
headers to parse.
When building `bf_usd` single threaded with -j1 (for accurate measurements)
```
before Wall time: 0h 4min 30sec 931 ms 504299 ns
after Wall time: 0h 0min 50sec 808 ms 24399 ns
```
Pull Request: https://projects.blender.org/blender/blender/pulls/110027
Allow SVG files to have previews in the File Browser. Adds
nanosvgrast.h to extern\nanosvg\, which is an SVG rasterizer that is
an optional part of the nanosvg source.
Pull Request: https://projects.blender.org/blender/blender/pulls/109567
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
Code in charge of fixing invalid liboverride hierarchy roots would be
too agressive in re-assigning new root in replacement of old one. When
the invalid initial case was a 'low-level' type of ID (like a nodetree
e.g.), it could 'contaminate' many valid data (objects etc.) and force
them into its own local hierarchy.
This commit fixes the issue by storing all 'processed as valid' IDs into
a set, and ensuring that once an ID has been put into that set, its
hierarchy root is not changed anymore.
in other words, it changes the old behavior of 'last encountered hierarchy
wins' to 'first encountered hierarchy wins'. Since higher-level types of
IDs (like collections or objects) are processed first, this is the
most logical behavior too.
The comment implies that the operation is slow because it creates and
destroys a framebuffer.
Actually the slowness comes from forcing CPU-GPU synchronization.
Update VertexWeighEdit modifier Group Add / Remove threshold to be inclusive.
Additionally, add 3.6 backwards compatibility (4.0 versioning) to slightly offset Group Add / Remove threshold property value to make exclusive.
Pull Request: https://projects.blender.org/blender/blender/pulls/108286
In some cases we store temporary region data that doesn't require
freeing. Code shouldn't expect the data pointer to be unset in this
case, so don't print an error.
For drag-drop, drag node is first unlinked from existing position then
linked above or below the drop layer.
When drag and drop layers are same, layer is unlinked from listbase and
further linking fails because layer is not found in the listbase.
Pull Request: https://projects.blender.org/blender/blender/pulls/110009
NDOF Pan was calculating the selection center unnecessarily.
This was overlooked in 37d1d4cb07.
Getting the selection center is one of the heaviest operations during
navigation. Needs to be avoided as much as possible.
Move the node previews to the overlay region, atop each node.
It allows nodes to keep the same size when the preview is toggled,
which is more convenient for large nodes and large nodetrees.
The preview has to be drawn from `node_draw_extra_info_panel`
because there could be overlapping between info text and the preview.
When the node is out of the view, it also has to make sure that the
preview is also out of the view before exiting the draw function.
Pull Request: https://projects.blender.org/blender/blender/pulls/108001
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`.
This moves the remaining `.c` files in the following `editors` folders to C++:
`physics`, `screen`, `sound`, `space_buttons`, `space_file`, `space_graph` and `space_image`.
One exception is `fsmenu.c` which has platform specific issues on macos and
windows. E.g. the `Carbon/Carbon.h` include also declares a `Collection` type that collides
with ours.
Also see #103343.
Pull Request: https://projects.blender.org/blender/blender/pulls/109918
Pass key that is being removed to `seq_cache_relink_keys()`. This allows
to remove checks before calling the function. Also makes it possible to
assert, that links are actually pointing where they should be.
When the selection mode in the Grease Pencil tool settings changes,
the selection domain of all curves in the active Grease Pencil object
has to change.
This PR handles that conversion. Point selections are converted to
curve selection and vice versa.
Note: this PR only takes care of selection modes 'Point' and 'Stroke'.
'Segment' mode is handled in a separate PR (#109221).
Pull Request: https://projects.blender.org/blender/blender/pulls/109964
Caused by 7a943428de
Looking at history, e.g. 575ade22d4 or prior, it seems the
"fallthrough" [related compiler warning was removed in 7a943428de] was
actually intended in the case of `VPAINT_TOOL_AVERAGE`.
So first, the average color is calculated and after that regular drawing
should happen with that color.
Now make this more clear by calling both `calculate_average_color` as
well as `vpaint_do_draw` before breaking.
Pull Request: https://projects.blender.org/blender/blender/pulls/109971
Add pie and ring styles of progress indicators. Exposes progress bar to
the Python API and adds a "type" property to allow style variation.
This can be used for scripts & add-ons to show progress in the UI.
Ref !109882.
Co-authored-by: Campbell Barton <campbell@blender.org>
Use `BLI_ghash_insert` instead of `BLI_ghash_reinsert` to store images.
VSE links stored cache keys for each frame in style of linked list.
These links must be maintained when any image/key is removed from the
cache. Reinserting can free key without proper relinking, which would
lead to accessing this freed key when cache limiting frees images in
a frame.
This should not happen since reinserting is prevented in
`seq_cache_put()`, but it's safer to assert, that key is not stored in
hash instead.
Make it harder to retrieve a mutable attribute from const a const mesh,
and use the attribute search function to check multiple domains and
colors at once.
This adds support for running a set of nodes repeatedly. The number
of iterations can be controlled dynamically as an input of the repeat
zone. The repeat zone can be added in via the search or from the
Add > Utilities menu.
The main use case is to replace long repetitive node chains with a more
flexible alternative. Technically, repeat zones can also be used for
many other use cases. However, due to their serial nature, performance
is very sub-optimal when they are used to solve problems that could
be processed in parallel. Better solutions for such use cases will
be worked on separately.
Repeat zones are similar to simulation zones. The major difference is
that they have no concept of time and are always evaluated entirely in
the current frame, while in simulations only a single iteration is
evaluated per frame.
Stopping the repetition early using a dynamic condition is not yet
supported. "Break" functionality can be implemented manually using
Switch nodes in the loop for now. It's likely that this functionality
will be built into the repeat zone in the future.
For now, things are kept more simple.
Remaining Todos after this first version:
* Improve socket inspection and viewer node support. Currently, only
the first iteration is taken into account for socket inspection
and the viewer.
* Make loop evaluation more lazy. Currently, the evaluation is eager,
meaning that it evaluates some nodes even though their output may not
be required.
Pull Request: https://projects.blender.org/blender/blender/pulls/109164