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.
The image views type can change depending based on how they are bound
to shaders. When a shader accesses a view without array operations,
the image view should not be an array. This was previously ignored.
Pull Request: https://projects.blender.org/blender/blender/pulls/123726
The goal of these changes was to make the distinction between Extensions
and add-ons more clear.
* Extensions -> Get Extensions
* Separate Get Extensions from Add-ons and Themes
* Add Tooltip for Get Extensions, Add-ons and Themes
Co-authors:
* Pablo Vazquez <pablo@blender.org>
* Brecht Van Lommel <brecht@blender.org>
This updates the settings in `BKE_gpencil_brush_preset_set`
to better match the behavior of the brushes in GPv2.
Changes:
* Use a default spacing of 100%. Only the airbrush and the rough pencil need a lower spacing (higher density).
* Use the pen pressure setting for the radius.
* Update the `draw_angle_factor` for the marker chisel.
The issue had essentially the same origin as #123538 (fixed
in #123719), but in the autokeying code. The autokeying code was
already fully resolving the RNA path to be relative to the owning
ID, but the RNA pointer getting passed with that fully-resolved path
to the keying code was the struct for the not-fully-resolved path.
This fixes it by simply passing the RNA pointer for the owning ID
rather than the struct being keyed.
Pull Request: https://projects.blender.org/blender/blender/pulls/123721
The issue was that the Python keyframing code was already resolving the
RNA path fully to the owning ID, but then erroneously passing the
non-ID RNA pointer (in this case the sound sequence pointer) to the
keyframing code with that fully resolved path.
Notably, it wasn't just the VSE keyframing that was broken: keying any
non-ID structs via the Python API was broken. A good example is pose
bones: the Python keyframing code was resolving e.g. "location" on
the bone to "pose.bones["Bone"].location", but then passing that
path along with the pose bone struct to the keyframing code. Since
that fully resolved path of course doesn't exist on the bone itself,
keying would fail.
This fixes it by simply passing the owning ID's RNA pointer instead,
which it should have been doing in the first place.
Pull Request: https://projects.blender.org/blender/blender/pulls/123719
It previously used duplicated, bespoke code to do the keyframing, and therefore
still only worked with legacy actions.
This makes it use the same keyframing function as everything else, making it
naturally work with layered actions as well. There should be no functional
changes for legacy actions.
Pull Request: https://projects.blender.org/blender/blender/pulls/123673
Makes sure the the brush strength is used to write to
the fill opacity.
The conditions for what attribute to skip when copying
previous data from the curves geometry was getting a bit
complicated so this part got refactored.
This adds the randomization options for radius and opacity (strength).
Instead of pure white noise (like in GPv2) this uses perlin noise to make
the effect less jagged. The scale of the noise (in screen space) is
hardcoded to roughly fit GPv2. It could be exposed as a setting in the
future to get noise that changes slower/faster along the stroke.
Pull Request: https://projects.blender.org/blender/blender/pulls/123715
When clearing only the depth of a depth/stencil only the depth
part of the image aspect was stored in the node. This is invalid
when the image needed to be transitioned.
Pull Request: https://projects.blender.org/blender/blender/pulls/123713
When having a sequential read image barriers for the same resource
and the second one requires an image layout transition the incorrect
barriers where generated.
This was fixed by aligning the implementation with write image barriers.
Pull Request: https://projects.blender.org/blender/blender/pulls/123712
The issue was a missing Dependency Graph update tag.
That usually happened in `ANIM_list_elem_update/59` but only if the action is still linked
to the `AnimData`. That isn't the case when all keys get deleted because the action is unlinked
in `animdata_fcurve_delete` if the action is empty.
Pull Request: https://projects.blender.org/blender/blender/pulls/123553
When changing the URL or access token, re-synchronize remote data
automatically.
This changes automatic synchronization to use a background task that
runs based on a timer instead of a modal operator since the operator
is more intrusive and not so well suited to running based on changes
to RNA.
In some cases, sculpt code currently creates undo steps that are stored
in `step_init` in the undo stack, but then skips actually pushing them.
That can happen when an operator is cancelled (like the transform
operator in #123172) or because pushes in "nested operator calls"
are currently explicitly disabled. That happens when calling the brush
operator from a script.
It turns out the undo code never freed the `step_init`, probably because
it assumed it would be pushed to be part of the stack afterwards.
Personally I'm not convinced that separating undo step creation into
two stages with `step_encode_init` and `step_encode` is a great design
or a necessary one, but I'm trying not to get into that deeper right now.
Fixes#123172
Pull Request: https://projects.blender.org/blender/blender/pulls/123331
Fixes#123612, #123611, #123621
Continue the restructuring in previous commits in this area to avoid
repeating more work for every node. The commit is large for a bug fix
but the best way to fix the issues was to continue making the area more
generally sane. Some specific changes:
- Run the switch for undo type outside of the iteration over nodes.
- Further split multires and base mesh undo so they don't go through
the same per-node functions.
- Replace the node-tagging mechanism with specific loops per undo type.
- Properly assign the step type when pushing a single node at a time.