The angle at which the angle factor is greatest/smallest
was flipped by 90 degrees when compared to GPv2.
Additionally, the smoothing rate was a bit too slow.
The function `CurvesGeometry::offsets()` would return a span pointing to
`nullptr` with a size of `1` if there were no curves in the geometry.
This was already changed for `offsets_for_write()` in
c3365666e5, which retuns an empty span.
Do the same for `offsets()` now.
Pull Request: https://projects.blender.org/blender/blender/pulls/123772
When a shader uses push constants fallback the push constants are
stored inside a uniform buffer. The uniform buffer needs to be guarded
with a read barrier.
Pull Request: https://projects.blender.org/blender/blender/pulls/123777
This happened because `BKE_object_get_evaluated_mesh` now only returns
the mesh if there are no pending depsgraph updates. However, given that the
ID was tagged for changes before the evaluated mesh was accessed, it looked
like there were missing updates when there were not.
Now the depsgraph tag is only set after the object has actually been modified.
The first point was always set to the brush radius, even when the
angle setting was used. Additionally, the approximation for the
pen direction started at (0, 0).
This fixes the issue by overwriting the radius of the first point
once we get the first extension sample and with that the first
approximation of the pen direction.
The pen direction is also set to the initial direction from the
first to the second point.
The issue was caused by the ImBuf of the scene strip render sharing the float
buffer pixels with the ImBuf from the render result. If the render result is
ever gets freed (i.e., by a request to perform another render) it'll leave the
strip ImBuf pointing to a freed memory.
This was caused by the #109788.
The simple solution is to restore the code to the state prior to the ImBuf
refactor in the RenderRsult. A better solution would be to use implicit
sharing, similar to how it was done in the #108045.
Pull Request: https://projects.blender.org/blender/blender/pulls/123731
EEVEE displays the Cryptomatte false color if the Cryptomatte passes are
enabled in the viewport, even if the display pass is set to something
else. This problem doesn't really trigger at the moment, because
Cryptomatte passes can't be enabled in the viewport unless the display
pass is set to Cryptomatte. But the issue triggers in case of multi-pass
compositing as in #123378.
This is caused by unconditional write to the fragment color in the film
shader in case of Cryptomatte. To fix this, we only write the fragment
color if the display storage type is Cryptomatte.
Needed by #123378.
Pull Request: https://projects.blender.org/blender/blender/pulls/123723
Provide a convenient way to access a writable directory for extensions.
This will typically be accessed via:
bpy.utils.extension_path_user(__package__, create=True)
This API is provided as some extensions on extensions.blender.org
are writing into the extensions own directory which is error prone:
- The extensions own directory is removed when upgrading.
- Users may not have write access to the extensions directory,
especially with "System" repositories which may be on shared network
drives for example.
These directories are only removed when:
- Uninstalling the extension.
- Removing the repository and its files.
When removing a repository & files a valid module name was assumed.
While this should always be the case, add an additional check so in
the unlikely event of memory/file corruption (especially `..`)
recursively removing files outside the repository is never allowed.
The value was set and transfered to `MeshBatchCache`but never
actually used. Even then, this is clearly not a good solution to the
problem the comments mentioned. If that happens if would be
better to solve it in a different way.
Addresses #121240.
Instead of allocating a new array and recalculating mesh triangulation
every time the user enters sculpt mode, reuse the mesh's existing cache.
Currently in order to avoid recalculating triangulation on every brush update
(which would typically be necessary because the triangulation direction
depends on vertex positions), add a mechanism to "freeze" the cache to
skip recalculations until the user exits sculpt mode. That even avoids
recalculation if vertex positions aren't affected. This is necessary because
we can't use the cache in a dirty state; tagging the cache dirty frees the
triangulation array.
Removing the duplicate triangles array reduces memory usage by 384 MB
in a 16 million vertex sculpt, and makes entering sculpt mode 125ms faster
(tested on a Ryzen 7840u).
In the long term, I hope we find a different solution that's a bit more
transparent and hopefully more integrated with the caching system
in general. In the meantime, this is a relatively safe low impact change
that helps document the needs for such a system anyway.
Pull Request: https://projects.blender.org/blender/blender/pulls/123638
Changes the way the face set index generated for intialize by material.
In current implementation face set index is generated by adding 1 to
material index. In most cases it'll work fine. But in some cases hidden
face sets and material face sets can have same index.
Pull Request: https://projects.blender.org/blender/blender/pulls/123465
On rare occassions we need to turn an icon into a bitmap rather than
just draw it. For example, File Browser needs the bitmaps of the large
folder and file icons for use while dragging list items. This PR just
adds functions for this conversion from cached glyphs, and then uses
them to load the gSpecialFileImages "prv" icons so we no longer have
to include these in an embedded PNG file.
Pull Request: https://projects.blender.org/blender/blender/pulls/123749
This was previously named `UV` in the UI.
Now renamed to the more appropriate `Rotation` since
it controls the random rotation of the texture on
each stroke point.
Otherwise implements the same functionality as GPv2.
Pull Request: https://projects.blender.org/blender/blender/pulls/123741
Some tests would access system paths somehow, which implicitely creates
the static `m_systemPaths` variable, but would not explicitely call
`GHOST_DisposeSystemPaths` at the end to release it.
Noticeable when disabling the `WITH_TESTS_SINGLE_BINARY` option.
Clear depth from Workbench when overlays are disabled.
Disable alpha blend and enable depth testing in the transfer mode
overlay so it works without a previously rendered depth buffer.
Pull Request: https://projects.blender.org/blender/blender/pulls/123729
The Plane Track Deform node produces wrong outputs in the GPU compositor
in case the input size was different from the movie size. That's because
the coordinates were normalized based on the input size, while they
should be normalized based on the output size, which is what this
patches does.