Commit Graph

110263 Commits

Author SHA1 Message Date
Sergey Sharybin
0081c4b64a Fix #123576: VSE Crash: Preview render fails if two Scene strips are stacked
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
2024-06-26 09:58:46 +02:00
Lukas Tönne
864d701083 Fix #123705: Object Info node is not setting Transform output
This was simply missing in the Object Info node.

Pull Request: https://projects.blender.org/blender/blender/pulls/123709
2024-06-26 09:50:52 +02:00
Campbell Barton
96906536db Extensions: add a Python API for user editable extension directories
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.
2024-06-26 14:23:17 +10:00
Campbell Barton
f5aaee39d2 Extensions: prevent recursive file removal for corrupt repositories
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.
2024-06-26 14:22:21 +10:00
Andrej730
fcad7e7d2b Fix mathutils array parsing exception message
Error in exception message when the argument doesn't meet the sequence
length requirement.

Ref: !123748
2024-06-26 10:25:56 +10:00
Mangal Kushwah
30ad15c01c Fix: #123349 Incorrect initialization of face sets by material
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
2024-06-26 02:22:16 +02:00
Miguel Pozo
066619e1a8 Fix: GPU: GLStorageBuf::async_flush_to_host non named path
Fix the read parameter when there's no direct_state_access_support.
2024-06-25 19:52:39 +02:00
Miguel Pozo
9b61673b46 Fix: EEVEE: Add missing view bind
Seems to fix #123413
2024-06-25 17:58:21 +02:00
Bastien Montagne
fccdfa2b06 Fix (unreported) missing IDTypes init in lib_remapper tests.
This is usualy hidden it'd seem by the `WITH_TESTS_SINGLE_BINARY`
option.
2024-06-25 16:42:30 +02:00
Miguel Pozo
b8587c96ec Fix #120628: Transfer mode overlay flickering artifacts
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
2024-06-25 16:09:06 +02:00
Miguel Pozo
f16cf49c8a Cleanup: EEVEE: Clarify Jitter Camera tooltip 2024-06-25 15:56:51 +02:00
Omar Emara
f19a9e9b4d Fix #123607: Plane Track Deform produces wrong output
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.
2024-06-25 16:37:18 +03:00
Dalai Felinto
583ad3460a UI: Extensions: Changes on the Preferences Tabs
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>
2024-06-25 15:14:04 +02:00
Dalai Felinto
8ee43f34be UI: Simplify tooltip for the preferences active section 2024-06-25 15:13:50 +02:00
Jeroen Bakker
fa39948602 Fix #123583: Facesets not visible in EEVEE
Facesets overlay used a depth equal test, which isn't supported by
EEVEE.

Pull Request: https://projects.blender.org/blender/blender/pulls/123714
2024-06-25 11:17:19 +02:00
Jeroen Bakker
50bda25f10 Cleanup: make format 2024-06-25 11:00:17 +02:00
Christoph Lendenfeld
34dcfb365b Fix #88208: Multi user action missing depsgraph update
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
2024-06-25 09:45:12 +02:00
Campbell Barton
4712aca2a8 Fix #123682: extension repo URL/access token changes don't re-sync
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.
2024-06-25 15:52:04 +10:00
Sean Kim
2cc6de8f7e Fix #123574: Automask area normal causes garbled meshes
Pull Request: https://projects.blender.org/blender/blender/pulls/123697
2024-06-24 22:57:09 +02:00
Hans Goudey
1b80125a67 Fix: Leak of initialized but not pushed undo step
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
2024-06-24 21:38:21 +02:00
Clément Foucault
0b7ae0c75a EEVEE: Reduce binary size on Mesa caused by fixed size arrays
For some reasons this reduce the binary size from 11MB for
the 3 shaders to less than 1MB.
2024-06-24 19:31:33 +02:00
Miguel Pozo
d88150ce1f Fix: GPU: Skip binaries larger than the shared memory 2024-06-24 18:33:05 +02:00
Damien Picard
65de0db503 I18n: translate mouse and NDOF events in the keymap preferences
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
2024-06-24 18:10:39 +02:00
Jeroen Bakker
30ec6ac961 EEVEE: Missing resource when tracing planar probes
_No response_

