Use checks for certain node types with better algorithmic complexity.
They should perform better in some edge case with a lot of nodes or
node group nesting. They're now a bit more similar to each other too.
This is the only package that warns about this type of thing, and gets in the
way of actual warnigns on build logs. This requires CMake 3.19+ to take effect,
older versions still show the warnings.
Ensure compression is enabled by using shader_read
flag only. Also ensure that MTLTexture contents
remain in optimal layout for reading after any
data modifications.
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/106234
The command buffer fails to execute, the cause is unknown. It does not
appear to be related to the binary archive cache as disabling that does
not prevent the issue.
Pull Request: https://projects.blender.org/blender/blender/pulls/106328
The issue was caused by uninitialized offset used for the scale
variable.
Follow the rest of the usages of the operation which initialize
it explicitly. This makes it very safe and easy fix to backport
to any LTS or corrective release.
Ideally should probably initialize all members in the class
itself, to avoid such situations in the future.
Pull Request: https://projects.blender.org/blender/blender/pulls/106325
The cycling method for the viewer connection starts searching from the next socket
after the last current connection. If a geometry socket is is the last connected
output this caused the method to jump to the next socket after the geometry,
potentially skipping over valid data sockets that are not viewed yet.
The solution is to ignore the geometry sockets in the cycling entirely and only
consider data sockets (i.e. non-geometry sockets).
Pull Request: https://projects.blender.org/blender/blender/pulls/106318
This tool now only supports installing packages, it won't build any
dependency anymore. This implies that on most distributions, it wont
make a complete Blender build possible, some features will likely be
misisng.
By default, it only install basic dev environment to enable building
Blender with the precompiled libraries (which is the recommended way).
Passing the `--all` option will make it try to install all known
dependencies from distro packages. This is a development option,
regular Blender build should be done with the precompiled libraries.
Tested on Debian Testing, Arch, Fedora and Suse Tumbleweed.
With the new design, it should be fairly trivial to add more
distributions if desired, and maintenance should also be way simpler.
NOTE: side effect is that a working python3 interpreter is expected on
system running this script. In practice this should not be an issue,
since Python3 is installed by default in almost all regular desktop
linux installations.
The insert key operator allowed to insert a keyframe on all selected FCurves
and on the Active FCurve at cursor value.
But it didn't allow to insert a keyframe only on the active FCurve.
This patch adds that. It is available in the redo panel and under Key->Insert Keyframes (which can also be called with the I hotkey)
Pull Request: https://projects.blender.org/blender/blender/pulls/106307
This change aimed to solve the following issues:
- Possible threading issue of two tests writing to the same
file, depending on how the ctest is invoked
- Test using the release directory, and potentially leaving
temp file behind on test failure, breaking code sign on
macOS.
Pull Request: https://projects.blender.org/blender/blender/pulls/106311
Found together with a fix for #106043.
Edge panning (in Node Editors, Outliner and VSE) does unnecessary
updates when the view has not changed at all. This includes adding
`MOUSEMOVE` events (even if you dont move the mouse at all).
Adding `MOUSEMOVE` events results in the transform system constantly running (even if you dont move the mouse) which we certainly want to avoid.
Rectify this by only calling these updates when the view changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/106301
The fix for #105363 (6d3ce8273a) made the transform system respect
(Frame) nodes `offsetx`/`offsety`.
Now Node Editors run the transform system even if the mouse is still (due to edge panning -- unnecessarily, see PR #106301 for fixing this). And due to the way `frame_node_prepare_for_draw` recalculates these offsets (based on
on updated positions and `node.runtime->totr` [which in turn gets rounded in `node_update_basis` -- so subpixel precision is lost there, see [1]]), this can lead to slight imprecisions/noise/jitter during transform (if we use float offsets, see the PR for more info).
So to counter this, use rounded offsets now [which will keep the whole circle stable].
NOTE: PR #106301 would fix this already for having the cursor still, but this patch still improves slight jitter when moving, so will commit separately.
[1] comment from `node_update_basis`
> /* Round the node origin because text contents are always pixel-aligned. */
Pull Request: https://projects.blender.org/blender/blender/pulls/106096
No user visible changes expected.
For brush assets, we need a way to store a reference to a brush in .blend files, so that the last active brush can be restored from the file. See #101908. It seems like a generally useful thing to have.
Adds a new DNA struct to store a "weak" asset reference, that is, a reference that can break under a number of circumstances, but should work reliably enough under normal usage. There's no way to reliably reference an asset currently, so this works on a "best effort" basis. It can break when assets are moved inside the asset library, asset libraries are unregistered from the Preferences, or a file is opened on a different machine with different Preferences, for example. It can also break currently if an asset library is renamed.
It contains:
- Information to identify the asset library the asset can be found in.
- A relative "identifier" (currently a relative path) for the asset within the asset library.
There's further code to resolve a weak reference to file paths and Blender library paths.
Part of #101908.
Co-authored-by: Bastien Montagne <bastien@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/105603
The goal is to solve confusion of the "All rights reserved" for licensing
code under an open-source license.
The phrase "All rights reserved" comes from a historical convention that
required this phrase for the copyright protection to apply. This convention
is no longer relevant.
However, even though the phrase has no meaning in establishing the copyright
it has not lost meaning in terms of licensing.
This change makes it so code under the Blender Foundation copyright does
not use "all rights reserved". This is also how the GPL license itself
states how to apply it to the source code:
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software ...
This change does not change copyright notice in cases when the copyright
is dual (BF and an author), or just an author of the code. It also does
mot change copyright which is inherited from NaN Holding BV as it needs
some further investigation about what is the proper way to handle it.
When hitting the "normalize" button in the graph editor, set the y extents of the view to the extents of the `FCurves`.
Previously you had to search for your curves after pressing that button.
Pull Request: https://projects.blender.org/blender/blender/pulls/105857
Similar to recent OBJ UV values merging commit (05a63e3705) - build
mapping of (vertex, UV) by going over the face loops directly, instead
of using BKE_mesh_uv_vert_map_get_vert and then having an additional
map on top. Provide the mapping into ready to use flat arrays, instead
of building a map and then building arrays out of that in a separate
pass.
While at it, avoid the extra cost of building all this complicated
mapping when we don't have or are not exporting UVs.
Timing tests on exporting several models into binary PLY file
(Win10, Ryzen 5950X):
- Suzanne subdivided to level 6 (2.1M verts): 0.93s -> 0.68s
- Rungholt Minecraft level (9.7M verts): 3.3s -> 2.3s
- Stanford Lucy 3D scan (14.0M verts, no UVs): 5.2s -> 1.5s
This patch replaces `dispatchThreadgroups` with `dispatchThreads` which takes care of non-uniform threadgroup bounds. This allows us to remove the bounds guards in the integrator kernel entry points.
Pull Request: https://projects.blender.org/blender/blender/pulls/106217
The system wayland-protocols version is too old, and xdg-activation-v1.xml
is a more recent addition than xdg-decoration-unstable-v1.xml so check for
that.
This patch fixes a MetalRT issue where viable shadow hits are discounted based on the false assumption that hits are ordered by distance. With this patch, the following unit tests now pass:
- openvdb smoke
- shadow catcher pt transparent lamp only 0.8
- shadow catcher pt transparent lamp only 1.0
Pull Request: https://projects.blender.org/blender/blender/pulls/106276
This is preparation for #106228, the crash does not happen in `main` currently.
The issue was `positions_for_write` might make a copy of the data if it was
shared. This operation is not thread safe on a single mesh. The solution is to
get write-access to the positions only once before threading starts.
For example
```
OIIOOutputDriver::~OIIOOutputDriver()
{
}
```
becomes
```
OIIOOutputDriver::~OIIOOutputDriver() {}
```
Saves quite some vertical space, which is especially handy for
constructors.
Pull Request: https://projects.blender.org/blender/blender/pulls/105594
The DPI returned by the GHOST/Wayland didn't account the buffer being
rendered at a higher (non-fractional) resolution, then scaled down.
This caused the software cursor and UI to rendered very small.
A fractional scale of 101% would show the UI just over 50% of the size
(making the UI to be close to half the scale it should have been).
Resolve by accounting for down-scaling of the buffer to it's
fractional size.
The UI needs persistent pointers to catalog paths that it can pass
around via context. It was trying to manage this in own storage, but
this didn't work. Not entirely sure why - the menus get redrawn
continuously while assets load, and the root menu rebuilds the mentioned
storage every time. Maybe the submenus redraw a bit later, or the
keyboard navigation handling still accessed data from a previous redraw
somehow.
Either way, instead of managing own catalog path storage, point into the
asset system, which already has persistent storage for the catalog
paths.
Pull Request: https://projects.blender.org/blender/blender/pulls/106237