Commit Graph

110281 Commits

Author SHA1 Message Date
Miguel Pozo
baf07c22bd Revert "Fix #123794: Crash when UDIMs have gray and color tiles"
This reverts commit 095e78bd28.
2024-06-27 19:15:55 +02:00
Miguel Pozo
095e78bd28 Fix #123794: Crash when UDIMs have gray and color tiles 2024-06-27 19:14:48 +02:00
Michael Kowalski
b2f8f5a491 Fix: USD import: domelight Y-up orientation
Added necessary rotation to convert from Y-up to Z-up when
importing USD dome lights as world materials.

Pull Request: https://projects.blender.org/blender/blender/pulls/123797
2024-06-27 19:06:49 +02:00
Sergey Sharybin
32588169d3 Fix: Initialization of paint mode fails in certain files
It is possible that the file does not have Grease Pencil paint
yet, leading to a crash in the BKE_paint_init().

The simple fix is to swap the order of acquiring the paint
pointer and the code which ensures that this paint exists.
2024-06-27 18:40:04 +02:00
Christoph Lendenfeld
f3b393a74a Fix #123738: Keyframe drawing issue while duplicating keys
The issue was introduced with f06fd85d97 where the building of the keylist used was
restricted to the visible range of the dope sheet.
The optimization uses `BKE_fcurve_bezt_binarysearch_index` which can only work when
the FCurve is sorted. During transformations in the dope sheet this is not the case as the
sorting only happens when the transformation is applied.
The fix is to do a range check in the for loop instead of a binary search.
Testing the range comes with a performance impact though.

| Before optimization | broken with f06fd85d97 | this PR |
| - | - | - |
| 90ms | 6ms | 20ms |

An alternative solution would be to sort FCurves during transformations of the Dope Sheet.
This is done in the Graph Editor and with the recent speedups introduced there this could be
a viable option. However this is out of scope for this fix.

Pull Request: https://projects.blender.org/blender/blender/pulls/123824
2024-06-27 16:50:44 +02:00
Hans Goudey
8945b7e49a Fix #123809: Sculpt visibility invert missing PBVH node update
Caused by 1a37017244
2024-06-27 09:29:45 -04:00
Christoph Lendenfeld
ef8f14f3d6 Fix #90923: Bone Stick active color
The `Stick` drawing mode for armatures was overriding the colors,
meaning it ignored bone colors specified by the user and also didn't use
the correct color for selected vs active.

Pull Request: https://projects.blender.org/blender/blender/pulls/123544
2024-06-27 15:23:43 +02:00
Brecht Van Lommel
d9bd35c4bc Cleanup: make format 2024-06-26 20:39:01 +02:00
Damien Picard
f739d4832e I18n: Extract and disambiguate a few messages
Disambiguate
- "Thickness": use "Material" for EEVEE's thickness material setting.
- "Generated": use "Texture" for texture coordinates, "Image" for
  image source, keep default context for animation keyframe types.

Translate
- Split "Online access required to (check for|install) updates..."
  into 2x2 messages individually translatable.
- "Geometry" input in bake node.
- "New" for the Palette ID: extract it as part of the
   BLT_I18N_MSGID_MULTI_CTXT for "New".

Some issues reported by Gabriel Gazzán and Satoshi Yamasaki.

Pull Request: https://projects.blender.org/blender/blender/pulls/123404
2024-06-26 19:25:22 +02:00
Damien Picard
26cdf7e340 I18n: Extract many custom labels defined in uiItem*
Those labels needed a manual translation with IFACE_() or RPT_():
  - "Add Item",
  - "Blend",
  - "Cached from the first line art modifier.",
  - "Custom Curve",
  - "Custom Path",
  - "Custom Range",
  - "End",
  - "Enter a Unicode codepoint hex value",
  - "Forward Axis",
  - "Insert Unicode Character",
  - "Mid Level",
  - "Min",
  - "Mode",
  - "No Items",
  - "Object",
  - "Path",
  - "Probability",
  - "Sample Radius",
  - "Sharp edges or custom normals detected, disabling GPU subdivision",
  - "Start",
  - "Texture Mapping",
  - "Up Axis",
  - "Using both CPU and GPU subdivision",
2024-06-26 19:25:20 +02:00
Clément Foucault
36ff8c0231 Fix: EEVEE: Shadow visibility flag not versioned for 4.1 files
The versioning code was introduced in 4.1 release cycle when
we were planning to release EEVEE next in 4.1. This means that
the versioning was not applied to files created in 4.1 using
EEVEE-Legacy and loaded into 4.2.

Moving the code just before the EEVEE-Legacy removal make
the versioning work as expected. There is no side effect
inside the versioning code.

Fix #123500
2024-06-26 18:57:11 +02:00
Clément Foucault
d4de4c1f01 Fix: EEVEE: Shadow: Jitter more than the light radius
When enabled, jittered shadows were jittering inside the
shading light radius that is clamped to a minimum for
numerical precision reasons.

This patch sets the shadow radius to 0 only if the original
light radius is also zero, and use the former to determine
wether or not to apply jittering.
2024-06-26 16:58:37 +02:00
Miguel Pozo
2804b000ac Fix: GPU: Fix handling of invalid binary caches 2024-06-26 16:44:46 +02:00
Philipp Oeser
d4f5d4a6f6 Fix #123770: Vertex paint Accumulate option breaks Blur action
Accumulating allocates previous colors (which are used in
`do_vpaint_brush_blur_XXX`).

The actual problem here was that the  state of `brush_use_accumulate`
was not consistent across the lifetime of strokes.
Vertexpaint was doing the allocation in `vertex_paint_init_stroke`
(**before** `update_cache_invariants` where the mode gets changed to
`BRUSH_STROKE_SMOOTH` etc.), so here it still seemed we would use
accumulation, whereas later (after internally switching the tool/brush)
this was not the case anymore, leading to wrong behavior of
`do_vpaint_brush_blur_XXX`.

So now move the allocation to `init_session_data` (same as for
weightpaint) to make sure all codepaths have a consistent state of
`brush_use_accumulate`.

NOTE: this was made more obvious since 6de6d7267f added SHIFT-blurring
to the keymap

Pull Request: https://projects.blender.org/blender/blender/pulls/123778
2024-06-26 15:38:26 +02:00
Philipp Oeser
bc0b86797c Fix #94125: Collada: not all edit mode changes are exported
This was the case when mulitple objects had changes in multi-object-
editmode.

Similar to f8b11528b2 & 3dd08beab3, this now ensures we have mesh data
in editmode.

Pull Request: https://projects.blender.org/blender/blender/pulls/123732
2024-06-26 15:36:47 +02:00
Clément Foucault
56023d5b63 Fix: EEVEE: Transparent pass break AO pass
This was caused by bad ordering. AO pass should only
include Dithered objects.

Fix #123393
2024-06-26 15:21:02 +02:00
Miguel Porces
b120440f7c Fix: Nodes: show group icon for custom node groups
The bl_icon of NodeCustomGroups is being ignored in latest versions.
This commit re-enables the icon drawing for those nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/123669
2024-06-26 14:03:02 +02:00
Jacques Lucke
29f6167db1 Fix #123624: no geometry after applying visual geometry to mesh
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.
2024-06-26 14:00:05 +02:00
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