Pull Request: https://projects.blender.org/blender/blender/pulls/123667
2024-06-24 14:18:26 +02:00
Bastien Montagne
a94798d31c Fix (unreported) assert in recursive 'foreach id' iterating code.
owner ID pointer needs to be reset after initial usage, for the
recursively processed 'children' IDs.
2024-06-24 13:33:21 +02:00
Philipp Oeser
696848204c Fix #118148: STL/PLY: Imported object data has increased usercount
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
2024-06-24 13:00:58 +02:00
Jeroen Bakker
e4cfa1b8ba EEVEE: Subsurface missing bindings
Bindings where bound using incorrect naming. (out_indirect_img vs out_indirect_light_img).

Pull Request: https://projects.blender.org/blender/blender/pulls/123664
2024-06-24 12:54:26 +02:00
Jeroen Bakker
1663df0c8f EEVEE: Ray generation missing resource
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
2024-06-24 11:51:31 +02:00
Jacques Lucke
c1c3ed0e4b Fix #123542: memory display error
`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`).
2024-06-24 11:38:59 +02:00
Lukas Tönne
37e2a27bdd Fix #80876: Ocean modifier "Delete Bake" button does not work
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
2024-06-24 10:27:28 +02:00
Jeroen Bakker
560b36ac8d EEVEE: Fix incorrect texture usage DoF
The color textures in the DoF module are also bound in gather
framebuffer but didn't got the correct usage flags resulting in
validation errors.

Pull Request: https://projects.blender.org/blender/blender/pulls/123650
2024-06-24 10:08:10 +02:00
Campbell Barton
e48a9fc5ed Extensions: add missing update callbacks for repository flags
Enabling/disabling a repository wasn't redrawing when it should.
2024-06-24 12:14:48 +10:00
Campbell Barton
52b63777a1 Extensions: use the full path for remote "file://" repositories
The logic to use a domain name was being applied to file:// paths,
causing only the first directory to be used.
2024-06-23 14:35:06 +10:00
Campbell Barton
f646956149 Cleanup: spelling in comments 2024-06-23 12:25:22 +10:00
Campbell Barton
7632c528de Docs: remove references to "above" in code comments & corrections
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.
2024-06-23 12:14:19 +10:00
Harley Acheson
3229bde954 UI: Fix Minimum File Type Icon Size in File Browser
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
2024-06-22 01:30:49 +02:00
Jesse Yurkovich
9d8a90d53c Fix: Disable collection export for linked collections
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
2024-06-21 20:52:18 +02:00
Clément Foucault
2adb9762fa Fix: EEVEE: Shadow: Wrong tilemap corners
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
2024-06-21 19:48:38 +02:00
Miguel Pozo
685817888e Fix #121629: EEVEE : Transparent shadow tagging performance in ortho view 2024-06-21 18:32:53 +02:00
Jacques Lucke
e72730d763 Fix: assert when switching to sculpt mode
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.
2024-06-21 15:19:10 +02:00
Weizhen Huang
23e497d1af Fix: Memory leak in volume with packed file
Pull Request: https://projects.blender.org/blender/blender/pulls/123556
2024-06-21 15:08:55 +02:00
Jacques Lucke
046a8f92eb Fix #123539: Object Info node incorrectly reports dependency cycle
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.
2024-06-21 12:58:15 +02:00
Sergey Sharybin
a13a116de9 Fix #112804: Compositor movie not rendering if cache is full
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
2024-06-21 10:24:13 +02:00
Sergey Sharybin
320c2e8878 Fix: Compositor crash when second image of Mix node is missing
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
2024-06-21 10:22:42 +02:00
Dalai Felinto
49725106af Fix extensions update not showing on the status bar by default
Ref !123495
2024-06-21 12:30:10 +10:00
Campbell Barton
72ef03d5a1 Extensions: split add-ons & extensions into separate preferences
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.
2024-06-21 10:42:53 +10:00
Aras Pranckevicius
b89c7635d2 Fix: VSE waveform drawing slightly outside strips
Address that by leaving several pixels off the edges.

Image examples in the pull request.

Pull Request: https://projects.blender.org/blender/blender/pulls/123515
2024-06-20 22:10:06 +02:00
Jesse Yurkovich
aba1a2b6c2 Fix: incorrect grouping of UI props for USD export
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
2024-06-20 20:50:37 +02:00
Pablo Vazquez
a4dce75123 VSE: Make waveforms half size by default
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
2024-06-20 20:26:17 +02:00
Pablo Vazquez
abb233dd1e VSE: Update theme colors for strips
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
2024-06-20 20:22:12 +02:00