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
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.
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
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 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>
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
Mouse and NDOF events are defined in enums that are never used
directly by RNA through RNA_def_property_enum_items. As a result, they
don't get automatically extracted to the translation files and need to
be manually, through N_() macros.
The translation context used is the same as in other places related to
KeyMapItem: "UI_Events_KeyMaps".
Pull Request: https://projects.blender.org/blender/blender/pulls/116390
STL/PLY (also Collada) use `BKE_mesh_assign_object` to assign a mesh
(already in main, has a usercount of 1) to a fresh object.
That function does a bunch of (unneeded) things (test modifiers/
materials which is not necessary since these are fresh objects) next to
increasing usercount. Collada steers against this by reducing usercount
again. Other importers such as alembic assign the mesh directly to
object data (which is also what this PR proposes).
Pull Request: https://projects.blender.org/blender/blender/pulls/123558
During ray tracing there is a missing resource. On OpenGL this doesn't
matter as it will reuse the previous binding. But on Metal or Vulkan
each resource needs to be added to update bindings.
Pull Request: https://projects.blender.org/blender/blender/pulls/123655
`mat4x4f` is not found when loading .blend files which were written
before this struct existed. The buffer-overwrite wrote into the buffer
size of our allocator (`MemHead`).
The ocean modifier uses its Bake operator for both baking and freeing
the cache, based on the `free` operator property.
There are two bugs here:
1. The "Delete Bake" variant of the button was created using the
`WM_OP_EXEC_DEFAULT` operator context. This skips the `invoke`
callback which is crucial for setting the operator `modifier`
property. Without that the modifier will just exit early.
The "Bake" button is drawn using the `uiItemO` function which uses
the invoke context automatically, so it does not have this issue.
2. The `free` property is set for the "Delete Bake" variant, but was
never reset to its initial `false` value. The "Bake" variant has to
also set this property, otherwise it will always execute the "free"
code path.
Pull Request: https://projects.blender.org/blender/blender/pulls/123506
Reference identifiers instead of "above" in code comments as these
tends to become outdated. Even when declarations are removed it's at
least clear that the reference no longer exists instead of referring to
whatever is currently above the declaration.
It's also straightforward to search history for a removed identifier.
Corrected 4 cases of references to things that were no longer above
the doc-strings. Noticed other references which look to be incorrect
but need further investigation.
File browser can now show thumbnail view in a larger range of sizes.
Unfortunately there is a lower bound currently set on the icon that is
shown in the middle of the "document" that assumes 64 is the smallest
(the old minimum). This causes these icons to overflow below 64. Just
something that was missed when we allowed smaller sizes. This small
change supports down to 16.
Pull Request: https://projects.blender.org/blender/blender/pulls/122811
If a non-instanced collection is linked, any collection exporters on the
linked collection would be active and invokable. This is probably not
desired as it could inadvertently overwrite files from the original.
Disable the operators in this case.
See PR for how each of the various append/link scenarios behave.
Pull Request: https://projects.blender.org/blender/blender/pulls/123149
This is the root cause of broken updates
on local lights.
The same local frustum was used for all of the
tilemap (up to 6) of a light. This made the
`intersect(frustum, box)` call buggy which
would return true only if the object would
intersect with the first tilemap of the light.
This lead to improper updates when the object
would hit this path.
Fix#122533
This is an alternative fix to #123524.
This is necessary, because `sculpt_update_object` is run after
the mesh is evaluated, but before the geometry depsgraph operation
is done. Only after this depsgraph node is done, `DEG_object_geometry_is_evaluated`
will return true.
This approach of `unchecked` methods has been preferred for now
over moving the call to `BKE_sculpt_update_object_after_eval`
to a separate depsgraph node or after depsgraph evaluation.
Previously, the node checked for all possible missing evaluations first.
However, some of the outputs may still work even if using another one
could cause a dependency cycle.
The issue is a combination of following aspects:
- Missing null-pointer check in the image operation, which is probably
why the result was buggy. It is addressed by #123493.
- In certain conditions loading image was wrongfully failing.
The reason for failing to read image were items with a null-pointer
image buffer left by the cache limit enforcer, which was considered
to be an indication of failed load from disk. The reason why the cache
limiter leaves items with null-ptr as an image buffer is kind of a
legacy limitation which was never resolved. Long story short: the
system expects put() to be called on the cache to clear its empty
items.
To solve the original issue of files considered to be unreadable
only set the cache-empty if the image buffer was added empty.
Pull Request: https://projects.blender.org/blender/blender/pulls/123496
The first input of the compositor Mix node determines resolution,
leading to situation when the second input will always be attempted
to be evaluated. If the first input is a longer image sequence than
the second input it leads to a crash.
Do a null-pointer check and return transparent image in this cases,
similar to what the Movie Clip operation is doing.
Pull Request: https://projects.blender.org/blender/blender/pulls/123493
Add back the "Add-ons" preferences, removing add-on logic from
extensions.
- Add support for filtering add-ons by tags
(separate from extension tags).
- Tags now respect the "Only Enabled" option.
- Remove the ability to enable/disable add-ons from extensions.
- Remove add-on preferences from extensions.
- Remove "Legacy" & "Core" prefix from add-on names.
- Remove "Show Legacy Add-ons" filtering option.
Implements design task #122735.
Details:
- Add-on names and descriptions are no longer translated,
since it's impractical to translate text which is mostly
maintained outside of Blender.
- Extensions names have a `[disabled]` suffix when disabled so it's
possible to identify installed but disabled extensions.
- The add-on "type" is shown in the details,
so it's possible to tell the difference between an extension,
a core add-on & a legacy user add-on.
- Icons are also used to differentiate the add-on type.
- User add-on's must be uninstalled from the add-ons section
(matching 4.1 behavior).
- Simplify logic for filtering tags, move into a function.
Primarily the `evaluation_mode` enum prop was incorrectly grouped with
the previous `xform_op_mode` enum causing them to combine in the UI.
Additionally, group the `allow_unicode` option under the Blender Data
sub layout as was intended but got lost in a merge.
Pull Request: https://projects.blender.org/blender/blender/pulls/123513
Make half-size waveforms default in new files and Video Editing template.
They are more space efficient and display more detail at small sizes.
This does not change existing files.
Pull Request: https://projects.blender.org/blender/blender/pulls/123511
Some of the existing colors were hard to read with the new
strips design.
Tried following the concept from 2.83 redesign rationale:
* Same saturation for regular strips.
* Lower saturation for effect strips.
* Tried to reduce the hue shift between certain similar effects.
Other changes:
* Match saturation of all regular strips.
* Reduce value and saturation (mostly value) of color tags so
they are readable in both light and dark text.
* Image: Follow node editor Image node socket color.
* Color: Use the same hue as the color node socket.
* Text: Change it so it doesn’t use the same as Image.
* Sound: Use a greener color, less movie-like blue.
* Scene: Light gray, similar fashion to Collections.
* Other strips had minor adjustments.
Images and details in the pull request.
Pull Request: https://projects.blender.org/blender/blender/pulls/123446